*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.08;
}

h1 { font-size: var(--text-hero); font-weight: 300; }
h2 { font-size: var(--text-3xl); font-weight: 400; }
h3 { font-size: var(--text-2xl); font-weight: 400; }
h4 { font-size: var(--text-xl); font-weight: 500; }

html.theme-nordic h1 { font-weight: 400; }

p, li { color: var(--ink-2); line-height: 1.7; }
a { color: var(--link-color); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--link-hover); }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }

.text-muted { color: var(--ink-muted); }
.muted-sm { color: var(--ink-muted); font-size: var(--text-sm); }
.eyebrow {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: var(--section-label-spacing);
  text-transform: var(--section-label-transform);
  color: var(--accent);
  display: block;
  margin-bottom: 0.6rem;
}

.seo-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.25rem 0 1rem;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

html.theme-nordic .seo-breadcrumbs {
  justify-content: center;
}

.seo-breadcrumbs a {
  color: var(--ink-muted);
}

.seo-breadcrumbs a:hover {
  color: var(--accent);
}

.seo-breadcrumb-sep {
  opacity: 0.75;
}

.section-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.25rem;
}

.section-rule::before,
.section-rule::after {
  content: "";
  height: 1px;
  background: var(--border);
}

.section-rule::before {
  width: 2rem;
  background: var(--ink);
  flex-shrink: 0;
}

html.theme-nordic .section-rule::before { display: none; }
.section-rule::after { flex: 1; }

.section-rule-label {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: var(--section-label-spacing);
  text-transform: var(--section-label-transform);
  color: var(--ink-muted);
  white-space: nowrap;
}

.site-nav {
  background: var(--nav-bg);
  height: var(--nav-height);
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--nav-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: stretch;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 1.5rem;
  border-right: 1px solid var(--nav-border);
}

.nav-brand-psi {
  font-family: var(--font-display-sc);
  font-size: 22px;
  color: var(--nav-text-active);
  line-height: 1;
}

html.theme-nordic .nav-brand-psi {
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-family: var(--font-display);
}

.nav-brand-name {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--nav-text);
}

html.theme-nordic .nav-brand-name {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}

.nav-links {
  display: flex;
  align-items: stretch;
  margin-left: 1.5rem;
}

.nav-link {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nav-text);
  padding: 0 1rem;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--nav-border);
  border-bottom: 2px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

html.theme-nordic .nav-link {
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  border-right: none;
}

.nav-link:hover { color: var(--nav-text-active); }
.nav-link.active {
  color: var(--nav-text-active);
  background: var(--nav-active-bg);
}

html.theme-nordic .nav-link.active {
  background: transparent;
  border-bottom-color: var(--accent);
}

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  border-left: 1px solid var(--nav-border);
  padding-left: 1.5rem;
  color: var(--nav-text);
}

.nav-avatar {
  width: 24px;
  height: 24px;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display-sc);
  font-size: 11px;
}

html.theme-nordic .nav-avatar { border-radius: 50%; }

.theme-toggle {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  padding: 5px 12px;
  background: none;
  border: 1px solid var(--nav-border);
  color: var(--nav-text);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

html.theme-nordic .theme-toggle {
  border-color: var(--border);
  color: var(--ink-muted);
  border-radius: var(--radius-pill);
}

.page-wrap {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  flex: 1;
}

html.theme-nordic .page-wrap { padding: 0 2.5rem; }
.page-wrap.narrow { max-width: 820px; }

.hero-band {
  background: var(--nav-bg);
  padding: 4.5rem 2rem 3.5rem;
}

html.theme-nordic .hero-band {
  background: var(--ink);
  padding: 5rem 2.5rem;
  text-align: center;
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 300;
  line-height: 1.02;
  color: var(--bg);
}

html.theme-nordic .hero-title { font-weight: 400; }

html.theme-nordic-dark .hero-band,
html.theme-archival-dark .hero-band { text-align: center; }

html.theme-nordic-dark .hero-title,
html.theme-archival-dark .hero-title { color: var(--ink); }

.hero-sub {
  font-size: var(--text-md);
  color: rgba(245, 240, 232, 0.5);
  margin-top: 1rem;
}

.card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--card-padding);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: background 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.card:hover {
  background: var(--card-bg-hover);
  box-shadow: var(--shadow-md);
}

