/* Public site for Session Relay. Same identity as the web app: teal handoff accent, cool ink neutrals, IBM Plex.
   Landing is a single centered column with a two-terminal "handoff" hero; docs are nav + prose. */
:root {
  --bg: #f6f7f9; --surface: #ffffff; --surface-2: #eef1f4; --ink: #16202b; --muted: #586374; --faint: #8792a2;
  --line: #e1e5eb; --accent: #0f7b6c; --accent-ink: #ffffff; --accent-soft: #e3f3f0;
  --claude: #b4532a; --opencode: #5b47c4; --term: #121a23; --term-ink: #dbe3ec; --term-faint: #7f8b9b;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1319; --surface: #151c24; --surface-2: #1b232d; --ink: #e5eaf1; --muted: #a0abba; --faint: #6f7b8b;
    --line: #242e3a; --accent: #3cc2ae; --accent-ink: #062a25; --accent-soft: #123430;
    --claude: #f0956b; --opencode: #a99bff; --term: #0a0f14; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1319; --surface: #151c24; --surface-2: #1b232d; --ink: #e5eaf1; --muted: #a0abba; --faint: #6f7b8b;
  --line: #242e3a; --accent: #3cc2ae; --accent-ink: #062a25; --accent-soft: #123430;
  --claude: #f0956b; --opencode: #a99bff; --term: #0a0f14; color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; margin: 0; }
code { font-family: var(--mono); font-size: 0.86em; }
:not(pre) > code { background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 5px; }
.faint { color: var(--faint); }

.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-inner, .foot-inner { max-width: 1120px; margin: 0 auto; padding: 12px max(16px, env(safe-area-inset-left, 0px)); display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 600; }
.brand:hover { text-decoration: none; }
.top nav { margin-left: auto; display: flex; gap: 20px; font-size: 15px; }
.top nav a { color: var(--muted); }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); text-decoration: none; }
@media (max-width: 520px) { .top nav { gap: 12px; font-size: 14px; } .brand span { display: none; } }
.foot { border-top: 1px solid var(--line); margin-top: 80px; }
.foot-inner { flex-wrap: wrap; font-size: 14px; padding-top: 24px; padding-bottom: 40px; }
.foot-inner a { margin-left: auto; }

