/* ==========================================================================
   Design tokens — palette, type and radii follow verda.com's design system
   ========================================================================== */
:root {
  --brand-100: #f6f9fd;
  --brand-200: #bad2f9;
  --brand-300: #84b2fd;
  --brand-400: #6ba4ff;
  --brand-500: #195cc7;
  --brand-600: #335ca0;
  --brand-700: #1d4587;
  --brand-800: #0f2750;
  --brand-900: #051531;

  --neutral-0: #fcfcfc;
  --neutral-50: #f8f8f9;
  --neutral-100: #f4f5f6;
  --neutral-200: #ebeff5;
  --neutral-300: #dadee5;
  --neutral-400: #c3c7ce;
  --neutral-450: #898c92;
  --neutral-500: #686f7b;
  --neutral-600: #474d58;
  --neutral-800: #141f32;
  --neutral-900: #020c22;

  --red-600: #c6322b;
  --green-600: #1f8a4c;

  --text: var(--neutral-900);
  --text-muted: var(--neutral-500);
  --text-accent: var(--brand-500);
  --surface: var(--neutral-0);
  --surface-tint: var(--neutral-100);
  --border: var(--neutral-300);
  --border-strong: var(--neutral-400);
  --text-soft: var(--neutral-600);
  --surface-raised: #ffffff;
  --surface-hover: var(--brand-100);
  --surface-sunken: var(--neutral-50);
  --header-bg: rgb(252 252 252 / 0.92);
  --tag-bg: var(--neutral-100);
  --tag-border: var(--neutral-200);
  --ph-stripe-a: var(--neutral-100);
  --ph-stripe-b: var(--neutral-50);
  --ph-text: var(--neutral-450);
  --icon-bg: var(--brand-100);
  --icon-border: var(--brand-200);
  --band-dark: var(--brand-900);
  --tile-end: var(--brand-100);
  --chip-active: var(--brand-900);
  --footer-bg: var(--neutral-900);
  --footer-line: var(--neutral-800);
  --logo-text: var(--brand-900);
  --logo-ink: #113c49;
  --danger-bg: rgb(198 50 43 / 0.07);
  --danger-border: rgb(198 50 43 / 0.35);
  --danger-text: #b42a23;
  --success-bg: rgb(31 138 76 / 0.08);
  --success-border: rgb(31 138 76 / 0.3);
  --success-text: #1b7a43;
  --hero-bg: linear-gradient(180deg, #fdfdfa 0%, #fafaf7 65%, var(--surface) 100%);
  --hero-glow-1: rgb(245 241 225 / 0.16);
  --hero-glow-2: rgb(255 255 252 / 0.5);
  --hero-grid: rgb(114 124 121 / 0.08);
  --hero-text: var(--neutral-900);
  --hero-lead: var(--neutral-600);
  --hero-label: #52686d;
  --hero-badge: var(--neutral-600);
  --hero-gradient-text: linear-gradient(90deg, #244e58, #306c76 55%, #42818b);
  --hero-outline: var(--border-strong);
  --hero-media-border: rgb(133 149 148 / 0.28);
  --hero-media-bg: linear-gradient(180deg, rgb(255 255 253 / 0.85), rgb(250 250 247 / 0.6));
  --hero-media-text: #52686d;
  --hero-edge: var(--border);
  color-scheme: light;
  --gradient: linear-gradient(111deg, var(--brand-700) 0%, var(--brand-500) 55%, var(--brand-400) 100%);

  --font-sans: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  /* High-contrast display serif for headlines; Chinese falls through to Noto Serif (Source Han Serif). */
  --font-display: "Noto Serif Display", "Noto Serif SC", "Songti SC", "STSong", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 8px;

  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(64px, 9vw, 120px);
  --header-h: 68px;
  --shadow: 0 1px 2px rgb(2 12 34 / 0.04), 0 8px 24px -12px rgb(2 12 34 / 0.12);
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--text-accent); }
:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
h1, h2, h3, h4 { margin: 0 0 0.5em; font-weight: 600; line-height: 1.2; letter-spacing: -0.011em; }
h1, h2, .h2 { font-family: var(--font-display); font-weight: 300; line-height: 1.1; letter-spacing: -0.012em; }
h1 { font-size: clamp(2.5rem, 5.4vw, 4.5rem); }
h2, .h2 { font-size: clamp(2rem, 3.5vw, 2.9rem); }
h3, .h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.011em; }
/* Song headlines need more leading and a little air between glyphs. */
:lang(zh) :is(h1, h2, .h2) { line-height: 1.28; letter-spacing: 0.02em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: calc(780px + 2 * var(--gutter)); }
.lead { font-size: 1.2rem; color: var(--text-muted); max-width: 46ch; }
.lead--on-dark { color: var(--brand-200); }
.muted { color: var(--text-muted); }
.muted-on-dark { color: var(--neutral-450); }
.fine { margin-top: 1rem; font-size: 0.875rem; color: var(--text-muted); }
.fine a { color: var(--text-accent); }
.text-gradient { background: linear-gradient(90deg, var(--brand-300), var(--brand-400) 40%, #a9c8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; left: 8px; top: 8px; z-index: 100; padding: 8px 12px; background: var(--brand-500); color: #fff; border-radius: var(--r-md); transform: translateY(-200%); opacity: 0; pointer-events: none; }
.skip-link:focus-visible { transform: none; opacity: 1; pointer-events: auto; }

/* Monospace eyebrow labels — the signature verda detail */
.mono-label {
  margin: 0 0 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-accent);
}
.mono-label--on-dark { color: var(--brand-300); }
.mono-tag {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--icon-border);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--text-accent);
  background: var(--icon-bg);
}
.mono-tag--on-dark { color: var(--brand-200); background: transparent; border-color: rgb(132 178 253 / 0.5); }
.metric { font-family: var(--font-display); font-size: 2.8rem; font-weight: 300; letter-spacing: -0.02em; font-variant-numeric: lining-nums; color: var(--text); line-height: 1; }
.metric--sm { font-size: 1.5rem; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 40px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--r-md);
  font: inherit; font-size: 0.9rem; font-weight: 600; line-height: 1;
  cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn--lg { min-height: 52px; padding: 0 26px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--primary { background: var(--brand-500); color: #fff; }
.btn--primary:hover { background: var(--brand-700); color: #fff; }
.btn--outline { border-color: var(--border-strong); color: var(--text); background: transparent; }
.btn--outline:hover { border-color: var(--brand-500); color: var(--brand-500); }
.btn--outline-on-dark { border-color: rgb(186 210 249 / 0.45); color: #fff; background: transparent; }
.btn--outline-on-dark:hover { border-color: #fff; background: rgb(255 255 255 / 0.06); color: #fff; }
.btn--text { padding-inline: 10px; color: var(--text); font-weight: 400; }
.btn--text:hover { color: var(--brand-500); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn-row--center { justify-content: center; }
.link-arrow { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; color: var(--text-accent); }
.link-arrow::after { content: "→"; transition: transform .15s; }
.link-arrow:hover::after { transform: translateX(3px); }
.link-arrow--back::after { content: none; }
.link-arrow--back::before { content: "←"; }

/* ==========================================================================
   Announcement + header
   ========================================================================== */
.announce { background: var(--brand-900); color: var(--neutral-0); font-size: 0.875rem; }
.announce__inner { display: flex; gap: 12px; align-items: center; justify-content: center; min-height: 38px; }
.announce a:hover { color: var(--brand-300); }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; gap: 32px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 11px; color: var(--logo-text); line-height: 1; }
.logo:hover { color: var(--logo-text); }
.logo__mark { display: block; width: 32px; height: 32px; flex: none; }
.logo__symbol { fill: var(--logo-ink); }
.logo__word { font-size: 1.16rem; letter-spacing: -0.02em; white-space: nowrap; }
.logo__word b { font-weight: 600; }
.logo__word span { font-weight: 400; }
.logo--on-dark, .logo--on-dark:hover { color: #fff; --logo-ink: #eaf1f0; }

.nav { display: flex; flex: 1; align-items: center; justify-content: space-between; }
.nav__list { display: flex; gap: 2px; }
.nav__item { position: static; }
.nav__link {
  display: inline-flex; align-items: center; gap: 4px; height: var(--header-h);
  padding: 0 10px; border: 0; background: none;
  font: inherit; font-size: 0.875rem; color: var(--text); cursor: pointer;
}
.nav__link:hover, .nav__item.is-open > .nav__link { color: var(--brand-500); }
.chev { width: 12px; height: 12px; transition: transform .2s; }
.nav__item.is-open .chev { transform: rotate(180deg); }
.nav__actions { display: flex; gap: 6px; align-items: center; }

.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.nav__item.is-open .mega { opacity: 1; visibility: visible; transform: none; }
.mega__inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 32px var(--gutter) 40px; }
.mega__group ul { display: grid; gap: 4px; }
.mega__link { display: grid; gap: 2px; padding: 10px 12px; margin-inline: -12px; border-radius: var(--r-md); }
.mega__link:hover { background: var(--surface-hover); }
.mega__title { font-weight: 600; }
.mega__desc { font-size: 0.85rem; color: var(--text-muted); }

.nav-toggle { display: none; margin-left: auto; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: var(--r-md); background: none; cursor: pointer; padding: 0 10px; }
.nav-toggle span { display: block; height: 1.5px; margin: 5px 0; background: var(--text); transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ==========================================================================
   Sections, grids, cards
   ========================================================================== */
.section { padding-block: var(--section-y); }
.section--tint { background: var(--surface-tint); }
.section--dark { background: var(--band-dark); color: #fff; }
.section-head { margin-bottom: 48px; max-width: 720px; }
.section-head--split { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-end; max-width: none; }
.section-head .lead { margin-bottom: 0; }

.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split--form { align-items: start; grid-template-columns: 2fr 3fr; }

.card {
  position: relative;
  padding: 28px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: var(--brand-300); }
.card h3 { margin-bottom: 0.4em; }
.card p:last-child { margin-bottom: 0; }
.card--pillar { display: flex; flex-direction: column; min-height: 320px; }
.card--pillar .tag-row { margin-top: auto; }
.card__index { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-muted); margin-bottom: 28px; }
.card--media { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card--media .ph-media, .card__img { border: 0; border-radius: 0; border-bottom: 1px solid var(--border); aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
.card__body { padding: 24px 28px 28px; display: flex; flex-direction: column; flex: 1; }
.card__body .link-arrow { margin-top: auto; padding-top: 12px; }
.stretched::after { content: ""; position: absolute; inset: 0; }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 8px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-soft); background: var(--tag-bg); border: 1px solid var(--tag-border); border-radius: var(--r-sm); }

.tile {
  display: flex; justify-content: space-between; gap: 24px; min-height: 220px;
  padding: 32px; border: 1px solid var(--border); border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--surface-raised) 0%, var(--tile-end) 100%);
}
.tile__metric { align-self: flex-end; text-align: right; display: grid; gap: 8px; }
.tile__metric .mono-label { margin: 0; color: var(--text-muted); }

.stats { display: flex; gap: 32px; margin: 16px 0 4px; padding-top: 16px; border-top: 1px solid var(--border); }
.stats dd { margin: 4px 0 0; font-size: 0.85rem; color: var(--text-muted); }

/* ==========================================================================
   Hero + page hero
   ========================================================================== */
.hero, .page-hero {
  position: relative; isolation: isolate; overflow: hidden; color: var(--hero-text);
  background:
    radial-gradient(60% 80% at 85% 0%, var(--hero-glow-1) 0%, transparent 60%),
    radial-gradient(50% 60% at 0% 100%, var(--hero-glow-2) 0%, transparent 70%),
    var(--hero-bg);
  border-bottom: 1px solid var(--hero-edge);
}
.hero { padding: clamp(72px, 10vw, 128px) 0 clamp(48px, 6vw, 72px); }
.hero__texture {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  mask-image: linear-gradient(180deg, transparent, #000 8%, #000 65%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 8%, #000 65%, transparent 100%);
}
.hero__texture-fallback {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--hero-grid) 1px, transparent 1px), linear-gradient(90deg, var(--hero-grid) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(90deg, transparent, #000);
}
.hero__texture-canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 0.6s ease; }
.hero__texture-fallback { transition: opacity 0.6s ease; }
.hero__texture.is-ready .hero__texture-canvas { opacity: 1; }
.hero__texture.is-ready .hero__texture-fallback { opacity: 0; }
.hero > .container, .page-hero > .container { position: relative; z-index: 1; }
@media (max-width: 760px) {
  .hero__texture { opacity: 0.8; }
}
.hero__inner { position: relative; }
.hero__inner > * { max-width: 900px; }
.hero__title, .page-hero h1 { color: var(--hero-text); }
.hero .text-gradient { background-image: var(--hero-gradient-text); }
.hero .mono-label--on-dark, .page-hero .mono-label--on-dark { color: var(--hero-label); }
.hero .lead--on-dark, .page-hero .lead--on-dark { color: var(--hero-lead); }
.hero .btn--outline-on-dark { border-color: var(--hero-outline); color: var(--hero-text); }
.hero .btn--outline-on-dark:hover { border-color: var(--brand-500); color: var(--text-accent); background: transparent; }
.hero .lead { font-size: 1.3rem; margin-bottom: 2rem; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 40px; font-size: 0.92rem; color: var(--hero-badge); }
.hero__badges li { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-400); box-shadow: 0 0 0 3px rgb(107 164 255 / 0.2); }
.hero .ph-media--hero { position: relative; margin-top: 64px; }

.page-hero { padding: clamp(64px, 8vw, 104px) 0; }
.page-hero .container { position: relative; }
.page-hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.5rem); }
.page-hero .lead { margin-bottom: 0; }

.breadcrumb { display: flex; gap: 8px; padding-block: 16px; font-size: 0.85rem; color: var(--text-muted); border-bottom: 1px solid var(--border); max-width: none; }
.breadcrumb a:hover { color: var(--brand-500); }

/* ==========================================================================
   Placeholders — visible scaffolding for content still to be supplied
   ========================================================================== */
.ph-media {
  display: grid; place-items: center; aspect-ratio: 16 / 9;
  border: 1px dashed var(--border-strong); border-radius: var(--r-lg);
  background: repeating-linear-gradient(135deg, var(--ph-stripe-a) 0 10px, var(--ph-stripe-b) 10px 20px);
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.05em; color: var(--ph-text);
}
.ph-media--hero {
  aspect-ratio: 16 / 7; border-color: var(--hero-media-border); color: var(--hero-media-text);
  background: var(--hero-media-bg); box-shadow: var(--shadow);
}
.ph-icon { width: 44px; height: 44px; margin-bottom: 20px; border-radius: var(--r-md); background: var(--icon-bg); border: 1px solid var(--icon-border); }
.ph-logo { display: grid; place-items: center; height: 48px; border: 1px dashed var(--border-strong); border-radius: var(--r-md); font-family: var(--font-mono); font-size: 0.72rem; color: var(--ph-text); }
.ph-cert { display: grid; place-items: center; aspect-ratio: 1; border: 1px dashed rgb(132 178 253 / 0.35); border-radius: var(--r-lg); font-family: var(--font-mono); font-size: 0.8rem; color: var(--brand-300); }
.ph-badge { padding: 6px 10px; border: 1px dashed var(--neutral-600); border-radius: var(--r-sm); font-family: var(--font-mono); font-size: 0.7rem; color: var(--neutral-450); }

/* ==========================================================================
   Page sections
   ========================================================================== */
.logos { padding: 40px 0; border-bottom: 1px solid var(--border); }
.logos__label { text-align: center; color: var(--text-muted); }
.logos__row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }

