/* Thoughtropy, in the "Studio" look the lab's home page uses (docs/redesign-brief.md): a light grey
   ground, near-black ink, one typeface (Mona Sans), soft rounded surfaces and no decoration.
   Orange is kept for one job: it marks anything the AI made or can do. Light is the main look; dark
   follows the system setting. Fonts are self-hosted in /fonts/. */

@font-face {
  font-family: "Mona Sans";
  src: url(/fonts/mona-sans.woff2) format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-display: swap;
}

:root {
  --bg: #E7E8EA;
  --surface: #F1F2F3;
  --raised: #FAFAFB;
  --ink: #0F1013;
  --muted: #50545C;
  --faint: #5F636B;          /* the lightest text allowed: 4.5:1 or more on the ground and on surfaces */
  --line: #D6D7DB;
  --line-strong: #C3C5CA;
  --accent: #FF5500;
  --accent-ink: #B33C00;     /* orange used as text */
  --accent-soft: #F7E4DA;
  --ok: #1B6B40;
  --ok-soft: #DBEBE1;
  --danger: #B3261E;
  --danger-soft: #F6DEDB;
  --mark: #FFDFAE;
  --shadow: 0 1px 2px rgb(15 16 19 / 6%), 0 14px 36px -10px rgb(15 16 19 / 22%);
  --lift: 0 1px 2px rgb(15 16 19 / 6%), 0 6px 16px -8px rgb(15 16 19 / 16%);
  --avatar-l: 42%;
  --avatar-ink: #ffffff;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r-s: 9px;
  --r: 12px;
  --r-l: 16px;
  --top-h: 64px;
  --wordmark: url(brand/lockup-light.svg);
  --wordmark-ratio: 254 / 56;
  color-scheme: light;
}
/* Dark: when the device asks for it, unless the person chose light in Settings; or when they chose
   dark. The two blocks hold the same values. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #222327;
    --surface: #2A2B30;
    --raised: #32333A;
    --ink: #F4F4F6;
    --muted: #A9ACB3;
    --faint: #9A9DA6;
    --line: #37383E;
    --line-strong: #4A4B53;
    --accent-ink: #FF7A3D;
    --accent-soft: #3B2A21;
    --ok: #74D39C;
    --ok-soft: #22352A;
    --danger: #FF8F85;
    --danger-soft: #40272A;
    --mark: #6B4410;
    --shadow: 0 14px 40px rgb(0 0 0 / 50%);
    --lift: 0 6px 18px -6px rgb(0 0 0 / 45%);
    --avatar-l: 66%;
    --avatar-ink: #0F1013;
    --wordmark: url(brand/lockup-dark.svg);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #222327;
  --surface: #2A2B30;
  --raised: #32333A;
  --ink: #F4F4F6;
  --muted: #A9ACB3;
  --faint: #9A9DA6;
  --line: #37383E;
  --line-strong: #4A4B53;
  --accent-ink: #FF7A3D;
  --accent-soft: #3B2A21;
  --ok: #74D39C;
  --ok-soft: #22352A;
  --danger: #FF8F85;
  --danger-soft: #40272A;
  --mark: #6B4410;
  --shadow: 0 14px 40px rgb(0 0 0 / 50%);
  --lift: 0 6px 18px -6px rgb(0 0 0 / 45%);
  --avatar-l: 66%;
  --avatar-ink: #0F1013;
  --wordmark: url(brand/lockup-dark.svg);
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Mona Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3, p, ul, ol, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.5; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
mark { background: var(--mark); color: inherit; padding: 0 2px; border-radius: 3px; }
.icon { flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon-dots { stroke-width: 3; }

/* --- Type ---------------------------------------------------------------- */

/* The wordmark element keeps its text for screen readers, and shows the outlined logo. */
.wordmark { display: inline-block; flex: none; height: 30px; aspect-ratio: var(--wordmark-ratio); background: var(--wordmark) no-repeat left center / contain; font-size: 0; color: transparent; text-decoration: none; }
h1 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 640; line-height: 1.06; letter-spacing: -0.038em; overflow-wrap: anywhere; text-wrap: balance; }
/* A small heading above a group of things. On an h2 it is a section's title. */
.label { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--muted); }
h2.label { font-size: 16px; font-weight: 640; letter-spacing: -0.015em; color: var(--ink); }
.label-accent { color: var(--accent-ink); }
.dot { display: none; }
.lede { font-size: 17px; color: var(--muted); max-width: 60ch; text-wrap: pretty; }
.muted { color: var(--muted); }
.hint { font-size: 12.5px; color: var(--faint); }
/* While something loads: three soft bars where it will appear. The words stay for screen readers. */
.loading { position: relative; height: 150px; margin: 4px 0; overflow: hidden; font-size: 0; color: transparent; animation: breathe 1.4s ease-in-out infinite; }
.loading::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 40px; border-radius: var(--r); background: var(--surface); box-shadow: 0 54px 0 var(--surface), 0 108px 0 var(--surface); }
@keyframes breathe { 50% { opacity: 0.55; } }

/* --- Controls ------------------------------------------------------------ */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 6px 14px;
  border: 1px solid var(--line-strong); border-radius: 11px; background: var(--raised); font-weight: 600; font-size: 14px;
  text-decoration: none; white-space: nowrap; transition: border-color 120ms ease, background 120ms ease, transform 100ms ease-out;
}
.button:hover:not(:disabled) { border-color: var(--ink); }
.button:active:not(:disabled) { transform: scale(0.98); }
.button-primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.button-primary:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 84%, var(--bg)); border-color: transparent; }
.button-accent { border-color: transparent; color: var(--accent-ink); background: var(--accent-soft); }
.button-accent:hover:not(:disabled) { border-color: var(--accent-ink); }
.button-danger { background: var(--danger); border-color: var(--danger); color: var(--bg); }
.button-quiet { border-color: transparent; background: transparent; color: var(--muted); }
.button-quiet:hover:not(:disabled) { border-color: transparent; background: var(--surface); color: var(--ink); }
.button-small { min-height: 30px; padding: 3px 10px; border-radius: var(--r-s); font-size: 13px; gap: 6px; }
.button-block { width: 100%; }
.icon-button {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: none;
  border: 0; border-radius: var(--r-s); background: transparent; color: var(--muted);
}
.icon-button:hover { background: var(--surface); color: var(--ink); }
.link-button { border: 0; padding: 0; background: none; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; font-size: 13.5px; text-align: left; }
.text-button {
  display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 7px; background: none; padding: 4px 7px; margin: -4px -3px;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.text-button:hover:not(:disabled) { color: var(--ink); background: var(--bg); }
.text-button-ai { color: var(--accent-ink); }
.text-button-ai:hover:not(:disabled) { color: var(--accent-ink); background: var(--accent-soft); }

.input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--raised);
  font-size: 15px; line-height: 1.5;
}
.input::placeholder { color: var(--faint); }
.input:focus { outline: 2px solid var(--ink); outline-offset: -1px; border-color: var(--ink); }
textarea.input { display: block; resize: vertical; min-height: 44px; }
textarea[data-autosize] { resize: none; overflow-y: auto; }
select.input { width: auto; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-grow { flex: 1; }
.field-label { font-size: 13px; font-weight: 600; }
.field-hint { font-size: 12.5px; color: var(--faint); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row > .input { flex: 1; min-width: 180px; }
.stack { display: flex; flex-direction: column; gap: 14px; }

.banner { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--r); background: var(--surface); font-size: 14px; }
.banner .icon { margin-top: 3px; }
.banner-accent { background: var(--accent-soft); }
.banner-ok { background: var(--ok-soft); }
.banner-error { background: var(--danger-soft); }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; background: var(--bg); font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.chip-formed { background: var(--ink); color: var(--bg); }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.tag-ai { color: var(--accent-ink); }

.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: hsl(var(--hue) 48% var(--avatar-l)); color: var(--avatar-ink); font-size: 13px; font-weight: 700; line-height: 1;
}
.avatar-sm { width: 22px; height: 22px; font-size: 11px; }
.avatar.is-online { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ok); }
.person { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }

