/* =============================================================================
   POP SEO App - brand tokens and core components (owned by the shell builder)

   Palette: POP's current system (build_pdf.py of the three blog skills and
   pop-quarterly-strategy/assets/form_template.html). Light theme only, on purpose.
   Brand teal #13AEB8 is never small text on white (2.7:1): use --teal-text for
   text, #062A2C on teal fills, pure teal only for fills, rings and large words.
   Copper is for ONE emphasis per screen.

   Classes other modules may rely on (flow.css may use the tokens and these):

   Layout     .page .page-head .page-title .page-sub .page-actions
              .stack .stack-sm .stack-lg .row .row-tight .row-between .spacer
              .grid-2 .grid-3 .grid-4 (collapse on small screens)
              .muted .small .tiny .strong .nowrap .truncate .sr-only .center
              .kicker (11px label on light) .eyebrow (12px label, teal on dark)
              .accent (teal accent word in a display title) .num (800 number)
   Surfaces   .card .card-head .card-body .card-foot .card.flat .card.hover
              .band (evergreen band with the teal ring) .panel-sand .divider
   Buttons    .btn .btn-primary .btn-secondary .btn-ghost .btn-danger
              .btn-lg .btn-sm .btn-block .btn-icon .is-busy  (on dark: .on-dark .btn-ghost)
   Forms      .field > label + input|textarea|select + .hint + .counter
              .field-row  .input-group  .check  .seg (> button.on)  .switch
   Chips      .chip .chip.on (toggle chip, button)  .chips (wrapper)
   Badges     .badge.ok|warn|bad|info|neutral   .dot.ok|warn|bad|off  .dots
   Tables     .table-wrap > table.table   (rows collapse to cards < 720px with td[data-label])
   Tabs       .tabs > .tab(.on) > .tab-count
   Lists      .list > .list-item (.list-item-main .list-item-side)  .avatar(.avatar-sm|lg)
   Stepper    ol.stepper > li.step(.done|.current) > .step-num + .step-label (+ .step-sub)
   Feedback   .empty (.empty-icon .empty-title .empty-text)  .skeleton (.sk-line .sk-block)
              .spinner (.spinner-sm)  .notice.ok|warn|bad|info  .mark-confirm  .meter > span
   Overlays   .modal-backdrop > .modal > .modal-head .modal-body .modal-foot ; .toast-stack > .toast
              .menu (dropdown)  [data-tip] (CSS tooltip)
   Frame (v2) #view.page-full holds .seo-layout > .seo-side (client sidebar) + .seo-panel > .seo-main;
              views under #/seo… render inside .seo-main (max 1180px, gutter padding included).
              .area-card (home), .soon-card, .hub-card (client hub), .crumbs (header breadcrumb)
   ============================================================================= */

