/* ============================================================
   PenEcho Cloud — design system
   "Ink & Echo": warm paper, precise ink, echo-blue accents.
   ============================================================ */

:root {
  --paper: #f4f1e8;
  --paper-2: #fbf9f2;
  --paper-3: #efeadd;
  --ink: #1b1d24;
  --ink-2: #3a3d47;
  --ink-soft: #62656f;
  --ink-faint: #979aa3;
  --line: #e2dccc;
  --line-strong: #cfc8b2;
  --blue: #2e4ce6;
  --blue-deep: #1d34b0;
  --blue-soft: #5d78f2;
  --blue-wash: #e4e9fb;
  --maroon: #7a2a3c;
  --green: #2f7d4f;
  --amber: #a06a12;
  --shadow-sm: 0 1px 2px rgba(27, 29, 36, 0.05), 0 2px 8px rgba(27, 29, 36, 0.05);
  --shadow-md: 0 2px 6px rgba(27, 29, 36, 0.06), 0 14px 34px -12px rgba(27, 29, 36, 0.18);
  --shadow-lg: 0 4px 10px rgba(27, 29, 36, 0.06), 0 30px 60px -20px rgba(27, 29, 36, 0.25);
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-hand: "Caveat", "Segoe Script", cursive;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

/* paper grain: faint dotted grid, like an engineering notebook */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(27, 29, 36, 0.055) 1px, transparent 1.1px);
  background-size: 26px 26px;
  opacity: 0.5;
}

img, video, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

input, select, textarea { font: inherit; color: inherit; }

::selection { background: rgba(46, 76, 230, 0.18); }

.wrap {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
}

/* ---------- type ---------- */

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.kicker::before {
  content: "";
  width: 22px;
  height: 12px;
  border: 1.5px solid var(--blue);
  border-top-color: transparent;
  border-left-color: transparent;
  border-radius: 50%;
  transform: rotate(-8deg);
  opacity: 0.9;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 560;
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
}

h1 { font-size: clamp(42px, 6vw, 74px); }
h2 { font-size: clamp(32px, 4vw, 50px); }
h3 { font-size: 22px; }

h1 em, h2 em {
  font-style: italic;
  font-weight: 480;
  color: var(--blue);
}

.lead {
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 54ch;
}

.hand {
  font-family: var(--font-hand);
  font-weight: 600;
  color: var(--blue-deep);
}

/* ---------- buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 560;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}

.button .arr { transition: transform 0.18s ease; }
.button:hover .arr { transform: translate(2px, -2px); }

.button.primary {
  background: var(--ink);
  color: var(--paper-2);
  box-shadow: var(--shadow-sm);
}
.button.primary:hover { background: #000; transform: translateY(-1px); box-shadow: var(--shadow-md); }

.button.blue {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(46, 76, 230, 0.55);
}
.button.blue:hover { background: var(--blue-deep); transform: translateY(-1px); }

.button.secondary {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.button.secondary:hover { border-color: var(--ink); transform: translateY(-1px); }

.button.ghost-light {
  background: rgba(251, 249, 242, 0.08);
  border-color: rgba(251, 249, 242, 0.28);
  color: var(--paper-2);
}
.button.ghost-light:hover { background: rgba(251, 249, 242, 0.16); }

.button.light-fill { background: var(--paper-2); color: var(--ink); }
.button.light-fill:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.button:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 560;
  font-size: 15px;
  color: var(--blue-deep);
  border-bottom: 1px solid transparent;
}
.text-link:hover { border-bottom-color: var(--blue-deep); }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 28px;
  padding-block: 14px;
  background: rgba(244, 241, 232, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 220, 204, 0.7);
}

.nav .brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; }
.nav .brand img { height: 26px; width: auto; }

.nav nav { display: flex; gap: 4px; }

.nav nav a {
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  transition: background 0.15s ease, color 0.15s ease;
}
.nav nav a:hover { background: rgba(27, 29, 36, 0.055); color: var(--ink); }

.nav .nav-auth { display: flex; align-items: center; gap: 10px; }
.nav .nav-signin { font-size: 14.5px; font-weight: 560; padding: 9px 14px; border-radius: 999px; }
.nav .nav-signin:hover { background: rgba(27, 29, 36, 0.055); }

.nav .nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper-2);
  font-size: 14.5px;
  font-weight: 560;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.nav .nav-cta:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.nav-account {
  display: inline-grid;
  grid-template-columns: 30px minmax(0, auto) 14px;
  align-items: center;
  gap: 9px;
  max-width: 220px;
  padding: 5px 9px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.nav-account[hidden] { display: none; }
.nav-account:hover { transform: translateY(-1px); border-color: rgba(27, 29, 36, 0.3); background: var(--paper-2); }
.nav-account-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--ink);
  color: var(--paper-2);
  font: 650 11px/1 var(--font-ui);
}
.nav-account-copy { display: grid; min-width: 0; line-height: 1.08; }
.nav-account-copy small { color: var(--ink-faint); font: 600 8.5px/1 var(--font-mono); text-transform: uppercase; }
.nav-account-copy strong { overflow: hidden; max-width: 138px; margin-top: 4px; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 650; }
.nav-account-arrow { color: var(--ink-faint); font-size: 13px; }

.trial-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 22px;
  border-bottom: 1px solid rgba(160, 106, 18, 0.26);
  background: #fff7df;
  color: #6f4a0d;
  font-size: 12.5px;
  line-height: 1.45;
  text-align: center;
}
.trial-banner b { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; color: var(--amber); }

/* ---------- reveal on scroll ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1), transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal="1"] { transition-delay: 0.06s; }
[data-reveal="2"] { transition-delay: 0.12s; }
[data-reveal="3"] { transition-delay: 0.18s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ============================================================
   Landing — Kimi Open Source Friends note
   ============================================================ */

.kimi-friend {
  display: flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  max-width: 100%;
  margin-top: 22px;
  padding: 7px 15px 7px 7px;
  border: 1px solid rgba(46, 76, 230, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.kimi-friend:hover { transform: translateY(-1px); border-color: rgba(46, 76, 230, 0.34); background: #fff; }
.kimi-friend img { flex: none; width: 224px; height: auto; }
.kimi-friend-copy { max-width: 260px; color: var(--ink-soft); font-size: 12.5px; line-height: 1.45; }
.kimi-friend-copy strong { color: var(--blue-deep); font-weight: 680; }

/* ============================================================
   Landing — hero
   ============================================================ */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(56px, 8vh, 104px) clamp(48px, 7vh, 88px);
}

.hero-copy .availability {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 26px 0 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.hero-copy .availability i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(47, 125, 79, 0.16);
}
.hero-copy .availability strong { color: var(--ink-2); font-weight: 600; }

.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.hero-note {
  margin-top: 22px;
  font-family: var(--font-hand);
  font-size: 21px;
  color: var(--ink-soft);
  transform: rotate(-1.2deg);
  display: inline-block;
}
.hero-note b { color: var(--blue-deep); font-weight: 700; }

/* --- canvas mock --- */

.stage { position: relative; }

.stage .echo-rings {
  position: absolute;
  inset: -8% -14%;
  pointer-events: none;
  background:
    repeating-radial-gradient(circle at 78% 12%, rgba(46, 76, 230, 0.13) 0 1.5px, transparent 1.5px 46px);
  -webkit-mask-image: radial-gradient(circle at 78% 12%, #000 0%, transparent 62%);
          mask-image: radial-gradient(circle at 78% 12%, #000 0%, transparent 62%);
  opacity: 0.8;
}

.canvas-mock {
  position: relative;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: rotate(0.6deg);
}

.canvas-mock .cm-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  text-transform: uppercase;
}
.canvas-mock .cm-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.canvas-mock .cm-bar .dot.b { background: var(--blue); }
.canvas-mock .cm-bar .cm-title { margin-right: auto; }
.canvas-mock .cm-sync { display: inline-flex; align-items: center; gap: 6px; color: var(--blue-deep); }
.canvas-mock .cm-sync i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  animation: pulse-dot 2.2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(47, 125, 79, 0.35); }
  55% { box-shadow: 0 0 0 6px rgba(47, 125, 79, 0); }
}

.canvas-mock .cm-paper {
  position: relative;
  min-height: 380px;
  padding: 30px 30px 26px;
  background-image:
    linear-gradient(rgba(46, 76, 230, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 76, 230, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
}

/* handwriting stroke animation */
.cm-ink { width: min(78%, 340px); }
.cm-ink path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: draw-ink 3.2s cubic-bezier(0.5, 0, 0.3, 1) forwards;
}
.cm-ink path:nth-child(2) { animation-delay: 0.5s; }
.cm-ink path:nth-child(3) { animation-delay: 1.0s; }
.cm-ink path:nth-child(4) { animation-delay: 1.45s; }
.cm-ink path:nth-child(5) { animation-delay: 1.9s; }

@keyframes draw-ink { to { stroke-dashoffset: 0; } }

.cm-question {
  position: absolute;
  left: 34px;
  bottom: 118px;
  font-family: var(--font-hand);
  font-size: 27px;
  font-weight: 600;
  color: var(--ink-2);
  transform: rotate(-1.6deg);
  opacity: 0;
  animation: fade-up 0.7s ease 2.3s forwards;
}
.cm-question::after {
  content: "";
  position: absolute;
  left: 108%;
  top: 30%;
  width: 54px;
  height: 26px;
  border-right: 2.5px solid var(--ink-2);
  border-bottom: 2.5px solid var(--ink-2);
  border-radius: 0 0 22px 0;
  transform: rotate(18deg);
  opacity: 0.55;
}

.cm-answer {
  position: absolute;
  right: 26px;
  bottom: 24px;
  max-width: 264px;
  background: #fff;
  border: 1px solid rgba(46, 76, 230, 0.28);
  border-radius: var(--r-md);
  box-shadow: 0 18px 40px -18px rgba(29, 52, 176, 0.35);
  padding: 14px 16px 13px;
  opacity: 0;
  transform: translateY(14px);
  animation: fade-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) 3s forwards;
}
.cm-answer .cm-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--blue-deep);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.cm-answer .cm-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.cm-answer strong {
  display: block;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--blue-deep);
  line-height: 1.25;
}
.cm-answer p { margin: 5px 0 0; font-size: 12.8px; line-height: 1.5; color: var(--ink-soft); }