/* --- Toasts, dialogs, menus ---------------------------------------------- */

.toasts { position: fixed; z-index: 60; right: 16px; bottom: 16px; left: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 12px; max-width: 460px; padding: 10px 10px 10px 16px; pointer-events: auto;
  border-radius: var(--r); background: var(--ink); color: var(--bg); box-shadow: var(--shadow); font-size: 14px; animation: rise 160ms ease;
}
.toast-error { background: var(--danger); }
.toast-action { border: 1px solid currentColor; border-radius: 8px; background: none; color: inherit; padding: 3px 10px; font-weight: 600; font-size: 13px; }
.toast-close { display: inline-flex; border: 0; background: none; color: inherit; padding: 4px; opacity: 0.75; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.dialog { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 18px; background: var(--raised); color: var(--ink); box-shadow: var(--shadow); }
.dialog-wide { width: min(600px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgb(15 16 19 / 45%); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 14px 4px 22px; }
.dialog-head h2 { font-size: 19px; font-weight: 640; letter-spacing: -0.02em; }
.dialog-body { padding: 14px 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.dialog-text { color: var(--muted); }
.dialog-text strong { color: var(--ink); }
.dialog-list { display: grid; gap: 8px; padding-left: 20px; list-style: disc; font-size: 14.5px; }
.link-danger { color: var(--danger); font-size: inherit; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

.menu { position: fixed; z-index: 70; min-width: 210px; max-width: min(320px, calc(100vw - 16px)); padding: 5px; border: 1px solid var(--line); border-radius: 13px; background: var(--raised); box-shadow: var(--shadow); }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; text-align: left; font-size: 14px; font-weight: 500; }
.menu-item:hover, .menu-item:focus-visible { background: var(--bg); outline: none; }
.menu-item.is-danger { color: var(--danger); }

/* --- Boot and signed-out ------------------------------------------------- */

.boot { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; }
.boot-note { color: var(--muted); max-width: 48ch; }
.noscript { padding: 24px; text-align: center; }

.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: auto auto; grid-template-areas: "pitch panel" "points panel"; align-content: center; }
.auth-pitch { grid-area: pitch; padding: clamp(28px, 6vw, 88px) clamp(28px, 6vw, 88px) 0; display: flex; flex-direction: column; gap: 20px; justify-content: flex-end; }
.auth-points-wrap { grid-area: points; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: 14px clamp(28px, 6vw, 88px) clamp(28px, 6vw, 88px); }
.auth-more { font-size: 14.5px; font-weight: 600; color: var(--ink); text-underline-offset: 3px; margin-left: 34px; }
.auth-pitch .wordmark { height: 34px; margin-bottom: clamp(8px, 5vh, 56px); align-self: flex-start; }
.auth-pitch h1 { font-size: clamp(38px, 5.2vw, 70px); line-height: 0.98; letter-spacing: -0.045em; }
.auth-points { display: grid; gap: 18px; max-width: 54ch; }
.auth-points li { display: flex; gap: 14px; }
.auth-points .icon { margin-top: 3px; color: var(--ink); }
.auth-points strong { display: block; font-weight: 640; }
.auth-points span { color: var(--muted); font-size: 14.5px; }
.auth-panel { grid-area: panel; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: clamp(20px, 4vw, 56px); }
.auth-form { width: min(420px, 100%); display: flex; flex-direction: column; gap: 16px; padding: clamp(22px, 3vw, 34px); border-radius: 22px; background: var(--raised); box-shadow: var(--lift); }
.auth-title { font-size: 24px; font-weight: 640; letter-spacing: -0.03em; }
.auth-note { font-size: 13px; color: var(--muted); }
.auth-note a { color: var(--ink); text-underline-offset: 3px; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12.5px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-switch { font-size: 13.5px; color: var(--faint); }

/* --- The page about Thoughtropy, below the sign-in (js/landing.js) --------------------------- */
.auth-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.auth-see { color: var(--ink); font-size: 14.5px; font-weight: 600; }
.landing { --gutter: clamp(20px, 6vw, 88px); display: flex; flex-direction: column; gap: clamp(88px, 12vw, 160px); padding: clamp(56px, 8vw, 112px) var(--gutter) 48px; overflow-x: clip; }
.landing h2 { font-size: clamp(30px, 3.6vw, 50px); font-weight: 640; line-height: 1.02; letter-spacing: -0.04em; }
.landing p { line-height: 1.6; }
.land-text { display: flex; flex-direction: column; gap: 16px; max-width: 46ch; }
.land-text p { color: var(--muted); font-size: 16.5px; }
.land-link { align-self: flex-start; color: var(--ink); font-weight: 600; text-underline-offset: 4px; }
.land-section { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.45fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
/* A screenshot runs off the right edge of the page, like a sheet laid on the floor. */
.land-section > .shot { margin-right: calc(-1 * var(--gutter)); }
.land-section > .shot .shot-img { border-radius: 16px 0 0 16px; }
.shot { position: relative; }
.shot-img { display: block; width: 100%; height: auto; border-radius: 16px; background: var(--surface);
  box-shadow: 0 1px 2px rgb(15 16 19 / 8%), 0 24px 60px -24px rgb(15 16 19 / 35%); outline: 1px solid var(--line); outline-offset: -1px; }
.shot-light { display: block; }
.shot-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .shot-light { display: none; }
  :root:not([data-theme="light"]) .shot-dark { display: block; }
}
:root[data-theme="dark"] .shot-light { display: none; }
:root[data-theme="dark"] .shot-dark { display: block; }
:root[data-theme="dark"] .shot-img { box-shadow: 0 24px 60px -24px rgb(0 0 0 / 70%); }
.land-wide { display: flex; flex-direction: column; gap: 24px; }
.land-wide-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 5vw, 80px); align-items: end; }
.land-wide-head p { color: var(--muted); font-size: 17px; max-width: 52ch; }
.land-caption { font-size: 13px; color: var(--faint); }
.land-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 3vw, 40px); padding-top: 22px; border-top: 1px solid var(--line); }
.land-facts li { color: var(--muted); font-size: 15px; line-height: 1.55; }
.land-facts strong { color: var(--ink); font-weight: 640; }
.land-more { color: var(--muted); font-size: 15px; }
.land-commands { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.land-commands p { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); }
.land-commands code { font: 600 15px var(--mono); color: var(--ink); background: none; padding: 0; overflow-wrap: anywhere; }
.land-commands span { color: var(--muted); font-size: 15px; }
.land-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.land-phones { display: flex; justify-content: center; gap: clamp(14px, 3vw, 36px); }
.land-phones .shot { width: min(300px, 44%); }
.land-phones .shot:nth-child(2) { margin-top: clamp(32px, 6vw, 80px); }
.shot-phone .shot-img { border-radius: 30px; }
.land-plans { display: flex; flex-direction: column; gap: 28px; }
.land-plan-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 4vw, 56px); }
.land-plan { display: flex; flex-direction: column; gap: 8px; padding-top: 18px; border-top: 2px solid var(--ink); }
.land-plan h3 { font-size: 19px; font-weight: 640; letter-spacing: -0.02em; }
.land-plan .land-price { color: var(--ink); font-weight: 600; }
.land-plan p { color: var(--muted); font-size: 15px; }
.land-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; padding-top: 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.land-foot a { color: var(--ink); text-underline-offset: 3px; }
.land-foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.land-foot .land-link { font-weight: 500; }
@media (max-width: 860px) {
  .land-section, .land-wide-head { grid-template-columns: minmax(0, 1fr); }
  /* The phone shows the app's phone screens, standing on their own rather than running off the edge. */
  .land-section > .shot, .land-wide > .shot { width: min(320px, 80%); margin-right: 0; justify-self: center; align-self: center; }
  .land-section > .shot .shot-img, .land-wide > .shot .shot-img { border-radius: 28px; }
  .land-facts, .land-plan-list { grid-template-columns: minmax(0, 1fr); }
  .land-commands p { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
.captcha { margin-top: 12px; min-height: 0; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; grid-template-areas: "pitch" "panel" "points"; align-content: start; }
  .auth-pitch { padding-bottom: 12px; }
  .auth-points-wrap { padding-top: 28px; }
}

/* --- App frame ----------------------------------------------------------- */

.skip-link { position: fixed; top: 8px; left: 8px; z-index: 80; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: var(--bg); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.top {
  position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: 16px;
  padding: 0 clamp(12px, 2vw, 22px); background: var(--bg); border-bottom: 1px solid var(--line);
}
.top .wordmark { height: 28px; margin-right: clamp(0px, 3vw, 44px); }
.nav-toggle { display: none; margin-left: -6px; }
.search { flex: 1; min-width: 0; max-width: 520px; display: flex; align-items: center; gap: 9px; padding: 0 13px; height: 40px; border: 1px solid transparent; border-radius: 11px; background: var(--surface); color: var(--muted); }
.search:focus-within { outline: 2px solid var(--ink); outline-offset: -1px; background: var(--raised); }
.search-input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--ink); }
.search-input::placeholder { color: var(--faint); }
.account { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 7px; border: 0; border-radius: 11px; background: none; font-weight: 600; font-size: 14px; }
.account:hover { background: var(--surface); }
.account-name { max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); align-items: start; }
.side {
  position: sticky; top: var(--top-h); height: calc(100dvh - var(--top-h)); overflow-y: auto; padding: 16px 14px 16px;
  border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px;
}
.scrim { display: none; }
.side-new { margin-bottom: 12px; min-height: 42px; justify-content: flex-start; padding-left: 12px; }
.side-link { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 10px; text-decoration: none; font-weight: 600; color: var(--muted); }
.side-link:hover { color: var(--ink); background: var(--surface); }
.side-link.is-active { color: var(--ink); background: var(--surface); }
.side-get-app { width: 100%; border: 0; background: none; font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.steps.get-app-steps li::before { color: var(--ink); }
.side-head { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 6px; padding: 0 10px; min-height: 24px; }
.side-list { display: flex; flex-direction: column; gap: 1px; }
.side-session { display: flex; flex-direction: column; padding: 7px 10px; border-radius: 10px; text-decoration: none; }
.side-session:hover { background: var(--surface); }
.side-session.is-active { background: var(--surface); }
.side-session-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-session-meta { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--faint); }
.side-empty { padding: 4px 10px; font-size: 13px; color: var(--faint); }

