/* Cub. Design system v2, taken from the approved desktop and iPhone mockups
   (2026-09-21). Tokens live here and nowhere else; see web/DESIGN.md.

   Flat editorial: white surfaces, 1px hairlines, one steel-blue accent, SF
   typography. No gradients, no glow, no shadows, no sparkle icons.
   Radii are fixed: card 14, recap card 16, search 18, button 10, tile 10,
   nav row 12, chip pill. Spacing is the 4px grid: 4 8 12 16 20 24 32 40. */

:root {
  --app-bg:        #FCFCFB;
  --sidebar-bg:    #FAFAF9;
  --card:          #FFFFFF;
  --text:          #101114;
  --text-2:        #5F6470;
  --text-3:        #6B7080;   /* was #8B90A0 (3.1:1); now about 4.9:1 on white, WCAG AA (UI/UX red team M11) */
  --border:        #E7E7E5;
  --field-border:  #D9DDE4;
  --chip-bg:       #F4F5F7;
  --nav-active:    #EDF1F6;
  --avatar-bg:     #F1F2F4;
  --tile-bg:       #F3F5F8;
  --dark-card:     #14171C;

  --accent:        #426C9C;
  --accent-hover:  #365A84;
  --accent-soft:   #E8F0FA;

  --breaking:      #C83F3F;  --breaking-soft: #FBEAEA;
  --active:        #357A5D;  --active-soft:   #E6F2EC;
  --quiet:         #8B90A0;  --quiet-soft:    #F1F2F4;

  --r-card: 14px; --r-recap: 16px; --r-search: 18px; --r-btn: 10px;
  --r-tile: 10px; --r-nav: 12px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
          "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--app-bg); color: var(--text); font-family: var(--font);
  -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.45;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; padding: 0; }
a { color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }

/* ================================================================ SHELL */

.app { min-height: 100vh; }

.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 260px;
  background: var(--sidebar-bg); border-right: 1px solid var(--border);
  padding: 20px; display: flex; flex-direction: column; overflow-y: auto;
}
.main { min-height: 100vh; }

.brand { display: flex; align-items: center; gap: 12px; margin: 4px 0 24px 4px; }
.brand-word { display: block; height: 30px; width: 63px; max-width: none; flex: 0 0 auto; }  /* blackletter wordmark; fixed size for iPhone Safari */

.snav { display: flex; flex-direction: column; gap: 4px; }
.snav-item {
  display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px;
  border-radius: var(--r-nav); font-size: 16px; font-weight: 500; color: var(--text-2);
  text-align: left; width: 100%;
}
.snav-item svg { width: 20px; height: 20px; flex: 0 0 auto; }
.snav-item:hover { background: var(--chip-bg); }
.snav-item[aria-current="true"] { background: var(--nav-active); color: var(--text); }
.snav-item[aria-current="true"] svg { color: var(--accent); }
/* Model watch sits under AI: indented and a step smaller, so it reads as part
   of that section rather than a seventh category. */
.snav-sub { padding-left: 36px; font-size: 14px; }
.snav-sub svg { width: 17px; height: 17px; }

.sdivider { height: 1px; background: var(--border); margin: 20px 0; }
.shead { font-size: 14px; font-weight: 600; color: var(--text-2); margin: 0 0 8px 4px; }
.recent-q {
  display: flex; gap: 12px; align-items: flex-start; padding: 8px 4px; width: 100%;
  text-align: left; font-size: 13px; line-height: 1.35; color: var(--text-2); border-radius: 8px;
}
.recent-q:hover { color: var(--text); }
.recent-q svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 1px; color: var(--text-3); }
.recent-q span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.link-blue { font-size: 13px; font-weight: 500; color: var(--accent); padding: 8px 4px; text-align: left; }
.recent-empty { font-size: 13px; color: var(--text-3); padding: 4px 4px 0; }

.spacer { flex: 1 1 auto; min-height: 20px; }

/* Pro card (sidebar on desktop, inline on mobile) */
.pro {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 16px;
}
.pro-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.pro-title svg { width: 18px; height: 18px; color: var(--accent); }
.pro-text { font-size: 13px; color: var(--text-2); margin: 8px 0 12px; line-height: 1.4; }

.btn-primary {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 44px;
  border-radius: var(--r-btn); background: var(--accent); color: #fff;
  font-size: 15px; font-weight: 600; transition: background 150ms ease;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: .5; cursor: default; }
.btn-quiet {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: var(--r-btn); background: var(--chip-bg); border: 1px solid var(--border);
  font-size: 14px; font-weight: 600; color: var(--text); transition: background 150ms ease;
}
.btn-quiet:hover { background: #ECEEF1; }
.btn-quiet svg { width: 16px; height: 16px; }

/* ============================================================== TOP BAR */

.topbar-desk {
  display: flex; justify-content: flex-end; align-items: center; gap: 16px;
  padding: 24px 36px 0;
}
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 20px;
  color: var(--text); position: relative;
}
.icon-btn:hover { background: var(--chip-bg); }
.icon-btn svg { width: 20px; height: 20px; }
.avatar {
  width: 40px; height: 40px; border-radius: 20px; background: var(--avatar-bg);
  display: grid; place-items: center; color: var(--text-2);
}
.avatar svg { width: 20px; height: 20px; }
.dot {
  position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 4px;
  background: var(--accent); border: 2px solid var(--app-bg);
}

/* ================================================================ SEARCH */

.ask-module { max-width: 740px; margin: 0 auto; }
.searchbar {
  display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 20px;
  background: var(--card); border: 1px solid var(--field-border); border-radius: var(--r-search);
}
.searchbar svg { width: 20px; height: 20px; color: var(--text-2); flex: 0 0 auto; }
.searchbar input {
  flex: 1 1 auto; min-width: 0; border: none; outline: none; background: transparent;
  font: 16px var(--font); color: var(--text);
}
.searchbar input::placeholder { color: var(--text-3); }
.searchbar:focus-within { border-color: var(--accent); }
/* Search / Ask Cub switch in the box's bottom left: knob left = Search,
   right = Ask Cub. */
.searchbar-stack { flex-direction: column; align-items: stretch; gap: 8px; height: auto; padding: 12px 16px 10px 20px; }
.sb-row { display: flex; align-items: center; gap: 12px; height: 32px; }
.mode-switch { display: flex; align-items: center; gap: 8px; align-self: flex-start; }
.ms-label { padding: 4px 0; background: transparent; font-size: 13px; font-weight: 600; color: var(--text-3); transition: color .2s; }
.ms-label[aria-pressed="true"] { color: var(--text); }
.ms-track { position: relative; width: 40px; height: 22px; padding: 0; border-radius: 999px;
  background: var(--chip-bg); border: 1px solid var(--border); transition: background .2s, border-color .2s; }
