/* ==========================================================================
   Anchorhead design system
   Deep harbour blues with a warm coral accent. Light and dark, one palette.
   ========================================================================== */

:root {
  --brand-950: #04161e;
  --brand-900: #062733;
  --brand-800: #0a3b4a;
  --brand-700: #0e5265;
  --brand-600: #12707f;
  --brand-500: #158b97;
  --brand-400: #34aab3;
  --brand-300: #6fcbd0;
  --brand-100: #d3f0f1;
  --brand-50: #edfafa;

  --accent-600: #e2603a;
  --accent-500: #ff7a4d;
  --accent-300: #ffb193;
  --accent-100: #ffe8de;

  --ink: #0b1620;
  --ink-2: #33475a;
  --ink-3: #5f7488;
  --ink-4: #8b9cad;

  --surface: #ffffff;
  --surface-2: #f5f9fa;
  --surface-3: #eaf2f4;
  --line: #dde7ec;
  --line-strong: #c3d3db;

  --ok-bg: #e7f7ee;
  --ok-fg: #12694a;
  --warn-bg: #fff4e0;
  --warn-fg: #8a5300;
  --err-bg: #fdeaea;
  --err-fg: #a52222;
  --info-bg: var(--brand-50);
  --info-fg: var(--brand-700);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;

  --shadow-sm: 0 1px 2px rgba(6, 39, 51, 0.06), 0 1px 3px rgba(6, 39, 51, 0.04);
  --shadow: 0 4px 12px rgba(6, 39, 51, 0.07), 0 2px 4px rgba(6, 39, 51, 0.04);
  --shadow-lg: 0 24px 60px rgba(6, 39, 51, 0.12), 0 8px 20px rgba(6, 39, 51, 0.06);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;

  --gutter: clamp(20px, 5vw, 64px);
  --maxw: 1200px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #eaf3f6;
    --ink-2: #b9cbd6;
    --ink-3: #8ea5b3;
    --ink-4: #6b8291;
    --surface: #071b24;
    --surface-2: #0b2531;
    --surface-3: #0f303e;
    --line: #17414f;
    --line-strong: #1f5265;
    --brand-50: #0a2c38;
    --brand-100: #0e3f4e;
    --ok-bg: #0d3427;
    --ok-fg: #7fe0b4;
    --warn-bg: #3a2a10;
    --warn-fg: #ffc978;
    --err-bg: #3a1a1a;
    --err-fg: #ff9c9c;
    --info-bg: #0a2c38;
    --info-fg: var(--brand-300);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}

/* --- reset ---------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: clamp(2.15rem, 5.2vw, 3.9rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 1.8vw, 1.35rem); font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--brand-600); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--brand-700); }
small { font-size: 0.85rem; }
code, pre, .mono { font-family: var(--mono); font-size: 0.9em; }

:focus-visible {
  outline: 3px solid var(--brand-400);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--brand-100); color: var(--brand-900); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- layout --------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: 780px; }
.section { padding-block: clamp(56px, 8vw, 112px); }
.section-tight { padding-block: clamp(36px, 5vw, 64px); }
.stack > * + * { margin-top: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.row-between { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.text-muted { color: var(--ink-3); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.lede { font-size: clamp(1.05rem, 1.7vw, 1.28rem); color: var(--ink-2); max-width: 62ch; }

/* --- buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px;
  border: 1px solid transparent; border-radius: var(--radius);
  background: var(--brand-700); color: #fff;
  font: inherit; font-weight: 700; font-size: 0.98rem;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.12s ease, background 0.16s ease, box-shadow 0.16s ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--brand-800); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn.is-disabled { opacity: 0.55; pointer-events: none; }

.btn-accent { background: var(--accent-500); color: #24160f; }
.btn-accent:hover { background: var(--accent-600); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-quiet { background: transparent; color: var(--ink-2); border-color: transparent; box-shadow: none; min-height: 40px; padding: 0 12px; }
.btn-quiet:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--err-fg); color: #fff; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 0.88rem; border-radius: var(--radius-sm); }
.btn-lg { min-height: 56px; padding: 0 32px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* --- surfaces ------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 2.6vw, 30px);
  box-shadow: var(--shadow-sm);
}
.card-flat { box-shadow: none; }
.card-tint { background: var(--surface-2); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.card-head h2, .card-head h3 { margin: 0; }

.panel { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.01em;
  background: var(--surface-3); color: var(--ink-2);
  white-space: nowrap;
}
.pill-ok { background: var(--ok-bg); color: var(--ok-fg); }
.pill-warn { background: var(--warn-bg); color: var(--warn-fg); }
.pill-err { background: var(--err-bg); color: var(--err-fg); }
.pill-info { background: var(--info-bg); color: var(--info-fg); }

.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: 0.16em;
  font-size: 0.74rem; font-weight: 800; color: var(--brand-600); margin: 0 0 14px;
}

/* --- forms ---------------------------------------------------------------- */
label { display: block; font-weight: 650; font-size: 0.9rem; margin-bottom: 6px; color: var(--ink-2); }
.field { margin-bottom: 18px; }
.field-hint { font-size: 0.82rem; color: var(--ink-3); margin: 6px 0 0; }

