/* shell.css  -  the frame every page sits in: the colours, the top bar, the phone bar, the buttons.
   The look (Joey's pick 3, 2026-10-02): a near-black night sky in neutral tones, grey panels, white
   text; the client's colour (--accent, from settings.json) only on buttons and the open door.
   The page never grows: html and body never scroll, only #middle does. Phone rules at the bottom. */
:root {
  --bg: #0c0d10;
  --panel: rgba(28, 30, 35, 0.92);
  --panel-2: rgba(38, 40, 46, 0.92);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f3f3f4;
  --soft: rgba(243, 243, 244, 0.74);
  --faint: rgba(243, 243, 244, 0.5);
  --panel-solid: #1a1c20;
  --topbar: rgba(12, 13, 16, 0.94);
  --phonebar: rgba(12, 13, 16, 0.97);
  --field-bg: #ecebe8;          /* the question boxes */
  --field-ink: #141518;
  --field-hint: #6d6a66;
  --feature-bg: #ecebe8;        /* the one card that stands out, and your own chat bubble */
  --feature-ink: #141518;
  --feature-soft: #3d3a36;
  --feature-faint: #57534e;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  --accent: #8d0c0f;
  --accent-ink: #ffffff;
  --radius: 20px;
  --display: "Outfit", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
}
/* light: a daytime sky, white panels, dark text; the client's accent stays the same */
:root[data-theme="light"] {
  --bg: #eef0f3;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-2: #ffffff;
  --panel-solid: #ffffff;
  --line: rgba(20, 22, 27, 0.1);
  --line-2: rgba(20, 22, 27, 0.18);
  --text: #15171b;
  --soft: rgba(21, 23, 27, 0.74);
  --faint: rgba(21, 23, 27, 0.52);
  --topbar: rgba(255, 255, 255, 0.94);
  --phonebar: rgba(255, 255, 255, 0.97);
  --field-bg: #ffffff;
  --field-ink: #15171b;
  --field-hint: #8a8781;
  --feature-bg: #1b1d22;
  --feature-ink: #f3f3f4;
  --feature-soft: rgba(243, 243, 244, 0.8);
  --feature-faint: rgba(243, 243, 244, 0.6);
  --shadow: 0 14px 40px rgba(20, 22, 27, 0.14);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body { font-family: var(--body); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
#app { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; }

/* the page's colours ease across while the sky plays its sunset or sunrise */
body, #top, #phonebar, .panel, .try, .askbox, .msg, .theme-btn, .me, .logo, .btn.line, .ask-btn {
  transition: background-color 0.9s ease, color 0.9s ease, border-color 0.9s ease;
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* the top bar */
#top {
  flex: none; display: flex; align-items: center; gap: 24px; height: 64px; padding: 0 28px;
  background: var(--topbar); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; overflow: hidden;
  background: var(--panel-2); border: 1px solid var(--line-2); font-family: var(--display); font-weight: 700; font-size: 13px; color: var(--soft);
}
.logo img { width: 100%; height: 100%; object-fit: contain; }
.wordmark { font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: 0.01em; }
.wordmark b { font-weight: 700; color: var(--soft); }
#doors { display: flex; gap: 4px; margin-left: 10px; }
#doors a, .ask-btn {
  font-family: var(--display); font-weight: 500; font-size: 15.5px; color: var(--soft); text-decoration: none;
  padding: 8px 15px; border-radius: 999px;
}
#doors a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
#doors a.on { color: var(--accent-ink); background: var(--accent); }
.ask-btn { margin-left: auto; color: var(--text); border: 1px solid var(--line-2); }
.ask-btn.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.theme-btn {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  border: 1px solid var(--line-2); color: var(--text);
}
.theme-btn:hover { background: rgba(127, 127, 127, 0.12); }
.theme-btn svg { width: 18px; height: 18px; }
.me {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--panel-2); border: 1px solid var(--line-2); font-family: var(--display); font-weight: 600; font-size: 13px;
}

/* the middle: the only thing that scrolls */
#middle { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
#middle.fixed { overflow: hidden; }
.view { min-height: 100%; }
#phonebar { display: none; }

