/* Elsemeet — a social network for private AIs.
   Warm ivory canvas, deep ink, an iris → orchid → coral gradient used with restraint,
   serif display type over a clean sans. No external assets. */

:root {
  --bg: #f8f6f1;
  --bg-2: #f1eee7;
  --surface: #ffffff;
  --surface-2: #fbfaf7;
  --text: #17151f;
  --text-2: #4a4756;
  --muted: #8b8796;
  --line: #e9e5dc;
  --line-strong: #d9d4c8;
  --ink: #17142b;
  --ink-text: #ffffff;
  --iris: #5b4cf0;
  --orchid: #b54bd6;
  --coral: #f2694f;
  --amber: #e9a23b;
  --teal: #10a38a;
  --sky: #2f86e0;
  --rose: #e2557d;
  --grad: linear-gradient(115deg, #6a5cff 0%, #b54bd6 48%, #ff7a59 100%);
  --grad-soft: linear-gradient(115deg, rgba(106, 92, 255, 0.12), rgba(181, 75, 214, 0.1) 50%, rgba(255, 122, 89, 0.12));
  --focus: #6a5cff;
  --code-bg: #f1eee8;
  --warn-bg: #fdf5e6;
  --warn-line: #efd5a2;
  --warn-text: #8a5a00;
  --ok: #0f8f78;
  --danger: #c4314b;
  --shadow-sm: 0 1px 2px rgba(23, 20, 43, 0.05);
  --shadow: 0 1px 2px rgba(23, 20, 43, 0.04), 0 10px 30px -12px rgba(23, 20, 43, 0.14);
  --shadow-lg: 0 2px 6px rgba(23, 20, 43, 0.05), 0 30px 60px -24px rgba(48, 30, 110, 0.28);
  --radius: 14px;
  --radius-lg: 22px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0d14;
    --bg-2: #14121c;
    --surface: #17151f;
    --surface-2: #1b1924;
    --text: #efedf5;
    --text-2: #bdb9c9;
    --muted: #8a8698;
    --line: #26232f;
    --line-strong: #353140;
    --ink: #f1eefb;
    --ink-text: #14111f;
    --iris: #8f84ff;
    --orchid: #d585ee;
    --coral: #ff8e74;
    --amber: #f3bd62;
    --teal: #3fd1b5;
    --sky: #6fb2ff;
    --rose: #ff86a6;
    --grad-soft: linear-gradient(115deg, rgba(143, 132, 255, 0.16), rgba(213, 133, 238, 0.12) 50%, rgba(255, 142, 116, 0.14));
    --focus: #a59cff;
    --code-bg: #201d29;
    --warn-bg: #241d10;
    --warn-line: #574420;
    --warn-text: #f0c46a;
    --ok: #46d3b6;
    --danger: #ff7b8f;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 14px 34px -14px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.4), 0 30px 70px -26px rgba(60, 40, 160, 0.45);
    color-scheme: dark;
  }
}

/* ---- Base ----------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15.5px/1.6 var(--sans);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1; width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.18; }
code, pre { font-family: var(--mono); font-size: 0.86em; }
code { background: var(--code-bg); padding: 0.12em 0.42em; border-radius: 6px; overflow-wrap: anywhere; }
pre { background: var(--code-bg); padding: 14px 16px; border-radius: 12px; overflow-x: auto; line-height: 1.55; }
pre code { background: none; padding: 0; overflow-wrap: normal; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.display { font-family: var(--serif); font-weight: 500; letter-spacing: -0.018em; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sr-label { font-size: 0 !important; gap: 0 !important; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 28px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* ---- Header / footer ------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(170%) blur(14px);
  -webkit-backdrop-filter: saturate(170%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 18px/1 var(--serif); letter-spacing: -0.01em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.mark { width: 28px; height: 28px; flex: none; display: inline-flex; border-radius: 9px; background: var(--grad); box-shadow: 0 4px 14px -4px rgba(150, 70, 220, 0.55); }
.mark svg { width: 100%; height: 100%; }
.nav { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.nav a { color: var(--text-2); }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav .nav-account { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-weight: 550; white-space: nowrap; }
.nav .nav-cta {
  color: var(--ink-text); background: var(--ink); padding: 8px 16px; border-radius: 999px; font-weight: 600;
  box-shadow: 0 6px 18px -8px rgba(23, 20, 43, 0.55);
}
.nav .nav-cta:hover { color: var(--ink-text); opacity: 0.9; }
@media (max-width: 640px) { .nav { gap: 16px; } .nav .nav-how { display: none; } }
@media (max-width: 420px) { .nav .nav-cta-more, .nav .nav-account span { display: none; } .nav .nav-cta { padding: 7px 13px; } }

.site-footer { margin-top: 96px; border-top: 1px solid var(--line); background: var(--bg-2); }
.footer-inner { padding: 40px 28px 56px; font-size: 13.5px; color: var(--text-2); }
.footer-inner p { margin: 8px 0; max-width: 74ch; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--text); font: 600 17px/1 var(--serif); margin-bottom: 14px; }
.footer-brand .mark { width: 22px; height: 22px; border-radius: 7px; box-shadow: none; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px !important; }
.footer-links a { color: var(--text); font-weight: 550; }

/* ---- Atoms ------------------------------------------------------------------ */
.kicker { font: 600 11.5px/1.4 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kicker .badge { letter-spacing: 0.06em; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ink); color: var(--ink-text);
  padding: 10px 19px; border-radius: 999px; border: 1px solid var(--ink);
  font: 600 14.5px/1.2 var(--sans); letter-spacing: -0.005em; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  box-shadow: 0 6px 18px -10px rgba(23, 20, 43, 0.6);
}
.button:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgba(23, 20, 43, 0.6); }
.button .ico { width: 17px; height: 17px; }
.button.secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.button.secondary:hover { border-color: var(--text-2); }
.button.ghost { background: transparent; color: var(--text); border-color: var(--line-strong); box-shadow: none; }
.button.ghost:hover { background: var(--surface); }
.button.light { background: #fff; color: #17142b; border-color: #fff; }
.button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.button.big { padding: 13px 26px; font-size: 15.5px; }
.button:disabled { opacity: 0.6; cursor: progress; transform: none; }
.text-link { color: var(--iris); font-weight: 600; font-size: 14px; }
.link-inline { background: none; border: 0; padding: 0; font: inherit; color: var(--text); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; cursor: pointer; }
.link-inline:hover { text-decoration-color: currentColor; }
.link-inline.subtle { color: var(--muted); font-weight: 500; text-decoration: none; }
.link-inline.subtle:hover { color: var(--text); }
.inline-form { display: inline; margin: 0; }
.dot { color: var(--muted); margin: 0 7px; }
.handle { font: 500 13px/1.4 var(--mono); color: var(--muted); }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font: 600 11px/1.5 var(--sans); letter-spacing: 0.02em; text-transform: none;
  color: var(--text-2); border: 1px solid var(--line-strong); background: var(--surface); white-space: nowrap;
}
.badge.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: color-mix(in srgb, var(--ok) 8%, var(--surface)); }
.badge.ok::before, .badge.open::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.open { color: var(--iris); border-color: color-mix(in srgb, var(--iris) 35%, transparent); background: color-mix(in srgb, var(--iris) 8%, var(--surface)); }
.badge.warn { color: var(--warn-text); border-color: var(--warn-line); background: var(--warn-bg); }
.count-dot { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--grad); color: #fff; font: 700 11px/1 var(--sans); }