:root {
  color-scheme: light;

  /* surfaces */
  --ever: #0B2F2C;
  --ever-2: #12403B;
  --ever-3: #1B544E;
  --ivory: #F6F4EF;
  --paper: #FFFFFF;
  --sand: #EFE8DC;
  --warm-row: #FBF8F2;

  /* text */
  --ink: #0B2F2C;
  --muted: #5F726E;
  --faint: #93A29E;
  --on-ever: #FFFFFF;
  --on-ever-muted: rgba(255, 255, 255, .68);

  /* accent */
  --teal: #13AEB8;
  --teal-d: #0F8F98;
  --teal-text: #0D6E75;      /* 5.2:1 on teal-wash, 6:1 on white */
  --teal-wash: #E3F3F3;
  --teal-soft: #D8ECEC;
  --teal-hover: #2BC0C9;
  --on-teal: #062A2C;
  --copper: #C4773D;
  --copper-text: #A35F2B;
  --mark-bg: #F6E3D6;
  --mark-ink: #9A5623;

  /* states */
  --ok-bg: #E3F3F3;   --ok-ink: #0D6E75;
  --warn-bg: #FBEFDF; --warn-ink: #8A4E1F;
  --bad-bg: #FCE8E4;  --bad-ink: #A3321F;  --bad-line: #EDB9AE;
  --neutral-bg: #E9ECEA; --neutral-ink: #4F625E;

  /* lines */
  --line: #E3E6E1;
  --line-2: #D5DBD7;

  /* type */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --fs-display: 34px;
  --fs-h1: 28px;
  --fs-h2: 21px;
  --fs-h3: 17px;
  --fs-body: 15px;
  --fs-small: 13.5px;
  --fs-tiny: 12px;

  /* shape and depth */
  --r-card: 18px;
  --r-item: 14px;
  --r-seg: 12px;
  --r-input: 10px;
  --r-btn: 10px;
  --r-tag: 6px;
  --r-pill: 999px;
  --shadow: 0 1px 2px rgba(11, 47, 44, .05), 0 10px 30px rgba(11, 47, 44, .07);
  --shadow-lg: 0 2px 6px rgba(11, 47, 44, .08), 0 24px 60px rgba(11, 47, 44, .18);
  --shadow-bar: 0 -10px 30px rgba(11, 47, 44, .18);
  --ring: 0 0 0 2px var(--paper), 0 0 0 4px var(--teal-text);   /* two-tone focus ring, > 3:1 on white and teal-wash */

  /* layout */
  --wrap: 1200px;
  --gutter: 24px;
  --appbar-h: 64px;
  --banner-h: 0px;   /* set by app.js while the demo banner shows */
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { background: var(--ivory); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-feature-settings: "cv11", "ss01";
}
img, svg { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); text-wrap: balance; }
h1 { font-size: var(--fs-h1); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
h2 { font-size: var(--fs-h2); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
h3 { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
h4 { font-size: var(--fs-body); font-weight: 700; }
p { margin: 0; }
a { color: var(--teal-text); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }
code, kbd, .mono { font-family: var(--mono); font-size: .9em; }
code { background: var(--teal-wash); color: var(--ink); border-radius: 5px; padding: 1px 6px; word-break: break-all; }
kbd { border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--paper); font-size: 12px; }
hr, .divider { border: 0; height: 1px; background: var(--line); margin: 16px 0; }
::placeholder { color: var(--faint); }
::selection { background: var(--teal-soft); color: var(--ink); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--teal); color: var(--on-teal); font-weight: 700;
  padding: 10px 16px; border-radius: var(--r-btn); text-decoration: none;
}
.skip-link:focus { top: 10px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

/* ---------- text helpers ---------- */
.muted { color: var(--muted); }
.small { font-size: var(--fs-small); }
.tiny { font-size: var(--fs-tiny); }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.center { text-align: center; }
.num { font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.accent { color: var(--teal); }
.copper { color: var(--copper-text); }
.kicker {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--teal-text);
}
.eyebrow {
  display: block; font-size: 12px; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--teal-text);
}
.on-dark .eyebrow, .band .eyebrow { color: var(--teal); }

/* ---------- layout helpers ---------- */
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 28px; }
.stack > *, .stack-sm > *, .stack-lg > * { min-width: 0; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.row-tight { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.row > *, .row-between > * { min-width: 0; }
.spacer { flex: 1 1 auto; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1020px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 440px) {
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- app bar ---------- */
.appbar {
  position: sticky; top: 0; z-index: 50;
  color: var(--on-ever);
  /* the teal ring is a background so it stays inside the bar while the user menu can hang below it */
  background:
    radial-gradient(circle at calc(100% - 60px) 0, transparent 101px, rgba(19, 174, 184, .09) 102px, rgba(19, 174, 184, .09) 150px, transparent 151px),
    var(--ever);
}
.appbar-in {
  position: relative; z-index: 1;
  max-width: var(--wrap); margin: 0 auto; height: var(--appbar-h);
  padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--on-ever); flex: none; border-radius: 6px; }
.brand-logo { height: 26px; width: auto; display: block; }
.brand-app {
  font-size: 11px; font-weight: 800; letter-spacing: .2em; color: var(--on-ever-muted);
  border-left: 1px solid rgba(255, 255, 255, .25); padding-left: 10px; line-height: 18px;
}

/* breadcrumb (Home › SEO › <client> › Blog) */
.crumbs { flex: 1 1 auto; min-width: 0; height: 100%; display: flex; align-items: center; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; min-width: 0; overflow: hidden; }
.crumbs li { display: flex; align-items: center; min-width: 0; flex: 0 1 auto; font-size: 14px; font-weight: 600; color: var(--on-ever-muted); white-space: nowrap; }
.crumbs li:first-child, .crumbs li:last-child { flex-shrink: 0; }
.crumbs li:last-child { flex-shrink: 1; }
.crumbs li + li::before { content: "›"; padding: 0 9px; color: rgba(255, 255, 255, .4); font-size: 16px; line-height: 1; flex: none; }
.crumbs a, .crumbs .crumb-current { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 6px; padding: 4px 2px; }
.crumbs a { color: var(--on-ever-muted); text-decoration: none; }
.crumbs a:hover { color: var(--on-ever); text-decoration: underline; }
.crumbs .crumb-current { color: var(--on-ever); font-weight: 700; display: block; }
.crumbs .crumb-current .icon { display: none; }
.crumbs a .icon { display: inline-flex; }
.crumbs a:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }

.appbar-link {
  display: inline-flex; align-items: center; gap: 7px; color: var(--on-ever-muted); text-decoration: none;
  font-size: 14px; font-weight: 600; padding: 7px 10px; border-radius: var(--r-pill); border: 1.5px solid transparent; white-space: nowrap;
}
.appbar-link:hover { color: var(--on-ever); border-color: rgba(255, 255, 255, .24); }
.appbar-link.on { color: var(--on-ever); border-color: rgba(255, 255, 255, .36); background: rgba(255, 255, 255, .06); }
.appbar-link .icon { display: flex; }
.appbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.units-chip, .demo-pill {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  font-size: 12px; font-weight: 600; color: var(--on-ever);
  border: 1.5px solid rgba(255, 255, 255, .24); border-radius: var(--r-pill);
  padding: 5px 12px; text-decoration: none;
}
.units-chip:hover { border-color: rgba(255, 255, 255, .5); color: var(--on-ever); }
.units-chip .u-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); flex: none; }
.units-chip.low .u-dot { background: #F2B880; }
.units-chip b { font-weight: 800; }
.demo-pill { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; background: rgba(242, 184, 128, .14); border-color: rgba(242, 184, 128, .6); color: #F7D2AE; }

/* user menu */
.usermenu { position: relative; }
.usermenu-btn {
  display: inline-flex; align-items: center; gap: 9px; font: inherit; color: var(--on-ever);
  background: transparent; border: 1.5px solid transparent; border-radius: var(--r-pill);
  padding: 3px 10px 3px 3px; cursor: pointer;
}
.usermenu-btn:hover, .usermenu-btn[aria-expanded="true"] { border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .05); }
.usermenu-name { font-size: 14px; font-weight: 600; max-width: 140px; }
.usermenu-btn .caret { opacity: .7; }

.menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 80; min-width: 240px;
  background: var(--paper); color: var(--ink); border-radius: var(--r-item);
  box-shadow: var(--shadow-lg); border: 1px solid var(--line); padding: 6px;
}
.menu-head { padding: 10px 12px 8px; font-size: var(--fs-small); color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-head b { color: var(--ink); }
.menu button, .menu a {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none;
  background: transparent; border: 0; border-radius: 9px; padding: 9px 12px; cursor: pointer;
}
.menu button:hover, .menu a:hover, .menu button:focus-visible, .menu a:focus-visible { background: var(--teal-wash); outline: none; }
.menu .menu-sep { height: 1px; background: var(--line); margin: 6px 0; }
.menu .menu-foot { padding: 8px 12px 4px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 6px; }

/* demo banner */
.demo-banner {
  position: sticky; top: var(--appbar-h); z-index: 45;
  background: #FBEFDF; color: var(--warn-ink); border-bottom: 1px solid #F0DCC2;
  font-size: var(--fs-small); font-weight: 600;
}
.demo-banner-in { max-width: var(--wrap); margin: 0 auto; padding: 9px var(--gutter); display: flex; align-items: flex-start; gap: 10px; }
.demo-banner-in .icon { flex: none; margin-top: 2px; }
.demo-banner-in > span:last-child { min-width: 0; }
.demo-banner a { color: var(--warn-ink); font-weight: 700; }
.demo-banner .link-btn { color: var(--warn-ink); font-weight: 700; }

/* ---------- page ---------- */
.page { display: block; max-width: var(--wrap); margin: 0 auto; padding: 28px var(--gutter) 96px; outline: none; }
.page.page-flush { padding-top: 0; }
.page.page-full { max-width: none; padding: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head > div { min-width: 0; }
.page-title { font-size: var(--fs-h1); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin-top: 4px; }
.page-sub { color: var(--muted); margin-top: 6px; max-width: 70ch; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-small); font-weight: 600; color: var(--muted); text-decoration: none; margin-bottom: 10px; }
.back-link:hover { color: var(--ink); }
.boot { min-height: 50vh; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; }

/* evergreen band with the teal ring (hero) */
.band {
  position: relative; overflow: hidden; background: var(--ever); color: var(--on-ever);
  border-radius: var(--r-card); padding: 30px 32px;
}
.band::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px;
  border-radius: 50%; border: 56px solid rgba(19, 174, 184, .10); pointer-events: none;
}
.band > * { position: relative; z-index: 1; }
.band h1, .band h2, .band h3 { color: var(--on-ever); }
.band .muted, .band .page-sub { color: var(--on-ever-muted); }
.band .display { font-size: var(--fs-display); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }

.panel-sand { background: var(--sand); border-radius: var(--r-item); padding: 14px 16px; }

/* ---------- cards ---------- */
.card { background: var(--paper); border-radius: var(--r-card); box-shadow: var(--shadow); min-width: 0; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 16px 22px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #FBFAF7, #FFFFFF);
  border-radius: var(--r-card) var(--r-card) 0 0;
}
.card-head h2, .card-head h3 { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.card-head .count { font-weight: 800; color: var(--muted); }
.card-body { padding: 18px 22px 22px; }
.card-body.tight { padding: 8px 10px 10px; }
.card-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.card.hover { transition: box-shadow .15s, transform .15s; }
.card.hover:hover { box-shadow: 0 2px 4px rgba(11, 47, 44, .06), 0 16px 40px rgba(11, 47, 44, .12); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 14px; line-height: 1.2;
  border-radius: var(--r-btn); padding: 11px 18px; cursor: pointer;
  border: 1.5px solid transparent; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn svg { flex: none; }
.btn-primary { background: var(--teal); color: var(--on-teal); }
.btn-primary:hover { background: var(--teal-hover); color: var(--on-teal); }
.btn-primary:focus-visible { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ever); }
.btn-secondary { background: var(--paper); color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { border-color: var(--ever-3); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: rgba(11, 47, 44, .06); color: var(--ink); }
.btn-danger { background: var(--paper); color: var(--bad-ink); border-color: var(--bad-line); }
.btn-danger:hover { background: var(--bad-bg); color: var(--bad-ink); }
.btn-danger.solid { background: var(--bad-ink); color: #fff; border-color: var(--bad-ink); }
.btn-danger.solid:hover { background: #8A2A1A; }
.on-dark .btn-ghost, .band .btn-ghost, .bar .btn-ghost { color: var(--on-ever); border-color: rgba(255, 255, 255, .32); }
.on-dark .btn-ghost:hover, .band .btn-ghost:hover, .bar .btn-ghost:hover { background: rgba(255, 255, 255, .08); color: var(--on-ever); }
.band .btn-primary:focus-visible { box-shadow: 0 0 0 3px var(--ever), 0 0 0 5px var(--teal); }
.btn-lg { font-size: 16px; padding: 15px 26px; border-radius: 12px; }
.btn-sm { font-size: 13px; padding: 7px 12px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn.is-busy { position: relative; pointer-events: none; }
.btn.is-busy::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%; flex: none;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite;
}
.link-btn { font: inherit; color: var(--teal-text); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.link-btn:hover { color: var(--ink); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field .label { font-size: var(--fs-small); font-weight: 700; color: var(--ink); }
.field > label .opt, .field .label .opt { font-weight: 500; color: var(--muted); }
.field .hint { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.field .counter { font-size: 12px; color: var(--muted); align-self: flex-end; font-variant-numeric: tabular-nums; }
.field .counter.over { color: var(--bad-ink); font-weight: 700; }
.field .error { font-size: 12.5px; color: var(--bad-ink); font-weight: 600; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
input[type="text"], input[type="search"], input[type="email"], input[type="tel"], input[type="url"],
input[type="password"], input[type="number"], input[type="date"], textarea, select {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line-2); border-radius: var(--r-input); padding: 10px 12px; min-height: 42px;
  transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
select {
  padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%235F726E' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 14px;
}
input:hover, textarea:hover, select:hover { border-color: #B9C3BF; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--teal); box-shadow: var(--ring); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--bad-ink); }
input[disabled], textarea[disabled], select[disabled] { background: var(--ivory); color: var(--muted); cursor: not-allowed; }
.input-group { display: flex; gap: 8px; align-items: stretch; }
.input-group > input { flex: 1; min-width: 0; }
.search-input { position: relative; }
.search-input input { padding-left: 40px; }
.search-input .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; display: flex; }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ever); margin: 0; }

/* segmented control (from form_template) */
.seg { display: inline-flex; gap: 4px; background: var(--ivory); border: 1px solid var(--line); border-radius: var(--r-seg); padding: 4px; max-width: 100%; }
.seg button {
  flex: 1; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--muted);
  background: transparent; border: 0; border-radius: 9px; padding: 8px 14px; cursor: pointer; white-space: nowrap;
}
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--ever); color: var(--on-ever); }
.seg button:focus-visible { outline: none; box-shadow: var(--ring); }
.seg.block { display: flex; width: 100%; }

/* switch */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 600; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 40px; height: 24px; border-radius: 12px; background: var(--line-2); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + .track { background: var(--ever); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { box-shadow: var(--ring); }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--r-pill);
  padding: 6px 13px; cursor: pointer; user-select: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--ever-3); }
.chip.on { background: var(--ever); border-color: var(--ever); color: var(--on-ever); }
.chip:focus-visible { outline: none; box-shadow: var(--ring); }
.chip .chip-count { font-weight: 800; font-variant-numeric: tabular-nums; opacity: .75; }
.chip.static { cursor: default; }
.chip.static:hover { border-color: var(--line-2); }

/* ---------- badges and dots ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  border-radius: var(--r-pill); padding: 3px 9px; line-height: 1.35;
  background: var(--neutral-bg); color: var(--neutral-ink);
}
.badge.ok { background: var(--ok-bg); color: var(--ok-ink); }
.badge.warn { background: var(--warn-bg); color: var(--warn-ink); }
.badge.bad { background: var(--bad-bg); color: var(--bad-ink); }
.badge.info { background: var(--ever); color: var(--on-ever); }
.badge.neutral { background: var(--neutral-bg); color: var(--neutral-ink); }
.badge .pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); animation: pulse 1.4s ease-in-out infinite; }
.dots { display: inline-flex; gap: 5px; align-items: center; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; background: var(--line-2); }
.dot.ok { background: var(--teal-d); }
.dot.warn { background: var(--copper); }
.dot.bad { background: var(--bad-ink); }
.dot.off { background: transparent; box-shadow: inset 0 0 0 1.5px #A9B5B1; }

/* ---------- tables ---------- */
.table-wrap { background: var(--paper); border-radius: var(--r-card); box-shadow: var(--shadow); overflow: hidden; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th {
  background: var(--ever); color: #fff; text-align: left; font-weight: 700;
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 11px 16px; white-space: nowrap;
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover td { background: var(--warm-row); }
.table td.title-cell { font-weight: 700; }
.table td.title-cell a { color: var(--ink); text-decoration: none; }
.table td.title-cell a:hover { color: var(--teal-text); text-decoration: underline; }
.table .cell-sub { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; }
@media (max-width: 720px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table tr:last-child { border-bottom: 0; }
  .table td { border: 0; padding: 3px 0; display: flex; gap: 10px; align-items: baseline; }
  .table td[data-label]::before { content: attr(data-label); flex: 0 0 82px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .table td.title-cell { font-size: 15px; padding-bottom: 6px; flex-direction: column; gap: 2px; }
  .table td.title-cell::before { display: none; }
}

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; font: inherit; font-size: 14px; font-weight: 700; color: var(--muted);
  background: transparent; border: 0; padding: 10px 14px 12px; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
}
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); }
.tab.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--ever); }
.tab:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--teal-text); border-radius: 8px; }
.tab-count { font-size: 11.5px; font-weight: 800; background: var(--neutral-bg); color: var(--neutral-ink); border-radius: var(--r-pill); padding: 1px 7px; font-variant-numeric: tabular-nums; }
.tab.on .tab-count { background: var(--ever); color: var(--on-ever); }