.ms-knob { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--text-2); transition: transform .24s cubic-bezier(.3,1.4,.5,1), background .2s; }
.mode-switch[data-mode="ask"] .ms-track { background: var(--nav-active); border-color: var(--accent); }
.mode-switch[data-mode="ask"] .ms-knob { transform: translateX(18px); background: var(--accent); }
.ms-track:focus-visible, .ms-label:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .ms-knob, .ms-track, .ms-label { transition: none; } }
.ask-module-phone { margin: 0 0 12px; }
.ask-module-phone .searchbar-stack { padding: 10px 14px 8px 16px; }
.ask-module-phone .search-drop { padding: 0 12px; }
.search-drop { margin-top: 8px; padding: 4px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); }
.search-none { margin: 12px 0; color: var(--text-2); font-size: 14px; }
.search-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0 12px; }

.chips-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 12px; }
/* Three suggestions sit on one line under the Ask bar, as in the mockup. */
.chips-row { gap: 8px; }
.chips-row .chip { padding: 0 14px; }
.chip {
  height: 36px; padding: 0 16px; border-radius: 999px; background: var(--chip-bg);
  border: 1px solid var(--border); font-size: 14px; color: var(--text-2); white-space: nowrap;
  transition: background 150ms ease, border-color 150ms ease;
}
.chip:hover { border-color: var(--field-border); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ============================================================== SECTIONS */

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 32px 0 16px; }
.section-title { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
.see-all {
  display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 500;
  color: var(--text-2);
}
.see-all:hover { color: var(--text); }
.see-all svg { width: 16px; height: 16px; }

/* ================================================================ STATUS */

.status-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; row-gap: 4px; min-width: 0; }
.pill {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}
.pill-DEVELOPING { background: var(--accent-soft); color: var(--accent); }
.pill-BREAKING   { background: var(--breaking-soft); color: var(--breaking); }
.pill-ACTIVE     { background: var(--active-soft); color: var(--active); }
.pill-QUIET      { background: var(--quiet-soft); color: var(--quiet); }
.pill-new        { background: var(--accent); color: #fff; }
.updates { font-size: 12px; font-weight: 500; color: var(--text-3); white-space: nowrap; }

/* ========================================================== STORY CARDS */

.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
/* Four across needs about 1280px; below that, two across keeps titles readable. */
@media (max-width: 1279px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card {
  display: flex; flex-direction: column; gap: 12px; padding: 16px; text-align: left; width: 100%;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card);
  transition: border-color 150ms ease;
}
.card:hover { border-color: var(--field-border); }
/* Mockup spec: 64x64 logo tile beside a ~132x84 landscape photo, card 310-330 tall. */
.card { min-height: 310px; }
.card-media { display: flex; gap: 8px; align-items: flex-start; }
.card-media .illo { height: 84px; }
.card-head { display: flex; align-items: flex-start; gap: 8px; }
.card-title {
  flex: 1 1 auto; margin: 0; font-size: 18px; font-weight: 700; line-height: 1.2;
  letter-spacing: -0.01em; display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.card-head svg { width: 18px; height: 18px; color: var(--text-3); flex: 0 0 auto; margin-top: 2px; }
.card-sum {
  margin: 0; font-size: 14px; color: var(--text-2); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}

/* Entity mark: the company's own logo on a neutral tile. */
.tile {
  flex: 0 0 auto; width: 64px; height: 64px; border-radius: var(--r-tile);
  background: var(--card); border: 1px solid var(--border);
  display: grid; place-items: center; overflow: hidden;
}
.tile img { width: 100%; height: 100%; object-fit: contain; }
.tile-letters { font-size: 18px; font-weight: 700; color: var(--accent); display: grid; place-items: center; }
.tile-letters svg { width: 28px; height: 28px; }

/* Category illustration: stands where the mockup had a press photo. Drawn in
   code, clearly an illustration, never depicts a real event. */
.illo {
  flex: 1 1 auto; min-width: 0; height: 64px; border-radius: var(--r-tile);
  background: var(--tile-bg); display: grid; place-items: center; overflow: hidden;
}
.illo svg { width: 100%; height: 100%; }
/* Licensed photo in the same slot. Portraits crop toward the face. */
.illo.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.illo.portrait img { object-position: center 22%; }
.photo-credit { margin: 6px 0 0; font-size: 11px; color: var(--text-3); line-height: 1.4; }
.photo-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ============================================================ RECAP CARD */

.recap-card {
  margin-top: 32px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-recap); padding: 20px;
}
.recap-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.recap-id { display: flex; align-items: center; gap: 16px; }
.recap-icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft);
  display: grid; place-items: center; color: var(--accent);
}
.recap-icon svg { width: 22px; height: 22px; }
.recap-h { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; margin: 0; line-height: 1.2; }
.recap-date { font-size: 14px; color: var(--text-2); margin-top: 2px; }
.recap-list { margin-top: 12px; }
/* Each item gets real breathing room: text never touches the divider, the
   number sits on the first line instead of floating mid-paragraph, and the
   line height is set for three-line sentences on a phone. */
.recap-item {
  display: flex; align-items: flex-start; gap: 14px; width: 100%; text-align: left;
  padding: 16px 0; border-top: 1px solid var(--border); color: var(--text);
}
.recap-list .recap-item:first-child { border-top: none; padding-top: 8px; }
.recap-line { font-size: 15px; line-height: 1.55; letter-spacing: -0.005em; }
.num {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 14px; background: var(--accent-soft);
  color: var(--accent); display: grid; place-items: center; font-size: 13px; font-weight: 600;
  margin-top: 1px;
}
.recap-item:hover .recap-line { color: var(--accent); }

/* =========================================================== MOBILE ROWS */

