@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/media/fonts/manrope-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/media/fonts/geist-latin.v5.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/media/fonts/geist-mono-latin.v6.woff2") format("woff2");
}

@view-transition {
  navigation: auto;
}

:root {
  /* Antigravity airy gallery light palette + cobalt-slate accent */
  --bg: #ffffff;
  --paper: #ffffff;
  --surface: #ffffff;
  --subtle: #f8f9fc;
  --raise: #f4f6fa;
  --sand: #eff2f7;
  --ink: #121317;
  --body: #32343a;
  --muted: #5c6069;
  --muted-band: #45474d;
  --faint: #8e94a0;
  --line: #e6eaf0;
  --line-soft: #eff2f7;
  --accent: #2c64ed;
  --accent-bright: #4f85ff;
  --accent-ink: #1e4ec4;
  --accent-soft: #edf3ff;
  --on-accent: #ffffff;
  --comp-bar: #d5dce6;
  --deep: #121317;
  --deep-surface: #181a20;
  --deep-ink: #f8f9fc;
  --deep-body: #c5cbd6;
  --deep-muted: #8a919e;
  --deep-line: rgba(255, 255, 255, 0.1);
  --danger: #c63b32;
  --danger-soft: #fdeeee;
  --ok: #1f7a4a;
  --ok-soft: #eaf7f0;
  --chart: #2c64ed;
  --shadow-float: 0 2px 6px rgba(18, 19, 23, 0.04), 0 20px 48px -20px rgba(18, 19, 23, 0.14);
  --shadow-soft: 0 1px 3px rgba(18, 19, 23, 0.04), 0 10px 28px -16px rgba(18, 19, 23, 0.1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --display: "Manrope", "Geist", -apple-system, BlinkMacSystemFont, sans-serif;
  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0c0d10;
  --paper: #0c0d10;
  --surface: #13151a;
  --subtle: #171920;
  --raise: #121419;
  --sand: #1c1f27;
  --ink: #ffffff;
  --body: rgba(248, 249, 252, 0.8);
  --muted: rgba(248, 249, 252, 0.52);
  --muted-band: rgba(248, 249, 252, 0.66);
  --faint: rgba(248, 249, 252, 0.34);
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.06);
  --accent: #7da6ff;
  --accent-bright: #9bbbff;
  --accent-ink: #a8c4ff;
  --accent-soft: rgba(79, 133, 255, 0.14);
  --on-accent: #0c0d10;
  --comp-bar: rgba(255, 255, 255, 0.24);
  --deep: #08090c;
  --deep-surface: #121419;
  --deep-ink: #ffffff;
  --deep-body: rgba(248, 249, 252, 0.74);
  --deep-muted: rgba(248, 249, 252, 0.45);
  --deep-line: rgba(255, 255, 255, 0.09);
  --danger: #f08780;
  --danger-soft: rgba(240, 135, 128, 0.14);
  --ok: #75cc98;
  --ok-soft: rgba(117, 204, 152, 0.14);
  --chart: #7da6ff;
  --shadow-float: 0 2px 6px rgba(0, 0, 0, 0.35), 0 24px 56px -24px rgba(0, 0, 0, 0.85);
  --shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.28), 0 10px 26px -16px rgba(0, 0, 0, 0.65);
  color-scheme: dark;
}

