@charset "UTF-8";

:root {
  --bg: #eef4fb;
  --surface: #ffffff;
  --surface-2: #f4f8fc;
  --surface-3: #e4eef7;
  --ink: #14324a;
  --ink-2: #3d5a70;
  --muted: #6b8499;
  --line: #d7e4f0;
  --line-strong: #b7c9db;
  --kimchi: #d8462e;
  --kimchi-dark: #a92f20;
  --kimchi-soft: #fff0eb;
  --action: #c83b27;
  --action-hover: #a92f20;
  --green: #0d8a6a;
  --green-soft: #e3f6f0;
  --mustard: #9a6517;
  --mustard-soft: #fff4dc;
  --science: #0a6ebd;
  --science-strong: #085691;
  --science-soft: #e5f1fb;
  --signal: #8ea91b;
  --signal-soft: #f2f7d9;
  --sidebar: #111827;
  --sidebar-2: #1a2332;
  --sidebar-ink: #e8eef7;
  --sidebar-ink-2: #b7c4d6;
  --sidebar-muted: #8b9bb0;
  --sidebar-line: rgba(148, 163, 184, 0.14);
  --sidebar-hover: rgba(56, 168, 255, 0.08);
  --sidebar-active: rgba(56, 168, 255, 0.16);
  --sidebar-status: #1c2a3d;
  --login-story: rgba(239, 247, 248, .82);
  --login-panel: #ffffff;
  --login-ink: #132126;
  --login-muted: #587077;
  --login-line: #d5dee2;
  --login-input: #f7fafb;
  --login-control: #eef3f5;
  --login-stat: rgba(255, 255, 255, .82);
  --login-screen-overlay: rgba(235, 244, 246, .1);
  --shadow-sm: 0 1px 2px rgba(16, 56, 96, .06);
  --shadow-md: 0 10px 28px rgba(16, 56, 96, .12);
  --sidebar-width: 252px;
  --radius: 8px;
  --font-family-base: "KoddiUDOnGothic", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", Arial, sans-serif;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-md: 13px;
  --text-body-sm: 14px;
  --text-base: 15px;
}

:root[data-theme="dark"] {
  --bg: #0b1524;
  --surface: #132338;
  --surface-2: #152a42;
  --surface-3: #1a3350;
  --ink: #e8f1fa;
  --ink-2: #b4c7da;
  --muted: #8299b0;
  --line: rgba(120, 170, 220, 0.14);
  --line-strong: rgba(120, 170, 220, 0.28);
  --kimchi: #ff7158;
  --kimchi-dark: #ff8d78;
  --kimchi-soft: #3d2421;
  --action: #c63d29;
  --action-hover: #a92f20;
  --green: #4ec9a8;
  --green-soft: #173931;
  --mustard: #e0b762;
  --mustard-soft: #3b311e;
  --science: #38a8ff;
  --science-strong: #7cc4ff;
  --science-soft: rgba(56, 168, 255, 0.16);
  --signal: #bfd852;
  --signal-soft: #30391b;
  --sidebar: #102033;
  --sidebar-2: #152a42;
  --sidebar-ink: #e8f1fa;
  --sidebar-ink-2: #b4c7da;
  --sidebar-muted: #8299b0;
  --sidebar-line: rgba(120, 170, 220, 0.14);
  --sidebar-hover: rgba(56, 168, 255, 0.08);
  --sidebar-active: rgba(56, 168, 255, 0.18);
  --sidebar-status: #14304a;
  --login-story: rgba(7, 18, 23, .72);
  --login-panel: #2a2e35;
  --login-ink: #eef6f7;
  --login-muted: #91aab0;
  --login-line: #3a414b;
  --login-input: #1a1d23;
  --login-control: #22262e;
  --login-stat: rgba(8, 23, 29, .78);
  --login-screen-overlay: rgba(26, 29, 35, .82);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .2);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, .32);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
  font-synthesis: none;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

html,
body,
button,
input,
select,
textarea,
table {
  font-family: var(--font-family-base);
}

button,
input,
select,
textarea,
table {
  color: inherit;
  font: inherit;
}

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

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--kimchi) 78%, transparent);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 300;
  padding: 9px 13px;
  color: #fff;
  background: var(--science-strong);
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .15s ease;
}

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

.eyebrow {
  margin: 0 0 10px;
  color: var(--science);
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: .08em;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease;
}

.button:hover {
  transform: none;
}

.button:disabled {
  cursor: not-allowed;
  opacity: .55;
  transform: none;
}

.button[aria-busy="true"]::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: busy-spin .7s linear infinite;
}

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

.button.primary {
  color: #fff;
  background: var(--action);
  box-shadow: none;
}

.button.primary:hover {
  background: var(--action-hover);
}

.button.secondary {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

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

.icon-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 18px;
}

/* Boot */

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  background: var(--surface);
}

.boot-logo {
  width: min(320px, 72vw);
  height: 58px;
}

.boot-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.boot-logo .ci-dark {
  display: none;
}

:root[data-theme="dark"] .boot-logo .ci-light {
  display: none;
}

:root[data-theme="dark"] .boot-logo .ci-dark {
  display: block;
}

.boot-progress {
  width: 150px;
  height: 3px;
  overflow: hidden;
  background: var(--surface-3);
  border-radius: 2px;
}

.boot-progress i {
  display: block;
  width: 42%;
  height: 100%;
  background: var(--kimchi);
  border-radius: inherit;
  animation: boot 1.15s ease-in-out infinite;
}

.boot-screen p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-base);
}

@keyframes boot {
  from { transform: translateX(-120%); }
  to { transform: translateX(340%); }
}

/* Login */

.login-screen {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4vh, 48px) 16px;
  color: var(--login-ink);
  background: #f5f6f8;
  overflow: hidden;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.login-screen.is-exiting {
  opacity: 0;
}

.login-screen[hidden] {
  display: none !important;
}

.login-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.login-bg-photo {
  position: absolute;
  inset: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  object-fit: cover;
  /* 연구소 사진을 약 10%만 흐리게 (기존 9px 대비) */
  filter: blur(1px);
  transform: scale(1.01);
}

.login-bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(245, 246, 248, 0.55);
}

:root[data-theme="dark"] .login-screen {
  background: #1a1d23;
}

:root[data-theme="dark"] .login-bg-overlay {
  background: rgba(26, 29, 35, 0.55);
}

.login-toolbar {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  max-width: calc(100% - 28px);
}

.login-theme-toggle,
.login-contrast-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--login-muted);
  background: color-mix(in srgb, var(--login-panel) 82%, transparent);
  border: 1px solid color-mix(in srgb, var(--login-line) 85%, transparent);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.login-theme-toggle:hover,
.login-contrast-toggle:hover {
  color: var(--login-ink);
  background: color-mix(in srgb, var(--login-ink) 8%, transparent);
}

.login-theme-toggle:focus-visible,
.login-contrast-toggle:focus-visible {
  outline: 2px solid var(--kimchi);
  outline-offset: 2px;
}