/* `input:not([type])` matters: a bare <input> defaults to text but an
   attribute selector will not match it, which left half the forms unstyled. */
input:not([type]),
input[type="text"], input[type="email"], input[type="password"], input[type="url"],
input[type="tel"], input[type="search"], input[type="number"], input[type="date"],
input[type="time"], input[type="file"], select, textarea {
  width: 100%; min-height: 46px; padding: 11px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
  font: inherit; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { min-height: 108px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand-500);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-400) 28%, transparent);
}
input::placeholder, textarea::placeholder { color: var(--ink-4); }
input[type="color"] { min-height: 46px; padding: 4px; cursor: pointer; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%235f7488' stroke-width='1.8' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  padding-right: 38px;
}
input[type="file"] { padding: 9px 12px; cursor: pointer; }
input[type="file"]::file-selector-button {
  margin-right: 12px; padding: 7px 14px; border: 0; border-radius: 6px;
  background: var(--surface-3); color: var(--ink); font: inherit; font-weight: 650; cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: var(--line); }
input[readonly] { background: var(--surface-2); color: var(--ink-2); }
input:disabled, select:disabled, textarea:disabled { opacity: .6; cursor: not-allowed; }
.input-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: start; }

/* --- flash + alerts ------------------------------------------------------- */
.flashes { display: grid; gap: 10px; margin-bottom: 22px; }
.alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--radius);
  border: 1px solid transparent; font-size: 0.94rem;
}
.alert-success { background: var(--ok-bg); color: var(--ok-fg); border-color: color-mix(in srgb, var(--ok-fg) 22%, transparent); }
.alert-error { background: var(--err-bg); color: var(--err-fg); border-color: color-mix(in srgb, var(--err-fg) 22%, transparent); }
.alert-info { background: var(--info-bg); color: var(--info-fg); border-color: color-mix(in srgb, var(--info-fg) 22%, transparent); }
.alert-warn { background: var(--warn-bg); color: var(--warn-fg); border-color: color-mix(in srgb, var(--warn-fg) 22%, transparent); }

/* --- public chrome -------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 850; font-size: 1.08rem; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, var(--brand-500), var(--brand-800));
  box-shadow: var(--shadow-sm);
}
.brand-mark svg { width: 19px; height: 19px; }
.topnav { display: flex; align-items: center; gap: 26px; }
.topnav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.topnav a:hover { color: var(--brand-700); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .topnav { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* --- hero ----------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; background: var(--brand-950); color: #eaf6f7; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(52, 170, 179, 0.36), transparent 62%),
    radial-gradient(700px 400px at 92% 8%, rgba(255, 122, 77, 0.22), transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; padding-block: clamp(64px, 10vw, 128px); display: grid; gap: clamp(36px, 5vw, 64px); grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: center; }
.hero h1 { color: #fff; }
.hero .eyebrow { color: var(--brand-300); }
.hero p { color: #bfdde1; }
.hero .lede { color: #c8e2e5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero .btn-ghost { color: #eaf6f7; border-color: rgba(234, 246, 247, 0.32); }
.hero .btn-ghost:hover { background: rgba(234, 246, 247, 0.12); color: #fff; }
.hero-note { margin-top: 20px; font-size: 0.88rem; color: #93b8bd; }

@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; } }

/* a small stylised "what you get" board that sits beside the hero copy */
.hero-board {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-xl);
  padding: 26px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-lg);
}
.hero-board h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--brand-300); margin-bottom: 18px; }
.hero-step { display: grid; grid-template-columns: 30px 1fr; gap: 14px; align-items: start; padding: 13px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.09); }
.hero-step:last-child { border-bottom: 0; padding-bottom: 0; }
.hero-step b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 0.85rem; }
.hero-step span { color: #d5e9eb; font-size: 0.95rem; line-height: 1.45; }
.hero-step strong { color: #fff; display: block; font-size: 0.98rem; }

/* --- feature cards -------------------------------------------------------- */
.feature { position: relative; }
.feature-icon {
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: 16px;
  display: grid; place-items: center;
  background: var(--brand-50); color: var(--brand-600);
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--ink-3); margin: 0; font-size: 0.96rem; }

/* --- steps ---------------------------------------------------------------- */
.steps { counter-reset: step; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.step { position: relative; padding-top: 52px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--brand-700); color: #fff; font-weight: 800; font-size: 1rem;
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--ink-3); font-size: 0.95rem; margin: 0; }