.page-glow {
  background-image: none;
}
html[data-theme="dark"] .page-glow {
  background-image: none;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 400 15.5px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

p { margin: 0; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
  transition: color 0.14s var(--ease-out), text-decoration-color 0.14s var(--ease-out);
}
a:hover { color: var(--accent-ink); text-decoration-color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

code, pre, kbd, .mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
code {
  font-size: 0.88em;
  color: var(--ink);
  background: var(--subtle);
  padding: 2px 6px;
  border-radius: 5px;
}
pre {
  margin: 0;
  font-size: 13px;
  line-height: 1.58;
  overflow-x: auto;
}
pre code { background: none; padding: 0; font-size: inherit; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.muted { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ------------------------------------------------------------------ hairline scroll progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-bright);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 60;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    @keyframes hwc-scroll-progress {
      from { transform: scaleX(0); }
      to { transform: scaleX(1); }
    }
    .scroll-progress {
      animation: hwc-scroll-progress auto linear both;
      animation-timeline: scroll(root);
    }
  }
}

/* ------------------------------------------------------------------ topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 62px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color 0.22s var(--ease-out), border-color 0.22s var(--ease-out), color 0.22s var(--ease-out);
}
.topbar.floating {
  position: fixed;
  inset: 0 0 auto 0;
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.topbar.floating.over-dark {
  color: #f5f4f0;
}
.topbar.floating.over-dark .brand { color: #ffffff; }
.topbar.floating.over-dark .brand span { color: rgba(255, 255, 255, 0.56); }
.topbar.floating.over-dark .topnav a { color: rgba(255, 255, 255, 0.72); }
.topbar.floating.over-dark .topnav a:hover { color: #ffffff; background: rgba(255, 255, 255, 0.08); }
.topbar.floating.over-dark .btn-ghost { color: rgba(255, 255, 255, 0.78); }
.topbar.floating.over-dark .btn-ghost:hover { color: #ffffff; background: rgba(255, 255, 255, 0.08); }
.topbar.floating.over-dark .icon-btn { color: rgba(255, 255, 255, 0.72); }
.topbar.floating.over-dark .icon-btn:hover { color: #ffffff; background: rgba(255, 255, 255, 0.08); }
.topbar.floating.over-dark .top-user { color: rgba(255, 255, 255, 0.72); }
.topbar.floating.over-dark .btn-primary { background: #ffffff; border-color: #ffffff; color: #0b0c0e; }
.topbar.floating.over-dark .btn-primary:hover { background: #e6eaee; border-color: #e6eaee; color: #0b0c0e; }

.topbar.floating.scrolled {
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  border-bottom-color: var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.topbar.floating.over-dark.scrolled {
  background: rgba(11, 12, 14, 0.78);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.topbar-in {
  max-width: 1220px;
  height: 100%;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.topbar.full { height: 56px; }
.topbar.full .topbar-in { max-width: none; padding: 0 20px; gap: 16px; }

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  flex-shrink: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -0.015em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); text-decoration: none; }
.brand span {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.topnav a {
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.14s var(--ease-out), background-color 0.14s var(--ease-out);
}
.topnav a:hover { color: var(--ink); background: var(--subtle); text-decoration: none; }
.topnav a[aria-current="page"] { color: var(--ink); font-weight: 500; background: var(--subtle); }

.top-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.top-user {
  font-size: 13px;
  color: var(--muted);
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}
.top-user:hover { color: var(--ink); }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: 500 13.5px/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.14s var(--ease-out), border-color 0.14s var(--ease-out), color 0.14s var(--ease-out), transform 0.12s var(--ease-out);
}
.btn:hover { background: var(--subtle); border-color: color-mix(in srgb, var(--ink) 28%, var(--line)); color: var(--ink); text-decoration: none; }
.btn:active { transform: scale(0.975); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }

.btn-pill { border-radius: 999px; }

.btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--ink) 84%, var(--bg));
  border-color: color-mix(in srgb, var(--ink) 84%, var(--bg));
  color: var(--bg);
}

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.btn-accent:hover { filter: brightness(1.08); color: var(--on-accent); }

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.btn-ghost:hover { background: var(--subtle); border-color: transparent; color: var(--ink); }

.btn-danger { background: var(--danger); border-color: var(--danger); color: #ffffff; }
.btn-danger.btn-ghost { background: transparent; border-color: var(--line); color: var(--danger); }
.btn-danger.btn-ghost:hover { background: var(--danger-soft); }

.btn-sm { min-height: 32px; padding: 0 13px; font-size: 12.5px; }
.btn-lg { min-height: 44px; padding: 0 22px; font-size: 14.5px; }

.icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.14s var(--ease-out), color 0.14s var(--ease-out), transform 0.12s var(--ease-out);
}
.icon-btn:hover { background: var(--subtle); color: var(--ink); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn.busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.busy::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  color: var(--ink);
  animation: hwc-spin 0.65s linear infinite;
}
.btn-primary.busy::after { color: var(--bg); }
.btn-danger.busy::after { color: #ffffff; }
@keyframes hwc-spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ inputs & forms */
.field { display: grid; gap: 6px; }
.field > span, .field > label { font-size: 12.5px; font-weight: 500; color: var(--muted); }

.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: 14px/1.45 var(--font);
  transition: border-color 0.14s var(--ease-out);
}
.input, .select { height: 39px; padding: 0 12px; }
.select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 32px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238e94a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px 14px;
}
.textarea { padding: 10px 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); }
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: 0.72; }

