@import url("./tokens.css");
@import url("./base.css");

.skip {
  position: absolute;
  left: var(--space-md);
  top: calc(-1 * var(--space-3xl));
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: var(--white);
  font-size: var(--text-xs);
}

.skip:focus {
  top: var(--space-md);
}

/* ================================================================== */
/* controls                                                            */
/* ================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 46px;
  padding: 0 var(--space-lg);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition:
    transform var(--dur-micro) var(--ease-out),
    box-shadow var(--dur-short) var(--ease-out),
    background-color var(--dur-short) var(--ease-out),
    border-color var(--dur-short) var(--ease-out);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background: linear-gradient(135deg, #1e40af, #0e7490);
  color: var(--white);
  box-shadow: 0 12px 24px -12px rgba(30, 64, 175, 0.55);
}

.btn-primary:hover {
  box-shadow: 0 18px 34px -14px rgba(37, 99, 235, 0.65);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line-2);
  color: var(--ink-2);
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-ghost-light {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--white);
}

.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.32);
}

.btn-small {
  min-height: 38px;
  padding: 0 var(--space-md);
  font-size: var(--text-xs);
  border-radius: var(--radius-sm);
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 500;
  transition: color var(--dur-short) var(--ease-out);
}

.text-button:hover {
  color: var(--primary);
}

.text-button.is-danger:hover {
  color: var(--danger);
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
}

.icon-sm {
  width: 15px;
  height: 15px;
  flex: none;
}

/* ================================================================== */
/* top bar                                                             */
/* ================================================================== */

.topbar {
  position: relative;
  z-index: 20;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  min-height: 72px;
}

.topbar--light {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
}

.topbar--light .brand-name {
  color: var(--ink);
}

.topbar--light .brand-sub {
  color: var(--muted);
}

.topbar--light .nav-link {
  color: var(--muted);
}

.topbar--light .nav-link:hover {
  color: var(--ink);
}

.topbar--dark .brand-name {
  color: var(--white);
}

.topbar--dark .brand-sub {
  color: rgba(255, 255, 255, 0.55);
}

.topbar--dark .nav-link {
  color: rgba(255, 255, 255, 0.7);
}

.topbar--dark .nav-link:hover {
  color: var(--white);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  color: var(--white);
  box-shadow: 0 10px 22px -10px rgba(37, 99, 235, 0.7);
}

.brand-mark svg {
  width: 21px;
  height: 21px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topnav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  transition: color var(--dur-short) var(--ease-out);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 var(--space-md);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--white);
  font-size: var(--text-xs);
  font-weight: 600;
  transition:
    background-color var(--dur-short) var(--ease-out),
    border-color var(--dur-short) var(--ease-out);
}

.nav-cta:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}

.topbar--light .nav-cta {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.topbar--light .nav-cta:hover {
  background: var(--primary-2);
  border-color: var(--primary-2);
}

.topbar-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* ================================================================== */
/* hero                                                               */
/* ================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(900px 520px at 86% 8%, rgba(6, 182, 212, 0.24), transparent 60%),
    radial-gradient(760px 520px at 8% 100%, rgba(37, 99, 235, 0.28), transparent 62%),
    linear-gradient(180deg, #06111f 0%, #081a30 55%, #0a213d 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, black 0%, rgba(0, 0, 0, 0.45) 60%, transparent 100%);
}

.hero::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -140px;
  top: -120px;
  border-radius: 50%;
  border: 1px solid rgba(34, 211, 238, 0.18);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: var(--space-2xl);
  align-items: center;
  padding-block: var(--space-2xl) 64px;
}

.hero-copy {
  animation: hero-in 0.7s var(--ease-out) both;
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(6, 182, 212, 0.1);
  color: #a5f3fc;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.14);
}

.hero h1 {
  margin-top: var(--space-lg);
  max-width: 15ch;
  font-size: var(--text-hero);
  line-height: 1.06;
  letter-spacing: -0.045em;
  color: var(--white);
}

.grad-text {
  background: linear-gradient(105deg, #60a5fa 0%, #22d3ee 55%, #34d399 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin-top: var(--space-lg);
  max-width: 48ch;
  color: rgba(226, 238, 252, 0.72);
  font-size: var(--text-md);
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stat b {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.1;
  color: var(--white);
}

.stat span {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: rgba(226, 238, 252, 0.5);
}

/* matrix card */

.matrix-card {
  position: relative;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 30, 54, 0.62);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
  animation: hero-in 0.8s 0.1s var(--ease-out) both;
}