@keyframes fade-up { to { opacity: 1; transform: none; } }

/* reset helper: momentarily clears descendant animations (toggled from JS) */
.anim-reset .cm-ink path,
.anim-reset .cm-question,
.anim-reset .cm-answer { animation: none; }

.canvas-mock .cm-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-top: 1px solid var(--line);
}
.canvas-mock .cm-tools span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding-inline: 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-soft);
  background: var(--paper);
}
.canvas-mock .cm-tools span.on { background: var(--ink); border-color: var(--ink); color: var(--paper-2); }
.canvas-mock .cm-tools small {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}

/* floating sync chip */
.sync-chip {
  position: absolute;
  top: -18px;
  right: -14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--paper-2);
  border-radius: 14px;
  padding: 11px 15px;
  box-shadow: var(--shadow-md);
  font-size: 12.5px;
  font-weight: 550;
  transform: rotate(1.5deg);
  animation: float-chip 5.5s ease-in-out infinite;
}
.sync-chip svg { flex: none; }
.sync-chip small { display: block; font-family: var(--font-mono); font-size: 10px; color: rgba(251, 249, 242, 0.6); letter-spacing: 0.08em; }

@keyframes float-chip {
  0%, 100% { transform: rotate(1.5deg) translateY(0); }
  50% { transform: rotate(1.5deg) translateY(-8px); }
}

/* ---------- signal strip ---------- */

.signal {
  border-block: 1px solid var(--line);
  background: var(--paper-2);
  overflow: hidden;
}
.signal .wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px 18px;
  padding-block: 15px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  text-transform: uppercase;
}
.signal i { color: var(--blue); font-style: normal; }

/* ---------- section scaffolding ---------- */

.section { padding-block: clamp(72px, 10vh, 120px); }
.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vh, 56px); }
.section-head .lead { margin-top: 18px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .kicker { justify-content: center; }
.section-head.center .lead { margin-inline: auto; }

/* ============================================================
   Cloud section — the product of penecho.ai
   ============================================================ */

.cloud {
  position: relative;
  background: var(--ink);
  color: #e9e7df;
  border-radius: clamp(20px, 3vw, 34px);
  margin-block: clamp(20px, 4vh, 40px);
  overflow: hidden;
}
.cloud::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-radial-gradient(circle at 88% -10%, rgba(93, 120, 242, 0.16) 0 1.5px, transparent 1.5px 54px);
  pointer-events: none;
}
.cloud .wrap { position: relative; padding-block: clamp(64px, 9vh, 110px); }
.cloud .kicker { color: rgba(233, 231, 223, 0.55); }
.cloud .kicker::before { border-color: var(--blue-soft); }
.cloud h2 { color: #f5f3ec; }
.cloud h2 em { color: var(--blue-soft); }
.cloud .lead { color: rgba(233, 231, 223, 0.72); }

.cloud-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(40px, 5vw, 72px);
  align-items: center;
}

.cloud-points { display: grid; gap: 22px; margin-top: 34px; }
.cloud-point { display: flex; gap: 16px; }
.cloud-point .cp-ico {
  flex: none;
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(93, 120, 242, 0.14);
  border: 1px solid rgba(93, 120, 242, 0.32);
  color: var(--blue-soft);
}
.cloud-point strong { display: block; font-size: 16px; font-weight: 600; color: #f5f3ec; margin-bottom: 3px; }
.cloud-point p { margin: 0; font-size: 14px; line-height: 1.6; color: rgba(233, 231, 223, 0.62); }

.cloud .actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }

/* sync diagram */
.sync-diagram {
  position: relative;
  background: rgba(251, 249, 242, 0.04);
  border: 1px solid rgba(251, 249, 242, 0.1);
  border-radius: var(--r-lg);
  padding: clamp(22px, 3vw, 34px);
}
.sync-diagram .sd-caption {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(233, 231, 223, 0.45);
  margin-bottom: 18px;
}

.sd-canvas { width: 100%; height: auto; }
.sd-link {
  fill: none;
  stroke: rgba(93, 120, 242, 0.5);
  stroke-width: 1.6;
  stroke-dasharray: 5 7;
  animation: sd-flow 1.6s linear infinite;
}
@keyframes sd-flow { to { stroke-dashoffset: -24; } }

.sd-node { fill: #23242c; stroke: rgba(251, 249, 242, 0.16); stroke-width: 1.2; }
.sd-node.core { fill: #2e4ce6; stroke: rgba(255, 255, 255, 0.35); }
.sd-label { fill: #f5f3ec; font-family: var(--font-ui); font-size: 12.5px; font-weight: 600; }
.sd-sub { fill: rgba(233, 231, 223, 0.55); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em; }
.sd-core-label { fill: #fff; font-family: var(--font-ui); font-size: 13px; font-weight: 700; }
.sd-core-sub { fill: rgba(255, 255, 255, 0.72); font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; }
.sd-pulse { fill: none; stroke: rgba(93, 120, 242, 0.55); stroke-width: 1.4; transform-origin: center; transform-box: fill-box; animation: sd-ripple 3s ease-out infinite; }
.sd-pulse.p2 { animation-delay: 1s; }
.sd-pulse.p3 { animation-delay: 2s; }
@keyframes sd-ripple {
  0% { transform: scale(0.55); opacity: 0.9; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* pairing card under diagram */
.sd-foot {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--r-md);
  background: rgba(251, 249, 242, 0.05);
  border: 1px dashed rgba(251, 249, 242, 0.22);
}
.sd-foot code {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--blue-soft);
  background: rgba(46, 76, 230, 0.16);
  padding: 5px 10px;
  border-radius: 7px;
}
.sd-foot span { font-size: 13px; color: rgba(233, 231, 223, 0.6); line-height: 1.45; }

/* ============================================================
   Steps — how the cloud works
   ============================================================ */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 26px 24px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }

.step .step-no {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--blue-deep);
  text-transform: uppercase;
  margin-bottom: 40px;
}
.step .step-no::after {
  content: "";
  width: 46px;
  height: 1px;
  background: linear-gradient(90deg, var(--blue), transparent);
}
.step .step-ico {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--blue-wash);
  color: var(--blue-deep);
}
.step strong { display: block; font-size: 17.5px; font-weight: 620; letter-spacing: -0.01em; margin-bottom: 7px; }
.step p { margin: 0; font-size: 14.2px; line-height: 1.62; color: var(--ink-soft); }
.step code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.5px 7px;
  color: var(--ink-2);
  white-space: nowrap;
}

/* ---------- demo video ---------- */

.demo { padding-block: clamp(72px, 10vh, 120px); }
.demo-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 34px;
}
.demo-heading p { margin: 0; color: var(--ink-soft); font-size: 15.5px; line-height: 1.65; max-width: 42ch; }

.video-frame {
  position: relative;
  background: var(--ink);
  border-radius: var(--r-lg);
  padding: clamp(10px, 1.4vw, 16px);
  box-shadow: var(--shadow-lg);
}
.video-frame .video-meta {
  display: flex;
  justify-content: space-between;
  padding: 2px 6px 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(233, 231, 223, 0.5);
}
.video-frame video {
  width: 100%;
  border-radius: calc(var(--r-lg) - 8px);
  background: #0e0f13;
}
.video-frame::after {
  content: "";
  position: absolute;
  inset: -14px;
  z-index: -1;
  border-radius: inherit;
  background: repeating-radial-gradient(circle at 50% 50%, rgba(46, 76, 230, 0.12) 0 1.5px, transparent 1.5px 52px);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 72%);
          mask-image: radial-gradient(ellipse at center, #000 30%, transparent 72%);
}

/* ---------- features ---------- */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.feature {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature .f-ico {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--blue-deep);
}
.feature strong { display: block; font-size: 16.5px; font-weight: 620; margin-bottom: 6px; letter-spacing: -0.01em; }
.feature p { margin: 0; font-size: 14px; line-height: 1.62; color: var(--ink-soft); }

/* ---------- supported models ---------- */

.model-support {
  margin-top: 34px;
  padding: clamp(24px, 3.4vw, 34px);
  border: 1px solid rgba(46, 76, 230, 0.22);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(46, 76, 230, 0.09), transparent 34%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.78), rgba(228, 233, 251, 0.46));
  box-shadow: var(--shadow-sm);
}
.model-support-head {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.75fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}
.model-support-head .kicker { margin-bottom: 10px; }
.model-support-head h3 { font-size: clamp(27px, 3.1vw, 38px); letter-spacing: -0.01em; }
.model-support-head > p:not(.kicker) { margin: 0 0 4px; color: var(--ink-soft); font-size: 13.5px; line-height: 1.62; }
.model-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.model-list li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(226, 220, 204, 0.9);
  border-radius: 12px;
  background: rgba(251, 249, 242, 0.84);
}
.ms-check {
  display: grid;
  place-items: center;
  grid-row: 1 / 3;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(47, 125, 79, 0.12);
  color: var(--green);
}
.model-list strong { overflow: hidden; color: var(--ink); font-size: 14px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.model-list small { margin-top: 2px; color: var(--ink-faint); font: 500 9.5px/1.2 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------- flow (product) ---------- */

.flow-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
}
.flow-lead { margin-top: 18px; color: var(--ink-soft); font-size: 15.5px; max-width: 38ch; }

.flow-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.flow-list li {
  display: flex;
  gap: 20px;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line);
}
.flow-list li:first-child { border-top: 1px solid var(--line); }
.flow-list .fl-no {
  flex: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--blue-deep);
  padding-top: 4px;
}
.flow-list strong { display: block; font-size: 16.5px; font-weight: 620; margin-bottom: 4px; }
.flow-list p { margin: 0; font-size: 14px; color: var(--ink-soft); line-height: 1.6; }