/* ---------- lists and avatars ---------- */
.list { display: flex; flex-direction: column; }
.list-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 12px;
  border-radius: 12px; text-decoration: none; color: var(--ink); min-width: 0;
}
a.list-item:hover, button.list-item:hover { background: var(--warm-row); color: var(--ink); }
.list-item + .list-item { border-top: 1px solid var(--line); }
a.list-item:hover + .list-item, .list-item:hover + .list-item { border-top-color: transparent; }
.list-item-main { flex: 1 1 auto; min-width: 0; }
.list-item-title { font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.list-item-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.list-item-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; letter-spacing: .02em;
  background: var(--teal-wash); color: var(--teal-text);
}
.avatar.square { border-radius: 11px; }
.avatar-sm { width: 26px; height: 26px; font-size: 10.5px; }
.avatar-lg { width: 56px; height: 56px; font-size: 19px; border-radius: 16px; }
.next-action { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--teal-text); white-space: nowrap; }

/* ---------- stepper (generic; the post workspace reuses it) ---------- */
.stepper { list-style: none; margin: 0; padding: 0; display: flex; align-items: flex-start; gap: 0; counter-reset: step; }
.step { position: relative; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 7px; min-width: 0; }
.step::before {
  content: ""; position: absolute; top: 15px; left: calc(-50% + 20px); right: calc(50% + 20px);
  height: 2px; background: var(--line-2); border-radius: 2px;
}
.step:first-child::before { display: none; }
.step.done::before, .step.current::before { background: var(--ever); }
.step-num {
  position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; background: var(--paper); color: var(--muted);
  border: 1.5px solid var(--line-2);
}
.step.done .step-num { background: var(--ever); color: var(--teal); border-color: var(--ever); }
.step.current .step-num { background: var(--teal); color: var(--on-teal); border-color: var(--teal); box-shadow: 0 0 0 4px rgba(19, 174, 184, .2); }
.step-label { font-size: 13px; font-weight: 700; color: var(--muted); line-height: 1.25; }
.step.done .step-label, .step.current .step-label { color: var(--ink); }
.step-sub { font-size: 12px; color: var(--muted); }
a.step, button.step { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; color: inherit; }
@media (max-width: 560px) {
  .step-label { font-size: 11.5px; }
  .step:not(.current) .step-sub { display: none; }
}

/* ---------- feedback ---------- */
.empty { text-align: center; padding: 34px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--teal-wash); color: var(--teal-text); display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.empty-title { font-weight: 800; font-size: 16px; }
.empty-text { color: var(--muted); font-size: 14px; max-width: 46ch; }
.empty .btn { margin-top: 10px; }
.empty.compact { padding: 20px 14px; }