/* ------------------------------------------------------------------ custom model picker popover */
.mp-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.mp-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.mp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--body);
  font: 500 13.5px/1 var(--font);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.14s var(--ease-out), color 0.14s var(--ease-out);
}
.mp-btn:hover,
.mp-wrap.is-open .mp-btn {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink);
}
.mp-btn.is-active {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.mp-btn.is-active .mp-chev {
  color: var(--accent-ink);
}
.mp-ico {
  display: inline-grid;
  place-items: center;
}
.mp-ico svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mp-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.mp-chev {
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  transition: transform 0.16s var(--ease-out), color 0.14s var(--ease-out);
}
.mp-chev svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mp-wrap.is-open .mp-chev {
  transform: rotate(180deg);
  color: var(--ink);
}

.mp-menu {
  position: absolute;
  left: 0;
  z-index: 60;
  min-width: 264px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 14px 36px rgba(18, 19, 23, 0.12), 0 3px 10px rgba(18, 19, 23, 0.06);
  display: grid;
  gap: 2px;
  animation: mp-pop 0.14s var(--ease-out) both;
}
html[data-theme="dark"] .mp-menu {
  background: #1b1d23;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.58), 0 4px 12px rgba(0, 0, 0, 0.35);
}
.mp-up .mp-menu {
  bottom: calc(100% + 8px);
  transform-origin: left bottom;
}
.mp-down .mp-menu {
  top: calc(100% + 8px);
  transform-origin: left top;
}
@keyframes mp-pop {
  from { opacity: 0; transform: scale(0.96) translateY(3px); }
  to { opacity: 1; transform: none; }
}

.mp-opt {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s var(--ease-out);
}
.mp-opt:hover,
.mp-opt:focus-visible {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  outline: none;
}
.mp-opt[aria-selected="true"] {
  background: var(--accent-soft);
}
.mp-opt-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.mp-opt-name {
  font: 500 13.5px/1.25 var(--font);
  color: var(--ink);
}
.mp-opt[aria-selected="true"] .mp-opt-name {
  color: var(--accent-ink);
}
.mp-opt-note {
  font: 400 12px/1.3 var(--font);
  color: var(--muted);
}
.mp-check {
  width: 16px;
  height: 16px;
  flex: none;
  display: inline-grid;
  place-items: center;
  color: var(--accent);
  opacity: 0;
}
.mp-opt[aria-selected="true"] .mp-check {
  opacity: 1;
}
.mp-check svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.input.otp { font: 500 20px/1 var(--mono); letter-spacing: 0.28em; text-align: center; }
.error-text { color: var(--danger); font-size: 13px; }
.ok-text { color: var(--ok); font-size: 13px; }

/* ------------------------------------------------------------------ code blocks */
.code-box { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.code-tabs { display: flex; align-items: center; gap: 2px; padding: 7px 12px; border-bottom: 1px solid var(--line); background: var(--subtle); }
.code-tabs .tab-title { font-size: 12.5px; color: var(--muted); font-weight: 500; padding: 4px 6px; }
.code-tabs button[role="tab"] {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: 500 12.5px/1 var(--font);
  padding: 6px 11px;
  border-radius: 5px;
  cursor: pointer;
}
.code-tabs button[role="tab"]:hover { color: var(--ink); }
.code-tabs button[role="tab"][aria-selected="true"] { background: var(--surface); color: var(--ink); border-color: var(--line); }
.code-tabs .copy-btn { margin-left: auto; }
.code-box pre { padding: 16px 18px; color: var(--ink); }

/* ------------------------------------------------------------------ responsive tables */
.table-wrap { overflow: auto; max-inline-size: 100%; container-type: inline-size; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table thead { position: sticky; inset-block-start: 0; z-index: 1; }
.table th { padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--subtle); color: var(--muted); font-size: 12px; font-weight: 500; text-align: left; white-space: nowrap; }
.table td, .table tbody th { padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--ink); background: var(--surface); text-align: left; font-weight: 400; vertical-align: middle; }
.table tbody th { font-weight: 500; }
.table tbody tr:last-child td, .table tbody tr:last-child th { border-bottom: 0; }
.table th.num, .table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table th.end, .table td.end { text-align: right; }

@container (width < 580px) {
  .table-wrap.stackable { border: 0; background: transparent; }
  .table-wrap.stackable table, .table-wrap.stackable thead, .table-wrap.stackable tbody, .table-wrap.stackable tr, .table-wrap.stackable th, .table-wrap.stackable td { display: block; }
  .table-wrap.stackable thead { display: none; }
  .table-wrap.stackable tr { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 10px; overflow: hidden; }
  .table-wrap.stackable tbody th { background: var(--subtle); border-bottom: 1px solid var(--line); font-weight: 500; }
  .table-wrap.stackable td { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: right; padding: 10px 16px; }
  .table-wrap.stackable td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; text-align: left; }
}