.matrix-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, var(--primary), var(--cyan), transparent);
}

.matrix-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.matrix-title {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  color: rgba(226, 238, 252, 0.52);
}

.matrix-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: #6ee7b7;
  white-space: nowrap;
}

.matrix-live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.15);
}

.matrix-list {
  padding: var(--space-xs) 0;
}

.matrix-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 72px 44px;
  gap: var(--space-sm);
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

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

.matrix-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  color: #67e8f9;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.matrix-name {
  min-width: 0;
  font-size: var(--text-xs);
  color: rgba(240, 247, 255, 0.82);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.matrix-track {
  height: 5px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.matrix-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
}

.matrix-count {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: rgba(226, 238, 252, 0.55);
  text-align: right;
  white-space: nowrap;
}

.matrix-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-top: var(--space-sm);
  margin-top: var(--space-xs);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  color: rgba(226, 238, 252, 0.35);
}

.hero-note {
  position: absolute;
  right: var(--space-xl);
  bottom: var(--space-lg);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(6, 17, 31, 0.72);
  color: rgba(226, 238, 252, 0.68);
  font-size: 0.7rem;
  backdrop-filter: blur(10px);
}

.hero-note svg {
  width: 14px;
  height: 14px;
  color: #34d399;
}

/* ================================================================== */
/* trust strip                                                        */
/* ================================================================== */

.trust-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.trust-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md) var(--space-xl);
  padding-block: var(--space-md);
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: var(--text-xs);
}

.trust-item svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

/* ================================================================== */
/* sections                                                           */
/* ================================================================== */

.section {
  padding-block: var(--space-3xl);
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.section-head-main {
  max-width: 620px;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-2);
}

.section-kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--primary);
}

.section-head h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.12;
}

.section-sub {
  max-width: 52ch;
  margin-top: var(--space-sm);
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.8;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-2);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
}

.section-link:hover {
  gap: 10px;
}

/* ================================================================== */
/* assessment cards                                                   */
/* ================================================================== */

.assessment-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-md);
}

.assessment-card {
  position: relative;
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  min-height: 290px;
  padding: var(--space-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--dur-short) var(--ease-out),
    box-shadow var(--dur-short) var(--ease-out),
    border-color var(--dur-short) var(--ease-out);
}

.assessment-card:nth-child(-n + 2) {
  grid-column: span 3;
  min-height: 320px;
  padding: var(--space-xl);
}

.assessment-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.assessment-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  box-shadow: var(--shadow-md);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}

.card-icon svg {
  width: 23px;
  height: 23px;
}

.card-tag {
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.card-title {
  font-size: var(--text-lg);
  line-height: 1.3;
}

.assessment-card:nth-child(-n + 2) .card-title {
  font-size: var(--text-xl);
}

.card-blurb {
  margin-top: 10px;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.75;
  flex: 1;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-md);
  color: var(--muted);
  font-size: var(--text-xs);
}

.card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.card-meta svg {
  width: 14px;
  height: 14px;
}

.card-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
  color: var(--accent-ink);
  font-size: var(--text-sm);
  font-weight: 600;
}

.card-cta svg {
  width: 16px;
  height: 16px;
  transition: transform var(--dur-short) var(--ease-out);
}

.assessment-card:hover .card-cta svg {
  transform: translateX(3px);
}

/* ================================================================== */
/* report preview                                                     */
/* ================================================================== */

.preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: var(--space-2xl);
  align-items: center;
}

.preview-copy h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.12;
}

.preview-copy > p {
  margin-top: var(--space-md);
  max-width: 48ch;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.85;
}

.check-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink-2);
  font-size: var(--text-sm);
}

.check-list svg {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--green);
  flex: none;
}

.preview-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 14px var(--space-lg);
  background: var(--navy);
  color: var(--white);
}

