/* MindPalace design tokens (design language v0.4: docs/DESIGN_SYSTEM.md).
   Colors are HSL triplets, as in the live site's globals.css: use hsl(var(--x)) or hsl(var(--x) / .2).
   Started 2026-10-30 with what Home needs; grows as pages need more. */
:root{
  /* Meaning colors: the only colors for text, buttons, labels, meaningful lines and states (section 4.2) */
  --depth-indigo: 249 57% 20%;       /* ink: headings, body, primary buttons; outline of ◐ Verified, not reviewed */
  --ink-soft: 251 15% 38%;           /* secondary text, 6.7:1 on paper */
  --growth-green: 158 55% 25%;       /* ✔ Approved by admin; never scenery */
  --clarity-sage: 88 45% 60%;        /* ● Reviewed by a person */
  --sage-ink: 88 45% 32%;            /* sage as readable text */
  --insight-terracotta: 15 80% 60%;  /* honest bad news only: refused, a customer leaving, a blind spot */
  --terra-ink: 15 64% 43%;           /* terracotta as readable text */
  --muted-foreground: 215 15% 40%;   /* ○ Unreviewed, calm on purpose (live site value) */
  --border: 214 20% 85%;             /* hairlines (live site value) */
  --paper: 46 42% 94%;               /* page background for the new pages */
  --paper-raised: 45 60% 96%;        /* journal pages, bubbles, instrument frames */
  --night: 249 42% 19%;              /* the Palace's atmospheric indigo; text on it is paper */

  /* Roles: pieces use these, so the Palace (and any future dark mode) only re-points them (section 9) */
  --surface: var(--paper);
  --surface-raised: var(--paper-raised);
  --text: var(--depth-indigo);
  --text-soft: var(--ink-soft);
  --line: var(--border);
  --surface-alt: 40 100% 99%;        /* the second tone a band alternates with (white on paper) */
  --accent-text: 38 50% 33%;         /* brass text (#7E5F2A): brass as small words on the surface (an eyebrow, a number, a tag); 5.0:1 or better on every paper */
  --focus: var(--depth-indigo);      /* the focus ring: 2px, indigo on paper; paper on the night (below) */

  /* The identity (the user's four picks, 2026-11-07; DESIGN_SYSTEM.md "The identity"; DECISIONS). Colour roles, told apart by form:
     lilac is a voice, chalk a proposal, brass a person's decision. */
  --lilac: 263 21% 48%;              /* #746094 the accent voice: the italic word that ends a headline, on paper (4.6:1 or better on every
                                        paper; 2.9:1 on the night, so never there). Never a state or a piece of evidence */
  --chalk: 256 17% 57%;              /* #8A7FA6 proposed by the machine: a dashed line or mark, always with its words */
  --chalk-ink: 252 17% 48%;          /* chalk as readable words (5.5:1 on paper) */
  --brass: 40 48% 47%;               /* #B08A3E a person's decision: the brass bar, the brass tie, the decided mark, always with its words.
                                        A bar or a tie in brass means only this; brass warmth is small words (--accent-text) and hairlines */
  /* the night's own shades, named 2026-11-07 where the shared files typed them by hand (exact values: nothing changes on screen).
     Words, buttons and lines on the Palace's night: the footer, the product's screen bar, a story's chapters on the night */
  --on-night: 42 68% 95%;            /* #FBF6EA paper as words and buttons on the night */
  --on-night-soft: 262.5 26.7% 82.4%;/* #CFC6DE secondary words on the night */
  --on-night-bright: 45 100% 89%;    /* #FFF1C7 the brightest words on the night: a number, a word in code, the step in view */
  --brass-light: 40 68% 69%;         /* #E6C27A brass on the night: a decision's mark, small brass words, its rules */
  --chalk-light: 259.4 40.5% 83.5%;  /* #CFC4E6 chalk on the night: a proposal's mark, a quiet label */
  --night-deep: 248.6 48.8% 8.4%;    /* #0E0B20 the hall's deepest night, behind a story's chapters and the product's screens */
  /* type: two voices. Titles in the world speak Regular; section headings and card titles Bold; the Journal's masthead and
     essay titles ExtraBold. Sansita has these three weights (and italic 400): write no other */
  --title-weight: 400;
  --heading-weight: 700;
  --masthead-weight: 800;

  /* World core: scenery only, never for text, buttons, labels or states (section 4.3) */
  --world-line: #3D4652;
  --world-line-deep: #2A2540;
  --world-sand: #EAD9BD;
  --world-stone: #9A94A6;
  --world-mist: #DFEBE5;
  --world-meadow: #C6DACB;
  --world-hill: #98B8A0;
  --world-pine: #6F857C;
  --world-water: #83B8C2;
  --world-water-deep: #2E5F7A;
  --world-clay: #D8876D;
  --world-ochre: #E6B85B;
  --world-lilac: #B7A7D2;
  --world-lamp: #FFE7A8;
  --world-wood: #7A5A22;

  /* Type (section 5) */
  --font-display: 'Sansita', Georgia, serif;
  --font-text: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;

  /* Motion (section 8; guidance) */
  --ease: cubic-bezier(.16,1,.3,1);
  --dur-feedback: 180ms;
  --dur-fade: 350ms;
}