.cert-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.section--dark h2 { color: #fff; }
.section--dark .lead { margin-bottom: 2rem; }

.cta-band { position: relative; overflow: hidden; padding-block: var(--section-y); color: #fff; text-align: center; background: var(--gradient); }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 100% at 50% 0%, rgb(255 255 255 / 0.12), transparent 70%); }
.cta-band__inner { position: relative; display: grid; justify-items: center; }
.cta-band h2 { color: #fff; max-width: 20ch; }
.cta-band .lead { margin: 0 auto 2rem; text-align: center; }
.cta-band .mono-label--on-dark { color: var(--brand-200); }

.newsletter { padding-block: 56px; border-top: 1px solid var(--border); }
.newsletter__inner { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.newsletter h2 { margin-bottom: 0.25em; }
.newsletter p { margin: 0; }
.newsletter__form { display: flex; gap: 8px; flex: 0 1 460px; }
.newsletter__form .input { flex: 1; }

/* Pricing */
.plan { display: flex; flex-direction: column; gap: 4px; }
.plan--featured { border-color: var(--brand-500); box-shadow: 0 0 0 1px var(--brand-500), var(--shadow); }
.plan__flag { position: absolute; top: 20px; right: 20px; }
.plan__price { margin: 8px 0 4px; }
.plan .btn { margin: 20px 0 24px; }
.checklist { display: grid; gap: 10px; padding-top: 20px; border-top: 1px solid var(--border); }
.checklist li { position: relative; padding-left: 26px; color: var(--text-soft); }
.checklist li::before { content: ""; position: absolute; left: 2px; top: 0.45em; width: 12px; height: 7px; border-left: 2px solid var(--brand-500); border-bottom: 2px solid var(--brand-500); transform: rotate(-45deg); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th, .table td { padding: 14px 20px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); background: var(--surface-sunken); }
.table tr:last-child td { border-bottom: 0; }
.faq { border-bottom: 1px solid var(--border); }
.faq summary { padding: 20px 0; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--brand-500); }
.faq[open] summary::after { content: "−"; }

/* Blog */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.chip { display: inline-block; padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; font-size: 0.9rem; }
.chip--active { background: var(--chip-active); border-color: var(--chip-active); color: #fff; }
.chip--active:hover { color: #fff; }
.pager { display: flex; gap: 16px; justify-content: center; align-items: center; margin-top: 48px; }
.pager .mono-label { margin: 0; }
.empty { padding: 64px 24px; text-align: center; border: 1px dashed var(--border-strong); border-radius: var(--r-lg); }
.article__head { padding-top: clamp(48px, 7vw, 88px); }
.article__head h1 { font-size: clamp(2rem, 4vw, 3rem); }
.article__head .link-arrow { margin-bottom: 32px; }
.article__cover { width: 100%; border-radius: var(--r-lg); margin: 16px 0 0; }
.article__body { padding-block: 40px var(--section-y); }
.prose { font-size: 1.08rem; line-height: 1.8; }
.prose a { color: var(--text-accent); text-decoration: underline; }

/* Forms */
.form { display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 0.9rem; font-weight: 600; }
.req { color: var(--red-600); margin-left: 2px; }
.input, .field input, .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--surface-raised); color: var(--text); font: inherit; font-size: 0.95rem;
}
.field textarea { resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px rgb(25 92 199 / 0.15); }
.field--error input, .field--error select, .field--error textarea { border-color: var(--red-600); }
.field__error { margin: 0; font-size: 0.85rem; color: var(--danger-text); }
.contact-list { display: grid; gap: 24px; margin: 24px 0 0; }
.contact-list dd { margin: 0; font-size: 1.05rem; }
.contact-list .mono-label { margin-bottom: 4px; }


.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: grid; gap: 8px; }
.toast { padding: 12px 16px; border-radius: var(--r-md); background: var(--brand-900); color: #fff; box-shadow: var(--shadow); font-size: 0.92rem; animation: toast-in .2s ease-out; }
.toast--error { background: var(--red-600); }
.toast--success { border-left: 3px solid var(--brand-400); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.error-page { padding-block: 120px; text-align: center; }
.error-page .lead { margin-inline: auto; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--footer-bg); color: var(--neutral-400); font-size: 0.92rem; }
.site-footer__top { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 40px; padding-block: 72px 56px; }
.site-footer__brand p { margin: 16px 0 20px; max-width: 30ch; }
.badge-row { display: flex; gap: 8px; flex-wrap: wrap; }
.site-footer__col ul { display: grid; gap: 10px; }
.site-footer a:hover { color: #fff; }
.site-footer .mono-label { color: var(--neutral-450); }
.site-footer__bottom { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; padding-block: 24px; border-top: 1px solid var(--footer-line); font-size: 0.85rem; }
.site-footer__bottom p { margin: 0; }
.legal, .social { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.social__dot { display: block; width: 20px; height: 20px; border-radius: var(--r-sm); border: 1px dashed var(--neutral-600); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .site-footer__top { grid-template-columns: repeat(3, 1fr); }
  .site-footer__brand { grid-column: 1 / -1; }
  .logos__row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .grid--2, .grid--3, .grid--4, .split, .split--form, .form__row { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer__top { grid-template-columns: repeat(2, 1fr); }
  .tile { flex-direction: column; min-height: 0; }
  .tile__metric { align-self: flex-start; text-align: left; }
  .newsletter__form { flex-basis: 100%; }
  .announce__inner { justify-content: flex-start; }
  .hero .ph-media--hero { aspect-ratio: 4 / 3; margin-top: 48px; }
  .btn--lg { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   Buttons & feedback shared by account pages
   ========================================================================== */
.btn--google { border-color: var(--border-strong); background: var(--surface-raised); color: var(--text); gap: 12px; }
.btn--google:hover { border-color: var(--neutral-450); background: var(--surface-sunken); color: var(--text); }
.btn--google .g-logo { flex: none; }
.btn--link { min-height: 0; padding: 0; border: 0; background: none; color: var(--text-accent); font-weight: 600; }
.btn--link:hover { color: var(--brand-700); text-decoration: underline; }
.btn--danger { background: var(--red-600); color: #fff; }
.btn--danger:hover { background: #a3271f; color: #fff; }
.btn-stack { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-stack--vertical { flex-direction: column; align-items: stretch; }
.form__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.form__actions > .btn-stack { flex: 1; }
.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; font-size: 0.85rem; color: var(--text-muted); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.sep { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }
.alert { padding: 12px 14px; border: 1px solid var(--icon-border); border-radius: var(--r-md); background: var(--surface-hover); font-size: 0.92rem; }
.alert p { margin: 0; }
.alert--error { border-color: var(--danger-border); background: var(--danger-bg); color: var(--danger-text); }
.badge { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 2px 10px; border: 1px solid var(--tag-border); border-radius: 999px; background: var(--tag-bg); color: var(--text-soft); font-size: 0.75rem; font-weight: 600; }
.badge--success { border-color: var(--success-border); background: var(--success-bg); color: var(--success-text); }
.badge--success::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--warning { border-color: #e7c27a; background: #fff6e2; color: #8a5a00; }
.center { text-align: center; }
.el-p { color: var(--text-muted); }
.el-h2 { margin-top: 8px; }
.el-details { margin-top: 24px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--r-lg); }
.el-details summary { font-weight: 600; color: var(--text-accent); cursor: pointer; }
.el-details__body { padding-top: 16px; }
.toast--info { border-left: 3px solid var(--brand-400); }

/* Form fields */
.field__label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field__link { font-size: 0.85rem; font-weight: 600; color: var(--text-accent); }
.field__help { font-size: 0.8rem; color: var(--text-muted); }
.field__help ul { margin: 4px 0 0; padding-left: 1.1em; list-style: disc; }
.field--check { display: flex; align-items: center; gap: 8px; }
.field--check input { width: 18px; min-height: 0; height: 18px; margin: 0; accent-color: var(--brand-500); }
.field--check label { font-weight: 400; }
.pw { position: relative; }
.pw input { padding-right: 46px; }
.pw__toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: var(--r-md); background: none; color: var(--text-muted); cursor: pointer; }
.pw__toggle:hover { color: var(--text-accent); }
.pw__toggle svg { width: 18px; height: 18px; }
.pw__slash { display: none; }
.pw__toggle[aria-pressed="true"] .pw__slash { display: inline; }
.field .code-input {
  min-height: 68px; padding: 12px; text-align: center;
  font-family: var(--font-mono); font-size: 2rem; font-weight: 500; letter-spacing: 0.45em; text-indent: 0.45em;
}
.code-input::placeholder { color: var(--border-strong); }

/* ==========================================================================
   Sign-in / sign-up shell
   ========================================================================== */
.auth-shell { display: grid; grid-template-columns: minmax(360px, 5fr) 7fr; min-height: calc(100vh - var(--header-h) - 38px); }
.auth-aside {
  position: relative; overflow: hidden; padding: clamp(32px, 4vw, 56px); color: #fff;
  background:
    radial-gradient(70% 60% at 100% 0%, rgb(25 92 199 / 0.55), transparent 65%),
    radial-gradient(60% 50% at 0% 100%, rgb(107 164 255 / 0.18), transparent 70%),
    linear-gradient(160deg, var(--brand-900) 0%, #0a2252 100%);
}
.auth-aside__grid { position: absolute; inset: 0; background-image: linear-gradient(rgb(132 178 253 / 0.07) 1px, transparent 1px), linear-gradient(90deg, rgb(132 178 253 / 0.07) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(200deg, #000, transparent 75%); }
.auth-aside__mark { position: absolute; right: -14%; bottom: -18%; width: 78%; opacity: 0.16; --logo-ink: #eaf1f0; }
.auth-aside__inner { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; height: 100%; max-width: 440px; }
.auth-aside__title { margin: 0 0 28px; font-family: var(--font-display); font-size: clamp(1.8rem, 2.5vw, 2.4rem); font-weight: 300; line-height: 1.2; letter-spacing: -0.012em; }
.auth-aside__list { display: grid; gap: 14px; }
.auth-aside__list li { position: relative; padding-left: 32px; color: var(--brand-200); }
.auth-aside__list li::before { content: ""; position: absolute; left: 0; top: 0.15em; width: 20px; height: 20px; border: 1px solid rgb(132 178 253 / 0.6); border-radius: 50%; background: rgb(107 164 255 / 0.15); }
.auth-aside__list li::after { content: ""; position: absolute; left: 6.5px; top: calc(0.15em + 6px); width: 7px; height: 4px; border-left: 1.6px solid #fff; border-bottom: 1.6px solid #fff; transform: rotate(-45deg); }
.auth-aside__foot { margin: 0; font-size: 0.82rem; color: var(--neutral-450); }
.auth-main { display: grid; place-items: center; padding: clamp(40px, 6vw, 80px) var(--gutter); background: var(--surface); }
.auth-card { width: 100%; max-width: 420px; }
.auth-head { margin-bottom: 28px; }
.auth-title { margin: 0 0 8px; font-family: var(--font-display); font-size: 2.2rem; font-weight: 400; letter-spacing: -0.012em; }
.auth-sub { margin: 0; color: var(--text-muted); }
.auth-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 20px; border: 1px solid var(--icon-border); border-radius: 14px; background: var(--icon-bg); color: var(--text-accent); }
.auth-icon svg { width: 24px; height: 24px; }
.auth-foot { margin: 28px 0 0; padding-top: 20px; border-top: 1px solid var(--border); text-align: center; color: var(--text-muted); }
.auth-foot a { font-weight: 600; color: var(--text-accent); }
.auth-card .form { gap: 16px; }
.auth-card .fine { margin: 0; text-align: center; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 20px; padding: 4px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface-sunken); }
.seg a { padding: 8px 12px; border-radius: 6px; text-align: center; font-size: 0.92rem; color: var(--text-muted); }
.seg a[aria-current="page"] { background: var(--surface-raised); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgb(2 12 34 / 0.08); }
.code-actions { display: flex; justify-content: center; gap: 24px; margin-top: 18px; }

/* ==========================================================================
   Account area (dashboard + allauth "manage" pages)
   ========================================================================== */
.manage { display: grid; grid-template-columns: 220px 1fr; gap: clamp(24px, 4vw, 56px); padding-block: 56px 96px; }
.manage__nav { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; display: grid; gap: 2px; }
.manage__nav .mono-label { margin: 0 12px 10px; }
.manage__nav a, .manage__nav button { display: block; width: 100%; padding: 9px 12px; border: 0; border-radius: 6px; background: none; color: var(--text-soft); font: inherit; font-size: 0.95rem; text-align: left; cursor: pointer; }
.manage__nav a:hover, .manage__nav button:hover { background: var(--surface-hover); color: var(--text); }
.manage__nav a[aria-current="page"] { background: var(--surface-hover); color: var(--text-accent); font-weight: 600; }
.manage__head { margin-bottom: 28px; }
.manage__body { min-width: 0; }
.manage__body > .form, .manage__body > form { max-width: 520px; }
.page-manage .auth-title { font-size: 1.8rem; }
.dash-cards { margin-bottom: 20px; }
.dash-cards .card { display: flex; flex-direction: column; gap: 10px; }
.dash-cards .mono-label { margin: 0; }
.dash-value { margin: 0; font-size: 1.1rem; font-weight: 600; overflow-wrap: anywhere; }
.dash-cards .link-arrow { margin-top: auto; padding-top: 6px; }
.panel { margin-bottom: 20px; }
.panel__actions { margin-top: 16px; }
.provider-list { display: grid; gap: 10px; }
.align-right { text-align: right; }

@media (max-width: 960px) {
  .auth-shell { grid-template-columns: 1fr; min-height: 0; }
  .auth-aside { display: none; }
  .auth-main { place-items: start center; padding-top: 40px; padding-bottom: 64px; }
  .auth-shell { min-height: 0; }
  .auth-main { place-items: start center; padding-top: 40px; padding-bottom: 64px; }
  .manage { grid-template-columns: 1fr; padding-top: 32px; }
  .manage__nav { position: static; display: flex; gap: 4px; overflow-x: auto; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
  .manage__nav .mono-label { display: none; }
  .manage__nav a, .manage__nav button { width: auto; white-space: nowrap; }
}

/* ==========================================================================
   Header: central console link + signed-in account menu
   ========================================================================== */
.nav__link--console { gap: 7px; }
.nav__link--console svg { width: 16px; height: 16px; color: var(--text-accent); }
.nav__link--console[aria-current="page"] { color: var(--text-accent); font-weight: 600; }
.acct { position: relative; }
.acct__btn {
  display: inline-flex; align-items: center; gap: 8px; max-width: 230px; height: 40px; padding: 0 10px 0 4px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface-raised); color: var(--text);
  font: inherit; font-size: 0.92rem; cursor: pointer;
}
.acct__btn:hover, .acct.is-open .acct__btn { border-color: var(--brand-300); }
.acct.is-open .chev { transform: rotate(180deg); }
.acct__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.avatar {
  display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-400), var(--brand-700)); color: #fff;
  font-size: 0.85rem; font-weight: 700; line-height: 1; object-fit: cover;
}
.avatar--lg { width: 44px; height: 44px; font-size: 1.1rem; }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 270px; padding: 6px;
  background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s;
}
.acct.is-open .menu-pop { opacity: 1; visibility: visible; transform: none; }
.acct__head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; padding: 12px 12px 14px; border-bottom: 1px solid var(--border); }
.acct__who { min-width: 0; }
.acct__name { margin: 0; font-weight: 600; }
.acct__mail { margin: 0; font-size: 0.85rem; color: var(--text-muted); overflow-wrap: anywhere; }
.acct__item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 6px;
  background: none; color: var(--text); font: inherit; font-size: 0.93rem; text-align: left; cursor: pointer;
}
.acct__item:hover { background: var(--surface-hover); color: var(--text); }
.acct__item svg { width: 16px; height: 16px; color: var(--text-accent); }
.acct__item--console { font-weight: 600; }
.acct__logout { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid var(--border); }
.acct__logout .acct__item { color: var(--danger-text); }
@media (max-width: 1200px) {
  .acct { width: 100%; }
  .acct__btn { width: 100%; max-width: none; height: 52px; border-radius: var(--r-md); }
  .acct__label { flex: 1; text-align: left; }
  .acct .menu-pop { position: static; display: none; margin-top: 8px; box-shadow: none; opacity: 1; visibility: visible; transform: none; }
  .acct.is-open .menu-pop { display: block; }
}

/* Header layout: drawer below 1200px; compact between 1200 and 1380px so longer languages fit. */
.nav__link { white-space: nowrap; }
@media (min-width: 1201px) and (max-width: 1380px) {
  .site-header__inner { gap: 20px; }
  .nav__link { padding: 0 9px; }
  .nav__contact { display: none; }
  .lang__btn span { display: none; }
  .lang__btn { width: 38px; padding: 0; }
  .acct__label { max-width: 110px; }
}
/* French labels run longer: on desktop its header always uses the compact layout. */
@media (min-width: 1381px) {
  html[lang="fr"] .nav__link { padding: 0 9px; }
  html[lang="fr"] .nav__contact { display: none; }
  html[lang="fr"] .lang__btn span { display: none; }
  html[lang="fr"] .lang__btn { width: 38px; padding: 0; }
}
.nav__link svg, .acct__btn svg, .icon-btn svg { flex: none; }
@media (max-width: 1200px) {
  /* backdrop-filter would make the header the containing block of the fixed drawer, clipping it. */
  .site-header { backdrop-filter: none; background: var(--surface); }
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0; z-index: 49;
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    padding: 8px var(--gutter) 32px; overflow-y: auto;
    background: var(--surface);
    transform: translateX(100%); transition: transform .25s ease;
  }
  .nav.is-open { transform: none; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__item { border-bottom: 1px solid var(--border); }
  .nav__link { width: 100%; height: 56px; padding: 0; justify-content: space-between; font-size: 1.05rem; }
  .mega { position: static; display: none; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; }
  .nav__item.is-open .mega { display: block; }
  .mega__inner { grid-template-columns: 1fr; gap: 20px; padding: 4px 0 20px; }
  .nav__actions { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 24px; }
  .nav__actions .btn { min-height: 48px; }
  body.nav-open { overflow: hidden; }
  .nav__link--console { justify-content: flex-start; }
}

/* ==========================================================================
   Account centre: console, profile, devices, 2FA
   ========================================================================== */
.manage__group { margin: 18px 12px 6px !important; }
.manage__logout { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border); }
.manage__logout button { color: var(--danger-text) !important; }
.console-head { display: flex; align-items: center; gap: 20px; margin-bottom: 36px; }
.console-head h1 { margin: 0 0 4px; }
.console-head .mono-label { margin-bottom: 6px; }
.console-head .muted { margin: 0; }
.avatar--xl { width: 64px; height: 64px; font-size: 1.6rem; }
.section-label { margin: 0 0 12px; color: var(--text-muted); }
.dash-cards + .section-label { margin-top: 36px; }
.dash-cards.grid--4 { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.method-list { display: flex; flex-wrap: wrap; gap: 6px; }
.method-list li { padding: 2px 10px; border: 1px solid var(--tag-border); border-radius: 999px; background: var(--tag-bg); font-size: 0.8rem; font-weight: 600; color: var(--text-soft); }
.panel h2 { margin-bottom: 12px; }
.profile-card { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.profile-card__id { display: flex; align-items: center; gap: 16px; }
.profile-card__id p { margin: 0; }
.profile-facts { display: flex; gap: 32px; margin: 0; }
.profile-facts .mono-label { margin: 0 0 4px; color: var(--text-muted); }
.profile-facts dd { margin: 0; font-weight: 600; }
.form--narrow { max-width: 560px; }
.danger-zone { border-color: var(--danger-border); }
.danger-zone h2 { color: var(--danger-text); }
.btn--danger-outline { border-color: var(--danger-border); color: var(--danger-text); background: transparent; }
.btn--danger-outline:hover { border-color: var(--red-600); background: var(--danger-bg); color: var(--danger-text); }
.checklist--danger li::before { border-color: var(--danger-text); border-width: 0; width: 7px; height: 7px; top: 0.6em; left: 4px; border-radius: 50%; background: var(--danger-text); transform: none; }
.checklist--danger { padding-top: 0; border-top: 0; margin-bottom: 16px; }
.device-list { display: grid; gap: 12px; margin-bottom: 24px; }
.device { display: flex; align-items: center; gap: 16px; padding: 18px 22px; }
.device--current { border-color: var(--brand-300); }
.device__icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--icon-bg); color: var(--text-accent); }
.device__icon svg { width: 22px; height: 22px; }
.device__info { min-width: 0; }
.device__name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 2px; font-weight: 600; }
.device__meta { margin: 0; font-size: 0.88rem; overflow-wrap: anywhere; }
.passkey-btn { margin-top: 12px; gap: 10px; }
.passkey-btn svg { width: 18px; height: 18px; flex: none; }
.qr-code { display: block; width: 200px; height: 200px; margin: 4px 0 8px; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-lg); background: #fff; }
#recovery_codes { font-family: var(--font-mono); letter-spacing: 0.08em; }
@media (max-width: 760px) {
  .console-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .profile-facts { gap: 20px; }
}

/* ==========================================================================
   Dark theme — follows the OS unless the visitor picked one (data-theme on <html>)
   ========================================================================== */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --text: #e7ecf4;
    --text-muted: #94a0b4;
    --text-soft: #b7c1d1;
    --text-accent: var(--brand-400);
    --surface: #050d1f;
    --surface-tint: #08142b;
    --surface-raised: #0b1730;
    --surface-hover: #11213f;
    --surface-sunken: #0e1b35;
    --border: #1b2a47;
    --border-strong: #2b3c5e;
    --header-bg: rgb(5 13 31 / 0.88);
    --tag-bg: #11203d;
    --tag-border: #1f3053;
    --ph-stripe-a: #0c1832;
    --ph-stripe-b: #091429;
    --ph-text: #5f6d86;
    --icon-bg: #10244a;
    --icon-border: #1d3c74;
    --band-dark: #0a1d40;
    --tile-end: #0d1f40;
    --chip-active: var(--brand-500);
    --footer-bg: #030916;
    --footer-line: #142039;
    --logo-text: #f4f7fb;
    --logo-ink: #eaf1f0;
    --danger-bg: rgb(255 107 97 / 0.1);
    --danger-border: rgb(255 107 97 / 0.4);
    --danger-text: #ff8a80;
    --success-bg: rgb(76 210 138 / 0.1);
    --success-border: rgb(76 210 138 / 0.35);
    --success-text: #6fdc9f;
    --hero-bg: linear-gradient(180deg, #041e2a 0%, #062e3a 60%, #051b26 100%);
    --hero-glow-1: rgb(24 106 126 / 0.3);
    --hero-glow-2: rgb(11 64 79 / 0.35);
    --hero-grid: rgb(116 198 211 / 0.1);
    --hero-text: #ffffff;
    --hero-lead: #b8d2d6;
    --hero-label: #81bec9;
    --hero-badge: #b8d2d6;
    --hero-gradient-text: linear-gradient(90deg, #9ed1d9, #68b1c3 40%, #c1e5e5);
    --hero-outline: rgb(186 210 249 / 0.45);
    --hero-media-border: rgb(129 190 201 / 0.3);
    --hero-media-bg: linear-gradient(180deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.01));
    --hero-media-text: #81bec9;
    --hero-edge: transparent;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px -12px rgb(0 0 0 / 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --text: #e7ecf4;
  --text-muted: #94a0b4;
  --text-soft: #b7c1d1;
  --text-accent: var(--brand-400);
  --surface: #050d1f;
  --surface-tint: #08142b;
  --surface-raised: #0b1730;
  --surface-hover: #11213f;
  --surface-sunken: #0e1b35;
  --border: #1b2a47;
  --border-strong: #2b3c5e;
  --header-bg: rgb(5 13 31 / 0.88);
  --tag-bg: #11203d;
  --tag-border: #1f3053;
  --ph-stripe-a: #0c1832;
  --ph-stripe-b: #091429;
  --ph-text: #5f6d86;
  --icon-bg: #10244a;
  --icon-border: #1d3c74;
  --band-dark: #0a1d40;
  --tile-end: #0d1f40;
  --chip-active: var(--brand-500);
  --footer-bg: #030916;
  --footer-line: #142039;
  --logo-text: #f4f7fb;
  --logo-ink: #eaf1f0;
  --danger-bg: rgb(255 107 97 / 0.1);
  --danger-border: rgb(255 107 97 / 0.4);
  --danger-text: #ff8a80;
  --success-bg: rgb(76 210 138 / 0.1);
  --success-border: rgb(76 210 138 / 0.35);
  --success-text: #6fdc9f;
  --hero-bg: linear-gradient(180deg, #041e2a 0%, #062e3a 60%, #051b26 100%);
  --hero-glow-1: rgb(24 106 126 / 0.3);
  --hero-glow-2: rgb(11 64 79 / 0.35);
  --hero-grid: rgb(116 198 211 / 0.1);
  --hero-text: #ffffff;
  --hero-lead: #b8d2d6;
  --hero-label: #81bec9;
  --hero-badge: #b8d2d6;
  --hero-gradient-text: linear-gradient(90deg, #9ed1d9, #68b1c3 40%, #c1e5e5);
  --hero-outline: rgb(186 210 249 / 0.45);
  --hero-media-border: rgb(129 190 201 / 0.3);
  --hero-media-bg: linear-gradient(180deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.01));
  --hero-media-text: #81bec9;
  --hero-edge: transparent;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px -12px rgb(0 0 0 / 0.6);
  color-scheme: dark;
}
.site-footer { border-top: 1px solid var(--footer-line); }

/* Header tools: language menu + theme toggle */
.tools { display: flex; gap: 4px; align-items: center; margin-right: 6px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0;
  border: 1px solid transparent; border-radius: var(--r-md); background: none; color: var(--text); cursor: pointer;
}
.icon-btn:hover { border-color: var(--border); color: var(--text-accent); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .i-sun, .theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root:not([data-theme="dark"]) .theme-toggle .i-moon { display: block; }
.lang { position: relative; }
.lang__btn { display: inline-flex; align-items: center; gap: 6px; width: auto; padding: 0 10px; font: inherit; font-size: 0.875rem; }
.lang__menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 168px; padding: 6px;
  background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s;
}
.lang.is-open .lang__menu { opacity: 1; visibility: visible; transform: none; }
.lang__menu button {
  display: flex; justify-content: space-between; width: 100%; padding: 9px 12px; border: 0; border-radius: var(--r-md);
  background: none; color: var(--text); font: inherit; font-size: 0.92rem; text-align: left; cursor: pointer;
}
.lang__menu button:hover { background: var(--surface-hover); }
.lang__menu button[aria-current="true"] { color: var(--text-accent); font-weight: 600; }
.lang__menu button[aria-current="true"]::after { content: "✓"; }
:lang(zh-Hant) {
  --font-sans: "Inter", "PingFang TC", "Hiragino Sans CNS", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif;
  --font-display: "Noto Serif Display", "Noto Serif TC", "Songti TC", serif;
}
@media (max-width: 1200px) {
  .tools { order: -1; justify-content: space-between; margin: 0 0 8px; }
  .lang__menu { left: 0; right: auto; }
}

/* ==========================================================================
   Central console — application shell (sidebar, top bar) and project pages.
   Denser than the marketing pages: 14px text, 13px navigation, tight cards.
   ========================================================================== */
.page-console { --gold: #946a1c; font-size: 14px; line-height: 1.55; background: var(--surface); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .page-console { --gold: #e3bd6c; } }
:root[data-theme="dark"] .page-console { --gold: #e3bd6c; }
.ico { display: block; flex: none; }
.btn .ico { width: 15px; height: 15px; }
.btn--sm { min-height: 28px; padding: 0 10px; font-size: 12.5px; gap: 6px; }
.page-console .btn { min-height: 32px; padding: 0 13px; font-size: 13px; gap: 6px; }
.page-console .btn--sm { min-height: 28px; padding: 0 10px; font-size: 12.5px; }
.page-console .btn--lg { min-height: 38px; padding: 0 18px; font-size: 14px; }
.page-console .mono-label { font-size: 10.5px; letter-spacing: 0.1em; }
.page-console .badge { padding: 1px 8px; font-size: 11px; }
.page-console .muted { color: var(--text-muted); }
.page-console .form { gap: 12px; }
.page-console .field { gap: 5px; }
.page-console .field label { font-size: 12.5px; }
.page-console .field input, .page-console .field select {
  height: 34px; min-height: 34px; padding: 5px 10px; border-radius: 6px; font-size: 13.5px;
}
.page-console .field__error, .page-console .field__help { font-size: 12px; }
.page-console .alert { padding: 9px 12px; font-size: 13px; }
.page-console .link-arrow { font-size: 13px; }
.page-console .card { padding: 18px 20px; }

.cs { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.cs-side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 10px;
  padding: 14px 10px 12px; border-right: 1px solid var(--border); background: var(--surface-sunken); overflow-y: auto;
}
.cs-side__brand { padding: 2px 8px 6px; }
.cs-side__brand .logo { gap: 9px; }
.cs-side__brand .logo__mark { width: 24px; height: 24px; }
.cs-side__brand .logo__word { font-size: 15px; }
.cs-nav { display: grid; gap: 1px; }
.cs-nav__group { margin: 14px 8px 4px; font-size: 10px; color: var(--text-muted); }
.cs-nav__item {
  display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 6px;
  color: var(--text-soft); font-size: 13px; line-height: 1.35;
}
.cs-nav__item .ico { width: 16px; height: 16px; color: var(--text-muted); }
.cs-nav__item:hover { background: var(--surface-hover); color: var(--text); }
.cs-nav__item[aria-current="page"] {
  background: var(--surface-raised); color: var(--text); font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--border), 0 1px 2px rgb(2 12 34 / 0.05);
}
.cs-nav__item[aria-current="page"] .ico { color: var(--text-accent); }
.cs-nav__item--placeholder { border: 1px dashed var(--border-strong); color: var(--text-muted); font-size: 12.5px; cursor: default; }
.cs-nav__item--placeholder:hover { background: none; color: var(--text-muted); }
.cs-side__foot { display: grid; gap: 1px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); }

/* Project switcher and monograms */
.switcher { position: relative; }
.switcher__btn {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px 8px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface-raised); color: var(--text);
  font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.switcher__btn:hover, .switcher.is-open .switcher__btn { border-color: var(--brand-300); box-shadow: 0 1px 2px rgb(2 12 34 / 0.06); }
.switcher__btn > .ico { width: 14px; height: 14px; margin-left: auto; color: var(--text-muted); }
.switcher__text { display: grid; min-width: 0; }
.switcher__name { overflow: hidden; font-size: 13px; font-weight: 600; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.switcher__id { font-family: var(--font-mono); font-size: 10.5px; line-height: 1.3; color: var(--text-muted); }
/* The sidebar scrolls, which clips anything wider than it: the menu matches the switcher. */
.switcher__pop { left: 0; right: 0; top: calc(100% + 6px); width: auto; min-width: 0; padding: 5px; }
.switcher.is-open .switcher__pop { opacity: 1; visibility: visible; transform: none; }
.switcher__label { margin: 6px 8px 4px; font-size: 10px; color: var(--text-muted); }
.switcher__list { max-height: 300px; overflow-y: auto; }
.switcher__item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; color: var(--text); font-size: 13px; }
.switcher__item:hover { background: var(--surface-hover); color: var(--text); }
.switcher__item .ico { width: 14px; height: 14px; color: var(--text-accent); }
.switcher__item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switcher__role { flex: none; font-size: 11px; color: var(--text-muted); }
.switcher__foot { margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--border); }
.proj-mark {
  display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 6px;
  background: linear-gradient(140deg, #2a6a76, #0f3640); color: #eef6f4;
  font-family: var(--font-display); font-size: 14px; line-height: 1;
}
.proj-mark--sm { width: 20px; height: 20px; border-radius: 5px; font-size: 11px; }
.proj-mark--lg { width: 32px; height: 32px; border-radius: 8px; font-size: 16px; }
.proj-mark--xl { width: 48px; height: 48px; margin-bottom: 16px; border-radius: 11px; font-size: 22px; }
.proj-mark--empty { background: var(--tag-bg); color: var(--text-muted); }
.proj-mark--empty .ico { width: 14px; height: 14px; }

/* Top bar */
.cs-main { display: flex; flex-direction: column; min-width: 0; }
.cs-top {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; height: 48px; padding: 0 24px;
  border-bottom: 1px solid var(--border); background: var(--header-bg); backdrop-filter: saturate(1.4) blur(10px);
}
.cs-top__menu { display: none; }
.cs-crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--text-muted); }
.cs-crumbs > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-crumbs a { color: var(--text-muted); }
.cs-crumbs a:hover { color: var(--text); }
.cs-crumbs > :last-child { color: var(--text); font-weight: 600; }
.cs-top__tools { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.cs-top .tools { order: 0; gap: 2px; margin: 0; }
.cs-top .icon-btn { width: 32px; height: 32px; }
.cs-top .icon-btn svg { width: 16px; height: 16px; }
.cs-top .lang__btn { width: auto; padding: 0 8px; font-size: 12.5px; }
.cs-top .lang__menu { left: auto; right: 0; }
.cs-top .acct { width: auto; margin-left: 4px; }
.cs-top .acct__btn { width: auto; max-width: 200px; height: 32px; gap: 7px; padding: 0 8px 0 3px; border-radius: 999px; font-size: 12.5px; }
.cs-top .acct__btn .avatar { width: 24px; height: 24px; font-size: 11px; }
.cs-top .acct__label { flex: none; max-width: 120px; }
.cs-top .acct .menu-pop {
  position: absolute; display: block; margin: 0; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
}
.cs-top .acct.is-open .menu-pop { opacity: 1; visibility: visible; transform: none; }
.cs-top .menu-pop { min-width: 240px; padding: 5px; }
.cs-top .acct__head { padding: 10px 10px 12px; }
.cs-top .acct__item { padding: 7px 10px; font-size: 13px; }
.cs-top .lang__menu button { font-size: 13px; }
.cs-banner {
  display: flex; align-items: center; gap: 10px; margin: 16px 28px 0; padding: 8px 12px;
  border: 1px solid var(--icon-border); border-radius: 8px; background: var(--surface-hover); font-size: 13px;
}
.cs-banner .ico { width: 16px; height: 16px; color: var(--text-accent); }
.cs-banner { max-width: calc(1120px - 56px); }
.cs-section + .proj-grid { margin-top: 26px; }
.cs-banner p { flex: 1; margin: 0; }

/* Page body */
.cs-body { width: 100%; max-width: 1120px; padding: 28px 28px 64px; }
.cs-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.cs-head .mono-label { margin-bottom: 6px; color: var(--text-muted); }
.cs-title { margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: 300; line-height: 1.2; letter-spacing: -0.01em; }
:lang(zh) .page-console .cs-title { line-height: 1.3; letter-spacing: 0.02em; }
.cs-lead { max-width: 64ch; margin: 6px 0 0; font-size: 13px; }
.cs-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; font-size: 12.5px; }
.cs-section { margin-top: 30px; }
.cs-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.cs-h2 { margin: 0; font-family: var(--font-sans); font-size: 14px; font-weight: 600; line-height: 1.35; letter-spacing: -0.005em; }
:lang(zh) .page-console .cs-h2 { line-height: 1.35; letter-spacing: 0; }
.cs-card { margin-bottom: 14px; }
.cs-card, .cs-card:hover, .card.cs-form:hover { border-color: var(--border); }
.cs-card > .muted, .cs-card > p { margin: 4px 0 14px; font-size: 13px; }
.cs-card .cs-form { margin-top: 14px; }
.cs-form { max-width: 460px; }
.card.cs-form { max-width: 500px; }
.empty-line { margin: 0; padding: 12px 14px; border: 1px dashed var(--border); border-radius: 8px; font-size: 13px; }

.id-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 6px 2px 8px;
  border: 1px solid var(--border); border-radius: 5px; background: var(--surface-sunken); color: var(--text-soft);
  font-family: var(--font-mono); font-size: 11.5px; line-height: 1.5; cursor: pointer;
}
.id-chip:hover { border-color: var(--brand-300); color: var(--text); }
.id-chip .ico { width: 12px; height: 12px; color: var(--text-muted); }
.role--owner { border-color: color-mix(in srgb, var(--gold) 40%, transparent); background: color-mix(in srgb, var(--gold) 10%, transparent); color: var(--gold); }
.role--admin { border-color: var(--icon-border); background: var(--icon-bg); color: var(--text-accent); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-raised); color: var(--text); }
a.stat { transition: border-color .15s, box-shadow .15s; }
a.stat:hover { border-color: var(--brand-300); box-shadow: var(--shadow); color: var(--text); }
.stat .mono-label { margin: 0; color: var(--text-muted); }
.stat__value { margin: 4px 0 0; font-family: var(--font-display); font-size: 26px; font-weight: 300; line-height: 1.1; }
.stat__value--text { margin-top: 6px; font-family: var(--font-sans); font-size: 14px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.stat__note { margin: 0; font-size: 12px; color: var(--text-muted); overflow-wrap: anywhere; }

.ph-panel {
  display: grid; justify-items: center; gap: 4px; padding: 30px 20px; text-align: center;
  border: 1px dashed var(--border-strong); border-radius: 8px;
  background: repeating-linear-gradient(135deg, var(--ph-stripe-a) 0 10px, var(--ph-stripe-b) 10px 20px);
}
.ph-panel .ico { width: 22px; height: 22px; margin-bottom: 4px; color: var(--text-muted); }
.ph-panel__title { margin: 0; font-size: 13.5px; font-weight: 600; }
.ph-panel .muted { margin: 0; font-size: 12.5px; }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.people .person { padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-raised); }
.person__text { display: grid; flex: 1; min-width: 0; line-height: 1.35; }
.person__name { overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.person__mail { overflow: hidden; font-size: 12px; color: var(--text-muted); text-overflow: ellipsis; white-space: nowrap; }
.you { margin-left: 4px; padding: 0 5px; border-radius: 4px; background: var(--tag-bg); color: var(--text-muted); font-size: 10.5px; font-weight: 600; }
.avatar--member { width: 28px; height: 28px; font-size: 11.5px; background: linear-gradient(135deg, #3d7d89, #173f49); }

/* Team */
.invite-form { margin-top: 2px; }
.invite-form__row { display: grid; grid-template-columns: minmax(0, 1fr) 160px auto; gap: 10px; align-items: end; }
.page-console .invite-form__row .btn, .page-console .invite-form__row input, .page-console .invite-form__row select { height: 34px; min-height: 34px; }
.cs-table-wrap { overflow: visible; border-radius: 8px; }
.cs-table { font-size: 13px; }
.cs-table th { padding: 7px 14px; font-size: 10.5px; letter-spacing: 0.08em; }
.cs-table td { padding: 8px 14px; vertical-align: middle; }
.cs-table th:last-child, .cs-table td:last-child { width: 1%; }
.row-actions { display: inline-flex; align-items: center; gap: 6px; }
.row-actions form { margin: 0; }
.row-menu { position: relative; display: inline-block; }
.row-menu summary { list-style: none; cursor: pointer; }
.row-menu summary::-webkit-details-marker { display: none; }
.row-menu__pop {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 180px; padding: 5px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface-raised); box-shadow: var(--shadow);
  text-align: left; white-space: normal;
}
.row-menu__pop form { margin: 0; }
.row-menu__pop .mono-label { margin: 5px 8px 3px; color: var(--text-muted); }
.row-menu__item {
  display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 6px 8px;
  border: 0; border-radius: 5px; background: none; color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer;
}
.row-menu__item:hover:not(:disabled) { background: var(--surface-hover); }
.row-menu__item:disabled { color: var(--text-muted); cursor: default; }
.row-menu__item .ico { width: 14px; height: 14px; color: var(--text-accent); }
.row-menu__item--danger { color: var(--danger-text); }
.row-menu__pop form + form { margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--border); }
.roles { display: grid; margin: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-raised); }
.roles > div { display: grid; grid-template-columns: 110px 1fr; align-items: baseline; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.roles > div:last-child { border-bottom: 0; }
.roles dt, .roles dd { margin: 0; }
.roles dd { font-size: 13px; color: var(--text-soft); }

/* Settings */
.facts { display: flex; flex-wrap: wrap; gap: 14px 32px; margin: 12px 0 4px; }
.facts dt { margin: 0 0 4px; color: var(--text-muted); }
.facts dd { margin: 0; font-size: 13px; }
.cs-card .fine { margin: 8px 0 0; font-size: 12px; text-align: left; }
.danger-zone .cs-h2 { color: var(--danger-text); }

/* All projects */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.proj-card {
  display: flex; flex-direction: column; gap: 2px; min-height: 148px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface-raised); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.proj-card:hover { border-color: var(--brand-300); box-shadow: var(--shadow); color: var(--text); }
.proj-card--current { border-color: var(--brand-300); box-shadow: inset 0 0 0 1px var(--brand-300); }
.proj-card__top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.proj-card__name { margin: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.proj-card__id { margin: 0; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.proj-card__meta { margin: auto 0 0; padding-top: 10px; font-size: 12px; color: var(--text-muted); }
.proj-card--new { align-items: center; justify-content: center; gap: 8px; border-style: dashed; background: transparent; color: var(--text-muted); font-size: 13px; font-weight: 600; }
.proj-card--new .ico { width: 18px; height: 18px; }
.proj-card--new:hover { color: var(--text-accent); box-shadow: none; }
.invite-list { display: grid; gap: 8px; }
.invite-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--icon-border); border-radius: 8px; background: var(--surface-hover); }
.invite-card__text { flex: 1; min-width: 0; }
.invite-card__title { margin: 0; font-size: 13.5px; font-weight: 600; }
.invite-card .muted { margin: 1px 0 0; font-size: 12.5px; }
.invite-hero { display: grid; justify-items: center; max-width: 460px; margin: 24px auto; padding: 32px 28px; text-align: center; }
.invite-hero:hover { border-color: var(--border); }
.invite-hero .cs-title { margin-bottom: 8px; font-size: 24px; }
.invite-hero .muted { margin: 0; font-size: 13px; }
.invite-hero .fine { margin-top: 6px; font-size: 12px; }
.invite-hero__actions { justify-content: center; margin-top: 20px; }

@media (max-width: 960px) {
  .cs { grid-template-columns: 1fr; }
  .cs-side {
    position: fixed; inset: 0 auto 0 0; z-index: 70; width: min(280px, 86vw);
    transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow);
  }
  .cs-side.is-open { transform: none; }
  .cs-scrim { position: fixed; inset: 0; z-index: 65; background: rgb(2 12 34 / 0.45); }
  .cs-top { gap: 8px; padding: 0 10px; }
  .cs-top__menu { display: inline-grid; }
  .cs-top .acct__label, .cs-top .acct__btn .chev { display: none; }
  .cs-top .acct__btn { padding: 0 3px; }
  .cs-top .lang__btn span { display: none; }
  .cs-top .lang__btn { width: 32px; padding: 0; }
  .cs-crumbs > :not(:last-child) { display: none; }
  .cs-body { padding: 22px 14px 56px; }
  .cs-banner { margin: 12px 14px 0; }
  .invite-form__row { grid-template-columns: 1fr; }
  .roles > div { grid-template-columns: 1fr; gap: 4px; }
  .cs-table-wrap { overflow-x: auto; }
  .cs-table .col-joined { display: none; }
  .invite-card { flex-wrap: wrap; }
  .invite-hero { padding: 26px 18px; }
}

/* Account settings: same density as the console */
.page-manage .manage { grid-template-columns: 200px minmax(0, 1fr); gap: clamp(20px, 3vw, 44px); padding-block: 36px 72px; font-size: 14px; }
.page-manage .manage__nav a, .page-manage .manage__nav button { padding: 6px 10px; font-size: 13.5px; }
.page-manage .manage__nav .mono-label { margin: 0 10px 6px; font-size: 10.5px; }
.page-manage .manage__group { margin: 14px 10px 4px !important; }
.manage__console { margin-bottom: 10px; color: var(--text-accent) !important; font-weight: 600; }
.page-manage .auth-title, .page-manage .console-head h1 { font-family: var(--font-display); font-size: 26px; font-weight: 300; line-height: 1.25; }
.page-manage .manage__head { margin-bottom: 20px; }
.page-manage .console-head { gap: 14px; margin-bottom: 24px; }
.page-manage .avatar--xl { width: 48px; height: 48px; font-size: 1.2rem; }
.page-manage .mono-label { font-size: 10.5px; letter-spacing: 0.1em; }
.page-manage .card { padding: 18px 20px; }
.page-manage .dash-cards { gap: 12px; }
.page-manage .dash-cards .card { gap: 8px; }
.page-manage .dash-value { font-size: 14.5px; }
.page-manage .badge { padding: 1px 8px; font-size: 11px; }
.page-manage .method-list li { padding: 1px 8px; font-size: 11.5px; }
.page-manage .link-arrow { font-size: 13px; }
.page-manage .btn { min-height: 34px; padding: 0 14px; font-size: 13px; }
.page-manage .field label { font-size: 12.5px; }
.page-manage .field input, .page-manage .field select { min-height: 36px; padding: 6px 10px; font-size: 14px; }
.page-manage .form { gap: 14px; }
.page-manage .section-label { margin-bottom: 10px; }
.page-manage .dash-cards + .section-label { margin-top: 28px; }