.row {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; width: 100%; text-align: left;
  border-bottom: 1px solid var(--border);
}
.row:last-child { border-bottom: none; }
.row .tile { width: 48px; height: 48px; }
.row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.row-title {
  margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.row-sum {
  margin: 0; font-size: 13px; color: var(--text-2); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.row .illo { flex: 0 0 auto; width: 76px; height: 56px; }

/* Dark "Today in AI" card: solid, no photo, no gradient. */
/* Dark glass (Arfa, 2026-09-21). The one sanctioned exception to "no gradients
   on cards": it is the day's headline object, and the only card that gets it.
   Layers: tinted gradient body, a soft accent glow for depth behind the glass,
   a 1px light rim, an inset top highlight, and a light sweep. The sweep only
   animates transform (compositor, no layout or paint), crosses in ~1.6s and
   then rests for most of the cycle, and is off under reduced motion. */
.today {
  position: relative; overflow: hidden; isolation: isolate;
  color: #fff; border-radius: var(--r-card); padding: 16px;
  margin: 12px 0 8px; width: 100%; text-align: left; display: block;
  background:
    radial-gradient(120% 90% at 100% 110%, rgba(66, 108, 156, 0.38), transparent 60%),
    radial-gradient(80% 60% at 0% 0%, rgba(255, 255, 255, 0.07), transparent 60%),
    linear-gradient(145deg, rgba(34, 39, 48, 0.94), rgba(14, 16, 21, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
}
.today::after {
  content: ""; position: absolute; inset: -40% auto -40% 0; width: 45%; z-index: 0;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.00) 30%,
              rgba(255, 255, 255, 0.13) 50%, rgba(255, 255, 255, 0.00) 70%, transparent 100%);
  transform: translateX(-160%) skewX(-12deg);
  animation: today-sheen 7s ease-in-out 0.6s infinite;
}
.today > * { position: relative; z-index: 1; }
@keyframes today-sheen {
  0%   { transform: translateX(-160%) skewX(-12deg); }
  23%  { transform: translateX(330%) skewX(-12deg); }
  100% { transform: translateX(330%) skewX(-12deg); }
}
@media (prefers-reduced-motion: reduce) { .today::after { animation: none; display: none; } }
.today-h { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.today-sub { font-size: 13px; color: #B8BDC8; margin: 2px 0 8px; }
.today-li { display: flex; gap: 8px; align-items: baseline; font-size: 13px; line-height: 1.4; padding: 3px 0; color: #E6E8EC; }
.today-li::before { content: ""; width: 6px; height: 6px; border-radius: 3px; background: #fff; flex: 0 0 auto; transform: translateY(-2px); }
.today-go {
  display: flex; justify-content: flex-end; margin-top: 4px;
}
.today-go span {
  width: 32px; height: 32px; border-radius: 16px; background: #fff; color: var(--dark-card);
  display: grid; place-items: center;
}
.today-go svg { width: 16px; height: 16px; }

/* ============================================================ STORY PAGE */

.back {
  display: inline-flex; align-items: center; gap: 4px; height: 36px; font-size: 15px; color: var(--text);
}
.back svg { width: 22px; height: 22px; }
.story-head { display: flex; gap: 16px; align-items: flex-start; margin-top: 8px; }
.story-head-main { flex: 1 1 auto; min-width: 0; }
.story-title { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin: 8px 0 0; }
.story-sub { font-size: 15px; color: var(--text-2); margin: 8px 0 0; }
.story-meta { font-size: 13px; color: var(--text-3); margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.story-meta svg { width: 14px; height: 14px; }
.follow {
  height: 34px; padding: 0 16px; border-radius: var(--r-btn); background: var(--accent);
  color: #fff; font-size: 14px; font-weight: 600; flex: 0 0 auto;
}
.follow[aria-pressed="true"] { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.story-head .illo { flex: 0 0 auto; width: 120px; height: 80px; }

.tabs { display: flex; gap: 0; margin-top: 20px; border-bottom: 1px solid var(--border); }
.tab {
  flex: 1 1 0; padding: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--text-3);
  border-bottom: 2px solid transparent; margin-bottom: -1px; text-align: center;
}
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--text); }

/* Timeline: 8px dots on a 1px line. Updates are never cards. */
.timeline { position: relative; margin: 16px 0 0; padding-left: 24px; }
.timeline::before {
  content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 1px; background: var(--border);
}
.update { position: relative; display: block; padding-bottom: 16px; text-decoration: none; }
.update::before {
  content: ""; position: absolute; left: -24px; top: 5px; width: 9px; height: 9px;
  border-radius: 5px; background: var(--card); border: 2px solid var(--active);
}
.update.is-new::before { background: var(--accent); border-color: var(--accent); }
.u-time { font-size: 12px; color: var(--text-3); }
.u-title { font-size: 15px; font-weight: 500; line-height: 1.35; margin-top: 2px; }
.u-src { font-size: 12px; color: var(--text-3); margin-top: 4px; }
/* Developments (story_events): same dot and line, plus a detail line and the
   articles behind it, folded. */
.ev-detail { font-size: 14px; line-height: 1.45; color: var(--text-2); margin-top: 4px; }
.ev-more, .ev-one { display: inline-block; background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: 12px; color: var(--text-3); text-decoration: none; }
.ev-more::after { content: "  +"; }
.ev-more[aria-expanded="true"]::after { content: "  \2212"; }
.ev-more:hover, .ev-one:hover { color: var(--text); }
.ev-sources { margin-top: 8px; border-left: 1px solid var(--border); padding-left: 12px; }
.ev-sources[hidden] { display: none; }
.ev-src { display: block; padding: 4px 0; font-size: 13px; line-height: 1.4; color: var(--text); text-decoration: none; }
.ev-src:hover { text-decoration: underline; }
.ev-src-name { display: block; font-size: 11px; color: var(--text-3); }
.since-band { display: flex; align-items: center; gap: 8px; margin: 20px 0 0; font-size: 13px; font-weight: 600; color: var(--accent); }
.since-band i { width: 8px; height: 8px; border-radius: 4px; background: var(--accent); }

/* What it means: fact is a filled card, speculation a left rule. */
.why {
  background: var(--accent-soft); border-radius: var(--r-card); padding: 16px; margin-top: 16px;
}
.why h3, .spec h3, .lens {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 6px;
}
.why h3 { color: var(--accent); }
.why p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text); }
.spec { border-left: 2px solid var(--field-border); padding: 2px 0 2px 16px; margin: 16px 0 0 2px; }
.spec h3 { color: var(--text-3); }
.spec p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.tag-spec {
  display: inline-block; margin-top: 8px; font-size: 10px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--text-3); border: 1px solid var(--border); border-radius: 4px; padding: 2px 6px;
}
.lens { color: var(--text-3); margin-top: 20px; }
.also { display: block; margin: 12px 0 0; font-size: 13px; font-weight: 600; color: var(--accent); }
.disclaimer { font-size: 12px; color: var(--text-3); margin: 8px 0 0; line-height: 1.4; }

.src-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.src-row:last-child { border-bottom: none; }
.src-row .tile { width: 36px; height: 36px; border-radius: 8px; }
.src-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.src-name { font-size: 13px; font-weight: 600; }
.src-t { font-size: 13px; color: var(--text-2); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.src-d { font-size: 12px; color: var(--text-3); }
.src-row > svg { width: 16px; height: 16px; color: var(--text-3); flex: 0 0 auto; }

/* ================================================================ ASK */

.page-title { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; margin: 8px 0 16px; line-height: 1.1; }
.suggest { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 12px 0 0; }
.qbubble {
  align-self: flex-end; max-width: 85%; background: var(--chip-bg); border: 1px solid var(--border);
  border-radius: 16px; padding: 8px 14px; font-size: 14px; margin: 8px 0 16px;
}
.ans-h { font-size: 20px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 8px; }
.ans-p { font-size: 15px; line-height: 1.55; color: var(--text); margin: 0; }
.ans-sub { font-size: 16px; font-weight: 700; margin: 20px 0 8px; }
.ans-ul { margin: 0; padding-left: 18px; }
.ans-ul li { font-size: 14px; line-height: 1.5; color: var(--text-2); margin: 4px 0; }
.cite {
  display: inline-block; min-width: 18px; padding: 0 5px; margin: 0 2px; border-radius: 5px;
  background: var(--chip-bg); color: var(--text-2); font-size: 11px; font-weight: 600;
  line-height: 18px; text-align: center; text-decoration: none; vertical-align: 1px;
}
.ask-note { font-size: 15px; color: var(--text-2); line-height: 1.5; margin: 8px 0 0; }
.ask-wait { font-size: 13px; color: var(--text-3); margin: 16px 0 8px; }
.followups { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.followups .chip { height: 32px; font-size: 13px; }

/* =============================================================== LISTS */

.set-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.set-row:last-child { border-bottom: none; }
.set-row .tile { width: 36px; height: 36px; border-radius: 8px; }
.set-l { display: flex; align-items: center; gap: 12px; min-width: 0; }
.set-t { font-size: 15px; font-weight: 500; }
.set-d { font-size: 12px; color: var(--text-3); }
.switch {
  width: 44px; height: 26px; border-radius: 13px; background: var(--border);
  position: relative; flex: 0 0 auto; transition: background 150ms ease;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 10px; background: #fff; transition: transform 150ms ease;
}
.switch[aria-pressed="true"] { background: var(--accent); }
.switch[aria-pressed="true"]::after { transform: translateX(18px); }

.segmented { display: flex; background: var(--chip-bg); border-radius: 10px; padding: 3px; }
.segmented button {
  flex: 1 1 0; height: 32px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--text-2);
}
.segmented button[aria-pressed="true"] { background: var(--accent); color: #fff; }

.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.mode {
  border: 1px solid var(--border); border-radius: var(--r-btn); padding: 8px; text-align: left;
  background: var(--card);
}
.mode strong { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.mode strong svg { width: 14px; height: 14px; }
.mode span { display: block; font-size: 11px; color: var(--text-3); margin-top: 2px; }
.mode[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.mode[aria-pressed="true"] span { color: #D6E2F0; }

.label { font-size: 15px; font-weight: 700; margin: 24px 0 4px; }
/* Same family as the status pills (was an off-palette gold pill that read as a
   stray element; Arfa flagged it 2026-09-21). */
.free-badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}
.group-h { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 4px; }
.group-h strong { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.group-h strong svg { width: 18px; height: 18px; color: var(--accent); }
.group-h span { font-size: 12px; color: var(--text-3); }

.empty { color: var(--text-3); font-size: 14px; padding: 32px 0; text-align: center; }
.skeleton { background: var(--chip-bg); border-radius: 6px; height: 12px; margin-bottom: 8px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

.field {
  flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 12px; border-radius: var(--r-btn);
  border: 1px solid var(--field-border); background: var(--card); font: 15px var(--font); color: var(--text);
}
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--border); cursor: pointer; }
.opt input { margin: 3px 0 0; accent-color: var(--accent); }
.opt strong { display: block; font-size: 14px; }
.opt small { display: block; font-size: 12px; color: var(--text-3); }
.err { font-size: 13px; color: var(--breaking); margin: 8px 0 0; }

/* Page motion lives in fx.js (once per page, not once per redraw). */
@keyframes enter { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ============================================================== DESKTOP */

@media (min-width: 1024px) {
  .main { margin-left: 260px; }
  .content { padding: 20px 36px 28px; max-width: 1180px; }
  .tabbar, .topbar-mob { display: none; }
  .story-page { max-width: 760px; }
}

/* =============================================================== MOBILE */

/* =========================================================== MODEL WATCH */

.mw-section { margin: 4px 0 24px; }
.mw-strip, .mw-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mw-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.mw-card {
  display: flex; flex-direction: column; gap: 6px; padding: 14px; text-align: left; width: 100%;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card);
  transition: border-color 150ms ease;
}
.mw-card:hover { border-color: var(--field-border); }
.mw-name { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; color: var(--text); }
.mw-lab { font-size: 13px; color: var(--text-2); }
.mw-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px;
  background: var(--chip-bg); color: var(--text-2); font-size: 11px; font-weight: 600;
}
.tag-accent { background: var(--accent-soft); color: var(--accent); }
/* Model page: identity header, lead line, facts panel, coverage. */
.mw-page { max-width: 860px; }
.mw-hero { display: flex; align-items: center; gap: 16px; margin: 8px 0 16px; }
.mw-tile { width: 56px; height: 56px; }
.mw-hero-main { flex: 1 1 auto; min-width: 0; }
.mw-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3);
}
.mw-title { margin: 2px 0 0; font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.mw-hero-lab { font-size: 15px; color: var(--text-2); margin-top: 2px; }
.mw-ask { flex: 0 0 auto; }
.mw-lead { margin: 0 0 20px; font-size: 16px; line-height: 1.55; color: var(--text-2); max-width: 640px; }

/* Facts: labelled cells on a 1px grid. The gap shows the border colour, so
   cells get hairline dividers in any column count without per-cell borders. */
.mw-facts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0 0 32px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden;
}
.mw-fact { background: var(--card); padding: 12px 16px; }
.mw-fact[hidden] { display: none; }
.mw-fact-wide { grid-column: 1 / -1; }
.mw-fact dt {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 4px;
}
.mw-fact dd { margin: 0; font-size: 15px; font-weight: 600; color: var(--text); }
.mw-avail { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.mw-avail-link { display: inline-flex; align-items: center; gap: 2px; color: var(--accent); text-decoration: none; }
.mw-avail-link svg { width: 14px; height: 14px; }
.mw-avail-link:hover { color: var(--accent-hover); }
.mw-cov-head { margin-top: 0; }
.mw-count { font-size: 13px; color: var(--text-3); }
.mw-meta { font-size: 12px; color: var(--text-3); margin-top: auto; padding-top: 4px; }

@media (max-width: 1023px) {
  /* One swipeable row on the phone, like the category chips. */
  .mw-strip {
    display: flex; overflow-x: auto; gap: 10px; margin: 0 -16px; padding: 0 16px 4px;
    scrollbar-width: none;
  }
  .mw-strip::-webkit-scrollbar { display: none; }
  .mw-strip .mw-card { flex: 0 0 200px; }
  .mw-section { margin-top: 20px; }
  .mw-grid { grid-template-columns: 1fr; }
  .mw-hero { flex-wrap: wrap; }
  .mw-title { font-size: 26px; }
  .mw-ask { order: 3; width: 100%; justify-content: center; }
  .mw-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 24px; }
}

@media (max-width: 1023px) {
  .sidebar, .topbar-desk { display: none; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .content { padding: 0 16px 24px; }
  .topbar-mob {
    display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 8px;
    /* Clear the iPhone status bar (clock, battery): the app draws edge to
       edge, so without this the header sat under the time (2026-09-26). */
    padding-top: calc(12px + env(safe-area-inset-top));
    position: sticky; top: 0; z-index: 10; background: var(--app-bg);
  }
  .topbar-mob .brand { margin: 0; }
  .topbar-mob .brand-word { height: 26px; width: 55px; }
  /* One swipeable row, bleeding to the screen edges, as in the iPhone mockup. */
  .cat-chips {
    display: flex; flex-wrap: nowrap; gap: 8px; margin: 4px -16px 0; padding: 0 16px 2px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .cat-chips::-webkit-scrollbar { display: none; }
  /* Rounded rectangles, not pills (Arfa, 2026-09-21). Same 10px radius as tiles and buttons. */
  .cat-chips .chip { flex: 0 0 auto; height: 34px; font-size: 13px; padding: 0 14px; border-radius: var(--r-btn); }
  .section-head { margin: 20px 0 4px; }
  .section-title { font-size: 18px; }
  .story-title { font-size: 24px; }
  .page-title { font-size: 30px; }

  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex;
    background: var(--card); border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar button {
    flex: 1 1 0; padding: 8px 0; display: flex; flex-direction: column; align-items: center;
    gap: 3px; color: var(--text-3); font-size: 10px; font-weight: 500; position: relative;
  }
  .tabbar button svg { width: 22px; height: 22px; }
  .tabbar button[aria-current="true"] { color: var(--accent); }
  .tabbar .dot { top: 4px; right: calc(50% - 16px); border-color: var(--card); }
}

@media (prefers-reduced-motion: reduce) {
  .view, .skeleton { animation: none; }
}


/* ======================================================= ACCOUNTS AND TOOLS
   pro.js: sign-in, credits, Ask conversations, briefs, tools, plans, settings.
   Same tokens as everything above: surface ladder, 1px hairlines, one accent,
   4/8 grid. No shadows, no gradients, no glow. */

.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.danger { color: #B42318; }
.topbar-mob-right { display: flex; align-items: center; gap: 8px; }
.credits-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--r-btn); background: var(--card);
  font-size: 13px; font-weight: 600; color: var(--text);
}
.credits-plan { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.avatar-letter { font-size: 14px; font-weight: 700; color: var(--accent); background: var(--accent-soft); }
.avatar-sm { width: 32px; height: 32px; font-size: 13px; }
.side-links { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 12px; font-size: 12px; }
.side-links a, .side-links .link-blue { color: var(--text-3); text-decoration: none; font-size: 12px; padding: 0; }
.side-links a:hover { color: var(--text-2); }

/* Toast and sheet */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: 12px; max-width: min(560px, calc(100vw - 32px));
  padding: 12px 12px 12px 16px; border-radius: 12px; background: var(--dark-card); color: #fff; font-size: 14px;
}
.toast-btn { color: #9EC1EA; font-weight: 600; font-size: 14px; white-space: nowrap; }
.toast-x { width: 24px; height: 24px; color: #B8BDC8; transform: rotate(45deg); }
.toast-x svg { width: 14px; height: 14px; }
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(16, 17, 20, 0.36); display: grid; place-items: center; padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); }
.sheet-body {
  width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 12px;
}
.sheet-h { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.sheet-sub { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.5; }
.code-field { font-size: 24px; letter-spacing: 0.3em; text-align: center; font-variant-numeric: tabular-nums; }
.legal-line { margin: 4px 0 0; font-size: 12px; color: var(--text-3); line-height: 1.5; }
.legal-line a { color: var(--text-2); }

/* Ask conversations */
.ask-page { max-width: 760px; }
.ai-tabs { max-width: 360px; margin: 0 0 16px; }
.thread { display: flex; flex-direction: column; gap: 12px; margin: 8px 0 16px; }
.ans-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 16px 20px; }
.ans-card .ans-p { margin: 0 0 8px; font-size: 15px; line-height: 1.6; }
.ans-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.src-num {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 6px; background: var(--chip-bg);
  display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--text-2);
}
.composer { position: sticky; bottom: 12px; background: var(--card); border: 1px solid var(--field-border); border-radius: var(--r-search); padding: 8px 8px 8px 16px; margin: 8px 0 12px; }
.composer-row { display: flex; align-items: flex-end; gap: 8px; }
.composer-input { flex: 1 1 auto; border: 0; outline: 0; resize: none; font: inherit; font-size: 15px; line-height: 1.5; padding: 8px 0; background: transparent; color: var(--text); max-height: 160px; }
.composer-send { flex: 0 0 auto; width: 40px; height: 40px; border-radius: var(--r-btn); background: var(--accent); color: #fff; display: grid; place-items: center; }
.composer-send svg { width: 18px; height: 18px; }
.composer-meta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--text-3); padding: 2px 0; }
.composer-opt { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }

/* Brief builder */
.brief-prompt { display: block; width: 100%; height: auto; min-height: 88px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
textarea.field { display: block; width: 100%; height: auto; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.sheet .field { width: 100%; flex: none; }
.basket { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.basket-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 32px; padding: 0 4px 0 12px;
  border: 1px solid var(--border); border-radius: var(--r-btn); background: var(--card); font-size: 13px;
}
.basket-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.basket-chip button { width: 24px; height: 24px; border-radius: 6px; color: var(--text-3); font-size: 16px; }
.basket-chip button:hover { background: var(--chip-bg); color: var(--text); }
.depth-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.depth-card {
  display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card);
}
.depth-card[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.depth-card[disabled] { opacity: 0.55; cursor: not-allowed; }
.depth-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.depth-rec { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.brief-stories { display: flex; flex-direction: column; gap: 6px; }
.brief-result { margin-top: 24px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--card); padding: 16px 20px; }
.brief-result-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.brief-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.copybox {
  width: 100%; min-height: 240px; padding: 12px 14px; border: 1px solid var(--field-border); border-radius: var(--r-btn);
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text); background: var(--app-bg); resize: vertical;
}
.md { font-size: 15px; line-height: 1.6; }
.md h2 { font-size: 22px; margin: 4px 0 12px; letter-spacing: -0.01em; }
.md h3 { font-size: 17px; margin: 20px 0 8px; }
.md h4 { font-size: 15px; margin: 16px 0 6px; }
.md p { margin: 0 0 12px; }
.md ul, .md ol { margin: 0 0 12px; padding-left: 20px; }
.md li { margin: 0 0 6px; }
.md a { color: var(--accent); }

/* Tools */
.story-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.tool-panel:not(:empty) { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.angle { border: 1px solid var(--border); border-radius: var(--r-card); background: var(--card); padding: 14px 16px; }
.angle-t { font-weight: 700; font-size: 15px; }
.angle-hook { margin: 8px 0; font-size: 15px; line-height: 1.5; }
.fc-row { border: 1px solid var(--border); border-left-width: 3px; border-radius: var(--r-btn); background: var(--card); padding: 12px 14px; margin: 8px 0; }
.fc-row .ans-p { margin: 6px 0 0; font-size: 14px; }
.fc-supported { border-left-color: var(--active); }
.fc-contradicted { border-left-color: var(--breaking); }
.fc-not_found { border-left-color: var(--border); }
.fc-badge { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); }
.fc-supported .fc-badge { color: var(--active); }
.fc-contradicted .fc-badge { color: var(--breaking); }
.fc-claim { font-weight: 600; font-size: 15px; margin-top: 4px; }
.cmp { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-btn); overflow: hidden; }
.cmp th, .cmp td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.cmp thead th { font-weight: 700; }
.cmp tbody th { font-weight: 500; color: var(--text-2); width: 40%; }
.cmp tr:last-child th, .cmp tr:last-child td { border-bottom: 0; }

/* Alerts */
.alerts-box { margin: 0 0 16px; }
.notif .notif-dot { width: 8px; height: 8px; border-radius: 4px; background: transparent; flex: 0 0 auto; margin-top: 6px; }
.notif.unread .notif-dot { background: var(--accent); }
.notif .set-l { align-items: flex-start; }

/* Plans */
.plan-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.plan-cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 520px; }
.plan-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); }
.plan-card-hi { border-color: var(--accent); }
.plan-current { background: var(--accent-soft); }
.plan-name { font-weight: 700; font-size: 16px; }
.plan-usd { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.plan-feats { margin: 0; padding-left: 18px; font-size: 14px; color: var(--text-2); line-height: 1.5; flex: 1 1 auto; }
.plan-feats li { margin: 0 0 4px; }
.cost-table { max-width: 520px; }
.hist-row { display: grid; grid-template-columns: 1fr auto 72px; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; }
.hist-row span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.hist-ref { color: var(--text-3); }

@media (max-width: 1023px) {
  .depth-cards { grid-template-columns: 1fr; }
  .plan-cards { grid-template-columns: 1fr; }
  .plan-cards-2 { grid-template-columns: 1fr; }
  .composer { bottom: 76px; }
  .basket-chip span { max-width: 220px; }
}

/* Personalization (Settings and the first sign-in sheet). */
.role-chips { justify-content: flex-start; margin-top: 8px; }
.personalize .segmented, .sheet-body .segmented { margin-top: 8px; }
.personalize .set-t { margin-top: 4px; }
.sheet-body .set-t { margin-top: 8px; }
.for-you { margin-top: 12px; }
.for-you-text { margin: 0; }

/* Onboarding by purpose and follow suggestions (2026-09-24). */
.sheet-body.onboarding { max-width: 480px; max-height: calc(100vh - 32px); overflow-y: auto; }
.onb-goals { display: flex; flex-direction: column; gap: 8px; }
.onb-goals .chip { height: 44px; justify-content: flex-start; padding: 0 16px; font-size: 15px; text-align: left; }
.onboarding .chips-row { flex-wrap: wrap; justify-content: flex-start; margin-top: 4px; }
.onb-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.onboarding .segmented { flex-wrap: wrap; }
.suggest-follow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px;
  padding: 12px; border: 1px solid var(--border); border-radius: var(--r-btn); background: var(--accent-soft);
  font-size: 14px; color: var(--text);
}
.suggest-follow span { flex: 1 1 220px; line-height: 1.45; }