.view { min-width: 0; padding: clamp(22px, 4vw, 48px) clamp(16px, 4vw, 52px) 120px; outline: none; }
.view > * { max-width: 920px; margin-inline: auto; }
.view > * + * { margin-top: 20px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .account-name { display: none; }
  .account { padding: 0 6px; }
  .top { gap: 8px; }
  /* The search box needs the room on a phone; the mark alone stands for the name. */
  .top .wordmark { margin-right: 0; height: 32px; aspect-ratio: 44 / 56; background-size: auto 100%; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: fixed; z-index: 40; top: var(--top-h); left: 0; bottom: 0; width: min(310px, 88vw); height: auto;
    background: var(--bg); transform: translateX(-102%); transition: transform 180ms ease; visibility: hidden;
  }
  .nav-open .side { transform: none; visibility: visible; box-shadow: var(--shadow); }
  .nav-open .scrim { display: block; position: fixed; z-index: 35; inset: var(--top-h) 0 0 0; background: rgb(15 16 19 / 40%); }
  .side-link, .side-session { padding-block: 10px; }
}

/* --- Pages (hub, library, formed, search) -------------------------------- */

.page { display: flex; flex-direction: column; gap: 30px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head .label { margin-bottom: 10px; }
.page-tools { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.block { display: flex; flex-direction: column; gap: 14px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.callout { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px; border-radius: var(--r-l); background: var(--accent-soft); }
.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: clamp(24px, 8vh, 80px) 0; }
.empty p { color: var(--muted); max-width: 56ch; }
.empty-inline { padding: 28px; border-radius: var(--r-l); background: var(--surface); gap: 8px; }
.empty-inline h2 { font-size: 18px; font-weight: 640; letter-spacing: -0.015em; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 0; border-radius: var(--r-l); background: var(--surface); text-align: left; text-decoration: none; }
.card-link { transition: background 140ms ease, box-shadow 140ms ease, transform 100ms ease-out; }
.card-link:hover { background: var(--raised); box-shadow: var(--lift); }
.card-link:active { transform: scale(0.99); }
.card-start { gap: 12px; padding: 26px; }
.card-start .icon { color: var(--ink); }
.card-title { font-size: 18px; font-weight: 640; letter-spacing: -0.02em; line-height: 1.25; overflow-wrap: anywhere; }
.card-text { color: var(--muted); font-size: 14px; }
.card-next { display: flex; flex-direction: column; gap: 3px; font-size: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.card-meta { margin-top: auto; padding-top: 6px; font-size: 12.5px; color: var(--faint); }

/* What the AI found across the sessions: one tinted panel holding its overview and what follows from it. */
.across { display: flex; flex-direction: column; gap: 26px; padding: clamp(18px, 2.6vw, 28px); border-radius: 20px; background: var(--surface); }
.overview { display: flex; flex-direction: column; gap: 10px; }
.overview-text { font-size: clamp(17px, 1.9vw, 20px); line-height: 1.45; letter-spacing: -0.012em; max-width: 68ch; text-wrap: pretty; }
.ties { display: flex; flex-direction: column; gap: 12px; }
.tie { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--r-l); background: var(--raised); }
.tie.is-done { opacity: 0.7; }
.tie-flow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: stretch; }
.tie-end { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); text-decoration: none; }
.tie-end:hover { background: var(--bg); }
.tie-text { font-weight: 600; overflow-wrap: anywhere; }
.tie-sub { font-size: 13px; color: var(--muted); }
.tie-arrow { align-self: center; color: var(--accent-ink); display: flex; }
.tie-why { color: var(--muted); }
.tie-suggestion { padding: 10px 14px; border-radius: var(--r); background: var(--accent-soft); }
.tie-done { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ok); }
@media (max-width: 620px) {
  .tie-flow { grid-template-columns: minmax(0, 1fr); }
  .tie-arrow { transform: rotate(90deg); justify-self: center; }
}
.themes { display: grid; gap: 14px; }
.themes li { display: flex; flex-direction: column; gap: 2px; }
.themes li > span { color: var(--muted); }
.themes .themes-where { font-size: 12.5px; color: var(--faint); }
.steps { display: grid; gap: 8px; counter-reset: step; }
.steps li { display: flex; gap: 12px; counter-increment: step; }
.steps li::before { content: counter(step) "."; flex: none; width: 1.4em; font-weight: 640; color: var(--accent-ink); font-variant-numeric: tabular-nums; }