.preview-head span:first-child {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.55);
}

.preview-head .chip {
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.7);
}

.preview-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: var(--space-lg);
  align-items: center;
  padding: var(--space-lg);
}

.preview-radar {
  min-width: 0;
}

.preview-side {
  min-width: 0;
}

.preview-code {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.04em;
  background: linear-gradient(120deg, #1d4ed8, #0891b2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.preview-names {
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--text-xs);
}

.preview-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: var(--space-lg);
}

.preview-bar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm);
  font-size: 0.68rem;
  color: var(--muted);
}

.preview-bar-head b {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--primary);
}

.preview-bar-track {
  height: 5px;
  margin-top: 4px;
  border-radius: var(--radius-pill);
  background: var(--bg-2);
  overflow: hidden;
}

.preview-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
}

/* ================================================================== */
/* steps                                                              */
/* ================================================================== */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
}

.step-card {
  position: relative;
  overflow: hidden;
  padding: var(--space-lg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.step-num {
  position: absolute;
  top: 6px;
  right: 18px;
  font-family: var(--font-display);
  font-size: 3.8rem;
  font-weight: 700;
  line-height: 1;
  color: var(--bg-2);
  pointer-events: none;
}

.step-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
}

.step-icon svg {
  width: 21px;
  height: 21px;
}

.step-card h3 {
  margin-top: var(--space-md);
  font-size: var(--text-md);
}

.step-card p {
  margin-top: 6px;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.75;
}

/* ================================================================== */
/* report cards (home + history)                                      */
/* ================================================================== */

.report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
}

.report-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--space-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--dur-short) var(--ease-out),
    box-shadow var(--dur-short) var(--ease-out);
}

.report-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.report-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.report-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.report-card-code {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.03em;
}

.report-card-time {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--muted);
  white-space: nowrap;
}

.report-card h3 {
  font-size: var(--text-sm);
  font-weight: 600;
}

.report-card p {
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.6;
  flex: 1;
}

.report-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--line);
}

.report-card-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--primary);
  font-size: var(--text-xs);
  font-weight: 600;
}

.report-card-delete {
  color: var(--muted-2);
  font-size: var(--text-xs);
}

.report-card-delete:hover {
  color: var(--danger);
}

/* ================================================================== */
/* empty states                                                       */
/* ================================================================== */

.empty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl) var(--space-lg);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: var(--primary-soft);
  color: var(--primary);
}

.empty-icon svg {
  width: 27px;
  height: 27px;
}

.empty-card h2 {
  margin-top: var(--space-md);
  font-size: var(--text-xl);
}

.empty-card p {
  margin-top: 6px;
  max-width: 42ch;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.7;
}

.empty-card .btn {
  margin-top: var(--space-lg);
}

/* ================================================================== */
/* footer                                                             */
/* ================================================================== */

.site-footer {
  background: var(--navy);
  color: rgba(226, 238, 252, 0.62);
  padding-top: var(--space-3xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 0.8fr 0.8fr 1.1fr;
  gap: var(--space-2xl);
}

.footer-brand .brand-name {
  color: var(--white);
}

.footer-brand .brand-sub {
  color: rgba(255, 255, 255, 0.58);
}

.footer-brand p {
  margin-top: var(--space-md);
  max-width: 36ch;
  font-size: var(--text-xs);
  line-height: 1.8;
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--space-md);
}

.footer-badges span {
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.5);
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.footer-col ul {
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-col a {
  font-size: var(--text-xs);
  color: rgba(226, 238, 252, 0.62);
  transition: color var(--dur-short) var(--ease-out);
}

.footer-col a:hover {
  color: var(--white);
}

.footer-col p {
  margin-top: var(--space-md);
  font-size: var(--text-xs);
  line-height: 1.75;
}

.footer-col .text-button {
  color: rgba(226, 238, 252, 0.62);
  font-size: var(--text-xs);
}

.footer-col .text-button:hover {
  color: var(--white);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-top: var(--space-2xl);
  padding-block: var(--space-md) var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.66rem;
  color: rgba(226, 238, 252, 0.5);
}

/* ================================================================== */
/* test page                                                          */
/* ================================================================== */

.test-page {
  min-height: 100dvh;
  background: var(--bg);
}

.progress-track {
  height: 4px;
  background: var(--line);
}

.progress-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  transform-origin: left center;
  transition: transform var(--dur-short) var(--ease-out);
}

