/* Night mode (Plain and Sketch): fixes for components that kept day-only colours.
   Day mode is untouched: every rule here is scoped to [data-scheme="night"]. */

/* 1. Gurugram map: a night map instead of the bright daytime one, with readable labels. */
:root[data-scheme="night"] .about-map-inset{background:#1d2629}
:root[data-scheme="night"] .about-map-art{filter:invert(.9) hue-rotate(180deg) saturate(.55) brightness(.92) contrast(.95)}
:root[data-scheme="night"] .about-map-city{color:#cfdcd9!important}
:root[data-scheme="night"] :is(.about-map>.about-chip,.about-map-label){background:#202c30e6!important;border-color:#4b6067!important;color:#dfe8e6!important}
:root[data-style="sketch"][data-scheme="night"] .about-map-inset{background:#231f30}
:root[data-style="sketch"][data-scheme="night"] .about-map-art{filter:invert(.9) hue-rotate(200deg) saturate(.6) brightness(.9)}
:root[data-style="sketch"][data-scheme="night"] :is(.about-map>.about-chip,.about-map-label){background:#2c2739e6!important;border-color:#796789!important;color:#eee8ff!important}

/* 2. Capability cards in Sketch night: dark purple paper with a coloured pencil edge,
      instead of muddy brown and teal fills. */
:root[data-style="sketch"][data-scheme="night"] .mosaic-stage :is(.automate,.insights,.connect,.notif,.search){background:var(--site-surface)!important}
:root[data-style="sketch"][data-scheme="night"] .mosaic-stage :is(.automate,.insights){box-shadow:inset 0 4px 0 #e9cf72,4px 5px 0 #b69be21a}
:root[data-style="sketch"][data-scheme="night"] .mosaic-stage .connect{box-shadow:inset 0 4px 0 #8fd3c7,4px 5px 0 #b69be21a}
:root[data-style="sketch"][data-scheme="night"] .mosaic-stage :is(.notif,.search){box-shadow:inset 0 4px 0 #f2a7cf,4px 5px 0 #b69be21a}

/* 3. "Question → System → Useful act" doodle in notebook card 02. */
:root[data-scheme="night"] .about-note-doodle{color:#b8d9d5}
:root[data-style="sketch"][data-scheme="night"] .about-note-doodle{color:#d2c4ff}

/* 4. Highlighter marks: the day yellow becomes a dark olive at night; use the accent tint. */
:root[data-scheme="night"] .xp-row strong{background-image:linear-gradient(var(--site-accent-soft),var(--site-accent-soft))}
:root[data-scheme="night"] .about-rail[data-mobile-rail] .step-label{background-image:linear-gradient(var(--site-accent-soft),var(--site-accent-soft))}
:root[data-scheme="night"] .about-step-pill::after{background:var(--site-accent-soft)}
:root[data-scheme="night"] .about-constellation .about-network-filters button[aria-pressed="true"]{background:var(--site-accent-soft)!important;color:var(--site-ink)!important}

/* 5. Paper sketches keep their paper look but stop glaring on dark backgrounds. */
:root[data-scheme="night"] :is(.about-focus-cover,.process-art,.about-notebook.sk-book>svg){filter:brightness(.88) contrast(1.04)}
:root[data-scheme="night"] .about-focus-cover{border-color:#ffffff22;box-shadow:3px 4px 0 #00000040}

/* 6. Project directory hint. */
:root[data-scheme="night"] .work-directory-hint{color:var(--site-muted)!important}

/* 7. Project interface drawings: at night they stay pencil-on-paper (the day palette), slightly
      dimmed, instead of dark grey on dark grey. Applies to Selected work (desktop + phone),
      project pages, menu previews and the enlarged sketch view. */
:root[data-scheme="night"] :is(.drawn-interface,.reference-gallery,.drawn-case-cover){--study-paper:#f7f8f5;--study-ink:#283235;--study-muted:#5d6a6d;--study-line:#9aa9ab;--study-accent:#335d65;--study-soft:#eceee9;--study-chart:#dde5e1}
:root[data-style="sketch"][data-scheme="night"] :is(.drawn-interface,.reference-gallery,.drawn-case-cover){--study-paper:#fffdf5;--study-ink:#352c4b;--study-muted:#71657b;--study-line:#86718f;--study-accent:#403275;--study-soft:#fff1ba;--study-chart:#d6ece7}
:root[data-scheme="night"] .project-motion{--study-alert:#98425e;--study-alert-soft:#f6e5ec}
:root[data-style="sketch"][data-scheme="night"] .reference-ui{--rui-bg:#fffdf5;--rui-paper:#fffdf5;--rui-ink:#352c4b;--rui-muted:#71657b;--rui-line:#aa96b4;--rui-brand:#403275;--rui-soft:#fff1ba}
:root[data-scheme="night"] :is(.drawn-interface,.reference-gallery,.drawn-case-cover,.reference-ui){filter:brightness(.9)}
:root[data-scheme="night"] .mobile-work-module-drawing,:root[data-scheme="night"] .mobile-work-sketch:not(.mobile-work-modules){background:var(--study-paper,#f7f8f5)}

/* 8. Yellow sticky note on project pages keeps dark pencil ink at night. */
:root[data-scheme="night"] .case-heading-note{color:#3d3a7a!important;filter:brightness(.92)}

/* 9. Project chapter tabs bar (phones) keeps a dark backdrop at night. */
:root[data-scheme="night"] .case-chapter-nav{background:color-mix(in srgb,var(--site-bg) 94%,transparent)!important}
:root[data-scheme="night"] .case-chapter-nav button{color:var(--site-ink)}
:root[data-scheme="night"] .case-chapter-nav button{background:var(--site-surface)!important;border-color:var(--site-line)!important}
:root[data-scheme="night"] .case-chapter-nav button[aria-current="location"]{background:var(--site-accent-soft)!important}