/* --- Session ------------------------------------------------------------- */

.session-head { display: flex; flex-direction: column; gap: 12px; }
.session-title-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; }
.session-title { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.session-tools { display: flex; align-items: center; gap: 8px; }
.people-button { display: inline-flex; align-items: center; gap: 0; padding: 4px 6px; border: 0; border-radius: 999px; background: none; }
.people-button .avatar + .avatar { margin-left: -6px; }
.people-button .avatar { box-shadow: 0 0 0 2px var(--bg); }
.people-button .avatar.is-online { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ok); z-index: 1; }
.people-more { margin-left: 6px; font-size: 12.5px; color: var(--muted); }
.session-focus { color: var(--muted); font-size: 16px; max-width: 70ch; white-space: pre-wrap; overflow-wrap: anywhere; }
.presence { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ok); font-weight: 600; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

.composer { border: 1px solid var(--line-strong); border-radius: var(--r-l); background: var(--raised); box-shadow: var(--lift); }
.composer:focus-within { border-color: var(--ink); outline: 1px solid var(--ink); }
.composer-input { border: 0; background: none; padding: 16px 18px 6px; font-size: 16px; }
.composer-input:focus { outline: none; }
.composer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 10px 18px; }

.ai-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; padding: 16px 18px; border-radius: var(--r-l); background: var(--accent-soft); }
.ai-bar-text { flex: 1 1 320px; display: flex; flex-direction: column; gap: 6px; }
.ai-bar .button-accent { background: var(--raised); }
.ai-summary.is-empty { color: var(--muted); font-size: 14px; }
.ai-when { color: var(--faint); font-size: 12.5px; }

.directions { display: flex; flex-direction: column; gap: 10px; }
.directions-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.ghost { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 14px; background: var(--accent-soft); }
.ghost-label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 640; color: var(--accent-ink); }
.ghost-body { font-weight: 600; overflow-wrap: anywhere; }
.ghost-why { font-size: 13.5px; color: var(--muted); }
.ghost-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ghost .button { background: var(--raised); }
.ghost .button-quiet { background: transparent; }