.test-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: var(--space-lg);
  align-items: start;
  padding-block: var(--space-xl) var(--space-3xl);
}

.test-aside {
  position: sticky;
  top: 96px;
}

.side-card {
  padding: var(--space-lg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.side-head {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.side-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}

.side-icon svg {
  width: 21px;
  height: 21px;
}

.side-title {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.3;
}

.side-code {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}

.side-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
}

.side-stat span {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
}

.side-stat b {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--ink);
}

.side-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: var(--space-md);
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

.side-note svg {
  width: 14px;
  height: 14px;
  color: var(--green);
  flex: none;
}

.question-card {
  padding: var(--space-xl);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.question-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.question-kicker {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  color: var(--accent-ink);
}

.question-tag {
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.66rem;
  font-weight: 500;
  white-space: nowrap;
}

.question-card h1 {
  margin-top: var(--space-md);
  max-width: 34ch;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: var(--space-xl);
}

.option {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 24px;
  gap: var(--space-sm);
  align-items: center;
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  text-align: left;
  transition:
    border-color var(--dur-short) var(--ease-out),
    background-color var(--dur-short) var(--ease-out),
    box-shadow var(--dur-short) var(--ease-out);
}

.option:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.option.is-selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.option-key {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--bg-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  transition:
    background-color var(--dur-micro) var(--ease-out),
    color var(--dur-micro) var(--ease-out);
}

.option.is-selected .option-key {
  background: var(--primary);
  color: var(--white);
}

.option-label {
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--ink-2);
}

.option-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  color: transparent;
  transition:
    background-color var(--dur-micro) var(--ease-out),
    border-color var(--dur-micro) var(--ease-out),
    color var(--dur-micro) var(--ease-out);
}

.option-check svg {
  width: 13px;
  height: 13px;
}

.option.is-selected .option-check {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.question-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-lg);
  color: var(--muted);
  font-size: var(--text-xs);
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.64rem;
}

.test-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--line);
}

.test-status {
  font-size: var(--text-xs);
  color: var(--muted);
  text-align: center;
}

/* ================================================================== */
/* report page                                                        */
/* ================================================================== */

.report-page {
  min-height: 100dvh;
  background: var(--bg);
}

.report-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(700px 420px at 82% 10%, var(--accent-glow), transparent 62%),
    linear-gradient(180deg, #06111f, #0a1d35);
}

.report-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
  pointer-events: none;
}

.report-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: var(--space-2xl);
  align-items: center;
  padding-block: var(--space-2xl) var(--space-3xl);
}

.report-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.68rem;
}

.report-kicker svg {
  width: 15px;
  height: 15px;
  color: var(--accent-2);
}

.report-code {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: var(--space-lg);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

.report-code span {
  display: grid;
  place-items: center;
  min-width: 66px;
  height: 66px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 3px solid var(--accent-2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--white);
}

.report-code--text span {
  min-width: 0;
  padding: 0 18px;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.report-names {
  margin-top: var(--space-sm);
  color: rgba(226, 238, 252, 0.62);
  font-size: var(--text-sm);
}

.report-lead {
  margin-top: var(--space-md);
  max-width: 62ch;
  color: rgba(226, 238, 252, 0.82);
  font-size: var(--text-sm);
  line-height: 1.85;
}

.report-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--space-lg);
}

.report-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.report-chips span {
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(226, 238, 252, 0.62);
  font-size: 0.64rem;
}

.report-ring {
  display: flex;
  justify-content: center;
  align-items: center;
}

.report-body {
  padding-block: var(--space-xl) var(--space-3xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-sm);
}