/* ------------------------------------------------------------------ native dialogs */
dialog {
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--body);
  max-width: min(440px, calc(100vw - 32px));
  width: 100%;
  box-shadow: var(--shadow-float);
  opacity: 0;
  transform: scale(0.97) translateY(6px);
  transition: opacity 0.18s var(--ease-out), transform 0.24s var(--ease-out), display 0.18s allow-discrete, overlay 0.18s allow-discrete;
}
dialog[open] { display: block; opacity: 1; transform: none; }
@starting-style { dialog[open] { opacity: 0; transform: scale(0.97) translateY(6px); } }
dialog:modal { overscroll-behavior: contain; }
dialog::backdrop {
  background: rgba(11, 12, 14, 0.55);
  overflow: hidden;
  overscroll-behavior: contain;
  opacity: 0;
  transition: opacity 0.18s var(--ease-out), display 0.18s allow-discrete, overlay 0.18s allow-discrete;
}
dialog[open]::backdrop { opacity: 1; }
@starting-style { dialog[open]::backdrop { opacity: 0; } }
.dialog-body { padding: 26px 28px; display: grid; gap: 16px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-head h1, .dialog-head h2 { font-size: 18px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.dlg-form { display: grid; gap: 12px; }
.dlg-social { display: grid; gap: 8px; }
.dlg-note { font-size: 12.5px; color: var(--muted); }
.dlg-sub { font-size: 14px; line-height: 1.5; color: var(--muted); margin-top: -6px; }
.dlg-close-x { font-size: 18px; }

/* OAuth buttons, 6-box OTP, mode links, and selected plan callout (Hemmingway parity) */
.auth-box { display: grid; gap: 14px; }
.auth-plan-note {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--subtle);
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}
.auth-plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.auth-plan-top strong { color: var(--ink); font-weight: 600; font-size: 13.5px; }
.auth-plan-top a { font-size: 12.5px; color: var(--accent); text-decoration: none; }
.auth-plan-top a:hover { text-decoration: underline; }
.auth-oauth { display: grid; gap: 8px; }
.auth-oauth-main {
  width: 100%;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 500;
}
.auth-oauth-ico {
  width: 18px;
  height: 18px;
  flex: none;
  display: inline-block;
}
.auth-oauth-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.auth-oauth-mini {
  flex: 1 1 44px;
  min-height: 38px;
  padding: 0 10px;
}
.auth-otp-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.auth-otp-cell {
  height: 46px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font: 600 20px/1 var(--mono);
  text-align: center;
  transition: border-color 0.14s var(--ease-out);
}
.auth-otp-cell:focus { outline: none; border-color: var(--accent); }
.auth-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  font-size: 13px;
}
.auth-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted);
  font: 500 13px/1.3 var(--font);
  cursor: pointer;
  text-decoration: none;
}
.auth-link:hover { color: var(--ink); text-decoration: underline; }
.auth-clash {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--subtle);
}
.auth-legal { font-size: 12px; line-height: 1.45; color: var(--muted); }
.auth-legal a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }

/* Upgrade / Add credits modal + Yearly toggle + Pre/Post-checkout annual offers */
dialog.upg-dialog { max-width: min(580px, calc(100vw - 32px)); }
.period-toggle {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--subtle);
  justify-self: start;
}
.period-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 500 13px/1 var(--font);
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.period-toggle button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(18, 19, 23, 0.08);
}
.period-save {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
}
.upg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.upg-card {
  display: grid;
  gap: 7px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--subtle);
}
.upg-card-pro {
  border-color: var(--ink);
  background: var(--surface);
}
.upg-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.upg-card-top h2 { font-size: 15px; font-weight: 600; color: var(--ink); }
.upg-price { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--ink); }
.upg-billed { font-size: 12px; color: var(--muted); }
.upg-credit { font-size: 14px; font-weight: 500; color: var(--ink); }
.upg-meta { font-size: 12.5px; color: var(--muted); }
.upg-card .btn { width: 100%; margin-top: 6px; }
.upg-topup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.upg-topup-label { font-size: 13px; color: var(--muted); }
.upg-packs { display: flex; flex-wrap: wrap; gap: 6px; }
.upg-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
}
.upg-foot a { color: var(--ink); text-decoration: none; }
.upg-foot a:hover { text-decoration: underline; }
@media (max-width: 540px) {
  .upg-grid { grid-template-columns: 1fr; }
}

/* Annual upsell & timed offer modal */
.offer-tag {
  justify-self: start;
  padding: 4px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 600;
}
.offer-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--mono);
}
.offer-was { color: var(--muted); text-decoration: line-through; font-size: 16px; }
.offer-num { color: var(--ink); font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.offer-per { color: var(--muted); font-family: var(--font); font-size: 13.5px; }
.offer-clock { font-family: var(--mono); font-size: 12.5px; color: var(--accent); font-weight: 500; }
.offer-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.offer-acts .btn { flex: 1 1 160px; }

/* Always-on workspace upgrade bar, inline wall card, guest keep bar, and usage ring */
.upbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--subtle);
  font-size: 13px;
  color: var(--body);
}
.upbar[hidden] { display: none; }
.upbar.is-warn {
  background: var(--danger-soft);
  border-bottom-color: color-mix(in srgb, var(--danger) 30%, var(--line));
  color: var(--ink);
}
.upbar-text { min-width: 0; }
.upbar-x {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  padding: 2px 6px;
  cursor: pointer;
}
.upbar-x:hover { color: var(--ink); }

.up-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.up-pill svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.guest-keep {
  margin-top: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--body);
}

.wall-card {
  margin-top: 8px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--subtle);
  display: grid;
  gap: 10px;
}
.wall-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.wall-card p { font-size: 13.5px; color: var(--body); line-height: 1.5; }
.wall-perks {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}
.wall-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