.ideas { display: flex; flex-direction: column; gap: 14px; }
.idea { display: flex; flex-direction: column; gap: 8px; min-width: 0; scroll-margin-top: calc(var(--top-h) + 16px); }
.idea-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 14px; background: var(--surface); }
/* A formed idea is one that has been built on enough: it gets the ink outline. */
.idea.is-formed > .idea-card { background: var(--raised); box-shadow: inset 0 0 0 1.5px var(--ink); }
.idea.is-fresh > .idea-card { animation: arrive 2.4s ease; }
.idea.is-target > .idea-card { animation: arrive 3s ease; }
@keyframes arrive { 0%, 35% { background: var(--mark); } }
.idea-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12.5px; color: var(--faint); }
.idea-author { font-weight: 640; color: var(--ink); font-size: 13.5px; }
.idea-body { font-size: 15.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.idea-body a, .item-body a, .session-focus a { color: var(--accent-ink); }
.credit { font-size: 13px; color: var(--muted); padding-top: 8px; border-top: 1px solid var(--line); }
.credit strong { color: var(--ink); font-weight: 640; }
.idea-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.idea-more { margin-left: auto; width: 28px; height: 28px; }
.idea-edit, .reply { display: flex; flex-direction: column; gap: 8px; }
.reply { margin-left: 18px; }
.idea-children { display: flex; flex-direction: column; gap: 8px; margin-left: 14px; padding-left: 16px; border-left: 2px solid var(--line); }
@media (max-width: 620px) {
  .idea-children { margin-left: 4px; padding-left: 10px; }
  .reply { margin-left: 4px; }
  /* Past five levels a phone has no room left, so deeper builds stop stepping in. */
  .idea-children .idea-children .idea-children .idea-children .idea-children .idea-children { margin-left: 0; padding-left: 0; border-left: 0; }
  .composer-bar .hint { display: none; }
  .composer-bar { justify-content: flex-end; }
}

.people { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.people li { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.people-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.people-role { font-size: 12.5px; color: var(--faint); }

/* --- Library ------------------------------------------------------------- */

.filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tab, .tag-filter { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 0; border-radius: 999px; background: var(--surface); font-size: 13.5px; font-weight: 600; color: var(--muted); }
.tab:hover, .tag-filter:hover { color: var(--ink); background: var(--raised); }
.tab.is-active, .tag-filter.is-active { background: var(--ink); color: var(--bg); }
.tab-count { font-size: 12px; font-variant-numeric: tabular-nums; opacity: 0.7; }
.filter-input { width: min(240px, 100%); padding: 6px 12px; font-size: 14px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-filter { font-weight: 500; font-size: 13px; padding: 3px 10px; background: none; box-shadow: inset 0 0 0 1px var(--line-strong); }
.tag-filter.is-active { box-shadow: none; }
.file-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px; border-radius: var(--r); background: var(--accent-soft); font-size: 14px; }
.file-bar > span { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-ink); font-weight: 500; }
/* What an AI tool saved, waiting for the person to keep it. Orange marks it as the AI's. */
.tab.tab-ai:not(.is-active) { background: var(--accent-soft); color: var(--accent-ink); }
.item-review { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.item.is-held .item-kind { color: var(--accent-ink); }
.items { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; padding: 16px 4px; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--top-h) + 16px); }
.item.is-editing { display: block; padding: 18px; border: 0; border-radius: var(--r-l); background: var(--surface); margin: 10px 0; }
.item.is-target { animation: arrive 3s ease; }
.item-kind { color: var(--muted); padding-top: 3px; }
.item-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.item-title { font-size: 16px; font-weight: 640; letter-spacing: -0.012em; line-height: 1.3; overflow-wrap: anywhere; }
.item-title a { text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.item-title a:hover { text-decoration-color: var(--ink); }
.item-host { font-size: 12.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; }
.item-body { color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.item-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.item-time, .item-pending { font-size: 12.5px; color: var(--faint); }
.item-pending { color: var(--accent-ink); }
.item-actions { display: flex; align-items: flex-start; opacity: 0.6; transition: opacity 120ms ease; }
.item:hover .item-actions, .item:focus-within .item-actions { opacity: 1; }
.tag-chip { display: inline-flex; align-items: stretch; border-radius: 999px; background: var(--surface); font-size: 12.5px; font-weight: 500; }
.tag-chip.is-active { box-shadow: inset 0 0 0 1.5px var(--ink); }
.tag-chip-name { border: 0; background: none; padding: 2px 4px 2px 10px; }
.tag-chip-name:hover { color: var(--accent-ink); }
.tag-chip-x { display: inline-flex; align-items: center; border: 0; background: none; padding: 0 7px 0 3px; color: var(--faint); }
.tag-chip-x:hover { color: var(--danger); }
.tag-chip-static { padding: 2px 10px; }
@media (max-width: 620px) {
  .item { grid-template-columns: minmax(0, 1fr) auto; }
  .item-kind { display: none; }
  .item-actions { flex-direction: column; opacity: 1; }
}

/* --- Formed ideas -------------------------------------------------------- */

.formed-list { display: flex; flex-direction: column; gap: 16px; }
.formed { display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: 18px; background: var(--surface); }
.formed-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 13px; color: var(--faint); }
.formed-session { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ink); text-underline-offset: 3px; }
.formed-head time { margin-left: auto; }
.formed-body { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; white-space: pre-wrap; overflow-wrap: anywhere; }
.formed-credits { display: flex; flex-wrap: wrap; gap: 16px 40px; padding-top: 14px; border-top: 1px solid var(--line); }
.formed-credit { display: flex; flex-direction: column; gap: 8px; }
.formed-credit-grow { flex: 1 1 280px; }
.bars { display: grid; gap: 6px; }
.bars li { display: grid; grid-template-columns: minmax(90px, 180px) minmax(40px, 1fr) auto; align-items: center; gap: 12px; }
.bars .person { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--ink); }
.bar-count { font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--muted); }
.formed-ai { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--accent-ink); }

/* --- Plans --------------------------------------------------------------- */

.meter { display: block; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter-fill { display: block; height: 100%; max-width: 100%; border-radius: 999px; background: var(--ink); }
.meter-fill.is-full { background: var(--accent); }

.plan-card { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding: 14px; border-radius: 14px; background: var(--surface); text-decoration: none; }
.plan-card:hover, .plan-card.is-active { background: var(--raised); box-shadow: var(--lift); }
.plan-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-card-head .label { color: var(--ink); }
.plan-card-cta { font-size: 12.5px; font-weight: 640; text-decoration: underline; text-underline-offset: 3px; }
.plan-card-text { font-size: 12.5px; color: var(--muted); }
.side-list + .plan-card, .side-empty + .plan-card { margin-top: auto; }
.side > .plan-card { position: sticky; bottom: 0; }

.your-plan { display: flex; flex-direction: column; gap: 20px; padding: 22px; border-radius: 18px; background: var(--surface); }
.your-plan-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.your-plan-name { margin: 6px 0 2px; font-size: 24px; font-weight: 640; letter-spacing: -0.03em; }
.usages { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.usage { display: flex; flex-direction: column; gap: 6px; }
.usage-head { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 600; }
.usage-count { font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--muted); }

.interval { display: inline-flex; align-self: flex-start; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); }
.interval .tab { background: none; }
.interval .tab.is-active { background: var(--ink); }

/* --- Team library -------------------------------------------------------- */

.team-status { color: var(--muted); font-size: 14.5px; }
.team-status .icon { color: var(--ok); vertical-align: -2px; }
.team-usage { max-width: 420px; }
code { padding: 1px 6px; border-radius: 6px; background: var(--surface); font-family: var(--mono); font-size: 0.88em; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: 20px; background: var(--surface); }
.plan.is-featured { background: var(--raised); box-shadow: inset 0 0 0 1.5px var(--ink), var(--lift); }
.plan-flag { position: absolute; top: 18px; right: 18px; padding: 3px 10px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 600; }
.plan-name { font-size: 20px; font-weight: 640; letter-spacing: -0.02em; }
.plan.is-featured .plan-name { padding-right: 96px; }
.plan-blurb { color: var(--muted); font-size: 14px; min-height: 2.9em; }
.plan-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.plan-amount { font-size: 40px; font-weight: 640; letter-spacing: -0.05em; line-height: 1; }
.plan-per { color: var(--muted); font-size: 13.5px; }
.plan-saving { font-size: 13px; font-weight: 600; color: var(--ok); }
.plan-features { display: grid; gap: 8px; margin: 6px 0 12px; flex: 1; align-content: start; font-size: 14.5px; }
.plan-features li { display: flex; gap: 10px; }
.plan-features .icon { margin-top: 4px; color: var(--ink); }
.plan-current { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; font-size: 14px; font-weight: 600; color: var(--muted); }
.plans-note a, .banner a { color: var(--accent-ink); }

/* --- Search -------------------------------------------------------------- */