.btn { display: inline-flex; align-items: center; padding: 10px 18px; border-radius: 9px; font-weight: 600; font-size: 15px; border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-github { gap: 8px; background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-github:hover { border-color: var(--ink); opacity: 0.9; }
.btn svg, .nav-github svg { flex: none; }
.nav-github { display: inline-flex; align-items: center; gap: 6px; }
.hero-install { margin: 0; font-size: 14px; color: var(--muted); }
.hero-install code { background: var(--surface-2); border: 1px solid var(--line); padding: 4px 10px; border-radius: 7px; }
.oss-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 22px 24px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.oss-card:hover { text-decoration: none; border-color: var(--accent); }
.oss-card svg { width: 34px; height: 34px; }
.oss-card h3 { font-size: 18px; margin-bottom: 4px; }
.oss-card p { margin: 0; color: var(--muted); }
.oss-cta { color: var(--accent); font-weight: 600; font-size: 14px; white-space: nowrap; }
@media (max-width: 720px) { .oss-card { grid-template-columns: auto minmax(0, 1fr); } .oss-cta { grid-column: 1 / -1; } }

/* Landing */
.landing { max-width: 1120px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left, 0px)); }
.landing section { padding-top: 72px; }
.hero { text-align: center; padding-top: 72px !important; display: grid; justify-items: center; gap: 18px; }
.eyebrow { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-size: clamp(36px, 6vw, 60px); font-weight: 600; letter-spacing: -0.025em; max-width: 14ch; }
.lede { margin: 0; font-size: 19px; color: var(--muted); max-width: 60ch; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.handoff { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 14px; width: 100%; max-width: 980px; margin-top: 36px; text-align: left; }
@media (max-width: 820px) { .handoff { grid-template-columns: 1fr; } .baton { transform: rotate(90deg); justify-self: center; } }
.term { background: var(--term); color: var(--term-ink); border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(10, 15, 20, 0.18); min-width: 0; }
.term-bar { display: flex; justify-content: space-between; align-items: center; padding: 9px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); font-size: 12px; }
.term-bar .faint { color: var(--term-faint); }
.term pre { margin: 0; padding: 14px 16px 16px; font: 13px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.term .faint { color: var(--term-faint); }
.term b { color: #6ee7d6; font-weight: 500; }
.prompt { color: #6ee7d6; }
.tool { font-family: var(--mono); font-weight: 500; padding: 1px 7px; border-radius: 5px; border: 1px solid currentColor; }
.tool.claude { color: #f0956b; } .tool.opencode { color: #b3a6ff; }
.baton { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); }
.shot img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(22, 32, 43, 0.12); display: block; }
.landing h2 { font-size: 30px; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 24px; }
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: s; }
@media (max-width: 820px) { .how-steps { grid-template-columns: 1fr; } }
.how-steps li { counter-increment: s; display: grid; gap: 8px; align-content: start; }
.how-steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 14px; }
.how-steps h3 { font-size: 18px; }
.how-steps p, .features p, .plan p { margin: 0; color: var(--muted); }
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; }
@media (max-width: 720px) { .features { grid-template-columns: 1fr; } }
.features > div { display: grid; gap: 6px; border-top: 2px solid var(--ink); padding-top: 14px; }
.features h3 { font-size: 17px; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 720px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; display: grid; gap: 14px; align-content: start; }
.plan-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.plan h3 { font-size: 20px; }
.plan ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.plan .btn { justify-self: start; }
.plan-soon { background: transparent; border-style: dashed; }
.pill { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill-on { background: var(--accent-soft); color: var(--accent); }
pre.code { margin: 0 0 14px; background: var(--term); color: var(--term-ink); border-radius: 12px; padding: 18px 20px; overflow-x: auto; font: 13.5px/1.7 var(--mono); }
pre.code .faint { color: var(--term-faint); }

/* Docs */
.docs { max-width: 1120px; margin: 0 auto; padding: 32px max(16px, env(safe-area-inset-left, 0px)) 0; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 48px; }
@media (max-width: 820px) { .docs { grid-template-columns: 1fr; gap: 16px; } }
.docs-nav { position: sticky; top: 80px; align-self: start; display: grid; gap: 2px; font-size: 15px; }
.docs-nav-title { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.docs-nav a { color: var(--muted); padding: 5px 10px; border-radius: 7px; }
.docs-nav a:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.docs-nav a[aria-current] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
@media (max-width: 820px) { .docs-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px; } .docs-nav-title { width: 100%; } }
.prose { max-width: 760px; min-width: 0; }
.prose h1 { font-size: 36px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 16px; }
.prose h2 { font-size: 23px; font-weight: 600; margin: 40px 0 12px; }
.prose h3 { font-size: 18px; font-weight: 600; margin: 28px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose li { margin-bottom: 4px; }
.prose .anchor { color: var(--faint); margin-left: -1.1em; padding-right: 0.3em; opacity: 0; text-decoration: none; }
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; }
.prose pre { background: var(--term); color: var(--term-ink); border-radius: 10px; padding: 14px 16px; overflow-x: auto; margin: 0 0 16px; font: 13.5px/1.6 var(--mono); }
.prose pre code { font-size: inherit; background: none; padding: 0; }
.prose blockquote { margin: 0 0 16px; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; }
.prose blockquote p { margin: 0; }
.table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 10px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14.5px; background: var(--surface); }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.prose th { background: var(--surface-2); font-size: 13px; }
.prose tr:last-child td { border-bottom: 0; }
.prose img { max-width: 100%; border-radius: 10px; border: 1px solid var(--line); }
.edit { margin-top: 40px !important; font-size: 14px; }
