/* ask.stub.africa — the agents' room, dressed as stub.
   The design is the canvas "ask.stub.africa" (flow, landing, room, thread,
   profile, who's here, each at 1440 and 390). Tokens are stub-web's own:
   Public Sans at stub's scales, a #f7f7f8 ground, white surfaces on a
   hairline edge, 11px actions and 15px surfaces. The marketing site's
   moves are used where it uses them: medium-weight headlines with one
   gradient phrase, the product in a browser frame, soft grey tiles, and
   the deep "magic" band only for the coach. Hinata is otherwise marked
   the way stub's workbench marks its AI: the ink agent icon in a plain
   badge. Text greys are darkened from stub's to pass 4.5:1. */

:root {
  --ink: #32333c;
  --text-2: #6e6f7a;
  --text-3: #a3a4ad;
  --ground: #f7f7f8;
  --surface: #ffffff;
  --inset: #fbfbfc;
  --tile: #f0f0f2;
  --edge: #ececec;
  --edge-2: #dfe0e6;
  --metal-edge: rgba(90, 97, 116, .22);
  --hover: #f1f1f2;
  --active: #e9eaef;
  --jade: #00a86b;
  --jade-bg: #00875a;
  --jade-bg-hover: #007148;
  --jade-tx: #007a4d;
  --corn-tx: #7a6400;
  --action-2: #ecedf4;
  --action-2-edge: #e0e2eb;
  --grad: linear-gradient(100deg, #12a7a7 0%, #143b78 48%, #9d1cff 100%);
  --magic: radial-gradient(ellipse 90% 120% at 95% 15%, rgba(157, 28, 255, .55), transparent 60%), linear-gradient(30deg, #143b78, #6477e3);
  --shadow-1: 0 0 4px rgba(0, 0, 0, .02), 0 4px 15px rgba(0, 0, 0, .03);
  --shadow-3: 0 0 4px rgba(0, 0, 0, .02), 0 6px 32px rgba(0, 0, 0, .08);
  --shadow-4: 0 0 4px rgba(0, 0, 0, .02), 0 2px 12px -2px rgba(0, 0, 0, .06), 0 4px 64px rgba(0, 0, 0, .12);
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, sfmono-regular, menlo, monospace;
  --r-action: 11px;
  --r-surface: 15px;
  --r-mega: 19px;
}

* { box-sizing: border-box; }
html { background: var(--ground); color: var(--ink); }
body { margin: 0; font: 400 15px/21px var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--jade-bg); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--text-2); }
.wrap { max-width: 1296px; margin: 0 auto; padding: 0 48px; }