.metric-card {
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.metric-value {
  margin-top: 7px;
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.metric-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

.dash-card {
  padding: var(--space-lg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.dash-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.dash-kicker {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.dash-head h2 {
  margin-top: 5px;
  font-size: var(--text-xl);
}

.dash-head > p {
  max-width: 40ch;
  color: var(--muted);
  font-size: var(--text-xs);
  text-align: right;
}

.chart-grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: var(--space-xl);
  align-items: start;
}

.chart-block {
  min-width: 0;
}

.chart-block h3 {
  margin-bottom: var(--space-md);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm);
}

.insight-card.is-lead {
  grid-column: span 2;
}

.insight-card {
  position: relative;
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.insight-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.insight-top {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.insight-key {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  flex: none;
}

.insight-heading {
  min-width: 0;
  flex: 1;
}

.insight-heading h3 {
  font-size: var(--text-sm);
  font-weight: 600;
}

.insight-heading p {
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--text-xs);
}

.insight-score {
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  white-space: nowrap;
}

.insight-desc {
  margin-top: var(--space-sm);
  color: var(--ink-2);
  font-size: var(--text-xs);
  line-height: 1.75;
}

.insight-tip {
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.7;
}

.insight-tip b {
  color: var(--ink);
  font-weight: 600;
  margin-right: 5px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--space-sm);
}

.tag-list li {
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.64rem;
}

.advice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-sm);
}

.advice-card {
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.advice-num {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--accent-ink);
}

.advice-card h3 {
  margin-top: 6px;
  font-size: var(--text-sm);
}

.advice-card p {
  margin-top: 5px;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.7;
}

.data-list {
  border-top: 1px solid var(--line);
}

.data-row {
  display: grid;
  grid-template-columns: 180px 86px minmax(0, 1fr);
  gap: var(--space-md);
  align-items: baseline;
  padding-block: var(--space-sm);
  border-bottom: 1px solid var(--line);
}

.data-name {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-2);
}

.data-value {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent-ink);
}

.data-note {
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.65;
}

.combo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-sm);
}

.combo-cell {
  padding: var(--space-md);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.combo-cell span {
  display: block;
  color: var(--muted);
  font-size: var(--text-xs);
}

.combo-cell b {
  display: block;
  margin-top: 5px;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--ink);
}

.combo-cell small {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--accent-ink);
}

.report-note {
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: var(--text-xs);
  line-height: 1.75;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* ================================================================== */
/* charts                                                             */
/* ================================================================== */

.radar {
  width: 100%;
  max-width: 390px;
  margin-inline: auto;
  overflow: visible;
}

.chart-grid,
.chart-grid-outer {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}

.chart-grid-outer {
  stroke: var(--line-2);
}

.chart-axis {
  stroke: var(--line);
  stroke-width: 1;
}

.chart-area {
  fill: color-mix(in srgb, var(--accent) 14%, transparent);
  stroke: var(--accent);
  stroke-width: 2;
}

.chart-dot {
  fill: var(--accent);
  stroke: var(--surface);
  stroke-width: 1.5;
}

.chart-label {
  font-family: var(--font-body);
  font-size: 11px;
  fill: var(--muted);
}

.barlist {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.bar-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm);
}

.bar-label {
  font-size: var(--text-xs);
  color: var(--ink-2);
}

.bar-value {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent-ink);
}

.bar-track {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-2);
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width var(--dur-long) var(--ease-out);
}

.bar-note {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--muted);
}

.bipolar {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.bipolar-labels {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: 5px;
  font-size: var(--text-xs);
  color: var(--muted);
}

.bipolar-labels span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}

.bipolar-labels b {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
}

.bipolar-labels .is-picked {
  color: var(--ink);
  font-weight: 600;
}

.bipolar-labels .is-picked b {
  color: var(--accent-ink);
}

.bipolar-track {
  position: relative;
  display: flex;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-2);
  overflow: hidden;
}

.bipolar-left {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.bipolar-right {
  height: 100%;
  background: var(--accent-soft);
}

.bipolar-mid {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--surface);
}

.bipolar-type {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.62rem;
  text-align: right;
}

.bipolar-type b {
  color: var(--accent-ink);
}

.ring-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.ring {
  width: 148px;
  height: 148px;
}

.ring-track {
  fill: none;
  stroke: var(--bg-2);
  stroke-width: 8;
}

.ring-value {
  fill: none;
  stroke: var(--accent);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dasharray var(--dur-long) var(--ease-out);
}

