:root {
  --ink: #112530;
  --ink-soft: #50616a;
  --navy: #0b2430;
  --navy-2: #113746;
  --teal: #167c76;
  --teal-bright: #49c3b1;
  --teal-soft: #e6f5f2;
  --blue-soft: #eaf2f7;
  --amber: #9b651a;
  --amber-soft: #fff4dc;
  --red: #a83d3d;
  --red-soft: #feeeee;
  --violet: #63558b;
  --violet-soft: #f0edfa;
  --bg: #eef2f3;
  --surface: #ffffff;
  --surface-subtle: #f7f9f9;
  --line: #d7e0e3;
  --line-strong: #bdcbd0;
  --shadow: 0 14px 36px rgba(11, 36, 48, 0.08);
  --radius: 14px;
  --radius-sm: 9px;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(22,124,118,.035) 1px, transparent 1px),
    linear-gradient(rgba(22,124,118,.035) 1px, transparent 1px),
    var(--bg);
  background-size: 32px 32px;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 8px;
  transform: translateY(-150%);
  color: white;
  background: var(--navy);
}
.skip-link:focus { transform: translateY(0); }

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 28px;
  min-height: 78px;
  padding: 12px 28px;
  color: white;
  background: var(--navy);
  box-shadow: 0 4px 24px rgba(4, 22, 31, .2);
}