/* ---------- metrics band ---------- */

.metrics-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line);
  background: var(--paper-2);
}
.metrics-band > div {
  padding: 30px 26px;
  border-left: 1px solid var(--line);
}
.metrics-band > div:first-child { border-left: 0; }
.metrics-band strong {
  display: block;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.metrics-band span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- community band ---------- */

.community {
  position: relative;
  background: var(--blue);
  color: #fff;
  border-radius: clamp(20px, 3vw, 34px);
  overflow: hidden;
}
.community::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-radial-gradient(circle at 105% 115%, rgba(255, 255, 255, 0.14) 0 1.5px, transparent 1.5px 48px);
}
.community .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 36px;
  align-items: center;
  padding-block: clamp(56px, 8vh, 88px);
}
.community .kicker { color: rgba(255, 255, 255, 0.65); }
.community .kicker::before { border-color: #fff; }
.community h2 { color: #fff; }
.community h2 em { color: rgba(255, 255, 255, 0.82); }
.community p { color: rgba(255, 255, 255, 0.78); max-width: 46ch; }
.community .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.community .text-link { color: #fff; }
.community .text-link:hover { border-bottom-color: #fff; }

.community .c-mark {
  justify-self: end;
  position: relative;
  width: min(300px, 100%);
  aspect-ratio: 1;
}
.c-mark .c-ring {
  position: absolute;
  inset: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  animation: c-ripple 4s ease-out infinite;
}
.c-mark .c-ring.r2 { animation-delay: 1.3s; }
.c-mark .c-ring.r3 { animation-delay: 2.6s; }
@keyframes c-ripple {
  0% { transform: scale(0.32); opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}
.c-mark img {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 46%;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

/* ---------- footer ---------- */

footer.site {
  margin-top: clamp(64px, 9vh, 110px);
  background: var(--ink);
  color: rgba(233, 231, 223, 0.66);
}
footer.site .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 0.6fr));
  gap: 32px;
  padding-block: 52px 30px;
}
footer.site .brand img { height: 24px; filter: brightness(0) invert(0.92); }
footer.site .brand { display: inline-flex; margin-bottom: 14px; }
footer.site p { margin: 0; font-size: 14px; max-width: 34ch; line-height: 1.65; }
footer.site h4 {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(233, 231, 223, 0.42);
}
footer.site ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
footer.site ul a { font-size: 14px; transition: color 0.15s ease; }
footer.site ul a:hover { color: #f5f3ec; }
footer.site .legal {
  border-top: 1px solid rgba(251, 249, 242, 0.1);
  padding-block: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(233, 231, 223, 0.4);
}
footer.site .legal span:last-child { margin-left: auto; }

/* ============================================================
   Auth pages
   ============================================================ */

.auth-body {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
}

.auth-aside {
  position: relative;
  background: var(--ink);
  color: #e9e7df;
  padding: 34px clamp(28px, 4vw, 60px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.auth-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-radial-gradient(circle at 30% 88%, rgba(93, 120, 242, 0.22) 0 1.5px, transparent 1.5px 52px);
}
.auth-aside > * { position: relative; }
.auth-aside .brand img { height: 27px; filter: brightness(0) invert(0.92); }

.auth-aside .a-copy { margin-block: auto; padding-block: 48px; }
.auth-aside h2 { color: #f5f3ec; font-size: clamp(30px, 3.2vw, 44px); }
.auth-aside h2 em { color: var(--blue-soft); }
.auth-aside .a-copy p { color: rgba(233, 231, 223, 0.68); max-width: 40ch; margin-top: 16px; font-size: 15.5px; }

.auth-aside .a-quote {
  border-left: 2px solid var(--blue-soft);
  padding-left: 18px;
  font-family: var(--font-hand);
  font-size: 24px;
  color: rgba(233, 231, 223, 0.85);
  transform: rotate(-0.6deg);
}
.auth-aside .a-quote small {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(233, 231, 223, 0.45);
}

.auth-main {
  display: grid;
  place-items: center;
  padding: clamp(28px, 5vh, 56px) 24px;
}

.auth-card {
  width: min(430px, 100%);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(26px, 3.5vw, 38px);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 26px;
}
.auth-tabs button {
  padding: 9px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 560;
  color: var(--ink-soft);
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.auth-tabs button.on { background: var(--paper-2); color: var(--ink); box-shadow: var(--shadow-sm); }

.auth-card h1 { font-size: 27px; letter-spacing: -0.01em; }
.auth-card .sub { margin: 8px 0 24px; font-size: 14px; color: var(--ink-soft); line-height: 1.55; }

.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.field label .opt { font-weight: 500; color: var(--ink-faint); font-size: 12px; }
.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: #fff;
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3.5px rgba(46, 76, 230, 0.16);
}
.field input.invalid { border-color: #b3402f; box-shadow: 0 0 0 3.5px rgba(179, 64, 47, 0.12); }
.field .hint { font-size: 12.5px; color: var(--ink-faint); line-height: 1.45; }
.field .error { display: none; font-size: 12.5px; color: #b3402f; font-weight: 550; }
.field.show-error .error { display: block; }

/* Segmented 6-digit code input (verify / reset) */
.code-shell { position: relative; }
.code-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.code-boxes i {
  display: grid;
  height: 50px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font: 600 20px/1 "JetBrains Mono", ui-monospace, monospace;
  font-style: normal;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.code-boxes i.filled { border-color: var(--ink-2); }
.code-shell:focus-within .code-boxes i.active { border-color: var(--blue); box-shadow: 0 0 0 3.5px rgba(46, 76, 230, 0.16); }
.field .code-input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; opacity: 0; cursor: text; }
.field .code-input:focus { border: 0; box-shadow: none; outline: none; }
.code-field.show-error .code-boxes i { border-color: #b3402f; }
@media (max-width: 480px) {
  .code-boxes { gap: 6px; }
  .code-boxes i { height: 44px; font-size: 18px; }
}

.pw-meter { display: flex; gap: 5px; margin-top: 2px; }
.pw-meter i { height: 3.5px; flex: 1; border-radius: 99px; background: var(--line); transition: background 0.2s ease; }
.pw-meter.s1 i:nth-child(1) { background: #b3402f; }
.pw-meter.s2 i:nth-child(-n+2) { background: var(--amber); }
.pw-meter.s3 i:nth-child(-n+3) { background: var(--green); }

.form-foot { display: grid; gap: 14px; margin-top: 22px; }
.form-foot .button { justify-content: center; width: 100%; }

.form-alt {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.form-alt::before, .form-alt::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: #fff;
  font-size: 14.5px;
  font-weight: 560;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.oauth-btn:hover { border-color: var(--ink); transform: translateY(-1px); }
.oauth-btn + .oauth-btn { margin-top: 10px; }
.github-mark { width: 19px; height: 19px; fill: currentColor; }

.auth-note {
  margin-top: 22px;
  padding: 12px 14px;
  border-radius: 11px;
  background: var(--blue-wash);
  border: 1px solid rgba(46, 76, 230, 0.2);
  font-size: 12.8px;
  line-height: 1.55;
  color: var(--blue-deep);
  display: flex;
  gap: 10px;
}
.auth-note svg { flex: none; margin-top: 1px; }

.beta-data-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 11px 0 0;
  padding: 8px 10px;
  border: 1px solid rgba(49, 87, 213, 0.14);
  border-radius: 7px;
  color: #657083;
  background: rgba(49, 87, 213, 0.035);
  font-size: 10.5px;
  line-height: 1.45;
}
.beta-data-note b { flex: none; color: #3157d5; font: 700 9.5px/1.5 var(--font-mono); text-transform: uppercase; }
.beta-data-note span { min-width: 0; }
.dashboard-beta-note { width: fit-content; max-width: 780px; margin: -5px 0 14px; }

.legal-consent {
  margin: 16px 0 0;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.54);
}
.legal-consent label { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.legal-consent input {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--blue);
}
.legal-consent-copy { color: var(--ink-soft); font-size: 11.5px; line-height: 1.55; }
.legal-consent-copy a { color: var(--blue-deep); text-decoration: underline; text-underline-offset: 2px; }
.legal-consent-error { display: none; margin: 7px 0 0 25px; color: #b73b2f; font-size: 10.5px; line-height: 1.4; }
.legal-consent.invalid { border-color: rgba(183, 59, 47, 0.42); background: rgba(183, 59, 47, 0.045); }
.legal-consent.invalid .legal-consent-error { display: block; }

.auth-legal {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 20px;
  color: var(--ink-faint);
  font-size: 11.5px;
}
.auth-legal a:hover { color: var(--blue-deep); }

.form-message {
  display: none;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 550;
  line-height: 1.5;
}
.form-message.ok { display: flex; gap: 10px; background: rgba(47, 125, 79, 0.1); border: 1px solid rgba(47, 125, 79, 0.3); color: var(--green); }
.form-message.err { display: flex; gap: 10px; background: rgba(179, 64, 47, 0.08); border: 1px solid rgba(179, 64, 47, 0.28); color: #b3402f; }

.promo-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 14px 0 18px;
  padding: 10px 0 10px 12px;
  border-left: 3px solid var(--blue);
  background: rgba(47, 79, 214, 0.06);
}
.promo-strip strong { color: var(--ink); font-size: 13px; white-space: nowrap; }
.promo-strip span { color: var(--ink-soft); font-size: 12px; line-height: 1.4; }

.auth-back {
  position: absolute;
  top: 22px;
  right: 118px;
  font-size: 13.5px;
  font-weight: 560;
  color: var(--ink-soft);
  display: inline-flex;
  gap: 7px;
  align-items: center;
}
.auth-back:hover { color: var(--ink); }

/* spinner for async buttons */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Console (dashboard)
   ============================================================ */

.console-body { background: var(--paper); min-height: 100vh; }

.console-top {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 13px clamp(18px, 3vw, 34px);
  background: rgba(244, 241, 232, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 220, 204, 0.8);
}
.console-top .brand img { height: 23px; }
.console-top .env-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-deep);
  background: var(--blue-wash);
  border: 1px solid rgba(46, 76, 230, 0.25);
  padding: 4px 9px;
  border-radius: 6px;
}
.console-top .spacer { flex: 1; }

.account-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px 5px 5px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  cursor: pointer;
  position: relative;
}
.account-chip .avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.account-chip .who { line-height: 1.15; text-align: left; }
.account-chip .who b { display: block; font-size: 12.8px; font-weight: 620; }
.account-chip .who small { font-size: 10.8px; color: var(--ink-faint); font-family: var(--font-mono); }

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow-md);
  padding: 7px;
  display: none;
}
.account-chip.open .account-menu { display: block; }
.account-menu button, .account-menu a {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 13.8px;
  font-weight: 520;
  color: var(--ink-2);
}
.account-menu button:hover, .account-menu a:hover { background: var(--paper-3); }
.account-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.account-menu .danger { color: #b3402f; }

/* layout */
.console {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  gap: clamp(22px, 3vw, 40px);
  width: min(1240px, calc(100% - 44px));
  margin-inline: auto;
  padding-block: 30px 80px;
}

.console-nav { position: sticky; top: 86px; align-self: start; display: grid; gap: 4px; }
.console-nav .cn-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 0 12px 8px;
}
.console-nav button {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14.2px;
  font-weight: 540;
  color: var(--ink-soft);
  text-align: left;
  transition: background 0.14s ease, color 0.14s ease;
}
.console-nav button:hover { background: rgba(27, 29, 36, 0.05); color: var(--ink); }
.console-nav button.on { background: var(--paper-2); color: var(--ink); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.console-nav button .cnt {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  background: var(--paper-3);
  border-radius: 6px;
  padding: 2px 7px;
  color: var(--ink-soft);
}
.console-nav button.on .cnt { background: var(--blue-wash); color: var(--blue-deep); }

.console-head { display: flex; align-items: end; gap: 18px; margin-bottom: 24px; flex-wrap: wrap; }
.console-head h1 { font-size: clamp(28px, 3vw, 38px); }
.console-head p { margin: 6px 0 0; color: var(--ink-soft); font-size: 14.5px; }
.console-head .spacer { flex: 1; }

/* stats */
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.stat .s-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.stat .s-label i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.stat .s-label i.g { background: var(--green); }
.stat .s-label i.a { background: var(--amber); }
.stat strong { font-family: var(--font-display); font-size: 30px; font-weight: 600; letter-spacing: -0.01em; }
.stat small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-faint); }
.credit-stat {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper-2);
  box-shadow: 0 14px 28px -20px rgba(27, 29, 36, 0.7);
}
.credit-stat .s-label { color: rgba(251, 249, 242, 0.68); }
.credit-stat .s-label i.c { background: #e5b94f; box-shadow: 0 0 0 4px rgba(229, 185, 79, 0.14); }
.credit-stat strong { color: #fff; font-variant-numeric: tabular-nums; }
.credit-stat small { color: rgba(251, 249, 242, 0.62); line-height: 1.45; }
.credit-stat small b { display: block; color: #e5b94f; font-weight: 620; }

/* project grid */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 16px; }

.project-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
  text-align: left;
  padding: 0;
  display: block;
}
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }

.project-card .thumb {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9.6;
  border-bottom: 1px solid var(--line);
  background-color: #fdfcf8;
  background-image:
    linear-gradient(rgba(46, 76, 230, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 76, 230, 0.055) 1px, transparent 1px);
  background-size: 22px 22px;
  overflow: hidden;
}
.project-card .thumb svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.project-card .thumb .cloud-thumbnail { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.project-card .thumb .thumb-empty::after { content: ""; position: absolute; inset: 14% 10%; border: 1px solid rgba(46, 76, 230, 0.12); border-radius: 4px; background: rgba(255,255,255,.5); }
.project-card .sync-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4.5px 9px;
  border-radius: 999px;
  background: rgba(251, 249, 242, 0.92);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.project-card .sync-badge i { width: 6px; height: 6px; border-radius: 50%; }
.project-card .sync-badge.ok i { background: var(--green); }
.project-card .sync-badge.pending i { background: var(--amber); animation: pulse-dot 1.6s infinite; }

.project-card .pc-body { padding: 15px 17px 16px; }
.project-card .pc-name { font-size: 15.5px; font-weight: 620; letter-spacing: -0.01em; margin-bottom: 5px; display: flex; align-items: center; gap: 8px; }
.project-card .pc-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 10.8px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}
.project-card .pc-meta svg { flex: none; }

.project-card.new {
  display: grid;
  place-items: center;
  min-height: 220px;
  border-style: dashed;
  border-color: var(--line-strong);
  background: transparent;
  box-shadow: none;
  color: var(--ink-soft);
}
.project-card.new:hover { border-color: var(--blue); color: var(--blue-deep); background: rgba(46, 76, 230, 0.04); }
.project-card.new .plus {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1.5px dashed currentColor;
  display: grid;
  place-items: center;
  font-size: 22px;
  margin-bottom: 12px;
}
.project-card.new span { font-size: 14.5px; font-weight: 580; }

/* devices */
.devices { display: grid; gap: 12px; }
.device-row {
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 15px 18px;
  box-shadow: var(--shadow-sm);
}
.device-row .d-ico {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--paper);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink-2);
}
.device-row .d-who { line-height: 1.3; }
.device-row .d-who b { font-size: 15px; font-weight: 620; display: flex; align-items: center; gap: 8px; }
.device-row .d-who small { font-family: var(--font-mono); font-size: 10.8px; color: var(--ink-faint); letter-spacing: 0.05em; }
.device-row .d-state { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 12.8px; color: var(--ink-soft); }
.device-row .d-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.device-row .d-state.offline i { background: var(--ink-faint); }
.device-row .d-revoke {
  font-size: 12.5px;
  font-weight: 580;
  color: var(--ink-faint);
  padding: 7px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.device-row .d-revoke:hover { color: #b3402f; border-color: rgba(179, 64, 47, 0.4); }

.tag-this {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--blue-wash);
  color: var(--blue-deep);
  border-radius: 5px;
  padding: 2.5px 6px;
}

.cloud-now-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: -8px 0 20px;
  padding: 14px 16px;
  border: 1px solid rgba(47, 125, 79, 0.24);
  border-radius: 10px;
  background: rgba(47, 125, 79, 0.06);
}
.cloud-now-note div { color: var(--ink-soft); font-size: 13px; line-height: 1.55; }
.cloud-now-note b { display: block; color: var(--ink); }
.cloud-now-note span:last-child { display: block; }

.setup-guide {
  margin: 0 0 22px;
  border-block: 1px solid var(--line-strong);
  background: rgba(251, 249, 242, 0.48);
}
.setup-guide-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 19px 4px 15px;
}
.setup-guide-head > div { min-width: 0; }
.setup-guide-head h2 { margin-top: 3px; font-family: var(--font-ui); font-size: 20px; font-weight: 650; letter-spacing: 0; }
.setup-guide-head .library-kicker { margin: 0; }
.preview-pill {
  margin-left: auto;
  padding: 4px 9px;
  border: 1px solid rgba(160, 106, 18, 0.35);
  border-radius: 6px;
  background: rgba(160, 106, 18, 0.08);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
}
.setup-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.setup-step { display: grid; grid-template-columns: 25px minmax(0, 1fr); gap: 12px; padding: 20px 20px 22px 4px; }
.setup-step + .setup-step { border-left: 1px solid var(--line); padding-left: 20px; }
.setup-step > b {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper-2);
  font-family: var(--font-mono);
  font-size: 11px;
}
.setup-step strong { display: block; font-size: 14px; font-weight: 650; }
.setup-step p { margin: 5px 0 0; color: var(--ink-soft); font-size: 12.5px; line-height: 1.55; }
.setup-step small { display: block; margin-top: 9px; color: var(--ink-faint); font-size: 10.5px; line-height: 1.45; }
.installer-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.installer-actions button,
.installer-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 580;
}
.installer-actions button:hover,
.installer-actions a:hover { border-color: var(--blue); color: var(--blue-deep); }
.installer-actions a[aria-disabled="true"] { cursor: not-allowed; opacity: .5; }