/* shared pieces */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px;
  border-radius: 999px; font-family: var(--display); font-weight: 600; font-size: 15.5px; text-decoration: none; white-space: nowrap;
}
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn.line { border: 1px solid var(--line-2); color: var(--text); }
.btn.small { height: 36px; padding: 0 15px; font-size: 14px; }
.btn:disabled { opacity: 0.5; cursor: default; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.page { max-width: 1180px; margin: 0 auto; padding: 44px 28px 80px; }
.mark { font-family: var(--display); font-weight: 600; font-size: 13.5px; letter-spacing: 0.12em; color: var(--faint); text-transform: uppercase; }
.page h1 { font-family: var(--display); font-weight: 700; font-size: 52px; line-height: 1.04; letter-spacing: -0.02em; margin: 10px 0 14px; }
.page .lede { font-size: 17.5px; line-height: 1.55; color: var(--soft); max-width: 640px; }

/* a page that is built next, with Joey, page by page */
.soon { margin-top: 30px; padding: 26px 28px; max-width: 640px; }
.soon h2 { font-family: var(--display); font-weight: 600; font-size: 22px; margin-bottom: 8px; }
.soon p { color: var(--soft); line-height: 1.55; margin-bottom: 18px; }

/* the cards on every door, and the SOP page a card opens (Joey, 2026-10-03) */
.search { display: block; width: 100%; max-width: 560px; height: 48px; margin-top: 22px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font: inherit; font-size: 15.5px; }
.search:focus { outline: none; border-color: var(--accent); }
.none { margin-top: 6px; }
.part .download { margin-top: 12px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.tabs:empty { display: none; }
.tab { height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); color: var(--soft); font-family: var(--display); font-weight: 500; font-size: 14.5px; cursor: pointer; }
.tab.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; }
.card { display: block; padding: 22px 24px 24px; color: var(--text); text-decoration: none; box-shadow: var(--shadow); min-height: 150px; }
a.card:hover { border-color: var(--accent); }
.card .tag { display: inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.card h2 { font-family: var(--display); font-weight: 600; font-size: 21px; line-height: 1.25; margin-bottom: 8px; }
.card p { color: var(--soft); line-height: 1.5; }
.card.empty { box-shadow: none; border-style: dashed; border-color: var(--line-2); background: var(--panel); opacity: 0.7; }
.card.empty h2, .card.empty p { color: var(--faint); }
.sop { max-width: 820px; }
.sop .back { display: inline-block; color: var(--soft); text-decoration: none; font-weight: 600; margin-bottom: 18px; }
.sop .back::before { content: "< "; }
.part { padding: 22px 26px; margin-top: 16px; }
.part h2 { font-family: var(--display); font-weight: 600; font-size: 20px; margin-bottom: 10px; }
.part p, .part li { color: var(--soft); line-height: 1.6; }
.part p + p { margin-top: 8px; }
.part ol, .part ul { padding-left: 22px; }
.part li + li { margin-top: 6px; }
.part.agent { border-color: var(--accent); }
.copy { display: flex; gap: 12px; align-items: center; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line-2); }
.copy code { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.sop-foot { display: flex; align-items: center; gap: 16px; margin-top: 22px; color: var(--faint); font-size: 14px; }

.story-frame { display: block; width: 100%; height: 100%; border: 0; }
#view-map { height: 100%; }

.sop h1 { font-size: 44px; }
.best b { display: block; font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.part ol { counter-reset: step; list-style: none; padding-left: 0; }
.part ol > li:not(.pic) { counter-increment: step; position: relative; padding-left: 44px; min-height: 30px; }
.part ol > li:not(.pic)::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 600 14px var(--display); }
.part li.pic { padding-left: 44px; list-style: none; }
.shot { display: block; max-width: 100%; max-height: 360px; margin: 12px 0 6px; border-radius: 14px; border: 1px solid var(--line-2); background: #fff; box-shadow: var(--shadow); }

/* ---------- phone ---------- */
@media (max-width: 760px) {
  #top { height: 56px; padding: 0 16px; gap: 12px; }
  #doors, .ask-btn { display: none; }
  .wordmark { font-size: 20px; }
  .theme-btn { margin-left: auto; }
  #phonebar {
    flex: none; display: grid; grid-template-columns: repeat(6, 1fr); height: 62px; padding: 0 2px;
    background: var(--phonebar); border-top: 1px solid var(--line);
  }
  #phonebar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 44px; font-size: 11px; font-weight: 600; color: var(--faint); text-decoration: none; }
  #phonebar a i { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid currentColor; }
  #phonebar a.on { color: var(--text); }
  #phonebar a.on i { background: var(--accent); border-color: var(--accent); }
  .page { padding: 26px 16px 48px; }
  .page h1 { font-size: 38px; }
  .page .lede { font-size: 16px; }
  input, textarea, select { font-size: 16px; }
  .cards { grid-template-columns: 1fr; gap: 12px; }
  .card { min-height: 0; padding: 18px 20px; }
  .part { padding: 18px 18px; }
  .copy { flex-direction: column; align-items: stretch; }
  .sop h1 { font-size: 30px; } .part li.pic { padding-left: 0; }
}