html.theme-nordic .card:hover { border-color: var(--accent-2); }

.card-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--ink);
}

.card-desc {
  color: var(--ink-muted);
  flex: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

html.theme-nordic .btn {
  border-radius: var(--radius-pill);
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  font-family: var(--font-body);
  font-weight: 500;
  padding: 10px 22px;
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}

.btn-primary:hover { background: var(--btn-primary-hover-bg); color: var(--btn-primary-text); }

.btn-ghost {
  background: none;
  border: var(--btn-ghost-border);
  color: var(--btn-ghost-text);
}

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

.btn-open {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  width: 100%;
  margin-top: auto;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  border: var(--tag-neutral-border);
  background: var(--tag-neutral-bg);
  color: var(--tag-neutral-text);
}

.tag.converted {
  background: var(--tag-converted-bg);
  color: var(--tag-converted-text);
  border: var(--tag-converted-border);
}

.tag.warn {
  background: var(--warn-dim);
  color: var(--warn);
  border: 1px solid var(--warn);
}

.tag.ok {
  background: var(--ok-dim);
  color: var(--ok);
  border: 1px solid var(--ok);
}

.tag.info {
  background: var(--info-dim);
  color: var(--info);
  border: 1px solid var(--info);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
textarea,
select {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  background: var(--input-bg);
  border: var(--input-border);
  border-radius: var(--radius-sm);
  color: var(--input-text);
  padding: 9px 14px;
  width: 100%;
  outline: none;
}

html.theme-nordic input[type="text"],
html.theme-nordic input[type="email"],
html.theme-nordic input[type="password"],
html.theme-nordic input[type="number"],
html.theme-nordic input[type="date"],
html.theme-nordic input[type="search"],
html.theme-nordic textarea,
html.theme-nordic select {
  border-radius: var(--radius-md);
  font-family: var(--font-body);
}

input:focus,
textarea:focus,
select:focus { border: var(--input-border-focus); }

input::placeholder,
textarea::placeholder { color: var(--input-placeholder); }

label {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: block;
  margin-bottom: 6px;
}

html.theme-nordic label {
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-2);
}

.progress-track { height: 3px; background: var(--border); }
.progress-fill { height: 100%; background: var(--accent); transition: width 0.3s ease; }

.stat-band {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: center;
  gap: 4rem;
}

.stat-num {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: var(--ink);
  line-height: 1;
}

.stat-label {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 3px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.filter-chip {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: none;
  color: var(--ink-muted);
  cursor: pointer;
}

.filter-chip.active {
  background: var(--accent-dim);
  border-color: var(--accent-2);
  color: var(--accent);
}

.sections-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

html.theme-archival .sections-grid {
  gap: 0;
  border: 1px solid var(--border);
}

html.theme-archival .sections-grid .card {
  border-radius: 0;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-top: none;
  border-left: none;
}

html.theme-archival .sections-grid .card:nth-child(3n) { border-right: none; }
html.theme-archival .sections-grid .card:nth-last-child(-n+3) { border-bottom: none; }

.post-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: baseline;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  color: inherit;
}

html.theme-archival .post-row { padding: 0.9rem 0; }
.post-row:hover { background: var(--bg-elevated); }
html.theme-archival .post-row:hover { background: transparent; }
.post-row:last-child { border-bottom: none; }

.post-title-text { color: var(--ink); font-size: var(--text-md); }
.post-date-text {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.flash-stack {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem 2rem 0;
}

.flash {
  padding: 10px 1.25rem;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  border-left: 3px solid;
  margin-bottom: 1rem;
}

.flash.success,
.flash-success { background: var(--ok-dim); color: var(--ok); border-color: var(--ok); }
.flash.error,
.flash-error { background: var(--danger-dim); color: var(--danger); border-color: var(--danger); }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  display: flex;
  gap: 2rem;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--ink-muted);
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.sh-consent-root {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 5rem;
  z-index: 1300;
  pointer-events: none;
}

.sh-consent-banner {
  width: min(40rem, 100%);
  margin-left: auto;
  pointer-events: auto;
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 0.9rem;
}

html.theme-archival .sh-consent-banner {
  border-radius: 0;
}

.sh-consent-copy {
  display: grid;
  gap: 0.35rem;
}

.sh-consent-kicker {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.sh-consent-title {
  margin: 0;
  font-size: var(--text-xl);
}

.sh-consent-text {
  margin: 0;
  color: var(--ink-muted);
  font-size: var(--text-sm);
}

.sh-consent-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.sh-consent-actions-inline {
  padding-top: 0.4rem;
}

.sh-consent-panel {
  display: grid;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.sh-consent-choice {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.sh-consent-choice strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

.sh-consent-choice p {
  margin: 0;
  color: var(--ink-muted);
  font-size: var(--text-sm);
}

.sh-consent-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--ink);
}

.sh-consent-toggle input {
  width: auto;
  margin: 0;
}

.sh-consent-manage {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 1200;
}

.auth-wrap {
  max-width: 420px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.auth-card {
  background: var(--bg-elevated);
  border: var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

html.theme-archival .auth-card { border-radius: 0; }
.auth-title { font-size: var(--text-3xl); margin-bottom: 0.5rem; }
.auth-sub { color: var(--ink-muted); margin-bottom: 2rem; }
.form-group { margin-bottom: 1.25rem; }

.intro-page { padding: 3rem 0 4rem; }
.intro-hero { display: grid; gap: 1rem; padding-bottom: 2rem; }
html.theme-archival .intro-hero { border-bottom: 1px solid var(--border); }
html.theme-nordic .intro-hero { text-align: center; padding-top: 1rem; }
.intro-lead { max-width: 780px; font-size: var(--text-lg); }
html.theme-nordic .intro-lead { margin: 0 auto; }

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

html.theme-archival .intro-grid {
  gap: 0;
  border: 1px solid var(--border);
}

.intro-stat {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
}

html.theme-archival .intro-stat {
  border-radius: 0;
  border: none;
  border-right: 1px solid var(--border);
  background: transparent;
}

html.theme-archival .intro-stat:last-child { border-right: none; }

.intro-stat-kicker {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.intro-stat-value { font-family: var(--font-display); font-size: var(--text-2xl); color: var(--ink); }
.intro-stat-note { font-size: var(--text-sm); color: var(--ink-muted); }

.instruction-list { list-style: none; display: grid; gap: 1rem; margin: 1rem 0 2rem; }
.instruction-step {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.instruction-step:first-child { border-top: none; }
.instruction-number { font-family: var(--font-display); font-size: var(--text-2xl); color: var(--accent); }

.hagentest-page .shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.hagentest-page #screen-start,
.hagentest-page #screen-test,
.hagentest-page #screen-finish,
.hagentest-page #example-screen,
.hagentest-page #done-screen {
  width: 100%;
}

.hagentest-page .grid-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.hagentest-page .stimulus-wrap,
.hagentest-page #example-screen .card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hagentest-page .stimulus,
.hagentest-page #example-screen #stimulus {
  width: min(100%, 476px);
  max-height: min(43vh, 476px);
  aspect-ratio: 1;
  object-fit: contain;
  background: #fff;
  margin: 0 auto;
}

.hagentest-page .choices,
.hagentest-page #example-screen #choices {
  width: min(100%, 600px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hagentest-page .choice {
  cursor: pointer;
}

.hagentest-page .choice img {
  width: 100%;
  max-width: 161px;
  aspect-ratio: 1;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  background: #fff;
}

@media (max-width: 900px) {
  .hagentest-page .shell {
    max-width: 100%;
    padding: 1.5rem 1rem 3rem;
  }

  .hagentest-page .stimulus,
  .hagentest-page #example-screen #stimulus {
    width: min(100%, 422px);
    max-height: 41vh;
  }
}

@media (max-width: 640px) {
  .hagentest-page .shell {
    padding: 1rem 0.75rem 2.5rem;
  }

  .hagentest-page .choices,
  .hagentest-page #example-screen #choices {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .hagentest-page .choice img {
    max-width: 124px;
  }
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2.5rem;
  padding: 2.5rem 0 3rem;
}

.panel-box {
  background: var(--bg-elevated);
  border: var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

html.theme-archival .panel-box { border-radius: 0; }

.panel-box-head {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.panel-box-body { padding: 1.25rem; }

.kv-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 5px 0;
  border-bottom: 1px solid var(--border-2);
  font-size: 12px;
}

.kv-row:last-child { border-bottom: none; }
.kv-key { color: var(--ink-muted); font-family: var(--font-ui); }
.kv-val { color: var(--ink); text-align: right; }
.kv-val.hi { color: var(--accent); }

.metric-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.metric-cell,
.attempt-card,
.chart-card,
.flag-item,
.comment-card,
.qa-card,
.modal-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
}

html.theme-archival .metric-cell,
html.theme-archival .attempt-card,
html.theme-archival .chart-card,
html.theme-archival .flag-item,
html.theme-archival .comment-card,
html.theme-archival .qa-card,
html.theme-archival .modal-box { border-radius: 0; }

.metric-cell,
.attempt-card,
.chart-card,
.flag-item,
.comment-card,
.qa-card,
.modal-box { padding: 1.1rem; }

.metric-code,
.comment-meta,
.qa-meta,
.rating-value {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--ink-muted);
}

.metric-score,
.score-big { font-family: var(--font-display); color: var(--ink); line-height: 1; }
.metric-score { font-size: var(--text-2xl); }
.score-big { font-size: 5rem; }

.attempt-history,
.flag-list,
.comment-list,
.qa-list,
.content-stack { display: grid; gap: 1rem; }

.occupation-match-widget {
  display: grid;
  gap: 0.9rem;
}

.profile-cards-widget {
  display: grid;
  gap: 1rem;
}

.profile-cards-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--ink-muted);
}