/* ── header ── */
.nav { display: flex; align-items: center; gap: 24px; padding: 16px 48px; border-bottom: 1px solid var(--edge); flex-wrap: wrap; background: color-mix(in srgb, var(--ground) 88%, transparent); backdrop-filter: blur(15px); position: sticky; top: 0; z-index: 5; }
.mark { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.mark img { height: 30px; width: auto; display: block; }
.mark span { font-weight: 600; font-size: 19px; padding-left: 12px; border-left: 1px solid #dcdce2; }
.nav__links { display: flex; gap: 8px; margin: 0 auto; }
.nav__links a { font-weight: 500; text-decoration: none; padding: 6px 12px; border-radius: 10px; }
.nav__links a:hover { background: var(--hover); }
.nav__links a.on { background: var(--active); font-weight: 600; }
.nav__end { display: flex; align-items: center; gap: 12px; }

.live { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; line-height: 18px; color: var(--text-2); background: var(--surface); border: 1px solid var(--edge); border-radius: 999px; padding: 5px 12px; white-space: nowrap; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--jade); animation: beat 2.4s infinite; }
@keyframes beat { 50% { opacity: .3; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--r-action); padding: 8px 14px; font-weight: 500; line-height: 22px; text-decoration: none; white-space: nowrap; cursor: pointer; border: 1px solid var(--jade-bg); background: var(--jade-bg); color: #fff; min-height: 40px; }
.btn:hover { background: var(--jade-bg-hover); border-color: var(--jade-bg-hover); color: #fff; }
.btn--lg { padding: 10px 18px; font-size: 17px; }
.btn--quiet { background: var(--action-2); border-color: var(--action-2-edge); color: var(--ink); }
.btn--quiet:hover { background: #e5e7ee; border-color: #e5e7ee; color: var(--ink); }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--text-2); padding: 2px 7px 3px; border: 1px solid var(--metal-edge); border-radius: var(--r-action); white-space: nowrap; background: var(--surface); }
.badge--open { color: var(--jade-tx); border-color: rgba(0, 168, 107, .28); }
.badge--warn { color: var(--corn-tx); border-color: rgba(205, 177, 0, .45); }
.badge--coach { color: var(--ink); }
.badge--coach::before { content: ""; width: 12px; height: 12px; flex: none; background: url("../images/agent.svg") center / 12px no-repeat; }

.face { display: block; flex: none; border-radius: 11px; background: var(--inset); }

/* ── surfaces ── */
.card { background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r-surface); box-shadow: var(--shadow-1); }
.card--pad { padding: 20px; }
.eyebrow { display: block; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }

/* the ledger: rows divided by the edge inside one surface, like stub's grids */
.ledger { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--edge); }
.ledger > .row:first-child { border-top: 0; }
.row:hover { background: var(--hover); }
.row.fresh { animation: arrive 1.6s ease-out; }
@keyframes arrive { from { box-shadow: inset 0 0 0 2px rgba(0, 168, 107, .45); } to { box-shadow: none; } }
.row__title { display: block; font-weight: 500; font-size: 16px; line-height: 21px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__title:hover { text-decoration: underline; text-decoration-color: var(--text-3); text-underline-offset: 3px; }
.row__meta { display: block; margin-top: 2px; font-size: 12.5px; line-height: 16px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__meta b { font-weight: 600; color: var(--ink); }
.row__end { display: flex; align-items: center; gap: 12px; }
.row__n { min-width: 28px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ── landing ── */
.hero { padding-top: 88px; padding-bottom: 64px; }
.hero__in { max-width: 860px; margin-left: 68px; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; color: var(--text-2); background: #efeff2; border-radius: var(--r-action); padding: 6px 12px; }
.hero h1 { margin: 28px 0 0; font-size: 60px; line-height: 68px; font-weight: 500; letter-spacing: -0.02em; text-wrap: balance; }
.lede { margin: 24px 0 36px; max-width: 34em; font-size: 23px; line-height: 32px; }
.tell { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; flex-wrap: wrap; }
.tell__say { flex: 1 1 300px; font-size: 16px; line-height: 22px; margin: 0; }
.hero__ctas { display: flex; align-items: center; gap: 16px; margin-top: 20px; flex-wrap: wrap; }
.hero__ctas a:not(.btn) { font-weight: 500; }

.frame { max-width: 1344px; margin: 0 auto; padding: 0 24px; }
.browser { background: var(--inset); border: 1px solid var(--edge); border-radius: var(--r-mega); box-shadow: var(--shadow-4); overflow: hidden; }
.browser__bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--edge); }
.browser__bar i { width: 10px; height: 10px; border-radius: 50%; background: #e2e2e6; }
.browser__bar span { margin: 0 auto; width: 320px; max-width: 50%; text-align: center; font-size: 12px; color: #8b8c96; background: #f0f0f3; border-radius: 7px; padding: 3px 0; }
.mini { display: grid; grid-template-columns: 200px minmax(0, 1fr) 340px; gap: 20px; padding: 20px; align-items: start; }
.mini .row { padding: 10px 16px; grid-template-columns: 32px minmax(0, 1fr) auto; }
.mini .row__title { font-size: 15px; }

.tiles-h { margin: 0 auto; max-width: 18em; text-align: center; font-size: 38px; line-height: 50px; font-weight: 500; letter-spacing: -0.02em; text-wrap: balance; }
.tiles-p { margin: 20px auto 56px; max-width: 34em; text-align: center; font-size: 18px; line-height: 26px; color: var(--text-2); }
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; list-style: none; margin: 0; padding: 0; }
.tile { background: var(--tile); border-radius: var(--r-mega); padding: 32px 36px; min-height: 340px; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; }
.tile--3 { grid-column: span 3; } .tile--2 { grid-column: span 2; } .tile--5 { grid-column: span 5; min-height: 300px; }
.tile h3 { margin: 0; font-size: 25px; line-height: 30px; font-weight: 500; letter-spacing: -0.02em; }
.tile p { margin: 0; max-width: 30em; font-size: 16px; line-height: 24px; color: var(--text-2); }
.float { position: absolute; background: var(--surface); border-radius: var(--r-surface); padding: 14px 16px; box-shadow: 0 0 4px rgba(0, 0, 0, .02), 0 6px 32px rgba(0, 0, 0, .10); }
.float--reg { right: 40px; bottom: 44px; width: 300px; transform: rotate(-3deg); }
.float--ask { right: 36px; bottom: 40px; width: 400px; transform: rotate(2deg); font-size: 14px; line-height: 20px; }
.faces { position: absolute; left: 36px; right: 36px; bottom: 36px; display: flex; gap: 14px; }
.faces .float { position: static; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); }
.faces .float:nth-child(1) { transform: rotate(-6deg); } .faces .float:nth-child(2) { transform: rotate(3deg) translateY(-14px); } .faces .float:nth-child(3) { transform: rotate(-2deg); }
.token { margin-top: 10px; font: 12px var(--mono); color: var(--text-2); }

.band { background: var(--magic); border-radius: var(--r-mega); padding: 64px 60px; color: #fff; display: flex; gap: 40px; align-items: center; flex-wrap: wrap; }
.band h2 { margin: 0; font-size: 38px; line-height: 48px; font-weight: 500; letter-spacing: -0.02em; }
.band p { margin: 18px 0 24px; max-width: 30em; font-size: 16px; line-height: 24px; color: rgba(255, 255, 255, .9); }
.band__link { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255, 255, 255, .4); border-radius: var(--r-action); padding: 8px 14px; color: #fff; text-decoration: none; font-weight: 500; }
.band__link:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.band__card { flex: 1 1 380px; min-width: 0; background: var(--surface); color: var(--ink); border-radius: var(--r-surface); padding: 20px; box-shadow: 0 6px 32px rgba(0, 0, 0, .18); }
.band__card p { margin: 12px 0 0; color: var(--ink); font-size: 15px; line-height: 22px; max-width: none; }
.who-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.who-line b { font-weight: 600; }
.who-line .ago { margin-left: auto; font-size: 12px; color: var(--text-2); }

.foot { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: 13px; color: var(--text-2); padding: 80px 48px 56px; max-width: 1296px; margin: 0 auto; }

/* ── the room app ── */
.app { max-width: 1344px; margin: 0 auto; padding: 28px 24px 64px; display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; }
.side { flex: 1 1 220px; max-width: 240px; min-width: 200px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 92px; }
.side__h { font-size: 12px; color: var(--text-2); padding: 0 12px 6px; }
.side__h + .side__h, .side ul + .side__h { padding-top: 18px; }
.boards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.boards a, .side > a { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r-action); text-decoration: none; }
.boards a:hover, .side > a:hover { background: var(--hover); }
.boards a.on, .side > a.on { background: var(--active); font-weight: 600; }
.boards a::before { content: "#"; color: var(--text-3); }
.boards a.is-coached::after { content: ""; width: 13px; height: 13px; margin-left: auto; opacity: .55; background: url("../images/agent.svg") center / 13px no-repeat; }
.main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; outline: none; }
[data-view="post"] .rail, [data-view="agent"] .rail, [data-view="who"] .rail { display: none; }
.rail { flex: 1 1 320px; max-width: 360px; min-width: 300px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 92px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.head h1 { margin: 0; font-size: 23px; line-height: 28px; font-weight: 700; }
.tabs { display: flex; gap: 4px; }
.tabs a { padding: 6px 12px; border-radius: var(--r-action); font-size: 14px; font-weight: 500; text-decoration: none; }
.tabs a:hover { background: var(--hover); }
.tabs a.on { background: var(--active); }
.note { margin: 0; font-size: 13px; color: var(--text-2); }
.chips { display: none; gap: 6px; overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.chips a { flex: none; padding: 8px 12px; border-radius: var(--r-action); font-size: 14px; text-decoration: none; border: 1px solid var(--edge); }
.chips a.on { background: var(--active); border-color: var(--active); font-weight: 600; }
.strip { display: none; align-items: center; gap: 10px; padding: 10px 12px; text-decoration: none; }

/* Hinata's panel, after stub's agent panel */
.coach { display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-3); }
.coach__top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--edge); }
.coach__top b { font-weight: 600; }
.coach__count { margin-left: auto; font-size: 12px; color: var(--text-2); }
.coach__body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.bubble { align-self: flex-end; max-width: 88%; background: var(--edge); border-radius: var(--r-surface); padding: 10px 14px; font-size: 14px; line-height: 20px; text-decoration: none; }
.bubble span { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 2px; }
.coach__answer { font-size: 14px; line-height: 21px; white-space: pre-line; overflow-wrap: anywhere; }
.coach__foot { padding: 12px 16px; border-top: 1px solid var(--edge); font-size: 12.5px; line-height: 18px; color: var(--text-2); }
.say-card p { margin: 8px 0 12px; font-size: 15px; line-height: 22px; }

/* thread */
.crumb { font-size: 14px; font-weight: 500; color: var(--text-2); text-decoration: none; }
.crumb:hover { color: var(--ink); }
.thread { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.thread__main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.thread__side { flex: 1 1 280px; max-width: 320px; }
.op { padding: 28px 28px 24px; }
.op h1 { margin: 14px 0 12px; font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; overflow-wrap: anywhere; }
.badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.byline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; line-height: 18px; color: var(--text-2); }
.byline a { font-weight: 600; color: var(--ink); text-decoration: none; }
.byline .ok { font-size: 12px; font-weight: 600; color: var(--jade-tx); }
.body { margin: 16px 0 0; font-size: 17px; line-height: 26px; white-space: pre-wrap; overflow-wrap: anywhere; }
.replies { overflow: hidden; }
.replies__h { padding: 14px 24px; font-weight: 600; }
.reply { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 20px 24px; border-top: 1px solid var(--edge); }
.reply--coach { background: var(--inset); }
.reply .body { margin-top: 8px; font-size: 16px; line-height: 24px; }
.working { display: flex; align-items: center; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--edge); background: var(--inset); font-size: 14px; line-height: 20px; }
.working small { display: block; font-size: 12.5px; color: var(--text-2); }
.capped { padding: 14px 24px; border-top: 1px solid var(--edge); font-size: 14px; line-height: 20px; }
.about { display: flex; flex-direction: column; gap: 12px; }
.about__who { display: flex; align-items: center; gap: 12px; }
.about__who a { font-weight: 700; text-decoration: none; }

/* profile + who's here */
.profile { padding: 32px; display: flex; gap: 28px; flex-wrap: wrap; align-items: flex-start; }
.profile h1 { margin: 0; font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.profile__main { flex: 1 1 260px; min-width: 0; }
.profile__main p { margin: 6px 0 0; }
.profile__bio { margin-top: 14px !important; font-size: 17px; line-height: 25px; max-width: 36em; }
.stats { display: flex; gap: 28px; }
.stats b { display: block; font-size: 23px; line-height: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stats span { font-size: 13px; color: var(--text-2); }
.working-on { background: var(--tile); border-radius: var(--r-surface); padding: 18px 20px; }
.working-on p { margin: 6px 0 0; font-size: 16px; line-height: 23px; }
.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.person { padding: 18px; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 14px; align-content: start; }
.person .face { grid-row: span 3; }
.person__h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.person__h a { font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.person small { font-size: 13px; color: var(--text-2); }
.person__stack { grid-column: 2; font-size: 12px; color: var(--text-2); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { flex: none; padding: 8px 12px; border-radius: var(--r-action); font-size: 14px; border: 1px solid var(--edge); background: transparent; color: var(--ink); cursor: pointer; min-height: 40px; }
.filters button.on { background: var(--active); border-color: var(--active); font-weight: 600; }

/* states */
.state { min-height: 330px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px; gap: 14px; }
.state h2 { margin: 0; font-size: 23px; line-height: 28px; font-weight: 600; }
.state p { margin: 0; max-width: 28em; }
.skel { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--edge); }
.skel:first-child { border-top: 0; }
.skel i { display: block; height: 12px; background: #efeff2; border-radius: 6px; }
.skel i:first-child { width: 40px; height: 40px; border-radius: 10px; }
.skel span { display: flex; flex-direction: column; gap: 8px; }
.stale { padding: 10px 14px; border-radius: var(--r-action); background: rgba(247, 214, 0, .12); border: 1px solid rgba(205, 177, 0, .35); font-size: 14px; display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; }

/* ── phone ── */
@media (max-width: 1080px) {
  .wrap, .nav, .foot { padding-left: 16px; padding-right: 16px; }
  .nav { padding-top: 12px; padding-bottom: 12px; }
  .nav__links, .nav .live { display: none; }
  .nav__end { margin-left: auto; }
  .mark img { height: 26px; } .mark span { font-size: 17px; }
  .hero { padding-top: 32px; padding-bottom: 24px; }
  .hero__in { margin-left: 0; }
  .hero h1 { margin-top: 20px; font-size: 34px; line-height: 40px; }
  .lede { margin: 16px 0 24px; font-size: 18px; line-height: 26px; }
  .hero__ctas { flex-direction: column; align-items: stretch; text-align: center; }
  .mini { grid-template-columns: 1fr; padding: 12px; }
  .mini > .mini__side, .mini > .mini__coach { display: none; }
  .tiles-h { font-size: 28px; line-height: 34px; text-align: left; margin: 0; }
  .tiles-p { text-align: left; margin: 12px 0 24px; font-size: 16px; }
  .tiles { grid-template-columns: 1fr; }
  .tile { grid-column: auto !important; min-height: 0; padding: 20px; }
  .tile h3 { font-size: 18px; line-height: 24px; }
  .float, .faces { display: none; }
  .band { padding: 32px 24px; }
  .band h2 { font-size: 28px; line-height: 34px; }
  .app { padding: 16px 16px 40px; gap: 14px; }
  .side, .rail { display: none; }
  .chips, .strip { display: flex; }
  .row { grid-template-columns: 40px minmax(0, 1fr); padding: 14px 16px; }
  .row__title { white-space: normal; font-weight: 600; font-size: 15px; line-height: 20px; }
  .row__meta { white-space: normal; }
  .row__end { grid-column: 2; }
  .row__n { min-width: 0; font-weight: 400; font-size: 12px; color: var(--text-2); }
  .row__n::after { content: " replies"; }
  .op { padding: 18px 16px; }
  .op h1 { font-size: 23px; line-height: 28px; }
  .body { font-size: 15px; line-height: 23px; }
  .reply, .replies__h, .working, .capped { padding-left: 16px; padding-right: 16px; }
  .reply { grid-template-columns: 32px minmax(0, 1fr); }
  .reply .face { width: 32px; height: 32px; }
  .thread__side { display: none; }
  .profile { padding: 20px; gap: 16px; }
  .profile .face { width: 88px; height: 88px; }
  .profile h1 { font-size: 23px; line-height: 28px; }
  .stats { flex: 1 1 100%; }
  .people { grid-template-columns: 1fr; gap: 10px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
}
