:root {
  color-scheme: light;
  --ink: #18202a;
  --muted: #627084;
  --line: #dbe2ea;
  --panel: #ffffff;
  --surface: #f4f7fa;
  --accent: #163f73;
  --accent-strong: #0b2b54;
  --warn: #ba5b13;
  --danger: #b3261e;
  --ok: #227447;
  --violet: #6256a8;
  --gold: #9c7615;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-bottom: 64px;
  background: var(--surface);
  color: var(--ink);
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

.top-chrome {
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 8px 18px rgba(24, 32, 42, 0.08);
}

.app-header {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.title-lockup {
  text-align: center;
}

.brand-logo {
  width: clamp(96px, 13vw, 180px);
  height: auto;
  flex: 0 0 auto;
  display: block;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.title-lockup .eyebrow {
  margin: 6px 0 0;
  font-size: 9.5pt;
  text-transform: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.45rem, 2.4vw, 2.2rem);
  line-height: 1.1;
}

.title-logo-heading {
  display: flex;
  justify-content: center;
}

.title-logo {
  display: block;
  width: auto;
  height: clamp(32px, 3vw, 42px);
  max-width: min(48vw, 390px);
  object-fit: contain;
}

.tm-mark {
  margin-left: 3px;
  font-size: 0.38em;
  font-weight: 700;
  vertical-align: super;
}

.progress-panel {
  display: grid;
  gap: 6px;
  padding: 10px 28px;
  border-bottom: 1px solid var(--line);
  background: #edf3f9;
}

.progress-panel[hidden] {
  display: none;
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 750;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #cbd8e8;
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 180ms ease;
}

h2 {
  margin-bottom: 14px;
  font-size: 1rem;
}

.header-actions,
.panel-title,
.tabs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-actions {
  justify-content: flex-end;
}

.public-auth-actions,
.private-auth-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.auth-user-badge {
  max-width: 180px;
  overflow: hidden;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(250px, 310px) 1fr;
  min-height: calc(100vh - 84px);
}

.control-panel {
  position: sticky;
  top: 98px;
  align-self: start;
  max-height: calc(100vh - 132px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 1px solid var(--line);
  background: #ffffff;
  padding: 20px;
}

.control-panel section + section {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.workspace {
  min-width: 0;
  padding: 20px;
}

.tabs {
  flex-wrap: nowrap;
  gap: 9px;
  overflow-x: auto;
  margin-bottom: 18px;
  padding-bottom: 2px;
}

.tab-note {
  margin: -8px 0 16px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.tab-note strong {
  color: var(--accent-strong);
}

.tab,
.ghost-button,
.primary-button,
.file-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 650;
}

.tab {
  min-height: 37px;
  padding: 0 12px;
  font-size: 0.9rem;
  white-space: nowrap;
}

.tab.active {
  border-color: var(--accent);
  background: #e7f3f1;
  color: var(--accent-strong);
}

.ghost-button,
.primary-button,
.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
}

.primary-button {
  width: 100%;
  border-color: var(--accent-strong);
  background: var(--accent);
  color: #ffffff;
}

.ghost-button.compact {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.88rem;
}

.primary-button.compact,
.file-button.compact {
  width: auto;
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.88rem;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  cursor: pointer;
  font-weight: 750;
  padding: 0;
  text-decoration: underline;
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.field-row,
.field-check {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.field-check {
  grid-template-columns: 18px 1fr;
  align-items: start;
}

.field-row input,
.field-row select,
.field-row textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--ink);
}

.field-row textarea {
  min-height: 82px;
  padding: 10px;
  resize: vertical;
}

.auth-shell {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.auth-shell[hidden] {
  display: none;
}

.auth-view {
  display: none;
}

.auth-view.active {
  display: grid;
  gap: 18px;
}

.auth-status {
  display: none;
  max-width: 980px;
  margin: 0 auto;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 650;
}

.auth-status.active {
  display: block;
}

.auth-status.error {
  border-color: rgba(179, 38, 30, 0.28);
  background: #fff7f6;
  color: var(--danger);
}

.auth-hero,
.auth-card,
.legal-view {
  width: min(100%, 980px);
  margin: 0 auto;
}

.auth-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 22px;
  align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #eef5fb 100%);
}

.auth-hero h2,
.auth-card h2,
.legal-view h2 {
  margin-bottom: 10px;
  color: var(--accent-strong);
  font-size: clamp(1.2rem, 2vw, 1.8rem);
}

.auth-hero p,
.auth-help,
.auth-switch,
.legal-view p {
  color: #384557;
  font-size: 0.92rem;
  line-height: 1.55;
}

.auth-hero-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(11, 43, 84, 0.18);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(10, 31, 68, 0.06);
}

.auth-hero-card strong {
  color: var(--accent-strong);
  font-size: 1rem;
}

.auth-hero-card span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.landing-visual {
  width: min(100%, 980px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(11, 43, 84, 0.14);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(10, 31, 68, 0.06);
}

.landing-visual img {
  display: block;
  width: 100%;
  height: clamp(120px, 19vw, 210px);
  object-fit: cover;
  object-position: center;
}

.auth-card {
  display: grid;
  gap: 14px;
}

.auth-card-narrow {
  max-width: 520px;
}

.auth-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.auth-wide {
  grid-column: 1 / -1;
}

.auth-consent {
  align-items: start;
  margin-bottom: 0;
  line-height: 1.45;
}

.consent-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: 4px;
}

.auth-cta-row,
.auth-inline-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.auth-cta-row .primary-button,
.auth-cta-row .ghost-button {
  width: auto;
}

.resend-box {
  display: grid;
  gap: 8px;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fbfd;
}

.resend-box span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.resend-box .inline-notice-error {
  color: var(--danger);
  font-weight: 700;
}

.danger-zone {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid rgba(179, 38, 30, 0.25);
  border-radius: 7px;
  background: #fff8f7;
}

.danger-zone h3,
.danger-zone p {
  margin: 0;
}

.danger-zone h3 {
  color: var(--danger);
  font-size: 0.92rem;
}

.danger-zone p {
  color: #6f403d;
  font-size: 0.86rem;
  line-height: 1.45;
}

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

.legal-view {
  display: grid;
  gap: 10px;
}

.auth-shell.modal-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(6, 18, 38, 0.46);
  backdrop-filter: blur(2px);
}

.auth-shell.modal-only {
  padding: 0;
}

.auth-shell.modal-only .auth-status,
.auth-shell.modal-only .auth-view:not(.legal-modal) {
  display: none;
}

.legal-modal.active {
  position: fixed;
  top: clamp(112px, 16vh, 144px);
  left: 50%;
  z-index: 1110;
  width: min(calc(100vw - 32px), 640px);
  height: auto;
  max-height: none;
  overflow: visible;
  padding: 26px;
  transform: translateX(-50%);
  box-shadow: 0 24px 70px rgba(3, 13, 30, 0.34);
}

.legal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.legal-title-row .about-kicker {
  margin: 0;
}

.legal-view p,
.legal-view li {
  color: #384557;
  font-size: 0.86rem;
  line-height: 1.45;
}

.legal-view p {
  margin-bottom: 0;
}

.legal-view ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 20px;
}