.results { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.result { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 14px 8px; border-bottom: 1px solid var(--line); border-radius: 0; text-decoration: none; }
.result:hover { background: var(--surface); }
.result-kind { color: var(--muted); padding-top: 2px; }
.result-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.result-where { display: flex; flex-wrap: wrap; align-items: center; gap: 0 5px; font-size: 12.5px; color: var(--faint); white-space: pre-wrap; }
.result-where strong { color: var(--muted); font-weight: 600; }
.result-where .tag { margin-left: 6px; }
.result-title { font-weight: 640; overflow-wrap: anywhere; }
.result-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; overflow-wrap: anywhere; }
.result-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }

/* --- Settings ------------------------------------------------------------ */

.settings { gap: 12px; }
.settings .page-head { margin-bottom: 10px; }
.setting { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px 32px; align-items: start; padding: 22px; border-radius: 18px; background: var(--surface); }
.setting-about h2 { font-size: 16px; font-weight: 640; letter-spacing: -0.015em; }
.setting-about p { margin-top: 4px; color: var(--muted); font-size: 14px; }
.setting > .hint { grid-column: 2; margin-top: -6px; }
.setting > .hint a { color: var(--ink); }
.setting .interval { background: var(--bg); }
.keys { display: grid; gap: 10px; }
.keys li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; }
.keys-combo { flex: none; width: 104px; display: inline-flex; gap: 4px; }
kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 7px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line-strong), 0 1px 0 var(--line-strong); font: 600 12.5px/1 "Mona Sans", sans-serif; }
@media (max-width: 720px) {
  .setting { grid-template-columns: minmax(0, 1fr); }
  .setting > .hint { grid-column: 1; margin-top: 0; }
}

/* --- The hub, and the lists of sessions ------------------------------------ */

.hub { gap: 34px; max-width: 880px; }
.hub h1 { text-wrap: balance; }
.hub-capture .composer-input { font-size: 17px; }
.hub .hub-capture .composer-input { min-height: 96px; padding-top: 18px; }
/* Tabs that are links to a neighbouring page (see placeTabs). Styled like .tabs, named apart. */
.place-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -10px; }
.resume { display: flex; flex-direction: column; gap: 8px; }
.resume-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 18px; align-items: baseline; padding: 16px 20px; border-radius: var(--r-l); background: var(--surface); text-decoration: none; transition: background 140ms ease, box-shadow 140ms ease; }
.resume-row:hover { background: var(--raised); box-shadow: var(--lift); }
.resume-title { font-size: 17px; font-weight: 640; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.resume-text { grid-column: 1; color: var(--muted); font-size: 14.5px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; }
.resume-meta { grid-column: 2; grid-row: 1; font-size: 12.5px; color: var(--faint); white-space: nowrap; }
.hub-nudge { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: var(--r-l); background: var(--accent-soft); }
.hub-nudge p { display: flex; align-items: center; gap: 9px; color: var(--accent-ink); font-size: 14.5px; font-weight: 500; }
.hub-insight { gap: 16px; }
.hub-insight .tie { padding: 0; background: none; box-shadow: none; }
/* Orange is the AI's; a plain link to more sessions is not. */
.hub .block-head .link-button { color: var(--muted); }
@media (max-width: 620px) {
  .resume-row { grid-template-columns: minmax(0, 1fr); }
  .resume-meta { grid-column: 1; grid-row: auto; white-space: normal; }
  .hub-capture .composer-bar .row { width: 100%; }
  .hub-capture .composer-bar .button { flex: 1; }
}

/* --- Skills -------------------------------------------------------------- */

a.tab { text-decoration: none; }
.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 12px; }
.skill-card { gap: 6px; }
.skill-name { font-family: var(--mono); font-size: 12.5px; color: var(--faint); overflow-wrap: anywhere; }
.skill-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.skill-card .chip { background: var(--bg); }
.chip.chip-ai { background: var(--accent-soft); color: var(--accent-ink); }
/* A licence that holds the skill as it is: outlined, so it reads as a limit without borrowing the AI's orange. */
.chip.chip-held { background: none; box-shadow: inset 0 0 0 1px var(--line-strong); }
.skill-card .chip.chip-formed { background: var(--ink); }
.skills-note { max-width: 68ch; font-size: 14.5px; }
.skills-note-row { justify-content: space-between; align-items: flex-start; gap: 12px; }
.skill-sort { gap: 8px; }
.skill-sort .hint { align-self: center; margin-right: 2px; }
/* Starter kits: a set of published skills added in one go. */
.kit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.kit-card { gap: 10px; }
.kit-card > .button { align-self: flex-start; margin-top: auto; }
.kit-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.kit-skills { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.kit-skills a { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--bg); font-size: 13px; font-weight: 500; text-decoration: none; }
.kit-skills a:hover { background: var(--raised); }
.kit-choose { max-height: 260px; overflow-y: auto; gap: 6px; border: 0; padding: 0; margin: 0; }
.skills-note a, .skill-facts a, .skill-match a { color: var(--ink); text-underline-offset: 3px; }

.skill { gap: 22px; }
.skill-back { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-bottom: -6px; font-size: 13.5px; font-weight: 600; color: var(--muted); text-decoration: none; }
.skill-back .icon { transform: scaleX(-1); }
.skill-back:hover { color: var(--ink); }
.skill .page-head h1 { overflow-wrap: anywhere; }
.skill .page-head .chip { margin-top: 10px; }
.skill-facts { padding: 4px 22px; border-radius: var(--r-l); background: var(--surface); }
.skill-fact { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 13px 0; font-size: 14.5px; }
.skill-fact + .skill-fact { border-top: 1px solid var(--line); }
.skill-fact dt { padding-top: 1px; font-size: 13px; font-weight: 600; color: var(--muted); }
.skill-fact dd { margin: 0; overflow-wrap: anywhere; }
.skill-fact code { padding: 0; background: none; font-size: 13.5px; }
.skill-body {
  margin: 0; padding: 22px; max-height: 72vh; overflow: auto; border-radius: var(--r-l); background: var(--raised);
  font: 13.5px/1.62 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 2;
}
.skill-proposal { display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: var(--r-l); background: var(--accent-soft); }
.skill-proposal .skill-body { max-height: 46vh; }
.skill-proposal .hint { color: var(--accent-ink); }
.skill-changes { display: grid; gap: 6px; padding-left: 20px; list-style: disc; font-size: 14.5px; }
.skill-match .stack { gap: 8px; min-width: 0; }
.skill-match p { overflow-wrap: anywhere; }

