/* App pages on the app host: sign in, sign up, password reset, account and the billing notices.
   Port of design A "Split screen" (valetseo .work/mockups/auth-account/a-split). These pages load this file instead of
   styles.css, so its class names never collide with the landing. The tokens repeat styles.css :root; change both together. */

@font-face {
  font-family: Geist;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/geist-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Geist;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/geist-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #1d1d1f;
  --mist: #f5f5f7;
  --dim: #6e6e73;
  --faint: #a1a1a6;
  --accent: #4f46e5;
  --accent-hi: #4338ca;
  --accent-wash: rgba(79, 70, 229, 0.08);
  --bad: #b91c1c;
  --bad-bg: #fef2f2;
  --bad-bar: #ef4444;
  --good: #047857;
  --good-bg: #ecfdf5;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --ring: rgba(0, 0, 0, 0.05);
  --line: rgba(0, 0, 0, 0.07);
  --field: rgba(0, 0, 0, 0.14);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --font: Geist, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow-card: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04), 0 16px 40px -16px rgba(0, 0, 0, 0.14);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3 { margin: 0; text-wrap: balance; }
p, ol, ul, dl, dd, figure { margin: 0; }
p, li, dd { text-wrap: pretty; }
ol, ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
form { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.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;
}
.truncate { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skip {
  position: fixed; left: 16px; top: 16px; z-index: 60; transform: translateY(-300%);
  border-radius: 9999px; background: var(--accent); color: #fff; padding: 8px 16px;
  font-size: 14px; line-height: 20px; text-decoration: none;
}
.skip:focus { transform: none; }

/* Brand mark, as in the site nav */
.brand {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; border-radius: 10px;
  font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); text-decoration: none;
}
.brand img { width: 24px; height: 24px; }
.wordmark-tail { color: var(--dim); }

/* Brand marks drawn as a mask so they take the text color */
.si {
  display: inline-block; flex-shrink: 0; width: 14px; height: 14px; background-color: currentColor;
  -webkit-mask: var(--si) center / contain no-repeat; mask: var(--si) center / contain no-repeat;
}
.si-gemini { --si: url(/icons/googlegemini.svg); }

/* Buttons. Pills, like the landing. Form buttons take the field radius, like the landing audit form. */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; border: 0; border-radius: 9999px; padding: 10px 20px;
  font: inherit; font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: -0.01em;
  text-decoration: none; text-align: center; white-space: nowrap; cursor: pointer;
  transition: background-color 250ms var(--ease), color 250ms var(--ease), box-shadow 250ms var(--ease), transform 160ms var(--ease), opacity 250ms var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 2px rgba(29, 29, 31, 0.16);
}
.btn-primary:hover { background: var(--accent-hi); }
.btn-secondary {
  background: #fff; color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.04);
}
.btn-secondary:hover { background: var(--mist); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.16), 0 1px 2px rgba(0, 0, 0, 0.04); }
.btn-block { display: flex; width: 100%; white-space: normal; }
.btn-field { min-height: 48px; border-radius: 12px; font-size: 16px; line-height: 24px; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 14px; line-height: 20px; }
.btn-sm::after { content: ''; position: absolute; inset: -2px; }
.btn:disabled { cursor: not-allowed; opacity: 0.45; transform: none; }
.btn[aria-busy='true'] { cursor: progress; opacity: 1; }
.btn .spin {
  width: 16px; height: 16px; flex-shrink: 0; border-radius: 9999px;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff;
  animation: spin 700ms linear infinite;
}
.btn-secondary .spin { border-color: rgba(0, 0, 0, 0.15); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }
.btn svg { flex-shrink: 0; }