.legal-view li::marker {
  color: var(--accent);
}

.legal-view code {
  font-size: 0.88em;
}

.legal-view a {
  color: var(--accent-strong);
  overflow-wrap: anywhere;
}

.threshold-guide {
  display: grid;
  gap: 7px;
  margin: 0 0 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 8pt;
  line-height: 1.35;
}

.threshold-guide strong {
  color: var(--accent-strong);
  font-size: 8pt;
}

.threshold-row {
  display: grid;
  grid-template-columns: 48px 60px 1fr;
  gap: 7px;
  align-items: start;
}

.threshold-row span:first-child,
.threshold-row span:nth-child(2) {
  color: var(--ink);
  font-weight: 700;
}

.variable-list {
  display: grid;
  gap: 8px;
  max-height: 270px;
  overflow: auto;
}

.variable-pill {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
  font-size: 0.9rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 31, 68, 0.45);
}

.modal-backdrop[hidden] {
  display: none;
}

.variable-modal {
  display: grid;
  grid-template-rows: auto auto auto minmax(160px, 1fr) auto;
  gap: 10px;
  width: min(860px, 100%);
  max-height: min(780px, calc(100vh - 56px));
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(10, 31, 68, 0.28);
}

.modal-head,
.modal-tools,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.modal-head h2 {
  margin-bottom: 0;
  font-size: 8pt;
  line-height: 1.2;
}

.modal-intro {
  display: grid;
  gap: 6px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.modal-intro p {
  margin: 0;
  color: var(--accent-strong);
  font-weight: 700;
}

.modal-intro ul {
  display: grid;
  gap: 3px;
  margin: 0;
  padding-left: 18px;
}

.modal-tools {
  align-items: end;
}

.modal-search {
  flex: 1;
  margin-bottom: 0;
}

.modal-actions {
  display: flex;
  gap: 8px;
}

.variable-modal-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-height: 160px;
  overflow: auto;
  padding: 2px;
}