.privacy-ledger-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-block: 1px solid rgba(47, 125, 79, 0.3);
  background: rgba(47, 125, 79, 0.055);
}
.privacy-ledger-note > span { color: var(--green); font-weight: 750; }
.privacy-ledger-note b { display: block; font-size: 13px; }
.privacy-ledger-note p { margin: 1px 0 0; color: var(--ink-soft); font-size: 12.5px; line-height: 1.5; }
.activity-summary { display: flex; flex-wrap: wrap; gap: 24px; padding: 15px 0; color: var(--ink-soft); font-size: 12.5px; }
.activity-summary b { color: var(--ink); font-family: var(--font-mono); font-size: 14px; }
.activity-list { display: grid; border-top: 1px solid var(--line); }
.activity-row {
  display: grid;
  grid-template-columns: 94px minmax(180px, 1fr) minmax(220px, .9fr) 70px;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 15px 4px;
  border-bottom: 1px solid var(--line);
}
.activity-state { display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-size: 11.5px; font-weight: 620; }
.activity-state i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.activity-row.failed .activity-state { color: #b3402f; }
.activity-main,
.activity-detail { display: grid; min-width: 0; line-height: 1.45; }
.activity-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 620; }
.activity-main span,
.activity-detail span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-faint); font-size: 10.8px; }
.activity-detail span:first-child { color: var(--ink-soft); font-size: 11.5px; }
.activity-row code { color: var(--ink-faint); font-family: var(--font-mono); font-size: 10px; }
.activity-loading { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 180px; color: var(--ink-soft); font-size: 13px; }
.activity-loading .spinner { border-color: rgba(27, 29, 36, 0.14); border-top-color: var(--blue); }