/* Text links */
.link {
  color: var(--accent); font-weight: 500; text-decoration: none; border-radius: 4px;
  transition: color 250ms var(--ease);
}
.link:hover { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 9999px; background: var(--mist);
  padding: 2px 8px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--dim); white-space: nowrap;
}
.chip-white { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.chip-accent { background: var(--accent-wash); color: var(--accent); }
.chip-good { background: var(--good-bg); color: var(--good); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }

/* Footer: tagline, LinkedIn, language, links */
.foot {
  display: grid; gap: 4px 24px; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  font-size: 13px; line-height: 20px; color: var(--dim);
}
.foot-tagline { font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.foot-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; column-gap: 20px; margin-top: -4px; }
.foot-links a {
  display: inline-flex; align-items: center; min-height: 44px; border-radius: 6px; text-decoration: none;
  transition: color 250ms var(--ease);
}
.foot-links a:hover { color: var(--ink); }
.foot-end { display: flex; align-items: center; gap: 4px; }
.foot-in {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 9999px; color: var(--dim);
  transition: color 250ms var(--ease), background-color 250ms var(--ease);
}
.foot-in:hover { color: var(--ink); background: var(--mist); }
.foot-in svg { width: 15px; height: 15px; }
.lang { display: inline-flex; align-items: center; gap: 2px; border-radius: 9999px; padding: 2px; background: var(--mist); }
.lang a, .lang span {
  position: relative; display: grid; place-items: center; min-width: 36px; height: 28px; border-radius: 9999px;
  font-size: 12px; line-height: 16px; font-weight: 600; text-decoration: none;
}
.lang a::after { content: ''; position: absolute; inset: -8px -2px; }
.lang span { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 0 0 1px var(--ring); }
.lang a { color: var(--dim); transition: color 250ms var(--ease); }
.lang a:hover { color: var(--ink); }
@media (max-width: 560px) {
  .foot { grid-template-columns: minmax(0, 1fr); }
  .foot-links { column-gap: 16px; margin-top: 0; }
  .foot-end { order: 3; margin-left: -14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
  .btn .spin { animation-duration: 1400ms !important; }
}

/* Split layout: the form column on the left, a quiet proof panel on the right.
   On phones the children stack in source order: top, form, panel or strip, footer. */
.split {
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto auto;
  min-height: 100vh; min-height: 100dvh;
}
.split-top, .split-main, .split-strip, .split-foot { min-width: 0; padding-left: 20px; padding-right: 20px; }
.split-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; }
.split-main { display: flex; align-items: flex-start; justify-content: center; padding-top: 32px; padding-bottom: 40px; }
.split-foot { padding-top: 16px; padding-bottom: 8px; }
.form-col { width: 100%; max-width: 360px; }

.form-col h1 { font-size: 28px; line-height: 34px; font-weight: 600; letter-spacing: -0.035em; }
.sub { margin-top: 8px; font-size: 15px; line-height: 22px; color: var(--dim); }
.sub strong { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }

/* Two step hint, shown with a selected plan */
.steps-mini {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px;
  font-size: 12px; line-height: 16px; font-weight: 500; color: var(--dim);
}
.steps-mini li { display: inline-flex; align-items: center; }
.steps-mini .on { color: var(--ink); }
.steps-mini .num {
  display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px; border-radius: 9999px;
  background: var(--mist); font-size: 11px; line-height: 1; font-weight: 600; color: var(--dim);
}
.steps-mini .on .num { background: var(--ink); color: #fff; }
.steps-mini li + li::before { content: ''; width: 20px; height: 1px; margin-right: 8px; background: rgba(0, 0, 0, 0.16); }

/* Selected plan */
.plan-pick {
  margin-top: 20px; border-radius: 14px; background: #fff; padding: 14px 16px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.03);
}
.plan-pick-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.plan-pick-name { font-size: 15px; line-height: 20px; color: var(--dim); }
.plan-pick-name strong { font-weight: 600; color: var(--ink); }
.plan-pick-change {
  position: relative; flex-shrink: 0; font-size: 13px; line-height: 20px; color: var(--accent); font-weight: 500; text-decoration: none; border-radius: 4px;
}
.plan-pick-change::after { content: ''; position: absolute; inset: -12px -10px; }
.plan-pick-change:hover { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 3px; }
.plan-pick-facts {
  display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 6px; font-size: 12px; line-height: 18px; color: var(--dim);
}
.plan-pick-facts li { display: inline-flex; align-items: center; gap: 10px; }
.plan-pick-facts li::before { content: ''; width: 4px; height: 4px; border-radius: 9999px; background: rgba(0, 0, 0, 0.22); }
.plan-pick-facts li:first-child::before { display: none; }

/* Form */
.form { display: grid; gap: 16px; margin-top: 24px; }
.form-alert {
  display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; background: var(--bad-bg); padding: 12px 14px;
  font-size: 14px; line-height: 20px; color: var(--bad);
  box-shadow: inset 0 0 0 1px rgba(185, 28, 28, 0.12);
}
.form-alert-good { background: var(--good-bg); color: var(--good); box-shadow: inset 0 0 0 1px rgba(4, 120, 87, 0.14); }
.form-alert svg { flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; }
.form-alert span { text-wrap: pretty; }
.form-alert strong { font-weight: 600; }
.form-alert a { color: inherit; font-weight: 600; text-underline-offset: 3px; border-radius: 4px; }
.fld { display: grid; gap: 8px; }
.fld-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.fld label { font-size: 14px; line-height: 20px; font-weight: 500; }
.fld-link {
  position: relative; font-size: 13px; line-height: 20px; font-weight: 500; color: var(--dim); text-decoration: none; border-radius: 4px;
  transition: color 250ms var(--ease);
}
.fld-link::after { content: ''; position: absolute; inset: -12px -8px; }
.fld-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.input-wrap { position: relative; }
.input {
  display: block; width: 100%; height: 48px; border: 0; border-radius: 12px; background: #fff; padding: 0 14px;
  font: inherit; font-size: 16px; line-height: 24px; letter-spacing: -0.011em; color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--field), 0 1px 2px rgba(0, 0, 0, 0.03);
  outline: none; transition: box-shadow 200ms var(--ease);
}
.input::placeholder { color: rgba(110, 110, 115, 0.65); }
.input:hover { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.26), 0 1px 2px rgba(0, 0, 0, 0.03); }
.input:focus, .input:focus-visible { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px rgba(79, 70, 229, 0.14); }
.input[aria-invalid='true'] { box-shadow: inset 0 0 0 1.5px var(--bad-bar), 0 0 0 4px rgba(239, 68, 68, 0.1); }
.input-pw { padding-right: 52px; }
/* A native select in the input shell: same height, ring and radius, with the chevron drawn over it. */
.input-select { appearance: none; padding-right: 44px; cursor: pointer; text-overflow: ellipsis; }
.input-select:has(option[value='']:checked) { color: var(--dim); }
.input-select option { color: var(--ink); }
.select-chevron { position: absolute; top: 0; right: 14px; display: grid; place-items: center; height: 48px; color: var(--dim); pointer-events: none; }
.select-chevron svg { width: 16px; height: 16px; }
.reveal {
  position: absolute; top: 2px; right: 2px; display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 10px; background: transparent; color: var(--dim); cursor: pointer;
  transition: color 200ms var(--ease), background-color 200ms var(--ease);
}
.reveal:hover { color: var(--ink); background: var(--mist); }
.reveal:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.reveal svg { width: 18px; height: 18px; }
.hint { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; color: var(--dim); transition: color 200ms var(--ease); }
.hint svg { width: 14px; height: 14px; opacity: 0.45; transition: opacity 200ms var(--ease); }
.hint.ok { color: var(--good); }
.hint.ok svg { opacity: 1; }
.form .btn-field { margin-top: 6px; }
.switch { margin-top: 20px; font-size: 14px; line-height: 20px; color: var(--dim); }
.switch .link { position: relative; }
.switch .link::after { content: ''; position: absolute; inset: -12px -6px; }
.legal { margin-top: 12px; font-size: 12px; line-height: 18px; color: var(--dim); }
.legal a { color: inherit; text-underline-offset: 2px; border-radius: 2px; }
.legal a:hover { color: var(--ink); }