.modal-variable {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: start;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 650;
}

.modal-variable span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.modal-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 150px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  color: var(--muted);
  text-align: center;
}

.modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(190px, auto);
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.modal-footer .primary-button {
  width: auto;
  min-width: 190px;
}

.modal-footer .primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.type-badge,
.status-badge {
  padding: 3px 7px;
  border-radius: 999px;
  background: #edf1f5;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: grid;
  gap: 18px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 14px;
}

.metric,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.metric {
  display: grid;
  grid-template-rows: 42px 1fr;
  min-height: 132px;
  overflow: hidden;
  padding: 0;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(10, 31, 68, 0.05);
}

.metric-header {
  display: grid;
  place-items: center;
  min-height: 42px;
  background: var(--accent-strong);
}

.metric span {
  display: block;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
}

.metric strong {
  display: grid;
  place-items: center;
  min-height: 90px;
  padding: 6px 6px 10px;
  color: #000000;
  font-size: 2.45rem;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  overflow-wrap: anywhere;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.panel {
  min-width: 0;
  padding: 16px;
}

.panel-title {
  justify-content: space-between;
  margin-bottom: 12px;
}

.panel-title h2 {
  margin-bottom: 0;
}

.bar-chart,
.flag-list {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(90px, 160px) 1fr 54px;
  gap: 10px;
  align-items: center;
  font-size: 0.88rem;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: #edf1f5;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--accent);
}

.overview-assessment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.overview-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
  min-height: 136px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  box-shadow: 0 10px 24px rgba(10, 31, 68, 0.05);
}

.overview-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(10, 31, 68, 0.1);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
}

.overview-card span:not(.overview-icon) {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.overview-card strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 1.18rem;
}

.overview-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.42;
}

.overview-card-ok .overview-icon {
  background: rgba(30, 138, 92, 0.12);
  color: var(--ok);
}

.overview-card-warn .overview-icon {
  background: rgba(180, 94, 30, 0.12);
  color: var(--warn);
}

.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  gap: 22px;
  align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #eef5fb 100%);
}

.about-hero h2 {
  margin-bottom: 10px;
  color: var(--accent-strong);
  font-size: clamp(1.25rem, 2vw, 1.85rem);
}

.about-hero p {
  margin-bottom: 10px;
  color: #344154;
  line-height: 1.55;
}

.about-kicker {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.about-version-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(11, 43, 84, 0.18);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(10, 31, 68, 0.06);
}

.about-version-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.about-version-card strong {
  color: var(--accent-strong);
  font-size: 2.1rem;
  line-height: 1;
}

.about-version-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.about-section {
  display: grid;
  align-content: start;
  gap: 10px;
}

.about-section h2 {
  margin-bottom: 2px;
  color: var(--accent-strong);
  font-size: 1rem;
}

.about-section h3 {
  margin: 8px 0 0;
  color: #263347;
  font-size: 0.88rem;
}

.about-section p {
  margin: 0;
  color: #384557;
  font-size: 0.9rem;
  line-height: 1.55;
}

.about-section ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 1.15rem;
  color: #384557;
  font-size: 0.9rem;
  line-height: 1.5;
}

.about-section li {
  padding-left: 0.12rem;
}

.about-wide {
  grid-column: 1 / -1;
}

.citation-box {
  padding: 12px;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  background: #f5f8fb;
  color: #263347;
  font-size: 0.9rem;
  line-height: 1.55;
}

.about-section a {
  color: var(--accent-strong);
  overflow-wrap: anywhere;
}

.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.recommendation-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  box-shadow: 0 10px 24px rgba(10, 31, 68, 0.05);
}

.recommendation-card h3 {
  margin-bottom: 10px;
  color: var(--accent-strong);
  font-size: 0.92rem;
}

.recommendation-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.flag-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfd;
}

.method-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.method-guide div {
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfd;
}

.method-guide strong {
  color: var(--accent-strong);
  font-size: 0.92rem;
}

.method-guide span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.decision-rule-guide {
  grid-template-columns: 1fr;
}

.decision-rule-guide div {
  min-height: auto;
}

.plot-limit-guide {
  grid-column: 1 / -1;
}