/* Ask about this story (2026-09-24). */
.story-ask { margin-top: 16px; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--card); }
.story-ask-row { display: flex; gap: 8px; }
.story-ask-row .field { flex: 1 1 auto; min-width: 0; }
.story-ask-chips { justify-content: flex-start; margin-top: 8px; }
.story-ask-chips .chip { height: 32px; font-size: 13px; padding: 0 12px; }
.story-ask-ans { margin-top: 12px; }
.story-ask .ask-wait, .story-ask .ask-note { margin: 12px 0 0; }

/* What Cub knows about you, memory tag, answer tables, Your feed (2026-09-24). */
.knows { margin-top: 12px; padding: 16px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--card); }
.knows-h { margin: 0 0 8px; font-size: 16px; font-weight: 700; }
.knows-row { display: flex; align-items: baseline; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; }
.knows-row:first-of-type { border-top: 0; }
.knows-k { flex: 0 0 150px; color: var(--text-2); }
.knows-v { flex: 1 1 auto; min-width: 0; color: var(--text); }
.knows-list[hidden] { display: none; }
.knows-list { padding: 4px 0 8px; }
.knows-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0 8px 12px; border-left: 2px solid var(--border); margin-top: 4px; }
.knows-foot { margin: 8px 0 0; font-size: 12px; color: var(--text-3); line-height: 1.5; }
@media (max-width: 560px) { .knows-row { flex-wrap: wrap; gap: 4px 12px; } .knows-k { flex-basis: 100%; font-size: 12px; } }
.remembered { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; font-size: 13px; color: var(--text-2); line-height: 1.45; }
.remembered-tag { flex: 0 0 auto; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 600; }
.ans-table-wrap { margin: 12px 0; overflow-x: auto; }
.ans-table-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.ans-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.45; }
.ans-table th { text-align: left; font-weight: 600; color: var(--text-2); border-bottom: 1px solid var(--field-border); padding: 6px 8px; }
.ans-table td { border-bottom: 1px solid var(--border); padding: 8px; vertical-align: top; }
.ans-table p { margin: 0; }
.feed-chips { justify-content: flex-start; }
.feed-chip { display: inline-flex; align-items: center; }
.feed-chip .chip { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.feed-x { height: 36px; padding: 0 10px; border: 1px solid var(--border); border-left: 0; border-radius: 0 999px 999px 0; background: var(--chip-bg); color: var(--text-2); cursor: pointer; }
.feed-add { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 8px; }
.feed-add select { flex: 1 1 220px; max-width: 320px; }
.feed-word { display: flex; gap: 8px; flex: 1 1 260px; }
.feed-word .field { flex: 1 1 auto; min-width: 0; }
.feed-day { margin: 20px 0 4px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.feed-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.feed-row { width: 100%; text-align: left; }
.feed-tag { padding: 0 8px; border-radius: 999px; background: var(--chip-bg); color: var(--text-2); }

/* The locked part of the daily recap for free readers (2026-09-25). */
.recap-lock { margin-top: 16px; padding: 16px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--card); }

/* Story action explanations (2026-09-26): hover popup on desktop, a tap list on phones. */
.story-actions [data-tip] { position: relative; }
@media (hover: hover) {
  .story-actions [data-tip]:hover::after, .story-actions [data-tip]:focus-visible::after {
    content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 8px); z-index: 30;
    width: 240px; padding: 10px 12px; border-radius: var(--r-btn); background: var(--dark-card); color: #fff;
    font-size: 12px; font-weight: 400; line-height: 1.45; text-align: left; white-space: normal;
    animation: tip-in 140ms ease-out;
  }
  .action-what { display: none; }
}
@keyframes tip-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.action-what { font-size: 13px; }
.action-help { margin: 8px 0 4px; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-btn); background: var(--card); }
.action-help[hidden] { display: none; }
.action-help-row { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; font-size: 13px; line-height: 1.45; }
.action-help-row + .action-help-row { border-top: 1px solid var(--border); }
.action-help-row span { color: var(--text-2); }