/* A finished state in the form column: email sent, link expired */
.state-icon {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 20px; border-radius: 14px; background: #fff; color: var(--ink);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px -12px rgba(0, 0, 0, 0.16);
}
.state-icon svg { width: 22px; height: 22px; }
.state-help { margin-top: 20px; font-size: 14px; line-height: 21px; color: var(--dim); }
.state-actions { display: grid; gap: 12px; margin-top: 24px; }

/* Proof panel */
.panel {
  display: flex; flex-direction: column; justify-content: center; min-width: 0;
  background: var(--mist); padding: 40px 20px 48px; border-top: 1px solid var(--line);
}
.panel-inner { width: 100%; max-width: 520px; margin: 0 auto; }
.panel-caption { margin-top: 20px; max-width: 460px; font-size: 13px; line-height: 20px; color: var(--dim); }

/* Product window */
.win { overflow: hidden; border-radius: 16px; background: #fff; box-shadow: var(--shadow-card); }
.win-bar {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px;
  border-bottom: 1px solid var(--line); font-size: 12px; line-height: 16px; color: var(--dim);
}
.win-dots { display: flex; gap: 6px; }
.win-dots i { width: 10px; height: 10px; border-radius: 9999px; background: #e3e3e8; }
.win-url { flex: 1; min-width: 0; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-body { padding: 20px; }
.win-site { font-size: 15px; line-height: 20px; font-weight: 600; }
.win-meta { margin-top: 2px; font-size: 12px; line-height: 16px; color: var(--dim); }
.win-foot { border-top: 1px solid var(--line); padding: 12px 20px; font-size: 12px; line-height: 17px; color: var(--dim); }

/* Example audit: one engine, then who is cited instead */
.audit-cols { display: grid; gap: 20px; margin-top: 20px; }
.mini-title { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--ink); }
.bar-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 13px; line-height: 18px; }
.bar-name { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); }
.bar-val { font-weight: 500; white-space: nowrap; }
.bar-val.weak { color: var(--bad); }
.qdots { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; margin-top: 10px; }
.qdots i { height: 18px; border-radius: 4px; background: var(--mist); }
.qdots i.on { background: var(--bad-bar); }
.audit-note { margin-top: 10px; font-size: 12px; line-height: 17px; color: var(--dim); }
.named { border-radius: 12px; background: var(--mist); padding: 14px; }
.named ul { display: grid; gap: 6px; margin-top: 10px; font-size: 13px; line-height: 18px; }
.named li { display: flex; justify-content: space-between; gap: 12px; border-radius: 8px; background: #fff; padding: 7px 10px; }
.named li span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.named li span:last-child { flex-shrink: 0; color: var(--dim); }
.named li.you { box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.35); }
.named li.you span:last-child { color: var(--bad); font-weight: 500; }