.login-contrast-toggle {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.login-contrast-toggle[aria-pressed="true"] {
  color: var(--login-ink);
  border-color: var(--science, #0a6ebd);
  box-shadow: inset 0 0 0 1px var(--science, #0a6ebd);
}

.login-toolbar .login-accent-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 4px 6px;
  background: color-mix(in srgb, var(--login-panel) 82%, transparent);
  border: 1px solid color-mix(in srgb, var(--login-line) 85%, transparent);
  border-radius: 999px;
}

.login-toolbar .accent-swatch {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  max-width: 22px;
  flex: 0 0 22px;
}

/* light = sun, dark = moon; stacked so swap never shifts layout */
.theme-toggle-icons {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.theme-toggle-icons .icon-sun,
.theme-toggle-icons .icon-moon {
  position: absolute;
  inset: 0;
  margin: auto;
  display: block;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.theme-toggle-icons .icon-sun { opacity: 1; }

:root[data-theme="dark"] .theme-toggle-icons .icon-sun { opacity: 0; }
:root[data-theme="dark"] .theme-toggle-icons .icon-moon { opacity: 1; }

.theme-toggle-button .theme-toggle-icons {
  pointer-events: none;
}

.login-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
}

.login-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-brand-pair {
  /* Fixed box — both theme logos occupy the same cell (dark-mode reference size). */
  position: relative;
  display: grid;
  grid-template: 1fr / 1fr;
  place-items: stretch;
  width: min(220px, 56vw);
  aspect-ratio: 880 / 128;
  margin: 0 auto 16px;
  flex-shrink: 0;
  overflow: hidden;
}

.login-brand-pair .wikim-ci {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: fill;
  object-position: center;
  display: block;
  transition: opacity 0.15s ease;
}

.login-brand-pair .ci-light {
  opacity: 1;
}

.login-brand-pair .ci-dark {
  opacity: 0;
  pointer-events: none;
}

:root[data-theme="dark"] .login-brand-pair .ci-light {
  opacity: 0;
  pointer-events: none;
}

:root[data-theme="dark"] .login-brand-pair .ci-dark {
  opacity: 1;
  pointer-events: auto;
}

:root[data-theme="dark"] .boot-logo .ci-light { display: none; }
:root[data-theme="dark"] .boot-logo .ci-dark { display: block; }
.sidebar-brand .ci-light { display: none !important; }
.sidebar-brand .ci-dark { display: block !important; }

.login-system-title {
  margin: 0;
  max-width: 100%;
  color: var(--login-ink);
  font-size: clamp(17px, 2.6vw, 22px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  white-space: nowrap;
}

.login-slogan {
  margin: 10px 0 0;
  color: var(--science-strong);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

:root[data-theme="dark"] .login-slogan { color: #8ed4c8; }

.login-card {
  width: 100%;
  margin: 0 auto;
  padding: 28px 26px 24px;
  color: var(--login-ink);
  background: var(--login-panel);
  border: 1px solid var(--login-line);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(16, 26, 29, 0.06);
  transition: box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.login-card:hover {
  box-shadow: 0 16px 36px rgba(16, 26, 29, 0.14);
}

:root[data-theme="dark"] .login-card {
  --login-panel: #2a2e35;
  background: #2a2e35;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .login-card:hover {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
}

.login-card-head h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.login-helper {
  margin: 6px 0 0;
  color: var(--login-muted);
  font-size: 14px;
  line-height: 1.5;
}

/* Form fields — stacked label + control (login and modals) */
.field {
  display: grid;
  gap: 7px;
  width: 100%;
  margin: 0;
}

.field > span:first-child {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.password-field {
  position: relative;
  display: block;
  width: 100%;
}

.password-field input {
  width: 100%;
  padding-right: 48px;
}

.password-field .password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  color: var(--login-muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.password-field .password-toggle:hover {
  color: var(--login-ink);
  background: color-mix(in srgb, var(--login-control) 80%, transparent);
}

.password-field .password-toggle:focus-visible {
  outline: 2px solid var(--science);
  outline-offset: 1px;
}

.password-toggle-icons {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
}

.password-toggle-icons .icon-eye,
.password-toggle-icons .icon-eye-off {
  position: absolute;
  inset: 0;
  margin: auto;
  display: block;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.password-toggle-icons .icon-eye { opacity: 1; }

.password-toggle[aria-pressed="true"] .password-toggle-icons .icon-eye { opacity: 0; }
.password-toggle[aria-pressed="true"] .password-toggle-icons .icon-eye-off { opacity: 1; }

.form-error {
  margin: 10px 0 0;
  padding: 10px 12px;
  color: #b42318;
  background: #fef3f2;
  border: 1px solid #fecdca;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}

.form-error[hidden] {
  display: none !important;
}

:root[data-theme="dark"] .form-error {
  color: #fda29b;
  background: #3d1f1c;
  border-color: #7a2e26;
}

.login-card .field { margin-top: 16px; }
.login-card .field > span:first-child { color: var(--login-ink); }

.login-card .field input {
  box-sizing: border-box;
  height: 44px;
  min-height: 44px;
  line-height: 1.25;
  color: var(--login-ink);
  background: var(--login-input);
  border: 1px solid var(--login-line);
  border-radius: 10px;
  /* 테마 전환 시 네이티브 컨트롤 메트릭 고정 */
  color-scheme: light;
  appearance: none;
  -webkit-appearance: none;
}

.login-card .field input::placeholder { color: var(--login-muted); }

.login-card .field input:focus,
.login-card .field input:focus-visible {
  border-color: var(--science);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--science) 14%, transparent);
  outline: none;
}

.login-card .field input[aria-invalid="true"] {
  border-color: var(--kimchi);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kimchi) 12%, transparent);
}

.login-card .password-field .password-toggle {
  color: var(--login-muted);
}

.login-screen .login-shell {
  width: min(100%, 440px);
}

.login-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 8px 18px;
  margin: 14px 0 8px;
  color: var(--login-muted);
  font-size: 13px;
}

.login-session-banner {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, #b45309 35%, var(--login-line));
  background: color-mix(in srgb, #f59e0b 16%, var(--login-panel));
  color: var(--login-ink);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
}

.login-caps-warning {
  margin: 6px 0 0;
  color: #b45309;
  font-size: 12px;
  line-height: 1.4;
}

.login-help,
.login-last-visit,
.login-a11y-note {
  margin: 12px 0 0;
  color: var(--login-muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.login-last-visit {
  margin-top: 6px;
}

.login-remember {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}

.login-remember input[type="checkbox"] {
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--science);
}

:root[data-contrast="high"] {
  --login-ink: #000000;
  --login-muted: #1f2937;
  --login-line: #111827;
  --login-input: #ffffff;
  --login-panel: #ffffff;
  --ink: #000000;
  --ink-2: #111827;
  --line: #111827;
}

:root[data-contrast="high"] .login-card,
:root[data-contrast="high"] .login-theme-toggle,
:root[data-contrast="high"] .login-contrast-toggle,
:root[data-contrast="high"] .login-toolbar .login-accent-swatches {
  border-width: 2px;
}

:root[data-contrast="high"] .login-session-banner {
  border-width: 2px;
  background: #fff7ed;
}

:root[data-contrast="high"] .form-error {
  font-weight: 700;
}

:root[data-contrast="high"] .login-card .field input:focus-visible,
:root[data-contrast="high"] .login-theme-toggle:focus-visible,
:root[data-contrast="high"] .login-contrast-toggle:focus-visible,
:root[data-contrast="high"] .accent-swatch:focus-visible {
  outline-width: 3px;
  outline-offset: 3px;
}

.login-submit {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 48px;
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: none;
  transition: opacity 0.2s ease;
}

.login-submit:hover {
  box-shadow: none;
  transform: none;
}

.login-submit-label {
  transition: opacity 0.2s ease;
}

.login-submit-spinner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.2s ease, transform 0.2s ease;
  animation: login-spin 0.7s linear infinite;
  animation-play-state: paused;
}

.login-submit[aria-busy="true"] .login-submit-label {
  opacity: 0;
}

.login-submit[aria-busy="true"] .login-submit-spinner {
  opacity: 1;
  transform: scale(1);
  animation-play-state: running;
}

.login-submit[disabled],
.login-submit[aria-busy="true"] {
  opacity: 0.92;
  cursor: wait;
  box-shadow: none;
}

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

.login-legal {
  text-align: center;
  color: var(--login-muted);
  font-size: 12px;
  line-height: 1.55;
  margin-top: 4px;
}

.login-legal p { margin: 0; }

@media (max-height: 820px) {
  .login-shell { gap: 14px; }
  .login-brand-pair { margin-bottom: 10px; }
}

@media (max-width: 520px) {
  .login-screen {
    justify-content: center;
    padding: 72px 14px 24px;
  }
  .login-toolbar {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
    justify-content: center;
  }
  .login-brand-pair {
    width: min(200px, 78vw);
  }
  .login-system-title {
    font-size: 15px;
  }
  .login-card { padding: 22px 18px 20px; }
}

/* Application frame */

.app-shell {
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 24px 16px 18px;
  color: var(--sidebar-ink);
  background: var(--sidebar);
  border-right: 1px solid var(--sidebar-line);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 0 6px 20px;
  text-align: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--sidebar-line);
}

.sidebar-brand img {
  width: 90%;
  max-width: 90%;
  height: auto;
  max-height: 36px;
  display: block;
  object-fit: contain;
  object-position: left center;
  margin-inline: 0;
}

.season-card {
  position: relative;
  padding: 15px 14px;
  margin: 18px 0 16px;
  color: var(--sidebar-ink);
  background: var(--sidebar-2);
  border: 1px solid var(--sidebar-line);
  border-left: 3px solid var(--science);
  border-radius: 4px;
  text-align: center;
}

.season-card::after {
  display: none;
}

.season-card strong {
  position: relative;
  z-index: 1;
  display: block;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0;
}

.season-card-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.season-card-title > span {
  display: block;
}

.main-nav > p {
  padding: 0 12px;
  margin: 0 0 8px;
  color: var(--sidebar-muted);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .08em;
}

.nav-item {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  margin-bottom: 4px;
  color: var(--sidebar-ink-2);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 5px;
}

.nav-item i {
  color: var(--sidebar-muted);
  font-size: var(--text-sm);
  font-style: normal;
  font-weight: 700;
}

.nav-item span {
  font-size: var(--text-base);
  font-weight: 700;
}

.nav-item em {
  min-width: 24px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  color: var(--sidebar-muted);
  background: var(--sidebar-2);
  border-radius: 4px;
  font-size: var(--text-sm);
  font-style: normal;
}

.nav-item:hover {
  color: var(--sidebar-ink);
  background: var(--sidebar-hover);
}

.nav-item.active {
  color: var(--sidebar-ink);
  background: var(--sidebar-active);
  box-shadow: inset 3px 0 0 var(--science);
}

.nav-item.active i,
.nav-item.active em {
  color: var(--sidebar-ink);
}

.sidebar-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 12px;
  margin-top: auto;
  background: var(--sidebar-status);
  border: 1px solid color-mix(in srgb, var(--green) 22%, var(--sidebar-line));
  border-radius: 5px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border: 3px solid color-mix(in srgb, var(--green) 18%, transparent);
  border-radius: 50%;
  box-sizing: content-box;
}

.sidebar-note strong,
.sidebar-note small {
  display: block;
}

.sidebar-note strong {
  color: var(--science-strong);
  font-size: var(--text-md);
}

.sidebar-note small {
  margin-top: 2px;
  color: var(--sidebar-muted);
  font-size: var(--text-xs);
}

.sidebar-copyright {
  margin: 16px 12px 0;
  color: var(--sidebar-muted);
  font-size: var(--text-xs);
}

.workspace {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  background: var(--bg);
}

.topbar {
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 4vw, 56px);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-title p,
.topbar-title h2 {
  margin: 0;
}

.topbar-title p {
  color: var(--science);
  font-size: var(--text-sm);
  font-weight: 700;
}

.topbar-title h2 {
  margin-top: 0;
  font-size: 16px;
  letter-spacing: 0;
}

.mobile-menu-button {
  display: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.reference-date {
  padding-right: 14px;
  margin-right: 3px;
  color: var(--muted);
  border-right: 1px solid var(--line);
  font-size: var(--text-sm);
}

.reference-date strong {
  margin-left: 5px;
  color: var(--ink-2);
}

.menu-wrap {
  position: relative;
}

.profile-button {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 8px 4px 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--science-strong);
  border-radius: 5px;
  font-size: var(--text-body-sm);
  font-weight: 700;
}

.profile-button > span:nth-child(2) {
  min-width: 74px;
  text-align: left;
}

.profile-button strong,
.profile-button small {
  display: block;
}

.profile-button strong {
  font-size: var(--text-md);
}

.profile-button small {
  margin-top: 1px;
  color: var(--muted);
  font-size: var(--text-xs);
}

.profile-button i {
  color: var(--muted);
  font-style: normal;
}

.popup-menu {
  min-width: 176px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 70;
  padding: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-md);
}

.popup-menu button:not(.accent-swatch) {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  color: var(--ink-2);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: var(--text-md);
}

.popup-menu button:not(.accent-swatch):hover,
.popup-menu button:not(.accent-swatch).active {
  color: var(--kimchi);
  background: var(--kimchi-soft);
}

.profile-menu > div {
  padding: 8px 9px 11px;
  margin-bottom: 5px;
  border-bottom: 1px solid var(--line);
}

.profile-menu strong,
.profile-menu span {
  display: block;
}

.profile-menu strong {
  font-size: var(--text-body-sm);
}

.profile-menu span {
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--text-xs);
}

.appearance-menu {
  width: min(360px, calc(100vw - 24px));
  min-width: 300px;
  max-height: min(72vh, 640px);
  overflow: auto;
  padding: 12px;
}

.appearance-menu-section + .appearance-menu-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.appearance-menu-section h3 {
  margin: 0 0 10px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
}

.appearance-menu .appearance-choice-grid {
  gap: 8px;
}

.appearance-menu .settings-choice {
  min-height: 48px;
  padding: 10px 12px;
  gap: 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}

.appearance-menu .settings-choice-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.appearance-menu .settings-accent i {
  width: 16px;
  height: 16px;
}

.page-status {
  position: fixed;
  left: calc(var(--sidebar-width) + 50%);
  top: 90px;
  z-index: 60;
  min-width: min(420px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-md);
  font-size: var(--text-md);
  transform: translateX(-50%);
}

.status-indicator {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.page-status[data-type="loading"] .status-indicator {
  border: 2px solid var(--line-strong);
  border-right-color: var(--science);
  animation: busy-spin .7s linear infinite;
}

.page-status[data-type="error"] {
  color: var(--kimchi-dark);
  background: var(--kimchi-soft);
}

.page-status[data-type="error"] .status-indicator {
  color: #fff;
  background: var(--kimchi);
}

.page-status[data-type="error"] .status-indicator::before {
  content: "!";
  font-size: 11px;
  font-weight: 700;
}

.page-status[data-type="warning"] {
  color: var(--mustard);
  background: var(--mustard-soft);
}

.page-status[data-type="warning"] .status-indicator {
  border: 2px solid var(--mustard);
}

.page-status button {
  min-height: 32px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-size: var(--text-sm);
  font-weight: 700;
}

.page {
  min-height: calc(100vh - 64px);
  padding: 22px clamp(20px, 2.4vw, 28px) 40px;
  animation: page-in .28s ease both;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

/* Overview */

.hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.hero-row h1 {
  margin: 0;
  font-size: clamp(30px, 3.3vw, 46px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: 0;
}

.hero-row h1 span {
  color: var(--science);
}

.hero-row > div > p:last-child {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: var(--text-base);
}

.hero-action {
  min-width: 144px;
}

.source-ribbon {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 13px 17px;
  margin: 34px 0 15px;
  color: var(--science);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--science);
  border-radius: 5px;
}

.source-ribbon > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.source-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--science);
  border-radius: 4px;
  font-size: var(--text-md);
}

.source-ribbon strong {
  font-size: var(--text-md);
}

.source-ribbon p {
  margin: 0;
  color: var(--ink-2);
  font-size: var(--text-md);
}

.source-ribbon > span {
  padding: 4px 7px;
  background: var(--science-soft);
  border-radius: 4px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .07em;
}

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

.metric-card {
  min-height: 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg, 12px);
  box-shadow: none;
}

.metric-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.metric-card > div span {
  color: var(--ink-2);
  font-size: var(--text-body-sm);
  font-weight: 700;
}

.metric-card > div i {
  color: var(--muted);
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: 700;
  letter-spacing: .1em;
}

.metric-card > strong {
  display: block;
  margin: 20px 0 7px;
  font-family: var(--font-family-base);
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
}

.metric-card > strong small {
  margin-left: 4px;
  color: var(--muted);
  font-family: var(--font-family-base);
  font-size: var(--text-md);
  font-weight: 700;
}

.metric-card > p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.metric-card.accent {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

.metric-card.accent > div span,
.metric-card.accent > div i,
.metric-card.accent > strong small,
.metric-card.accent > p {
  color: var(--muted);
}

.metric-card.quiet {
  background: var(--surface-2);
}

/* GKA ambassador activity dashboard */

.gka-activity-dashboard {
  display: grid;
  gap: 16px;
}

.gka-dash-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 2px 2px;
}

.gka-dash-greeting {
  margin: 0 0 4px;
  color: var(--ink-2);
  font-size: var(--text-md);
  font-weight: 700;
}

.gka-dash-hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(22px, 1.1rem + 0.4vw, 26px);
  letter-spacing: 0;
  line-height: 1.25;
  font-weight: 700;
}

.gka-dash-program {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 700;
}

.gka-dash-hero-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  color: var(--muted);
  font-size: var(--text-sm);
  white-space: nowrap;
}

.gka-dash-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.gka-dash-metric {
  position: relative;
  min-height: 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.gka-dash-metric::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(120px 80px at 100% 0%, rgba(10, 110, 189, 0.06), transparent 70%);
  pointer-events: none;
}

.gka-dash-metric-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.gka-dash-metric-label {
  display: block;
  color: var(--ink-2);
  font-size: var(--text-sm);
  font-weight: 700;
}

