:root {
  --ink: #14211b;
  --ink-soft: #425249;
  --forest: #153f31;
  --forest-light: #245b47;
  --mint: #b9ead3;
  --mint-bright: #d9f8e9;
  --paper: #f5f1e8;
  --paper-deep: #e8dfcf;
  --white: #fffef9;
  --coral: #f07b5a;
  --line: rgba(20, 33, 27, 0.18);
  --shadow: 0 24px 80px rgba(15, 45, 35, 0.14);
  --radius-lg: 2rem;
  --radius-md: 1.25rem;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Avenir Next", Avenir, "Century Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  color: var(--white);
  background: var(--forest);
  border-radius: 999px;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 1.5rem 0;
  color: var(--white);
}

.brand {
  display: inline-flex;
  gap: 0.7rem;
  align-items: center;
  color: inherit;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.brand-mark::before {
  position: absolute;
  width: 2.7rem;
  height: 1.15rem;
  content: "";
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.48;
  transform: rotate(-18deg);
}

.brand-mark span {
  width: 0.35rem;
  height: 0.35rem;
  background: var(--coral);
  border-radius: 50%;
}

.site-nav {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.site-nav a {
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.nav-pill {
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.hero {
  position: relative;
  min-height: 810px;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 75% 42%, rgba(64, 139, 106, 0.72), transparent 28%),
    radial-gradient(circle at 8% 95%, rgba(240, 123, 90, 0.25), transparent 24%),
    var(--forest);
}

.hero::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 0.7px, transparent 0.7px);
  background-size: 9px 9px;
  opacity: 0.18;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  gap: 4rem;
  align-items: center;
  width: min(1180px, calc(100% - 3rem));
  min-height: 810px;
  margin: 0 auto;
  padding: 9rem 0 6rem;
}

.hero-copy {
  max-width: 690px;
}

.eyebrow {
  margin: 0 0 1.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.eyebrow::before {
  display: inline-block;
  width: 2.5rem;
  height: 1px;
  margin: 0 0.75rem 0.22rem 0;
  content: "";
  background: currentColor;
  opacity: 0.7;
}

h1,
h2,
h3 {
  margin-top: 0;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.hero h1 {
  max-width: 740px;
  margin-bottom: 1.5rem;
  font-size: clamp(4.2rem, 8vw, 7.8rem);
}

.hero h1 em {
  color: var(--mint);
  font-weight: 400;
}

.hero-lead {
  max-width: 610px;
  margin: 0 0 2rem;
  color: rgba(255, 255, 255, 0.77);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.button {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.8rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-light {
  color: var(--forest);
  background: var(--mint-bright);
}

.button-ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
}

.button-dark {
  color: var(--white);
  background: var(--forest);
}

.hero-visual {
  position: relative;
  display: grid;
  min-height: 520px;
  place-items: center;
}

.orbit-system {
  position: relative;
  display: grid;
  width: min(42vw, 460px);
  aspect-ratio: 1;
  place-items: center;
}

.orbit,
.core-ring {
  position: absolute;
  border-radius: 50%;
}

.orbit-one {
  inset: 3%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transform: rotate(19deg) scaleY(0.48);
}

.orbit-two {
  inset: 12%;
  border: 1px solid rgba(185, 234, 211, 0.44);
  transform: rotate(-37deg) scaleY(0.64);
}

.orbit-three {
  inset: 18%;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  animation: orbit-spin 24s linear infinite;
}

.core-ring {
  display: grid;
  width: 45%;
  aspect-ratio: 1;
  place-items: center;
  background: rgba(13, 48, 36, 0.5);
  border: 2.4rem solid var(--mint);
  box-shadow: inset 0 0 32px rgba(18, 68, 50, 0.6), 0 0 90px rgba(185, 234, 211, 0.24);
  animation: breathe 5s ease-in-out infinite;
}

.core-ring::after {
  width: 1rem;
  height: 1rem;
  content: "";
  background: var(--coral);
  border-radius: 50%;
  box-shadow: 0 0 0 0.45rem rgba(240, 123, 90, 0.18);
}

.metric-chip {
  position: absolute;
  display: grid;
  min-width: 132px;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 40px rgba(6, 29, 21, 0.22);
}

.metric-chip span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.metric-chip strong {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
}

.metric-sleep {
  top: 13%;
  right: 0;
}

.metric-ready {
  bottom: 18%;
  left: 0;
}

.metric-heart {
  right: 4%;
  bottom: 6%;
}

@keyframes orbit-spin {
  to { transform: rotate(360deg); }
}

@keyframes breathe {
  0%, 100% { transform: scale(0.96); }
  50% { transform: scale(1.035); }
}

.section {
  padding: 7rem 0;
}

.section-inner {
  width: min(1120px, calc(100% - 3rem));
  margin: 0 auto;
}

.section-heading {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 4rem;
  align-items: end;
  margin-bottom: 4rem;
}

.section-heading h2 {
  max-width: 620px;
  margin-bottom: 0;
  font-size: clamp(2.8rem, 6vw, 5rem);
}

.section-heading p:last-child {
  max-width: 540px;
  margin: 0;
  color: var(--ink-soft);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.step {
  min-height: 270px;
  padding: 2rem 2.2rem 2rem 0;
  border-right: 1px solid var(--line);
}

.step + .step {
  padding-left: 2.2rem;
}

.step:last-child {
  border-right: 0;
}

.step-number {
  display: inline-grid;
  width: 2.35rem;
  height: 2.35rem;
  margin-bottom: 3.5rem;
  color: var(--forest);
  background: var(--mint);
  border-radius: 50%;
  place-items: center;
  font-family: var(--serif);
}

.step h3 {
  margin-bottom: 0.7rem;
  font-size: 1.8rem;
}

.step p {
  margin: 0;
  color: var(--ink-soft);
}

.privacy-band {
  color: var(--white);
  background: var(--ink);
}

.privacy-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.7fr);
  gap: 5rem;
  align-items: center;
}

.privacy-layout h2 {
  max-width: 670px;
  margin-bottom: 1.4rem;
  font-size: clamp(3rem, 6vw, 5.6rem);
}

.privacy-layout h2 span {
  color: var(--mint);
}

.privacy-layout > div > p:last-of-type {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.68);
}

.privacy-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.privacy-list li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.8rem;
  padding: 1.3rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.privacy-list span {
  color: var(--coral);
  font-weight: 800;
}

.registration {
  background: var(--paper-deep);
}

.registration-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(20, 33, 27, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.registration-intro {
  display: flex;
  gap: 2rem;
  align-items: end;
  justify-content: space-between;
  padding: 2.5rem 3rem;
  color: var(--white);
  background: var(--forest);
}

.registration-intro h2 {
  max-width: 650px;
  margin: 0;
  font-size: clamp(2.6rem, 5vw, 4.2rem);
}

.registration-intro p {
  max-width: 310px;
  margin: 0 0 0.4rem;
  color: rgba(255, 255, 255, 0.68);
}

.registration-fields {
  margin: 0;
}

.registration-row {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.35rem 2rem;
  border-bottom: 1px solid var(--line);
}

.registration-row:last-child {
  border-bottom: 0;
}

.registration-row dt {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.registration-row dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.96rem;
  font-weight: 600;
}

.copy-button {
  min-width: 74px;
  padding: 0.55rem 0.8rem;
  color: var(--forest);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font: 700 0.75rem var(--sans);
}

.copy-button:hover,
.copy-button:focus-visible {
  background: var(--mint-bright);
  border-color: var(--forest);
  outline: none;
}

.site-footer {
  padding: 3rem 0;
  color: var(--white);
  background: var(--forest);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
  width: min(1120px, calc(100% - 3rem));
  margin: 0 auto;
}

.footer-copy p {
  max-width: 520px;
  margin: 1.2rem 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.88rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  justify-content: flex-end;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.84rem;
  text-underline-offset: 0.25rem;
}

.legal-header {
  position: relative;
  color: var(--white);
  background: var(--forest);
}

.legal-header .site-header {
  position: relative;
}

.legal-hero {
  width: min(900px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 7rem 0 6rem;
}

.legal-hero h1 {
  margin-bottom: 1.5rem;
  font-size: clamp(4rem, 9vw, 7rem);
}

.legal-hero > p:last-child {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
}

.legal-content {
  display: grid;
  grid-template-columns: 230px minmax(0, 700px);
  gap: 5rem;
  width: min(1000px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 6rem 0 8rem;
}

.legal-meta {
  align-self: start;
  padding-top: 0.4rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.legal-meta strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--ink);
  font-size: 0.7rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.legal-meta a {
  color: var(--forest-light);
}

.legal-body h2 {
  margin: 3.5rem 0 1rem;
  font-size: 2rem;
  letter-spacing: -0.025em;
}

.legal-body h2:first-child {
  margin-top: 0;
}

.legal-body p,
.legal-body li {
  color: var(--ink-soft);
}

.legal-body ul {
  padding-left: 1.25rem;
}

.legal-body a {
  color: var(--forest-light);
  font-weight: 600;
}

code {
  padding: 0.12rem 0.38rem;
  color: var(--forest);
  background: var(--mint-bright);
  border-radius: 0.35rem;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.86em;
}

.legal-callout {
  margin: 2.5rem 0;
  padding: 1.5rem;
  background: var(--mint-bright);
  border-left: 4px solid var(--forest-light);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.callback-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background:
    radial-gradient(circle at 70% 20%, rgba(185, 234, 211, 0.6), transparent 30%),
    var(--paper);
}

.callback-shell {
  width: min(680px, calc(100% - 2rem));
  padding: 3rem 0;
}

.brand-dark {
  margin-bottom: 2rem;
}

.callback-card {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 7vw, 4rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.callback-card h1 {
  max-width: 520px;
  margin-bottom: 1.1rem;
  font-size: clamp(2.8rem, 8vw, 4.6rem);
}

.callback-card > p:not(.eyebrow) {
  position: relative;
  z-index: 1;
  max-width: 510px;
  margin-bottom: 2rem;
  color: var(--ink-soft);
}

.callback-orbit {
  position: absolute;
  top: -5rem;
  right: -5rem;
  width: 15rem;
  height: 15rem;
  border: 2rem solid var(--mint-bright);
  border-radius: 50%;
}

.callback-orbit span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1rem;
  height: 1rem;
  background: var(--coral);
  border-radius: 50%;
}

.callback-note {
  margin: 1.2rem 0 0;
  color: var(--ink-soft);
  font-size: 0.76rem;
  text-align: center;
}

.dashboard-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% 0%, rgba(185, 234, 211, 0.18), transparent 28rem),
    var(--forest);
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 1.7rem 0;
  color: var(--white);
}

.dashboard-header form {
  margin: 0;
}

.dashboard-disconnect {
  min-height: 2.75rem;
  color: var(--white);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  font-family: var(--sans);
}

.dashboard-main {
  width: min(1120px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 4rem 0 6rem;
}

.dashboard-intro {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: end;
  margin-bottom: 3rem;
  color: var(--white);
}

.dashboard-intro h1 {
  max-width: 760px;
  margin-bottom: 0.8rem;
  font-size: clamp(4rem, 8vw, 7rem);
}

.dashboard-intro > div > p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
}

.scope-panel {
  min-width: 240px;
  padding: 1.25rem 1.4rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
}

.scope-panel small {
  display: block;
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.scope-panel div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.scope-panel span,
.status-pill {
  display: inline-flex;
  padding: 0.35rem 0.65rem;
  color: var(--forest);
  background: var(--mint);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.score-card {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  padding: 2rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.score-card::after {
  position: absolute;
  right: -3.5rem;
  bottom: -3.5rem;
  width: 10rem;
  height: 10rem;
  content: "";
  border: 1.7rem solid var(--mint-bright);
  border-radius: 50%;
}

.score-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.score-card strong {
  display: block;
  margin: 2rem 0 1.4rem;
  font-family: var(--serif);
  font-size: clamp(5rem, 10vw, 7.5rem);
  font-weight: 500;
  line-height: 0.8;
}

.score-card span {
  position: relative;
  z-index: 1;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.ai-preview {
  position: relative;
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 2rem;
  align-items: center;
  margin-top: 1rem;
  padding: 2.5rem;
  overflow: hidden;
  color: var(--ink);
  background: var(--mint-bright);
  border-radius: var(--radius-lg);
}

.ai-preview h2 {
  margin-bottom: 0.7rem;
  font-size: clamp(2rem, 4vw, 3.3rem);
}

.ai-preview p:last-child {
  max-width: 650px;
  margin: 0;
  color: var(--ink-soft);
}

.ai-orbit {
  position: relative;
  width: 110px;
  height: 110px;
  border: 1.4rem solid var(--forest);
  border-radius: 50%;
}

.ai-orbit::before {
  position: absolute;
  inset: -2rem;
  content: "";
  border: 1px solid rgba(21, 63, 49, 0.35);
  border-radius: 50%;
  transform: scaleY(0.44) rotate(-20deg);
}

.ai-orbit span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--coral);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.status-pill {
  align-self: start;
  color: var(--white);
  background: var(--forest);
  white-space: nowrap;
}

.dashboard-footnote {
  max-width: 760px;
  margin: 1.5rem auto 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
  text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * {
    opacity: 0;
    animation: reveal-up 700ms ease forwards;
  }

  .hero-copy > :nth-child(2) { animation-delay: 90ms; }
  .hero-copy > :nth-child(3) { animation-delay: 180ms; }
  .hero-copy > :nth-child(4) { animation-delay: 270ms; }
  .hero-visual { animation: reveal-up 900ms 260ms ease both; }

  @keyframes reveal-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 900px) {
  .hero-inner,
  .section-heading,
  .privacy-layout,
  .legal-content {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    gap: 1rem;
    padding-top: 10rem;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-lead,
  .hero-copy .eyebrow {
    margin-right: auto;
    margin-left: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visual {
    min-height: 410px;
  }

  .orbit-system {
    width: min(72vw, 430px);
  }

  .section-heading,
  .privacy-layout {
    gap: 2rem;
  }

  .registration-intro {
    display: block;
  }

  .registration-intro p {
    margin-top: 1rem;
  }

  .legal-content {
    gap: 2.5rem;
  }

  .dashboard-intro,
  .ai-preview {
    grid-template-columns: 1fr;
  }

  .scope-panel {
    width: 100%;
  }

  .ai-orbit {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 680px) {
  .site-header {
    width: min(100% - 2rem, 1180px);
  }

  .site-nav a:not(.nav-pill) {
    display: none;
  }

  .hero-inner,
  .section-inner,
  .footer-inner,
  .legal-hero,
  .legal-content {
    width: min(100% - 2rem, 1120px);
  }

  .hero h1 {
    font-size: clamp(3.7rem, 19vw, 5.2rem);
  }

  .section {
    padding: 5rem 0;
  }

  .section-heading {
    margin-bottom: 2.5rem;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .step,
  .step + .step {
    min-height: auto;
    padding: 1.8rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .step-number {
    margin-bottom: 1.5rem;
  }

  .registration-intro {
    padding: 2rem 1.4rem;
  }

  .registration-row {
    grid-template-columns: 1fr auto;
    gap: 0.6rem 1rem;
    padding: 1.3rem 1.2rem;
  }

  .registration-row dt {
    grid-column: 1 / -1;
  }

  .registration-row dd {
    font-size: 0.86rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .legal-hero {
    padding: 4.5rem 0;
  }

  .legal-content {
    padding: 4rem 0 6rem;
  }

  .metric-chip {
    min-width: 110px;
    padding: 0.65rem 0.8rem;
  }

  .metric-chip strong {
    font-size: 1.1rem;
  }

  .dashboard-header,
  .dashboard-main {
    width: min(100% - 2rem, 1120px);
  }

  .dashboard-header {
    align-items: flex-start;
  }

  .dashboard-disconnect {
    min-height: 2.4rem;
    padding: 0.45rem 0.7rem;
    font-size: 0.72rem;
  }

  .dashboard-main {
    padding-top: 2.5rem;
  }

  .dashboard-intro {
    gap: 1.5rem;
  }

  .dashboard-intro h1 {
    font-size: clamp(3.7rem, 18vw, 5rem);
  }

  .score-grid {
    grid-template-columns: 1fr;
  }

  .score-card {
    min-height: 230px;
  }

  .ai-preview {
    padding: 2rem 1.5rem;
  }
}

/* Vietnamese dashboard system */
.dashboard-tabs {
  display: flex;
  gap: 0.55rem;
  margin: 0 0 2rem;
  padding: 0.45rem;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  scrollbar-width: thin;
}

.dashboard-tabs a,
.period-switcher a {
  flex: 0 0 auto;
  padding: 0.65rem 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.dashboard-tabs a:hover,
.dashboard-tabs a:focus-visible,
.dashboard-tabs a.is-active,
.period-switcher a:hover,
.period-switcher a:focus-visible,
.period-switcher a.is-active {
  color: var(--forest);
  background: var(--mint);
}

.dashboard-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.25rem;
  color: var(--white);
}

.dashboard-toolbar h2 {
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2.5rem);
}

.period-switcher {
  display: flex;
  gap: 0.25rem;
  padding: 0.3rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

.trend-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.trend-card,
.detail-panel,
.permission-panel {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: var(--radius-lg);
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.12);
}

.trend-heading,
.detail-panel > div:first-child,
.permission-panel {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.trend-heading h3,
.detail-panel h2,
.permission-panel h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
}

.trend-heading > strong {
  color: var(--forest);
  font-family: var(--serif);
  font-size: 2.3rem;
  font-weight: 500;
  white-space: nowrap;
}

.trend-heading > strong small {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 800;
}

.trend-chart {
  display: flex;
  align-items: end;
  gap: 0.35rem;
  min-height: 8.3rem;
  margin: 1.6rem 0 0;
  padding: 0 0 0.3rem;
  list-style: none;
  border-bottom: 1px solid var(--line);
}

.trend-point {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  gap: 0.45rem;
  min-width: 0;
  height: 7.8rem;
}

.trend-point small {
  color: var(--ink-soft);
  font-size: 0.58rem;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.trend-bar {
  display: block;
  width: 100%;
  max-width: 1.25rem;
  min-height: 0.35rem;
  background: linear-gradient(180deg, var(--coral), var(--forest-light));
  border-radius: 0.5rem 0.5rem 0.15rem 0.15rem;
}

.bar-level-1 { height: 10%; }
.bar-level-2 { height: 20%; }
.bar-level-3 { height: 30%; }
.bar-level-4 { height: 40%; }
.bar-level-5 { height: 50%; }
.bar-level-6 { height: 60%; }
.bar-level-7 { height: 70%; }
.bar-level-8 { height: 80%; }
.bar-level-9 { height: 90%; }
.bar-level-10 { height: 100%; }

.detail-panel {
  margin-top: 1rem;
}

.detail-panel > div:first-child {
  margin-bottom: 1.2rem;
}

.detail-layout {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.detail-layout .detail-panel {
  margin-top: 0;
}

.data-table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.data-table tr {
  border-bottom: 1px solid var(--line);
}

.data-table tr:last-child {
  border-bottom: 0;
}

.data-table th,
.data-table td {
  padding: 0.85rem 0;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  width: 58%;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 700;
}

.data-table td {
  color: var(--ink);
  font-weight: 800;
}

.empty-state,
.copy,
.data-notice {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.65;
}

.data-notice {
  margin: 1rem 0 0;
  padding: 0.9rem 1rem;
  color: #684c27;
  background: #fff5df;
  border-left: 0.25rem solid var(--coral);
  border-radius: 0.45rem;
}

.contributors {
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.contributors h3 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
}

.contributor-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
}

.contributor-grid div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.7rem 0.75rem;
  background: var(--paper);
  border-radius: 0.5rem;
}

.contributor-grid span {
  color: var(--ink-soft);
  font-size: 0.72rem;
  text-transform: capitalize;
}

.contributor-grid strong {
  color: var(--forest);
}

.insight-panel {
  display: grid;
  grid-template-columns: 6rem 1fr auto;
  gap: 1.5rem;
  align-items: start;
  margin-top: 1rem;
  padding: 2rem;
  color: var(--ink);
  background: var(--mint-bright);
  border-radius: var(--radius-lg);
}

.insight-icon {
  display: grid;
  width: 4.2rem;
  height: 4.2rem;
  place-items: center;
  color: var(--mint-bright);
  background: var(--forest);
  border: 0.65rem solid rgba(21, 63, 49, 0.16);
  border-radius: 50%;
  font-size: 1.4rem;
}

.insight-panel h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
}

.insight-panel ul {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.insight-panel li {
  display: grid;
  grid-template-columns: minmax(8rem, 0.35fr) 1fr;
  gap: 0.7rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(21, 63, 49, 0.16);
}

.insight-panel li span,
.insight-note {
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.insight-note {
  margin: 1rem 0 0;
}

.permission-panel {
  margin-top: 1rem;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.permission-panel > div:first-child {
  max-width: 31rem;
}

.permission-panel h2 {
  margin-bottom: 0.55rem;
}

.permission-panel p:not(.eyebrow) {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.86rem;
  line-height: 1.6;
}

.permission-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(10rem, 1fr));
  gap: 0.55rem;
  min-width: min(100%, 26rem);
}

.permission-action {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem 0.85rem;
  color: var(--forest);
  background: var(--mint);
  border-radius: 0.5rem;
  text-decoration: none;
}

.permission-action span {
  font-size: 0.78rem;
  font-weight: 800;
}

.permission-action small {
  font-size: 0.66rem;
}

.complete-permissions {
  align-self: center;
  padding: 0.8rem;
  color: var(--mint);
  font-size: 0.8rem;
}

.journal-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.journal-list li {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.2rem 0.9rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}

.journal-list time,
.journal-list span {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.journal-list time {
  grid-row: span 2;
}

.scope-panel small small {
  display: block;
  margin-top: 0.12rem;
  opacity: 0.65;
  font-size: 0.56rem;
}

@media (max-width: 900px) {
  .trend-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-layout .detail-panel {
    margin-top: 1rem;
  }

  .insight-panel,
  .permission-panel {
    grid-template-columns: 1fr;
  }

  .permission-actions {
    min-width: 0;
  }
}

@media (max-width: 680px) {
  .dashboard-toolbar {
    align-items: start;
    flex-direction: column;
  }

  .period-switcher {
    width: 100%;
  }

  .period-switcher a {
    flex: 1;
    text-align: center;
  }

  .trend-grid {
    gap: 0.75rem;
  }

  .trend-card,
  .detail-panel,
  .permission-panel,
  .insight-panel {
    padding: 1.25rem;
  }

  .insight-panel li {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .permission-actions,
  .contributor-grid {
    grid-template-columns: 1fr;
  }
}