/* Real data card */
.metrics { display: grid; grid-template-columns: minmax(0, 1fr); }
.metric { padding: 16px 0; border-top: 1px solid var(--line); }
.metric:first-child { border-top: 0; padding-top: 4px; }
.metric dt { font-size: 12px; line-height: 16px; color: var(--dim); }
.metric dd { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 6px; }
.metric-num { font-size: 28px; line-height: 32px; font-weight: 600; letter-spacing: -0.035em; white-space: nowrap; }
.metric-sub { font-size: 12px; line-height: 16px; color: var(--dim); }
.metric-num small { margin-left: 4px; font-size: 14px; line-height: 20px; font-weight: 400; letter-spacing: -0.01em; color: var(--dim); }
.metric-num .from { color: var(--dim); font-weight: 500; }
.metric-num .arrow { display: inline-block; margin: 0 6px; color: var(--faint); font-weight: 400; }
.twobar { display: flex; align-items: flex-end; gap: 8px; height: 44px; }
.twobar span { display: grid; justify-items: center; gap: 4px; font-size: 10px; line-height: 12px; color: var(--dim); }
.twobar i { display: block; width: 22px; border-radius: 4px 4px 2px 2px; background: #d9d9de; }
.twobar span:last-child i { background: var(--accent); }
.dots { display: grid; grid-template-columns: repeat(9, 10px); gap: 4px; }
.dots i { width: 10px; height: 10px; border-radius: 3px; background: #e3e3e8; }
.dots i.on { background: var(--accent); }
.controls { display: grid; gap: 10px; margin-top: 24px; font-size: 14px; line-height: 20px; }
.controls li { display: flex; align-items: flex-start; gap: 10px; }
.controls svg { flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; color: var(--accent); }

/* Slim strip on phones, in place of the example audit */
.split-strip {
  display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--mist); padding-top: 14px; padding-bottom: 14px; font-size: 13px; line-height: 19px; color: var(--dim);
}
.split-strip strong { color: var(--ink); font-weight: 600; }
.split-strip .chip { flex-shrink: 0; }

@media (max-width: 1023px) {
  .panel-slim { display: none; }
}
@media (min-width: 560px) {
  .audit-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
}
@media (min-width: 1024px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr auto; }
  .split-top { grid-column: 1; grid-row: 1; }
  .split-main { grid-column: 1; grid-row: 2; align-items: center; padding-top: 24px; padding-bottom: 24px; }
  .split-foot { grid-column: 1; grid-row: 3; padding-bottom: 12px; }
  .split-strip { display: none; }
  .panel { grid-column: 2; grid-row: 1 / -1; padding: 64px 56px; border-top: 0; border-left: 1px solid var(--line); }
  .split-top, .split-main, .split-foot { padding-left: 40px; padding-right: 40px; }
  .split-top { padding-top: 24px; }
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric { padding: 4px 20px 0; border-top: 0; border-left: 1px solid var(--line); }
  .metric:first-child { padding-left: 0; border-left: 0; }
  .metric dd { flex-direction: column; align-items: flex-start; gap: 12px; }
}
@media (min-width: 1280px) {
  .split-top, .split-main, .split-foot { padding-left: 48px; padding-right: 48px; }
  .split-top { padding-top: 28px; }
  .panel { padding: 64px 72px; }
}