.ring-number {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  fill: var(--ink);
}

.ring-sub {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  fill: var(--muted-2);
}

.ring-label {
  color: var(--muted);
  font-size: var(--text-xs);
}

.report-hero .ring-track {
  stroke: rgba(255, 255, 255, 0.14);
}

.report-hero .ring-value {
  stroke: var(--accent-2);
}

.report-hero .ring-number {
  fill: var(--white);
}

.report-hero .ring-sub,
.report-hero .ring-label {
  fill: rgba(226, 238, 252, 0.55);
  color: rgba(226, 238, 252, 0.55);
}

.side-card .ring {
  width: 132px;
  height: 132px;
  margin: var(--space-md) auto;
}

.side-card .ring-wrap {
  margin-top: var(--space-sm);
}

/* ================================================================== */
/* history page                                                       */
/* ================================================================== */

.history-page {
  padding-block: var(--space-xl) var(--space-3xl);
}

.history-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.history-head h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.history-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.history-note {
  margin-top: var(--space-lg);
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.7;
}

/* ================================================================== */
/* toast                                                              */
/* ================================================================== */

.toast {
  position: fixed;
  left: 50%;
  bottom: var(--space-xl);
  z-index: 100;
  padding: 11px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: var(--white);
  font-size: var(--text-xs);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition:
    opacity var(--dur-short) var(--ease-out),
    transform var(--dur-short) var(--ease-out);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}


/* ================================================================== */
/* brief / access                                                     */
/* ================================================================== */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.66rem;
  white-space: nowrap;
}

.report-card-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
}

.metric-grid.is-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.chart-grid-2.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.unlock-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--space-lg);
  align-items: center;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(600px 280px at 90% 0%, rgba(6, 182, 212, 0.22), transparent 65%),
    linear-gradient(135deg, #071426, #0b2440);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-lg);
  color: var(--white);
}

.unlock-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--cyan), transparent);
}

.unlock-card--page {
  margin-top: var(--space-xs);
}

.unlock-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: #67e8f9;
}

.unlock-icon svg {
  width: 25px;
  height: 25px;
}

.unlock-content {
  min-width: 0;
}

.unlock-card .dash-kicker {
  color: #67e8f9;
}

.unlock-content h2 {
  margin-top: 5px;
  font-size: var(--text-xl);
  color: var(--white);
}

.unlock-content > p {
  max-width: 62ch;
  margin-top: 6px;
  color: rgba(226, 238, 252, 0.68);
  font-size: var(--text-xs);
  line-height: 1.75;
}

.lock-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: var(--space-sm);
}

.lock-list li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(226, 238, 252, 0.78);
  font-size: var(--text-xs);
}

.lock-list svg {
  width: 14px;
  height: 14px;
  color: #34d399;
  flex: none;
}

.unlock-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.unlock-action .chip {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(226, 238, 252, 0.68);
}

.unlock-note {
  color: rgba(226, 238, 252, 0.4);
  font-size: 0.6rem;
  text-align: right;
}

.access-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  padding-block: var(--space-sm);
  border-bottom: 1px solid var(--line);
}

.access-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.66rem;
  font-weight: 600;
}

.access-countdown {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-ink);
}

.access-hint {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.66rem;
}


/* ================================================================== */
/* responsive                                                         */
/* ================================================================== */

@media (max-width: 64rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-xl);
    padding-block: var(--space-xl) var(--space-2xl);
  }

  .hero h1 {
    max-width: 18ch;
  }

  .hero-note {
    display: none;
  }

  .matrix-card {
    max-width: 560px;
  }

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

  .assessment-card,
  .assessment-card:nth-child(-n + 2) {
    grid-column: span 1;
    min-height: 280px;
    padding: var(--space-lg);
  }

  .assessment-card:nth-child(-n + 2) .card-title {
    font-size: var(--text-lg);
  }

  .preview-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps-grid {
    grid-template-columns: minmax(0, 1fr);
  }

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

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

  .test-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .test-aside {
    position: static;
  }

  .side-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
  }

  .side-head {
    grid-column: 1;
  }

  .side-card .ring-wrap {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin: 0;
  }

  .side-card .ring {
    width: 104px;
    height: 104px;
    margin: 0;
  }

  .side-stats {
    grid-column: 1;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  .side-note {
    grid-column: 1 / -1;
    margin-top: 0;
  }

  .report-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-xl);
  }

  .report-ring {
    justify-content: flex-start;
  }

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

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

  .insight-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .advice-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .metric-grid.is-three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .unlock-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .unlock-action {
    grid-column: 1 / -1;
    align-items: flex-start;
  }

  .insight-card.is-lead {
    grid-column: auto;
  }
}

