.desktop-nav > a.is-active {
  color: var(--link-blue);
}

/* Superuser-only operational cockpit. */
.cockpit-body {
  min-height: 100vh;
  margin: 0;
  background: #f2f6fa;
  color: var(--ink);
}

.cockpit-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--deep-blue);
  color: #fff;
}

.cockpit-header-inner {
  display: flex;
  width: min(calc(100% - 32px), 1320px);
  min-height: 72px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cockpit-brand {
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.cockpit-nav {
  display: flex;
  flex: 1;
  gap: 4px;
}

.cockpit-nav a {
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  color: rgba(255, 255, 255, 0.82);
  font-size: var(--text-sm);
  font-weight: 800;
}

.cockpit-nav a:hover,
.cockpit-nav a:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.cockpit-operator {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--text-sm);
}

.cockpit-operator form { margin: 0; }

.cockpit-main {
  width: min(calc(100% - 32px), 1240px);
  margin: 0 auto;
  padding: 48px 0 80px;
}

.cockpit-heading,
.cockpit-section-heading {
  display: flex;
  margin-bottom: 28px;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
}

.cockpit-heading h1,
.cockpit-panel h2,
.cockpit-section-heading h2 {
  margin: 0;
}

.cockpit-heading > p,
.cockpit-section-heading > p {
  max-width: 620px;
  margin: 0;
  color: var(--text-muted);
}

.cockpit-stat-grid,
.cockpit-period-grid,
.cockpit-detail-grid {
  display: grid;
  gap: 18px;
}

.cockpit-stat-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 24px;
}

.cockpit-stat,
.cockpit-panel,
.cockpit-period {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.cockpit-stat { padding: 20px; }
.cockpit-stat span { display: block; color: var(--text-muted); font-size: var(--text-xs); font-weight: 800; }
.cockpit-stat strong { display: block; margin-top: 8px; font-size: 1.7rem; }
.cockpit-panel { margin-bottom: 24px; padding: 28px; }
.cockpit-period-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cockpit-period { padding: 22px; }
.cockpit-period h3 { margin: 0 0 16px; }

.cockpit-period dl,
.cockpit-details { margin: 0; }

.cockpit-period dl > div,
.cockpit-details > div {
  display: flex;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-soft);
  justify-content: space-between;
  gap: 18px;
}

.cockpit-period dt,
.cockpit-details dt { color: var(--text-muted); }
.cockpit-period dd,
.cockpit-details dd { margin: 0; font-weight: 800; text-align: right; overflow-wrap: anywhere; }

.cockpit-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.cockpit-filters {
  display: grid;
  margin-bottom: 20px;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, auto) minmax(190px, auto) auto;
  gap: 10px;
}