.guide-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.guide-list li {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.guide-list strong {
  display: block;
  margin-bottom: 2px;
}

.guide-list span {
  display: block;
}

.guide-sentence {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.method-note {
  margin: 12px 0 0;
  line-height: 1.45;
}

.report-note {
  display: grid;
}

.note-box {
  max-height: 360px;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfd;
  color: #2f3a49;
  font-size: 0.94rem;
  line-height: 1.65;
  white-space: pre-wrap;
  user-select: text;
}

.note-box:focus {
  outline: 2px solid rgba(22, 63, 115, 0.35);
  outline-offset: 2px;
}

.structured-note-box {
  display: grid;
  gap: 4px;
  white-space: normal;
}

.report-note-title {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-strong);
  font-size: 1rem;
  font-weight: 800;
}

.report-note-heading {
  display: block;
  margin-top: 6px;
  color: var(--accent-strong);
  font-weight: 750;
}

.report-note-bullet {
  display: grid;
  grid-template-columns: 0.8rem minmax(0, 1fr);
  column-gap: 0.42rem;
  align-items: start;
  line-height: 1.55;
}

.report-note-bullet-marker {
  text-align: center;
  color: var(--accent-strong);
  line-height: 1.55;
}

.report-note-spacer {
  height: 4px;
}

.recommendation-note-box {
  white-space: normal;
}

.recommendation-note-box p {
  margin: 0 0 12px;
}

.note-list-block {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.note-list-block > strong {
  color: var(--accent-strong);
}

.note-list-block ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
}

.app-footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  padding: 8px 28px;
  border-top: 1px solid var(--line);
  background: #0b2b54;
  color: #e8eef7;
  font-size: 8pt;
  line-height: 1.35;
  text-align: center;
}

.app-footer p {
  max-width: 1120px;
  margin: 0 auto;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
  background: #ffffff;
}

caption {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: left;
}

th,
td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
  font-size: 0.86rem;
}

td:last-child {
  white-space: normal;
  min-width: 260px;
}

.normality-table {
  min-width: 1680px;
  table-layout: fixed;
}

.normality-table th,
.normality-table td {
  padding: 8px 9px;
  vertical-align: top;
  white-space: normal;
}

.normality-table th:nth-child(1),
.normality-table td:nth-child(1) {
  width: 130px;
  font-weight: 700;
}

.normality-table th:nth-child(2),
.normality-table td:nth-child(2) {
  width: 82px;
  text-align: center;
}

.normality-table th:nth-child(3),
.normality-table td:nth-child(3),
.normality-table th:nth-child(4),
.normality-table td:nth-child(4),
.normality-table th:nth-child(5),
.normality-table td:nth-child(5),
.normality-table th:nth-child(6),
.normality-table td:nth-child(6),
.normality-table th:nth-child(8),
.normality-table td:nth-child(8),
.normality-table th:nth-child(9),
.normality-table td:nth-child(9),
.normality-table th:nth-child(11),
.normality-table td:nth-child(11),
.normality-table th:nth-child(12),
.normality-table td:nth-child(12),
.normality-table th:nth-child(14),
.normality-table td:nth-child(14) {
  width: 74px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.normality-table th:nth-child(7),
.normality-table td:nth-child(7),
.normality-table th:nth-child(10),
.normality-table td:nth-child(10),
.normality-table th:nth-child(13),
.normality-table td:nth-child(13) {
  width: 104px;
  text-align: center;
}

.normality-table th:nth-child(15),
.normality-table td:nth-child(15),
.normality-table th:nth-child(16),
.normality-table td:nth-child(16) {
  width: 280px;
  min-width: 280px;
  line-height: 1.45;
}

th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: #3a4656;
  font-weight: 750;
}

tr.flagged td {
  background: #fff7ed;
}

.matrix {
  overflow: auto;
}

.matrix-grid {
  display: grid;
  min-width: 480px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.matrix-cell {
  min-height: 40px;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 700;
}

.matrix-cell.header {
  background: #f8fafc;
  color: var(--muted);
}

.boxplot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
}

.histogram-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
}

.diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
}

.histogram-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfd;
}