.notice { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 12px 14px; font-size: 14px; background: var(--neutral-bg); color: var(--ink); }
.notice.ok { background: var(--ok-bg); }
.notice.warn { background: var(--warn-bg); }
.notice.bad { background: var(--bad-bg); }
.notice.info { background: var(--sand); }
.notice .icon { flex: none; margin-top: 1px; }
.notice.ok .icon { color: var(--ok-ink); }
.notice.warn .icon { color: var(--warn-ink); }
.notice.bad .icon { color: var(--bad-ink); }

.mark-confirm { background: var(--mark-bg); color: var(--mark-ink); border-radius: 4px; padding: 0 5px; font-weight: 700; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

.meter { height: 8px; background: var(--neutral-bg); border-radius: 8px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--teal); border-radius: 8px; }
.meter.warn > span { background: var(--copper); }
.meter.bad > span { background: var(--bad-ink); }

.spinner {
  width: 26px; height: 26px; border-radius: 50%; display: inline-block; flex: none;
  border: 3px solid var(--teal-soft); border-top-color: var(--teal); animation: spin .8s linear infinite;
}
.spinner-sm { width: 14px; height: 14px; border-width: 2px; }

.skeleton, .sk-line, .sk-block {
  background: linear-gradient(90deg, #ECEEEA 0%, #F5F6F3 40%, #ECEEEA 80%);
  background-size: 200% 100%; animation: shimmer 1.3s ease-in-out infinite; border-radius: 8px;
}
.sk-line { height: 12px; margin: 8px 0; }
.sk-line.w40 { width: 40%; } .sk-line.w60 { width: 60%; } .sk-line.w80 { width: 80%; }
.sk-block { height: 120px; border-radius: var(--r-card); }
.sk-title { height: 26px; width: 40%; margin-bottom: 10px; }

/* CSS tooltip: <span data-tip="..."> */
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  background: var(--ever); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none;
  line-height: 1.35; padding: 6px 9px; border-radius: 7px; width: max-content; max-width: 240px;
  white-space: normal; text-align: left; z-index: 90; pointer-events: none; box-shadow: var(--shadow);
}

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 120; background: rgba(11, 47, 44, .45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fade .15s ease-out;
}
.modal {
  background: var(--paper); border-radius: var(--r-card); box-shadow: var(--shadow-lg);
  width: min(520px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column;
  animation: rise .18s ease-out; outline: none;
}
.modal.wide { width: min(760px, 100%); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px 4px; }
.modal-head h2 { font-size: 19px; flex: 1; }
.modal-close { background: transparent; border: 0; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 8px; display: flex; }
.modal-close:hover { background: var(--ivory); color: var(--ink); }
.modal-body { padding: 10px 22px 18px; overflow: auto; color: var(--ink); }
.modal-body > p + p { margin-top: 10px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 14px 22px 18px; border-top: 1px solid var(--line); }
@media (max-width: 560px) {
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { width: 100%; border-radius: var(--r-card) var(--r-card) 0 0; max-height: 92vh; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .modal-foot .btn { flex: 1 1 auto; }
}
body.modal-open { overflow: hidden; }

/* ---------- toasts ---------- */
.toast-stack {
  position: fixed; right: 20px; bottom: 20px; z-index: 150;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none;
  max-width: min(420px, calc(100vw - 32px));
}
.toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: 10px;
  background: var(--ever); color: var(--on-ever); border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 12px 12px 12px 14px; font-size: 14px; font-weight: 500; line-height: 1.45;
  animation: rise .2s ease-out; border-left: 4px solid var(--teal); max-width: 100%;
}
.toast .icon { flex: none; margin-top: 1px; color: var(--teal); }
.toast.bad { border-left-color: #F08B76; } .toast.bad .icon { color: #F4A595; }
.toast.warn { border-left-color: #F2B880; } .toast.warn .icon { color: #F2B880; }
.toast-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast-close { background: transparent; border: 0; color: var(--on-ever-muted); cursor: pointer; padding: 2px; border-radius: 6px; display: flex; }
.toast-close:hover { color: #fff; }
.toast.leaving { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
@media (max-width: 560px) {
  .toast-stack { left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); align-items: stretch; max-width: none; }
}

/* ---------- fixed bottom action bar (form_template pattern) ---------- */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--ever); color: var(--on-ever); padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); box-shadow: var(--shadow-bar); }
.bar-in { max-width: var(--wrap); margin: 0 auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 0 calc(var(--gutter) - 16px); }
.bar .bar-note { font-size: 13px; color: var(--on-ever-muted); margin-right: auto; }
.bar .bar-note b { color: var(--on-ever); }

/* ---------- "who's working today?" picker ---------- */
.picker-backdrop { position: fixed; inset: 0; z-index: 130; background: var(--ivory); overflow-y: auto; display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 40px; }
.picker { width: min(620px, 100%); }
.picker .band { padding: 28px 28px 30px; }
.picker-logo { height: 28px; display: block; margin-bottom: 26px; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 12px; margin-top: 18px; }
.person {
  display: flex; align-items: center; gap: 12px; font: inherit; text-align: left;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-item);
  padding: 12px 14px; cursor: pointer; color: var(--ink); font-weight: 700; font-size: 15px; min-width: 0;
  transition: border-color .15s, background .15s;
}
.person:hover { border-color: var(--ever-3); }
.person.on { border-color: var(--ever); background: var(--teal-wash); }
.person:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--teal); }
.person span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- dashboard ---------- */
.hero { display: flex; align-items: center; justify-content: space-between; gap: 20px 28px; flex-wrap: wrap; }
.hero .display { margin-top: 6px; }
.hero .page-sub { margin-top: 8px; }
.hero-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.hero-cta .tiny { color: var(--on-ever-muted); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; background: var(--paper); border-radius: var(--r-card); box-shadow: var(--shadow); }
.stat { padding: 16px 22px; min-width: 0; text-decoration: none; color: var(--ink); border-radius: var(--r-card); }
a.stat:hover { background: var(--warm-row); color: var(--ink); }
.stat + .stat { border-left: 1px solid var(--line); border-radius: 0; }
.stat:last-child { border-radius: 0 var(--r-card) var(--r-card) 0; }
.stat-num { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat.emph .stat-num { color: var(--copper-text); }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 22px; align-items: start; }
.board .card-body { padding: 6px 10px 10px; }
.board .list-item { align-items: flex-start; }
.elapsed { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13px; color: var(--ink); }
.live-links { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.live-link {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700;
  color: var(--teal-text); background: var(--teal-wash); border-radius: var(--r-pill); padding: 3px 9px; text-decoration: none;
}
.live-link:hover { background: var(--teal-soft); color: var(--ink); }
@media (max-width: 1020px) {
  .board { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
  .stat { padding: 12px 18px; display: flex; align-items: baseline; gap: 12px; }
  .stat-num { font-size: 24px; min-width: 44px; }
}

/* ---------- client chooser (#/new) ---------- */
.chooser { max-width: 760px; margin: 0 auto; }
.chooser .search-input input { font-size: 17px; min-height: 54px; border-radius: 14px; padding-left: 46px; }
.chooser .search-input .icon { left: 16px; }
.chooser-list { margin-top: 14px; }
.chooser-group { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: 14px 14px 6px; }
.option {
  display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: 12px; cursor: pointer;
  border: 1.5px solid transparent; min-width: 0;
}
.option:hover { background: var(--warm-row); }
.option.active { background: var(--teal-wash); border-color: var(--ever); }
.option-main { flex: 1; min-width: 0; }
.option-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.option-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.option .go { color: var(--muted); opacity: 0; transition: opacity .1s; flex: none; display: flex; }
.option.active .go, .option:hover .go { opacity: 1; color: var(--ink); }
.ready-label { font-size: 12px; font-weight: 700; white-space: nowrap; }
@media (max-width: 480px) { .option .ready-label { display: none; } .option { gap: 10px; padding: 10px; } }

/* ---------- clients ---------- */
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.client-card { display: flex; flex-direction: column; padding: 18px 18px 16px; gap: 14px; }
.client-card-top { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.client-card-name { font-weight: 800; font-size: 16px; line-height: 1.3; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.client-card-name:hover { color: var(--teal-text); text-decoration: underline; }
.client-card-name::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-card); }
.client-card { position: relative; }
.client-card .btn, .client-card a.domain { position: relative; z-index: 1; }
.domain { font-size: 13px; color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
a.domain:hover { color: var(--teal-text); text-decoration: underline; }
.ready-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 13px; }
.ready-list li { display: flex; align-items: center; gap: 7px; min-width: 0; color: var(--ink); }
.ready-list li.no { color: var(--muted); }
.ready-list .icon { flex: none; display: flex; }
.ready-list li.yes .icon { color: var(--teal-text); }
.ready-list li.no .icon { color: var(--copper); }
.client-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.toolbar { display: flex; gap: 12px 16px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .search-input { flex: 1 1 260px; max-width: 420px; }
@media (max-width: 380px) { .ready-list { grid-template-columns: 1fr; } }

/* ---------- client profile ---------- */
.profile { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.profile-main { flex: 1 1 320px; min-width: 0; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; font-size: 14px; color: var(--on-ever-muted); align-items: center; }
.profile-meta a { color: var(--teal); font-weight: 600; }
.profile-meta a:hover { color: #fff; }
.check-item { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 18px 0; border-top: 1px solid var(--line); }
.check-item:first-child { border-top: 0; padding-top: 6px; }
.check-icon { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.check-icon.yes { background: var(--ok-bg); color: var(--ok-ink); }
.check-icon.no { background: var(--mark-bg); color: var(--mark-ink); }
.check-title { font-weight: 800; font-size: 15.5px; }
.check-why { font-size: 14px; color: var(--muted); margin-top: 2px; }
.check-fix { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.layout-2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 960px) { .layout-2 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- settings ---------- */
.conn-card .card-head { gap: 12px; }
.conn-icon { width: 38px; height: 38px; border-radius: 11px; background: var(--ever); color: var(--teal); display: flex; align-items: center; justify-content: center; flex: none; }
.conn-title { flex: 1; min-width: 0; }
.conn-title h2 { font-size: 17px; }
.conn-for { font-size: 13.5px; color: var(--muted); }
.conn-detail { font-size: 14px; }
.howto { margin: 0; padding: 0; list-style: none; counter-reset: howto; display: flex; flex-direction: column; gap: 9px; }
.howto li { counter-increment: howto; position: relative; padding-left: 34px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.howto li::before {
  content: counter(howto); position: absolute; left: 0; top: 0; width: 23px; height: 23px; border-radius: 7px;
  background: var(--ever); color: var(--on-ever); font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
details.howto-box { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
details.howto-box > summary { cursor: pointer; font-weight: 700; font-size: 14px; list-style: none; display: flex; align-items: center; gap: 6px; color: var(--ink); }
details.howto-box > summary::-webkit-details-marker { display: none; }
details.howto-box > summary::before { content: "›"; display: inline-block; transition: transform .15s; font-size: 18px; line-height: 1; color: var(--muted); }
details.howto-box[open] > summary::before { transform: rotate(90deg); }
details.howto-box > .howto { margin-top: 12px; }

.noscript { padding: 40px 20px; text-align: center; font-weight: 600; }

/* ---------- responsive frame ---------- */
@media (max-width: 860px) {
  :root { --gutter: 16px; --fs-h1: 24px; --fs-display: 28px; }
  .appbar-in { gap: 12px; }
  .units-chip { display: none !important; }
  .usermenu-name { display: none; }
  .usermenu-btn { padding: 3px; }
  .usermenu-btn .caret { display: none; }
  .appbar-link { padding: 7px; }
  .appbar-link-text { display: none; }
  .appbar-in { flex-wrap: wrap; height: auto; padding-top: 10px; row-gap: 0; }
  .brand { height: 44px; }
  .crumbs { order: 3; width: 100%; flex-basis: 100%; height: 42px; border-top: 1px solid rgba(255, 255, 255, .1); }
  .demo-banner { position: static; }
  .crumbs li:not(:nth-last-child(-n+2)) { display: none; }
  .crumbs li:nth-last-child(2)::before { display: none; }
  .crumbs li:nth-last-child(2) a::before { content: "‹"; font-size: 17px; line-height: 1; margin-right: 2px; }
  .crumbs li:nth-last-child(2):first-child a::before { content: none; }
  .page { padding-top: 20px; }
  .band { padding: 24px 20px; }
  .card-head { padding: 14px 16px; }
  .card-body { padding: 14px 16px 18px; }
  .card-foot { padding: 12px 16px; }
}
@media (max-width: 420px) {
  .brand-app { display: none; }
  .hero-cta, .hero-cta .btn { width: 100%; }
  .page-actions, .page-actions .btn { width: 100%; }
}

/* ---------- home (#/) ---------- */
.home-hero { padding: 34px 34px 32px; }
.home-hero .display { margin-top: 8px; }
.area-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 22px; }
.area-card {
  position: relative; display: flex; align-items: flex-start; gap: 20px; min-width: 0; min-height: 172px;
  padding: 26px 24px 24px 26px; background: var(--paper); color: var(--ink); text-decoration: none;
  border-radius: var(--r-card); box-shadow: var(--shadow); border: 1.5px solid transparent;
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.area-card:hover { color: var(--ink); transform: translateY(-2px); box-shadow: 0 2px 4px rgba(11, 47, 44, .06), 0 18px 44px rgba(11, 47, 44, .13); }
.area-card:focus-visible { outline: none; box-shadow: var(--ring), var(--shadow); }
.area-card.live { border-color: var(--teal); }
.area-icon { width: 68px; height: 68px; border-radius: 18px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--ever); color: var(--teal); }
.area-icon svg { width: 40px; height: 40px; }
.area-card.soon .area-icon { background: var(--teal-wash); color: var(--teal-text); }
.area-body { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; min-width: 0; }
.area-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.area-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.area-text { color: var(--muted); font-size: 15px; line-height: 1.5; }
.area-note { font-size: 13px; font-weight: 700; color: var(--teal-text); margin-top: 4px; }
.area-go { flex: none; align-self: center; color: var(--muted); display: flex; transition: transform .15s, color .15s; }
.area-card:hover .area-go { color: var(--ink); transform: translateX(3px); }
@media (max-width: 760px) {
  .area-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .area-card { min-height: 0; padding: 18px 16px; gap: 14px; }
  .area-icon { width: 52px; height: 52px; border-radius: 14px; }
  .area-icon svg { width: 32px; height: 32px; }
  .area-title { font-size: 19px; }
  .area-text { font-size: 14px; }
}

/* ---------- coming soon ---------- */
.soon-card { max-width: 640px; margin: 24px auto; padding: 40px 32px 36px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.soon-icon { width: 72px; height: 72px; border-radius: 20px; background: var(--teal-wash); color: var(--teal-text); display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.soon-text { color: var(--muted); max-width: 52ch; }
.soon-actions { justify-content: center; margin-top: 10px; }
@media (max-width: 560px) { .soon-card { padding: 28px 18px; margin-top: 8px; } .soon-actions .btn { width: 100%; } }

/* ---------- SEO layout: client sidebar + main panel ---------- */
.seo-layout { display: grid; grid-template-columns: 288px minmax(0, 1fr); min-height: calc(100vh - var(--appbar-h)); align-items: start; }
.seo-side {
  position: sticky; top: calc(var(--appbar-h) + var(--banner-h, 0px)); height: calc(100vh - var(--appbar-h) - var(--banner-h, 0px)); min-width: 0;
  display: flex; flex-direction: column; background: var(--paper); border-right: 1px solid var(--line);
}
.seo-side-head { padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 10px; }
.seo-side-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; }
.seo-side-home { font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--teal-text); text-decoration: none; padding: 4px 4px; border-radius: 6px; }
.seo-side-home:hover { color: var(--ink); }
.seo-icon-btn {
  width: 34px; height: 34px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1.5px solid transparent; border-radius: 9px; color: var(--muted); cursor: pointer; padding: 0;
}
.seo-icon-btn:hover { background: var(--ivory); color: var(--ink); border-color: var(--line); }
.seo-icon-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.seo-icon-btn .icon { display: flex; }
.seo-rail-search, .seo-drawer-close { display: none; }
.seo-search input { min-height: 40px; font-size: 14.5px; padding-left: 38px; border-radius: 11px; }
.seo-search .icon { left: 12px; }
.seo-side-count { font-size: 12px; color: var(--muted); padding: 0 4px; min-height: 18px; }
.seo-list-wrap { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 8px 12px; scrollbar-width: thin; }
.seo-list { list-style: none; margin: 0; padding: 0; }
.seo-letter {
  position: sticky; top: 0; z-index: 1; background: var(--paper);
  font-size: 11px; font-weight: 800; letter-spacing: .14em; color: var(--muted); padding: 10px 10px 4px;
}
.seo-client {
  display: flex; align-items: center; gap: 10px; min-width: 0; padding: 7px 10px; margin: 1px 0;
  border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600;
}
.seo-client:hover { background: var(--warm-row); color: var(--ink); }
.seo-client:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--teal-text); }
.seo-client.on { background: var(--teal-wash); color: var(--ink); box-shadow: inset 3px 0 0 var(--teal-text); font-weight: 700; }
.seo-client.on:focus-visible { box-shadow: inset 3px 0 0 var(--teal-text), inset 0 0 0 2px var(--teal-text); }
.seo-client .avatar { width: 28px; height: 28px; font-size: 10.5px; border-radius: 8px; }
.seo-client-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dots.dots-sm { gap: 3px; flex: none; }
.dots.dots-sm .dot { width: 6px; height: 6px; }
.dots.dots-sm .dot.off { box-shadow: inset 0 0 0 1.2px #A9B5B1; }
.seo-list-sk { padding: 4px 10px; }
.seo-list-msg { padding: 14px 10px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; color: var(--muted); }
.seo-side-foot { padding: 10px 16px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); line-height: 1.45; }
.seo-panel { min-width: 0; }
.seo-main { min-width: 0; max-width: 1180px; margin: 0 auto; padding: 28px var(--gutter) 96px; outline: none; }
.seo-mobilebar, .seo-scrim { display: none; }
.seo-board { margin-top: 0; }
.seo-item-state { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.seo-item-state:empty { display: none; }
.seo-item-reason { font-size: 13px; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.seo-panel-more { margin: 8px 12px 0; }

@media (min-width: 900px) {
  .seo-layout.collapsed { grid-template-columns: 60px minmax(0, 1fr); }
  .seo-layout.collapsed .seo-side-head { padding: 14px 0; align-items: center; }
  .seo-layout.collapsed .seo-side-title { justify-content: center; }
  .seo-layout.collapsed .seo-side-home,
  .seo-layout.collapsed .seo-search,
  .seo-layout.collapsed .seo-side-count,
  .seo-layout.collapsed .seo-list-wrap,
  .seo-layout.collapsed .seo-side-foot { display: none; }
  .seo-layout.collapsed .seo-rail-search { display: inline-flex; }
  .seo-pick-btn { display: none; }
}
@media (max-width: 899px) {
  .seo-layout, .seo-layout.collapsed { display: block; min-height: 0; }
  .seo-side {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 110; height: auto; width: min(320px, 88vw);
    border-right: 0; box-shadow: var(--shadow-lg); transform: translateX(-104%); visibility: hidden;
    transition: transform .2s ease, visibility 0s linear .2s;
  }
  .seo-layout.drawer-open .seo-side { transform: none; visibility: visible; transition: transform .2s ease; }
  .seo-scrim { display: block; position: fixed; inset: 0; z-index: 105; background: rgba(11, 47, 44, .45); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .seo-layout.drawer-open .seo-scrim { opacity: 1; pointer-events: auto; }
  .seo-collapse { display: none; }
  .seo-drawer-close { display: inline-flex; }
  .seo-side-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .seo-mobilebar { display: flex; align-items: center; gap: 10px; padding: 12px var(--gutter) 0; max-width: 1180px; margin: 0 auto; }
  .seo-main { padding-top: 14px; }
}

/* ---------- client hub (#/seo/:clientId) ---------- */
.hub-head .profile { align-items: flex-start; }
.hub-name { margin-top: 6px; overflow-wrap: anywhere; }
.hub-gear { flex: none; }
.hub-head .profile-meta a { display: inline-flex; align-items: center; gap: 4px; }
.hub-head .profile-meta span { display: inline-flex; align-items: center; gap: 4px; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 18px; }
.hub-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 22px 22px 20px; min-width: 0; }
.hub-card:has(.hub-card-link:focus-visible) { box-shadow: var(--ring), var(--shadow); }
.hub-card-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hub-card-icon { width: 44px; height: 44px; border-radius: 13px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--ever); color: var(--teal); }
.hub-card.soon .hub-card-icon { background: var(--teal-wash); color: var(--teal-text); }
.hub-card-title { flex: 1 1 auto; min-width: 0; font-size: 21px; }
.hub-card-link { color: var(--ink); text-decoration: none; }
.hub-card-link:hover { color: var(--ink); }
.hub-card-link:focus-visible { outline: none; }
.hub-card-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-card); }
.hub-card-text { color: var(--muted); font-size: 14px; line-height: 1.5; }
.hub-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hub-stat { display: flex; flex-direction: column; min-width: 0; }
.hub-stat-num { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.hub-stat-label { font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.3; }
.hub-stats[aria-busy="true"] .hub-stat-num { color: var(--faint); }
.hub-card-foot { margin-top: auto; padding-top: 2px; }
.hub-attn { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 10px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-ink); font-size: 14px; font-weight: 600; line-height: 1.35; }
.hub-attn[hidden] { display: none; }
.hub-attn .icon { flex: none; }
.hub-card:hover .next-action .icon { transform: translateX(3px); }
.next-action .icon { display: flex; transition: transform .15s; }
@media (max-width: 560px) {
  .hub-gear span:last-child { display: none; }
  .hub-gear { padding: 9px; }
}

/* ---------- motion ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important; }
  .spinner, .btn.is-busy::before { animation: spin 1.6s linear infinite !important; animation-iteration-count: infinite !important; animation-duration: 1.6s !important; }
}

/* ---------- minimal UI (2026-10-12): icons carry meaning, words only where needed ---------- */
.tip { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  color: var(--muted); cursor: help; margin-left: 4px; border-radius: 50%; }
.tip:hover, .tip:focus-visible { color: var(--teal-ink, var(--ever)); outline: none; }
.btn-icon { width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.btn-icon.btn-sm { width: 30px; height: 30px; }
/* Tooltips under icons near the top edge would clip; flip them below. */
.appbar [data-tip]:hover::after, .appbar [data-tip]:focus-visible::after,
.page-head [data-tip]:hover::after, .page-head [data-tip]:focus-visible::after { bottom: auto; top: calc(100% + 8px); }
.icon-row { display: inline-flex; align-items: center; gap: 4px; }
.stat-mini { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.stat-mini b { color: var(--ink, var(--ever)); font-size: 15px; }
.demo-pill-only { display: none; }
.home-hero { padding: 26px 30px; }
.home-hero .display { margin-top: 0; }
.area-card { min-height: 0; align-items: center; padding: 22px 24px; }
.area-body { gap: 4px; }
.area-note { margin-top: 2px; gap: 12px; }
.area-note .stat-mini { color: var(--teal-text); }
.seo-item-reason { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.hub-card .hub-card-foot { justify-content: flex-end; }
.hub-ready .dots { margin-left: 2px; }