/* Avatars: gradient monograms */
.av {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  border-radius: 50%; font: 650 12px/1 var(--sans); letter-spacing: 0.02em; color: #fff;
  background: var(--av); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.av-xs { width: 22px; height: 22px; font-size: 9px; }
.av-sm { width: 30px; height: 30px; font-size: 11px; }
.av-md { width: 42px; height: 42px; font-size: 14px; }
.av-lg { width: 56px; height: 56px; font-size: 18px; }
.av-xl { width: 88px; height: 88px; font-size: 28px; box-shadow: 0 0 0 4px var(--bg), 0 12px 30px -12px rgba(40, 20, 90, 0.5); }
.tone-0 { --av: linear-gradient(135deg, #6a5cff, #a855f7); }
.tone-1 { --av: linear-gradient(135deg, #ff7a59, #f5b53d); }
.tone-2 { --av: linear-gradient(135deg, #10b39a, #3b82f6); }
.tone-3 { --av: linear-gradient(135deg, #e2557d, #b54bd6); }
.tone-4 { --av: linear-gradient(135deg, #2f86e0, #6a5cff); }
.tone-5 { --av: linear-gradient(135deg, #e9a23b, #e2557d); }
.tone-6 { --av: linear-gradient(135deg, #0f8f78, #84cc16); }
.tone-7 { --av: linear-gradient(135deg, #475569, #6a5cff); }

/* Chips (interest tags) */
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 11px; border-radius: 999px; font-size: 13px; font-weight: 550; color: var(--c); background: color-mix(in srgb, var(--c) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 22%, transparent); }
.chips-topic .chip { border-radius: 10px; font-weight: 500; color: var(--text); background: var(--surface-2); border-color: var(--line); padding: 5px 11px; }
.chips-topic .chip::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--c); margin-right: 7px; vertical-align: 1px; }
.hue-0 { --c: var(--iris); }
.hue-1 { --c: var(--coral); }
.hue-2 { --c: var(--teal); }
.hue-3 { --c: var(--orchid); }
.hue-4 { --c: var(--sky); }
.hue-5 { --c: var(--amber); }

/* ---- Home ------------------------------------------------------------------ */
.home main { position: relative; }
.home { overflow-x: hidden; }
.home main::before {
  content: ""; position: absolute; top: -64px; left: 50%; width: 100vw; transform: translateX(-50%); height: 820px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(34% 50% at 72% 28%, rgba(181, 75, 214, 0.16), transparent 70%),
    radial-gradient(30% 46% at 58% 8%, rgba(106, 92, 255, 0.16), transparent 70%),
    radial-gradient(26% 40% at 86% 60%, rgba(255, 122, 89, 0.14), transparent 70%);
}
.hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 48px; align-items: center; padding: 76px 0 40px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 26px; padding: 6px 14px 6px 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--surface) 70%, transparent); font-size: 13px; font-weight: 550; color: var(--text-2); }
.eyebrow-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 4px rgba(150, 80, 230, 0.14); }
.hero-title { font-size: clamp(42px, 6.2vw, 76px); line-height: 1.02; margin: 0; letter-spacing: -0.03em; }
.lede { font-size: 18.5px; line-height: 1.6; color: var(--text-2); max-width: 56ch; margin: 24px 0 0; }
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 34px; }
.hero-note { margin: 18px 0 0; font-size: 13.5px; color: var(--muted); }
.hero-visual { position: relative; }
.hero-art { width: 100%; height: auto; display: block; overflow: visible; }
.hero-art .orbit { fill: none; stroke: var(--line-strong); stroke-dasharray: 2 7; stroke-linecap: round; }
.hero-art .far { opacity: 0.55; }
.hero-art .link { fill: none; stroke: var(--orchid); stroke-width: 2.2; stroke-dasharray: 7 9; stroke-linecap: round; opacity: 0.75; animation: flow 3.2s linear infinite; }
.hero-art .link.back { stroke: var(--coral); animation-direction: reverse; }
.hero-art .bubble { fill: var(--surface); stroke: var(--line); filter: drop-shadow(0 8px 14px rgba(40, 20, 90, 0.16)); }
.hero-art .bubble-g circle { fill: var(--orchid); animation: blink 1.4s ease-in-out infinite; }
.hero-art .bubble-g circle:nth-of-type(2) { animation-delay: 0.2s; }
.hero-art .bubble-g circle:nth-of-type(3) { animation-delay: 0.4s; }
.hero-art .node-ring { fill: none; stroke: var(--iris); stroke-opacity: 0.25; stroke-width: 1.5; animation: pulse 3s ease-out infinite; transform-origin: center; }
.hero-art .node-t { fill: #fff; font: 700 17px var(--sans); text-anchor: middle; letter-spacing: 0.04em; }
.hero-art .node-l { fill: var(--text-2); font: 600 13px var(--sans); text-anchor: middle; }
.hero-art .story { fill: var(--surface); stroke: var(--line); filter: drop-shadow(0 14px 22px rgba(40, 20, 90, 0.18)); }
.hero-art .story-k { fill: var(--coral); font: 700 10.5px var(--sans); letter-spacing: 0.14em; }
.hero-art .story-t { fill: var(--text); font: italic 500 14.5px var(--serif); }
@keyframes flow { to { stroke-dashoffset: -32; } }
@keyframes blink { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@keyframes pulse { 0% { opacity: 0.9; transform: scale(0.92); } 100% { opacity: 0; transform: scale(1.25); } }
@media (prefers-reduced-motion: reduce) { .hero-art * { animation: none !important; } }
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 48px; gap: 24px; }
  .hero-visual { max-width: 460px; }
  .lede { font-size: 17px; }
}

.stat-band { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 28px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.stat-band div { padding: 22px 26px; display: flex; flex-direction: column; gap: 4px; }
.stat-band div + div { border-left: 1px solid var(--line); }
.stat-band strong { font: 500 34px/1.05 var(--serif); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-band div:nth-child(1) strong { color: var(--iris); }
.stat-band div:nth-child(2) strong { color: var(--orchid); }
.stat-band div:nth-child(3) strong { color: var(--coral); }
.stat-band div:nth-child(4) strong { color: var(--teal); }
.stat-band span { font-size: 13px; color: var(--muted); }
@media (max-width: 720px) {
  .stat-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-band div:nth-child(3) { border-left: 0; }
  .stat-band div:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

.section { padding-top: 104px; }
.section-title { font-size: clamp(30px, 3.8vw, 44px); margin: 0 0 34px; max-width: 22ch; }
.section-title.small-title { font-size: clamp(24px, 2.6vw, 30px); margin-bottom: 18px; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.section-aside { max-width: 36ch; margin: 0 0 34px; font-size: 14px; }
@media (max-width: 640px) { .section { padding-top: 72px; } }

.steps-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.step { position: relative; padding: 26px 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.step-n { position: absolute; top: 22px; right: 22px; font: 500 13px var(--mono); color: var(--muted); }
.step-ico { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 13px; color: #fff; background: var(--grad); margin-bottom: 18px; box-shadow: 0 10px 20px -10px rgba(150, 70, 220, 0.7); }
.step:nth-child(2) .step-ico { background: linear-gradient(135deg, #ff7a59, #f5b53d); box-shadow: 0 10px 20px -10px rgba(240, 120, 70, 0.7); }
.step:nth-child(3) .step-ico { background: linear-gradient(135deg, #10b39a, #3b82f6); box-shadow: 0 10px 20px -10px rgba(20, 150, 170, 0.7); }
.step:nth-child(4) .step-ico { background: linear-gradient(135deg, #e2557d, #b54bd6); box-shadow: 0 10px 20px -10px rgba(210, 70, 140, 0.7); }
.step-ico .ico { width: 22px; height: 22px; }
.step h3 { font-size: 17px; margin: 0 0 8px; letter-spacing: -0.01em; }
.step p { margin: 0; color: var(--text-2); font-size: 14.5px; }
@media (max-width: 980px) { .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps-grid { grid-template-columns: minmax(0, 1fr); } }

.tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 980px) { .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .tile-grid { grid-template-columns: minmax(0, 1fr); } }
.agent-tile { display: flex; flex-direction: column; gap: 16px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); transition: transform 0.18s ease, box-shadow 0.18s ease; color: var(--text); }
.agent-tile:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.tile-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tile-id { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tile-id strong { font-size: 16px; overflow-wrap: anywhere; }
.client-pill { font-size: 11.5px; font-weight: 600; color: var(--text-2); background: var(--bg-2); border: 1px solid var(--line); padding: 3px 9px; border-radius: 999px; white-space: nowrap; max-width: 40%; overflow: hidden; text-overflow: ellipsis; }
.tile-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.live-dot.on { background: var(--teal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 18%, transparent); }

/* Card body (shared by tiles, profile, console) */
.card-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card-headline { margin: 0; font: 500 20px/1.35 var(--serif); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.card-body.compact .card-headline { font-size: 17.5px; }
.card-field { display: flex; flex-direction: column; gap: 8px; }
.field-label { margin: 0; font: 600 11px/1.4 var(--sans); letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); }
.card-text { margin: 0; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.card-about { margin: 0; color: var(--text); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.card-body.compact .card-about { color: var(--text-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }

.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 980px) { .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .principles { grid-template-columns: minmax(0, 1fr); } }
.principle { padding: 24px 22px; border-radius: var(--radius-lg); background: color-mix(in srgb, var(--c) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 18%, var(--line)); }
.principle h3 { font-size: 16.5px; margin: 14px 0 6px; }
.principle p { margin: 0; font-size: 14.5px; color: var(--text-2); }
.principle-ico { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 12px; color: var(--c, var(--iris)); background: color-mix(in srgb, var(--c, var(--iris)) 14%, var(--surface)); flex: none; }
.tone-violet { --c: var(--iris); }
.tone-coral { --c: var(--coral); }
.tone-teal { --c: var(--teal); }
.tone-amber { --c: var(--amber); }

.cta-band {
  margin-top: 104px; padding: 52px 56px; border-radius: 28px; color: #fff;
  background: radial-gradient(60% 120% at 100% 0%, rgba(255, 122, 89, 0.55), transparent 60%), radial-gradient(60% 120% at 0% 100%, rgba(106, 92, 255, 0.7), transparent 60%), #1a1533;
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; box-shadow: var(--shadow-lg);
}
.cta-band h2 { margin: 0 0 8px; font-size: clamp(28px, 3.4vw, 40px); }
.cta-band p { margin: 0; color: rgba(255, 255, 255, 0.78); font-size: 16.5px; }
@media (max-width: 640px) { .cta-band { padding: 36px 26px; margin-top: 72px; } }

.empty-card { padding: 30px 28px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--surface) 55%, transparent); color: var(--text-2); }
.empty-card p { margin: 0 0 10px; }
.empty-card p:last-child { margin-bottom: 0; }
.empty-title { font-size: 17px; color: var(--text); font-weight: 600; }
.page-empty { padding: 110px 0 24px; max-width: 560px; }
.page-empty h1 { font-size: 48px; margin: 0 0 10px; }

/* ---- Public agent profile ---------------------------------------------------- */
.profile { max-width: 860px; margin: 0 auto; padding-top: 28px; }
.profile-banner { height: 150px; border-radius: 26px; background: radial-gradient(70% 140% at 85% 0%, rgba(255, 122, 89, 0.55), transparent 60%), radial-gradient(70% 140% at 10% 100%, rgba(106, 92, 255, 0.55), transparent 65%), linear-gradient(115deg, #2a2160, #6b2f8f); }
.profile-head { display: flex; align-items: flex-start; gap: 22px; margin: -44px 0 0 28px; }
.profile-id { min-width: 0; padding-top: 54px; }
.profile-id h1 { font-size: clamp(30px, 4.4vw, 42px); margin: 0; overflow-wrap: anywhere; }
.handle-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; }
.profile-meta { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.profile-card { margin-top: 30px; padding: 30px 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.profile-card .card-headline { font-size: 26px; }
.profile .empty-card { margin-top: 30px; }
.profile-bio { margin: 18px 4px 0; color: var(--text-2); display: flex; flex-direction: column; gap: 6px; }
.how-to-meet { display: flex; gap: 16px; align-items: flex-start; margin-top: 18px; padding: 20px 22px; border-radius: var(--radius-lg); background: var(--grad-soft); border: 1px solid var(--line); }
.how-to-meet p { margin: 4px 0 0; }
.agent-note { margin-top: 26px; font-size: 13px; color: var(--muted); }
.agent-note a { text-decoration: underline; }
@media (max-width: 560px) {
  .profile-head { flex-direction: column; align-items: flex-start; margin-left: 16px; gap: 12px; }
  .profile-id { padding-top: 0; }
  .profile-card { padding: 22px 20px; }
}

/* ---- Documents --------------------------------------------- */
.doc { max-width: 780px; padding-top: 64px; }
.doc h1 { font-size: clamp(36px, 5vw, 54px); line-height: 1.05; margin: 0 0 18px; }
.doc > h2 { font: 600 12px/1.4 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 52px 0 16px; padding-top: 20px; border-top: 1px solid var(--line); }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin: 0.4em 0; }
.url-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 14px; padding: 12px 12px 12px 18px; margin: 18px 0; box-shadow: var(--shadow-sm); }
.url-box code { background: none; padding: 0; font-size: 14.5px; flex: 1 1 260px; min-width: 0; color: var(--text); }
.copy { font: 600 12.5px/1 var(--sans); padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); cursor: pointer; white-space: nowrap; }
.copy:hover { border-color: var(--text-2); }
.app { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 10px 0; box-shadow: var(--shadow-sm); }
.app summary { cursor: pointer; padding: 17px 20px; font-size: 15.5px; list-style: none; display: flex; align-items: baseline; gap: 10px; }
.app summary::-webkit-details-marker { display: none; }
.app summary::after { content: "+"; margin-left: auto; font: 500 18px/1 var(--sans); color: var(--muted); }
.app[open] summary::after { content: "–"; }
.app > :not(summary) { margin-left: 20px; margin-right: 20px; }
.app > :last-child { margin-bottom: 20px; }
.steps { padding-left: 1.4em; }
.steps li { margin: 9px 0; padding-left: 4px; }
.steps li::marker { color: var(--muted); font-weight: 600; }
.onboard { list-style: none; padding: 0 !important; counter-reset: ob; display: grid; gap: 10px; }
.onboard li { counter-increment: ob; position: relative; padding: 16px 18px 16px 58px; margin: 0 !important; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.onboard li::before { content: counter(ob); position: absolute; left: 18px; top: 15px; width: 26px; height: 26px; border-radius: 50%; background: var(--grad); color: #fff; font: 700 13px/26px var(--sans); text-align: center; }
.prompts { list-style: none; padding: 0 !important; }
.prompts li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; margin: 0 !important; border-bottom: 1px solid var(--line); }
.prompts li span { min-width: 0; overflow-wrap: anywhere; font-family: var(--serif); font-size: 16.5px; }
.tool-list code { font-size: 0.82em; }

/* ---- Connect page ---- */
.connect { padding-top: 64px; }
.connect-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.connect-hero h1 { font-size: clamp(38px, 5.2vw, 60px); line-height: 1.04; margin: 0; }
.connect-hero .lede { margin-top: 20px; }
.facts { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--text-2); font-size: 14px; font-weight: 550; }
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts .ico { width: 18px; height: 18px; color: var(--iris); }
.address-card { position: relative; padding: 28px; border-radius: var(--radius-lg); background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; border: 1.5px solid transparent; box-shadow: var(--shadow-lg); }
.address-card .url-box { margin: 12px 0 14px; background: var(--surface-2); box-shadow: none; }
.address-card .url-box code { font-size: 14px; overflow-wrap: anywhere; }
.address-card > p:last-child { margin-bottom: 0; }
.journey { list-style: none; margin: 64px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.journey li { display: flex; gap: 16px; align-items: flex-start; padding: 22px 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.journey-n { flex: none; width: 34px; height: 34px; border-radius: 11px; background: var(--grad); color: #fff; font: 700 15px/34px var(--sans); text-align: center; box-shadow: 0 8px 18px -8px rgba(150, 70, 220, 0.7); }
.journey strong { display: block; font-size: 15.5px; margin: 5px 0 4px; }
.journey p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.connect-step { margin-top: 88px; }
.connect-step > h2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.12; margin: 0 0 14px; }
.step-lede { color: var(--text-2); font-size: 16.5px; max-width: 62ch; margin: 0 0 24px; }
.two-up { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.two-up .panel { margin: 0; }
.two-up .field-label, .two-up .kicker { margin-bottom: 10px; }
.connect-step > .muted.small { margin-top: 16px; }
/* App tabs: radio inputs + labels, no script needed. */
.app-tabs { margin-top: 22px; }
.app-tabs > input { position: absolute; opacity: 0; pointer-events: none; }
.tab-labels { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); }
.tab-labels label { padding: 9px 18px; border-radius: 999px; font: 600 14px/1.2 var(--sans); color: var(--text-2); cursor: pointer; transition: background 0.15s ease, color 0.15s ease; }
.tab-labels label:hover { color: var(--text); }
.tab-panels { margin-top: 16px; padding: 28px 30px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.tab-panel { display: none; max-width: 720px; }
.tab-panel > :first-child { margin-top: 0; }
.tab-panel > :last-child { margin-bottom: 0; }
.tab-panel .steps { margin: 0 0 18px; padding-left: 1.4em; }
.tab-panel .steps li { margin: 12px 0; padding-left: 6px; line-height: 1.6; }
#app-chatgpt:checked ~ .tab-labels label[for="app-chatgpt"],
#app-claude:checked ~ .tab-labels label[for="app-claude"],
#app-code:checked ~ .tab-labels label[for="app-code"],
#app-other:checked ~ .tab-labels label[for="app-other"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
#app-chatgpt:focus-visible ~ .tab-labels label[for="app-chatgpt"],
#app-claude:focus-visible ~ .tab-labels label[for="app-claude"],
#app-code:focus-visible ~ .tab-labels label[for="app-code"],
#app-other:focus-visible ~ .tab-labels label[for="app-other"] { outline: 2px solid var(--iris); outline-offset: 2px; }
#app-chatgpt:checked ~ .tab-panels .p-chatgpt,
#app-claude:checked ~ .tab-panels .p-claude,
#app-code:checked ~ .tab-panels .p-code,
#app-other:checked ~ .tab-panels .p-other { display: block; }
.prompt-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.prompt-grid li { display: flex; flex-direction: column; gap: 14px; padding: 22px 22px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.prompt-grid li.first { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; border: 1.5px solid transparent; }
.prompt-grid li .badge { align-self: flex-start; }
.prompt-grid p { margin: 0; flex: 1; font: 500 18px/1.45 var(--serif); color: var(--text); overflow-wrap: anywhere; }
.prompt-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.trust .panel { padding: 28px; }
.ticks, .crosses { list-style: none; margin: 0; padding: 0; }
.ticks li, .crosses li { position: relative; padding: 8px 0 8px 30px; color: var(--text-2); }
.ticks li::before, .crosses li::before { position: absolute; left: 0; top: 9px; width: 20px; height: 20px; border-radius: 50%; font: 700 11px/20px var(--sans); text-align: center; }
.ticks li::before { content: "✓"; color: #fff; background: var(--grad); }
.crosses li::before { content: "✕"; color: var(--text-2); background: var(--bg-2); border: 1px solid var(--line-strong); line-height: 18px; }
.dev-details { margin-top: 56px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-2); }
.dev-details summary { cursor: pointer; padding: 18px 22px; list-style: none; display: flex; align-items: baseline; gap: 10px; }
.dev-details summary::-webkit-details-marker { display: none; }
.dev-details summary::after { content: "+"; margin-left: auto; font: 500 18px/1 var(--sans); color: var(--muted); }
.dev-details[open] summary::after { content: "–"; }
.dev-details > :not(summary) { margin-left: 22px; margin-right: 22px; }
.dev-details > :last-child { margin-bottom: 22px; }
.dev-details .tool-list { padding-left: 1.2em; }
.dev-details .tool-list li { margin: 6px 0; }
.dev-details pre { overflow-x: auto; }
.dev-details p code { overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .connect-hero { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .journey { grid-template-columns: minmax(0, 1fr); margin-top: 40px; }
  .connect-step { margin-top: 64px; }
}
@media (max-width: 640px) {
  .connect { padding-top: 36px; }
  .two-up, .prompt-grid { grid-template-columns: minmax(0, 1fr); }
  .tab-panels { padding: 22px 18px; }
  .tab-labels { display: flex; border-radius: 16px; }
  .tab-labels label { flex: 1 1 auto; text-align: center; padding: 9px 12px; }
  .address-card { padding: 22px 18px; }
}
.warn { background: var(--warn-bg); border: 1px solid var(--warn-line); padding: 12px 14px; border-radius: 12px; font-size: 14px; color: var(--text); }

/* ---- Cards (consent / auth pages) --------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px 34px; box-shadow: var(--shadow-lg); }
.narrow { max-width: 540px; margin: 64px auto 0; }
@media (max-width: 560px) { .card { padding: 24px 20px; } .narrow { margin-top: 28px; } }
.consent .post-heading { font-size: 28px; margin-bottom: 12px; }
.consent > p { color: var(--text-2); }
.consent .client-name { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; overflow-wrap: anywhere; }
.consent pre code { overflow-wrap: anywhere; white-space: pre-wrap; }
.owner-card .owner-title { font: 500 28px/1.2 var(--serif); letter-spacing: -0.015em; margin: 0 0 10px; overflow-wrap: anywhere; }
.owner-card > p { color: var(--text-2); }
.claim-agent { display: flex; align-items: center; gap: 18px; margin: 6px 0 18px; min-width: 0; }
.claim-agent .owner-title { margin: 0; }
.claim-agent p { margin: 4px 0 0; }
.claim-agent > div { min-width: 0; }

.form { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.form.primary { margin-top: 26px; }
.form.bare { margin-top: 14px; }
.form label { display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--text); }
.form label .muted { font-weight: 400; }
.form input:not([type="radio"]):not([type="checkbox"]), .form textarea {
  font: 400 15px/1.45 var(--sans); padding: 11px 14px; width: 100%;
  border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-2); color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form textarea { resize: vertical; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--iris); box-shadow: 0 0 0 4px color-mix(in srgb, var(--iris) 16%, transparent); background: var(--surface); }
.form p { margin: 0; }
.form .button { align-self: stretch; margin-top: 4px; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.label-row .muted { font-size: 12.5px; }
.link-button { align-self: center; background: none; border: 0; padding: 4px; color: var(--muted); font: inherit; font-size: 13.5px; cursor: pointer; }
.link-button:hover { color: var(--text); text-decoration: underline; }
.form-error { background: var(--warn-bg); border: 1px solid var(--warn-line); padding: 10px 14px; border-radius: 12px; font-size: 14px; color: var(--text); }
.alt { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.alt summary { cursor: pointer; color: var(--text-2); font-size: 14px; }
.alt summary:hover { color: var(--text); }
.alt .form { margin-top: 14px; }
.fineprint { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--line); line-height: 1.55; }
.cta { margin: 22px 0; }
.cta .button { width: 100%; }
.owner-hint { margin: 18px 0 0; font-size: 13.5px; color: var(--text-2); }
.claim-box { margin: 22px 0 6px; padding: 18px 20px; border-radius: 14px; background: var(--grad-soft); border: 1px solid var(--line); }
.claim-box p { margin: 0 0 8px; font-size: 14px; color: var(--text-2); }
.claim-box p:last-child { margin: 0; }
.choices { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.choices legend { font-size: 13.5px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.form label.choice { flex-direction: row; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 14px; cursor: pointer; font-weight: 400; background: var(--surface); transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.form label.choice:has(input:checked) { border-color: var(--iris); box-shadow: 0 0 0 4px color-mix(in srgb, var(--iris) 12%, transparent); }
.choice input { width: auto; margin: 0; accent-color: var(--iris); flex: none; }
.choice-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.choice-text strong { font-size: 15px; overflow-wrap: anywhere; }
.passkey-status { min-height: 1.4em; margin: 0; font-size: 13.5px; color: var(--text-2); }
.passkey-status.error { color: var(--danger); }
.recovery .owner-title { margin-top: 2px; }
.codes { list-style: none; margin: 18px 0 14px; padding: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; background: var(--code-bg); border-radius: 14px; counter-reset: code; }
.codes li { counter-increment: code; display: flex; align-items: baseline; gap: 8px; }
.codes li::before { content: counter(code, decimal-leading-zero); font: 500 11px/1 var(--mono); color: var(--muted); }
.codes code { background: none; padding: 0; font-size: 14px; letter-spacing: 0.04em; color: var(--text); }
@media (max-width: 420px) { .codes { grid-template-columns: minmax(0, 1fr); } }
.secret { margin: 22px 0 12px; border: 1px solid var(--line-strong); border-radius: 14px; overflow: hidden; }
.secret-label { display: block; padding: 8px 14px; font: 600 10.5px/1.5 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.secret pre { margin: 0; border-radius: 0; }
.secret code, pre.cmd code { overflow-wrap: anywhere; white-space: pre-wrap; word-break: break-all; }
pre.cmd { font-size: 12.5px; }

/* ---- Owner console ---------------------------------------------------------------- */
.console { padding-top: 44px; }
.narrow-console { max-width: 820px; margin: 0 auto; }
.console-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.console-head h1 { font-size: clamp(32px, 4.4vw, 46px); margin: 0; }
.pill-nav { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); flex-wrap: wrap; }
.pill-nav a { display: inline-flex; align-items: center; padding: 7px 15px; border-radius: 999px; font-size: 14px; font-weight: 550; color: var(--text-2); }
.pill-nav a:hover { text-decoration: none; color: var(--text); background: var(--bg-2); }
.pill-nav a.active { background: var(--ink); color: var(--ink-text); }
.pill-nav .inline-form { padding: 0 12px 0 8px; }
.notice { margin: 0 0 24px; padding: 13px 18px; border-radius: 14px; font-size: 14.5px; color: var(--text); background: color-mix(in srgb, var(--teal) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--teal) 28%, transparent); }

.panel { margin-top: 20px; padding: 26px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.panel h2 { font-size: 18px; font-weight: 650; letter-spacing: -0.012em; margin: 0 0 6px; }
.panel > p { margin: 0 0 14px; line-height: 1.6; }
.panel > p:last-child { margin-bottom: 0; }
.panel .form .button { align-self: flex-start; }
.subtle-panel { background: transparent; box-shadow: none; border-style: dashed; margin-top: 40px; }
@media (max-width: 560px) { .panel { padding: 22px 18px; } }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.needs-you { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; border: 1.5px solid transparent; }
.todo-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.todo { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); }
.todo:hover { text-decoration: none; border-color: var(--iris); }
.todo > span:not(.av) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.todo .ico { color: var(--iris); }

.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 20px; }
.agent-panel { display: flex; flex-direction: column; gap: 14px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); color: var(--text); transition: transform 0.18s ease, box-shadow 0.18s ease; }
.agent-panel:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.agent-panel-top { display: flex; align-items: center; gap: 14px; min-width: 0; }
.agent-panel-id { display: flex; flex-direction: column; min-width: 0; }
.agent-panel-id strong { font: 500 21px/1.2 var(--serif); overflow-wrap: anywhere; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.mini-stats { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.mini-stats strong { color: var(--text); font-size: 15px; margin-right: 3px; }
.mini-stats .hot strong { color: var(--coral); }

.stories { margin-top: 56px; }
.story-list { display: grid; gap: 14px; }
.story-card { position: relative; padding: 22px 24px 20px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.story-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--rc, var(--iris)); }
.story-card.unread { box-shadow: var(--shadow); }
.rec-keep { --rc: var(--teal); }
.rec-meet { --rc: var(--coral); }
.rec-once { --rc: var(--amber); }
.rec-no { --rc: var(--line-strong); }
.story-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rec-badge { font: 650 11.5px/1.5 var(--sans); color: var(--rc); background: color-mix(in srgb, var(--rc) 11%, var(--surface)); padding: 3px 10px; border-radius: 999px; }
.rec-no .rec-badge { color: var(--muted); }
.new-pill { font: 700 10.5px/1.5 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: #fff; background: var(--grad); padding: 2px 8px; border-radius: 999px; }
.story-when { margin-left: auto; }
.story-card h3 { font: 500 21px/1.3 var(--serif); margin: 12px 0 8px; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.story-card .plain { color: var(--text-2); }
.highlights { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.highlights li { position: relative; padding-left: 22px; font-size: 14.5px; overflow-wrap: anywhere; }
.story-question { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--iris) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--iris) 22%, transparent); }
.story-question p { margin: 0; overflow-wrap: anywhere; }
.story-question .kicker { margin-bottom: 4px; }
.story-question .muted { margin-top: 6px; }
.form label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; }
.form label.check input { width: auto; margin: 0; accent-color: var(--danger); }
.memory-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.memory-item { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); display: grid; gap: 6px; }
.memory-item p { margin: 0; overflow-wrap: anywhere; }
.memory-content { font-size: 15px; }
.memory-note { font-size: 14px; color: var(--text-2); }
.memory-label { font: 600 11px/1.4 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.memory-edit summary { cursor: pointer; font-size: 13.5px; color: var(--iris); }
.memory-edit .form { margin-top: 10px; }
.memory-item > form { justify-self: start; }
.highlights li::before { content: "✦"; position: absolute; left: 2px; color: var(--rc); font-size: 12px; top: 2px; }
.story-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.who { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; font-size: 14px; min-width: 0; }
.who .handle { font-weight: 400; }
.plain { white-space: pre-wrap; overflow-wrap: anywhere; }

.agent-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.agent-head-id { display: flex; align-items: center; gap: 20px; min-width: 0; }
.agent-head-id h1 { font-size: clamp(30px, 4vw, 42px); margin: 0; overflow-wrap: anywhere; }
.tabs { display: flex; gap: 4px; margin: 26px 0 24px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 11px 14px; font-size: 14.5px; font-weight: 550; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--text); border-bottom-color: var(--iris); }
.tab-intro { max-width: 70ch; margin: 0 0 20px; }

.callout { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 20px 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); margin-bottom: 20px; }
.callout p { margin: 4px 0 0; }
.callout.warm { background: var(--grad-soft); border-color: color-mix(in srgb, var(--orchid) 25%, var(--line)); }
.stat-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat-tiles div { padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; }
.stat-tiles span { grid-row: span 2; display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 11px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); }
.stat-tiles div:nth-child(1) { --c: var(--iris); }
.stat-tiles div:nth-child(2) { --c: var(--orchid); }
.stat-tiles div:nth-child(3) { --c: var(--amber); }
.stat-tiles div:nth-child(4) { --c: var(--coral); }
.stat-tiles strong { font: 500 26px/1.1 var(--serif); }
.stat-tiles em { font-style: normal; font-size: 12.5px; color: var(--muted); }
@media (max-width: 760px) { .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.two-col { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; margin-top: 36px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: minmax(0, 1fr); } }
.col-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.col-title .text-link { text-transform: none; letter-spacing: 0; }

.conv-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.conv-list li + li { border-top: 1px solid var(--line); }
.conv-row { display: flex; align-items: center; gap: 14px; padding: 15px 18px; color: var(--text); }
.conv-row:hover { text-decoration: none; background: var(--surface-2); }
.conv-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.conv-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.conv-top strong { font-size: 15px; }
.conv-preview { font-size: 14px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-row.unread .conv-preview { color: var(--text); font-weight: 550; }
.conv-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 12.5px; color: var(--muted); flex: none; text-align: right; }
.saved-star { color: var(--amber); display: inline-flex; }
.saved-star .ico { width: 15px; height: 15px; fill: currentColor; }
@media (max-width: 560px) { .conv-meta .muted { display: none; } }
.people-group { margin-top: 28px; }

.conversation-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .conversation-layout { grid-template-columns: minmax(0, 1fr); } }
.transcript-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 8px 24px 20px; box-shadow: var(--shadow-sm); }
.transcript-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.transcript-head > div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.transcript { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; flex-direction: column; gap: 5px; max-width: 82%; }
.msg .plain { padding: 12px 16px; border-radius: 18px; font-size: 15px; line-height: 1.55; }
.msg.theirs { align-self: flex-start; }
.msg.theirs .plain { background: var(--bg-2); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.mine .plain { background: linear-gradient(135deg, #5b4cf0, #9a4fd6); color: #fff; border-bottom-right-radius: 6px; }
.msg-meta { font-size: 12px; color: var(--muted); padding: 0 6px; }
.transcript-note { margin: 18px 0 0; }
.side-stack { display: flex; flex-direction: column; gap: 0; }
.side-stack .panel:first-child { margin-top: 0; }
.mini-card .card-headline { font-size: 17px; }

.review-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.review-head h2 { margin: 0; }
.button.small { padding: 7px 14px; font-size: 13px; }
.history { list-style: none; margin: 14px 0 0; padding: 0; }
.history > li { padding: 14px 0; border-top: 1px solid var(--line); }
.history > li:first-child { border-top: 0; padding-top: 4px; }
.history-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.history-head > .muted { margin-right: auto; }
.history details { margin-top: 8px; }
.history summary { cursor: pointer; }
.history .preview-card { margin-top: 10px; }
.review { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; border: 1.5px solid transparent; }
.compare { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 760px) { .compare { grid-template-columns: minmax(0, 1fr); } }
.preview-card { padding: 22px 24px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.preview-card.faded { opacity: 0.72; }
.card-form { max-width: 680px; }

.share-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.share-list li { position: relative; padding-left: 28px; font-size: 14.5px; color: var(--text-2); }
.share-list li::before { position: absolute; left: 0; top: 1px; width: 19px; height: 19px; border-radius: 50%; font: 700 11px/19px var(--sans); text-align: center; }
.share-list li.yes::before { content: "✓"; color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, var(--surface)); }
.share-list li.no::before { content: "✕"; color: var(--danger); background: color-mix(in srgb, var(--danger) 11%, var(--surface)); }
.share-list.compact li { font-size: 13.5px; }
.app-list { list-style: none; margin: 8px 0 16px; padding: 0; border-top: 1px solid var(--line); }
.app-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.app-list li > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.app-list .who { flex-direction: row; align-items: center; font-weight: 400; }
.app-list .who > span { display: flex; flex-direction: column; min-width: 0; }
.note-line { white-space: pre-wrap; }

.intro-head { display: flex; align-items: center; gap: 26px; margin: 8px 0 22px; flex-wrap: wrap; }
.intro-head h1 { font-size: clamp(28px, 3.8vw, 40px); margin: 0 0 8px; }
.intro-head p { margin: 0; }
.intro-pair { display: flex; align-items: center; }
.pair-line { width: 34px; height: 2px; background: var(--grad); margin: 0 -2px; }
.reason { margin: 0 0 6px; padding: 22px 26px; font: italic 500 19px/1.5 var(--serif); color: var(--text); background: var(--grad-soft); border-radius: var(--radius-lg); border: 1px solid var(--line); overflow-wrap: anywhere; }
.reason cite { display: block; margin-top: 10px; font: normal 500 13px var(--sans); color: var(--muted); }
.approve-panel { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; border: 1.5px solid transparent; }
.approve-panel .form { max-width: 560px; }
.approve-panel > .inline-form { display: block; margin-top: 14px; }
.people-cards { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 640px) { .people-cards { grid-template-columns: minmax(0, 1fr); } }
.person { padding: 20px 22px; border-radius: var(--radius); background: var(--grad-soft); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.person strong { font: 500 22px/1.2 var(--serif); }
.person.mine { background: var(--surface-2); }
.withdraw { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

/* ---- Encounter modes, live status, interaction rules ---- */
.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 22px; }
.mode-card { padding: 26px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.mode-card.live { background: var(--grad-soft); border-color: color-mix(in srgb, var(--orchid) 25%, var(--line)); }
.mode-card h3 { font: 500 22px/1.25 var(--serif); margin: 14px 0 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mode-card p { margin: 0 0 10px; line-height: 1.6; color: var(--text-2); }
.mode-prompt { font-style: italic; color: var(--text) !important; }
.modes-note { margin-top: 16px; }
.live-panel .live-line { margin: 4px 0 0; }
.live-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.live-list a { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); color: inherit; text-decoration: none; }
.live-list a:hover { background: var(--surface-2); }
.rules-panel .badges { margin: 6px 0 8px; }
.rules-spirit { font: 500 16.5px/1.45 var(--serif); margin: 10px 0 12px; }
.rule-list { margin: 4px 0 12px; padding-left: 18px; line-height: 1.55; font-size: 14px; }
.rule-list li { margin: 3px 0; }
@media (max-width: 760px) { .modes { grid-template-columns: 1fr; } }

/* Live vs asynchronous messages */
.mode-badges { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.mode-tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; line-height: 1.6; white-space: nowrap; border: 1px solid var(--line); color: var(--text-2); background: var(--surface-2); }
.mode-tag.live { color: var(--orchid); border-color: color-mix(in srgb, var(--orchid) 35%, transparent); background: color-mix(in srgb, var(--orchid) 9%, transparent); }
.mode-tag.live.now { color: var(--teal); border-color: color-mix(in srgb, var(--teal) 40%, transparent); background: color-mix(in srgb, var(--teal) 10%, transparent); }
.transcript-head .mode-badges { margin-left: auto; }
.mode-legend { margin: 0 0 14px; line-height: 1.9; }
.transcript-modes { display: flex; flex-direction: column; gap: 18px; }
.mode-divider { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 12px; color: var(--muted); }
.mode-divider::after { content: ''; flex: 1; border-top: 1px dashed var(--line); }
.mode-run.live { padding: 14px 16px 18px; border: 1px solid color-mix(in srgb, var(--orchid) 28%, var(--line)); border-radius: var(--radius-lg); background: var(--grad-soft); }
.live-run-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.live-run-head .text-link { margin-left: auto; }
@media (max-width: 560px) { .mode-run.live { padding: 12px 10px 14px; } .live-run-head .text-link { margin-left: 0; } }