/* empty state */
.empty {
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r-md);
  padding: 44px 30px;
  text-align: center;
  color: var(--ink-soft);
  background: rgba(251, 249, 242, 0.5);
}
.empty .hand { font-size: 26px; display: block; margin-bottom: 8px; }
.empty p { margin: 0 auto 18px; max-width: 40ch; font-size: 14px; }

/* ---------- modal ---------- */

.modal-veil {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(27, 29, 36, 0.45);
  backdrop-filter: blur(4px);
  display: none;
  place-items: center;
  padding: 22px;
}
.modal-veil.open { display: grid; }

.modal {
  width: min(480px, 100%);
  background: var(--paper-2);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  padding: 28px;
  animation: modal-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(0.985); } }

.modal .m-head { display: flex; align-items: start; gap: 14px; margin-bottom: 6px; }
.modal .m-head h3 { font-size: 23px; }
.modal .m-close {
  margin-left: auto;
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
.modal .m-close:hover { color: var(--ink); border-color: var(--ink); }
.modal .m-sub { font-size: 13.8px; color: var(--ink-soft); line-height: 1.6; margin: 0 0 20px; }

.pair-code {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--ink);
  border-radius: var(--r-md);
  padding: 20px;
  margin-bottom: 18px;
}
.pair-code code {
  font-family: var(--font-mono);
  font-size: 26px;
  letter-spacing: 0.32em;
  color: var(--blue-soft);
  font-weight: 600;
  text-indent: 0.32em;
}
.pair-code button {
  color: rgba(251, 249, 242, 0.65);
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(251, 249, 242, 0.2);
}
.pair-code button:hover { color: #fff; border-color: rgba(251, 249, 242, 0.5); }

.pair-steps { margin: 0 0 20px; padding: 0; list-style: none; display: grid; gap: 11px; }
.pair-steps li { display: flex; gap: 12px; font-size: 13.8px; color: var(--ink-2); line-height: 1.5; }
.pair-steps li b {
  flex: none;
  width: 21px; height: 21px;
  border-radius: 50%;
  background: var(--blue-wash);
  color: var(--blue-deep);
  font-size: 11.5px;
  display: grid;
  place-items: center;
  margin-top: 1px;
}
.pair-steps code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--paper-3);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 5px;
  white-space: nowrap;
}

.pair-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-soft);
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--paper-3);
  border: 1px solid var(--line);
}
.pair-status .spinner { border-color: rgba(27, 29, 36, 0.18); border-top-color: var(--ink-soft); }
.pair-status.done { background: rgba(47, 125, 79, 0.1); border-color: rgba(47, 125, 79, 0.3); color: var(--green); font-weight: 560; }