/* --- pricing -------------------------------------------------------------- */
.price-card { max-width: 460px; margin-inline: auto; text-align: left; border: 2px solid var(--brand-600); }
.price-amount { display: flex; align-items: baseline; gap: 6px; margin: 6px 0 4px; }
.price-amount b { font-size: clamp(2.6rem, 6vw, 3.4rem); font-weight: 850; letter-spacing: -0.04em; }
.price-amount span { color: var(--ink-3); font-weight: 600; }
.check-list { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 12px; }
.check-list li { display: grid; grid-template-columns: 22px 1fr; gap: 11px; align-items: start; font-size: 0.96rem; }
.check-list svg { width: 20px; height: 20px; color: var(--brand-600); margin-top: 2px; }

/* --- FAQ ------------------------------------------------------------------ */
.faq { display: grid; gap: 12px; }
details.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
details.faq-item summary { padding: 18px 22px; cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--brand-600); font-weight: 400; line-height: 1; }
details.faq-item[open] summary::after { content: "\2212"; }
details.faq-item p { padding: 0 22px 20px; margin: 0; color: var(--ink-3); }

/* --- app shell ------------------------------------------------------------ */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; background: var(--surface-2); }
.sidebar {
  background: var(--brand-950);
  color: #cfe6e9;
  padding: 22px 16px;
  display: flex; flex-direction: column; gap: 24px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { color: #fff; padding-inline: 8px; }
.sidebar .brand:hover { color: #fff; }
.side-nav { display: grid; gap: 3px; }
.side-nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 10px;
  color: #a8ccd1; text-decoration: none; font-weight: 600; font-size: 0.94rem;
}
.side-nav a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.side-nav a.is-active { background: var(--brand-700); color: #fff; }
.side-nav a svg { width: 18px; height: 18px; flex: none; opacity: 0.9; }
.side-nav .side-done { margin-left: auto; color: var(--brand-300); font-size: 0.9rem; }
.side-foot { margin-top: auto; font-size: 0.84rem; color: #7ea4aa; padding-inline: 8px; display: grid; gap: 8px; }
.side-foot a { color: #a8ccd1; }

.main { min-width: 0; display: flex; flex-direction: column; }
.main-head {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.main-head h1 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); margin: 0; }
.main-head p { margin: 4px 0 0; color: var(--ink-3); font-size: 0.93rem; }
.main-body { padding: clamp(22px, 3vw, 38px) var(--gutter); flex: 1; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; gap: 14px; overflow-x: auto; padding: 12px var(--gutter); }
  .side-nav { grid-auto-flow: column; grid-auto-columns: max-content; gap: 4px; }
  .side-nav a span:not(.side-done) { display: none; }
  .side-nav a { padding: 10px; }
  .side-foot { display: none; }
}

/* --- progress ------------------------------------------------------------- */
.progress { display: grid; gap: 12px; }
.progress-bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-500), var(--brand-300)); transition: width 0.4s ease; }
.progress-meta { display: flex; justify-content: space-between; font-size: 0.88rem; color: var(--ink-3); }

