/* The hub website's look: C1 · Sea Glass (chosen 2026-11-10), copied from claude_home/brand/brand-book.html.
   Every page in hub/web/ (and the talk page, hub/web/templates/talk.html) uses these classes.
   Rules from the brand book: tap targets 44 px and up, text contrast at least 4.5:1 in both themes, teal is the
   accent (harbour and heather are the other choices in Settings), attention and good are for status only.
   Components use only the token names below, never a colour written out, so light and dark always match.
   The token blocks are copied word for word from the brand book; change them there first. */

/* ===== C1 TOKENS: copied from the brand book (light, then the two dark blocks). ===== */
:root {
  --sea: #e3f0ec;        --sea-light: #eaf5f2;   --sea-deep: #d6e9e4;
  --glass: rgba(255, 255, 255, 0.72);            --glass-quiet: rgba(255, 255, 255, 0.5);
  --line: #c4ddd8;       --line-strong: #9fc3bc;
  --text: #0f2a2a;       --muted: #2f4f4c;
  --teal: #0e6b63;       --harbour: #1d5f8a;     --heather: #6b4ea0;
  --attention: #a3461f;  --good: #1f6f4a;
  --ink-on-accent: #ffffff;
  --knob: #ffffff;
  --shadow-accent: rgba(14, 107, 99, 0.25);
  --radius-tile: 26px;   --radius-small: 14px;
  --tap: 44px;
  --font: "Figtree", system-ui, sans-serif;
  /* Sea-glass ripple: faint teal rings over a soft top-to-bottom wash. */
  --ripple: repeating-radial-gradient(circle at 18% 8%, rgba(14, 107, 99, 0.06) 0 2px, transparent 2px 16px);
  --wash: linear-gradient(170deg, var(--sea-light) 0%, var(--sea-deep) 100%);
  --sheen: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 55%);
  color-scheme: light;
}
/* C1 dark, "sea glass at night": deep green-black water, smoked glass, a brighter teal so text keeps 4.5:1. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --sea: #0b1f1d;        --sea-light: #10302c;   --sea-deep: #071513;
  --glass: rgba(18, 52, 47, 0.72);               --glass-quiet: rgba(18, 52, 47, 0.5);
  --line: #23504a;       --line-strong: #3a7068;
  --text: #e4f2ee;       --muted: #a8c7c0;
  --teal: #4fc2b4;       --harbour: #6fb2e0;     --heather: #b9a2ea;
  --attention: #f0a07a;  --good: #7fd3a5;
  --ink-on-accent: #062320;
  --knob: #e4f2ee;
  --shadow-accent: rgba(0, 0, 0, 0.35);
  --ripple: repeating-radial-gradient(circle at 18% 8%, rgba(79, 194, 180, 0.07) 0 2px, transparent 2px 16px);
  --sheen: linear-gradient(135deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0) 55%);
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --sea: #0b1f1d;        --sea-light: #10302c;   --sea-deep: #071513;
  --glass: rgba(18, 52, 47, 0.72);               --glass-quiet: rgba(18, 52, 47, 0.5);
  --line: #23504a;       --line-strong: #3a7068;
  --text: #e4f2ee;       --muted: #a8c7c0;
  --teal: #4fc2b4;       --harbour: #6fb2e0;     --heather: #b9a2ea;
  --attention: #f0a07a;  --good: #7fd3a5;
  --ink-on-accent: #062320;
  --knob: #e4f2ee;
  --shadow-accent: rgba(0, 0, 0, 0.35);
  --ripple: repeating-radial-gradient(circle at 18% 8%, rgba(79, 194, 180, 0.07) 0 2px, transparent 2px 16px);
  --sheen: linear-gradient(135deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0) 55%);
  color-scheme: dark; }
/* ===== END C1 TOKENS ===== */

/* The accent the user picks in Settings, set as data-accent on <html> (hub/web/render.py). Every component uses
   --teal as "the accent", so pointing it at --harbour or --heather recolours them all. These come after the token
   blocks, and --harbour / --heather already hold the right value for the current theme, so one rule covers light
   and dark. An attribute, not a style, because the page refuses inline styles. */