/* toast */
.toast-zone { position: fixed; bottom: 22px; right: 22px; z-index: 120; display: grid; gap: 10px; }
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--paper-2);
  font-size: 13.8px;
  font-weight: 540;
  padding: 13px 18px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  animation: toast-in 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.toast i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.toast.warn i { background: var(--amber); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* settings panel */
.panel {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 16px;
}
.panel h3 { font-size: 19px; margin-bottom: 4px; font-family: var(--font-ui); font-weight: 640; letter-spacing: -0.01em; }
.panel .p-sub { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 20px; }
.button.danger-outline {
  color: #a83329;
  border: 1px solid rgba(168, 51, 41, 0.42);
  background: transparent;
}
.button.danger-outline:hover { color: #8d241c; border-color: #a83329; background: rgba(168, 51, 41, 0.06); }

.delete-account-modal { width: min(520px, 100%); }
.delete-account-modal .m-head { align-items: flex-start; margin-bottom: 18px; }
.delete-account-modal .m-head h3 { color: #8d241c; }
.delete-account-modal .m-head p { margin: 4px 0 0; color: var(--ink-soft); font-size: 13px; }
.danger-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(168, 51, 41, 0.1);
  border: 1px solid rgba(168, 51, 41, 0.28);
  color: #a83329;
  font: 700 16px/1 var(--font-mono);
}
.delete-account-warning {
  margin-bottom: 20px;
  padding: 15px 16px;
  border: 1px solid rgba(168, 51, 41, 0.22);
  border-radius: 10px;
  background: rgba(168, 51, 41, 0.045);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.55;
}
.delete-account-warning p { margin: 0; }
.delete-account-warning ul { margin: 8px 0; padding-left: 20px; }
.delete-social-confirm {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-3);
}
.delete-social-confirm p { margin: 0 0 14px; color: var(--ink-2); font-size: 13px; line-height: 1.55; }
.social-delete-button { width: 100%; justify-content: center; background: var(--paper-2); }
.delete-social-alternatives { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; color: var(--ink-faint); font-size: 11.5px; }
.delete-social-alternatives[hidden] { display: none; }
.delete-social-alternatives div { display: flex; gap: 6px; }
.delete-social-alternatives button { border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px; background: var(--paper-3); color: var(--ink-2); font: 650 11px/1 var(--font-ui); cursor: pointer; }
.delete-social-alternatives button:hover { border-color: var(--ink-faint); background: var(--paper-2); }
.delete-account-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.button.destructive { background: #a83329; color: #fff; border: 1px solid #a83329; }
.button.destructive:hover { background: #8d241c; border-color: #8d241c; }
.button.destructive:disabled { opacity: 0.46; cursor: not-allowed; }

@media (max-width: 560px) {
  .delete-account-actions { display: grid; }
  .delete-account-actions .button { width: 100%; justify-content: center; }
}

.account-recovery {
  min-height: calc(100vh - 64px);
  display: grid;
  place-items: center;
  padding: 40px 20px;
  background: radial-gradient(circle at 50% 0, rgba(46,76,230,.08), transparent 42%);
}
.account-recovery[hidden] { display: none; }
.account-recovery-card {
  width: min(620px, 100%);
  padding: clamp(28px, 6vw, 48px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper-2);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.account-recovery-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  border: 1px solid rgba(46,76,230,.25);
  border-radius: 50%;
  background: rgba(46,76,230,.08);
  color: var(--blue);
  font: 700 17px/1 var(--font-mono);
}
.account-recovery-card h1 { margin: 8px 0 14px; font: 650 clamp(25px, 5vw, 36px)/1.12 var(--font-ui); letter-spacing: -.025em; }
.account-recovery-card > p:not(.library-kicker):not(.account-recovery-local) { margin: 0 auto 22px; max-width: 520px; color: var(--ink-soft); line-height: 1.6; }
.account-recovery-note { display: grid; gap: 7px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper-3); text-align: left; }
.account-recovery-note b { color: var(--blue); }
.account-recovery-note span { color: var(--ink-soft); font-size: 13px; line-height: 1.55; }
.account-recovery-actions { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
.account-recovery-local { margin: 18px 0 0; color: var(--ink-faint); font-size: 12px; }
@media (max-width: 560px) { .account-recovery-actions { display: grid; } }

/* console views toggling */
.console-view { display: none; }
.console-view.on { display: block; animation: view-in 0.3s ease; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }

code.inline-code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--paper-3);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 5px;
  white-space: nowrap;
}

/* ---------- 404 ---------- */

.not-found {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.not-found::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-radial-gradient(circle at 50% 46%, rgba(46, 76, 230, 0.1) 0 1.5px, transparent 1.5px 56px);
  -webkit-mask-image: radial-gradient(circle at 50% 46%, #000, transparent 70%);
          mask-image: radial-gradient(circle at 50% 46%, #000, transparent 70%);
}
.not-found main { position: relative; max-width: 520px; }
.not-found .brand { display: inline-flex; margin-bottom: 40px; }
.not-found .brand img { height: 30px; }
.not-found .kicker { justify-content: center; }
.not-found h1 { font-size: clamp(34px, 5vw, 52px); margin-bottom: 18px; }
.not-found p.nf-sub { color: var(--ink-soft); margin: 0 0 30px; }
.not-found .hand { display: block; font-size: 24px; margin-bottom: 26px; transform: rotate(-1.4deg); }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; padding-top: 44px; }
  .stage { max-width: 560px; }
  .cloud-grid { grid-template-columns: 1fr; }
  .flow-grid { grid-template-columns: 1fr; }
  .demo-heading { grid-template-columns: 1fr; align-items: start; }
  .steps { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .model-support-head { grid-template-columns: 1fr; align-items: start; }
  .model-list { grid-template-columns: 1fr 1fr; }
  .metrics-band { grid-template-columns: 1fr 1fr; }
  .metrics-band > div:nth-child(3) { border-left: 0; }
  .metrics-band > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .community .wrap { grid-template-columns: 1fr; }
  .community .c-mark { display: none; }
  footer.site .wrap { grid-template-columns: 1fr 1fr; }
  .auth-body { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .console { grid-template-columns: 1fr; }
  .console-nav {
    position: static;
    display: flex;
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .console-nav .cn-label { display: none; }
  .console-nav button { white-space: nowrap; }
  .console-nav button .cnt { display: none; }
  .setup-steps { grid-template-columns: 1fr; }
  .setup-step { padding-inline: 4px; }
  .setup-step + .setup-step { border-left: 0; border-top: 1px solid var(--line); padding-left: 4px; }
  .activity-row { grid-template-columns: 92px minmax(0, 1fr) minmax(180px, .8fr); }
  .activity-row code { display: none; }
}

@media (max-width: 680px) {
  .wrap { width: calc(100% - 36px); }
  .kimi-friend { align-items: flex-start; flex-direction: column; width: 100%; padding: 8px; }
  .kimi-friend img { width: min(236px, 100%); }
  .kimi-friend-copy { max-width: none; }
  .nav { gap: 10px; }
  .nav nav { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .model-list { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; }
  .metrics-band { grid-template-columns: 1fr; }
  .metrics-band > div { border-left: 0; border-top: 1px solid var(--line); }
  .metrics-band > div:first-child { border-top: 0; }
  .sync-chip { right: 6px; top: -22px; }
  .console-top .who { display: none; }
  .auth-back { position: static; margin-bottom: 18px; }
  .trial-banner { align-items: flex-start; flex-direction: column; gap: 1px; text-align: left; }
  .cloud-now-note { flex-direction: column; }
  .activity-row { grid-template-columns: 1fr auto; gap: 7px 12px; }
  .activity-main { grid-column: 1 / -1; grid-row: 1; }
  .activity-state { grid-column: 2; grid-row: 2; justify-self: end; }
  .activity-detail { grid-column: 1 / -1; grid-row: 2; padding-right: 96px; }
  .activity-detail span { white-space: normal; }
}

/* Cloud library */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.scope-note,
.connection-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: -8px 0 18px;
  padding: 13px 15px;
  border: 1px solid rgba(46, 76, 230, 0.18);
  border-radius: 12px;
  background: rgba(46, 76, 230, 0.045);
}
.scope-note div,
.connection-note { font-size: 13px; line-height: 1.55; color: var(--ink-soft); }
.scope-note b,
.connection-note b { color: var(--ink); }
.scope-note div span { display: block; }
.scope-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  border-radius: 999px;
  padding: 4px 9px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.scope-badge.cloud { color: var(--blue-deep); background: var(--blue-wash); border-color: rgba(46, 76, 230, 0.18); }
.scope-badge.local { color: #286940; background: rgba(47, 125, 79, 0.1); border-color: rgba(47, 125, 79, 0.22); }
.scope-badge.relay { color: #8a5a16; background: rgba(190, 126, 34, 0.1); border-color: rgba(190, 126, 34, 0.22); }
.scope-badge.tiny { min-width: 0; padding: 3px 6px; font-size: 8px; }

#view-projects .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat .s-label i.c { background: #8d5bd6; }
.quota-track { display: block; height: 5px; margin-top: 10px; overflow: hidden; border-radius: 99px; background: var(--paper-3); }
.quota-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--blue); transition: width 0.25s ease; }

.library-shell {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.library-nav {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(251, 249, 242, 0.72);
  box-shadow: var(--shadow-sm);
}
.library-label,
.library-kicker {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.library-label { padding: 5px 8px; }
.library-nav > button,
.folder-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 8px 9px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 12.5px;
  text-align: left;
}
.library-nav > button:hover,
.folder-row:hover { background: rgba(27, 29, 36, 0.05); color: var(--ink); }
.library-nav > button.on,
.folder-row.on { color: var(--blue-deep); background: var(--blue-wash); }
.library-nav button b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 560; }
.library-nav button small { margin-left: auto; font-family: var(--font-mono); font-size: 9px; }
.library-folder-head { display: flex; align-items: center; margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.library-folder-head .library-label { flex: 1; }
.library-folder-head button { width: 25px; height: 25px; border-radius: 7px; color: var(--ink-soft); }
.library-folder-head button:hover { color: var(--blue-deep); background: var(--blue-wash); }
.folder-tree { display: grid; gap: 2px; }
.folder-entry { display: flex; align-items: center; min-width: 0; padding-left: calc(var(--depth, 0) * 11px); }
.folder-entry .folder-row { flex: 1; }
.folder-remove { flex: none; width: 24px; height: 24px; border-radius: 7px; color: transparent; }
.folder-entry:hover .folder-remove,
.folder-remove:focus-visible { color: var(--ink-faint); }
.folder-remove:hover { color: #b3402f; background: rgba(179, 64, 47, 0.08); }

.library-main { min-width: 0; }
.library-toolbar {
  display: flex;
  align-items: end;
  gap: 16px;
  margin-bottom: 14px;
}
.library-toolbar h2 { margin-top: 3px; font-family: var(--font-ui); font-size: 20px; font-weight: 650; }
.project-search { margin-left: auto; width: min(280px, 42%); }
.project-search input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper-2); color: var(--ink); }
.project-search input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(46, 76, 230, 0.1); outline: none; }

.library-main .projects { grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); }
.project-card { cursor: default; }
.project-card .pc-open { display: block; width: 100%; padding: 0; text-align: left; }
.project-card .pc-open:focus-visible { outline: 3px solid rgba(46, 76, 230, 0.28); outline-offset: -3px; }
.pc-title-row { display: flex; align-items: flex-start; gap: 8px; }
.pc-title-row .pc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-star { flex: none; width: 29px; height: 29px; margin-top: -5px; border-radius: 8px; color: var(--ink-faint); font-size: 18px; }
.pc-star:hover,
.pc-star.on { color: #b97815; background: rgba(185, 120, 21, 0.1); }
.project-card .pc-meta { flex-wrap: wrap; min-height: 30px; line-height: 1.5; }
.pc-actions { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
.pc-actions select,
.pc-actions button {
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 11px;
}
.pc-actions select { flex: 1; max-width: 135px; }
.pc-actions button:hover { color: var(--ink); border-color: var(--line-strong); }
.pc-actions button.danger:hover { color: #b3402f; border-color: rgba(179, 64, 47, 0.35); }
.pc-actions button.restore { color: var(--green); }
.project-card.new { align-content: center; }
.project-card.new small { display: block; margin-top: 5px; color: var(--ink-faint); font-family: var(--font-mono); font-size: 9.5px; }

.connection-note { margin: 0 0 16px; }
.connection-note { display: grid; grid-template-columns: auto 1fr; }
.connection-note b { font-size: 13px; }
.setting-facts { display: grid; gap: 12px; }
.setting-facts > div { display: grid; grid-template-columns: 70px 1fr; align-items: start; gap: 12px; padding: 12px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); }
.setting-facts p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.55; }

@media (max-width: 1220px) {
  #view-projects .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .library-shell { grid-template-columns: 1fr; }
  .library-nav { position: static; grid-template-columns: repeat(4, max-content); overflow-x: auto; }
  .library-label,
  .library-folder-head,
  .folder-tree { grid-column: 1 / -1; }
  .folder-tree { display: flex; overflow-x: auto; }
  .folder-entry { padding-left: 0; min-width: 150px; }
  .library-toolbar { align-items: stretch; flex-direction: column; }
  .project-search { width: 100%; margin-left: 0; }
  #view-projects .stat-row { grid-template-columns: 1fr; }
  .connection-note { grid-template-columns: 1fr; }
}

/* ============================================================
   Launch redesign — hero offer, access architecture,
   open source, final CTA, auth aside panels
   ============================================================ */

/* ---------- hero launch offer ---------- */

.launch-offer {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 14px 18px;
  border: 1px solid rgba(46, 76, 230, 0.22);
  border-radius: var(--r-md);
  background: linear-gradient(120deg, rgba(46, 76, 230, 0.07), rgba(46, 76, 230, 0.02));
  box-shadow: var(--shadow-sm);
}

.launch-offer .lo-badge {
  flex: none;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 8px 18px -8px rgba(46, 76, 230, 0.6);
}

.launch-offer p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.launch-offer strong { color: var(--blue-deep); font-weight: 700; }
.launch-offer time { white-space: nowrap; }

/* ---------- ways to access PenEcho ---------- */

.ways {
  position: relative;
  padding-block: clamp(72px, 10vh, 120px);
  background:
    radial-gradient(52% 42% at 12% 8%, rgba(46, 76, 230, 0.07), transparent 70%),
    radial-gradient(46% 40% at 90% 92%, rgba(47, 125, 79, 0.06), transparent 70%),
    var(--paper-2);
  border-block: 1px solid var(--line);
}

.ways-head { max-width: 760px; }
.ways-head .lead b { color: var(--green); font-weight: 650; }
.ways-head code, .relay-head code { color: var(--blue-deep); font-family: var(--font-mono); font-size: .88em; overflow-wrap: anywhere; }

.ways-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 32px);
  align-items: stretch;
}

.way-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 34px);
  border-radius: var(--r-lg);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.way-hosted { border-top: 3px solid var(--blue); }
.way-byok { border-top: 3px solid var(--green); }