/* Story page: follow what keeps producing news (companies, topic). */
.follow-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 4px; }
.follow-chips-l { font-size: 13px; color: var(--text-3); margin-right: 4px; }
.follow-chips .chip { height: 32px; font-size: 13px; padding: 0 12px; }

/* Ask Cub as one chat (2026-09-26): Cub's messages, modes in the composer. */
.cub-msg { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 16px; }
.cub-av { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 8px; display: block; }
.cub-msg-body { flex: 1 1 auto; min-width: 0; }
.cub-msg-body p { margin: 4px 0 0; font-size: 15px; line-height: 1.55; color: var(--text); }
.composer-modes { display: flex; gap: 4px; margin: 0 0 4px -8px; }
.composer-mode { height: 28px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); background: transparent; }
.composer-mode:hover { background: var(--chip-bg); color: var(--text); }
.composer-mode[aria-pressed="true"] { background: var(--nav-active); color: var(--text); }
.qrow { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.qrow .qbubble { margin: 0 0 8px; white-space: pre-wrap; }
.qtag { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); }
.cub-can { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0 8px; }
.cub-can-card { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px 16px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--r-card); }
.cub-can-card:hover { border-color: var(--field-border); background: var(--app-bg); }
.cub-can-card strong { font-size: 14px; }
@media (max-width: 560px) { .cub-can { grid-template-columns: 1fr; } }
/* New messages settle in rather than appear. */