.cockpit-filters input,
.cockpit-filters select {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.cockpit-table-wrap { overflow-x: auto; }
.cockpit-table { width: 100%; border-collapse: collapse; }
.cockpit-table th,
.cockpit-table td { padding: 12px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.cockpit-table th { color: var(--text-muted); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.04em; }
.cockpit-table a { color: var(--link-blue); font-weight: 800; }

.cockpit-list { display: grid; margin: 18px 0 0; padding: 0; list-style: none; gap: 10px; }
.cockpit-list li { display: flex; padding: 12px 0; border-bottom: 1px solid var(--border-soft); justify-content: space-between; gap: 16px; }
.cockpit-list span { color: var(--text-muted); overflow-wrap: anywhere; text-align: right; }
.cockpit-empty { color: var(--text-muted); }

.cockpit-pagination { display: flex; margin-top: 20px; align-items: center; justify-content: flex-end; gap: 12px; }
.cockpit-health-summary,
.cockpit-status { display: inline-flex; padding: 5px 9px; border-radius: var(--radius-pill); font-size: var(--text-xs); font-weight: 900; }
.cockpit-health-summary.is-ok,
.cockpit-status.is-ok { background: var(--green-soft); color: #075d0b; }
.cockpit-health-summary.is-failed,
.cockpit-status.is-failed { background: #fff2ed; color: #8f2f16; }
.cockpit-status.is-warning { background: #fff9e8; color: #704e05; }

@media (max-width: 1050px) {
  .cockpit-header-inner { flex-wrap: wrap; padding: 14px 0; }
  .cockpit-nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .cockpit-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cockpit-period-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .cockpit-operator > span { display: none; }
  .cockpit-heading,
  .cockpit-section-heading { display: grid; align-items: start; }
  .cockpit-stat-grid,
  .cockpit-detail-grid { grid-template-columns: 1fr; }
  .cockpit-filters { grid-template-columns: 1fr; }
}

.desktop-nav > a.is-active::after {
  width: 100%;
}

.flash-wrap {
  position: fixed;
  z-index: 80;
  top: calc(var(--header-height) + 12px);
  left: 50%;
  width: min(92%, 620px);
  transform: translateX(-50%);
}

.flash-message {
  margin: 0;
  padding: 14px 18px;
  border: 1px solid #a8d8ab;
  border-radius: var(--radius-sm);
  background: #effaf0;
  box-shadow: var(--shadow-md);
  color: #075d0b;
  font-weight: 800;
}

.flash-message.is-alert {
  border-color: #f2aa94;
  background: #fff2ed;
  color: #8f2f16;
}

.page-hero {
  padding-top: calc(var(--header-height) + 85px);
  background:
    radial-gradient(circle at 85% 22%, rgba(202, 233, 251, 0.9) 0 9%, transparent 9.4%),
    radial-gradient(circle at 8% 80%, rgba(215, 244, 216, 0.8) 0 10%, transparent 10.4%),
    linear-gradient(180deg, var(--powder-blue-soft), var(--canvas));
}

.page-hero-blue {
  background:
    radial-gradient(circle at 75% 25%, rgba(255, 240, 184, 0.75) 0 10%, transparent 10.4%),
    linear-gradient(135deg, #f5fbff 0%, #eaf6ff 48%, #f4fff4 100%);
}

.page-hero-demos {
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 217, 204, 0.8) 0 9%, transparent 9.4%),
    radial-gradient(circle at 88% 70%, rgba(215, 244, 216, 0.85) 0 11%, transparent 11.4%),
    linear-gradient(180deg, #f5fbff, #fff);
}

.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 70px;
  align-items: center;
}

.page-hero h1 {
  max-width: 900px;
  margin: 18px 0 24px;
  font-size: var(--text-h1);
}

.page-hero-copy.centered {
  max-width: 980px;
  margin-inline: auto;
  text-align: center;
}

.page-hero-copy.centered .eyebrow {
  justify-content: center;
}

.page-lead {
  max-width: 760px;
  margin: 0 0 32px;
  color: var(--text-muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.65;
}

.page-hero-copy.centered .page-lead {
  margin-inline: auto;
}

.feature-orbit {
  position: relative;
  display: grid;
  min-height: 330px;
  place-items: center;
  border: 1px solid rgba(0, 117, 221, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow-lg);
}

.feature-orbit::before,
.feature-orbit::after {
  position: absolute;
  border: 1px dashed rgba(0, 117, 221, 0.25);
  border-radius: 50%;
  content: "";
}

.feature-orbit::before { inset: 35px; }
.feature-orbit::after { inset: 90px; }

.orbit-spark {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-blue);
  box-shadow: 0 15px 35px rgba(0, 117, 221, 0.28);
  color: white;
  font-size: 2rem;
}

.orbit-card {
  position: absolute;
  z-index: 2;
  padding: 15px 18px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: white;
  box-shadow: var(--shadow-md);
  font-weight: 900;
}

.orbit-card-one { top: 35px; left: 10px; }
.orbit-card-two { right: 5px; bottom: 40px; }

.home-feature-grid .feature-card-large {
  grid-column: 1 / -1;
}

.home-feature-grid .feature-card-brand,
.home-feature-grid .feature-card-publish {
  grid-column: span 6;
}

.format-stack {
  display: grid;
  align-content: center;
  gap: 12px;
  min-width: 290px;
  padding: 30px;
}

.format-stack span {
  display: flex;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid rgba(0, 45, 121, 0.12);
  border-radius: var(--radius-sm);
  background: white;
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  font-weight: 900;
}

.format-stack i {
  color: var(--link-blue);
  font-size: var(--text-xs);
  font-style: normal;
  text-transform: uppercase;
}

.brand-swatches {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}

.brand-swatches i {
  width: 46px;
  height: 46px;
  border: 4px solid white;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.brand-swatches i:nth-child(1) { background: var(--brand-blue); }
.brand-swatches i:nth-child(2) { background: var(--lime); }
.brand-swatches i:nth-child(3) { background: var(--yellow); }
.brand-swatches i:nth-child(4) { background: var(--coral); }

.data-boundary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  min-width: 300px;
  padding: 35px;
  border-radius: var(--radius-md);
  background: var(--powder-blue-soft);
}

.data-boundary span {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: white;
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  font-weight: 900;
}

.data-boundary b {
  color: var(--ink);
}

.data-boundary i {
  flex-basis: 100%;
  color: var(--cta-green);
  font-size: var(--text-sm);
  font-style: normal;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.settings-preview {
  overflow: hidden;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  min-height: 0;
}

.settings-preview-grid {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 55px;
  padding: 48px;
  background: white;
}

.settings-preview-grid > div:first-child {
  padding: 15px;
}

.settings-preview-grid > div:first-child small,
.workflow-panel-copy > small,
.large-steps small {
  color: var(--link-blue);
  font-size: var(--text-xs);
  font-weight: 900;
  letter-spacing: 0.1em;
}

.settings-preview-grid h3,
.workflow-panel-copy h3 {
  margin: 12px 0;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.1;
}

.workflow-panels > section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  min-height: 430px;
  padding: 55px;
}

.connection-preview,
.article-preview,
.result-preview {
  position: relative;
  display: flex;
  min-height: 285px;
  align-items: center;
  justify-content: center;
  gap: 22px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, var(--powder-blue-soft), white);
  box-shadow: var(--shadow-md);
}

.connection-preview > span {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  border-radius: var(--radius-md);
  background: white;
  box-shadow: var(--shadow-sm);
  color: var(--brand-blue);
  font-size: 2rem;
  font-weight: 1000;
}

.connection-preview .quizout-symbol { padding: 15px; }
.connection-preview b,
.result-preview b {
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 7px 11px;
  border-radius: var(--radius-pill);
  background: var(--green-soft);
  color: var(--cta-green);
  font-size: var(--text-xs);
}

.article-preview {
  flex-direction: column;
  align-items: stretch;
  padding: 50px;
}

.article-preview i {
  height: 14px;
  border-radius: var(--radius-pill);
  background: var(--border-soft);
}

.article-preview i.short { width: 62%; }
.article-preview strong {
  align-self: flex-end;
  padding: 12px 18px;
  border-radius: var(--radius-xs);
  background: var(--brand-blue);
  color: white;
}

.result-preview > span {
  display: grid;
  width: 90px;
  height: 90px;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--deep-blue);
  font-size: 3rem;
  font-weight: 1000;
}

.result-preview > div { display: grid; gap: 10px; width: 42%; }
.result-preview i { height: 18px; border-radius: var(--radius-pill); background: var(--blue); }
.result-preview i:nth-child(2) { width: 75%; background: var(--lime); }
.result-preview i:nth-child(3) { width: 55%; background: var(--coral); }

.promise-list {
  display: grid;
  gap: 15px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.promise-list li { display: flex; gap: 12px; align-items: center; font-weight: 800; }
.promise-list span { color: var(--cta-green); }

.large-steps {
  display: grid;
  gap: 15px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.large-steps li {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: white;
  box-shadow: var(--shadow-sm);
}

.large-steps li > span {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-blue);
  color: white;
  font-weight: 1000;
}

.large-steps strong { display: block; margin-top: 3px; font-size: 1.1rem; }
.large-steps p { margin: 3px 0 0; color: var(--text-muted); }

.demo-index-section,
.demo-quiz-section {
  background: var(--powder-blue-soft);
}

.demo-card-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 22px;
}

.demo-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  grid-column: span 2;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms var(--ease);
}

.demo-card:nth-child(4),
.demo-card:nth-child(5) {
  grid-column: span 3;
}

.demo-card:hover {
  border-color: rgba(0, 117, 221, 0.42);
  box-shadow: var(--shadow-md);
  color: var(--ink);
  transform: translateY(-4px);
}

.demo-card-copy {
  display: flex;
  height: 100%;
  padding: 26px;
  flex-direction: column;
}

.demo-card-meta {
  display: flex;
  margin-bottom: 18px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.demo-card-meta > span {
  display: inline-flex;
  min-height: 28px;
  padding: 5px 10px;
  align-items: center;
  border-radius: var(--radius-pill);
  background: var(--green-soft);
  color: #08670b;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
}

.demo-card-meta small {
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
}

.demo-card h3 {
  margin-bottom: 12px;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
}

.demo-card p {
  margin-bottom: 24px;
  font-size: var(--text-base);
}

.demo-card-link {
  display: inline-flex;
  margin-top: auto;
  align-items: center;
  gap: 8px;
  color: var(--link-blue);
  font-weight: var(--weight-bold);
}

.demo-visual {
  --visual-one: var(--coral);
  --visual-two: var(--yellow);
  --visual-three: var(--brand-blue);
  position: relative;
  overflow: hidden;
  margin: 0;
  isolation: isolate;
  background: linear-gradient(145deg, var(--powder-blue-soft), #fff);
}

.demo-card-visual {
  min-height: 215px;
  border-bottom: 1px solid var(--border);
}

.demo-hero-visual {
  min-height: clamp(300px, 48vw, 480px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.demo-visual small,
.demo-visual figcaption {
  position: absolute;
  z-index: 4;
  right: 18px;
  bottom: 16px;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid rgba(0, 27, 64, 0.11);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text-muted);
  font-size: var(--text-2xs);
  font-style: normal;
  font-weight: var(--weight-bold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.demo-visual-shape {
  position: absolute;
  display: block;
}

.demo-visual-shape-one {
  top: 50%;
  left: 50%;
  width: min(46%, 260px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--visual-one);
  transform: translate(-62%, -55%);
}

.demo-visual-shape-two {
  top: 20%;
  left: 53%;
  width: min(39%, 220px);
  aspect-ratio: 1.15;
  border: 2px solid var(--ink);
  border-radius: 45% 55% 48% 52%;
  background: var(--visual-two);
  transform: rotate(12deg);
}

.demo-visual-shape-three {
  z-index: 2;
  top: 58%;
  left: 36%;
  width: min(42%, 235px);
  height: 14px;
  border-radius: var(--radius-pill);
  background: var(--visual-three);
  transform: rotate(-8deg);
}

.demo-visual--sunset {
  --visual-one: #ffb39b;
  --visual-two: #ffe06e;
  --visual-three: #6f392b;
  background: linear-gradient(145deg, #fff6ed, #fff0d6);
}

.demo-visual--stadium {
  --visual-one: #d7f4d8;
  --visual-two: #fff;
  --visual-three: #0075dd;
  background: linear-gradient(145deg, #eaf8eb, #cae9fb);
}

.demo-visual--stadium .demo-visual-shape-one {
  border: 2px solid rgba(0, 27, 64, 0.5);
  border-radius: 50%;
  background: repeating-linear-gradient(90deg, #a8dda9 0 24px, #c9edca 24px 48px);
}

.demo-visual--garden {
  --visual-one: #78c67b;
  --visual-two: #fff0b8;
  --visual-three: #79543d;
  background: linear-gradient(145deg, #edfaee, #dff2ff);
}

.demo-visual--garden .demo-visual-shape-two {
  border-radius: 70% 20% 70% 20%;
  transform: rotate(-20deg);
}

.demo-visual--workspace {
  --visual-one: #002d79;
  --visual-two: #fff0b8;
  --visual-three: #0075dd;
  background: linear-gradient(145deg, #edf5ff, #fff8df);
}

.demo-visual--workspace .demo-visual-shape-two {
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  border: 0;
  border-radius: 0;
  opacity: 0.85;
}

.demo-visual--skincare {
  --visual-one: #cae9fb;
  --visual-two: #ffd9cc;
  --visual-three: #038a06;
  background: linear-gradient(145deg, #f5fbff, #fff1ec);
}

.demo-visual--skincare .demo-visual-shape-one {
  border-radius: 52% 48% 58% 42% / 62% 38% 62% 38%;
}

.demo-article-header {
  padding-top: calc(var(--header-height) + 80px);
  padding-bottom: 66px;
  background:
    radial-gradient(circle at 88% 25%, rgba(215, 244, 216, 0.75) 0 10%, transparent 10.4%),
    linear-gradient(180deg, var(--powder-blue-soft), #fff);
}

.demo-article-heading {
  max-width: 940px;
}

.demo-back-link {
  display: inline-flex;
  min-height: 44px;
  margin-bottom: 30px;
  align-items: center;
  color: var(--link-blue);
  font-weight: var(--weight-bold);
}

.demo-article-heading h1 {
  max-width: 900px;
}

.demo-reading-container {
  max-width: 980px;
  padding: 70px 0 96px;
}

.demo-article-copy {
  width: min(100%, 760px);
  margin: 64px auto 0;
}

.demo-article-copy section + section {
  margin-top: 48px;
}

.demo-article-copy h2 {
  margin-bottom: 20px;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
}

.demo-article-copy p {
  margin-bottom: 22px;
  color: #334a66;
  font-size: clamp(1.05rem, 1.4vw, 1.15rem);
  line-height: 1.82;
}

.demo-quiz-container {
  width: min(calc(100% - 48px), 920px);
}

.demo-quiz-heading {
  max-width: 760px;
  margin-bottom: 42px;
}

.demo-quiz-heading h2 {
  margin-bottom: 14px;
}

.demo-quiz-heading > p:last-child {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-md);
  font-style: italic;
}

.quiz-player-shell {
  min-height: 430px;
  padding: clamp(24px, 5vw, 54px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.quiz-player-progress {
  margin-bottom: 34px;
}

.quiz-player-progress-copy {
  display: flex;
  margin-bottom: 9px;
  justify-content: space-between;
  gap: 20px;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
}

.quiz-player-progress progress {
  display: block;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-pill);
  appearance: none;
}

.quiz-player-progress progress::-webkit-progress-bar {
  border-radius: var(--radius-pill);
  background: #e4ebf1;
}

.quiz-player-progress progress::-webkit-progress-value {
  border-radius: var(--radius-pill);
  background: var(--brand-blue);
  transition: width 240ms var(--ease);
}

.quiz-player-progress progress::-moz-progress-bar {
  border-radius: var(--radius-pill);
  background: var(--brand-blue);
}

.quiz-player-question fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.quiz-player-question legend {
  width: 100%;
  margin-bottom: 24px;
  color: var(--ink);
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  font-weight: var(--weight-bold);
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.quiz-player-options {
  display: grid;
  gap: 12px;
}

.quiz-player-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.quiz-player-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.quiz-player-option-copy {
  display: flex;
  min-height: 58px;
  padding: 14px 17px;
  border: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.quiz-player-option:hover .quiz-player-option-copy {
  border-color: var(--brand-blue);
  background: var(--powder-blue-soft);
}

.quiz-player-option input:focus-visible + .quiz-player-option-copy {
  outline: 2px solid var(--brand-blue);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(0, 117, 221, 0.16);
}

.quiz-player-option.is-selected .quiz-player-option-copy,
.quiz-player-option input:checked + .quiz-player-option-copy {
  border-color: var(--brand-blue);
  background: #f5fbff;
  box-shadow: inset 4px 0 0 var(--brand-blue);
}

.quiz-player-option.is-correct .quiz-player-option-copy {
  border-color: #4a9d73;
  background: #ebf9e5;
  box-shadow: inset 4px 0 0 #4a9d73;
}

.quiz-player-option.is-wrong .quiz-player-option-copy {
  border-color: #df745f;
  background: #fff0ed;
  box-shadow: inset 4px 0 0 #df745f;
}

.quiz-player-option:has(input:disabled) {
  cursor: default;
}

.quiz-player-option:has(input:disabled):hover .quiz-player-option-copy {
  border-color: var(--border);
}

.quiz-player-option.is-correct:has(input:disabled):hover .quiz-player-option-copy { border-color: #4a9d73; }
.quiz-player-option.is-wrong:has(input:disabled):hover .quiz-player-option-copy { border-color: #df745f; }

.quiz-player-option-state {
  flex: 0 0 auto;
  color: var(--cta-green);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
}

.quiz-player-option.is-wrong .quiz-player-option-state {
  color: #a53f2c;
}

.quiz-player-feedback {
  min-height: 54px;
  margin: 18px 0 14px;
  color: var(--text-muted);
  font-size: var(--text-base);
  line-height: 1.55;
}

.quiz-player-submit {
  width: 100%;
}

.quiz-player-submit:disabled {
  color: var(--text-muted);
  background: #e7edf3;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.quiz-player-result {
  text-align: center;
  animation: result-in 260ms var(--ease) both;
}

.quiz-player-result-badge {
  display: inline-flex;
  min-width: 96px;
  min-height: 96px;
  padding: 16px;
  border: 1px solid #abd8ad;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: var(--green-soft);
  color: var(--ink);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  letter-spacing: -0.03em;
}

.quiz-player-result h3 {
  margin: 22px 0 10px;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
}

.quiz-player-result-message {
  max-width: 640px;
  margin: 0 auto;
  font-size: var(--text-md);
}

.quiz-player-review {
  display: grid;
  margin: 32px 0 0;
  padding: 0;
  gap: 10px;
  text-align: left;
  list-style: none;
}

.quiz-player-review li {
  display: grid;
  padding: 15px 17px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--cta-green);
  border-radius: var(--radius-sm);
  gap: 3px;
  background: #fff;
}

.quiz-player-review li.is-wrong {
  border-left-color: #df745f;
}

.quiz-player-review-state {
  color: var(--cta-green);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
}

.quiz-player-review li.is-wrong .quiz-player-review-state { color: #a53f2c; }
.quiz-player-review strong { color: var(--ink); }
.quiz-player-review small { color: var(--text-muted); font-size: var(--text-sm); }

.quiz-player-restart {
  margin-top: 28px;
}

.quiz-player-unavailable {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--powder-blue-soft);
  text-align: center;
}

.quiz-player-unavailable h3 { margin-bottom: 8px; }
.quiz-player-unavailable p { margin: 0; }

.demo-cta {
  padding: clamp(42px, 7vw, 78px);
  border-radius: var(--radius-lg);
  background: var(--deep-blue);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.demo-cta .eyebrow {
  justify-content: center;
  color: #8fc9ff;
}

.demo-cta h2 {
  max-width: 760px;
  margin: 0 auto 18px;
  color: #fff;
}

.demo-cta > p:not(.eyebrow) {
  max-width: 620px;
  margin: 0 auto 28px;
  color: #dcecff;
  font-size: var(--text-md);
}

.partner-dialog { width: min(760px, calc(100% - 32px)); }
.partner-dialog .dialog-shell { max-width: none; }

.partner-form { margin-top: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { color: var(--ink); font-size: var(--text-sm); font-weight: 900; }
.partner-form input,
.partner-form textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: white;
  color: var(--ink);
  font: inherit;
}

.partner-form textarea { resize: vertical; }
.partner-form input:focus,
.partner-form textarea:focus { border-color: var(--brand-blue); outline: 3px solid rgba(0, 117, 221, 0.13); }
.partner-form input[type="submit"] {
  border-color: var(--cta-green);
  background: var(--cta-green);
  color: white;
  cursor: pointer;
  font-weight: 900;
}
.partner-form input[type="submit"]:hover { background: #027205; }
.partner-form .button { margin-top: 4px; }
.form-note { margin: 0; color: var(--text-muted); font-size: var(--text-xs); text-align: center; }

.form-errors {
  padding: 13px 15px;
  border: 1px solid #f2aa94;
  border-radius: var(--radius-xs);
  background: #fff2ed;
  color: #8f2f16;
  font-size: var(--text-sm);
}

.form-errors ul { margin: 7px 0 0; padding-left: 20px; }
.partner-success { padding: 25px 10px 10px; text-align: center; }
.partner-success .dialog-icon { margin-inline: auto; }
.partner-success .button { margin-top: 20px; }

.site-footer .footer-links > p {
  margin: 0;
  color: #a9bad0;
  font-size: var(--text-sm);
  line-height: 1.55;
}

@media (max-width: 900px) {
  .page-hero-grid,
  .workflow-panels > section,
  .settings-preview-grid {
    grid-template-columns: 1fr;
  }

  .demo-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-card,
  .demo-card:nth-child(4),
  .demo-card:nth-child(5) { grid-column: auto; }
  .demo-card:last-child { grid-column: 1 / -1; }

  .page-hero-grid { gap: 45px; }
  .feature-orbit { min-height: 280px; }
  .format-stack { min-width: 0; }
  .settings-preview-grid,
  .workflow-panels > section { padding: 32px; }
}

@media (max-width: 640px) {
  .page-hero { padding-top: calc(var(--header-height) + 45px); }
  .feature-orbit { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .workflow-panels > section { padding: 24px; }
  .connection-preview,
  .article-preview,
  .result-preview { min-height: 230px; }
  .demo-card-grid { grid-template-columns: 1fr; }
  .demo-card:last-child { grid-column: auto; }
  .demo-reading-container { padding-top: 44px; padding-bottom: 72px; }
  .demo-article-copy { margin-top: 42px; }
  .quiz-player-shell { min-height: 0; }
  .quiz-player-review li { padding: 13px 14px; }
}

/* Account authentication and the intentionally small console shell. */
.auth-body,
.console-body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 88% 8%, rgba(202, 233, 251, 0.95) 0 12%, transparent 12.4%),
    radial-gradient(circle at 8% 92%, rgba(215, 244, 216, 0.9) 0 13%, transparent 13.4%),
    linear-gradient(145deg, #f7fbff, #f4fff4);
  color: var(--ink);
}

.auth-shell {
  width: min(calc(100% - 32px), 1120px);
  margin: 0 auto;
  padding: 26px 0 36px;
}

.auth-header,
.console-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.auth-back-link {
  min-height: 44px;
  padding: 10px 0;
  color: var(--link-blue);
  font-size: var(--text-sm);
  font-weight: 900;
}

.auth-main {
  display: grid;
  min-height: calc(100vh - 190px);
  padding: 52px 0;
  place-items: center;
}

.auth-card {
  width: min(100%, 520px);
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow-lg);
}

.auth-card h1,
.console-card h1 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.05;
}

.auth-kicker {
  margin: 0 0 12px;
  color: var(--cta-green);
  font-size: var(--text-xs);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-intro {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.auth-form {
  display: grid;
  gap: 20px;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field label,
.auth-label-row label {
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 900;
}

.auth-field input:not([type="submit"]) {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  outline: 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.auth-field input:not([type="submit"]):focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(0, 117, 221, 0.13);
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.auth-label-row a,
.auth-switch a,
.auth-links a {
  color: var(--link-blue);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.auth-label-row a {
  font-size: var(--text-xs);
}

.auth-hint {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.auth-errors {
  margin-bottom: 24px;
  padding: 14px 16px;
  border: 1px solid #f2aa94;
  border-radius: var(--radius-xs);
  background: #fff2ed;
  color: #8f2f16;
  font-size: var(--text-sm);
}

.auth-errors ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.auth-switch,
.auth-links,
.auth-footer {
  color: var(--text-muted);
  font-size: var(--text-sm);
  text-align: center;
}

.auth-switch {
  margin: 24px 0 0;
}

.auth-links {
  display: grid;
  margin-top: 24px;
  gap: 8px;
}

.auth-links p,
.auth-footer p {
  margin: 0;
}

.auth-footer {
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
}

.auth-body .flash-wrap,
.console-body .flash-wrap {
  position: static;
  width: min(calc(100% - 32px), 620px);
  margin: 16px auto 0;
  transform: none;
}

.console-header {
  border-bottom: 1px solid rgba(0, 27, 64, 0.1);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
}

.console-header-inner {
  width: min(calc(100% - 32px), 1120px);
  min-height: 78px;
  margin: 0 auto;
}

.console-header-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: clamp(24px, 4vw, 52px);
}

.console-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.console-nav-link {
  padding: 9px 13px;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 900;
  transition: color 160ms ease, background 160ms ease;
}

.console-nav-link:hover,
.console-nav-link.is-active {
  color: #075d0b;
  background: var(--green-soft);
}

.console-nav-link:focus-visible {
  outline: 3px solid rgba(3, 138, 6, 0.28);
  outline-offset: 2px;
}

.console-user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.console-user > span {
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 800;
}

.console-user form {
  margin: 0;
}

.console-main {
  width: min(calc(100% - 32px), 1040px);
  margin: 0 auto;
  padding: clamp(48px, 9vw, 96px) 0;
}

.console-card {
  padding: clamp(30px, 6vw, 60px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow-lg);
}

.console-lead {
  margin: 0 0 30px;
  color: var(--text-muted);
  font-size: var(--text-md);
}

.account-status {
  display: flex;
  padding: 20px;
  border: 1px solid #bde2bf;
  border-radius: var(--radius-xs);
  align-items: flex-start;
  gap: 14px;
  background: #effaf0;
}

.account-status-dot {
  width: 12px;
  height: 12px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--cta-green);
  box-shadow: 0 0 0 5px rgba(3, 138, 6, 0.12);
}

.account-status strong {
  color: #075d0b;
}

.account-status p {
  margin: 3px 0 0;
  color: #38713a;
}

.account-status.is-pending {
  border-color: #ead08a;
  background: #fff9e8;
}

.account-status.is-pending .account-status-dot {
  background: #b07800;
  box-shadow: 0 0 0 5px rgba(176, 120, 0, 0.12);
}

.account-status.is-pending strong,
.account-status.is-pending p {
  color: #704e05;
}

.account-status.is-disconnected {
  border-color: var(--border);
  background: #f7f9fb;
}

.account-status.is-disconnected .account-status-dot {
  background: var(--text-muted);
  box-shadow: 0 0 0 5px rgba(87, 105, 129, 0.12);
}

.account-status.is-disconnected strong,
.account-status.is-disconnected p {
  color: var(--text-muted);
}

.console-note {
  margin-top: 28px;
  padding: 24px;
  border-radius: var(--radius-xs);
  background: var(--powder-blue-soft);
}

.console-note h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1.25rem;
}

.console-note p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.console-note p + p {
  margin-top: 6px;
}

.billing-summary {
  display: grid;
  margin: 30px 0;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.billing-summary article {
  display: grid;
  min-height: 138px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  align-content: space-between;
  gap: 8px;
  background: #fff;
}

.billing-summary span,
.billing-summary small {
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.billing-summary span {
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.billing-summary strong {
  color: var(--ink);
  font-size: 1.75rem;
}

.billing-summary a,
.console-note a {
  color: var(--link-blue);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.console-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
  align-items: end;
  gap: 28px;
}

.console-section-heading h2,
.site-list-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.75rem;
}

.console-section-heading .auth-kicker {
  margin-bottom: 6px;
}

.console-section-heading > p,
.site-list-heading p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.usage-panel {
  display: grid;
  margin: 36px 0 42px;
  padding: clamp(22px, 4vw, 32px);
  border: 1px solid #bde2bf;
  border-radius: var(--radius-md);
  gap: 18px;
  background: linear-gradient(145deg, #f8fff8, #effaf0);
}

.usage-meter {
  display: grid;
  padding: 20px;
  border: 1px solid #cfead1;
  border-radius: var(--radius-xs);
  gap: 12px;
  background: #fff;
}

.usage-meter.is-sandbox {
  border-color: #b8d8eb;
  background: #f8fcff;
}

.usage-meter-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.usage-meter-heading strong {
  color: var(--ink);
}

.usage-meter-heading span,
.usage-meter p,
.usage-pack-line small {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.usage-meter p {
  margin: 0;
}

.usage-meter p strong {
  color: #075d0b;
  font-size: 1.15rem;
}

.usage-meter progress,
.site-capacity progress {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  accent-color: var(--cta-green);
  background: var(--green-soft);
}

.usage-meter progress::-webkit-progress-bar,
.site-capacity progress::-webkit-progress-bar {
  border-radius: 999px;
  background: var(--green-soft);
}

.usage-meter progress::-webkit-progress-value,
.site-capacity progress::-webkit-progress-value {
  border-radius: 999px;
  background: var(--cta-green);
}

.usage-meter progress::-moz-progress-bar,
.site-capacity progress::-moz-progress-bar {
  border-radius: 999px;
  background: var(--cta-green);
}

.usage-meter.is-sandbox progress {
  accent-color: var(--brand-blue);
}

.usage-meter.is-sandbox progress::-webkit-progress-value {
  background: var(--brand-blue);
}

.usage-meter.is-sandbox progress::-moz-progress-bar {
  background: var(--brand-blue);
}

.usage-pack-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 4px 2px 0;
  align-items: baseline;
  gap: 2px 18px;
}

.usage-pack-line span {
  color: var(--ink);
  font-weight: 900;
}

.usage-pack-line strong {
  color: #075d0b;
  font-size: 1.35rem;
}

.usage-pack-line small {
  grid-column: 1 / -1;
}

.billing-heading {
  margin: 0 0 20px;
  padding-top: 34px;
  border-top: 1px solid var(--border-soft);
}

.billing-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.billing-actions form {
  margin: 0;
}

.billing-actions form[aria-busy="true"] .button {
  cursor: wait;
  opacity: 0.72;
}

.billing-cancellation {
  margin: 24px 0 0;
  color: #8f2f16;
  font-weight: 800;
}

.api-key-section {
  display: grid;
  margin: 42px 0 32px;
  gap: 24px;
}

.site-key-intro {
  margin: 24px 0 10px;
  color: #075d0b;
}

.site-key-intro p {
  margin: 0;
}

.site-capacity {
  display: grid;
  grid-template-columns: minmax(150px, 0.35fr) minmax(220px, 1fr);
  margin: 32px 0;
  padding: 20px;
  border: 1px solid #bde2bf;
  border-radius: var(--radius-xs);
  align-items: center;
  gap: 22px;
  background: #effaf0;
}

.site-capacity div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.site-capacity span {
  color: #38713a;
  font-size: var(--text-sm);
  font-weight: 900;
}

.site-capacity strong {
  color: #075d0b;
  font-size: 1.2rem;
}

.site-add-section {
  margin: 34px 0 46px;
}

.site-form,
.settings-form {
  display: grid;
  margin-top: 22px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  gap: 22px;
  background: #fff;
}

.site-form-fields,
.settings-password-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.site-form .auth-field input,
.settings-form .auth-field input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  outline: 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.site-form .auth-field input:focus,
.settings-form .auth-field input:focus {
  border-color: var(--cta-green);
  box-shadow: 0 0 0 4px rgba(3, 138, 6, 0.13);
}

.site-form > .button,
.settings-form > .button {
  justify-self: start;
}

.settings-form {
  margin-top: 30px;
}

.settings-current-password {
  max-width: 480px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
}

.site-limit-note {
  margin-bottom: 42px;
}

.site-list-section + .site-list-section {
  margin-top: 42px;
  padding-top: 38px;
  border-top: 1px solid var(--border-soft);
}

.site-list-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

.site-list-heading > span {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  color: #075d0b;
  background: var(--green-soft);
  font-size: var(--text-xs);
  font-weight: 900;
}

.site-list-heading p {
  margin-top: 5px;
}

.site-list,
.site-list-actions {
  margin: 0;
  padding: 0;
}

.site-list {
  display: grid;
  margin-top: 18px;
  list-style: none;
  gap: 12px;
}

.site-list-item {
  display: flex;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  background: #fff;
}

.site-list-item.is-paused {
  background: #f7f9fb;
}

.site-list-main {
  min-width: 0;
}

.site-list-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.site-list-title > strong {
  margin-right: 4px;
  color: var(--ink);
  font-size: 1.08rem;
}

.site-list-main p,
.site-list-main small {
  margin: 4px 0 0;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.site-list-main small {
  display: block;
  font-size: var(--text-xs);
}

.site-badge {
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  background: #eef2f6;
  font-size: 0.6875rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-badge.is-live,
.site-badge.is-active {
  color: #075d0b;
  background: var(--green-soft);
}

.site-badge.is-sandbox {
  color: #004c86;
  background: var(--powder-blue);
}

.site-list-actions,
.site-detail-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.site-list-actions form,
.site-detail-actions form {
  margin: 0;
}

.site-action-note {
  max-width: 150px;
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 800;
  text-align: right;
}

.site-empty {
  margin-top: 18px;
  padding: 24px;
  border-radius: var(--radius-xs);
  color: #075d0b;
  background: var(--green-soft);
}

.site-empty p {
  margin: 4px 0 0;
  color: #38713a;
}

.site-detail-actions {
  justify-content: space-between;
}

.api-key-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
  align-items: end;
  gap: 28px;
}

.api-key-section-heading .auth-kicker {
  margin-bottom: 6px;
}

.api-key-section-heading h2,
.api-key-reveal h3 {
  margin: 0;
  color: var(--ink);
}

.api-key-section-heading h2 {
  font-size: 1.75rem;
}

.api-key-section-heading > p,
.api-key-reveal p,
.console-permission-note p,
.api-key-empty p,
.api-key-revoked-at {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.api-key-form {
  display: grid;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  gap: 20px;
  background: #fff;
}

.api-key-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(140px, 0.65fr) minmax(150px, 0.7fr);
  gap: 16px;
}

.api-key-form .auth-errors {
  margin-bottom: 0;
}

.api-key-form .auth-field input,
.api-key-form .auth-field select,
.api-key-token-row input {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  outline: 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.api-key-form .auth-field input:focus,
.api-key-form .auth-field select:focus,
.api-key-token-row input:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(0, 117, 221, 0.13);
}

.api-key-form > .button {
  justify-self: start;
}

.api-key-reveal {
  display: grid;
  padding: 22px;
  border: 1px solid #8fce92;
  border-radius: var(--radius-xs);
  gap: 16px;
  background: #effaf0;
}

.api-key-reveal .auth-kicker {
  margin-bottom: 5px;
  color: #075d0b;
}

.api-key-reveal h3 {
  margin-bottom: 5px;
  font-size: 1.2rem;
}

.api-key-token-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.api-key-token-row input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
}

.api-key-copy-status {
  min-height: 1.3em;
  color: #075d0b !important;
  font-size: var(--text-sm);
  font-weight: 800;
}

.console-permission-note,
.api-key-empty {
  padding: 20px;
  border-radius: var(--radius-xs);
  background: var(--powder-blue-soft);
}

.api-key-list-wrap {
  min-width: 0;
}

.api-key-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 14px;
}

.api-key-item {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: #fff;
}

.api-key-item-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.api-key-item-heading strong,
.api-key-item-heading code {
  display: block;
}

.api-key-item-heading code {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.api-key-status {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.api-key-status.is-active {
  background: #e3f6e4;
  color: #075d0b;
}

.api-key-status.is-expired {
  background: #fff3d6;
  color: #7a5300;
}

.api-key-status.is-revoked {
  background: #fff0eb;
  color: #8f2f16;
}

.api-key-metadata {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0;
  gap: 14px;
}

.api-key-metadata div {
  min-width: 0;
}

.api-key-metadata dt {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.api-key-metadata dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

.api-key-item form {
  margin: 0;
}

.button-danger {
  border-color: #ba4426;
  background: #fff;
  color: #9b351d;
}

.button-danger:hover {
  background: #9b351d;
  color: #fff;
}

.privacy-card {
  margin-top: 28px;
}

.privacy-card > h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 1.75rem;
}

.privacy-card > p {
  color: var(--text-muted);
  line-height: 1.6;
}

.privacy-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 24px;
  gap: 18px;
}

.privacy-form {
  display: grid;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  align-content: start;
  gap: 16px;
  background: #fff;
}

.privacy-form h3,
.privacy-form p {
  margin: 0;
}

.privacy-form p {
  color: var(--text-muted);
  line-height: 1.55;
}

.privacy-form .button {
  justify-self: start;
}

.privacy-danger {
  border-color: #f2aa94;
  background: #fff9f7;
}

.data-map-section {
  background: #f7fbff;
}

.data-promise {
  max-width: 820px;
  margin-bottom: 32px;
  padding: clamp(24px, 4vw, 38px);
  border-left: 6px solid var(--cta-green);
  border-radius: var(--radius-xs);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.data-promise h2,
.data-processing-grid h2 {
  margin: 0 0 10px;
  color: var(--ink);
}

.data-promise p,
.data-processing-grid p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
}

.data-processing-grid p + p {
  margin-top: 12px;
}

.data-map-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.data-map-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  text-align: left;
}

.data-map-table th,
.data-map-table td {
  padding: 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.55;
}

.data-map-table thead th {
  background: var(--ink);
  color: #fff;
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.data-map-table tbody th {
  width: 18%;
  color: var(--ink);
}

.data-map-table tbody td {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.data-map-table tbody tr:last-child th,
.data-map-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-processing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.data-processing-grid article {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: #fff;
}

.data-processing-grid code {
  color: var(--ink);
  font-weight: 800;
}

.api-key-revoked-at {
  font-size: var(--text-sm);
}

@media (max-width: 640px) {
  .auth-shell {
    padding-top: 18px;
  }

  .auth-main {
    min-height: auto;
    padding: 34px 0;
  }

  .auth-card {
    padding: 28px 22px;
  }

  .console-user > span {
    display: none;
  }

  .console-header-inner {
    min-height: 0;
    padding: 14px 0;
    align-items: flex-start;
  }

  .console-header-brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .console-nav {
    gap: 2px;
  }

  .console-nav-link {
    padding: 7px 9px;
  }

  .console-user .button {
    min-height: 38px;
    padding: 7px 10px;
  }

  .api-key-section-heading,
  .api-key-form-grid,
  .api-key-metadata,
  .privacy-actions,
  .data-processing-grid,
  .console-section-heading,
  .site-capacity,
  .site-form-fields,
  .settings-password-fields {
    grid-template-columns: 1fr;
  }

  .site-list-item,
  .usage-meter-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .site-list-actions,
  .site-detail-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .site-list-actions .button,
  .site-list-actions form,
  .site-list-actions form .button,
  .site-detail-actions .button,
  .site-detail-actions form,
  .site-detail-actions form .button,
  .site-form > .button,
  .settings-form > .button {
    width: 100%;
  }

  .site-action-note {
    max-width: none;
    text-align: left;
  }

  .api-key-token-row {
    align-items: stretch;
    flex-direction: column;
  }

  .api-key-token-row .button,
  .api-key-form > .button {
    width: 100%;
  }
}