@media (max-width: 44rem) {
  .topbar-inner {
    min-height: 64px;
  }

  .brand-sub,
  .topnav .nav-link,
  .topbar-title {
    display: none;
  }

  .nav-cta {
    min-height: 36px;
  }

  .hero h1 {
    font-size: clamp(2.3rem, 11vw, 3.2rem);
  }

  .matrix-row {
    grid-template-columns: 52px minmax(0, 1fr) 38px;
    gap: var(--space-xs);
  }

  .matrix-track {
    display: none;
  }

  .hero-stats {
    gap: var(--space-lg);
  }

  .trust-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm) var(--space-md);
  }

  .section {
    padding-block: var(--space-2xl);
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
  }

  .assessment-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .preview-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .report-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-xl);
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .test-layout {
    padding-block: var(--space-md) var(--space-2xl);
  }

  .side-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .side-card .ring-wrap {
    grid-column: 1;
    grid-row: auto;
    justify-self: center;
  }

  .side-stats {
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--line);
  }

  .question-card {
    padding: var(--space-lg);
  }

  .option {
    grid-template-columns: 34px minmax(0, 1fr) 22px;
    padding: 12px;
  }

  .test-actions {
    flex-wrap: wrap;
  }

  .test-actions .btn {
    flex: 1;
  }

  .test-status {
    order: -1;
    width: 100%;
  }

  .metric-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .report-hero-grid {
    padding-block: var(--space-xl) var(--space-2xl);
  }

  .report-code span {
    min-width: 54px;
    height: 54px;
    font-size: 1.7rem;
  }

  .report-code--text span {
    height: auto;
    padding: 10px 14px;
    font-size: 1.25rem;
  }

  .dash-card {
    padding: var(--space-md);
  }

  .dash-head {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
  }

  .dash-head > p {
    text-align: left;
  }

  .data-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px var(--space-md);
  }

  .data-note {
    grid-column: 1 / -1;
  }

  .combo-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .history-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .metric-grid.is-three {
    grid-template-columns: minmax(0, 1fr);
  }

  .insight-card.is-lead {
    grid-column: auto;
  }

  .unlock-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .unlock-icon {
    width: 44px;
    height: 44px;
  }

  .access-hint {
    margin-left: 0;
    width: 100%;
  }

  .report-card-links {
    gap: var(--space-sm);
  }
}

/* ================================================================== */
/* print                                                              */
/* ================================================================== */

@media print {
  @page {
    margin: 14mm;
  }

  body {
    background: var(--white);
  }

  body::before,
  .topbar,
  .site-footer,
  .toast,
  .report-actions,
  .report-note {
    display: none !important;
  }

  .report-hero {
    background: var(--white);
    color: var(--ink);
  }

  .report-hero::before {
    display: none;
  }

  .report-code span {
    border-color: var(--line-2);
    background: var(--surface-2);
    color: var(--ink);
  }

  .report-names,
  .report-lead,
  .report-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.report-chips span {
    color: var(--ink-2);
  }

  .report-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.report-chips span {
    border-color: var(--line);
    background: var(--surface-2);
  }

  .report-hero .ring-track {
    stroke: var(--bg-2);
  }

  .report-hero .ring-value {
    stroke: var(--primary);
  }

  .report-hero .ring-number {
    fill: var(--ink);
  }

  .report-hero .ring-sub,
  .report-hero .ring-label {
    fill: var(--muted);
    color: var(--muted);
  }

  .dash-card,
  .metric-card,
  .insight-card,
  .advice-card {
    box-shadow: none;
    break-inside: avoid;
  }

  .report-body {
    padding-block: var(--space-lg);
  }
}
