/* Spot the Con: the site's own look, loaded after engine/src/style.css.
   Idea: a phone in a calm kitchen. Cool paper, deep teal for what you can trust (choices, help, links),
   amber for caution: whatever the voice on the line pushes you towards. The caller's lines sit in a grey
   "incoming call" bubble, so the player always sees whose words they are. Plain sans headings like a notice. */

:root {
  --bg: #eef0ec;
  --surface: #fbfcfa;
  --ink: #1d2527;
  --muted: #5f686a;
  --line: #d3d9d4;
  --accent: #1f6a70;        /* teal: choices, links, help */
  --accent-ink: #fff;
  --caution: #935409;       /* amber: the pressure, the trap (darker than --warm for 4.5:1 text contrast) */
  --caution-bg: #fbf0dc;
  --bubble: #e3e8e5;        /* the caller's speech bubble */
  --warm: #b26a12;
  --cold: #c9d0cb;
  --best: #2b7a52; --good: #2f5f8f; --ok: #8c6a14; --bad: #a8402f;
  --past: #6a7274;
  --radius: 12px;
  --head: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121719; --surface: #1a2023; --ink: #e5ebe8; --muted: #9ca7a5; --line: #2f383b;
    --accent: #6cbcc3; --accent-ink: #0d1d1f; --caution: #e3a54a; --caution-bg: #2b2214; --bubble: #232b2e;
    --warm: #e3a54a; --cold: #364044;
    --best: #6fc797; --good: #8fb6e0; --ok: #d6b25a; --bad: #e58676; --past: #98a2a0;
  }
}
:root[data-theme="dark"] {
  --bg: #121719; --surface: #1a2023; --ink: #e5ebe8; --muted: #9ca7a5; --line: #2f383b;
  --accent: #6cbcc3; --accent-ink: #0d1d1f; --caution: #e3a54a; --caution-bg: #2b2214; --bubble: #232b2e;
  --warm: #e3a54a; --cold: #364044;
  --best: #6fc797; --good: #8fb6e0; --ok: #d6b25a; --bad: #e58676; --past: #98a2a0;
}

a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Headings: plain and firm, like a notice on the wall. */
.section h1, .story-card h2, .ending-card h2, .setup h1, .guide h1, .guide h2 {
  font-family: var(--head); font-weight: 750; letter-spacing: -.015em;
}
.section h1 { font-size: 38px; }
.story-card h2 { font-size: 24px; }
.brand { color: var(--accent); font-weight: 700; letter-spacing: .06em; }
.brand::before {               /* a small handset before the site name */
  content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 7px; vertical-align: -2px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15 15 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15 15 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Story cards: a teal strip on top, like the edge of a phone. */
.story-card { border-top: 3px solid var(--accent); box-shadow: 0 1px 0 rgba(0,0,0,.03); }
.story-card.has-picture { border-top: 0; }
.tag { color: var(--accent); }

/* The caller's words: a grey incoming-call bubble, amber name. */
.companion-line.argue {
  border-left: 0; padding: 9px 13px 10px; margin: 0 0 .7em; max-width: 92%;
  background: var(--bubble); border-radius: 4px 16px 16px 16px; font-style: normal;
}
.companion-line.argue .who { color: var(--caution); }
.companion-line.argue .who::before { content: "\260E\FE0E  "; font-weight: 400; }   /* ☎ */
.companion-line:not(.argue) { border-left-color: var(--bubble); }
.beat.past .companion-line.argue { background: transparent; border: 1px solid var(--line); }

/* What the caller wants you to pick: amber, not the trusted teal. */
.choice .pushed { background: var(--caution-bg); color: var(--caution); border: 1px solid var(--caution); }

/* Small real moments (the kettle, a pigeon): quiet. */
.event-line { border-left-color: var(--line); color: var(--muted); }

/* Ending card: thinking traps in amber, help in teal. */
.traps li::marker { color: var(--caution); }
.site-notice { border-left-color: var(--caution); background: var(--caution-bg); border-radius: 0 8px 8px 0; padding: 8px 12px; font: 15px/1.45 var(--head); }

/* The "how sure" prompt keeps the trusted colour. */
.ask-sure { border-left-color: var(--accent); }

/* ---------- page moods (engine v1.11+ staging, "page" on a scene entry) ----------
   The engine moods only recolour the engine's own colours, so the site's caller bubble, amber and teal
   are set again here for every mood: teal stays "what you can trust", amber stays "the pressure". */
/* dusk: the evening at home with the phone (violet, like the evening drawings) */
html:root[data-page="dusk"] { --bg: #241f3a; --surface: #2f2849; --ink: #f1e9f3; --muted: #c2b4d0; --line: #4c4269; }
/* hook: the moment the scam has you (a dark page in the site's warning amber) */
html:root[data-page="hook"] { --bg: #211a10; --surface: #2c2316; --ink: #f6ecda; --muted: #cdb995; --line: #4d3e26; }
html:root[data-page="dusk"], html:root[data-page="hook"] {
  --cold: #3b404b; --past: #a9a194;
  --best: #5cbf85; --good: #79a8de; --ok: #d4ad55; --bad: #e0766d; --up: #6fcf97; --down: #ec8a80;
  color-scheme: dark;
}
html:root[data-page="night"], html:root[data-page="smoke"], html:root[data-page="alarm"], html:root[data-page="blackout"],
html:root[data-page="dusk"], html:root[data-page="hook"] {
  --accent: #6cbcc3; --accent-ink: #0d1d1f;
  --caution: #e3a54a; --caution-bg: rgba(227, 165, 74, .14); --warm: #e3a54a;
  --bubble: rgba(255, 255, 255, .09);
}
html:root[data-page="dawn"], html:root[data-page="cold"], html:root[data-page="warm"] {
  --accent: #1f6a70; --accent-ink: #fff;
  --caution: #935409; --caution-bg: rgba(178, 106, 18, .12); --warm: #935409;
  --bubble: rgba(0, 0, 0, .065);
}