.way-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.way-no {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.way-badge {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.badge-blue { background: var(--blue-wash); color: var(--blue-deep); }
.badge-green { background: rgba(47, 125, 79, 0.12); color: #22603c; }

.way-card h3 { font-size: clamp(23px, 2.2vw, 28px); margin-bottom: 10px; }
.way-sub { margin: 0 0 18px; font-size: 15px; line-height: 1.6; color: var(--ink-soft); }
.way-sub b { color: var(--green); font-weight: 650; }

.way-points,
.way-steps {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.way-points li,
.way-steps li {
  position: relative;
  padding-left: 26px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
}

.way-points li b,
.way-steps li b { font-weight: 640; color: var(--ink); }

.way-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--paper) 32%, transparent 34%),
    conic-gradient(var(--blue) 0 100%);
}

.way-steps { counter-reset: waystep; }

.way-steps li::before {
  counter-increment: waystep;
  content: counter(waystep);
  position: absolute;
  left: 0;
  top: 1px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(47, 125, 79, 0.14);
  color: #22603c;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.way-steps a { color: var(--blue-deep); font-weight: 560; border-bottom: 1px solid rgba(29, 52, 176, 0.3); }
.way-steps a:hover { border-bottom-color: var(--blue-deep); }

.cmd-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--ink);
  box-shadow: var(--shadow-sm);
}

.cmd-chip code {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #dfe5ff;
  white-space: nowrap;
}

.cmd-chip button {
  flex: none;
  padding: 4px 11px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 11px;
  font-weight: 650;
}

.cmd-chip button:hover { background: rgba(255, 255, 255, 0.22); }

.way-offer {
  display: grid;
  gap: 2px;
  margin-bottom: 20px;
  padding: 13px 16px;
  border-radius: var(--r-sm);
  background: var(--blue-wash);
  border: 1px dashed rgba(46, 76, 230, 0.4);
}

.way-offer strong { font-size: 16px; color: var(--blue-deep); font-weight: 700; }
.way-offer span { font-size: 12.5px; color: var(--ink-soft); }

.way-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: auto; }

.way-best {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-faint);
  font-style: italic;
}

.ways-note {
  margin: clamp(26px, 4vh, 40px) auto 0;
  max-width: 640px;
  text-align: center;
  font-size: 14.5px;
  color: var(--ink-soft);
}

.onboarding-journey {
  display: grid;
  grid-template-columns: minmax(220px, .7fr) minmax(0, 1.5fr);
  gap: clamp(24px, 4vw, 48px);
  margin-top: clamp(28px, 5vh, 48px);
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--paper) 90%, var(--blue-wash));
  box-shadow: var(--shadow-sm);
}
.onboarding-copy h3 { margin: 5px 0 9px; font-size: clamp(21px, 2.4vw, 28px); }
.onboarding-copy > p:last-child { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
.onboarding-journey ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.onboarding-journey li { display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 10px; align-content: center; min-width: 0; min-height: 74px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); }
.onboarding-journey li > span { grid-row: 1 / 3; align-items: center; align-self: center; background: var(--blue-wash); border-radius: 50%; color: var(--blue-deep); display: inline-flex; font: 700 10px/1 var(--font-mono); height: 34px; justify-content: center; width: 34px; }
.onboarding-journey li:nth-child(4) > span { background: rgba(47, 125, 79, .12); color: #22603c; }
.onboarding-journey li b { min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.onboarding-journey li small { min-width: 0; overflow-wrap: anywhere; color: var(--ink-faint); font-size: 11px; line-height: 1.45; }

/* ---------- relay map ---------- */

.relay {
  margin-top: clamp(48px, 8vh, 88px);
  padding: clamp(26px, 3.4vw, 44px);
  border-radius: var(--r-lg);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.relay-head { max-width: 720px; margin-bottom: clamp(26px, 4vh, 40px); }
.relay-head h3 { font-size: clamp(24px, 2.6vw, 32px); margin-bottom: 12px; }
.relay-head p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--ink-soft); }

.relay-map {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 54px minmax(0, 1.15fr) 54px minmax(0, 1.1fr) 54px minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
}

.rm-zone {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--paper-2);
  border: 1px solid var(--line);
}

.rm-cloud { border-color: rgba(46, 76, 230, 0.35); background: linear-gradient(180deg, rgba(46, 76, 230, 0.05), var(--paper-2)); }
.rm-home { border-color: rgba(47, 125, 79, 0.4); background: linear-gradient(180deg, rgba(47, 125, 79, 0.06), var(--paper-2)); }

.rm-place {
  display: grid;
  gap: 1px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.rm-place small {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--ink-faint);
}

.rm-node {
  display: grid;
  justify-items: start;
  gap: 4px;
  padding: 14px;
  border-radius: var(--r-sm);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
  color: var(--ink-2);
}

.rm-node b { min-width: 0; overflow-wrap: anywhere; font-size: 14px; color: var(--ink); }
.rm-node small { min-width: 0; overflow-wrap: anywhere; font-size: 11.5px; color: var(--ink-faint); line-height: 1.4; }
.rm-relay { border-color: rgba(46, 76, 230, 0.45); }
.rm-local { border-color: rgba(47, 125, 79, 0.5); }

.rm-warning {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.rm-warning b { color: var(--maroon); font-weight: 650; }

.rm-cloud-services { display: grid; gap: 2px; padding-top: 9px; border-top: 1px solid var(--line); font-size: 10.5px; line-height: 1.45; }
.rm-cloud-services b { color: var(--blue-deep); overflow-wrap: anywhere; }
.rm-cloud-services span { color: var(--ink-faint); overflow-wrap: anywhere; }

.rm-key {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: rgba(47, 125, 79, 0.1);
  border: 1px dashed rgba(47, 125, 79, 0.45);
  color: #22603c;
  font-size: 11.5px;
  line-height: 1.45;
}

.rm-key svg { flex: none; margin-top: 1px; }
.rm-key b { color: #1b4f30; }

.rm-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.rm-line {
  position: absolute;
  top: 50%;
  left: 8px;
  right: 8px;
  height: 2px;
  background: linear-gradient(90deg, var(--line-strong), var(--blue-soft), var(--line-strong));
  transform: translateY(-50%);
}

.rm-step {
  position: relative;
  z-index: 1;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px var(--paper);
}

.rm-step-back { background: var(--green); }

.relay-legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: clamp(24px, 4vh, 36px) 0 0;
  padding: 0;
  list-style: none;
}

.relay-legend li {
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--paper-2);
  border: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.relay-legend b { display: block; color: var(--ink); font-weight: 640; margin-bottom: 2px; }

/* ---------- PenEcho runtime and access architecture ---------- */

.runtime-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr);
  gap: clamp(18px, 2.5vw, 28px);
  align-items: stretch;
}