.profile-cards-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.profile-card-item {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 1rem;
  display: grid;
  gap: 0.5rem;
}

html.theme-archival .profile-card-item {
  border-radius: 0;
}

.profile-card-item.info { border-left: 3px solid var(--chart-secondary); }
.profile-card-item.neutral { border-left: 3px solid var(--ink-muted); }
.profile-card-item.caution { border-left: 3px solid var(--warn); }
.profile-card-item.positive { border-left: 3px solid var(--ok); }

.profile-card-kicker {
  font-family: var(--font-ui);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.profile-card-title,
.profile-cards-empty-title {
  margin: 0;
  font-size: var(--text-xl);
  color: var(--ink);
}

.profile-card-summary,
.profile-cards-overall {
  margin: 0;
  color: var(--ink-2);
}

.profile-cards-empty {
  display: grid;
  gap: 0.75rem;
}

.occupation-card {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 1rem;
  display: grid;
  gap: 0.85rem;
}

html.theme-archival .occupation-card {
  border-radius: 0;
}

.occupation-card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.occupation-rank,
.occupation-distance,
.occupation-trait-label,
.occupation-trait-value {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--ink-muted);
}

.occupation-title {
  margin: 0.2rem 0 0;
  font-size: var(--text-xl);
}

.occupation-summary {
  margin: 0.4rem 0 0;
  font-size: 13px;
  color: var(--ink-muted);
}