.gka-dash-metric-en {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.gka-dash-metric-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 12px;
  color: var(--science, #0a6ebd);
  background: linear-gradient(180deg, #edf6ff, #e3f0fb);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  font-style: normal;
}

.gka-dash-metric-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.gka-dash-metric.tone-science .gka-dash-metric-icon {
  color: var(--science, #0a6ebd);
  background: linear-gradient(180deg, #edf6ff, #e3f0fb);
}
.gka-dash-metric.tone-teal .gka-dash-metric-icon {
  color: #0d8a6a;
  background: linear-gradient(180deg, #eaf8f3, #dff3eb);
}
.gka-dash-metric.tone-indigo .gka-dash-metric-icon {
  color: #2f6f8f;
  background: linear-gradient(180deg, #e8f1f6, #dceaf1);
}
.gka-dash-metric.tone-green .gka-dash-metric-icon {
  color: var(--green, #2f9e5d);
  background: linear-gradient(180deg, #eaf8f0, #dff3e6);
}
.gka-dash-metric.tone-mustard .gka-dash-metric-icon {
  color: #c47a06;
  background: linear-gradient(180deg, #fff7e8, #ffefd2);
}
.gka-dash-metric.tone-kimchi .gka-dash-metric-icon {
  color: var(--action, #e45c2b);
  background: linear-gradient(180deg, #fff1ec, #ffe4db);
}
.gka-dash-metric.tone-sky .gka-dash-metric-icon {
  color: #0284c7;
  background: linear-gradient(180deg, #e7f3fb, #d9ecf8);
}
.gka-dash-metric.tone-navy .gka-dash-metric-icon {
  color: #294a73;
  background: linear-gradient(180deg, #e8eef5, #dce5f0);
}

:root[data-theme="dark"] .gka-dash-metric.tone-science .gka-dash-metric-icon,
:root[data-theme="dark"] .gka-dash-metric.tone-sky .gka-dash-metric-icon {
  background: #1a2c38;
  box-shadow: none;
}
:root[data-theme="dark"] .gka-dash-metric.tone-teal .gka-dash-metric-icon,
:root[data-theme="dark"] .gka-dash-metric.tone-green .gka-dash-metric-icon {
  background: #1a322c;
  box-shadow: none;
}
:root[data-theme="dark"] .gka-dash-metric.tone-indigo .gka-dash-metric-icon {
  background: #1a2d36;
  box-shadow: none;
}
:root[data-theme="dark"] .gka-dash-metric.tone-mustard .gka-dash-metric-icon {
  background: #32280f;
  box-shadow: none;
}
:root[data-theme="dark"] .gka-dash-metric.tone-kimchi .gka-dash-metric-icon {
  background: #3a2218;
  box-shadow: none;
}
:root[data-theme="dark"] .gka-dash-metric.tone-navy .gka-dash-metric-icon {
  background: #1c2834;
  box-shadow: none;
}

.gka-dash-metric-value {
  display: block;
  margin-top: 18px;
  color: var(--ink);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.gka-dash-metric-value small {
  margin-left: 3px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.gka-dash-metric-empty {
  color: var(--muted);
  font-size: 22px;
  font-weight: 700;
}

.gka-dash-metric-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.gka-dash-panels {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr 1.1fr;
  gap: 14px;
}

.gka-completion-panel {
  margin: 0;
  min-height: 0 !important;
}

.gka-completion-label {
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.gka-completion-track {
  height: 12px;
  overflow: hidden;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.gka-completion-track > i {
  display: block;
  height: 100%;
  width: 0;
  background: color-mix(in srgb, var(--green, #2f9e5d) 80%, var(--science));
  border-radius: inherit;
  transition: width 280ms ease;
}

.gka-completion-note {
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.45;
}

.gka-dash-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.9fr);
  gap: 14px;
  margin-bottom: 14px;
}

.gka-rank-stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.gka-rank-table {
  max-height: 240px;
  overflow: auto;
}

.gka-map-panel {
  min-height: 0;
}

.gka-world-map {
  position: relative;
  min-height: 280px;
  aspect-ratio: 1200 / 620;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    radial-gradient(ellipse at 50% 42%, color-mix(in srgb, var(--science) 10%, transparent), transparent 55%),
    color-mix(in srgb, var(--surface-2) 90%, var(--science));
  overflow: hidden;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

:root[data-theme="dark"] .gka-world-map {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.gka-world-map > img,
.gka-world-map > .gka-map-base {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

:root[data-theme="dark"] .gka-world-map > .gka-map-base {
  filter: brightness(0.62) saturate(0.9) contrast(1.05);
}

.gka-map-pins {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.gka-map-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  padding: 0 7px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: var(--kimchi);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  box-shadow: 0 2px 8px rgba(20, 25, 35, 0.22);
  cursor: pointer;
  pointer-events: auto;
  z-index: 2;
}

.gka-map-marker-count {
  display: block;
}

.gka-map-marker-label {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.gka-map-marker:hover .gka-map-marker-label,
.gka-map-marker:focus-visible .gka-map-marker-label,
.gka-map-marker.is-focus .gka-map-marker-label {
  opacity: 1;
}

.gka-map-marker[data-count="1"] {
  min-width: 14px;
  min-height: 14px;
  padding: 0;
}

.gka-map-marker[data-count="1"] .gka-map-marker-count {
  font-size: 0;
}

.gka-map-marker.is-focus {
  min-width: 32px;
  min-height: 32px;
  background: var(--kimchi);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--kimchi) 22%, transparent), 0 2px 10px rgba(20, 25, 35, 0.24);
  z-index: 3;
}

.gka-map-marker:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--kimchi) 45%, transparent);
  outline-offset: 2px;
}

.gka-map-tooltip {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 4;
  max-width: min(320px, 82%);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 4px 14px rgba(16, 26, 29, 0.08);
}

.gka-map-focus {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin: 0 16px 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--science-soft, #e8f3fc) 70%, var(--surface));
}

.gka-map-focus[hidden] {
  display: none !important;
}

.gka-map-focus-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.gka-map-focus-main span {
  color: var(--ink-2, var(--muted));
  font-size: 12px;
}

.gka-map-focus-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.gka-map-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 24px;
  text-align: center;
}

.gka-map-marker.is-korea:not(.is-focus) {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--science) 28%, transparent), 0 2px 8px rgba(20, 25, 35, 0.22);
}

.gka-rank-data tr.is-focus-row,
.gka-rank-data tr[data-gka-map-country]:hover {
  background: color-mix(in srgb, var(--science-soft, #e8f3fc) 55%, transparent);
  cursor: pointer;
}

.gka-dash-panel > .gka-world-map {
  position: relative;
  margin: 0;
  padding: 0 16px 8px;
  min-height: 280px;
  aspect-ratio: 1200 / 620;
  flex: 1 1 auto;
}

.gka-dash-panel > .gka-map-focus {
  margin-top: 0;
}

.gka-dash-panel > .chart-footnote {
  padding: 0 16px 14px;
}

.pims-line-chart {
  min-height: 220px;
  padding: 8px 4px 0;
}

.pims-line-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.pims-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  font-size: 12px;
}

.pims-chart-legend i {
  display: inline-block;
  width: 14px;
  height: 3px;
  margin-right: 6px;
  vertical-align: middle;
  border-radius: 2px;
}

.pims-chart-legend i.ref { background: var(--science); }
.pims-chart-legend i.cand { background: var(--kimchi); }

.pims-ops-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 14px 0;
}

.pims-overview-rss {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 13px;
}

.pims-overview-rss strong {
  color: var(--ink);
}

.pims-overview-queue {
  max-height: 280px;
  overflow: auto;
}

@media (max-width: 1100px) {
  .gka-dash-main-grid,
  .pims-ops-grid {
    grid-template-columns: 1fr;
  }
}


.gka-dash-panel {
  min-width: 0;
  min-height: 0;
  padding: 18px 18px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.gka-dash-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.gka-dash-panel > header h3 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 18px;
  letter-spacing: 0;
}

.gka-region-bars,
.gka-status-grid,
.gka-upcoming-list {
  display: grid;
  gap: 10px;
}

.gka-region-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
}

.gka-region-label {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
}

.gka-region-track {
  height: 10px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
}

.gka-region-track > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--science), color-mix(in srgb, var(--science) 55%, #38bdf8));
  border-radius: inherit;
}

.gka-region-count {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.gka-status-grid {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.gka-status-cell {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-height: 88px;
  padding: 14px 12px;
  background: var(--surface-2);
  border-radius: 10px;
}

.gka-status-dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--science);
  flex: 0 0 auto;
}

.gka-status-cell.tone-green .gka-status-dot { background: var(--green, #2f9e5d); }
.gka-status-cell.tone-muted .gka-status-dot { background: #8a9aa0; }
.gka-status-cell.tone-mustard .gka-status-dot { background: var(--mustard); }

.gka-status-cell strong {
  display: block;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0;
}

.gka-status-cell span {
  display: block;
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
}

.gka-status-cell em {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.gka-status-cell small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.gka-upcoming-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  padding: 10px 8px;
  text-align: left;
  color: inherit;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  cursor: pointer;
}

.gka-upcoming-item:last-child {
  border-bottom: 0;
}

.gka-upcoming-item:hover,
.gka-upcoming-item:focus-visible {
  background: var(--surface-2);
}

.gka-upcoming-date {
  display: grid;
  place-content: center;
  gap: 2px;
  min-height: 54px;
  padding: 6px 4px;
  text-align: center;
  background: var(--science-soft);
  border-radius: 10px;
}

.gka-upcoming-date strong {
  color: var(--science-strong);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gka-upcoming-date em {
  color: var(--ink);
  font-size: 18px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
}

.gka-upcoming-item div {
  min-width: 0;
  display: grid;
  gap: 4px;
  align-content: center;
}

.gka-upcoming-item div strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.gka-upcoming-item div span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .gka-dash-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gka-dash-panels {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .gka-dash-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .gka-dash-hero-meta {
    align-items: flex-start;
  }

  .gka-dash-metrics {
    grid-template-columns: 1fr;
  }

  .gka-status-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr .9fr;
  gap: 14px;
  margin-top: 14px;
}

.panel {
  min-width: 0;
  min-height: 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg, 12px);
  box-shadow: none;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-header .eyebrow {
  margin-bottom: 4px;
  font-size: 12px;
}

.panel-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.data-badge,
.health-pill {
  padding: 5px 8px;
  border-radius: 6px;
  font-size: var(--text-xs);
  font-weight: 700;
}

.data-badge.planned {
  color: var(--mustard);
  background: var(--mustard-soft);
}

.health-pill {
  color: var(--green);
  background: var(--green-soft);
}

.text-button {
  padding: 4px;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: var(--text-sm);
}

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

.bar-chart {
  display: grid;
  gap: 15px;
}

.bar-item {
  display: grid;
  grid-template-columns: 58px 1fr 26px;
  align-items: center;
  gap: 10px;
}

.bar-item > span,
.bar-item > strong {
  font-size: var(--text-sm);
}

.bar-item > span {
  color: var(--ink-2);
}

.bar-item > strong {
  text-align: right;
}

.bar-track {
  height: 7px;
  overflow: hidden;
  background: var(--surface-2);
  border-radius: 4px;
}

.bar-track i {
  height: 100%;
  display: block;
  background: var(--kimchi);
  border-radius: inherit;
  transform-origin: left center;
  animation: grow .55s ease both;
}

.bar-item:nth-child(even) .bar-track i {
  background: var(--green);
}

@keyframes grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

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

.country-scope-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  margin: -4px 0 10px;
  color: var(--muted);
  background: var(--science-soft);
  border-left: 3px solid var(--science);
  border-radius: 4px;
  font-size: var(--text-xs);
}

.country-scope-note strong {
  flex: 0 0 auto;
  color: var(--science-strong);
  font-size: var(--text-md);
}

.country-scope-note span {
  text-align: right;
}

.country-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 6px;
}

.country-display {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  vertical-align: middle;
}

.country-flag,
.country-flag-fallback {
  width: 28px;
  height: 21px;
  display: block;
  flex: 0 0 auto;
  object-fit: cover;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(13, 32, 38, .08);
}

.country-display.large .country-flag,
.country-display.large .country-flag-fallback {
  width: 32px;
  height: 24px;
}

.country-flag-fallback {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: var(--text-xs);
}

.country-name {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-2);
  font-size: var(--text-md);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-count {
  color: var(--muted);
  font-size: var(--text-xs);
  white-space: nowrap;
}

.control-list {
  display: grid;
}

.control-list > div {
  display: grid;
  grid-template-columns: 1fr auto 18px;
  align-items: center;
  gap: 7px;
  min-height: 43px;
  border-bottom: 1px solid var(--line);
}

.control-list span,
.control-list strong {
  font-size: var(--text-sm);
}

.control-list span {
  color: var(--muted);
}

.control-list strong {
  color: var(--ink-2);
}

.control-list i {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 50%;
  font-size: var(--text-xs);
  font-style: normal;
}

.control-list .pending i {
  color: var(--mustard);
  background: var(--mustard-soft);
}

.control-panel > p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.7;
}

.operations-row {
  display: grid;
  grid-template-columns: 1.4fr .8fr;
  gap: 14px;
  margin-top: 14px;
}

.operations-row .panel {
  min-height: 290px;
}

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

.upcoming-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  text-align: left;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 6px;
}

.upcoming-item:hover {
  border-color: color-mix(in srgb, var(--kimchi) 25%, var(--line));
  background: color-mix(in srgb, var(--kimchi-soft) 42%, var(--surface));
}

.upcoming-date {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  align-content: center;
  color: var(--kimchi);
  background: var(--kimchi-soft);
  border-radius: 6px;
  line-height: 1;
}

.upcoming-date strong,
.upcoming-date span {
  display: block;
}

.upcoming-date strong {
  font-family: var(--font-family-base);
  font-size: 16px;
  font-weight: 700;
}

.upcoming-date span {
  margin-top: 3px;
  font-size: var(--text-xs);
  font-weight: 700;
}

.upcoming-item > div:nth-child(2) {
  min-width: 0;
}

.upcoming-item > div:nth-child(2) strong,
.upcoming-item > div:nth-child(2) span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upcoming-item > div:nth-child(2) strong {
  color: var(--ink);
  font-size: var(--text-sm);
}

.upcoming-item > div:nth-child(2) span {
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--text-xs);
}

.upcoming-item > i {
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
}

.attention-count {
  min-width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: var(--mustard);
  background: var(--mustard-soft);
  border-radius: 50%;
  font-family: var(--font-family-base);
  font-size: 14px;
}

.panel-description {
  margin: -8px 0 15px;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.attention-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.attention-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  color: var(--mustard);
  background: var(--mustard-soft);
  border: 0;
  border-radius: 8px;
  font-size: var(--text-sm);
  font-weight: 700;
}

.attention-chip::before {
  content: "!";
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  color: var(--surface);
  background: var(--mustard);
  border-radius: 50%;
  font-size: var(--text-xs);
}

.attention-action {
  width: 100%;
  min-height: 38px;
  margin-top: 17px;
  font-size: var(--text-sm);
}

/* Lists */

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 0;
}

.page-heading .eyebrow {
  margin-bottom: 4px;
}

.page-heading h1 {
  margin: 0;
  font-size: clamp(22px, 1.2rem + 0.55vw, 28px);
  letter-spacing: 0;
  line-height: 1.25;
  font-weight: 700;
}

.page-heading > div > p:last-child {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  max-width: 72ch;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) repeat(3, minmax(120px, 160px)) auto;
  gap: 8px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.filter-bar:has(#ambassadorStatus) {
  grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(112px, 150px)) auto;
}

.filter-bar input,
.filter-bar select {
  height: 40px;
  background-color: var(--bg);
  font-size: var(--text-md);
}

.search-field {
  position: relative;
}

.search-field i {
  position: absolute;
  left: 12px;
  top: 9px;
  z-index: 1;
  color: var(--muted);
  font-size: 16px;
  font-style: normal;
}

.search-field input {
  padding-left: 36px;
}

.filter-reset {
  height: 40px;
  padding: 0 13px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: var(--text-sm);
}

.list-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 17px 2px 9px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.list-summary p {
  margin: 0;
}

.list-summary strong {
  color: var(--ink);
  font-size: var(--text-base);
}

.legend-dot {
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 4px;
  background: var(--mustard);
  border-radius: 50%;
}

.data-table-wrap {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: none;
}

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

.data-table th {
  height: 42px;
  padding: 0 14px;
  color: var(--science-strong);
  text-align: left;
  background: color-mix(in srgb, var(--science-soft) 52%, var(--surface));
  border-bottom: 1px solid var(--line);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .04em;
}

.data-table td {
  height: 58px;
  padding: 8px 14px;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
  font-size: var(--text-md);
  vertical-align: middle;
}

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

.data-table tbody tr[data-ambassador-id] {
  cursor: pointer;
  transition: background .15s ease;
}

.data-table tbody tr[data-ambassador-id]:hover {
  background: color-mix(in srgb, var(--science-soft) 62%, transparent);
}

.person-cell {
  display: flex;
  align-items: center;
  gap: 11px;
}

.person-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 6px;
  font-size: var(--text-md);
  font-weight: 700;
}

.person-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.person-cell strong,
.person-cell small {
  display: block;
}

.person-cell small + small {
  color: var(--mustard);
}

.person-cell strong {
  overflow: hidden;
  color: var(--ink);
  font-size: var(--text-md);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-cell small {
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--text-xs);
}

.ambassador-plan-hint {
  margin-top: 2px;
  color: color-mix(in srgb, var(--color-primary, #0d8a6a) 70%, #64748b);
  font-size: 12px;
}

.ambassador-row {
  cursor: pointer;
}

.ambassador-row.is-expanded {
  background: color-mix(in srgb, var(--color-primary, #0d8a6a) 6%, transparent);
}

.ambassador-row:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--color-primary, #0d8a6a) 55%, transparent);
  outline-offset: -2px;
}

.ambassador-actions {
  white-space: nowrap;
}

.ambassador-plans-row > td {
  padding: 0;
  background: color-mix(in srgb, var(--surface-2, #f5f7fa) 88%, #fff);
  border-bottom: 1px solid var(--line, #d7dee8);
}

.ambassador-inline-plans {
  padding: 14px 16px 16px;
  animation: ambassador-plans-in 180ms ease-out;
}

@keyframes ambassador-plans-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ambassador-inline-plans-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.ambassador-inline-plans-head .eyebrow {
  margin: 0 0 2px;
}

.ambassador-inline-plan-list {
  display: grid;
  gap: 8px;
}

.ambassador-inline-plan {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line, #d7dee8);
  border-radius: 8px;
  background: var(--panel-bg, #fff);
}

.ambassador-inline-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ambassador-inline-plan-head strong {
  font-size: 13.5px;
}

.ambassador-inline-plan > span {
  color: var(--ink-3, #6b7785);
  font-size: 12.5px;
}

@media (max-width: 767px) {
  .ambassador-actions .button {
    width: 100%;
  }
}

.status-badge,
.class-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: var(--text-xs);
  font-weight: 700;
  white-space: nowrap;
}

.status-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}

.status-badge.active {
  color: var(--green);
  background: var(--green-soft);
}

.status-badge.dormant {
  color: var(--mustard);
  background: var(--mustard-soft);
}

.status-badge.ended {
  color: var(--muted);
  background: var(--surface-2);
}

.class-badge.planned {
  color: var(--mustard);
  background: var(--mustard-soft);
}

.class-badge.confirmed {
  color: var(--green);
  background: var(--green-soft);
}

.class-badge.sample {
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
}

.plan-title {
  overflow: hidden;
  display: -webkit-box;
  color: var(--ink);
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.plan-person {
  display: grid;
  gap: 2px;
  color: var(--ink);
  text-align: left;
}

.plan-person strong {
  font-size: var(--text-sm);
}

.plan-person small {
  color: var(--muted);
  font-size: var(--text-xs);
}

.row-action {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 30px;
  color: var(--muted);
  gap: 12px;
  text-align: center;
}

.empty-state-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--science-strong);
  background: var(--science-soft);
  border: 1px solid color-mix(in srgb, var(--science) 28%, var(--line));
  border-radius: 50%;
  font-weight: 700;
}

.empty-state strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-2);
}

.pagination {
  min-height: 40px;
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 15px;
}

.pagination.pagination-start {
  justify-content: flex-start;
}

.pagination button {
  min-width: 34px;
  height: 34px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: var(--text-sm);
}

.pagination button.active {
  color: #fff;
  background: var(--kimchi);
  border-color: var(--kimchi);
}

/* Register */

.register-intro {
  min-height: calc(100vh - 190px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(40px, 8vw, 110px);
  max-width: 1000px;
  margin: 0 auto;
}

.register-copy h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.14;
  letter-spacing: 0;
}

.register-copy > p:nth-of-type(2) {
  max-width: 480px;
  margin: 21px 0 29px;
  color: var(--muted);
  line-height: 1.85;
}

.register-copy > p strong {
  color: var(--kimchi);
}

.register-guide {
  display: grid;
  gap: 8px;
}

.register-guide article {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 15px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.register-guide article > span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--kimchi);
  background: var(--kimchi-soft);
  border-radius: 4px;
  font-family: var(--font-family-base);
  font-size: 13px;
}

.register-guide strong {
  font-size: var(--text-body-sm);
}

.register-guide p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

/* Drawer */

.drawer-backdrop,
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(8, 15, 12, .43);
  backdrop-filter: blur(3px);
}

.detail-drawer {
  width: min(520px, 100vw);
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 90;
  overflow-y: auto;
  background: var(--surface);
  box-shadow: -20px 0 50px rgba(8, 15, 12, .18);
  animation: drawer-in .25s ease both;
}

@keyframes drawer-in {
  from { transform: translateX(100%); }
  to { transform: none; }
}

.detail-drawer > header,
.modal-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 27px;
  border-bottom: 1px solid var(--line);
}

.detail-drawer header .eyebrow,
.modal-card header .eyebrow {
  margin-bottom: 4px;
  font-size: var(--text-xs);
}

.detail-drawer h2,
.modal-card h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.drawer-content {
  padding: 27px;
}

.drawer-profile {
  display: flex;
  align-items: center;
  gap: 17px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.drawer-profile .person-avatar {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  font-size: 18px;
}

.drawer-profile h3,
.drawer-profile p {
  margin: 0;
}

.drawer-profile h3 {
  font-size: 19px;
}

.drawer-profile p {
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--text-md);
}

.drawer-profile .status-badge {
  margin-top: 10px;
}

.profile-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 20px 0;
}

.profile-meta-grid > div {
  min-height: 64px;
  padding: 12px;
  background: var(--surface-2);
  border-radius: 6px;
}

.profile-meta-grid > div.full {
  grid-column: 1 / -1;
}

.profile-meta-grid span,
.profile-meta-grid strong {
  display: block;
}

.profile-meta-grid span {
  color: var(--muted);
  font-size: var(--text-xs);
}

.profile-meta-grid strong {
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: var(--text-sm);
  line-height: 1.55;
}

.profile-meta-grid strong .country-display {
  display: inline-flex;
}

.profile-meta-grid strong .country-name {
  color: var(--ink);
  font-size: var(--text-sm);
}

.sns-cell {
  display: block;
  min-height: 28px;
}

.sns-link-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.sns-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.sns-icon-link:hover,
.sns-icon-link:focus-visible {
  color: #fff;
  border-color: transparent;
  transform: translateY(-1px);
  outline: none;
}

.sns-icon-link.instagram:hover,
.sns-icon-link.instagram:focus-visible { background: #c13584; }

.sns-icon-link.youtube:hover,
.sns-icon-link.youtube:focus-visible { background: #ff0033; }

.sns-icon-link.facebook:hover,
.sns-icon-link.facebook:focus-visible { background: #1877f2; }

.sns-icon-link.tiktok:hover,
.sns-icon-link.tiktok:focus-visible,
.sns-icon-link.x:hover,
.sns-icon-link.x:focus-visible { background: #111111; }

.sns-icon-link.linkedin:hover,
.sns-icon-link.linkedin:focus-visible { background: #0a66c2; }

.sns-icon-link.website:hover,
.sns-icon-link.website:focus-visible { background: var(--science); }

.sns-empty,
.sns-fallback-text {
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
}

.profile-bio {
  padding: 14px;
  margin-bottom: 20px;
  color: var(--ink-2);
  white-space: pre-line;
  background: var(--green-soft);
  border-radius: 6px;
  font-size: var(--text-sm);
  line-height: 1.7;
}

.contact-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: -11px 0 20px;
}

.contact-actions button {
  min-height: 36px;
  padding: 0 10px;
  overflow: hidden;
  color: var(--ink-2);
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: var(--text-xs);
}

.contact-actions button:hover {
  color: var(--kimchi);
  border-color: color-mix(in srgb, var(--kimchi) 35%, var(--line));
}

.activation-control {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
}

.drawer-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 22px;
}

.drawer-quick-actions .button {
  min-height: 38px;
  padding-inline: 10px;
  font-size: var(--text-xs);
}

.activation-control button {
  flex: 1;
  height: 36px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: var(--text-sm);
}

.activation-control button.active {
  color: var(--green);
  background: var(--green-soft);
  border-color: color-mix(in srgb, var(--green) 30%, var(--line));
}

.drawer-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 10px;
}

.drawer-section-title h4 {
  margin: 0;
  font-size: var(--text-base);
}

.drawer-section-title span {
  color: var(--muted);
  font-size: var(--text-sm);
}

.drawer-plans {
  display: grid;
  gap: 7px;
}

.drawer-plan {
  padding: 12px;
  background: var(--surface-2);
  border-left: 3px solid var(--mustard);
  border-radius: 4px 9px 9px 4px;
}

.drawer-plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.drawer-plan-head strong {
  flex: 1;
}

.button.compact {
  padding: 4px 10px;
  font-size: var(--text-sm);
  line-height: 1.3;
  white-space: nowrap;
}

.muted-cell {
  color: var(--muted);
}

.drawer-plan strong,
.drawer-plan span {
  display: block;
}

.drawer-plan strong {
  font-size: var(--text-sm);
  line-height: 1.5;
}

.drawer-plan span {
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--text-xs);
}

/* Activity modal */

.modal-backdrop {
  display: grid;
  place-items: center;
  padding: 22px;
}

.modal-card {
  width: min(620px, 100%);
  max-height: calc(100vh - 44px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  animation: modal-in .2s ease both;
}

.detail-modal-card {
  width: min(760px, 100%);
}

.detail-modal-content {
  padding: 8px 27px 27px;
}

.detail-modal-content .drawer-profile,
.detail-modal-content .drawer-title-block {
  margin-top: 8px;
}

.detail-modal-content .form-grid {
  margin-top: 12px;
}

.detail-modal-content .sample-notice {
  margin: 0 -27px 12px;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: none; }
}

.sample-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 26px;
  color: var(--ink-2);
  background: var(--mustard-soft);
  font-size: var(--text-sm);
}

.sample-notice strong {
  color: var(--mustard);
}

.modal-card form {
  padding: 8px 27px 25px;
}

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

.form-grid .full {
  grid-column: 1 / -1;
}

.profile-sns-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 12px;
}

.profile-sns-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.profile-sns-head > span {
  font-size: var(--text-sm, 13px);
  font-weight: 700;
  color: var(--ink-2, #445);
}

.profile-sns-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-sns-row {
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.profile-sns-row .field {
  margin: 0;
}

.profile-sns-row select,
.profile-sns-row input {
  width: 100%;
}

.profile-sns-editor .field-hint {
  margin: 0;
  color: var(--ink-3, #6b7785);
  font-size: 12px;
  line-height: 1.4;
}

.sample-confirm {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px;
  margin: 18px 0;
  color: var(--ink-2);
  background: var(--surface-2);
  border-radius: 6px;
  font-size: var(--text-sm);
  line-height: 1.5;
}

.sample-confirm input {
  margin-top: 2px;
}

.modal-card footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.logout-confirm-card {
  width: min(400px, calc(100vw - 32px));
}

.logout-confirm-card > header {
  padding: 20px 24px 16px;
}

.logout-confirm-card > header h2 {
  font-size: 18px;
  line-height: 1.3;
}

.logout-confirm-card .logout-confirm-copy {
  margin: 0;
  padding: 18px 24px 4px;
  color: var(--ink-2, #587077);
  font-size: 14px;
  line-height: 1.6;
}

.logout-confirm-card > footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 16px 24px 20px;
  border-top: 0;
}

.toast {
  min-width: 240px;
  max-width: min(420px, calc(100vw - 32px));
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 120;
  padding: 12px 16px;
  color: #ffffff;
  text-align: center;
  background: #1b2b24;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 6px;
  box-shadow: var(--shadow-md);
  font-size: var(--text-md);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity .2s, transform .2s;
}

.toast[data-type="success"] {
  color: #ffffff;
  background: #145c4f;
}

.toast[data-type="warning"] {
  color: #ffffff;
  background: #6c4b17;
}

.toast[data-type="error"] {
  color: #ffffff;
  background: #8a3028;
}

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

.mobile-nav {
  display: none;
}

/* Responsive */

@media (max-width: 1180px) {
  :root {
    --sidebar-width: 218px;
  }

  .sidebar {
    padding-inline: 15px;
  }

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

  .control-panel {
    grid-column: 1 / -1;
    min-height: 0;
  }

  .control-list {
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
  }

  .filter-bar,
  .filter-bar:has(#ambassadorStatus) {
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(112px, 1fr));
  }

  .filter-reset {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .sidebar {
    display: none;
  }

  .workspace {
    margin-left: 0;
  }

  .page-status {
    left: 50%;
  }

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

  .topbar {
    padding-inline: 20px;
  }

  .mobile-menu-button {
    display: none;
  }

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

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

  .control-panel {
    grid-column: auto;
  }

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

  .mobile-nav {
    height: 66px;
    position: fixed;
    inset: auto 0 0;
    z-index: 50;
    display: flex;
    align-items: stretch;
    padding: 6px max(8px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(16px);
  }

  .mobile-nav button {
    flex: 1;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 1px;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 8px;
  }

  .mobile-nav i {
    font-size: var(--text-xs);
    font-style: normal;
  }

  .mobile-nav span {
    font-size: var(--text-sm);
    font-weight: 700;
  }

  .mobile-nav button.active {
    color: var(--science-strong);
    background: var(--science-soft);
  }

  .page {
    padding-bottom: 95px;
  }

  .filter-bar,
  .filter-bar:has(#ambassadorStatus) {
    grid-template-columns: 1fr 1fr;
  }

  .filter-bar .search-field {
    grid-column: 1 / -1;
  }

  .filter-reset {
    grid-column: 1 / -1;
  }
}

@media (max-width: 660px) {
  .topbar {
    height: 60px;
    padding-inline: 15px;
  }

  .topbar-title p,
  .reference-date,
  .topbar-actions > .menu-wrap:first-of-type,
  .profile-button > span:nth-child(2),
  .profile-button > i {
    display: none;
  }

  .profile-button {
    width: 42px;
    padding: 3px;
    border: 0;
    background: transparent;
  }

  .user-avatar {
    width: 36px;
    height: 36px;
  }

  .page {
    min-height: calc(100vh - 60px);
    padding: 28px 15px 90px;
  }

  .hero-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-row h1 {
    font-size: 34px;
  }

  .hero-action {
    width: 100%;
  }

  .source-ribbon {
    grid-template-columns: 1fr auto;
    margin-top: 26px;
  }

  .source-ribbon p {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .metric-grid {
    gap: 9px;
  }

  .metric-card {
    min-height: 137px;
    padding: 15px;
    border-radius: 6px;
  }

  .metric-card > div i {
    display: none;
  }

  .metric-card > strong {
    margin-top: 17px;
    font-size: 33px;
  }

  .panel {
    min-height: 0;
    padding: 17px;
    border-radius: 6px;
  }

  .country-summary {
    grid-template-columns: 1fr;
  }

  .country-scope-note {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .country-scope-note span {
    text-align: left;
  }

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

  .page-heading {
    align-items: flex-start;
    margin-bottom: 22px;
  }

  .page-heading h1 {
    font-size: 29px;
  }

  .page-heading > .button {
    min-height: 38px;
    padding-inline: 12px;
    font-size: var(--text-sm);
  }

  .filter-bar,
  .filter-bar:has(#ambassadorStatus) {
    grid-template-columns: 1fr 1fr;
    padding: 9px;
  }

  .data-table-wrap {
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .data-table,
  .data-table tbody {
    display: block;
  }

  .data-table thead {
    display: none;
  }

  .data-table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 13px;
    margin-bottom: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
  }

  .data-table td {
    height: auto;
    display: none;
    padding: 0;
    border: 0;
  }

  .data-table .mobile-primary,
  .data-table .mobile-secondary {
    display: block;
  }

  .data-table .mobile-secondary {
    text-align: right;
  }

  .ambassadors-table .country-cell {
    display: block;
    grid-column: 1 / -1;
    padding-top: 9px;
    margin-top: 9px;
    border-top: 1px solid var(--line);
  }

  .data-table.plans-table tr {
    gap: 8px;
  }

  .data-table.plans-table .mobile-primary {
    grid-column: 1 / -1;
  }

  .data-table.plans-table .mobile-secondary {
    display: flex;
    justify-content: space-between;
    grid-column: 1 / -1;
    text-align: left;
  }

  .register-intro {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .register-copy h1 {
    font-size: 39px;
  }

  .detail-drawer {
    top: 0;
    bottom: 0;
  }

  .drawer-content,
  .detail-drawer > header {
    padding-inline: 19px;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal-card {
    max-height: 94vh;
    border-radius: 8px 8px 0 0;
  }

  .modal-card > header,
  .modal-card form {
    padding-inline: 19px;
  }

  .sample-notice {
    padding-inline: 19px;
  }

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

  .form-grid .full {
    grid-column: auto;
  }
}

/* Integrated GKA + PIMS operations */

.main-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.main-nav > p:not(:first-child) {
  margin-top: 18px;
}

.sidebar {
  padding-top: 20px;
}

.season-card {
  flex: 0 0 auto;
  padding: 14px 16px;
  margin: 20px 2px 16px;
}

.season-card strong {
  margin: 0;
}

.compact-hero {
  align-items: end;
  padding: 22px 24px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--science);
  border-radius: 6px;
}

.compact-hero .eyebrow {
  color: var(--science-strong);
}

.compact-hero h1 {
  font-size: clamp(22px, 1.1rem + 0.4vw, 26px);
}

.compact-hero h1 span {
  color: var(--science);
}

.compact-hero > div > p:last-child {
  color: var(--muted);
}

.source-chip {
  align-self: end;
  padding: 9px 13px;
  color: var(--science-strong);
  background: var(--science-soft);
  border: 1px solid color-mix(in srgb, var(--science) 24%, var(--line));
  border-radius: 4px;
  font-size: var(--text-body-sm);
  font-weight: 700;
}

.integrated-metrics {
  margin-top: 28px;
}

.dashboard-error-view .dashboard-domain-grid {
  display: none;
}

.dashboard-error-view .integrated-metrics {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 10px;
}

.dashboard-error-summary {
  min-height: 280px;
}

.dashboard-error-summary .empty-state {
  min-height: 240px;
}

.dashboard-filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(112px, 1fr)) repeat(2, minmax(142px, 1fr)) auto;
  gap: 8px;
  align-items: end;
  padding: 15px;
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.dashboard-filter-bar label {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.dashboard-filter-bar label > span {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
}

.dashboard-filter-bar select,
.dashboard-filter-bar input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.dashboard-filter-bar select:focus,
.dashboard-filter-bar input:focus {
  border-color: var(--science);
  outline: 3px solid color-mix(in srgb, var(--science) 15%, transparent);
}

.dashboard-filter-bar .button {
  min-width: 94px;
  height: 40px;
}

.dashboard-filter-bar-simple {
  grid-template-columns: minmax(120px, 160px) minmax(120px, 160px) auto 1fr;
  align-items: end;
}

.dashboard-filter-more {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: var(--text-sm);
}

.dashboard-filter-more summary {
  cursor: pointer;
  width: fit-content;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  color: var(--science-strong);
  list-style: none;
}

.dashboard-filter-more summary::-webkit-details-marker {
  display: none;
}

.dashboard-filter-more-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.dashboard-quick-links {
  display: grid;
  gap: 8px;
}

.dashboard-quick-links .button {
  justify-content: flex-start;
  width: 100%;
}

.dashboard-attention-empty {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

@media (max-width: 900px) {
  .dashboard-filter-bar-simple {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-filter-more-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-inline-state {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  margin-top: 10px;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--science);
  border-radius: 5px;
  font-size: var(--text-sm);
}

.dashboard-inline-state[data-type="loading"] .status-indicator {
  border: 2px solid var(--line-strong);
  border-right-color: var(--science);
  animation: busy-spin .7s linear infinite;
}

.dashboard-inline-state[data-type="success"] {
  border-left-color: var(--green);
}

.dashboard-inline-state[data-type="success"] .status-indicator {
  background: var(--green);
}

.dashboard-inline-state[data-type="warning"],
.dashboard-inline-state[data-type="empty"] {
  background: var(--mustard-soft);
  border-left-color: var(--mustard);
}

.dashboard-inline-state[data-type="warning"] .status-indicator,
.dashboard-inline-state[data-type="empty"] .status-indicator {
  border: 2px solid var(--mustard);
}

.dashboard-inline-state[data-type="error"] {
  color: var(--kimchi-dark);
  background: var(--kimchi-soft);
  border-left-color: var(--kimchi);
}

.dashboard-inline-state[data-type="error"] .status-indicator {
  background: var(--kimchi);
}

.dashboard-inline-state button {
  min-height: 30px;
  padding: 0 9px;
  margin-left: auto;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-size: var(--text-xs);
  font-weight: 700;
}

.dashboard-skeleton > span,
.dashboard-skeleton > strong,
.dashboard-skeleton > p {
  display: block;
  overflow: hidden;
  color: transparent;
  background: var(--surface-3);
  border-radius: 3px;
  animation: dashboard-skeleton 1.1s ease-in-out infinite alternate;
}

.dashboard-skeleton > span {
  width: 42%;
  height: 13px;
}

.dashboard-skeleton > strong {
  width: 66%;
  height: 32px;
  margin-top: 20px;
}

.dashboard-skeleton > p {
  width: 84%;
  height: 12px;
  margin-top: 13px;
}

@keyframes dashboard-skeleton {
  from { opacity: .45; }
  to { opacity: 1; }
}

.project-command-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.project-command {
  min-width: 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--green);
  border-radius: var(--radius);
  box-shadow: none;
}

.dashboard-domain-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kscia-command {
  border-top-color: var(--mustard);
}

.kscia-command > header span {
  color: var(--mustard);
}

.kscia-page .page-heading {
  margin-bottom: 0;
}

.kscia-filter-bar {
  margin-bottom: 0;
}

.kscia-overview-metrics,
.kscia-survey-metrics {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-bottom: 14px;
}

.kscia-overview-metrics .metric-card.warn strong,
.kscia-overview-metrics .metric-card.accent strong {
  color: var(--color-primary, #0d8a6a);
}

.kscia-overview-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.4fr);
  gap: 14px;
  margin-bottom: 14px;
}

.kscia-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.9fr);
  gap: 14px;
  margin-bottom: 14px;
}

.kscia-score-panel,
.kscia-domain-panel {
  min-height: 0;
}

.kscia-composite-donut {
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 8px 4px 4px;
}

.kscia-score-visual {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.kscia-score-visual .apex-donut-hole {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  background: var(--panel-bg, #fff);
}

.kscia-score-visual .apex-donut-hole strong {
  font-size: 28px;
  line-height: 1;
}

.kscia-target-track {
  position: relative;
  width: 100%;
  max-width: 220px;
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line, #d7dee8) 80%, transparent);
}

.kscia-target-track > span {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 10px;
  background: #94a3b8;
  transform: translateX(-50%);
}

.kscia-domain-heatmap {
  display: grid;
  gap: 10px;
}

.kscia-heat-domain {
  padding: 10px 12px;
  border: 1px solid var(--line, #d7dee8);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--heat), transparent 120%);
}

.kscia-heat-domain > header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  margin-bottom: 8px;
}

.kscia-roman {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: color-mix(in srgb, #0d8a6a 14%, #fff);
  color: #0d8a6a;
  font-weight: 700;
  font-size: 12px;
}

.kscia-heat-domain h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.kscia-heat-domain p {
  margin: 2px 0 0;
  color: var(--ink-3, #6b7785);
  font-size: 12px;
}

.kscia-heat-score {
  margin-left: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.kscia-heat-cells {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 6px;
}

.kscia-heat-cell {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  text-align: left;
  border: 1px solid color-mix(in srgb, var(--line, #d7dee8) 70%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--heat) 55%, #fff);
  color: inherit;
  cursor: pointer;
}

.kscia-heat-cell span,
.kscia-heat-cell em {
  color: var(--ink-3, #6b7785);
  font-size: 11px;
}

.kscia-heat-cell strong {
  font-size: 12.5px;
  font-weight: 700;
}

.kscia-program-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.kscia-program-grid-wide {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.kscia-program-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line, #d7dee8);
  border-radius: 10px;
  background: var(--panel-bg, #fff);
}

.kscia-program-card > header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.kscia-program-code {
  display: inline-flex;
  min-width: 42px;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, #0d8a6a 12%, #fff);
  color: #0d8a6a;
  font-size: 12px;
  font-weight: 700;
}

.kscia-program-card h4 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

.kscia-program-meta {
  margin: 0;
  color: var(--ink-3, #6b7785);
  font-size: 12.5px;
}

.kscia-program-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  margin: 0;
}

.kscia-program-facts dt {
  color: var(--ink-3, #6b7785);
  font-size: 11px;
}

.kscia-program-facts dd {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
}

.kscia-progress {
  display: grid;
  gap: 4px;
  font-size: 11.5px;
  color: var(--ink-3, #6b7785);
}

.kscia-progress-track {
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line, #d7dee8) 80%, transparent);
  overflow: hidden;
}

.kscia-progress-track > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0d8a6a, #0284c7);
}

.kscia-program-card > footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-3, #6b7785);
  font-size: 11.5px;
}

.kscia-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.kscia-roadmap-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.kscia-roadmap-list > li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line, #d7dee8);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2, #f5f7fa) 70%, transparent);
}

.kscia-roadmap-list > li[data-state="완료"] {
  border-left: 3px solid #0d8a6a;
}

.kscia-roadmap-list > li[data-state="진행"] {
  border-left: 3px solid #0284c7;
}

.kscia-roadmap-list > li[data-state="예정"] {
  border-left: 3px solid #94a3b8;
}

.kscia-roadmap-period {
  font-size: 12px;
  font-weight: 700;
  color: #0d8a6a;
}

.kscia-roadmap-list strong {
  display: block;
  font-size: 13px;
}

.kscia-roadmap-list p {
  margin: 2px 0 0;
  color: var(--ink-3, #6b7785);
  font-size: 12px;
}

.kscia-roadmap-list em {
  font-style: normal;
  font-size: 12px;
  color: var(--ink-2, #445);
}

.kscia-evidence-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.kscia-evidence-card {
  padding: 12px;
  border: 1px solid var(--line, #d7dee8);
  border-radius: 8px;
  background: var(--panel-bg, #fff);
}

.kscia-evidence-card > header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
}

.kscia-evidence-card.status-누락,
.kscia-evidence-card.status-승인대기 {
  border-color: color-mix(in srgb, #c47a06 45%, var(--line, #d7dee8));
}

.kscia-domain-bars {
  display: grid;
  gap: 10px;
}

.kscia-bar-row {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: center;
}

.kscia-bar-label {
  display: grid;
  gap: 2px;
}

.kscia-bar-label em {
  color: var(--ink-3, #6b7785);
  font-style: normal;
  font-size: 11.5px;
}

.kscia-bar-track {
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line, #d7dee8) 75%, transparent);
  overflow: hidden;
}

.kscia-bar-track > i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.kscia-domain-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.kscia-domain-yoy {
  margin: 0 0 8px;
  color: var(--ink-3, #6b7785);
  font-size: 12px;
}

.kscia-indicator-mini {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.kscia-indicator-mini li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line, #d7dee8) 70%, transparent);
  font-size: 12.5px;
}

.kscia-weight-form footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.kscia-weight-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 12px;
}

.kscia-weight-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, #0d8a6a 12%, #fff);
  color: #0d8a6a;
  font-size: 12px;
  font-weight: 700;
}

.kscia-weight-chip[data-ok="false"] {
  background: color-mix(in srgb, #c47a06 16%, #fff);
  color: #9a5b05;
}

.kscia-measure-list {
  display: grid;
  gap: 10px;
}

.kscia-measure-group {
  padding: 12px;
  border: 1px solid var(--line, #d7dee8);
  border-radius: 8px;
}

.kscia-measure-group > header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
}

.kscia-measure-slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.kscia-measure-slot {
  display: grid;
  gap: 2px;
  padding: 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2, #f5f7fa) 80%, transparent);
  font-size: 12px;
}

.kscia-measure-slot em {
  color: var(--ink-3, #6b7785);
  font-style: normal;
}

.kscia-inline-search {
  min-width: 180px;
  margin: 0;
}

.tone-good { color: #0d8a6a; }
.tone-fair { color: #0284c7; }
.tone-watch { color: #c47a06; }
.tone-muted { color: var(--ink-3, #6b7785); }

.class-badge.compact {
  display: inline-flex;
  margin-left: 4px;
  padding: 1px 5px;
  font-size: 12px;
  vertical-align: middle;
}

@media (max-width: 960px) {
  .kscia-overview-layout,
  .kscia-split-grid,
  .kscia-bar-row,
  .kscia-roadmap-list > li,
  .kscia-measure-slots {
    grid-template-columns: 1fr;
  }
}

.project-command.filtered-out {
  opacity: .56;
}

.project-command > header .domain-state {
  max-width: 46%;
  padding: 5px 7px;
  color: var(--science-strong);
  text-align: right;
  overflow-wrap: anywhere;
  background: var(--science-soft);
  border-radius: 4px;
  font-size: var(--text-xs);
  letter-spacing: 0;
}

.project-command > header .domain-state.warning {
  color: var(--mustard);
  background: var(--mustard-soft);
}

.project-command > header .domain-state.error {
  color: var(--kimchi-dark);
  background: var(--kimchi-soft);
}

.project-command > header .domain-state.muted {
  color: var(--muted);
  background: var(--surface-3);
}

.project-command > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.project-command > header span {
  color: var(--green);
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: .06em;
}

.project-command > header h3 {
  margin: 3px 0 0;
  font-size: 18px;
}

.pims-command > header span {
  color: var(--science);
}

.pims-command {
  border-top-color: var(--science);
}

.command-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 18px 0;
  margin-top: 16px;
  border-block: 1px solid var(--line);
}

.command-stats div {
  text-align: center;
}

.command-stats strong,
.command-stats span {
  display: block;
}

.command-stats strong {
  font-size: 24px;
  letter-spacing: 0;
}

.command-stats span {
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--text-md);
}

.command-tasks {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.command-tasks button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: var(--text-body-sm);
}

.command-tasks button:hover {
  color: var(--science-strong);
  background: var(--science-soft);
  border-color: color-mix(in srgb, var(--science) 18%, var(--line));
}

.command-tasks button strong {
  color: var(--ink);
}

.domain-source-fact,
.domain-notice {
  margin: 11px 0 0;
  color: var(--ink-2);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.domain-notice {
  min-height: 44px;
  color: var(--muted);
}

.project-command > .text-button {
  margin-top: 12px;
}

.project-command > .text-button:disabled {
  color: var(--muted);
  cursor: not-allowed;
}

.dashboard-attention-list {
  min-width: 0;
}

.dashboard-attention-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  margin-top: 14px;
}

.dashboard-attention-list > button {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: var(--text-sm);
}

.dashboard-attention-list > button.attention-action {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface);
}

.dashboard-attention-list > button.attention-action:hover,
.dashboard-attention-list > button.attention-action:focus-visible {
  border-color: color-mix(in srgb, var(--mustard) 45%, var(--line));
  background: color-mix(in srgb, var(--mustard-soft) 55%, #fff);
}

.dashboard-attention-list > button span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.dashboard-attention-list > button strong {
  flex: 0 0 auto;
}

.dashboard-attention-list > button:hover,
.dashboard-attention-list > button:focus-visible {
  color: var(--science-strong);
  border-color: var(--science);
}

.health-pill.warning {
  color: var(--mustard);
  background: var(--mustard-soft);
}

.truth-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.truth-grid > div {
  min-width: 0;
  padding: 15px;
  background: var(--surface-2);
  border-radius: 0;
}

.truth-grid strong,
.truth-grid p {
  display: block;
}

.truth-grid strong {
  margin-top: 10px;
  font-size: var(--text-base);
}

.truth-grid p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: var(--text-md);
}

.class-badge.reference,
.class-badge.candidate,
.class-badge.approved,
.class-badge.review,
.class-badge.warning {
  white-space: nowrap;
}

.class-badge.reference {
  color: var(--mustard);
  background: var(--mustard-soft);
}

.class-badge.candidate {
  color: var(--science-strong);
  background: var(--science-soft);
}

.class-badge.approved {
  color: var(--green);
  background: var(--green-soft);
}

.class-badge.review {
  color: var(--mustard);
  background: var(--mustard-soft);
}

.class-badge.warning {
  color: var(--kimchi);
  background: var(--kimchi-soft);
}

.reference-card strong {
  color: var(--mustard);
}

.candidate-card strong {
  color: var(--science);
}

.pims-ribbon .source-icon {
  color: #fff;
  background: var(--science);
}

.pims-dashboard-grid {
  grid-template-columns: 1.15fr 1fr .9fr;
}

.pims-performance-dashboard {
  display: grid;
  gap: 16px;
}

.pims-perf-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.pims-performance-dashboard .source-ribbon {
  margin: 0;
}

.pims-donut-legend i {
  border-radius: 999px;
}

.pims-mini-table .data-table {
  border-radius: 10px;
  overflow: hidden;
}

.pims-perf-notes {
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.pims-perf-empty {
  color: var(--muted);
  font-size: 20px;
  font-weight: 700;
}

.pims-perf-section {
  display: grid;
  gap: 12px;
}

.pims-trend-wrap {
  max-height: 360px;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.pims-trend-table .incomplete-year {
  background: color-mix(in srgb, var(--mustard-soft) 55%, var(--surface));
}

.pims-trend-bars .bar-item.is-incomplete .bar-track > i {
  opacity: 0.45;
}

.panel.pims-perf-section .pims-trend-wrap {
  border: 0;
  background: #f7fafc;
}

.pims-perf-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
}

.pims-donut {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin: 8px 0 14px;
}

.pims-donut-visual {
  position: relative;
  width: min(200px, 48vw);
  aspect-ratio: 1;
  border-radius: 50%;
  flex: 0 0 auto;
}

.pims-donut-hole {
  position: absolute;
  inset: 22%;
  display: grid;
  place-content: center;
  text-align: center;
  background: var(--surface);
  border-radius: 50%;
}

.pims-donut-hole strong {
  font-size: 28px;
  line-height: 1;
}

.pims-donut-hole span {
  color: var(--muted);
  font-size: 12px;
}

.pims-donut-legend {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-2);
}

.pims-donut-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 2px;
}

.pims-stack-chart {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.pims-stack-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 28px;
  gap: 8px;
  align-items: center;
}

.pims-stack-track {
  display: flex;
  height: 12px;
  overflow: hidden;
  background: var(--surface-3);
  border-radius: 999px;
}

.pims-stack-track > i {
  display: block;
  height: 100%;
}

.pims-stack-track > i.research { background: #0a6ebd; }
.pims-stack-track > i.industry { background: #0284c7; }
.pims-stack-track > i.event { background: #0d8a6a; }
.pims-stack-track > i.unclassified { background: #94a3b8; }

.pims-mini-table {
  margin-top: 12px;
  overflow: auto;
}

.pims-perf-notes {
  padding: 12px 14px;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
}

.pims-perf-notes ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

@media (max-width: 1200px) {
  .pims-perf-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pims-perf-grid {
    grid-template-columns: 1fr;
  }
}

.pipeline-board {
  display: grid;
  gap: 9px;
}

.pipeline-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: 5px;
}

.pipeline-step > span {
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 700;
}

.pipeline-step div {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
}

.pipeline-step strong {
  font-size: var(--text-body-sm);
}

.pipeline-step small {
  color: var(--muted);
}

.approved-step {
  color: var(--green);
  background: var(--green-soft);
}

.ranking-list {
  display: grid;
  gap: 5px;
}

.ranking-list button {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 9px;
  color: var(--ink-2);
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.ranking-list button span {
  color: var(--muted);
  font-size: var(--text-sm);
}

.ranking-list button strong {
  overflow: hidden;
  font-size: var(--text-body-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-list button em {
  color: var(--science);
  font-size: var(--text-md);
  font-style: normal;
  font-weight: 700;
}

.reference-notice,
.candidate-notice {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  margin-bottom: 16px;
  background: var(--mustard-soft);
  border: 1px solid color-mix(in srgb, var(--mustard) 20%, transparent);
  border-radius: 6px;
}

.reference-notice strong,
.candidate-notice strong {
  flex: 0 0 auto;
  color: var(--mustard);
  font-size: var(--text-md);
}

.reference-notice span,
.candidate-notice span {
  color: var(--ink-2);
  font-size: var(--text-body-sm);
}

.candidate-notice {
  background: var(--science-soft);
  border-color: color-mix(in srgb, var(--science) 24%, transparent);
}

.candidate-notice strong {
  color: var(--science-strong);
}

.pims-table tr[data-open-press],
.pims-article-table tr[data-open-pims-article] {
  cursor: pointer;
}

.pims-table tr[data-open-press]:hover td,
.pims-article-table tr[data-open-pims-article]:hover td {
  background: color-mix(in srgb, var(--surface-2) 62%, transparent);
}

.pims-table td small,
.pims-article-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.citation-score {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  min-width: 48px;
  color: var(--muted);
}

.citation-score strong {
  font-size: 1rem;
  color: var(--ink);
}

.citation-score.matched strong {
  color: var(--green);
}

.source-activity-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: var(--surface);
  margin-bottom: 18px;
}

.source-activity-summary article {
  padding: 18px 20px;
  border-right: 1px solid var(--line);
}

.source-activity-summary article:last-child {
  border-right: 0;
}

.source-activity-summary span,
.source-activity-summary p {
  display: block;
  color: var(--muted);
  font-size: .82rem;
}

.source-activity-summary strong {
  display: block;
  margin: 5px 0;
  color: var(--ink);
  font-size: 1.55rem;
}

.source-activity-summary strong small {
  margin-left: 3px;
  font-size: .78rem;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.automation-strip {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(420px, 1.5fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.automation-strip > div:first-child {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 9px;
}

.automation-strip > div:first-child small {
  grid-column: 2;
  color: var(--muted);
}

.automation-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(0, 166, 148, .12);
}

.automation-strip dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.automation-strip dl div {
  min-width: 0;
}

.automation-strip dt {
  color: var(--muted);
  font-size: .75rem;
}

.automation-strip dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-weight: 700;
  font-size: .86rem;
}

.automation-error {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--kimchi-dark);
  font-size: .8rem;
}

.press-year-groups {
  display: flex;
  gap: 0;
  margin: 0 0 14px;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--surface);
}

.press-year-groups button {
  min-width: 104px;
  min-height: 54px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 3px;
  padding: 8px 14px;
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
}

.press-year-groups button:last-child {
  border-right: 0;
}

.press-year-groups button:hover {
  background: var(--surface-2);
}

.press-year-groups button.active {
  background: #e7f6f4;
  box-shadow: inset 0 -3px 0 var(--science);
  color: var(--science-strong);
}

.press-year-groups button:focus-visible {
  outline: 2px solid var(--science);
  outline-offset: -3px;
}

.press-year-groups strong {
  font-size: var(--text-body-sm);
}

.press-year-groups span {
  color: var(--muted);
  font-size: var(--text-sm);
}

.press-year-row td {
  height: 42px;
  padding-top: 9px;
  padding-bottom: 9px;
  background: color-mix(in srgb, var(--science-soft) 58%, var(--surface));
  border-bottom-color: var(--line);
}

.press-year-row td strong {
  margin-right: 9px;
  color: var(--ink);
  font-size: var(--text-body);
}

.press-year-row td span {
  color: var(--muted);
  font-size: var(--text-sm);
}

.press-source {
  color: var(--science-strong);
  font-weight: 700;
  font-size: var(--text-body-sm);
}

.press-mode-control {
  margin-bottom: 18px;
}

@media (max-width: 760px) {
  .press-year-groups {
    scrollbar-width: thin;
  }

  .press-year-groups button {
    min-width: 96px;
  }

  .automation-strip {
    grid-template-columns: 1fr;
  }

  .automation-strip dl {
    grid-template-columns: 1fr;
  }

  .source-activity-summary {
    grid-template-columns: 1fr;
  }

  .source-activity-summary article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .source-activity-summary article:last-child {
    border-bottom: 0;
  }
}

.media-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.media-card {
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 16px;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.media-card > span,
.media-card > i {
  color: var(--muted);
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: 700;
}

.media-card > strong {
  overflow: hidden;
  font-size: var(--text-body-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-card > em {
  color: var(--science);
  font-size: 22px;
  font-style: normal;
  font-weight: 700;
}

.media-card > em small {
  margin-left: 2px;
  font-size: var(--text-sm);
}

.media-card > i {
  grid-column: 2 / -1;
}

.media-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.media-cell > span {
  width: 27px;
  height: 27px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--science-strong);
  background: var(--science-soft);
  border-radius: 4px;
  font-size: var(--text-md);
  font-weight: 700;
}

.media-cell strong {
  overflow: hidden;
  font-size: var(--text-md);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-score {
  display: inline-flex;
  padding: 4px 7px;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 7px;
  font-size: var(--text-sm);
  font-weight: 700;
}

.match-score.high {
  color: var(--green);
  background: var(--green-soft);
}

.match-score.no_match {
  color: var(--kimchi);
  background: var(--kimchi-soft);
}

.coverage-label {
  font-size: var(--text-md);
  font-weight: 700;
}

.mobile-only {
  display: none;
}

.coverage-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 11px;
  margin: 18px 0;
}

.coverage-card {
  min-width: 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.coverage-card header span,
.coverage-card header strong {
  display: block;
}

.coverage-card header span {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coverage-card header strong {
  margin-top: 4px;
  font-size: var(--text-base);
}

.coverage-card > div {
  margin: 20px 0;
}

.coverage-card > div strong,
.coverage-card > div span {
  display: block;
}

.coverage-card > div strong {
  font-size: 30px;
}

.coverage-card > div span {
  color: var(--muted);
  font-size: var(--text-sm);
}

.coverage-card footer {
  display: grid;
  gap: 4px;
  padding-top: 10px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: var(--text-sm);
}

.coverage-card footer span {
  display: flex;
  justify-content: space-between;
}

.coverage-guide {
  margin-bottom: 18px;
}

.quality-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 2fr;
  gap: 1px;
  margin-bottom: 18px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.quality-strip > div,
.quality-strip > p {
  padding: 14px 16px;
  margin: 0;
  background: var(--surface);
}

.quality-strip span,
.quality-strip strong {
  display: block;
}

.quality-strip span {
  color: var(--muted);
  font-size: var(--text-sm);
}

.quality-strip strong {
  margin-top: 3px;
  font-size: 14px;
}

.quality-strip p {
  color: var(--muted);
  font-size: var(--text-md);
}

.queue-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(4, minmax(88px, auto));
  padding: 3px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.segmented-control button {
  min-height: 34px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: var(--text-sm);
  font-weight: 700;
}

.segmented-control button.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.queue-order {
  color: var(--muted);
  font-family: var(--font-family-base);
  font-size: var(--text-base);
  font-weight: 700;
}

.queue-drawer-nav {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  gap: 8px;
  padding: 8px;
  margin-bottom: 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.queue-drawer-nav button {
  width: 38px;
  height: 38px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 18px;
}

.queue-drawer-nav button:disabled {
  cursor: not-allowed;
  opacity: .4;
}

.queue-drawer-nav span,
.queue-drawer-nav strong,
.queue-drawer-nav small {
  display: block;
  text-align: center;
}

.queue-drawer-nav strong {
  font-size: var(--text-md);
}

.queue-drawer-nav small {
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--text-xs);
}

.drawer-title-block {
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.drawer-title-block h3 {
  margin: 13px 0 6px;
  font-size: 19px;
  line-height: 1.45;
}

.drawer-title-block p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-body-sm);
}

.evidence-link {
  margin-top: 14px;
}

.linked-press-card {
  display: grid;
  gap: 5px;
  padding: 15px;
  margin-top: 14px;
  background: var(--surface-2);
  border-radius: 6px;
}

.linked-press-card span,
.linked-press-card small {
  color: var(--muted);
  font-size: var(--text-sm);
}

.linked-press-card strong {
  font-size: var(--text-body-sm);
  line-height: 1.5;
}

.drawer-control-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.drawer-control-row select,
.labeling-form select,
.labeling-form input {
  min-width: 0;
  height: 42px;
  padding: 0 11px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

.decision-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.decision-grid button {
  min-height: 42px;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: var(--text-body-sm);
  font-weight: 700;
}

.decision-grid button:first-child {
  color: var(--green);
  background: var(--green-soft);
}

.decision-grid button:last-child {
  color: var(--danger, #b42318);
  background: color-mix(in srgb, var(--danger, #b42318) 10%, var(--surface));
}

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

.drawer-reason {
  margin-top: 10px;
}

.full-action {
  width: 100%;
  margin-top: 12px;
}

.labeling-form {
  display: grid;
  gap: 8px;
}

.labeling-field {
  display: grid;
  gap: 5px;
}

.labeling-field > span {
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 700;
}

.labeling-check {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: var(--text-md);
}

.labeling-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--kimchi);
}

.labeling-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.label-history {
  display: grid;
  gap: 7px;
  padding: 12px;
  margin-top: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.label-history > div,
.label-history p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
}

.label-history strong,
.label-history p span {
  color: var(--ink-2);
  font-size: var(--text-sm);
}

.label-history > div span,
.label-history small {
  color: var(--muted);
  font-size: var(--text-xs);
}

.match-reasons {
  padding: 15px;
  margin-top: 16px;
  color: var(--ink-2);
  background: var(--surface-2);
  border-radius: 6px;
  font-size: var(--text-md);
}

.match-reasons ul {
  padding-left: 18px;
  margin: 8px 0 0;
}

.drawer-muted {
  color: var(--muted);
  font-size: var(--text-md);
}

.drawer-article-link {
  display: grid;
  gap: 4px;
  padding: 12px;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.drawer-article-link strong {
  font-size: var(--text-md);
}

.drawer-article-link span {
  color: var(--muted);
  font-size: var(--text-sm);
}

.article-modal-card {
  width: min(650px, calc(100vw - 32px));
}

/* Performance approval workflow */

.workflow-page {
  max-width: 1680px;
}

.workflow-heading {
  align-items: flex-end;
}

.workflow-create-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.workflow-role-notice {
  margin-bottom: 14px;
}

.workflow-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 0;
}

.workflow-summary-grid > button,
.workflow-summary-item {
  min-height: 0;
  padding: 12px 14px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.workflow-summary-grid > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.workflow-summary-grid > button:hover {
  border-color: var(--science);
  background: color-mix(in srgb, var(--science-soft) 34%, var(--surface));
}

.workflow-summary-grid span {
  color: var(--muted);
  font-size: var(--text-md);
  font-weight: 700;
}

.workflow-summary-grid strong {
  font-size: 22px;
  line-height: 1.1;
}

.workflow-summary-item.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: workflow-skeleton 1.2s linear infinite;
}

@keyframes workflow-skeleton {
  to { background-position: -200% 0; }
}

.workflow-tabs {
  width: 100%;
  grid-template-columns: repeat(8, minmax(82px, 1fr));
  margin-bottom: 10px;
  overflow-x: auto;
}

.workflow-filter-bar {
  grid-template-columns: minmax(230px, 2fr) repeat(3, minmax(130px, 1fr)) auto;
}

.workflow-advanced-filters {
  grid-column: 1 / -1;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.workflow-advanced-filters summary {
  width: fit-content;
  color: var(--science-strong);
  cursor: pointer;
  font-size: var(--text-md);
  font-weight: 700;
}

.workflow-advanced-filters > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 10px;
}

.workflow-advanced-filters label {
  display: grid;
  gap: 3px;
}

.workflow-advanced-filters label > span {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
}

.workflow-live-state {
  min-height: 24px;
  padding: 2px 0 5px;
  color: var(--muted);
  font-size: var(--text-md);
}

.workflow-live-state[data-type="error"],
.workflow-live-state[data-type="forbidden"] {
  color: var(--kimchi);
  font-weight: 700;
}

.workflow-live-state[data-type="warning"] {
  color: var(--mustard);
}

.workflow-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 14px;
  align-items: start;
}

.workflow-queue,
.workflow-detail {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.workflow-queue .list-summary {
  padding: 12px 15px;
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.workflow-queue .data-table-wrap {
  border: 0;
  border-radius: 0 0 8px 8px;
}

.workflow-table {
  min-width: 880px;
}

.workflow-table th {
  white-space: nowrap;
}

.workflow-table td {
  vertical-align: middle;
}

.workflow-table td > strong,
.workflow-table td > span,
.workflow-table td > small,
.workflow-table td > time {
  display: block;
}

.workflow-table td > small {
  max-width: 210px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--text-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-table tbody tr {
  cursor: pointer;
}

.workflow-table tbody tr:hover,
.workflow-table tbody tr.selected {
  background: color-mix(in srgb, var(--science-soft) 40%, var(--surface));
}

.workflow-table tbody tr.selected {
  box-shadow: inset 3px 0 var(--science);
}

.workflow-domain,
.workflow-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 23px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1.35;
}

.workflow-domain.domain-kscia {
  color: var(--science-strong);
  background: var(--science-soft);
  border-color: color-mix(in srgb, var(--science) 28%, var(--line));
}

.workflow-domain.domain-gka {
  color: var(--green);
  background: var(--green-soft);
  border-color: color-mix(in srgb, var(--green) 28%, var(--line));
}

.workflow-domain.domain-pims {
  color: var(--mustard);
  background: var(--mustard-soft);
  border-color: color-mix(in srgb, var(--mustard) 28%, var(--line));
}

.workflow-status {
  color: var(--ink-2);
  background: var(--surface-2);
}

.workflow-status.status-submitted,
.workflow-status.status-resubmitted {
  color: var(--science-strong);
  background: var(--science-soft);
}

.workflow-status.status-under_review,
.workflow-status.status-pending_approval {
  color: var(--mustard);
  background: var(--mustard-soft);
}

.workflow-status.status-approved {
  color: var(--green);
  background: var(--green-soft);
}

.workflow-status.status-changes_requested,
.workflow-status.status-rejected,
.workflow-status.status-cancelled {
  color: var(--kimchi);
  background: var(--kimchi-soft);
}

.workflow-detail {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
}

.workflow-detail > .empty-state {
  min-height: 220px;
  display: grid;
  place-content: center;
  padding: 28px 20px;
}

.workflow-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.workflow-detail-header h2 {
  margin: 7px 0 3px;
  overflow-wrap: anywhere;
  font-size: 19px;
}

.workflow-detail-header p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-md);
}

.workflow-detail-header > div:last-child {
  display: grid;
  justify-items: end;
  gap: 4px;
  white-space: nowrap;
}

.workflow-detail > section {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}

.workflow-detail section h3 {
  margin: 0 0 10px;
  font-size: var(--text-body-sm);
}

.workflow-detail section h3 span {
  color: var(--muted);
  font-size: var(--text-xs);
}

.workflow-definition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 14px;
  margin: 0;
}

.workflow-definition-grid > div {
  min-width: 0;
  padding-bottom: 6px;
}

.workflow-definition-grid dt {
  color: var(--muted);
  font-size: var(--text-xs);
}

.workflow-definition-grid dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  font-size: var(--text-md);
  font-weight: 700;
  white-space: pre-wrap;
}

.workflow-validation {
  color: var(--mustard);
  background: var(--mustard-soft);
}

.workflow-validation.error {
  color: var(--kimchi);
  background: var(--kimchi-soft);
}

.workflow-validation ul {
  padding-left: 18px;
  margin: 0;
  font-size: var(--text-md);
}

.workflow-evidence-list {
  display: grid;
  gap: 7px;
}

.workflow-evidence-list article {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 10px;
  background: var(--surface-2);
  border-left: 3px solid var(--science);
  border-radius: 4px;
}

.workflow-evidence-list article strong {
  overflow-wrap: anywhere;
  font-size: var(--text-md);
}

.workflow-evidence-list article span,
.workflow-evidence-list article small {
  color: var(--muted);
  font-size: var(--text-xs);
}

.workflow-evidence-list article a {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--science-strong);
  font-size: var(--text-xs);
  font-weight: 700;
}

.workflow-official-impact {
  background: color-mix(in srgb, var(--green-soft) 58%, var(--surface));
}

.workflow-official-impact > strong {
  display: block;
  color: var(--green);
  font-size: var(--text-body-sm);
}

.workflow-official-impact p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: var(--text-xs);
}

.workflow-audit-timeline {
  padding: 0;
  margin: 0;
  list-style: none;
}

.workflow-audit-timeline li {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 2px 8px;
  position: relative;
  padding: 0 0 14px 16px;
  font-size: var(--text-xs);
}

.workflow-audit-timeline li::before {
  width: 8px;
  height: 8px;
  position: absolute;
  left: 0;
  top: 5px;
  content: "";
  background: var(--science);
  border-radius: 50%;
}

.workflow-audit-timeline li::after {
  width: 1px;
  position: absolute;
  left: 3px;
  top: 14px;
  bottom: -2px;
  content: "";
  background: var(--line);
}

.workflow-audit-timeline li:last-child::after {
  display: none;
}

.workflow-audit-timeline li > span {
  grid-column: 2;
  color: var(--ink);
  font-weight: 700;
}

.workflow-audit-timeline li > strong {
  grid-column: 2;
  color: var(--muted);
}

.workflow-audit-timeline li > time {
  grid-column: 3;
  grid-row: 1 / span 2;
  color: var(--muted);
}

.workflow-audit-timeline li > p {
  grid-column: 2 / -1;
  margin: 3px 0 0;
  color: var(--ink-2);
}

.workflow-detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  position: sticky;
  bottom: 0;
  padding: 13px 18px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.workflow-editor-card {
  width: min(880px, 100%);
}

.workflow-editor-card form {
  padding-top: 18px;
}

.workflow-domain-fields,
.workflow-evidence-fields {
  padding: 14px;
  margin: 17px 0 0;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.workflow-domain-fields legend,
.workflow-evidence-fields legend {
  padding: 0 7px;
  color: var(--ink);
  font-size: var(--text-md);
  font-weight: 700;
}

.workflow-evidence-fields {
  background: var(--surface-2);
}

.workflow-source-preview,
.workflow-impact-summary {
  padding: 11px 12px;
  color: var(--ink-2);
  background: var(--science-soft);
  border-left: 3px solid var(--science);
  border-radius: 4px;
  font-size: var(--text-md);
}

.workflow-source-preview strong,
.workflow-source-preview span,
.workflow-source-preview small {
  display: block;
}

.workflow-source-preview span,
.workflow-source-preview small {
  margin-top: 3px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.workflow-error-summary {
  margin-bottom: 12px;
}

.workflow-error-summary ul {
  margin: 6px 0 0;
}

.workflow-confirm-card {
  width: min(540px, 100%);
}

.workflow-confirm-card > .workflow-impact-summary {
  margin: 16px 27px 4px;
}

.workflow-confirm-card form {
  padding-top: 8px;
}

.gka-results-heading {
  align-items: flex-end;
}

.gka-results-heading .button {
  flex: 0 0 auto;
}

.gka-results-ribbon .text-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.gka-result-filters {
  margin-top: 18px;
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 190px) minmax(150px, 190px) auto;
}

.gka-result-table {
  min-width: 940px;
}

.gka-result-table td > strong,
.gka-result-table td > small,
.gka-result-table td > time {
  display: block;
}

.gka-result-table td > small {
  max-width: 250px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--text-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gka-result-row-actions {
  display: flex;
  gap: 5px;
  white-space: nowrap;
}

.gka-result-modal-card {
  width: min(900px, 100%);
}

.gka-result-modal-card > form {
  padding-top: 12px;
}

.gka-result-section {
  padding: 14px;
  margin: 12px 0 0;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.gka-result-section legend {
  padding: 0 7px;
  color: var(--ink);
  font-size: var(--text-md);
  font-weight: 700;
}

.field-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.field-with-action input {
  min-width: 0;
}

.sns-auto-refresh {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: 8px;
}

.sns-auto-refresh input {
  margin-top: 3px;
}

.sns-auto-refresh span {
  color: var(--text);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.sns-auto-refresh small {
  display: block;
  color: var(--muted);
  font-weight: 400;
}

.sns-metrics-status {
  margin: 0;
  grid-column: 1 / -1;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: var(--text-sm);
  background: var(--surface-2);
  color: var(--muted);
}

.sns-metrics-status.ok {
  color: var(--green, #1f7a3f);
  background: color-mix(in srgb, var(--green, #1f7a3f) 12%, var(--surface));
}

.sns-metrics-status.warn {
  color: var(--mustard, #9a6b00);
  background: color-mix(in srgb, var(--mustard, #9a6b00) 12%, var(--surface));
}

.sns-metrics-status.error {
  color: var(--danger, #b42318);
  background: color-mix(in srgb, var(--danger, #b42318) 12%, var(--surface));
}

.gka-result-evidence {
  background: var(--surface-2);
}

.gka-result-kind {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.gka-result-kind label {
  position: relative;
  cursor: pointer;
}

.gka-result-kind input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.gka-result-kind span {
  display: grid;
  min-height: 62px;
  align-content: center;
  gap: 3px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.gka-result-kind strong {
  font-size: var(--text-md);
}

.gka-result-kind small {
  color: var(--muted);
  font-size: var(--text-xs);
}

.gka-result-kind input:checked + span {
  color: var(--green);
  background: var(--green-soft);
  border-color: color-mix(in srgb, var(--green) 48%, var(--line));
  box-shadow: inset 3px 0 var(--green);
}

.gka-result-kind input:focus-visible + span {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.gka-result-modal-card footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.warning-text {
  color: var(--mustard) !important;
}

@media (max-width: 1180px) {
  .workflow-layout {
    grid-template-columns: 1fr;
  }

  .workflow-detail {
    position: static;
    max-height: none;
  }

  .dashboard-filter-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-filter-bar .button {
    width: 100%;
  }

  .pims-dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pims-dashboard-grid > :last-child {
    grid-column: 1 / -1;
  }

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

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

@media (max-width: 900px) {
  .gka-result-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gka-result-filters .search-field {
    grid-column: 1 / -1;
  }

  .gka-result-filters .filter-reset {
    width: 100%;
  }

  .workflow-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .workflow-filter-bar .search-field {
    grid-column: 1 / -1;
  }

  .workflow-filter-bar .filter-reset {
    width: 100%;
  }

  .workflow-advanced-filters > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-command-grid,
  .truth-grid {
    grid-template-columns: 1fr 1fr;
  }

  .quality-strip {
    grid-template-columns: 1fr 1fr;
  }

  .quality-strip > p {
    grid-column: 1 / -1;
  }

  .queue-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented-control {
    width: 100%;
    grid-template-columns: repeat(4, 1fr);
  }

  .queue-toolbar > .button {
    align-self: flex-end;
  }
}

@media (max-width: 660px) {
  .gka-results-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .gka-results-heading .button {
    width: 100%;
  }

  .gka-results-ribbon {
    align-items: flex-start;
  }

  .gka-results-ribbon .text-button {
    width: 100%;
    text-align: left;
  }

  .gka-result-filters,
  .gka-result-kind {
    grid-template-columns: 1fr;
  }

  .gka-result-filters .search-field {
    grid-column: auto;
  }

  .gka-result-table {
    min-width: 0;
  }

  .gka-result-table thead {
    display: none;
  }

  .gka-result-table,
  .gka-result-table tbody,
  .gka-result-table tr,
  .gka-result-table td {
    display: block;
    width: 100%;
  }

  .gka-result-table tr {
    position: relative;
    padding: 12px 52px 12px 13px;
    border-bottom: 1px solid var(--line);
  }

  .gka-result-table td {
    height: auto;
    padding: 4px 0;
    border: 0;
  }

  .gka-result-table td::before {
    display: inline-block;
    width: 88px;
    color: var(--muted);
    content: attr(data-label);
    font-size: var(--text-xs);
  }

  .gka-result-table td > strong,
  .gka-result-table td > small,
  .gka-result-table td > time,
  .gka-result-table td > .workflow-status {
    display: inline-flex;
    max-width: calc(100% - 94px);
    vertical-align: middle;
  }

  .gka-result-table .gka-result-row-actions {
    width: 38px;
    position: absolute;
    right: 8px;
    top: 10px;
    flex-direction: column;
  }

  .gka-result-table .gka-result-row-actions::before {
    display: none;
  }

  .gka-result-modal-card .form-grid {
    grid-template-columns: 1fr;
  }

  .gka-result-modal-card .form-grid .full {
    grid-column: auto;
  }

  .field-with-action {
    grid-template-columns: 1fr;
  }

  .gka-result-modal-card footer .button {
    flex: 1 1 120px;
  }

  .workflow-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .workflow-create-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workflow-create-actions .button {
    min-width: 0;
    padding-inline: 6px;
    font-size: var(--text-sm);
  }

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

  .workflow-summary-grid > button,
  .workflow-summary-item {
    min-height: 62px;
  }

  .workflow-tabs {
    grid-template-columns: repeat(8, minmax(94px, 1fr));
  }

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

  .workflow-filter-bar .search-field {
    grid-column: auto;
  }

  .workflow-advanced-filters > div {
    grid-template-columns: 1fr;
  }

  .workflow-table {
    min-width: 0;
  }

  .workflow-table thead {
    display: none;
  }

  .workflow-table,
  .workflow-table tbody,
  .workflow-table tr,
  .workflow-table td {
    display: block;
    width: 100%;
  }

  .workflow-table tr {
    position: relative;
    padding: 12px 48px 12px 13px;
    border-bottom: 1px solid var(--line);
  }

  .workflow-table td {
    height: auto;
    padding: 4px 0;
    border: 0;
  }

  .workflow-table td::before {
    display: inline-block;
    width: 96px;
    color: var(--muted);
    content: attr(data-label);
    font-size: var(--text-xs);
  }

  .workflow-table td > strong,
  .workflow-table td > span,
  .workflow-table td > small,
  .workflow-table td > time,
  .workflow-table td > .workflow-status {
    display: inline-flex;
    max-width: calc(100% - 102px);
    vertical-align: middle;
  }

  .workflow-table td:last-child {
    width: 36px;
    position: absolute;
    right: 10px;
    top: 12px;
  }

  .workflow-table td:last-child::before {
    display: none;
  }

  .workflow-detail-header,
  .workflow-definition-grid {
    grid-template-columns: 1fr;
  }

  .workflow-detail-header {
    display: grid;
  }

  .workflow-detail-header > div:last-child {
    justify-items: start;
  }

  .workflow-definition-grid {
    display: grid;
  }

  .workflow-editor-card .form-grid {
    grid-template-columns: 1fr;
  }

  .workflow-editor-card .form-grid .full {
    grid-column: auto;
  }

  .workflow-detail-actions .button {
    flex: 1 1 130px;
  }

  .workflow-audit-timeline li {
    grid-template-columns: 10px 1fr;
  }

  .workflow-audit-timeline li > time {
    grid-column: 2;
    grid-row: auto;
  }

  .project-command-grid,
  .truth-grid,
  .pims-dashboard-grid,
  .media-card-grid,
  .coverage-card-grid {
    grid-template-columns: 1fr;
  }

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

  .dashboard-filter-bar .button {
    width: 100%;
  }

  .pims-dashboard-grid > :last-child {
    grid-column: auto;
  }

  .source-chip {
    display: none;
  }

  .reference-notice,
  .candidate-notice {
    align-items: start;
    flex-direction: column;
    gap: 5px;
  }

  .quality-strip {
    grid-template-columns: 1fr;
  }

  .quality-strip > p {
    grid-column: auto;
  }

  .segmented-control {
    grid-template-columns: 1fr 1fr;
  }

  .queue-toolbar > .button {
    width: 100%;
  }

  .pims-table .mobile-secondary,
  .pims-article-table .mobile-secondary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    grid-column: 1 / -1;
    margin-top: 7px;
    text-align: left;
  }

  .pims-table tr.press-year-row {
    display: block;
    padding: 0;
    margin: 18px 0 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .pims-table tr.press-year-row:first-child {
    margin-top: 0;
  }

  .pims-table .press-year-row td {
    display: flex;
    align-items: baseline;
    height: auto;
    padding: 9px 10px;
    border-left: 3px solid var(--science);
    background: color-mix(in srgb, var(--science-soft) 58%, var(--surface));
  }

  .mobile-only {
    display: inline;
    color: var(--muted);
    font-size: var(--text-sm);
  }

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

  .labeling-actions {
    grid-template-columns: 1fr;
  }
}

/* Integrated overview: compact operations-dashboard composition */

#homePage {
  padding-top: 24px;
}

#homePage .compact-hero {
  align-items: center;
  padding: 0 0 16px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

#homePage .compact-hero h1 {
  font-size: clamp(22px, 1.1rem + 0.4vw, 26px);
  line-height: 1.25;
}

#homePage .compact-hero > div > p:last-child {
  margin-top: 6px;
  font-size: var(--text-body-sm);
}

#homePage .source-chip {
  align-self: center;
  padding: 7px 10px;
  background: var(--surface);
}

#homePage .dashboard-filter-bar {
  padding: 12px;
}

#homePage .dashboard-filter-bar select,
#homePage .dashboard-filter-bar input,
#homePage .dashboard-filter-bar .button {
  height: 36px;
}

#homePage .integrated-metrics {
  margin-top: 10px;
  gap: 14px;
}

#homePage .dashboard-metric-card {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 10px;
  min-height: 148px;
}

#homePage .dashboard-metric-card .dash-kpi-icon,
#homePage .dashboard-metric-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

#homePage .apex-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 12px;
}

#homePage .apex-section-head .section-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

#homePage .apex-domain-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

#homePage .dashboard-program-section {
  margin-top: 6px;
}

#homePage .apex-home-ops {
  margin-top: 4px;
}

#homePage .apex-home-ops .dashboard-attention-panel {
  border-color: color-mix(in srgb, var(--mustard) 35%, var(--line));
}

#homePage .project-command .command-actions .text-button {
  margin-top: 0;
}

#homePage .project-command.is-secondary {
  border-style: dashed;
}

#homePage .dashboard-filter-bar-simple {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

#homePage .dashboard-filter-bar-simple label {
  display: grid;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#homePage .dashboard-filter-bar-simple select {
  min-width: 140px;
}

@media (max-width: 1100px) {
  #homePage .apex-domain-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-metric-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  align-self: start;
  margin-top: 1px;
  border-radius: 6px;
}

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

.dashboard-metric-icon.science {
  color: var(--science);
  background: var(--science-soft);
}

.dashboard-metric-icon.approved {
  color: var(--green);
  background: var(--green-soft);
}

.dashboard-metric-icon.review {
  color: var(--mustard);
  background: var(--mustard-soft);
}

.dashboard-metric-icon.evidence {
  color: var(--action);
  background: var(--kimchi-soft);
}

.dashboard-domain-section {
  margin-top: 18px;
}

.dashboard-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 0 2px;
  margin-bottom: 9px;
}

.dashboard-section-heading .eyebrow,
.dashboard-section-heading h2,
.dashboard-section-heading > p {
  margin: 0;
}

.dashboard-section-heading .eyebrow {
  margin-bottom: 2px;
}

.dashboard-section-heading h2 {
  font-size: 18px;
  line-height: 1.35;
}

.dashboard-section-heading > p {
  color: var(--muted);
  font-size: var(--text-sm);
}

#homePage .dashboard-domain-grid {
  margin-top: 0;
}

#homePage .project-command {
  min-height: 246px;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-top-width: 2px;
  box-shadow: var(--shadow-sm);
}

#homePage .project-command > header h3 {
  font-size: 16px;
}

#homePage .command-stats {
  padding: 12px 0;
  margin-top: 12px;
}

#homePage .command-stats strong {
  font-size: 22px;
}

#homePage .domain-source-fact,
#homePage .domain-notice {
  margin-top: 8px;
}

#homePage .project-command > .text-button {
  margin-top: auto;
  padding-top: 10px;
}

#homePage .panel {
  min-height: 0;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

#homePage .panel-header {
  margin-bottom: 14px;
}

#homePage .panel-header h3 {
  font-size: 16px;
}

@media (max-width: 900px) {
  #homePage {
    padding-top: 20px;
  }

}

@media (max-width: 660px) {
  #homePage .compact-hero {
    padding-bottom: 12px;
  }

  #homePage .compact-hero h1 {
    font-size: 24px;
  }

  #homePage .dashboard-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px;
  }

  #homePage .dashboard-filter-bar .button {
    grid-column: 1 / -1;
  }

  #homePage .integrated-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  #homePage .metric-card {
    min-height: 112px;
    padding: 13px;
  }

  #homePage .dashboard-metric-card {
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: 128px;
  }

  .dashboard-metric-icon {
    width: 38px;
    height: 38px;
  }

  .dashboard-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  #homePage .project-command,
  #homePage .panel {
    padding: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ===== Settings hub (2026-07-31) ===== */
.settings-hub {
  overflow-x: clip;
}

.settings-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.settings-heading-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.settings-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--line, var(--outline, #e2e5ea));
  border-radius: 8px;
}

.settings-role-badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--science-soft, #e1f3f7);
  color: var(--science-strong, #07556b);
  font-size: 12px;
  font-weight: 700;
}

.settings-save-status {
  min-width: 7rem;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.settings-save-status[data-status="dirty"] { color: var(--warning, #8a5a14); }
.settings-save-status[data-status="saving"] { color: var(--science, #087c98); }
.settings-save-status[data-status="success"] { color: var(--success, #066657); }
.settings-save-status[data-status="error"] { color: var(--danger, #b42318); }

.settings-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: 8px;
}

.settings-nav-rail {
  position: sticky;
  top: 16px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line, #e2e5ea);
  border-radius: 12px;
}

.settings-nav {
  display: grid;
  gap: 4px;
}

.settings-nav-label {
  margin: 10px 8px 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.settings-nav-item {
  display: block;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.settings-nav-item:hover {
  background: var(--surface-subtle, #f1f3f6);
}

.settings-nav-item.active {
  color: var(--science-strong, #07556b);
  background: var(--science-soft, #e1f3f7);
}

.settings-nav-mobile {
  display: none;
}

.settings-panel-body {
  min-width: 0;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line, #e2e5ea);
  border-radius: 12px;
}

.settings-section-head {
  margin-bottom: 18px;
}

.settings-section-head h2,
.settings-section-head h3 {
  margin: 0 0 6px;
}

.settings-section-head p,
.settings-muted {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.settings-section-head.compact {
  margin-bottom: 12px;
}

.settings-block {
  padding: 16px 0;
  border-top: 1px solid var(--line, #e2e5ea);
}

.settings-block:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.settings-block h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.settings-account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.settings-field-readonly {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  background: var(--surface-subtle, #f1f3f6);
  border-radius: 8px;
}

.settings-field-readonly span,
.settings-field-readonly small {
  color: var(--muted);
  font-size: 12px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line, #e2e5ea);
}

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

.settings-row-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.settings-row-copy small {
  color: var(--muted);
  font-size: 12px;
}

.settings-row select,
.settings-row input[type="text"],
.settings-row input[type="number"] {
  min-width: 160px;
  max-width: 240px;
}

.settings-switch-row.is-disabled {
  opacity: 0.72;
}

.settings-switch {
  width: 42px;
  height: 24px;
  accent-color: var(--science, #087c98);
}

.settings-choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-choice {
  min-height: 40px;
  padding: 8px 14px;
  color: var(--ink);
  background: var(--surface-subtle, #f1f3f6);
  border: 1px solid var(--line, #e2e5ea);
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.settings-choice.active,
.settings-choice[aria-checked="true"] {
  color: var(--science-strong, #07556b);
  background: var(--science-soft, #e1f3f7);
  border-color: color-mix(in srgb, var(--science, #087c98) 35%, var(--line, #e2e5ea));
}

.settings-password-card {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line, #e2e5ea);
}

.settings-password-form {
  display: grid;
  gap: 12px;
  max-width: 420px;
}

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

.settings-more-options {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line, #e2e5ea);
  border-radius: 10px;
  background: var(--surface-2, #f7f8fa);
}

.settings-more-options > summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
}

.settings-more-options[open] > summary {
  margin-bottom: 10px;
}

.settings-field-readonly.full {
  grid-column: 1 / -1;
}

.settings-session-list {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.settings-session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line, #e2e5ea);
  border-radius: 8px;
}

.settings-session-item.is-current {
  background: var(--science-soft, #e1f3f7);
}

.settings-session-item strong,
.settings-session-item small {
  display: block;
}

.settings-session-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.settings-badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line, #e2e5ea);
  font-size: 12px;
  font-weight: 700;
}

.settings-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-status-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.settings-status-summary > div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: var(--surface-subtle, #f1f3f6);
  border-radius: 8px;
}

.settings-status-summary span {
  color: var(--muted);
  font-size: 12px;
}

.settings-fact-list {
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  line-height: 1.6;
}

.settings-status-pill {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.settings-status-pill.ok {
  color: var(--success, #066657);
  background: var(--success-soft, #e1f3ef);
}

.settings-status-pill.warn {
  color: var(--warning, #8a5a14);
  background: var(--warning-soft, #fff4dc);
}

:root[data-reduce-motion="true"] *,
:root[data-reduce-motion="true"] *::before,
:root[data-reduce-motion="true"] *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

:root[data-high-contrast-focus="true"] :focus-visible {
  outline: 3px solid var(--science, #087c98);
  outline-offset: 2px;
}

:root[data-table-wrap="true"] .data-table td,
:root[data-table-wrap="true"] .data-table th {
  white-space: normal;
}

@media (max-width: 760px) {
  .settings-shell {
    grid-template-columns: 1fr;
  }

  .settings-nav-rail {
    display: none;
  }

  .settings-nav-mobile {
    display: grid;
  }

  .settings-account-grid,
  .settings-status-summary {
    grid-template-columns: 1fr;
  }

  .settings-row {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-row select,
  .settings-row input[type="text"],
  .settings-row input[type="number"] {
    max-width: none;
    width: 100%;
  }

  .settings-heading-actions {
    width: 100%;
  }
}

/* Theme toggle + accent swatches */
.topbar-actions .theme-toggle-button {
  color: var(--text-secondary, var(--ink-2));
}

.appearance-toggle-button {
  position: relative;
}

.appearance-toggle-swatch {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--color-primary, var(--science, #0a6ebd));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    0 0 0 1.5px color-mix(in srgb, var(--text-secondary, #64748b) 45%, transparent);
}

.appearance-menu {
  min-width: 220px;
  padding: 14px;
}

.appearance-menu .settings-accent-swatches,
.appearance-menu .appearance-choice-grid.settings-accent-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}

.settings-theme-icon-grid {
  gap: 10px;
}

.settings-theme-icon-choice {
  width: 52px;
  min-width: 52px;
  height: 52px;
  padding: 0;
  display: grid;
  place-items: center;
}

.settings-theme-glyph {
  display: grid;
  place-items: center;
  color: currentColor;
}

.settings-accent-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.accent-swatch {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  max-width: 32px;
  flex: 0 0 32px;
  padding: 0 !important;
  border-radius: 999px !important;
  border: 2px solid color-mix(in srgb, #fff 70%, transparent);
  background: var(--swatch, #0a6ebd) !important;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  color: transparent !important;
  text-align: center !important;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.accent-swatch:hover {
  transform: scale(1.08);
  background: var(--swatch, #0a6ebd) !important;
  color: transparent !important;
}

.accent-swatch.active,
.accent-swatch[aria-checked="true"],
.accent-swatch.is-selected {
  background: var(--swatch, #0a6ebd) !important;
  color: transparent !important;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.16),
    0 0 0 2px var(--surface, #fff),
    0 0 0 4px var(--swatch, #0a6ebd);
}

.accent-swatch:focus-visible {
  outline: 3px solid var(--science, #087c98);
  outline-offset: 2px;
}

.appearance-menu .settings-accent-swatches {
  margin-top: 0;
}

.accent-color-open-button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 10px;
  padding: 12px 14px;
  text-align: left;
  color: var(--ink);
  background: var(--surface, #fff);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.accent-color-open-button:hover {
  background: color-mix(in srgb, var(--science-soft, rgba(10, 110, 189, 0.08)) 80%, var(--surface));
  border-color: color-mix(in srgb, var(--science, #0a6ebd) 35%, var(--line));
}

.accent-color-open-button:focus-visible {
  outline: 3px solid var(--science, #087c98);
  outline-offset: 2px;
}

.accent-color-open-copy {
  display: grid;
  gap: 2px;
}

.accent-color-open-copy strong {
  font-size: 14px;
  font-weight: 700;
}

.accent-color-open-copy small {
  color: var(--ink-2, #64748b);
  font-size: 12px;
}

.accent-color-half-swatch {
  display: inline-block;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, #000 12%, transparent);
  background: linear-gradient(
    90deg,
    var(--swatch, #0a6ebd) 0 50%,
    #ffffff 50% 100%
  );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.accent-color-modal-card {
  width: min(440px, 100%);
}

.accent-color-modal-card .modal-header,
#settingsResetModal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 8px;
}

.accent-color-modal-card .modal-header h2,
#settingsResetModal .modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.accent-color-modal-body,
#settingsResetModal .modal-body {
  padding: 8px 20px 12px;
}

.accent-color-modal-note {
  margin: 0 0 14px;
  color: var(--ink-2, #64748b);
  font-size: 13px;
  line-height: 1.45;
}

.accent-color-category-title {
  margin: 0 0 10px;
  color: var(--ink-2, #64748b);
  font-size: 12px;
  font-weight: 700;
}

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

.accent-color-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 10px;
  text-align: left;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.accent-color-option:hover {
  background: color-mix(in srgb, var(--ink) 4%, transparent);
}

.accent-color-option.is-selected {
  background: color-mix(in srgb, var(--ink) 6%, var(--surface, #fff));
  border-color: color-mix(in srgb, var(--ink) 18%, transparent);
}

.accent-color-option:focus-visible {
  outline: 3px solid var(--science, #087c98);
  outline-offset: 2px;
}

.accent-color-option .accent-color-half-swatch {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
}

.accent-color-option.is-selected .accent-color-half-swatch {
  box-shadow:
    0 0 0 2px var(--surface, #fff),
    0 0 0 3.5px var(--ink);
}

.accent-color-option-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.accent-color-option-copy strong {
  font-size: 14px;
  font-weight: 700;
}

.accent-color-applied-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--ink-2, #475569);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.3;
}

.accent-color-modal-footer,
#settingsResetModal .modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 20px 18px;
}

:root[data-theme="dark"] .accent-color-half-swatch {
  border-color: color-mix(in srgb, #fff 18%, transparent);
  background: linear-gradient(
    90deg,
    var(--swatch, #0a6ebd) 0 50%,
    #1f2937 50% 100%
  );
}

:root[data-theme="dark"] .accent-color-option.is-selected {
  background: color-mix(in srgb, #fff 8%, transparent);
}

@media (max-width: 520px) {
  .accent-color-grid {
    grid-template-columns: 1fr;
  }
}

:root[data-theme="dark"] .accent-swatch {
  border-color: color-mix(in srgb, #000 25%, transparent);
}

:root[data-theme="dark"] .accent-swatch.active,
:root[data-theme="dark"] .accent-swatch[aria-checked="true"],
:root[data-theme="dark"] .accent-swatch.is-selected {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 0 0 2px var(--surface, #18242e),
    0 0 0 4px var(--swatch, #0a6ebd);
}

:root[data-theme="dark"] .appearance-toggle-swatch {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    0 0 0 1.5px color-mix(in srgb, #fff 28%, transparent);
}