.histogram-card h3 {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.histogram-svg {
  width: 100%;
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.histogram-label,
.histogram-tick {
  fill: var(--muted);
  font-size: 7px;
  font-weight: 700;
}

.histogram-card .muted {
  font-size: 0.72rem;
  line-height: 1.35;
}

.histogram-axis {
  stroke: #c8d2df;
  stroke-width: 1;
}

.histogram-bar {
  fill: #dce8f6;
  stroke: var(--accent);
  stroke-width: 1;
}

.histogram-normal-line {
  fill: none;
  stroke: var(--danger);
  stroke-width: 2;
}

.histogram-mean {
  fill: var(--accent-strong);
}

.histogram-empty {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  color: var(--muted);
}

.diagnostic-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfd;
}

.diagnostic-card-wide {
  grid-column: 1 / -1;
}

.diagnostic-card h3 {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.diagnostic-card .muted {
  font-size: 0.72rem;
  line-height: 1.35;
}

.qq-svg {
  width: 100%;
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.qq-axis {
  stroke: #c8d2df;
  stroke-width: 1;
}

.qq-reference {
  stroke: var(--danger);
  stroke-width: 1.6;
}

.qq-point {
  fill: var(--accent);
  opacity: 0.74;
}

.qq-label,
.qq-tick {
  fill: var(--muted);
  font-size: 7px;
  font-weight: 700;
}

.diagnostic-empty {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  color: var(--muted);
}

.boxplot-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfd;
}

.boxplot-card h3 {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.boxplot-pair {
  display: grid;
  gap: 8px;
}

.boxplot-svg {
  width: 100%;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.boxplot-label,
.boxplot-tick {
  fill: var(--muted);
  font-size: 7px;
  font-weight: 700;
}

.boxplot-card .muted {
  font-size: 0.72rem;
  line-height: 1.35;
}

.boxplot-axis {
  stroke: #c8d2df;
  stroke-width: 1;
}

.boxplot-line,
.boxplot-median {
  stroke: var(--accent-strong);
  stroke-width: 2;
}

.boxplot-box {
  fill: #dce8f6;
  stroke: var(--accent);
  stroke-width: 2;
}

.boxplot-outlier {
  fill: var(--danger);
}

.boxplot-empty {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  color: var(--muted);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  gap: 8px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Modern UI refresh */
:root {
  --surface: #eef3f8;
  --surface-soft: #f7fafc;
  --panel: #ffffff;
  --line: #d7e1ec;
  --line-soft: #e8eef5;
  --accent: #174a7c;
  --accent-strong: #082b52;
  --accent-soft: #e7f1fb;
  --accent-wash: rgba(23, 74, 124, 0.09);
  --teal: #168c8c;
  --shadow-sm: 0 8px 20px rgba(8, 43, 82, 0.07);
  --shadow-md: 0 18px 46px rgba(8, 43, 82, 0.12);
  --radius-sm: 7px;
  --radius-md: 8px;
}

body {
  background:
    radial-gradient(circle at top left, rgba(22, 140, 140, 0.12), transparent 28rem),
    linear-gradient(180deg, #f8fbfd 0%, var(--surface) 100%);
}

.top-chrome {
  border-bottom: 1px solid rgba(215, 225, 236, 0.78);
  background: rgba(251, 253, 255, 0.88);
  box-shadow: 0 10px 30px rgba(8, 43, 82, 0.08);
  backdrop-filter: blur(14px);
}

.app-header {
  grid-template-columns: minmax(128px, 1fr) auto minmax(250px, 1fr);
  gap: 22px;
  padding: 16px 28px;
  border-bottom: 0;
  background: transparent;
}

.brand-logo {
  width: clamp(92px, 11vw, 156px);
}

.title-logo {
  height: clamp(30px, 2.7vw, 40px);
}

.title-lockup .eyebrow {
  color: #375d82;
  font-size: 9pt;
  font-weight: 700;
}

/* Balanced header distribution without overlap */
.app-header {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(320px, 1.2fr) minmax(420px, 1fr);
  align-items: center;
  column-gap: clamp(16px, 2vw, 34px);
}

.brand-lockup,
.header-actions {
  min-width: 0;
}

.brand-lockup {
  justify-content: flex-start;
}

.header-actions {
  justify-content: flex-end;
}

.title-lockup {
  min-width: 0;
  width: 100%;
  text-align: center;
}

.title-logo-heading {
  width: 100%;
}

.title-logo {
  width: min(100%, 360px);
  max-width: 100%;
}

.private-auth-actions,
.public-auth-actions {
  max-width: 100%;
}

.auth-user-badge {
  padding: 6px 10px;
  border: 1px solid rgba(23, 74, 124, 0.14);
  border-radius: 999px;
  background: rgba(23, 74, 124, 0.08);
  color: var(--accent-strong);
}

.progress-panel {
  padding: 9px 28px 11px;
  border-top: 1px solid rgba(215, 225, 236, 0.62);
  border-bottom: 0;
  background: rgba(231, 241, 251, 0.86);
}

.progress-track {
  height: 7px;
  background: rgba(8, 43, 82, 0.12);
}

.progress-bar {
  background: linear-gradient(90deg, var(--accent) 0%, var(--teal) 100%);
}

.tab,
.ghost-button,
.primary-button,
.file-button {
  border-radius: var(--radius-sm);
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.tab:hover,
.ghost-button:hover,
.file-button:hover,
.link-button:hover {
  color: var(--accent-strong);
}

.ghost-button:hover,
.file-button:hover,
.tab:hover {
  border-color: rgba(23, 74, 124, 0.34);
  background: #f8fbfd;
  box-shadow: 0 6px 14px rgba(8, 43, 82, 0.07);
}

.primary-button {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent-strong) 0%, var(--accent) 100%);
  box-shadow: 0 9px 18px rgba(8, 43, 82, 0.16);
}

.primary-button:hover {
  box-shadow: 0 12px 26px rgba(8, 43, 82, 0.22);
  transform: translateY(-1px);
}

button:focus-visible,
.file-button:focus-within,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(22, 140, 140, 0.24);
  outline-offset: 2px;
}

.field-row input,
.field-row select,
.field-row textarea {
  border-color: var(--line);
  border-radius: var(--radius-sm);
  background: #fbfdff;
  box-shadow: inset 0 1px 0 rgba(8, 43, 82, 0.03);
}

.field-row input:focus,
.field-row select:focus,
.field-row textarea:focus {
  border-color: rgba(22, 140, 140, 0.55);
  background: #ffffff;
}

.field-check input {
  accent-color: var(--accent);
}

.auth-shell {
  gap: 20px;
  padding: 24px;
}

.landing-visual,
.auth-hero,
.auth-card,
.legal-view,
.panel,
.metric,
.overview-card,
.recommendation-card,
.method-guide div,
.histogram-card,
.diagnostic-card,
.boxplot-card {
  border-color: rgba(215, 225, 236, 0.9);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.landing-visual {
  max-width: 1040px;
  border: 1px solid rgba(215, 225, 236, 0.82);
}

.landing-visual img {
  height: clamp(138px, 21vw, 230px);
}

.auth-hero,
.about-hero {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(231, 241, 251, 0.86) 100%);
}

.auth-hero-card,
.about-version-card {
  border-color: rgba(23, 74, 124, 0.12);
  background: rgba(255, 255, 255, 0.9);
}

.legal-modal.active,
.variable-modal {
  border-color: rgba(215, 225, 236, 0.86);
  border-radius: var(--radius-md);
  box-shadow: 0 28px 74px rgba(6, 18, 38, 0.28);
}

.auth-shell.modal-open::before,
.modal-backdrop {
  background: rgba(8, 24, 46, 0.48);
  backdrop-filter: blur(5px);
}

.app-shell {
  grid-template-columns: minmax(270px, 320px) 1fr;
  min-height: calc(100vh - 82px);
}

.control-panel {
  top: 86px;
  max-height: calc(100vh - 122px);
  border-right: 1px solid rgba(215, 225, 236, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 250, 252, 0.96) 100%);
  box-shadow: 8px 0 28px rgba(8, 43, 82, 0.05);
}

.control-panel section + section {
  border-top-color: var(--line-soft);
}

.control-panel h2 {
  color: var(--accent-strong);
  font-size: 0.92rem;
  letter-spacing: 0;
}

.workspace {
  padding: 24px;
}

.tabs {
  position: sticky;
  top: 86px;
  z-index: 20;
  margin: -4px -4px 14px;
  padding: 6px;
  border: 1px solid rgba(215, 225, 236, 0.82);
  border-radius: var(--radius-md);
  background: rgba(247, 250, 252, 0.88);
  box-shadow: 0 8px 18px rgba(8, 43, 82, 0.06);
  backdrop-filter: blur(12px);
}

.tab {
  min-height: 34px;
  border-color: transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #45576b;
  font-size: 0.84rem;
}

.tab.active {
  border-color: rgba(23, 74, 124, 0.18);
  background: #ffffff;
  color: var(--accent-strong);
  box-shadow: 0 8px 18px rgba(8, 43, 82, 0.09);
}

.tab-note {
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(23, 74, 124, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(231, 241, 251, 0.62);
}

.tab-panel.active {
  gap: 20px;
}

.panel {
  padding: 18px;
  background: rgba(255, 255, 255, 0.96);
}

.panel-title {
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.panel-title h2 {
  color: var(--accent-strong);
  font-size: 0.98rem;
  letter-spacing: 0;
}

.metric-grid {
  gap: 16px;
}

.metric {
  grid-template-rows: 40px 1fr;
  min-height: 124px;
  background: #ffffff;
}

.metric-header {
  background: linear-gradient(135deg, var(--accent-strong) 0%, var(--accent) 100%);
}

.metric span {
  font-size: 0.66rem;
}

.metric strong {
  color: var(--accent-strong);
  font-size: 2.22rem;
}

.threshold-guide,
.modal-intro,
.resend-box,
.note-box,
.citation-box,
.variable-pill,
.modal-variable,
.flag-item {
  border-color: var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.threshold-guide {
  box-shadow: inset 3px 0 0 rgba(23, 74, 124, 0.14);
}

.variable-list,
.variable-modal-list,
.note-box,
.table-wrap,
.matrix,
.control-panel {
  scrollbar-color: rgba(23, 74, 124, 0.42) transparent;
  scrollbar-width: thin;
}

.overview-card,
.recommendation-card {
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
}

.overview-icon {
  background: rgba(23, 74, 124, 0.1);
  color: var(--accent-strong);
}

.bar-track {
  background: #e7edf4;
}

.bar-fill {
  background: linear-gradient(90deg, var(--accent) 0%, var(--teal) 100%);
}

.method-guide div,
.histogram-card,
.diagnostic-card,
.boxplot-card {
  background: #fbfdff;
}

.table-wrap {
  border-color: var(--line-soft);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(8, 43, 82, 0.03);
}

table {
  background: #ffffff;
}

th {
  background: #f3f7fb;
  color: var(--accent-strong);
}

tbody tr:hover td {
  background: #f7fbff;
}

tr.flagged td {
  background: #fff7ed;
}

.type-badge,
.status-badge {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.app-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(90deg, #082b52 0%, #0d3d6e 100%);
}

.empty-state,
.histogram-empty,
.diagnostic-empty,
.boxplot-empty,
.modal-empty {
  border-color: #cbd8e8;
  background: #fbfdff;
}

/* Sharp-corner preference */
:root {
  --radius-sm: 0;
  --radius-md: 0;
}

*,
*::before,
*::after {
  border-radius: 0 !important;
}

/* Match all button labels to main tab button size */
button,
.file-button {
  font-size: 0.84rem !important;
}

/* Match key-value status rows to main tab button size */
.flag-list,
.flag-item,
.flag-item span,
.flag-item strong {
  font-size: 0.84rem !important;
}

.flag-item {
  line-height: 1.35;
}

.flag-item strong {
  font-weight: 700;
}

/* Match screening/report notes to main tab button size */
.report-note,
.note-box,
.note-box *,
.structured-note-box,
.report-note-title,
.report-note-heading,
.report-note-bullet,
.report-note-bullet-marker,
.recommendation-note-box,
.note-list-block {
  font-size: 0.84rem !important;
}

.note-box {
  line-height: 1.55;
}

/* Match empty-state placeholders to main tab button size */
.empty-state,
.empty-state strong,
.empty-state span {
  font-size: 0.84rem !important;
  line-height: 1.4;
}

.empty-state {
  padding: 22px 34px;
}

.empty-state strong {
  font-weight: 700;
}

/* Match guide and decision-rule text to main tab button size */
.method-guide,
.method-guide div,
.method-guide strong,
.method-guide span,
.guide-list,
.guide-list li,
.guide-list strong,
.guide-list span,
.guide-sentence,
.method-note {
  font-size: 0.84rem !important;
}

.method-guide,
.guide-list,
.guide-sentence {
  line-height: 1.4;
}

.guide-list strong,
.method-guide strong {
  font-weight: 700;
}

/* Match tables and matrix outputs to main tab button size */
.table-wrap,
.table-wrap *,
table,
caption,
thead,
tbody,
tr,
th,
td,
.normality-table,
.normality-table *,
.matrix,
.matrix *,
.matrix-grid,
.matrix-cell {
  font-size: 0.84rem !important;
}

.table-wrap,
table,
th,
td,
.matrix,
.matrix-cell {
  line-height: 1.35;
}

/* Match recommendation cards to main tab button size */
.recommendation-card,
.recommendation-card h3,
.recommendation-list,
.recommendation-list li {
  font-size: 0.84rem !important;
}

.recommendation-card h3 {
  line-height: 1.35;
}

.recommendation-list {
  line-height: 1.4;
}

/* Match About page typography to main tab button size */
.about-hero,
.about-hero h2,
.about-hero p,
.about-kicker,
.about-section,
.about-section h2,
.about-section h3,
.about-section p,
.about-section ul,
.about-section li,
.about-version-card,
.about-version-card span,
.about-version-card strong,
.about-version-card p,
.citation-box {
  font-size: 0.84rem !important;
}

.about-hero,
.about-section,
.about-section p,
.about-section ul,
.citation-box {
  line-height: 1.45;
}

.about-version-card strong {
  line-height: 1.15;
}

/* Keep the sidebar flush under the sticky header */
.control-panel {
  top: 98px;
  max-height: calc(100vh - 132px);
}

/* Keep floating main tabs below the sticky header */
.tabs {
  top: 118px;
  z-index: 900;
  margin-top: 0;
}

@media (max-width: 980px) {
  .app-header {
    grid-template-columns: minmax(130px, 1fr) minmax(240px, 1.2fr);
    grid-template-areas:
      "brand title"
      "actions actions";
  }

  .brand-lockup {
    grid-area: brand;
  }

  .title-lockup {
    grid-area: title;
  }

  .header-actions {
    grid-area: actions;
    justify-content: center;
  }

  .app-shell,
  .split-layout {
    grid-template-columns: 1fr;
  }

  .control-panel {
    position: static;
    max-height: none;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

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

  .method-guide {
    grid-template-columns: 1fr;
  }

  .about-hero,
  .auth-hero,
  .auth-form-grid,
  .about-grid,
  .histogram-grid,
  .diagnostic-grid,
  .boxplot-grid,
  .recommendation-grid {
    grid-template-columns: 1fr;
  }

  .variable-modal-list {
    grid-template-columns: 1fr;
  }

  .tabs {
    top: 190px;
  }
}

@media (max-width: 820px) {
  .app-header {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "title"
      "actions";
    justify-items: center;
    row-gap: 12px;
    padding: 16px 18px;
  }

  .brand-lockup,
  .title-lockup,
  .header-actions {
    width: 100%;
  }

  .brand-lockup {
    justify-content: center;
  }

  .brand-logo {
    width: clamp(58px, 12vw, 84px);
  }

  .title-logo {
    width: min(76vw, 380px);
  }

  .title-lockup .eyebrow {
    font-size: clamp(7.5pt, 2.2vw, 9pt);
  }

  .private-auth-actions,
  .public-auth-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(112px, max-content));
    justify-content: center;
    gap: 8px;
    width: 100%;
  }

  .private-auth-actions > *,
  .public-auth-actions > * {
    min-width: 112px;
  }

  .tabs {
    top: 245px;
  }
}

@media (max-width: 640px) {
  .app-header {
    align-items: flex-start;
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .brand-lockup {
    align-items: center;
    flex-direction: column;
    gap: 10px;
  }

  .brand-logo {
    width: clamp(56px, 18vw, 76px);
  }

  .title-lockup {
    position: static;
    transform: none;
    width: 100%;
    text-align: center;
  }

  .header-actions {
    width: 100%;
  }

  .brand-lockup,
  .header-actions {
    flex: none;
  }

  .private-auth-actions,
  .public-auth-actions {
    max-width: none;
  }

  .header-actions > * {
    flex: 1;
  }

  .public-auth-actions,
  .private-auth-actions {
    width: 100%;
    justify-content: stretch;
  }

  .public-auth-actions > *,
  .private-auth-actions > * {
    flex: 1 1 auto;
  }

  .workspace,
  .control-panel,
  .auth-shell {
    padding: 14px;
  }

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

  .overview-assessment-grid {
    grid-template-columns: 1fr;
  }

  .about-version-card {
    padding: 14px;
  }

  .bar-row {
    grid-template-columns: 1fr;
  }

  .modal-backdrop {
    align-items: stretch;
    padding: 12px;
  }

  .variable-modal {
    max-height: calc(100vh - 24px);
  }

  .modal-head,
  .modal-tools {
    align-items: stretch;
    flex-direction: column;
  }

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

  .modal-actions {
    width: 100%;
  }

  .modal-actions > *,
  .modal-footer .primary-button {
    width: 100%;
    min-width: 0;
    flex: 1;
  }

  .tabs {
    top: 274px;
  }
}