.checklist { display: grid; gap: 2px; }
.checklist-item { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.checklist-item:last-child { border-bottom: 0; }
.checklist-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; }
.checklist-item.done .checklist-dot { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.checklist-dot svg { width: 12px; height: 12px; }
.checklist-item.done .checklist-label { color: var(--ink-3); }
.checklist-label { font-weight: 600; font-size: 0.95rem; }

/* --- stat tiles ----------------------------------------------------------- */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat b { display: block; font-size: 1.7rem; font-weight: 800; letter-spacing: -0.03em; }
.stat span { font-size: 0.83rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 700; }

/* --- tables --------------------------------------------------------------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); font-weight: 800; background: var(--surface-2); position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
td.mono, .mono { font-family: var(--mono); font-size: 0.85rem; word-break: break-all; }

/* --- builder -------------------------------------------------------------- */
.builder { display: grid; grid-template-columns: minmax(330px, 400px) minmax(0, 1fr); gap: 22px; align-items: start; }
.builder-preview { position: sticky; top: 20px; }
.preview-frame {
  width: 100%; height: min(74vh, 780px);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow);
}
.preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.device-switch { display: inline-flex; background: var(--surface-3); border-radius: 10px; padding: 3px; gap: 2px; }
.device-switch button { border: 0; background: transparent; padding: 7px 13px; border-radius: 8px; font: inherit; font-size: 0.85rem; font-weight: 700; color: var(--ink-3); cursor: pointer; }
.device-switch button.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.preview-frame.is-mobile { width: 390px; max-width: 100%; margin-inline: auto; }

.chat-log { display: grid; gap: 10px; max-height: 340px; overflow-y: auto; margin-bottom: 16px; padding-right: 4px; }
.chat-msg { padding: 11px 14px; border-radius: var(--radius); font-size: 0.92rem; line-height: 1.5; }
.chat-msg.you { background: var(--brand-700); color: #fff; margin-left: 28px; }
.chat-msg.bot { background: var(--surface-2); border: 1px solid var(--line); margin-right: 28px; }
.chat-msg.err { background: var(--err-bg); color: var(--err-fg); }

@media (max-width: 1080px) {
  .builder { grid-template-columns: 1fr; }
  .builder-preview { position: static; }
}

/* --- DNS records ---------------------------------------------------------- */
.dns-row td:first-child { font-weight: 700; white-space: nowrap; }
.copy-btn { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 6px; padding: 3px 9px; font: inherit; font-size: 0.76rem; font-weight: 700; cursor: pointer; color: var(--ink-2); }
.copy-btn:hover { background: var(--surface-2); }
.copy-btn.copied { background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok-fg); }

.code-block {
  background: var(--brand-950); color: #d6ecef;
  border-radius: var(--radius); padding: 16px 18px;
  font-family: var(--mono); font-size: 0.85rem; line-height: 1.7;
  overflow-x: auto; white-space: pre;
}

/* --- auth ----------------------------------------------------------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-aside { background: var(--brand-950); color: #d6ecef; padding: clamp(32px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.auth-aside::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 400px at 20% 0%, rgba(52,170,179,.32), transparent 60%); }
.auth-aside > * { position: relative; }
.auth-aside h2 { color: #fff; }
.auth-main { display: grid; place-items: center; padding: clamp(28px, 5vw, 56px); background: var(--surface); }
.auth-form { width: 100%; max-width: 420px; }
.oauth-row { display: grid; gap: 10px; margin-bottom: 20px; }
.divider { display: flex; align-items: center; gap: 14px; color: var(--ink-4); font-size: 0.82rem; margin: 20px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-aside { display: none; } }

/* --- footer --------------------------------------------------------------- */
.footer { background: var(--brand-950); color: #9dc2c7; padding-block: clamp(40px, 6vw, 72px); }
.footer a { color: #cfe6e9; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: minmax(220px, 1.4fr) repeat(auto-fit, minmax(140px, 1fr)); }
.footer h4 { color: #fff; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: 0.92rem; }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); font-size: 0.86rem; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

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

.is-busy { pointer-events: none; opacity: 0.7; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .sidebar, .topbar, .footer, .btn { display: none !important; }
  .app { grid-template-columns: 1fr; }
}