.skill-form { max-width: 860px; }
.skill-form-top { align-items: flex-start; }
.skill-form-top .input, .skill-form-sort .input { min-height: 44px; }
.skill-form-sort { align-items: flex-start; }
.skill-form-top > .field:last-child { width: 230px; }
.skill-form-top .field:last-child .input, .skill-editor { font-family: var(--mono); font-size: 13.5px; }
.skill-editor { min-height: 320px; line-height: 1.62; }
.skill-source { margin: 0; padding: 20px 22px; border: 0; border-radius: var(--r-l); background: var(--surface); min-width: 0; }
.skill-source legend { float: left; width: 100%; padding: 0; font-size: 15px; }
.skill-source legend + * { clear: both; }
.skill-source .field:last-child:not(.field-grow) { min-width: 180px; }
@media (max-width: 620px) {
  .skill-fact { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .skill-form-top > .field:last-child { width: 100%; }
  .skill-body { padding: 16px; }
}

/* --- Connections ---------------------------------------------------------- */

.setting-about p + p { margin-top: 8px; }
.key-list { display: flex; flex-direction: column; gap: 8px; }
.key { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 16px; border-radius: var(--r); background: var(--bg); }
.key-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.key-name { font-weight: 640; overflow-wrap: anywhere; }
.key-meta { font-size: 13px; color: var(--faint); }
.key-meta code { padding: 0; background: none; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; color: var(--muted); cursor: pointer; }
.check input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); }
.check strong { color: var(--ink); font-weight: 600; }
.recipe { min-width: 0; }
.recipe-steps { display: grid; gap: 6px; padding-left: 20px; list-style: decimal; font-size: 14.5px; color: var(--muted); }
.recipe-code { display: flex; align-items: flex-start; gap: 8px; padding: 12px; border-radius: var(--r); background: var(--bg); }
.setting .recipe-code { background: var(--bg); }

/* Invitations by handle: a count on Co-work, and the list on its page. Ink, not orange. */
.side-count { margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 640; text-align: center; }
.tab-link { position: relative; }
.tab-count { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 17px; padding: 0 5px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 11px; font-weight: 640; line-height: 17px; text-align: center; }
.invites { display: flex; flex-direction: column; gap: 8px; }
.invite { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 16px; border-radius: var(--r-l); background: var(--surface); }
.invite-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.invite-title { font-weight: 640; overflow-wrap: anywhere; }
.people-handle { color: var(--muted); font-weight: 500; }
.invite-form .row .button { flex: none; }

/* The handle field (settings.js): an @ in front of the box. */
.handle-field { position: relative; flex: 1 1 220px; display: flex; }
.handle-field .input { padding-left: 30px; }
.handle-at { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.handle-state.is-taken, .handle-state.is-reserved { color: var(--danger, var(--ink)); }
.handle-state.is-ok, .handle-state.is-yours { color: var(--ink); }

/* "Test my connection" (connections.js) */
.conn-test { display: grid; gap: 10px; }
.conn-test > p { margin: 0; }
.conn-test .banner { margin: 0; }
.conn-test-wait { display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--muted); margin-right: auto; }
.conn-test-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); animation: conn-wait 1.4s ease-in-out infinite; }
@keyframes conn-wait { 0%, 100% { opacity: 0.25; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .conn-test-dot { animation: none; opacity: 0.6; } }
.conn-test-tips { display: grid; gap: 6px; padding-left: 20px; list-style: disc; font-size: 14.5px; color: var(--muted); margin: 0; }
.dialog .recipe-code { background: var(--surface); }
.recipe-code pre { flex: 1; min-width: 0; margin: 0; font: 12.5px/1.55 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.recipe-code .button { flex: none; }

/* An AI tool asking to connect (#/connect/<id>) */
.connect .page-head h1 { overflow-wrap: anywhere; }
.connect-card { max-width: 620px; gap: 20px; padding: 24px; border-radius: 18px; background: var(--surface); }
.connect-card .lede { color: var(--ink); }
.connect-facts { display: grid; gap: 4px; font-size: 15px; overflow-wrap: anywhere; }
.connect-heading { margin-bottom: 8px; font-size: 13px; font-weight: 640; color: var(--muted); }
.connect-list { display: grid; gap: 6px; font-size: 15px; }
.connect-list li { display: flex; align-items: flex-start; gap: 10px; }
.connect-list svg { flex: none; margin-top: 3px; }
.connect-list-not { color: var(--muted); }
.connect-actions { padding-top: 4px; }

/* --- The bar along the bottom of a phone --------------------------------- */

.tabbar { display: none; }
@media (max-width: 860px) {
  .tabbar {
    position: fixed; z-index: 32; left: 0; right: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line);
  }
  .tab-link { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px 5px; border-radius: 11px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-decoration: none; }
  .tab-link.is-active { color: var(--ink); background: var(--surface); }
  .view { padding-bottom: 150px; }
  .toasts { bottom: 82px; }
}

/* Fingers need bigger targets than a mouse pointer does. */
@media (pointer: coarse) {
  .button { min-height: 44px; }
  .button-small { min-height: 36px; }
  .icon-button { width: 40px; height: 40px; }
  .tab { padding-block: 8px; }
  .menu-item { padding-block: 11px; }
}

/* --- Co-work, agent rooms and guides --------------------------------------- */

/* The lower menu: places you visit now and then. */
.side-more { display: flex; flex-direction: column; gap: 1px; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.side-more .side-link { font-weight: 560; padding-block: 6px; }

/* A place's short guide, which a person can put away. */
.guide-note { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 10px 14px 18px; border-radius: var(--r-l); background: var(--surface); font-size: 14.5px; }
.guide-note-text { display: flex; flex-direction: column; gap: 4px; }
.guide-note-title { display: flex; align-items: center; gap: 7px; font-weight: 640; }
.guide-note-text p:last-child { color: var(--muted); max-width: 72ch; }
.guide-note a { color: var(--ink); }

/* The steps for bringing agents in. */
.guide-steps { display: flex; flex-direction: column; gap: 6px; counter-reset: none; }
.guide-step { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: var(--r-l); background: var(--surface); }
.guide-step-head { display: flex; align-items: center; gap: 10px; }
.guide-step-head h3 { font-size: 15.5px; font-weight: 640; letter-spacing: -0.01em; }
.guide-step-n { font-weight: 640; color: var(--faint); font-variant-numeric: tabular-nums; }
.guide-step-mark { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.guide-step-mark.is-done { background: var(--ink); color: var(--bg); box-shadow: none; }
.guide-step-body { display: flex; flex-direction: column; gap: 10px; padding-left: 30px; color: var(--muted); font-size: 14.5px; }
.guide-step-body > p { max-width: 70ch; }
.guide-step-body a:not(.button) { color: var(--ink); }
.guide-step-body .button { align-self: flex-start; }
.guide-step-body .recipe-code { background: var(--bg); }
.guide-step-body code { font: 12.5px var(--mono); }

/* Co-work */
.cowork-section { display: flex; flex-direction: column; gap: 12px; }
.cowork-agents-head { display: flex; flex-direction: column; gap: 6px; }
.cowork-agents-head p { color: var(--muted); max-width: 70ch; }
.room-badge { display: inline-flex; align-items: center; gap: 5px; margin-left: 10px; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 600; letter-spacing: 0; vertical-align: 2px; }

/* A session's Ideas and Room tabs */
.session-head + .place-tabs { margin-top: 2px; }

/* The room */
.room { display: flex; flex-direction: column; gap: 22px; }
.room-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding: 20px 22px; border-radius: var(--r-l); background: var(--surface); }
.room-status-text { display: flex; flex-direction: column; gap: 4px; max-width: 62ch; }
.room-status-text h2 { font-size: 18px; font-weight: 640; letter-spacing: -0.015em; }
.room-status-text p { color: var(--muted); font-size: 14.5px; }
.room-guide { display: flex; flex-direction: column; gap: 12px; }
.room-claims ul { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.room-claims li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--surface); font-size: 13.5px; }
.room-task { font: 600 12.5px var(--mono); color: var(--ink); }
.room-thread { display: flex; flex-direction: column; gap: 8px; }
.room-post { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 12px 44px 14px 16px; border-radius: var(--r-l); background: var(--surface); }
/* What an agent wrote sits on the accent tint, as everything the AI makes does. */
.room-post.is-agent { background: var(--accent-soft); }
.room-post.is-decision { box-shadow: inset 3px 0 0 var(--ink); }
.room-post-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; }
.room-kind { padding: 1px 8px; border-radius: 999px; background: var(--raised); font-weight: 640; font-size: 12px; }
.room-post.is-agent .room-kind { background: color-mix(in srgb, var(--bg) 60%, transparent); }
.room-kind-decision { background: var(--ink) !important; color: var(--bg); }
.room-author { font-weight: 640; }
.room-tool { font-weight: 500; color: var(--muted); }
.room-when { color: var(--faint); }
.room-more { position: absolute; top: 7px; right: 8px; width: 30px; height: 30px; }
.room-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.5; }
.room-composer { border: 1px solid var(--line-strong); border-radius: var(--r-l); background: var(--raised); box-shadow: var(--lift); }
.room-composer .room-kinds { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 12px 0; }
.room-composer textarea { border: 0; background: none; box-shadow: none; resize: none; padding: 12px 16px; }
.room-foot a { color: var(--ink); }
/* GitHub in the room: the repositories it follows, and GitHub's notices (not AI, so no tint). */
.room-github { display: flex; flex-direction: column; gap: 10px; }
.room-github-text { display: flex; flex-direction: column; gap: 4px; }
.room-repos { display: flex; flex-direction: column; gap: 6px; }
.room-repos li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 8px 8px 14px; border-radius: var(--r); background: var(--surface); }
.room-repo-name { font: 600 13.5px var(--mono); margin-right: auto; overflow-wrap: anywhere; }
.room-post.is-github { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }
.repo-choices { display: flex; flex-direction: column; gap: 10px; max-height: 46vh; overflow: auto; border: 0; padding: 0; margin: 0; }
.repo-choices legend { margin-bottom: 8px; }
.repo-pick-hint .link-button { color: var(--ink); font-size: inherit; }

