/* The B pages' tokens and base styles, the header's and the one-line footer's: home.html,
   signin_b.html, start_b.html, email_link_b.html.
   Moved out of the templates in Step 18b; served as /static/css/b-base.<hash>.css
   with a content hash (app/services/assets.py). Edit here. */

/* ---- _b_style.html ---- */
  /* --- tokens: the new view's (_doc_style.html), held to it by a test --- */
  :root {
    --paper: #f4f3ef; --surface: #ffffff; --panel: #faf9f6; --ink: #191c22; --muted: #61656e;
    --line: #e4e2db; --line-strong: #d3d0c7; --accent: #1c4e8a; --accent-ink: #123561; --accent-soft: #e7eef7;
    --warn-soft: #fff6dd; --warn-line: #d8b34a; --warn-ink: #8a6205;
    --danger: #a13a2f; --danger-soft: #fdeeec; --ok: #1f7a4d; --ok-soft: #e3f3ea;
    --serif: "Fraunces", Georgia, "Times New Roman", serif, "Songti SC", "Noto Serif SC", "Source Han Serif SC", SimSun;
    --sans: -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC";
    --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace, "PingFang SC", "Microsoft YaHei", "Noto Sans SC";
  }
  @media (prefers-color-scheme: dark) {
    :root {
      --paper: #101216; --surface: #1b1e25; --panel: #171a20; --ink: #ecebe6; --muted: #979ba4;
      --line: #2a2e37; --line-strong: #3a3f4a; --accent: #7db0e8; --accent-ink: #a9cbf1; --accent-soft: #1e2a3a;
      --on-accent: #10131a;
      --warn-soft: #2a2411; --warn-line: #6b571f; --warn-ink: #e6c869;
      --danger: #e8897f; --danger-soft: #2a1917; --ok: #6ee7a8; --ok-soft: #14311f;
    }
  }
  /* --- end of the new view's tokens --- */

  /* This page's own: stage 02's dark band (the dark set above, by name, so it
     stays dark in either scheme), and the spacing and type scale of the mockup. */
  :root {
    --band: #101216; --band-ink: #ecebe6; --band-muted: #979ba4; --band-line: #3a3f4a;
    --band-accent: #7db0e8; --band-edge: transparent;
    --space-2xs: .25rem; --space-xs: .5rem; --space-sm: .75rem; --space-md: 1rem; --space-lg: 1.5rem;
    --space-xl: 2.5rem; --space-2xl: 4rem; --space-3xl: 6rem;
    --text-display: clamp(2.6rem, 6.2vw, 5.8rem); --text-2xl: clamp(1.6rem, 2.8vw, 2.4rem);
    --text-xl: 1.3rem; --text-md: 1.0625rem; --text-sm: .9rem; --text-xs: .78rem;
    --page-pad: clamp(1rem, 4.5vw, 4rem); --radius: 8px; --rule: 1px; --rule-thick: 3px;
    --ease-out: cubic-bezier(.2, .7, .2, 1); --shade: rgba(25, 28, 34, .06);
  }
  /* In the dark scheme the page is that dark too: the band steps up to the
     panel colour, with a line above and below (spec §12, item 3). */
  @media (prefers-color-scheme: dark) {
    :root { --band: #171a20; --band-edge: #2a2e37; --shade: rgba(0, 0, 0, .35); }
  }

  * { box-sizing: border-box; }
  html, body { overflow-x: clip; }
  body {
    margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans);
    font-size: var(--text-md); line-height: 1.6; -webkit-font-smoothing: antialiased;
  }
  [x-cloak] { display: none !important; }
  img { display: block; max-width: 100%; height: auto; }
  a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
  a:hover { color: var(--accent); }
  :focus { outline: none; }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; text-wrap: balance; overflow-wrap: anywhere; min-width: 0; }
  p { margin: 0; }
  .wrap {
    padding-left: max(var(--page-pad), env(safe-area-inset-left, 0px));
    padding-right: max(var(--page-pad), env(safe-area-inset-right, 0px));
  }

  /* The header: the name on the left; the draft, the account and the language on the right. */
  .nav { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); padding-block: var(--space-lg); }
  .wordmark { font-family: var(--serif); font-weight: 600; font-size: var(--text-xl); text-decoration: none; letter-spacing: -.01em; color: var(--ink); }
  .wordmark i { font-style: normal; color: var(--accent); }
  .nav nav { display: flex; align-items: center; gap: var(--space-lg); font-size: var(--text-sm); }
  .nav nav a { text-decoration: none; white-space: nowrap; }
  .nav nav a:hover { text-decoration: underline; }

/* ---- _b_style_foot.html ---- */
  .foot-line {
    border-top: var(--rule) solid var(--line-strong); padding-block: var(--space-lg) var(--space-2xl);
    font-size: var(--text-sm); color: var(--muted); display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-md);
  }
  .foot-line a { text-decoration: none; white-space: nowrap; }
  .foot-line a:hover { text-decoration: underline; }