.occupation-distance {
  white-space: nowrap;
  color: var(--ink);
}

.occupation-traits {
  display: grid;
  gap: 0.45rem;
}

.occupation-trait-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 58px;
  gap: 0.65rem;
  align-items: center;
}

.occupation-trait-track {
  position: relative;
  height: 7px;
  background: var(--border-2);
  overflow: hidden;
}

.occupation-trait-fill {
  height: 100%;
  min-width: 4px;
}

.occupation-trait-fill.close { background: var(--ok); }
.occupation-trait-fill.mid { background: var(--accent); }
.occupation-trait-fill.far { background: var(--warn); }

.occupation-empty {
  display: grid;
  gap: 0.8rem;
  justify-items: start;
}

.occupation-empty-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--ink);
}

.attempt-head,
.score-summary,
.comment-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.score-summary { align-items: end; }

.article-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 0 3rem;
}

.article-body { display: grid; gap: 1.2rem; line-height: 1.85; }
html.theme-archival .article-body { font-size: 18px; text-align: justify; }
html.theme-nordic .article-body { font-size: 16px; text-align: left; }

.list-table {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

html.theme-archival .list-table { border-radius: 0; }

.list-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 180px 120px;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
}

.list-row:last-child { border-bottom: none; }
.list-row.hidden { display: none; }
.list-title { font-family: var(--font-display); font-size: var(--text-xl); color: var(--ink); }
.list-sub { font-size: var(--text-sm); color: var(--ink-muted); }