/* Cub is working (app.js thinking(), stepped by fx.js). */
.think { padding: 4px 0 2px; }
.think-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.think-av { width: 20px; height: 20px; border-radius: 6px; display: block; }
.think-now { font-size: 14px; font-weight: 600; color: var(--text); }
.think-steps { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.think-steps li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); }
.think-steps li.is-on { color: var(--text); }
.think-steps li.is-done { color: var(--text-2); }
.think-dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--field-border); flex: 0 0 14px; position: relative; }
.think-steps li.is-on .think-dot { border-color: var(--accent); }
.think-steps li.is-on .think-dot::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent);
  animation: think-beat 1.1s ease-in-out infinite; }
.think-steps li.is-done .think-dot { background: var(--text-2); border-color: var(--text-2); }
.think-steps li.is-done .think-dot::after { content: ""; position: absolute; left: 4px; top: 1.5px; width: 3px; height: 6px;
  border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
@keyframes think-beat { 0%, 100% { transform: scale(0.7); opacity: 0.6; } 50% { transform: scale(1); opacity: 1; } }
.think-bar { height: 2px; background: var(--chip-bg); border-radius: 2px; overflow: hidden; }
.think-bar span { display: block; height: 100%; width: 8%; background: var(--accent); border-radius: 2px; }
html.fx .think-bar span { width: 0; }
@media (prefers-reduced-motion: reduce) { .think-steps li.is-on .think-dot::after { animation: none; } }

/* Sliding switches (fx.js): a pill under the chosen composer mode, a line
   under the chosen story tab. Without fx.js the plain pressed styles stay. */
.composer-modes, .tabs { position: relative; }
.fx-slide { position: absolute; left: 0; pointer-events: none; will-change: transform, width; }
.fx-slide-mode { top: 0; height: 28px; border-radius: 8px; background: var(--nav-active); z-index: 0; }
.fx-has-slide .composer-mode { position: relative; z-index: 1; }
.fx-has-slide .composer-mode[aria-pressed="true"] { background: transparent; }
.fx-slide-tab { bottom: -1px; height: 2px; background: var(--text); z-index: 1; }
.fx-has-slide .tab[aria-selected="true"] { border-bottom-color: transparent; }

/* Home, signed out: what Cub is, in one line (UI/UX red team). */
.first-visit { margin: 0 0 16px; font-size: 15px; line-height: 1.5; color: var(--text-2); max-width: 720px; }
.first-visit strong { color: var(--text); font-weight: 700; }
.first-visit .link-blue { font-size: 15px; }

/* Review fixes (2026-09-26): sign-in close, the question-limit card, phone Plans. */
.sheet-body { position: relative; }
.sheet-x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: var(--r-btn);
  font-size: 24px; line-height: 1; color: var(--text-2); background: transparent; }