/* App layout: a slim sidebar on desktop, a top bar with tabs on phones */
.app { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  gap: 0 12px; background: rgba(255, 255, 255, 0.86); padding: 4px 16px 0;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
.sidebar-plain { padding-bottom: 4px; }
.side-nav { grid-column: 1 / -1; display: flex; gap: 4px; margin: 0 -8px; overflow-x: auto; scrollbar-width: none; }
.side-nav::-webkit-scrollbar { display: none; }
.side-nav a {
  position: relative; display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; min-height: 44px; padding: 0 10px;
  font-size: 14px; line-height: 20px; font-weight: 500; color: var(--dim); text-decoration: none; border-radius: 8px;
  transition: color 200ms var(--ease), background-color 200ms var(--ease);
}
.side-nav a:focus-visible { outline-offset: -2px; }
.side-nav a svg { width: 16px; height: 16px; flex-shrink: 0; }
.side-nav a:hover { color: var(--ink); }
.side-nav a[aria-current='true'] { color: var(--ink); }
.side-nav a[aria-current='true']::before {
  content: ''; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 2px; background: var(--ink);
}
.side-user { display: flex; align-items: center; gap: 4px; min-width: 0; }
.side-user .who { display: none; }
.avatar {
  display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; border-radius: 9999px;
  background: var(--ink); color: #fff; font-size: 12px; line-height: 1; font-weight: 600; text-transform: uppercase;
}
.signout {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; border: 0; border-radius: 8px; background: transparent; padding: 0 10px;
  font-size: 14px; line-height: 20px; font-weight: 500; color: var(--dim); cursor: pointer;
  transition: color 200ms var(--ease), background-color 200ms var(--ease);
}
.signout svg { width: 16px; height: 16px; }
.signout:hover { color: var(--ink); background: rgba(0, 0, 0, 0.04); }
.signout:active { background: rgba(0, 0, 0, 0.07); }

.main { display: grid; grid-template-rows: 1fr auto; min-width: 0; }
.content { width: 100%; max-width: 1040px; margin: 0 auto; padding: 28px 20px 56px; }
.main-foot { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px 8px; }
.main-foot .foot { border-top: 1px solid var(--line); padding-top: 16px; }

/* Page header */
.page-head h1 { font-size: 28px; line-height: 34px; font-weight: 600; letter-spacing: -0.035em; }
.status-line { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; font-size: 15px; line-height: 22px; color: var(--dim); }
.status-line strong { margin-right: 4px; font-weight: 500; color: var(--ink); }
.pulse { position: relative; width: 8px; height: 8px; flex-shrink: 0; margin-top: 7px; border-radius: 9999px; background: #c7c7cc; }
.pulse.good { background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16); }
.pulse.warn { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18); }