:root[data-accent="harbour"] { --teal: var(--harbour); }
:root[data-accent="heather"] { --teal: var(--heather); }

/* ===== C1 THEME TOGGLE (button styles): copied from the brand book, with the button and hub/web/static/theme.js. ===== */
.theme-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--glass); color: var(--text);
  font: 600 14px var(--font); cursor: pointer; }
.theme-toggle:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-toggle .moon, :root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: inline; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
                                      :root:not([data-theme="light"]) .theme-toggle .moon { display: inline; } }
/* ===== END C1 THEME TOGGLE ===== */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* The sea: a wash from sea-light to sea-deep with faint ripple rings over it; fixed so it doesn't scroll away. */
body { margin: 0; min-height: 100vh; background-color: var(--sea); background-image: var(--ripple), var(--wash);
       background-attachment: fixed; color: var(--text); font-family: var(--font); font-size: 16px;
       font-weight: 400; line-height: 1.5; }
a { color: var(--teal); }
h1, h2, p { margin: 0; }

.screen { position: relative; max-width: 560px; margin: 0 auto; min-height: 100vh;
          padding: max(22px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
          display: flex; flex-direction: column; gap: 16px; }

/* Page header: back button, title and one muted line, the theme button top right. */
.top { display: flex; align-items: center; gap: 12px; }
.top .theme-toggle { margin-left: auto; flex-shrink: 0; }
.home-top { align-items: flex-start; }
.top-text { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.top h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.home-top h1 { font-size: clamp(30px, 9vw, 40px); }   /* title 40 on wide screens; smaller on a phone so the button fits */
.sub { font-size: 14px; color: var(--muted); }
.square-button { width: 48px; height: 48px; flex-shrink: 0; border-radius: var(--radius-small); background: var(--glass);
                 border: 1px solid var(--line); display: grid; place-items: center; color: var(--text); }

/* Cards and rows: frosted glass over the sea. */
.card { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius-tile);
        padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; backdrop-filter: blur(10px); }
.label { font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.row { display: flex; align-items: center; gap: 12px; min-height: var(--tap); }
.row-main { display: flex; flex-direction: column; gap: 2px; flex-grow: 1; min-width: 0; overflow-wrap: anywhere; }
.row-title { font-size: 16px; font-weight: 600; }
.row-note { font-size: 14px; color: var(--muted); }
.link-row { text-decoration: none; color: var(--text); }
.chevron { color: var(--muted); font-size: 20px; }
.time { font-size: 15px; font-weight: 800; color: var(--teal); width: 52px; flex-shrink: 0;
        font-variant-numeric: tabular-nums; align-self: baseline; }
.empty { text-align: left; }

/* Buttons: at least 44 px tall. The accent with ink-on-accent text, a quiet glass one with a line, and the
   attention colour for deleting. */
.button { min-height: var(--tap); padding: 0 20px; border-radius: var(--radius-small); border: 0; background: var(--teal);
          color: var(--ink-on-accent); font: 800 16px var(--font); cursor: pointer; display: inline-flex;
          align-items: center; justify-content: center; text-decoration: none; }
.button.quiet { background: var(--glass); color: var(--text); border: 1px solid var(--line-strong); font-weight: 600; }
.button.danger { background: var(--attention); color: var(--ink-on-accent); }
.button.big { min-height: 52px; font-size: 17px; width: 100%; }
.button.small { padding: 0 14px; }
.button:focus-visible, .square-button:focus-visible, .tile:focus-visible, .tab:focus-visible, .talk-button:focus-visible,
.link-row:focus-visible, .switch-button:focus-visible, .toggle input:focus-visible + .switch,
.choice input:focus-visible + span { outline: 3px solid var(--text); outline-offset: 3px; }
.button:disabled { opacity: 0.6; cursor: wait; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form { display: inline-flex; margin: 0; }

/* Notices after a form: plain status in muted text, problems in the attention colour. */
.notice { font-size: 15px; color: var(--muted); }
.notice.error { color: var(--attention); font-weight: 600; }

/* Tabs (Memory's Work and Your life). */
.tabs { display: flex; gap: 6px; background: var(--glass); border: 1px solid var(--line);
        border-radius: var(--radius-small); padding: 4px; }
.tab { flex: 1; min-height: var(--tap); border-radius: 10px; display: grid; place-items: center; color: var(--muted);
       font: 600 15px var(--font); text-decoration: none; }
.tab.current { background: var(--teal); color: var(--ink-on-accent); font-weight: 800; }

/* Home: a grid of tap tiles. Talk spans the full width in the accent with a sheen; Settings is a full-width
   quiet bar at the bottom. */
.next-up { font-size: 15px; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { min-height: 120px; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius-tile);
        padding: 18px; color: var(--text); text-decoration: none; display: flex; flex-direction: column;
        justify-content: space-between; gap: 10px; backdrop-filter: blur(10px); }
.tile-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tile-icon { color: var(--teal); display: inline-grid; }
.tile-icon.attention { color: var(--attention); }
.tile-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.tile b { font-size: 19px; font-weight: 800; }
.tile-note { font-size: 14px; color: var(--muted); }
.tile.wide { grid-column: span 2; }
.tile.tile-talk { grid-column: span 2; min-height: 96px; flex-direction: row; align-items: center;
                  justify-content: flex-start; gap: 16px; background-color: var(--teal); background-image: var(--sheen);
                  color: var(--ink-on-accent); border: 0; box-shadow: 0 10px 24px var(--shadow-accent); }
.tile.tile-talk b { font-size: 22px; }
.tile.tile-talk .tile-note, .tile.tile-talk .tile-icon { color: var(--ink-on-accent); }
.tile.tile-bar { grid-column: span 2; min-height: var(--tap); padding: 12px 18px; flex-direction: row; align-items: center;
                 background: var(--glass-quiet); border-radius: var(--radius-small); }
.tile.tile-bar b { font-size: 16px; font-weight: 600; }
.tile.tile-bar { justify-content: flex-start; gap: 14px; }
.tile.tile-bar .chevron { margin-left: auto; }
.badge { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 14px; background: var(--attention);
         color: var(--ink-on-accent); font-size: 14px; font-weight: 800; display: grid; place-items: center; }

/* Forms. */
.stack { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.field input, .field textarea { width: 100%; min-height: var(--tap); padding: 10px 12px; border-radius: var(--radius-small);
  border: 1px solid var(--line-strong); background: var(--glass-quiet); color: var(--text); font: 400 16px var(--font); }
.field textarea { resize: vertical; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--teal); outline-offset: 1px; }
.choices { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.choices legend { padding: 0; margin-bottom: 6px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { min-height: var(--tap); padding: 0 18px; border-radius: var(--radius-small); border: 1px solid var(--line-strong);
               background: var(--glass); display: inline-flex; align-items: center; font-weight: 600; cursor: pointer; }
.choice input:checked + span { background: var(--teal); color: var(--ink-on-accent); border-color: var(--teal); }

/* Switches: a real checkbox (Settings, Talk) or a real button (Skills), styled, so they work without any script. */
.toggle { cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { width: 52px; height: 32px; flex-shrink: 0; border-radius: 16px; background: var(--line-strong);
          position: relative; transition: background 0.2s; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 12px;
                 background: var(--knob); transition: transform 0.2s; }
.toggle input:checked + .switch, .switch-button[aria-checked="true"] .switch { background: var(--teal); }
.toggle input:checked + .switch::after, .switch-button[aria-checked="true"] .switch::after {
  transform: translateX(20px); background: var(--ink-on-accent); }
.switch-button { min-width: var(--tap); min-height: var(--tap); padding: 0; border: 0; background: none;
                 display: grid; place-items: center; cursor: pointer; }

/* The talk page (hub/web/templates/talk.html): one big accent button, a status line and the transcript. */
.talk-stage { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 16px 0; }
.talk-button { width: 184px; height: 184px; border-radius: 56px; border: 1px solid var(--line); background: var(--glass);
               display: grid; place-items: center; cursor: pointer; padding: 0; touch-action: none;
               backdrop-filter: blur(10px); box-shadow: 0 10px 24px var(--shadow-accent); }
.talk-inner { width: 120px; height: 120px; border-radius: 40px; background-color: var(--teal); background-image: var(--sheen);
              color: var(--ink-on-accent); display: grid; place-items: center; transition: transform 0.15s; }
.talk-button[data-state="live"] .talk-inner { animation: breathe 2.4s ease-in-out infinite; }
.talk-button[data-held="yes"] .talk-inner { transform: scale(1.08); }
@keyframes breathe { 50% { transform: scale(0.94); } }
.talk-status { font-size: 19px; font-weight: 800; text-align: center; }
.talk-hint { color: var(--muted); text-align: center; max-width: 320px; }
.transcript { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px;
              max-height: 40vh; overflow-y: auto; }
.transcript li { overflow-wrap: anywhere; }
.transcript b { font-weight: 800; margin-right: 6px; }
.transcript .hub b { color: var(--teal); }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
                   white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .switch, .switch::after, .talk-inner { transition: none; }
  .talk-button[data-state="live"] .talk-inner { animation: none; }
}

/* Pages: the Hub Blueprint (hub/web/pages_blueprint.py). Each phase is a card with a status chip: to do and moved
   in quiet glass, working on it in the accent, done in the "good" colour. */
.phase-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.phase-title { font-size: 19px; font-weight: 800; margin: 0; overflow-wrap: anywhere; }
.chip { flex-shrink: 0; padding: 4px 12px; border-radius: var(--radius-small); font-size: 13px; font-weight: 800;
        border: 1px solid var(--line-strong); background: var(--glass-quiet); color: var(--muted); white-space: nowrap; }
.chip.chip-active { background: var(--teal); border-color: var(--teal); color: var(--ink-on-accent); }
.chip.chip-done { background: var(--good); border-color: var(--good); color: var(--ink-on-accent); }
.chip.chip-moved { border-style: dashed; }
.phase .label { margin: 6px 0 0; }
.phase-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; overflow-wrap: anywhere; }
.phase-list .who { font-weight: 800; color: var(--teal); }
/* The draft card on the talk page (hub/web/talk_drafts.py, talk.js): slides up from the bottom over the call when
   the hub drafts an email. Solid sea behind the glass so the email stays readable over the big button. */
.draft-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; max-width: 560px; margin: 0 auto;
               max-height: 85vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
               padding: 20px 20px max(20px, env(safe-area-inset-bottom)); background-color: var(--sea-light);
               background-image: var(--wash); color: var(--text); border: 1px solid var(--line-strong);
               border-bottom: 0; border-radius: var(--radius-tile) var(--radius-tile) 0 0;
               box-shadow: 0 -10px 30px var(--shadow-accent); animation: slide-up 0.25s ease-out; }
/* The page's own [hidden] would lose to the display rules above, so it is said again here. */
.draft-sheet[hidden], .draft-sheet [hidden] { display: none; }
.draft-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.draft-to { font-size: 19px; font-weight: 800; overflow-wrap: anywhere; }
.draft-to:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.draft-view { display: flex; flex-direction: column; gap: 6px; overflow-wrap: anywhere; }
.draft-text { white-space: pre-wrap; max-height: 34vh; overflow-y: auto; padding: 10px 12px;
              border-radius: var(--radius-small); background: var(--glass); border: 1px solid var(--line); }
.draft-sheet .notice:empty { display: none; }
.draft-sheet .notice.good { color: var(--good); font-weight: 600; }
.draft-sheet .actions .button { flex: 1 1 auto; }
@keyframes slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .draft-sheet { animation: none; } }