.sheet-x:hover { background: var(--chip-bg); color: var(--text); }
.limit-card .set-d { margin: 8px 0 0; }
.limit-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.topbar-plans { height: 40px; padding: 0 12px; border-radius: var(--r-btn); font-size: 14px; font-weight: 600; color: var(--accent); background: transparent; }
.topbar-plans:hover { background: var(--accent-soft); }

/* UX pass from the red team (2026-09-27). */
/* H8: iOS zooms into any input under 16px on focus; that reads as a website, not an app. */
.field, .composer-input, .story-ask-row input, input[type="search"], input[type="email"], input[type="text"], textarea { font-size: 16px; }
/* L4: a visible focus state on the composer (a hairline, never a glow). */
.composer:focus-within { border-color: var(--accent); }
/* M1: switching Ask/Brief/Fact-check must not move the composer under the cursor. */
@media (min-width: 900px) { .ask-empty .cub-msg { min-height: 8.5em; } }
.plan-rec { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.02em; vertical-align: 2px; background: var(--accent-soft); color: var(--accent); }
.empty p { margin: 0 0 12px; }
/* L3: touch targets on phones. */
@media (max-width: 767px) {
  .cat-chips .chip { height: 40px; }
  .see-all { min-height: 44px; }
}
/* Recap lock: the headlines behind it (the written lines stay Plus). */
.recap-locked { list-style: none; margin: 12px 0 4px; padding: 0; display: grid; gap: 8px; }
.recap-locked li { display: flex; gap: 8px; align-items: baseline; font-size: 14px; line-height: 1.4; color: var(--text-2); }
.lock-dot { flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--field-border); transform: translateY(-2px); }
/* One accent per screen (design standard): the story page's filled accent is
   Ask; Follow story is a hairline button with accent text until it is on. */