/* Help */
.help-topic { display: flex; flex-direction: column; gap: 10px; max-width: 72ch; scroll-margin-top: 80px; }
.help-topic h2 { font-size: 20px; font-weight: 640; letter-spacing: -0.02em; }
.help-topic p { color: var(--muted); }
.help-topic a { color: var(--ink); }
.help-strong { color: var(--ink) !important; font-weight: 640; margin-top: 4px; }
.help-list { display: flex; flex-direction: column; gap: 6px; padding-left: 20px; list-style: disc; color: var(--muted); }

@media (max-width: 620px) {
  .guide-step-body { padding-left: 0; }
  .room-status { padding: 16px; }
  .room-badge { margin-left: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* --- Cars (Library tab; cars.js): what the person keeps in Autropy, read only. Not AI, so no orange. --- */
.cars-list { display: flex; flex-direction: column; gap: 14px; }
.car { display: flex; flex-direction: column; gap: 16px; padding: 20px 22px; border-radius: var(--r-l); background: var(--surface); }
.car-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; }
.car-head h2 { font-size: 20px; font-weight: 640; letter-spacing: -0.02em; }
.car-group { display: flex; flex-direction: column; gap: 6px; }
.car-rows { display: flex; flex-direction: column; }
.car-row { padding: 10px 0; border-top: 1px solid var(--line); }
.car-row-main { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; }
.car-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.car-picker { margin-top: -4px; }
.car-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.car-tile { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 12px 14px; border-radius: var(--r); background: var(--bg); }
.car-tile-value { font-size: 17px; font-weight: 640; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.car-tile .meter { margin-top: 4px; }
.car-group-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.car-see-all { font-size: 13px; color: var(--muted); }
.car-overview { display: flex; flex-direction: column; gap: 18px; }
.car-detail { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding: 14px 16px; border-radius: var(--r); background: var(--bg); line-height: 1.55; }
.car-diagnosis { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: var(--r); background: var(--accent-soft); }
.car-diagnosis-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.car-safe { background: var(--surface); color: var(--ink); }
.car-safe-no { box-shadow: inset 0 0 0 1px var(--ink); }
.car-list { display: flex; flex-direction: column; gap: 6px; padding-left: 1.3em; }
.car-decoded { list-style: none; padding-left: 0; }
.car-code-group { margin-right: 12px; }
.car-safety { padding-left: 10px; box-shadow: inset 2px 0 0 var(--ink); }
.car-message { overflow-wrap: anywhere; white-space: pre-line; }
.car-message-ai { padding: 8px 12px; border-radius: var(--r); background: var(--accent-soft); }
.car-ask { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 16px; border-radius: var(--r); background: var(--bg); }
.car-ask p { flex: 1 1 320px; }
@media (max-width: 720px) {
  .car-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.car-row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.car-row-title { font-weight: 600; overflow-wrap: anywhere; }
.car-code { font: 600 13px var(--mono); padding: 1px 6px; margin-right: 6px; border-radius: 6px; background: var(--bg); }
.car-detail .car-code, .car-tile .car-code { background: var(--surface); }

/* Prompts (Skills, Prompts tab): ready-made prompts for connected AI tools. */
.prompt-list { display: flex; flex-direction: column; gap: 10px; }
.prompt-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; padding: 16px 18px; border-radius: var(--r-l); background: var(--surface); }
.prompt-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 320px; }
.prompt-text h2 { font-size: 16px; font-weight: 640; letter-spacing: -0.01em; }
.prompt-text p { color: var(--muted); font-size: 14.5px; }
.prompt-text code { font: 600 12.5px var(--mono); overflow-wrap: anywhere; }