.gauge-wrap { position: relative; display: inline-flex; align-items: center; }
.gauge-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}
.gauge-btn:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.gauge-btn svg { width: 18px; height: 18px; transform: rotate(-90deg); }
.gauge-btn .g-track { fill: none; stroke: var(--line); stroke-width: 2.6; }
.gauge-btn .g-fill { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; }
.gauge-btn.is-high .g-fill { stroke: var(--danger); }
.gauge-pop {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 60;
  width: 248px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-float);
  display: grid;
  gap: 10px;
  font-size: 12.5px;
  color: var(--body);
}
.gauge-pop[hidden] { display: none; }
.gauge-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.gauge-row strong { color: var(--ink); font-weight: 600; }
.gauge-bar { height: 5px; border-radius: 999px; background: var(--line); overflow: hidden; }
.gauge-bar-fill { height: 100%; background: var(--ink); border-radius: 999px; }
.gauge-bar.is-high .gauge-bar-fill { background: var(--danger); }

/* Subtle single-line conversion / status strip above Chat & Playground composers */
.nudge-bar {
  max-width: 720px;
  width: 100%;
  margin: 0 auto 10px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--body);
}
.nudge-bar[hidden] { display: none; }
.nudge-bar.is-warn {
  border-color: color-mix(in srgb, var(--danger) 36%, var(--line));
  background: var(--danger-soft);
  color: var(--ink);
}
.nudge-bar-text { min-width: 0; }
.nudge-bar-acts { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.or-sep { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.or-sep::before, .or-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ------------------------------------------------------------------ section reveals */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}
[data-reveal="shown"] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .scroll-progress { display: none; }
  [data-reveal], dialog, dialog::backdrop { opacity: 1; transform: none; transition: none; }
}

/* ------------------------------------------------------------------ footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg); }
.site-footer.footer-dark {
  background: var(--deep);
  border-top-color: var(--deep-line);
  color: var(--deep-muted);
}
.site-footer.footer-dark .brand { color: var(--deep-ink); }
.site-footer.footer-dark .brand span { color: var(--deep-muted); }
.site-footer.footer-dark .site-footer-links a { color: var(--deep-muted); }
.site-footer.footer-dark .site-footer-links a:hover { color: var(--deep-ink); }

.site-footer-in {
  max-width: 1220px;
  margin: 0 auto;
  padding: 40px 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  font-size: 13.5px;
  color: var(--muted);
}
.site-footer-links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.site-footer-links a { color: var(--muted); text-decoration: none; }
.site-footer-links a:hover { color: var(--ink); }

/* ------------------------------------------------------------------ legal prose */
.legal-main {
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(72px, 10vh, 116px) 28px 96px;
  display: grid;
  gap: 20px;
}
.legal-main h1 {
  font-family: var(--display);
  font-size: clamp(38px, 5vw, 54px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.02;
}
.legal-meta { font-size: 13.5px; color: var(--muted); }
.legal-main h2 { font-size: 19px; margin-top: 12px; }
.legal-main p { color: var(--body); line-height: 1.68; }

@media (max-width: 720px) {
  .topbar-in { padding: 0 18px; gap: 12px; }
  .brand { font-size: 19px; }
  .top-user { display: none; }
  .topnav { gap: 0; }
  .topnav a { padding: 5px 8px; font-size: 13px; }
  .site-footer-in { padding: 32px 20px; }
}

/* ------------------------------------------------------------------ founders preview gate */
html.founders-locked, html.founders-locked body { overflow: hidden; }
.founders-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
  overflow-y: auto;
}
.founders-gate-card {
  width: min(440px, 100%);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg, 18px);
  background: var(--surface, var(--bg));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.14);
  display: grid;
  gap: 14px;
}
.founders-gate-badge {
  justify-self: start;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.founders-gate-card h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.08;
}
.founders-gate-copy {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}