/* The Palace: atmospheric indigo re-points the roles */
.scene-palace{
  --surface: var(--night);
  --surface-raised: 249 38% 25%;
  --text: var(--paper);
  --text-soft: 46 25% 80%;
  --line: 249 25% 38%;
  --focus: var(--paper);
  --surface-alt: 249 46% 13%;        /* a deeper indigo for alternating bands */
  --accent-text: 40 69% 69%;         /* brass light on indigo */
  --brass: var(--brass-light);       /* a decision on the night: light brass (9:1) */
  --chalk: var(--chalk-light);       /* a proposal on the night */
}
/* The ring follows the surface it sits on: paper on every night surface, indigo again on paper laid over the night */
.on-night,.grounds,.band-night{--focus:var(--paper)}
.on-paper{--focus:var(--depth-indigo)}

/* Setting tones: Product, "Inside the system" (the impossible observatory under the Palace's dome).
   Scenery only (section 4.3): never text, buttons, labels or states. */
.setting-product{
  --world-hall: #0E0B20;          /* the dark hall */
  --world-hall-wall: #1A1636;     /* walls, galleries */
  --world-hall-stone: #2A2550;    /* stone edges, table rims */
  --world-hall-edge: #4B4478;     /* line art on dark */
  --world-sky: #1A1640;           /* the dome's painted sky */
  --world-brass: #C9A15E;         /* instruments */
  --world-brass-light: #E6C27A;
  --world-starlight: #FFF1C7;     /* stars, the beam */
}

/* Setting tones: Our Story, "Inside the explorer's mind": a memory palace drawn in pencil inside the explorer's head
   (docs/ABOUT_V1_DESIGN.md). Scenery only (section 4.3): never text, buttons, labels or states. */
.setting-our-story{
  --world-mind: #F1ECE3;          /* the dim paper inside the head */
  --world-pencil: #6B6478;        /* pencil lines: rooms, corridors, the palace before it fills */
  --world-wash: #B7A7D2;          /* lilac wash on the rooms (the world's lilac) */
  --world-dusk: #352C5C;          /* the mind's dusk, seen through the window */
  --world-dusk-light: #9A8CC6;
  --world-thought: #FFF8E9;       /* paper scraps */
}

/* Setting tones: Case studies (docs/superpowers/specs/2026-11-11-case-studies-final-design.md). Scenery only (section 4.3): never
   text, buttons, labels or states. */
.setting-cases{
  --case-line: #3D4652;      /* the world's line */
  --case-sheet: #FBF8EF;     /* a card in a drawing */
  --case-pencil: #6B6478;    /* pencil: an illustration, not data */
  --case-shade: rgba(31,22,80,.08);
}