/* Banner */
.banner {
  display: flex; align-items: flex-start; gap: 12px; margin-bottom: 28px; border-radius: 14px; background: var(--good-bg); padding: 14px 8px 14px 16px;
  color: var(--good); box-shadow: inset 0 0 0 1px rgba(4, 120, 87, 0.14);
}
.banner-neutral { background: var(--mist); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.banner-icon { display: grid; place-items: center; flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px; border-radius: 9999px; background: var(--good); color: #fff; }
.banner-neutral .banner-icon { background: var(--ink); }
.banner-icon svg { width: 13px; height: 13px; }
.banner-text { flex: 1; min-width: 0; font-size: 14px; line-height: 22px; }
.banner-text strong { font-weight: 600; }
.banner-text a { color: inherit; font-weight: 600; text-underline-offset: 3px; border-radius: 4px; }
.banner-close {
  display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; margin: -11px 0; border: 0; border-radius: 10px; background: transparent;
  color: inherit; cursor: pointer; transition: background-color 200ms var(--ease);
}
.banner-close:hover { background: rgba(0, 0, 0, 0.05); }
.banner-close:focus-visible { outline-offset: -2px; }
.banner-close svg { width: 16px; height: 16px; }

/* Sections */
.sec { padding-top: 44px; scroll-margin-top: 112px; }
.sec-first { padding-top: 0; }
.sec-sub { padding-top: 32px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.sec h2 { font-size: 17px; line-height: 24px; font-weight: 600; letter-spacing: -0.02em; }
.sec-note { font-size: 13px; line-height: 20px; color: var(--dim); }

/* Plan picker */
.plans { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 16px; }
.plan {
  position: relative; display: flex; flex-direction: column; border-radius: 16px; background: #fff; padding: 20px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: box-shadow 250ms var(--ease);
}
.plan:hover { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.14), 0 8px 24px -12px rgba(0, 0, 0, 0.12); }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
.plan-name { font-size: 15px; line-height: 20px; font-weight: 600; }
.plan-for { margin-top: 4px; font-size: 13px; line-height: 19px; color: var(--dim); }
.plan-price { margin-top: 20px; font-size: 36px; line-height: 40px; font-weight: 600; letter-spacing: -0.045em; }
.plan-price small { margin-left: 6px; font-size: 14px; line-height: 20px; font-weight: 400; letter-spacing: -0.01em; color: var(--dim); }
.allow { margin-top: 20px; border-top: 1px solid var(--line); }
.allow div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 20px; }
.allow dt { color: var(--dim); }
.allow dd { font-weight: 600; }
.plan form { margin-top: auto; padding-top: 20px; }

/* Current plan, live state */
.current {
  margin-top: 16px; border-radius: 16px; background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.03);
}
.current-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding: 20px; border-bottom: 1px solid var(--line); }
.current-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 15px; line-height: 20px; font-weight: 600; }
.current-top .link { position: relative; font-size: 14px; line-height: 20px; }
.current-top .link::after { content: ''; position: absolute; inset: -12px -8px; }
.current-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { min-width: 0; padding: 14px 16px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat dt { font-size: 12px; line-height: 18px; color: var(--dim); }
.stat dd { margin-top: 4px; font-size: 28px; line-height: 32px; font-weight: 600; letter-spacing: -0.035em; }

/* What happens next */
.next { margin-top: 16px; display: grid; max-width: 720px; }
.next li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; padding-bottom: 20px; }
.next li:last-child { padding-bottom: 0; }
.next li::after { content: ''; position: absolute; left: 13.5px; top: 30px; bottom: 2px; width: 1px; background: rgba(0, 0, 0, 0.1); }
.next li:last-child::after { display: none; }
.step-num {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9999px; background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); font-size: 12px; line-height: 1; font-weight: 600; color: var(--dim);
}
.step-num svg { width: 14px; height: 14px; }
.next li.done .step-num { background: var(--good); color: #fff; box-shadow: none; }
.next li.now .step-num { background: var(--ink); color: #fff; box-shadow: none; }
.step-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 3px; font-size: 15px; line-height: 22px; font-weight: 500; }
.step-body { margin-top: 2px; font-size: 14px; line-height: 21px; color: var(--dim); }

/* Rows: billing and settings */
.rows { margin-top: 16px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.03); }
.row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 24px; padding: 14px 20px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row dt { font-size: 13px; line-height: 20px; color: var(--dim); }
.row dd { min-width: 0; overflow-wrap: anywhere; font-size: 14px; line-height: 22px; font-weight: 500; }
.row-action { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.row-action p { max-width: 420px; font-size: 13px; line-height: 20px; color: var(--dim); }

/* Notice */
.notice-main { display: grid; }
.notice { display: grid; place-items: center; min-height: 100%; padding: 48px 0; }
.notice-card { width: 100%; max-width: 440px; text-align: center; }
.notice-icon {
  display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto; border-radius: 16px; background: #fff; color: var(--ink);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px -12px rgba(0, 0, 0, 0.16);
}
.notice-icon svg { width: 24px; height: 24px; }
.notice h1 { margin-top: 24px; font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -0.03em; }
.notice .body { margin-top: 10px; font-size: 15px; line-height: 23px; color: var(--dim); }
.facts { display: inline-grid; gap: 8px; margin-top: 24px; text-align: left; font-size: 14px; line-height: 20px; }
.facts li { display: flex; align-items: center; gap: 10px; }
.facts .tick { display: grid; place-items: center; flex-shrink: 0; width: 20px; height: 20px; border-radius: 9999px; background: var(--good-bg); color: var(--good); }
.facts .tick svg { width: 12px; height: 12px; }
.notice-actions { margin-top: 32px; }
.notice-help { margin-top: 16px; font-size: 13px; line-height: 20px; color: var(--dim); }
.notice-help a { color: inherit; text-underline-offset: 3px; border-radius: 4px; }
.notice-help a:hover { color: var(--ink); }

@media (min-width: 640px) {
  .row { grid-template-columns: 180px minmax(0, 1fr); align-items: baseline; }
  .row-action { grid-column: 1 / -1; }
}
@media (min-width: 900px) {
  .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat { padding: 16px 20px; }
  .stat dt { font-size: 13px; line-height: 20px; }
}
@media (min-width: 1024px) {
  .app { position: relative; grid-template-columns: 232px minmax(0, 1fr); grid-template-rows: none; }
  .app::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 232px; background: var(--mist); border-right: 1px solid var(--line); }
  .sidebar {
    position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; align-items: stretch; gap: 0;
    padding: 20px 12px 16px; background: transparent; border-bottom: 0;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .sidebar .brand { align-self: flex-start; margin: 0 8px; }
  .side-nav { order: 1; flex-direction: column; gap: 2px; margin: 24px 0 0; overflow: visible; }
  .side-nav a { min-height: 36px; padding: 0 10px; }
  .side-nav a::after { content: ''; position: absolute; inset: -4px 0; }
  .side-nav a:hover { background: rgba(0, 0, 0, 0.04); }
  .side-nav a[aria-current='true'] { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.06); }
  .side-nav a[aria-current='true']::before { display: none; }
  .side-user { order: 2; flex-direction: column; align-items: stretch; gap: 6px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
  .side-user .who { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 10px; }
  .who-text { min-width: 0; font-size: 13px; line-height: 18px; }
  .who-text span { display: block; color: var(--dim); font-size: 12px; line-height: 16px; }
  .side-user form { display: block; }
  .side-user .signout { position: relative; width: 100%; justify-content: flex-start; min-height: 36px; }
  .side-user .signout::after { content: ''; position: absolute; inset: -4px 0; }
  .content { max-width: 1120px; padding: 56px 48px 72px; }
  .main-foot { max-width: 1120px; padding: 0 48px 12px; }
  .page-head h1 { font-size: 32px; line-height: 38px; }
  .sec { scroll-margin-top: 32px; }
  /* Signed out notices have no sidebar: one column under a plain top bar. */
  .app-plain { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .app-plain::before { display: none; }
  .app-plain .sidebar { position: static; width: 100%; max-width: 1120px; height: auto; margin: 0 auto; flex-direction: row; padding: 24px 48px 0; }
  .app-plain .sidebar .brand { margin: 0; }
}