.rating-dots { display: inline-flex; gap: 0.22rem; }
.rating-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
}

.rating-dot.filled {
  background: var(--accent);
  border-color: var(--accent);
}

.admin-dock {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  gap: 0.6rem;
  align-items: center;
  z-index: 30;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 50;
}

.modal-overlay.open { display: flex; }

.test-shell {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 2rem;
}

.test-sidebar {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  background: var(--bg-elevated);
  align-self: start;
  position: sticky;
  top: calc(var(--nav-height) + 1rem);
}

html.theme-archival .test-sidebar {
  background: transparent;
  border-radius: 0;
}

.test-map {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
}

.test-map-cell {
  border: 1px solid var(--border);
  height: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--ink-muted);
}

.test-map-cell.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.response-options {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

html.theme-archival .response-options { border-radius: 0; }

.response-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.response-option:last-child { border-bottom: none; }
.response-option:hover { background: var(--bg-elevated); }

.item-stem {
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 2rem;
}

html.theme-archival .item-stem {
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
}

.chart-wrap {
  position: relative;
  width: 100%;
  min-height: 280px;
}

.chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  min-height: 280px;
}

.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 1024px) {
  .sections-grid,
  .intro-grid,
  .metric-strip,
  .dashboard-grid,
  .test-shell { grid-template-columns: 1fr; }

  .test-sidebar { position: static; }
  .list-row { grid-template-columns: 1fr; }
  .occupation-card-head {
    display: grid;
    grid-template-columns: 1fr;
  }
  .profile-cards-list { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-inner,
  .page-wrap,
  html.theme-nordic .page-wrap,
  .hero-band,
  html.theme-nordic .hero-band,
  .site-footer { padding-left: 1rem; padding-right: 1rem; }

  .nav-inner { overflow-x: auto; gap: 1rem; }
  .sections-grid,
  .intro-grid,
  .metric-strip { grid-template-columns: 1fr; }
  .post-row { grid-template-columns: 1fr; }
  .auth-wrap { padding: 0 1rem; margin-top: 2rem; }
  .site-footer { flex-direction: column; gap: 0.75rem; }
  .stat-band { flex-direction: column; gap: 1rem; align-items: flex-start; }
  .sh-consent-root {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 4.75rem;
  }
  .sh-consent-banner {
    width: 100%;
    margin-left: 0;
  }
  .sh-consent-actions,
  .sh-consent-choice {
    display: grid;
    grid-template-columns: 1fr;
  }
  .sh-consent-manage {
    left: 0.75rem;
    bottom: 0.75rem;
  }
  .occupation-card-head,
  .occupation-trait-row {
    display: grid;
    grid-template-columns: 1fr;
  }
  .profile-cards-meta { display: grid; gap: 0.25rem; }
  .occupation-distance { white-space: normal; }
}