.runtime-card {
  min-width: 0;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.runtime-host { border-top: 3px solid var(--green); }
.runtime-mobile { border-top: 3px solid var(--blue); }
.runtime-cloud {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(260px, .82fr) minmax(0, 1.18fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  border-top: 3px solid var(--blue);
  background: linear-gradient(112deg, var(--paper) 0 42%, rgba(46, 76, 230, .045) 100%);
}

.runtime-cloud-copy { min-width: 0; }
.runtime-cloud .runtime-label { background: var(--blue-wash); color: var(--blue-deep); }
.runtime-cloud .runtime-title > svg { background: var(--blue-wash); color: var(--blue-deep); }
.runtime-cloud .runtime-title p strong { color: var(--ink); font-weight: 680; }

.runtime-cloud-actions {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 22px;
}

.runtime-cloud-actions small {
  min-width: 0;
  color: var(--ink-faint);
  font-size: 11.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.runtime-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 18px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(47, 125, 79, .11);
  color: #22603c;
  font: 700 10px/1.2 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.runtime-mobile .runtime-label { background: var(--blue-wash); color: var(--blue-deep); }

.runtime-title {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.runtime-title > svg {
  width: 42px;
  height: 42px;
  padding: 9px;
  border-radius: 12px;
  background: rgba(47, 125, 79, .1);
  color: var(--green);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.runtime-mobile .runtime-title > svg { background: var(--blue-wash); color: var(--blue-deep); }
.runtime-title h3 { margin: 0 0 7px; font-size: clamp(21px, 2.3vw, 28px); overflow-wrap: anywhere; }
.runtime-title p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.65; }

.runtime-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.runtime-platforms span {
  min-width: 0;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 650;
}

.runtime-platforms code { font-family: var(--font-mono); font-size: .95em; }

.runtime-actions {
  display: grid;
  grid-template-columns: max-content minmax(240px, 1fr);
  gap: 12px;
  align-items: stretch;
  margin-top: 20px;
}

.runtime-actions .button { min-height: 46px; }
.runtime-actions .cmd-chip { min-width: 0; margin: 0; }

.runtime-facts {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.runtime-facts li {
  position: relative;
  padding-left: 22px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.55;
}

.runtime-facts li::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 2px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--blue);
  border-radius: 50%;
}

.access-map { display: grid; gap: 14px; }

.access-path {
  min-width: 0;
  padding: clamp(16px, 2.2vw, 22px);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: var(--r-md);
  background: var(--paper-2);
}

.path-remote { border-left-color: var(--blue); background: linear-gradient(90deg, rgba(46, 76, 230, .045), var(--paper-2) 42%); }
.path-mobile { border-left-color: var(--blue-deep); }

.access-path > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.access-path > header span {
  color: var(--ink);
  font: 750 11px/1.3 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.access-path > header b {
  color: var(--ink-faint);
  font-size: 11.5px;
  font-weight: 620;
  text-align: right;
}

.access-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(70px, .42fr) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.path-remote .access-flow,
.path-mobile .access-flow,
.cloud-project-flow {
  grid-template-columns: minmax(0, 1fr) minmax(64px, .35fr) minmax(0, 1fr) minmax(64px, .35fr) minmax(0, 1fr);
}

.cloud-project-flow { min-width: 0; }
.cloud-project-flow .access-node { background: rgba(255, 255, 255, .72); }

.access-node {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-content: center;
  min-width: 0;
  min-height: 88px;
  padding: 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.access-node > svg {
  grid-row: 1 / 3;
  width: 30px;
  height: 30px;
  padding: 5px;
  border-radius: 9px;
  background: rgba(93, 120, 242, .1);
  color: var(--blue-deep);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.access-node strong,
.access-node small { min-width: 0; overflow-wrap: anywhere; }
.access-node strong { align-self: end; color: var(--ink); font-size: 13px; line-height: 1.35; }
.access-node small { align-self: start; margin-top: 3px; color: var(--ink-faint); font-size: 10.5px; line-height: 1.4; }
.access-node code { font-family: var(--font-mono); font-size: .95em; }
.access-host { border-color: rgba(47, 125, 79, .42); }
.access-host > svg { background: rgba(47, 125, 79, .1); color: var(--green); }
.access-cloud { border-color: rgba(46, 76, 230, .42); }
.access-api > svg { background: rgba(47, 125, 79, .1); color: var(--green); }

.access-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  color: var(--blue-deep);
}

.access-connector small {
  max-width: 100%;
  margin-bottom: 3px;
  color: var(--ink-faint);
  font: 650 8.5px/1.25 var(--font-mono);
  letter-spacing: .03em;
  text-align: center;
  overflow-wrap: anywhere;
}

.access-connector svg { width: min(64px, 100%); height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.access-path > p { margin: 13px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }

.host-onboarding {
  display: grid;
  grid-template-columns: minmax(190px, .55fr) minmax(0, 1.45fr);
  gap: clamp(20px, 3vw, 34px);
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.host-onboarding h4 { margin: 5px 0 7px; font-size: clamp(19px, 2vw, 24px); }
.host-onboarding > div > p:last-child { margin: 0; color: var(--ink-soft); font-size: 12.5px; line-height: 1.55; }
.host-onboarding ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0; padding: 0; list-style: none; }
.host-onboarding li { display: grid; grid-template-columns: 30px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 9px; min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper-2); }
.host-onboarding li > span { display: grid; grid-row: 1 / 3; place-items: center; align-self: center; width: 30px; height: 30px; border-radius: 50%; background: var(--blue-wash); color: var(--blue-deep); font: 750 10px/1 var(--font-mono); }
.host-onboarding li b,
.host-onboarding li small { min-width: 0; overflow-wrap: anywhere; }
.host-onboarding li b { color: var(--ink); font-size: 12.5px; }
.host-onboarding li small { margin-top: 2px; color: var(--ink-faint); font-size: 10.5px; line-height: 1.4; }
.host-onboarding code { font-family: var(--font-mono); font-size: .92em; }
.relay-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

/* ---------- open source ---------- */

.oss { padding-block: clamp(72px, 10vh, 120px); }

.oss-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}

.oss-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 4px;
}

.oss-facts div {
  display: grid;
  gap: 2px;
  padding: 12px 18px;
  border-radius: var(--r-sm);
  background: var(--paper-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.oss-facts b { font-family: var(--font-mono); font-size: 14px; color: var(--blue-deep); }
.oss-facts span { font-size: 11.5px; color: var(--ink-faint); }

.oss .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 26px; }

.oss-stars {
  margin: 0;
  padding: clamp(18px, 2.4vw, 28px);
  border-radius: var(--r-lg);
  background: var(--paper-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.oss-stars figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.oss-stars figcaption b { font-size: 15px; font-weight: 650; }
.oss-stars figcaption span { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }

.oss-stars-frame {
  display: block;
  overflow: hidden;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: #fff;
}

.oss-stars-frame img { width: 100%; height: auto; min-height: 180px; object-fit: cover; }

.oss-stars-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 16px;
}

.oss-stars-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--blue-deep);
  border-bottom: 1px solid rgba(29, 52, 176, 0.25);
}

.oss-stars-links a:hover { border-bottom-color: var(--blue-deep); }

/* ---------- final CTA ---------- */

.final-cta {
  background: linear-gradient(140deg, #1d2f9e, var(--blue) 55%, #3d5cf0);
  color: #fff;
  text-align: center;
}

.final-cta .wrap { padding-block: clamp(72px, 11vh, 128px); }

.final-cta .kicker { justify-content: center; color: rgba(255, 255, 255, 0.7); }
.final-cta .kicker::before { border-color: #fff; }
.final-cta h2 { color: #fff; }
.final-cta h2 em { color: rgba(255, 255, 255, 0.82); }
.final-cta p { margin: 18px auto 0; max-width: 52ch; color: rgba(255, 255, 255, 0.8); font-size: 16px; line-height: 1.65; }
.final-cta .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 32px; }

/* ---------- auth aside panels ---------- */

.auth-aside .a-ways {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.a-way {
  padding: 15px 17px;
  border-radius: var(--r-sm);
  background: rgba(251, 249, 242, 0.06);
  border: 1px solid rgba(251, 249, 242, 0.16);
}

.a-way-tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.a-way-tag.tag-blue { background: rgba(93, 120, 242, 0.22); color: #b9c6ff; }
.a-way-tag.tag-green { background: rgba(94, 190, 128, 0.18); color: #9fe0b8; }

.a-way b { display: block; font-size: 14.5px; font-weight: 650; color: #f5f3ec; margin-bottom: 4px; }
.auth-aside .a-way p { margin: 0; font-size: 12.8px; line-height: 1.6; color: rgba(233, 231, 223, 0.62); max-width: none; }

.auth-aside .a-quote { font-family: var(--font-ui); font-size: 16.5px; line-height: 1.55; transform: none; color: rgba(233, 231, 223, 0.88); }
.auth-aside .a-quote b { color: #fff; }

/* ---------- downloads extras ---------- */

.downloads-hero-alt { margin: 18px 0 0; font-size: 13.5px; color: var(--ink-soft); }
.downloads-hero-alt a { color: var(--blue-deep); font-weight: 600; border-bottom: 1px solid rgba(29, 52, 176, 0.3); }
.downloads-hero-alt a:hover { border-bottom-color: var(--blue-deep); }

/* ---------- public Craft loop ---------- */

.craft-home-callout {
  align-items: center;
  background: var(--ink);
  border-radius: var(--r-lg);
  color: #fff;
  display: grid;
  gap: clamp(24px, 4vw, 54px);
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, .9fr) auto;
  margin-top: 28px;
  padding: clamp(28px, 4vw, 48px);
}
.craft-home-callout .kicker { color: #aeb9ff; }
.craft-home-callout h3 { font-family: var(--font-display); font-size: clamp(30px, 3.8vw, 48px); font-weight: 500; letter-spacing: -.04em; line-height: 1; margin: 0; }
.craft-home-callout > div > p:last-child { color: rgba(255,255,255,.7); line-height: 1.65; margin: 15px 0 0; max-width: 58ch; }
.craft-home-callout ol { display: grid; gap: 11px; list-style: none; margin: 0; padding: 0; }
.craft-home-callout li { border-bottom: 1px solid rgba(255,255,255,.13); display: grid; gap: 3px; grid-template-columns: 34px minmax(0,1fr); padding: 0 0 11px; }
.craft-home-callout li:last-child { border-bottom: 0; }
.craft-home-callout li span { color: #aeb9ff; font-family: var(--font-mono); font-size: 10px; grid-row: 1 / 3; padding-top: 2px; }
.craft-home-callout li b { font-size: 13px; }
.craft-home-callout li small { color: rgba(255,255,255,.62); font-size: 11px; line-height: 1.45; }
.craft-home-callout > .button { white-space: nowrap; }

/* ---------- responsive additions ---------- */

@media (max-width: 1020px) {
  .craft-home-callout { grid-template-columns: 1fr 1fr; }
  .craft-home-callout > .button { justify-self: start; }
  .ways-grid { grid-template-columns: 1fr; }
  .runtime-grid { grid-template-columns: 1fr; }
  .onboarding-journey { grid-template-columns: 1fr; }
  .oss-grid { grid-template-columns: 1fr; }
  .relay-map { grid-template-columns: 1fr; gap: 0; }
  .rm-link { flex-direction: row; height: 46px; }
  .rm-line { left: 50%; right: auto; top: 6px; bottom: 6px; width: 2px; height: auto; transform: translateX(-50%); background: linear-gradient(180deg, var(--line-strong), var(--blue-soft), var(--line-strong)); }
  .rm-link .rm-step { margin-left: 14px; }
  .rm-link .rm-step:first-child { margin-left: 0; }
  .relay-legend { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .access-flow,
  .path-remote .access-flow,
  .path-mobile .access-flow,
  .cloud-project-flow { grid-template-columns: minmax(0, 1fr); }
  .runtime-cloud { grid-template-columns: minmax(0, 1fr); }
  .access-connector { min-height: 42px; }
  .access-connector small { margin: 0 0 2px; }
  .access-connector svg { width: 48px; transform: rotate(90deg); }
  .access-node strong { font-size: 14px; }
  .access-node small { font-size: 12px; }
  .access-connector small { font-size: 10px; }
  .access-path > p { font-size: 13px; }
  .host-onboarding { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .craft-home-callout { grid-template-columns: 1fr; }
  .launch-offer { align-items: flex-start; flex-direction: column; gap: 10px; }
  .relay-legend { grid-template-columns: 1fr; }
  .oss-facts { display: grid; grid-template-columns: 1fr 1fr; }
  .way-actions .button { width: 100%; justify-content: center; }
  .onboarding-journey ol { grid-template-columns: 1fr; }
  .runtime-actions { grid-template-columns: 1fr; }
  .runtime-actions .button { width: 100%; justify-content: center; }
  .runtime-cloud-actions { grid-template-columns: 1fr; }
  .runtime-cloud-actions .button { width: 100%; justify-content: center; }
  .access-path > header { align-items: flex-start; flex-direction: column; gap: 4px; }
  .access-path > header b { text-align: left; }
  .host-onboarding ol { grid-template-columns: 1fr; }
  .relay-actions .button { width: 100%; justify-content: center; }
}