.follow { background: var(--card); color: var(--accent); border: 1px solid var(--field-border); min-height: 40px; }
.follow:hover { border-color: var(--accent); }
.follow[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
/* Phones: the paid plans first, Free last, so Plus is on the first screen. */
@media (max-width: 767px) { .plan-cards:not(.plan-cards-2) > .plan-card:first-child { order: 9; } }
/* Purchase terms beside each button: readable, never fine print. */
.plan-terms { margin: 8px 0 0; font-size: 13px; line-height: 1.45; color: var(--text-2); }
.ai-consent-list { margin: 0; padding-left: 20px; font-size: 15px; line-height: 1.5; color: var(--text); }
.ai-consent-list li { margin: 4px 0; }
/* Plans hook and the trial's last days. */
.plans-hook { margin: 0 0 4px; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; color: var(--text); }
.trial-banner { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--field-border); border-radius: var(--r-card); background: var(--card);
  font-size: 15px; line-height: 1.45; color: var(--text-2); }
.trial-banner strong { color: var(--text); }

/* ============================================================ CUB CHANGES */
.chg-list { display: flex; flex-direction: column; gap: 12px; }
.chg-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 16px 20px; }
.chg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.chg-prod { font-weight: 600; color: var(--text); }
.chg-when { color: var(--text-3); }
.chg-title { margin: 8px 0 6px; font-size: 17px; line-height: 1.35; }
.chg-vals { margin: 0 0 6px; font-size: 15px; }
.chg-before { color: var(--text-3); text-decoration: line-through; }
.chg-after { font-weight: 600; }
.chg-eff { margin: 0 0 6px; font-size: 14px; color: var(--text-2); }
.chg-ev { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--border); color: var(--text-2); font-size: 14px; line-height: 1.5; }
.chg-src { font-size: 14px; color: var(--accent); text-decoration: none; }
.chg-cov { border: 1px solid var(--border); border-radius: var(--r-card); background: var(--card); }
.chg-cov-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 14px; }
.chg-cov-row:first-child { border-top: 0; }
.chg-cov-st { color: var(--text-3); text-align: right; }
.chg-cov-st.warn { color: #9A5B13; }
.chg-conn { margin-top: 24px; padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--card); }
.chg-conn-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chg-mcp { padding: 6px 10px; border-radius: 8px; background: var(--chip-bg); border: 1px solid var(--border); font-size: 14px; }
.changes-link { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin: 4px 0 12px; }
.changes-link-ic svg { width: 22px; height: 22px; color: var(--accent); }
.changes-link strong { display: block; }
.changes-link-sub { display: block; font-size: 13px; color: var(--text-2); }
.chg-ann { margin: 4px 0 8px; font-size: 13px; color: var(--text-2); }
.chg-ann a { color: var(--accent); text-decoration: none; }
.chg-ann-none span { color: #9A5B13; font-weight: 600; }
.chg-links { display: flex; flex-wrap: wrap; gap: 16px; }

/* Tool changes: paging, product history, grouped events */
.chg-more { display: block; margin: 12px auto 0; }
.chg-prodhead:not(:empty) { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 0 0 12px; font-size: 14px; color: var(--text-3); }
.chg-cov-pick { width: 100%; background: none; border: 0; border-top: 1px solid var(--border); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.chg-cov-pick:hover .chg-cov-name { text-decoration: underline; }
.chg-also { margin: 6px 0 0; font-size: 13px; color: var(--text-3); }
.chg-subj { margin: 8px 0 -4px; font-size: 13px; font-weight: 600; color: var(--text-3); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }

/* story meter (free readers): a blurred stand-in for the timeline, with the offer on top (2026-10-10) */
.paywall { position: relative; margin-top: 20px; min-height: 420px; overflow: hidden; border-radius: 14px; }
.paywall-fake { filter: blur(5px); pointer-events: none; user-select: none; }
.paywall-fake .pf-card { padding: 16px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.paywall-fake .pf { height: 12px; border-radius: 6px; background: #D5D6DB; margin: 10px 0; }
.paywall-fake .pf-s { width: 24%; } .paywall-fake .pf-l { width: 92%; } .paywall-fake .pf-m { width: 64%; }
.paywall-card { position: absolute; top: 28px; left: 50%; transform: translateX(-50%); width: min(420px, calc(100% - 24px));
  padding: 22px 20px 18px; text-align: center; background: var(--card); border: 1px solid var(--border); border-radius: 16px; }
.paywall-h { margin: 0 0 8px; font-size: 20px; line-height: 1.25; letter-spacing: -0.01em; }
.paywall-p { margin: 0 0 16px; font-size: 14.5px; line-height: 1.5; color: var(--text-3); }
.paywall-card .btn-primary { width: 100%; justify-content: center; }
.paywall-card .link-blue { display: block; margin: 12px auto 0; }
.paywall-fine { margin: 12px 0 0; font-size: 12.5px; color: var(--text-3); }