.brand-block { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.brand-block:hover .brand-title { color: var(--teal-bright); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 11px;
  background: rgba(255,255,255,.07);
}
.brand-mark span { color: var(--teal-bright); font-size: .86rem; font-weight: 900; letter-spacing: .06em; }
.brand-title { font-size: 1.14rem; font-weight: 800; letter-spacing: .08em; }
.brand-subtitle { margin-top: 2px; color: #bad0d7; font-size: .79rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.institution-block { display: grid; gap: 3px; text-align: center; font-size: .8rem; color: #c9d8dd; }
.institution-block .eyebrow { color: white; }
.institution-note { color: #9db9c1; font-size: .7rem; }
.storage-status { justify-self: end; display: flex; align-items: center; gap: 8px; color: #d4e1e4; font-size: .82rem; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal-bright); box-shadow: 0 0 0 4px rgba(73,195,177,.12); }

.app-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: calc(100vh - 78px); }
.sidebar {
  position: sticky;
  top: 78px;
  align-self: start;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 78px);
  padding: 22px 14px;
  border-right: 1px solid #cbd7db;
  background: rgba(247, 249, 249, .93);
  backdrop-filter: blur(12px);
}
.primary-nav { display: grid; gap: 5px; }
.nav-button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 9px;
  color: #40545d;
  background: transparent;
  text-align: left;
  font-size: .91rem;
  font-weight: 650;
}
.nav-button:hover { background: #e9eff1; color: var(--navy); }
.nav-button.active { color: white; background: var(--navy-2); box-shadow: 0 5px 14px rgba(17,55,70,.18); }
.nav-icon { width: 18px; text-align: center; font-size: .72rem; letter-spacing: -.1em; opacity: .9; }
.sidebar-note { margin-top: auto; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: 0 5px 20px rgba(11,36,48,.05); }
.sidebar-note-label, .step-kicker, .eyebrow { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .105em; text-transform: uppercase; }
.sidebar-note-label { margin-bottom: 10px; color: var(--teal); }
.sidebar-note strong { display: block; margin-bottom: 5px; font-size: .9rem; }
.sidebar-note p { margin: 0; color: var(--ink-soft); font-size: .78rem; line-height: 1.5; }

main { min-width: 0; padding: 34px clamp(22px, 4vw, 56px) 72px; }
#app { max-width: 1420px; margin: 0 auto; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-head .eyebrow { margin-bottom: 8px; color: var(--teal); }
h1, h2, h3 { margin: 0; letter-spacing: -.025em; color: var(--navy); }
h1 { font-size: clamp(1.65rem, 2.6vw, 2.35rem); line-height: 1.14; }
h2 { font-size: 1.15rem; line-height: 1.3; }
h3 { font-size: .99rem; line-height: 1.35; }
p { line-height: 1.58; }
.page-head p { max-width: 720px; margin: 8px 0 0; color: var(--ink-soft); }

.content-grid { display: grid; gap: 20px; }
.content-grid-main { grid-template-columns: minmax(0, 2fr) minmax(280px, .8fr); align-items: start; }
.panel, .method-card, .stat-card, .notice, .empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.panel { overflow: hidden; }
.panel + .panel { margin-top: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.panel-head .step-kicker { margin-bottom: 5px; color: var(--teal); }
.panel-body { padding: 22px; }
.panel-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 22px; border-top: 1px solid var(--line); background: var(--surface-subtle); }
.panel-actions-right { display: flex; gap: 10px; margin-left: auto; }
.method-card { position: sticky; top: 102px; padding: 24px; color: #dbe8ea; border-color: #234755; background: linear-gradient(155deg, var(--navy) 0%, #103947 100%); box-shadow: 0 20px 44px rgba(9,34,45,.18); }
.method-card .eyebrow { color: var(--teal-bright); }
.method-card h2 { margin: 10px 0 10px; color: white; font-size: 1.25rem; }
.method-card p { margin: 0; font-size: .9rem; }
.method-card .fine-print { color: #b6cbd0; font-size: .78rem; }
.method-rule { margin: 20px 0; padding: 15px 16px; border: 1px solid rgba(73,195,177,.3); border-radius: 10px; background: rgba(73,195,177,.08); }
.method-rule span { display: block; margin-bottom: 3px; color: #a9d8d1; font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.method-rule strong { color: white; font-size: 1.18rem; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; padding: 22px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.one { grid-template-columns: 1fr; }
.preview-form { opacity: .72; }
label, .field-group { display: grid; gap: 7px; color: #354b55; font-size: .84rem; font-weight: 720; }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: white;
  outline: none;
  transition: border-color .16s, box-shadow .16s;
}
textarea { min-height: 100px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(22,124,118,.12); }
input:disabled, select:disabled { background: #f2f5f5; }
.input-prefix { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: #f7f9f9; color: var(--ink-soft); }
.input-prefix input { min-width: 0; border: 0; box-shadow: none; background: transparent; }
.required::after { content: " *"; color: var(--red); }
.helper { color: var(--ink-soft); font-size: .75rem; font-weight: 500; line-height: 1.45; }
.field-error { color: var(--red); font-size: .76rem; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: .86rem;
  font-weight: 760;
  text-decoration: none;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button-primary { color: white; background: var(--teal); box-shadow: 0 6px 14px rgba(22,124,118,.2); }
.button-primary:hover:not(:disabled) { background: #126e69; }
.button-dark { color: white; background: var(--navy); }
.button-secondary { color: var(--navy); border-color: var(--line-strong); background: white; }
.button-ghost { color: var(--ink-soft); background: transparent; }
.button-danger { color: white; background: var(--red); }
.button-danger-outline { color: var(--red); border-color: #e3adad; background: white; }
.button-small { min-height: 34px; padding: 6px 10px; font-size: .76rem; }
.button-wide { min-width: 190px; }

.badge, .status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  white-space: nowrap;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .035em;
}
.badge { min-width: 48px; padding: 6px 9px; }
.status-pill { padding: 5px 9px; color: #496069; background: #e9eff1; }
.badge-a { color: #0d655e; background: var(--teal-soft); }
.badge-b { color: #315d79; background: var(--blue-soft); }
.badge-c { color: #8a5a18; background: var(--amber-soft); }
.badge-x { color: #5d4b87; background: var(--violet-soft); }
.badge-danger { color: var(--red); background: var(--red-soft); }
.badge-neutral { color: #53666e; background: #edf1f2; }
.status-locked { color: #315d79; background: var(--blue-soft); }
.status-complete { color: #0d655e; background: var(--teal-soft); }

.subtle { color: var(--ink-soft); font-size: .8rem; line-height: 1.45; }
.fine { font-size: .76rem; color: var(--ink-soft); }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .9em; }
.divider { height: 1px; margin: 0 22px; background: var(--line); }
.hidden { display: none !important; }

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(8, minmax(72px, 1fr));
  gap: 4px;
  margin: 0 0 22px;
  padding: 8px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  box-shadow: 0 8px 26px rgba(11,36,48,.05);
}
.workflow-step { position: relative; min-width: 82px; padding: 10px 8px; border-radius: 8px; color: #66777d; text-align: center; font-size: .7rem; font-weight: 720; }
.workflow-step span { display: grid; place-items: center; width: 22px; height: 22px; margin: 0 auto 5px; border: 1px solid var(--line-strong); border-radius: 50%; background: white; font-size: .68rem; }
.workflow-step.active { color: var(--navy); background: var(--teal-soft); }
.workflow-step.active span { color: white; border-color: var(--teal); background: var(--teal); }
.workflow-step.done { color: var(--teal); }
.workflow-step.done span { color: var(--teal); border-color: #91ccc4; background: #edf9f7; }

.tag-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-option { position: relative; }
.tag-option input { position: absolute; opacity: 0; pointer-events: none; }
.tag-option span { display: block; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: #566a72; background: white; font-size: .75rem; font-weight: 650; cursor: pointer; }
.tag-option input:focus-visible + span { outline: 3px solid rgba(22,124,118,.18); }
.tag-option input:checked + span { color: #0e6862; border-color: #7ec5bb; background: var(--teal-soft); }

.issue-list, .allocation-list, .audit-list { display: grid; gap: 10px; }
.issue-card, .allocation-card, .audit-entry {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}
.issue-card { justify-content: space-between; }
.issue-text { font-weight: 700; }
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.tag { padding: 3px 7px; border-radius: 999px; color: #53666e; background: #edf2f3; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.allocation-card { position: relative; }
.allocation-order { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px; color: white; background: var(--navy); font-size: .76rem; font-weight: 850; }
.allocation-order.alt { color: var(--teal); border: 1px solid #a8d8d1; background: #edf9f7; }
.allocation-copy { min-width: 0; flex: 1; }
.allocation-question { margin: 1px 0 7px; color: var(--navy); font-weight: 780; line-height: 1.45; }
.allocation-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.allocation-actions { margin-left: auto; }
.replaced-card { opacity: .6; background: #f6f8f8; }
.replaced-card::after { content: "Replaced"; position: absolute; top: 12px; right: 12px; color: var(--red); font-size: .67rem; font-weight: 800; text-transform: uppercase; }

.notice { display: flex; gap: 13px; padding: 16px 18px; box-shadow: none; }
.notice + .notice { margin-top: 12px; }
.notice-icon { display: grid; place-items: center; flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; font-weight: 900; }
.notice-info { border-color: #b8d5dd; background: #f0f8fa; }
.notice-info .notice-icon { color: #315d79; background: #dbeef3; }
.notice-warning { border-color: #ead29f; background: #fffaf0; }
.notice-warning .notice-icon { color: var(--amber); background: #f9e9bf; }
.notice-danger { border-color: #e5b8b8; background: #fff5f5; }
.notice-danger .notice-icon { color: var(--red); background: #f7dddd; }
.notice strong { display: block; margin-bottom: 3px; color: var(--navy); font-size: .86rem; }
.notice p { margin: 0; color: var(--ink-soft); font-size: .79rem; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { padding: 18px; box-shadow: 0 7px 24px rgba(11,36,48,.05); }
.stat-label { display: block; margin-bottom: 10px; color: var(--ink-soft); font-size: .74rem; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.stat-value { display: block; color: var(--navy); font-size: 1.75rem; font-weight: 820; letter-spacing: -.04em; }
.stat-context { display: block; margin-top: 4px; color: #718087; font-size: .72rem; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: #5b6e75; background: #f5f8f8; font-size: .69rem; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
td { color: #2e454e; font-size: .8rem; line-height: 1.45; }
tbody tr:hover { background: #f8fbfb; }
tbody tr:last-child td { border-bottom: 0; }
.row-actions { display: flex; gap: 7px; justify-content: flex-end; white-space: nowrap; }
.question-cell { min-width: 270px; color: var(--navy); font-weight: 680; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--surface-subtle); }
.filter-bar label { min-width: 150px; flex: 1 1 160px; }
.filter-bar .search-field { flex: 2 1 260px; }

.empty-state { padding: 42px 26px; text-align: center; box-shadow: none; }
.empty-symbol { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 13px; color: var(--teal); background: var(--teal-soft); font-weight: 900; }
.empty-state h2 { margin-bottom: 8px; }
.empty-state p { max-width: 540px; margin: 0 auto 18px; color: var(--ink-soft); font-size: .88rem; }

.pretest-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: 18px; }
.confirmation-list { display: grid; gap: 12px; }
.confirmation-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: #f9fbfb; }
.confirmation-row > span { color: #304750; font-size: .82rem; font-weight: 650; }
.choice-group { display: flex; gap: 6px; }
.choice-group label { display: block; }
.choice-group input { position: absolute; opacity: 0; }
.choice-group span { display: block; min-width: 44px; padding: 6px 9px; border: 1px solid var(--line-strong); border-radius: 7px; text-align: center; font-size: .72rem; cursor: pointer; }
.choice-group input:checked + span { color: white; border-color: var(--teal); background: var(--teal); }

.lock-panel { padding: 28px; text-align: center; }
.lock-symbol { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 17px; border-radius: 18px; color: var(--teal); background: var(--teal-soft); font-size: 1.45rem; font-weight: 900; }
.lock-panel p { max-width: 650px; margin: 8px auto 20px; color: var(--ink-soft); font-size: .88rem; }
.locked-banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; padding: 20px 22px; border: 1px solid #98cbc5; border-radius: 13px; background: linear-gradient(135deg, #e7f6f3, #f6fbfa); }
.locked-banner strong { display: block; color: #0b5d57; font-size: 1.05rem; }
.locked-banner span { color: #47716e; font-size: .8rem; }

.progress-bar { height: 7px; overflow: hidden; border-radius: 999px; background: #dae3e5; }
.progress-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--teal); transition: width .25s ease; }

.audit-entry { align-items: center; }
.audit-time { flex: 0 0 148px; color: #667980; font-family: "SFMono-Regular", Consolas, monospace; font-size: .71rem; }
.audit-event { flex: 1; }
.audit-event strong { display: block; margin-bottom: 2px; color: var(--navy); font-size: .82rem; }
.audit-event span { color: var(--ink-soft); font-size: .73rem; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.settings-card { padding: 22px; }
.settings-card h2 { margin-bottom: 6px; }
.settings-card > p { margin: 0 0 18px; color: var(--ink-soft); font-size: .82rem; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.toggle-copy strong { display: block; margin-bottom: 3px; font-size: .85rem; }
.toggle-copy span { display: block; color: var(--ink-soft); font-size: .74rem; line-height: 1.4; }
.switch { position: relative; flex: 0 0 auto; width: 44px; height: 25px; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #b7c3c7; cursor: pointer; transition: .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(0,0,0,.18); transition: .15s; }
.switch input:checked + span { background: var(--teal); }
.switch input:checked + span::after { transform: translateX(19px); }
.switch input:focus-visible + span { outline: 3px solid rgba(22,124,118,.2); }

.mode-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mode-option { position: relative; }
.mode-option input { position: absolute; opacity: 0; }
.mode-card { display: block; height: 100%; padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: white; cursor: pointer; }
.mode-card strong { display: block; margin-bottom: 5px; color: var(--navy); font-size: .8rem; }
.mode-card span { display: block; color: var(--ink-soft); font-size: .69rem; font-weight: 500; line-height: 1.42; }
.mode-option input:checked + .mode-card { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(22,124,118,.13); background: var(--teal-soft); }
.research-flag { display: inline-flex !important; width: fit-content; margin-bottom: 7px; padding: 3px 6px; border-radius: 999px; color: var(--violet) !important; background: var(--violet-soft); font-size: .62rem !important; font-weight: 800 !important; text-transform: uppercase; letter-spacing: .04em; }

.chart-bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(130px, 220px) 1fr 44px; align-items: center; gap: 10px; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #3d535c; font-size: .75rem; }
.bar-track { height: 10px; overflow: hidden; border-radius: 999px; background: #e4eaec; }
.bar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), #52b2a5); }
.bar-value { color: var(--ink-soft); font-size: .72rem; text-align: right; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 22px; background: rgba(5,25,34,.62); backdrop-filter: blur(4px); }
.modal { width: min(660px, 100%); max-height: min(820px, 92vh); overflow-y: auto; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: 0 28px 80px rgba(3,22,30,.3); }
.modal-large { width: min(920px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 22px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 15px 22px; border-top: 1px solid var(--line); background: var(--surface-subtle); }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; color: var(--ink-soft); background: #edf2f3; }

.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 9px; width: min(380px, calc(100vw - 40px)); }
.toast { padding: 13px 15px; border: 1px solid #8bc8c0; border-radius: 10px; color: #164c48; background: #ecf9f7; box-shadow: 0 12px 30px rgba(11,36,48,.16); font-size: .82rem; font-weight: 650; animation: toast-in .2s ease-out; }
.toast.error { color: #813232; border-color: #e0aaaa; background: #fff0f0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ═══════════════════════════════════════════════════════════
   PPT — METHOD SELECTOR CARDS
═══════════════════════════════════════════════════════════ */
.method-select-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0 32px;
}
.method-select-card {
  display: block;
  padding: 26px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: white;
  cursor: pointer;
  transition: border-color .16s, box-shadow .16s;
  text-decoration: none;
}
.method-select-card:hover { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(22,124,118,.09); }
.method-select-card.ppt-variant:hover { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(155,101,26,.09); }
.method-select-label {
  display: block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .105em;
  text-transform: uppercase;
  margin-bottom: 10px;
  color: var(--teal);
}
.method-select-label.ppt-label { color: var(--amber); }
.method-select-card h3 { margin: 0 0 10px; font-size: 1.05rem; color: var(--navy); }
.method-select-card p { margin: 0 0 16px; font-size: .84rem; color: var(--ink-soft); line-height: 1.55; }
.method-select-footer { display: flex; align-items: center; justify-content: space-between; }
.method-select-card .start-hint { font-size: .75rem; color: var(--teal); font-weight: 700; }
.method-select-card.ppt-variant .start-hint { color: var(--amber); }

/* ═══════════════════════════════════════════════════════════
   PPT — BADGES
═══════════════════════════════════════════════════════════ */
.badge-ppt { color: #7a4b0f; background: #fff0d0; }
.badge-ppt-ref { color: #0d655e; background: var(--teal-soft); }
.badge-ppt-cand { color: #8a5a18; background: var(--amber-soft); }
.method-pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: .65rem; font-weight: 800; letter-spacing: .04em; }
.method-pill-sdlqb { color: #0d655e; background: var(--teal-soft); }
.method-pill-ppt { color: #8a5a18; background: var(--amber-soft); }

/* ═══════════════════════════════════════════════════════════
   PPT — METHOD CARD (amber-accented aside)
═══════════════════════════════════════════════════════════ */
.ppt-method-card {
  position: sticky;
  top: 102px;
  padding: 24px;
  color: #f0e4cb;
  border-color: #7a5518;
  border-radius: var(--radius);
  border: 1px solid #7a5518;
  background: linear-gradient(155deg, #3e2504 0%, #5e3f0e 100%);
  box-shadow: 0 20px 44px rgba(62,37,4,.25);
}
.ppt-method-card .eyebrow { color: #f5c874; }
.ppt-method-card h2 { margin: 8px 0 10px; color: white; font-size: 1.1rem; line-height: 1.3; }
.ppt-method-card p { margin: 0; font-size: .86rem; line-height: 1.5; }
.ppt-method-card .fine-print { color: #d9c59d; font-size: .76rem; }
.ppt-method-rule {
  margin: 12px 0;
  padding: 11px 14px;
  border: 1px solid rgba(245,200,116,.25);
  border-radius: 9px;
  background: rgba(245,200,116,.07);
}
.ppt-method-rule span { display: block; margin-bottom: 3px; color: #e5c888; font-size: .68rem; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.ppt-method-rule strong { color: white; font-size: .88rem; }
.ppt-method-card details summary {
  cursor: pointer;
  color: #e5c888;
  font-size: .76rem;
  font-weight: 700;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(245,200,116,.2);
  list-style: none;
  outline: none;
}
.ppt-method-card details summary::marker,
.ppt-method-card details summary::-webkit-details-marker { display: none; }
.ppt-method-card details summary::before { content: "▸ "; }
.ppt-method-card details[open] summary::before { content: "▾ "; }
.ppt-method-card details p { font-size: .75rem; line-height: 1.55; margin-top: 10px; color: #d9c59d; }

/* ═══════════════════════════════════════════════════════════
   PPT — SIDEBAR NOTE VARIANT
═══════════════════════════════════════════════════════════ */
.sidebar-note-ppt .sidebar-note-label { color: var(--amber); }

/* ═══════════════════════════════════════════════════════════
   PPT — WORKFLOW STRIP ACTIVE STATE
═══════════════════════════════════════════════════════════ */
.workflow-step.ppt-active { color: #4a3008; background: var(--amber-soft); }
.workflow-step.ppt-active span { color: white; border-color: var(--amber); background: var(--amber); }

/* ═══════════════════════════════════════════════════════════
   PPT — DISCLAIMER NOTICE
═══════════════════════════════════════════════════════════ */
.notice-ppt-disclaimer { border-color: #e0c97a; background: #fffdf0; }
.notice-ppt-disclaimer .notice-icon { color: #7a5518; background: #f9e9bf; }

/* ═══════════════════════════════════════════════════════════
   PPT — LIBRARY TABS
═══════════════════════════════════════════════════════════ */
.library-tabs,
.research-tabs {
  display: flex;
  gap: 4px;
  padding: 14px 18px 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface-subtle);
}
.library-tab,
.research-tab {
  position: relative;
  bottom: -1px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  color: var(--ink-soft);
  background: transparent;
  font-size: .82rem;
  font-weight: 720;
  cursor: pointer;
  transition: color .12s, background .12s;
}
.library-tab:hover,
.research-tab:hover { color: var(--navy); background: white; }
.library-tab.active,
.research-tab.active { color: var(--navy); background: white; border-color: var(--line); border-bottom-color: white; }
.library-tab.ppt-tab.active,
.research-tab.ppt-tab.active { color: var(--amber); }

/* ═══════════════════════════════════════════════════════════
   PPT — ADMINISTRATION RESPONSE BUTTONS
═══════════════════════════════════════════════════════════ */
.ppt-response-section { margin-bottom: 16px; }
.ppt-response-label { display: block; font-size: .79rem; font-weight: 750; color: #354b55; margin-bottom: 8px; letter-spacing: .01em; }
.ppt-response-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.ppt-resp-btn {
  min-height: 40px;
  padding: 7px 18px;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink-soft);
  background: white;
  font-size: .83rem;
  font-weight: 720;
  cursor: pointer;
  transition: border-color .13s, background .13s, color .13s;
}
.ppt-resp-btn:hover:not(:disabled) { border-color: var(--navy); color: var(--navy); }
.ppt-resp-btn:disabled { opacity: .55; cursor: not-allowed; }
.ppt-resp-btn.active-yes { color: white; border-color: var(--teal); background: var(--teal); }
.ppt-resp-btn.active-no { color: white; border-color: var(--navy); background: var(--navy); }
.ppt-resp-btn.active-qual { color: white; border-color: var(--amber); background: var(--amber); }
.ppt-resp-btn.active-imm { color: white; border-color: var(--teal); background: var(--teal); }
.ppt-resp-btn.active-hes { color: white; border-color: var(--amber); background: var(--amber); }

.ppt-yes-guidance {
  margin-top: 10px;
  padding: 13px 15px;
  border: 1px solid #a8d8d1;
  border-radius: 9px;
  background: var(--teal-soft);
}
.ppt-yes-guidance strong { display: block; font-size: .79rem; color: #0b5d57; margin-bottom: 5px; }
.ppt-yes-guidance p { margin: 0; font-size: .75rem; color: #2e6b66; line-height: 1.5; }
.ppt-clarification-panel {
  margin-top: 10px;
  padding: 14px 15px;
  border: 1px solid #e8d6a0;
  border-radius: 9px;
  background: var(--amber-soft);
}
.ppt-clarification-panel strong { display: block; font-size: .79rem; color: #7a4b0f; margin-bottom: 6px; }
.ppt-clarification-panel p { margin: 0 0 12px; font-size: .75rem; color: #5c3a09; line-height: 1.5; }
.ppt-research-meta { display: block; margin-top: 5px; font-size: .71rem; color: var(--ink-soft); font-style: italic; }

/* ═══════════════════════════════════════════════════════════
   PPT — LOCKED BANNER AMBER VARIANT
═══════════════════════════════════════════════════════════ */
.locked-banner-ppt {
  border-color: #d4a830;
  background: linear-gradient(135deg, #fff8e8, #fffdf4);
}
.locked-banner-ppt strong { color: #5c3a09; }
.locked-banner-ppt span { color: #7a5518; }

@media print {
  .app-header, .sidebar, .workflow-strip, .button, .filter-bar, .no-print { display: none !important; }
  .app-shell { display: block; }
  main { padding: 0; }
  body { background: white; }
  .panel, .method-card, .stat-card { box-shadow: none; break-inside: avoid; }
}

@media (max-width: 1040px) {
  .app-header { grid-template-columns: 1fr auto; }
  .institution-block { display: none; }
  .content-grid-main, .pretest-grid { grid-template-columns: 1fr; }
  .method-card, .ppt-method-card { position: static; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-3 { grid-column: span 2; }
  .method-select-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .app-header { position: relative; grid-template-columns: 1fr; gap: 10px; min-height: auto; padding: 14px 18px; }
  .storage-status { justify-self: start; }
  .app-shell { display: block; }
  .sidebar { position: sticky; top: 0; z-index: 25; min-height: auto; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .primary-nav { display: flex; overflow-x: auto; }
  .nav-button { flex: 0 0 auto; width: auto; padding: 9px 11px; }
  .sidebar-note { display: none; }
  main { padding: 24px 15px 56px; }
  .page-head { align-items: flex-start; }
  .form-grid, .form-grid.three, .settings-grid { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: span 1; }
  .mode-options { grid-template-columns: 1fr; }
  .panel-actions { align-items: stretch; flex-direction: column; }
  .panel-actions-right { width: 100%; margin: 0; }
  .panel-actions-right .button { flex: 1; }
  .audit-entry { display: grid; }
  .audit-time { flex-basis: auto; }
}

@media (max-width: 480px) {
  .brand-subtitle { max-width: 220px; }
  .stats-grid { grid-template-columns: 1fr; }
  .page-head { display: grid; }
  .workflow-strip { grid-template-columns: repeat(8, 82px); }
  .bar-row { grid-template-columns: 100px 1fr 36px; }
}
