/*
 * Dergi Atlası — scholarly editorial interface
 * A warm reading-room palette, ledger rhythm and restrained decision hierarchy.
 */

:root {
  color-scheme: light dark;
  --canvas: #f1ede3;
  --canvas-mark: rgba(73, 65, 51, 0.035);
  --paper: #fbf8f0;
  --paper-deep: #f5f0e5;
  --paper-raised: #fffdf7;
  --ink: #211f1a;
  --ink-muted: #625e55;
  --ink-faint: #6f695f;
  --rule: #d9d0c0;
  --rule-strong: #bcb09d;
  --forest: #245846;
  --forest-deep: #153d30;
  --forest-soft: #e2ebe4;
  --oxblood: #7b3034;
  --oxblood-deep: #5b2024;
  --oxblood-soft: #f1e4e2;
  --gold: #8b681d;
  --gold-soft: #f3ead0;
  --blue: #365f78;
  --blue-soft: #e4edf1;
  --green: #2f6a4d;
  --green-soft: #e3ede6;
  --amber: #8a5d17;
  --amber-soft: #f4e9d2;
  --red: #923e38;
  --red-soft: #f2e2df;
  --neutral-soft: #ece7dc;
  --on-accent: #fffdf8;
  --shadow-paper: 0 1px 0 rgba(61, 48, 31, 0.07), 0 20px 52px -44px rgba(43, 31, 17, 0.72);
  --shadow-float: 0 22px 60px -42px rgba(43, 31, 17, 0.64);
  --radius: 3px;
  --radius-sm: 2px;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: Aptos, "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue", sans-serif;
  --font-mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #171914;
    --canvas-mark: rgba(236, 229, 211, 0.025);
    --paper: #1e211b;
    --paper-deep: #24281f;
    --paper-raised: #262a21;
    --ink: #ede7d9;
    --ink-muted: #b6ae9f;
    --ink-faint: #9b9487;
    --rule: #383b32;
    --rule-strong: #565a4d;
    --forest: #8ab79f;
    --forest-deep: #acd0bd;
    --forest-soft: rgba(117, 173, 143, 0.14);
    --oxblood: #d18b80;
    --oxblood-deep: #e3a89d;
    --oxblood-soft: rgba(198, 111, 101, 0.15);
    --gold: #d1af62;
    --gold-soft: rgba(209, 175, 98, 0.14);
    --blue: #8cb5ca;
    --blue-soft: rgba(112, 164, 190, 0.14);
    --green: #8ab79f;
    --green-soft: rgba(117, 173, 143, 0.14);
    --amber: #d5ad62;
    --amber-soft: rgba(208, 166, 86, 0.14);
    --red: #dc9489;
    --red-soft: rgba(207, 119, 105, 0.14);
    --neutral-soft: rgba(224, 216, 199, 0.08);
    --on-accent: #111712;
    --shadow-paper: 0 1px 0 rgba(255, 255, 255, 0.025), 0 20px 52px -44px rgba(0, 0, 0, 0.95);
    --shadow-float: 0 22px 60px -42px rgba(0, 0, 0, 0.96);
  }
}

:root[data-theme="dark"] {
  --canvas: #171914;
  --canvas-mark: rgba(236, 229, 211, 0.025);
  --paper: #1e211b;
  --paper-deep: #24281f;
  --paper-raised: #262a21;
  --ink: #ede7d9;
  --ink-muted: #b6ae9f;
  --ink-faint: #9b9487;
  --rule: #383b32;
  --rule-strong: #565a4d;
  --forest: #8ab79f;
  --forest-deep: #acd0bd;
  --forest-soft: rgba(117, 173, 143, 0.14);
  --oxblood: #d18b80;
  --oxblood-deep: #e3a89d;
  --oxblood-soft: rgba(198, 111, 101, 0.15);
  --gold: #d1af62;
  --gold-soft: rgba(209, 175, 98, 0.14);
  --blue: #8cb5ca;
  --blue-soft: rgba(112, 164, 190, 0.14);
  --green: #8ab79f;
  --green-soft: rgba(117, 173, 143, 0.14);
  --amber: #d5ad62;
  --amber-soft: rgba(208, 166, 86, 0.14);
  --red: #dc9489;
  --red-soft: rgba(207, 119, 105, 0.14);
  --neutral-soft: rgba(224, 216, 199, 0.08);
  --on-accent: #111712;
  --shadow-paper: 0 1px 0 rgba(255, 255, 255, 0.025), 0 20px 52px -44px rgba(0, 0, 0, 0.95);
  --shadow-float: 0 22px 60px -42px rgba(0, 0, 0, 0.96);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  background-color: var(--canvas);
  background-image:
    linear-gradient(90deg, transparent 0, transparent calc(50% - 0.5px), var(--canvas-mark) 50%, transparent calc(50% + 0.5px)),
    repeating-linear-gradient(0deg, transparent 0, transparent 35px, var(--canvas-mark) 36px);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, dl { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
a { color: var(--forest); text-decoration: none; text-decoration-color: color-mix(in srgb, var(--forest) 42%, transparent); text-underline-offset: 0.2em; }
a:hover { color: var(--forest-deep); text-decoration-thickness: 1.5px; }
button, input, select, textarea { font: inherit; color: inherit; }
button, select, summary, input[type="checkbox"] { cursor: pointer; }
[hidden] { display: none !important; }
b, strong { font-weight: 650; }
code, kbd { font-family: var(--font-mono); }
code { padding: 0.08em 0.35em; background: var(--neutral-soft); border: 1px solid var(--rule); border-radius: 2px; font-size: 0.86em; }
kbd { display: inline-block; min-width: 1.6em; padding: 0 0.28em; border: 1px solid var(--rule); border-bottom-color: var(--rule-strong); background: var(--paper); color: var(--ink-muted); text-align: center; font-size: 0.84em; line-height: 1.5; }
::selection { background: var(--forest); color: var(--on-accent); }
:focus-visible { outline: 3px solid var(--oxblood); outline-offset: 3px; }

.skip-link {
  position: fixed;
  left: 18px;
  top: -80px;
  z-index: 300;
  padding: 10px 15px;
  border: 1px solid var(--rule-strong);
  background: var(--paper-raised);
  color: var(--ink);
  font-weight: 700;
  box-shadow: var(--shadow-float);
}
.skip-link:focus { top: 14px; }
.view h1 { scroll-margin-top: 6rem; }

/* ---------- masthead & tabs ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-top: 4px solid var(--oxblood);
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  box-shadow: 0 10px 30px -30px rgba(40, 31, 20, 0.72);
  backdrop-filter: blur(14px);
}
.header-inner {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  align-items: stretch;
  gap: 18px;
  max-width: 1380px;
  min-height: 68px;
  margin: 0 auto;
  padding: 0 28px;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  align-self: center;
  gap: 10px;
  width: fit-content;
  color: var(--ink);
  white-space: nowrap;
}
.brand:hover { color: var(--ink); text-decoration: none; }
.brand > span { font-family: var(--font-display); font-size: 1.28rem; font-weight: 700; letter-spacing: -0.025em; }
.brand small { color: var(--ink-faint); font-size: 0.64rem; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase; }
.steps { display: flex; align-items: stretch; justify-content: center; gap: 0; }
.steps a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 17px;
  color: var(--ink-muted);
  font-size: 0.79rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}
.steps a::after {
  content: "";
  position: absolute;
  right: 17px;
  bottom: -1px;
  left: 17px;
  height: 3px;
  background: transparent;
}
.steps a:hover { color: var(--ink); text-decoration: none; }
.steps a b {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1px solid var(--rule-strong);
  color: var(--ink-faint);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
}
.steps a[aria-current="page"] { color: var(--forest-deep); }
.steps a[aria-current="page"]::after { background: var(--forest); }
.steps a[aria-current="page"] b { border-color: var(--forest); background: var(--forest); color: var(--on-accent); }
.steps a i {
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  border-radius: 50%;
  background: var(--oxblood);
  color: #fffaf3;
  font-style: normal;
  font-size: 0.66rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.aux-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}
.aux-nav::before { content: ""; width: 1px; height: 24px; margin-right: 10px; background: var(--rule); }
.aux-nav a {
  position: relative;
  padding: 8px 9px;
  color: var(--ink-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}
.aux-nav a:hover { color: var(--ink); text-decoration: none; }
.aux-nav a[aria-current="page"] { color: var(--oxblood); }
.aux-nav a[aria-current="page"]::after { content: ""; position: absolute; right: 9px; bottom: 5px; left: 9px; height: 1px; background: currentColor; }

/* ---------- page shells ---------- */
.view {
  margin: 0 auto;
  padding: 54px 28px 72px;
  animation: page-arrive 260ms ease-out both;
}
@keyframes page-arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.view-narrow { max-width: 960px; }
.view-wide { max-width: 1120px; }
.view-full { max-width: 1380px; }
.view h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.65rem);
  font-weight: 650;
  line-height: 1.03;
  letter-spacing: -0.035em;
}
.view h1 em { color: var(--forest); font-weight: 500; }
.eyebrow {
  margin-bottom: 10px;
  color: var(--oxblood);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.155em;
  line-height: 1.35;
  text-transform: uppercase;
}
.view-sub { max-width: 680px; margin-top: 18px; color: var(--ink-muted); font-size: 1.02rem; line-height: 1.65; }
.view-sub b { color: var(--ink); font-variant-numeric: tabular-nums; }
.view-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 19px;
  border-bottom: 1px solid var(--rule-strong);
}
.view-head h1 { font-size: clamp(2rem, 4vw, 3rem); }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-block; margin-bottom: 18px; color: var(--ink-muted); font-size: 0.78rem; font-weight: 700; }
.back-link:hover { color: var(--oxblood); }
.status-line { max-width: 720px; margin-top: 10px; color: var(--ink-muted); font-size: 0.86rem; }
.section-title { margin: 42px 0 16px; font-family: var(--font-display); font-size: 1.55rem; font-weight: 650; }
.foot-note { margin-top: 18px; color: var(--ink-faint); font-size: 0.78rem; line-height: 1.65; }
.foot-note a { color: var(--ink-muted); text-decoration: underline; }

/* ---------- opening composition ---------- */
.lead-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 270px); gap: 56px; align-items: end; margin-bottom: 34px; }
.lead-note { margin-bottom: 4px; padding: 4px 0 4px 20px; border-left: 2px solid var(--oxblood); }
.lead-note > span { display: block; margin-bottom: 5px; color: var(--oxblood); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }
.lead-note p { color: var(--ink-muted); font-size: 0.8rem; line-height: 1.58; }

/* ---------- priority ledger ---------- */
.priority-panel {
  scroll-margin-top: 6rem;
  margin-bottom: 28px;
  border: 1px solid var(--rule);
  border-top: 3px solid var(--oxblood);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  box-shadow: var(--shadow-paper);
}
.priority-panel > summary {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  min-height: 68px;
  padding: 12px 52px 12px 18px;
  list-style: none;
}
.priority-panel > summary::-webkit-details-marker { display: none; }
.priority-panel > summary::after { content: "+"; position: absolute; right: 20px; top: 21px; color: var(--forest); font-family: var(--font-display); font-size: 1.25rem; font-weight: 400; line-height: 1; }
.priority-panel[open] > summary::after { content: "−"; }
.priority-panel[open] > summary { border-bottom: 1px solid var(--rule); }
.priority-number { color: var(--oxblood); font-family: var(--font-display); font-size: 1.5rem; line-height: 1; }
.priority-panel > summary span:last-child b { display: block; font-family: var(--font-display); font-size: 1.05rem; font-weight: 650; }
.priority-panel > summary span:last-child small { display: block; margin-top: 1px; color: var(--ink-faint); font-size: 0.71rem; }
.priority-body { padding: 20px 22px 17px; }
.priority-intro { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 19px; }
.priority-intro h2 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 650; }
.priority-intro p { max-width: 620px; margin-top: 4px; color: var(--ink-muted); font-size: 0.76rem; }
.priority-presets { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.priority-presets button {
  min-height: 30px;
  padding: 3px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.68rem;
  font-weight: 720;
}
.priority-presets button:hover { border-color: var(--forest); color: var(--forest-deep); }
.priority-presets button.is-active { border-color: var(--forest); background: var(--forest-soft); color: var(--forest-deep); }
.priority-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule-strong); border-left: 1px solid var(--rule); }
.priority-control { display: block; min-width: 0; padding: 13px 15px 12px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.priority-control > span { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.priority-control b { font-size: 0.76rem; font-weight: 760; }
.priority-control output { min-width: 1.6em; color: var(--oxblood); font-family: var(--font-display); font-size: 1.08rem; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.priority-control small { display: block; margin-top: 3px; color: var(--ink-faint); font-size: 0.66rem; line-height: 1.42; }
.priority-control input[type="range"] {
  width: 100%;
  height: 20px;
  margin: 5px 0 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
.priority-control input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--forest), var(--rule-strong)); }
.priority-control input[type="range"]::-moz-range-track { height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--forest), var(--rule-strong)); }
.priority-control input[type="range"]::-webkit-slider-thumb { width: 16px; height: 16px; margin-top: -6.5px; appearance: none; border: 2px solid var(--paper-raised); border-radius: 50%; background: var(--forest); box-shadow: 0 0 0 1px var(--forest); }
.priority-control input[type="range"]::-moz-range-thumb { width: 13px; height: 13px; border: 2px solid var(--paper-raised); border-radius: 50%; background: var(--forest); box-shadow: 0 0 0 1px var(--forest); }
.priority-foot { display: grid; grid-template-columns: auto auto minmax(240px, 1fr); gap: 12px 20px; align-items: start; padding-top: 11px; color: var(--ink-faint); font-size: 0.65rem; }
.priority-foot span { white-space: nowrap; }
.priority-foot p { justify-self: end; max-width: 520px; text-align: right; line-height: 1.48; }
.manuscript-sheet {
  position: relative;
  padding: 28px 30px 0;
  border: 1px solid var(--rule);
  border-top: 4px solid var(--forest);
  background: var(--paper-raised);
  box-shadow: var(--shadow-paper);
}
.manuscript-sheet::after {
  content: "";
  position: absolute;
  inset: 8px -5px -7px 6px;
  z-index: -1;
  border: 1px solid var(--rule);
  background: var(--paper-deep);
}
.sheet-heading { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; margin-bottom: 24px; padding-bottom: 19px; border-bottom: 1px solid var(--rule); }
.sheet-heading > span { color: var(--oxblood); font-family: var(--font-display); font-size: 1.5rem; line-height: 1; }
.sheet-heading h2 { font-family: var(--font-display); font-size: 1.28rem; font-weight: 650; line-height: 1.1; }
.sheet-heading p { margin-top: 4px; color: var(--ink-faint); font-size: 0.78rem; }

/* ---------- form & privacy ---------- */
.field { margin-bottom: 20px; }
.field label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: var(--ink); font-size: 0.76rem; font-weight: 780; letter-spacing: 0.055em; text-transform: uppercase; }
.field label small { color: var(--ink-faint); font-size: 0.68rem; font-weight: 650; letter-spacing: 0.035em; text-transform: none; }
input[type="text"], input[type="search"], select, textarea {
  width: 100%;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.92rem;
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--ink) 3%, transparent);
}
input[type="text"], input[type="search"], select { min-height: 44px; padding: 9px 12px; }
textarea { min-height: 270px; padding: 15px 16px; resize: vertical; line-height: 1.72; }
.abstract-field textarea {
  background-color: var(--paper);
  background-image: repeating-linear-gradient(0deg, transparent 0, transparent calc(1.72em - 1px), color-mix(in srgb, var(--rule) 42%, transparent) 1.72em);
  background-position: 0 15px;
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: var(--forest); outline: 3px solid color-mix(in srgb, var(--forest) 18%, transparent); outline-offset: 0; }
.input-meta-row { display: flex; gap: 16px; margin-top: 7px; color: var(--ink-faint); font-size: 0.7rem; font-variant-numeric: tabular-nums; }
.input-meta-row .kbd-hint { margin-left: auto; }
.inline-error { margin-top: 10px; padding: 9px 12px; border-left: 3px solid var(--red); background: var(--red-soft); color: var(--red); font-size: 0.82rem; }
.privacy-band {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin: 28px -30px 0;
  padding: 18px 30px;
  border-top: 1px solid var(--rule);
  background: var(--paper-deep);
}
.privacy-mark { display: grid; place-items: center; width: 52px; height: 35px; border: 1px solid var(--forest); color: var(--forest); font-size: 0.62rem; font-weight: 850; letter-spacing: 0.12em; text-transform: uppercase; }
.privacy-band b { display: block; font-size: 0.82rem; }
.privacy-band p { margin-top: 2px; color: var(--ink-muted); font-size: 0.75rem; line-height: 1.5; }
.draft-status { display: block; margin-top: 4px; color: var(--forest); font-size: 0.69rem; font-weight: 700; }

.advanced { margin-top: 28px; border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule); background: color-mix(in srgb, var(--paper) 76%, transparent); }
.advanced > summary, .panel-details > summary, .filter-panel > summary, .row-details > summary {
  position: relative;
  list-style: none;
}
.advanced > summary::-webkit-details-marker, .panel-details > summary::-webkit-details-marker, .filter-panel > summary::-webkit-details-marker, .row-details > summary::-webkit-details-marker { display: none; }
.advanced > summary { padding: 13px 34px 13px 2px; color: var(--ink-muted); font-size: 0.81rem; font-weight: 750; }
.advanced > summary::after, .panel-details > summary::after, .filter-panel > summary::after, .row-details > summary::after { content: "+"; position: absolute; right: 4px; color: var(--forest); font-family: var(--font-display); font-size: 1.2rem; font-weight: 400; line-height: 1; }
.advanced[open] > summary::after, .panel-details[open] > summary::after, .filter-panel[open] > summary::after, .row-details[open] > summary::after { content: "−"; }
.advanced > summary span { margin-left: 5px; color: var(--oxblood); font-size: 0.72rem; }
.advanced[open] > summary { border-bottom: 1px solid var(--rule); color: var(--ink); }
.advanced-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 24px; padding: 22px 2px 4px; }
.advanced-grid .switch-row { grid-column: 1 / -1; }
.switch-row { display: grid; grid-template-columns: 20px 1fr; gap: 11px; align-items: start; padding: 8px 0 18px; }
.switch-row input { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--forest); }
.switch-row b, .switch-row small { display: block; }
.switch-row b { font-size: 0.8rem; }
.switch-row small { color: var(--ink-faint); font-size: 0.74rem; }
.actions-row { display: flex; align-items: center; gap: 10px; margin-top: 26px; flex-wrap: wrap; }

/* ---------- son sorgular ---------- */
.history-panel { margin-top: 30px; border-top: 1px solid var(--rule-strong); }
.history-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 13px 0 3px; }
.history-head > span { color: var(--ink-faint); font-size: 0.64rem; font-weight: 850; letter-spacing: 0.12em; text-transform: uppercase; }
.history-list { margin: 0; padding: 0; list-style: none; }
.history-list li { border-bottom: 1px dotted var(--rule); }
.history-list li:last-child { border-bottom: 0; }
.history-list button { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; width: 100%; padding: 10px 2px; border: 0; background: transparent; text-align: left; }
.history-list button:hover b { color: var(--forest-deep); }
.history-list b { min-width: 0; color: var(--ink); font-size: 0.81rem; font-weight: 660; line-height: 1.4; overflow-wrap: anywhere; }
.history-list small { flex: none; color: var(--ink-faint); font-size: 0.69rem; font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 760;
  letter-spacing: 0.018em;
}
.btn:hover { text-decoration: none; }
.btn:disabled { cursor: not-allowed; opacity: 0.45; }
.btn-primary { border-color: var(--forest); background: var(--forest); color: var(--on-accent); box-shadow: 0 8px 24px -18px var(--forest-deep); }
.btn-primary:hover:not(:disabled) { border-color: var(--forest-deep); background: var(--forest-deep); color: var(--on-accent); }
.btn-secondary { border-color: var(--rule-strong); background: var(--paper); }
.btn-secondary:hover:not(:disabled) { border-color: var(--forest); color: var(--forest-deep); }
.btn-ghost { border-color: transparent; color: var(--ink-muted); }
.btn-ghost:hover:not(:disabled) { border-color: var(--rule); background: var(--paper-deep); color: var(--ink); }
.btn-text-danger { min-height: 34px; padding: 5px 0; border-bottom: 1px solid color-mix(in srgb, var(--oxblood) 45%, transparent); color: var(--oxblood); font-size: 0.72rem; }
.btn-text-danger:hover { border-bottom-color: var(--oxblood); color: var(--oxblood-deep); }
.btn-sm { min-height: 32px; padding: 4px 10px; font-size: 0.75rem; }

/* ---------- decision labels ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 2px 7px;
  border-left: 2px solid currentColor;
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.67rem;
  font-weight: 750;
  line-height: 1.25;
}
.chip-band-1 { color: var(--oxblood); }
.chip-band-2 { color: var(--gold); }
.chip-band-3 { color: var(--blue); }
.chip-band-4 { color: var(--forest); }
.chip-apc-zero, .chip-agree-available { color: var(--green); }
.chip-apc-known, .chip-agree-unavailable { color: var(--red); }
.chip-apc-unknown, .chip-agree-limited { color: var(--amber); }
.chip-apc-pilot, .chip-agree-pilot { color: var(--blue); }
.chip-neutral { color: var(--ink-faint); }
.term-chips { display: flex; flex-wrap: wrap; gap: 5px 10px; }
.term-chips span { position: relative; padding-left: 10px; color: var(--ink-muted); font-size: 0.73rem; }
.term-chips span::before { content: "·"; position: absolute; left: 0; color: var(--rule-strong); }
.term-chips .topic { color: var(--forest-deep); font-weight: 750; }
.term-chips .topic::before { color: var(--forest); }

/* ---------- journal results ---------- */
.result-list, .journal-list { display: grid; gap: 14px; }
.result-row {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-top: 2px solid var(--rule-strong);
  background: var(--paper-raised);
  box-shadow: var(--shadow-paper);
}
.result-row::before { content: ""; position: absolute; top: -2px; bottom: 0; left: 0; width: 3px; background: var(--rule-strong); }
.result-row:has(.score-strong)::before { background: var(--forest); }
.result-row:has(.score-medium)::before { background: var(--gold); }
.result-row:has(.score-explore)::before { background: var(--ink-faint); }
.row-main {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) minmax(230px, 285px);
  grid-template-areas:
    "score title side"
    "score why side"
    "score facts side";
  gap: 9px 22px;
  align-items: start;
  padding: 23px 24px 20px;
}
.score-badge {
  grid-area: score;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100%;
  padding: 4px 16px 0 0;
  border-right: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 2.15rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.score-badge small { margin-top: 5px; color: var(--ink-faint); font-family: var(--font-body); font-size: 0.58rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.score-strong { color: var(--forest-deep); }
.score-medium { color: var(--gold); }
.score-explore { color: var(--ink-muted); }
.row-title { grid-area: title; min-width: 0; }
.row-title h3 { color: var(--ink); font-family: var(--font-display); font-size: 1.25rem; font-weight: 650; line-height: 1.23; letter-spacing: -0.012em; overflow-wrap: anywhere; }
.row-title h3 a { color: inherit; }
.row-title h3 a:hover { color: var(--forest-deep); }
.row-rank { display: block; margin-bottom: 5px; color: var(--oxblood); font-size: 0.63rem; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.row-meta { margin-top: 5px; color: var(--ink-faint); font-size: 0.75rem; }
.row-side { grid-area: side; display: grid; gap: 12px; align-self: stretch; padding-left: 20px; border-left: 1px solid var(--rule); }
.result-metrics { display: grid; gap: 9px; margin: 0; }
.result-metrics > div { padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
.result-metrics > div:last-child { padding-bottom: 0; border-bottom: 0; }
.result-metrics dt { color: var(--ink-faint); font-size: 0.61rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.result-metrics dd { margin: 2px 0 0; color: var(--ink); font-size: 0.77rem; font-weight: 680; line-height: 1.4; overflow-wrap: anywhere; }
.result-metrics dd small { color: var(--ink-faint); font-size: 0.68rem; font-weight: 550; }
.row-chips { display: flex; flex-wrap: wrap; gap: 4px 9px; }
.row-facts { grid-area: facts; display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--ink-muted); font-size: 0.72rem; font-variant-numeric: tabular-nums; }
.row-facts b { color: var(--ink); font-weight: 700; }
.why-line { grid-area: why; margin: 2px 0 1px; padding: 10px 12px; border-left: 2px solid var(--forest); background: var(--forest-soft); color: var(--ink-muted); font-size: 0.78rem; line-height: 1.52; }
.why-line .why-label { display: block; margin-bottom: 2px; color: var(--forest-deep); font-size: 0.61rem; font-weight: 850; letter-spacing: 0.105em; text-transform: uppercase; }
.why-line p { color: inherit; }
.select-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  width: fit-content;
  padding: 5px 11px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.72rem;
  font-weight: 750;
}
.select-btn:hover { border-color: var(--forest); color: var(--forest-deep); }
.select-btn.is-selected { border-color: var(--forest); background: var(--forest-soft); color: var(--forest-deep); }
.row-scope-link { width: fit-content; font-size: 0.72rem; font-weight: 700; }
.row-main.no-score {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  grid-template-areas:
    "title side"
    "facts side";
}
.row-main.no-score .row-facts { grid-area: facts; }
.row-main.no-score .why-line { grid-column: 1 / -1; }
.compare-remove { min-width: 30px; width: 30px; padding: 2px 6px; font-size: 1rem; line-height: 1; }
.row-details { border-top: 1px solid var(--rule); background: var(--paper-deep); }
.row-details > summary { padding: 11px 50px 11px 24px; color: var(--ink-muted); font-size: 0.73rem; font-weight: 740; }
.row-details > summary::after { right: 24px; top: 12px; }
.row-details > summary:hover { color: var(--forest-deep); }
.row-details[open] > summary { border-bottom: 1px solid var(--rule); }
.detail-body { display: grid; gap: 19px; padding: 20px 24px 24px; }
.detail-body h4 { margin: 0 0 7px; color: var(--oxblood); font-size: 0.62rem; font-weight: 850; letter-spacing: 0.12em; text-transform: uppercase; }
.detail-body p { max-width: 860px; color: var(--ink-muted); font-size: 0.77rem; line-height: 1.62; }
.detail-body p b { color: var(--ink); }
.breakdown-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin-bottom: 9px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.breakdown-grid div { padding: 9px 10px; border-right: 1px solid var(--rule); }
.breakdown-grid div:first-child { padding-left: 0; }
.breakdown-grid div:last-child { border-right: 0; }
.breakdown-grid span { display: block; color: var(--ink-faint); font-size: 0.62rem; line-height: 1.3; }
.breakdown-grid b { display: block; margin-top: 4px; font-family: var(--font-display); font-size: 1rem; font-variant-numeric: tabular-nums; }
.links-row { display: flex; flex-wrap: wrap; gap: 5px 18px; font-size: 0.75rem; }
.links-row a { font-weight: 650; }

/* ---------- hızlı ölçüt çubuğu ---------- */
.refine-bar { display: flex; flex-wrap: wrap; gap: 10px 30px; margin: -6px 0 20px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.refine-group { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.refine-group > span { margin-right: 5px; color: var(--ink-faint); font-size: 0.62rem; font-weight: 850; letter-spacing: 0.11em; text-transform: uppercase; }
.refine-group button {
  min-height: 30px;
  padding: 3px 11px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.72rem;
  font-weight: 720;
}
.refine-group button:hover:not(:disabled) { border-color: var(--forest); color: var(--forest-deep); }
.refine-group button.is-active { border-color: var(--forest); background: var(--forest-soft); color: var(--forest-deep); }
.refine-group button:disabled { cursor: not-allowed; opacity: 0.4; }

.decision-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  gap: 14px 18px;
  align-items: center;
  margin: 0 0 18px;
  padding: 13px 15px;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--forest);
  background: var(--paper);
}
.decision-toolbar > div > span { display: block; color: var(--oxblood); font-size: 0.59rem; font-weight: 850; letter-spacing: 0.11em; text-transform: uppercase; }
.decision-toolbar > div > b { display: block; margin-top: 1px; font-family: var(--font-display); font-size: 0.9rem; font-weight: 650; }
.decision-toolbar > div > small { display: block; color: var(--ink-faint); font-size: 0.66rem; }
.decision-toolbar > label { display: grid; grid-template-columns: auto minmax(190px, 1fr); gap: 8px; align-items: center; color: var(--ink-muted); font-size: 0.69rem; font-weight: 700; }
.decision-toolbar select { width: auto; min-height: 36px; padding: 5px 9px; font-size: 0.76rem; }
.acceptance-fact { color: var(--forest-deep); }
.acceptance-fact b { border-bottom: 1px dotted var(--forest); }
.decision-fact { color: var(--oxblood); }
.estimate-note { padding: 12px 14px; border-left: 3px solid var(--gold); background: var(--gold-soft); }
.estimate-note h4 { color: var(--gold); }
.acceptance-formula { border-top-color: var(--gold); }

/* ---------- agreements & score key ---------- */
.agreement-notice { padding: 12px 14px; border: 1px solid var(--rule); border-left: 3px solid var(--ink-faint); background: var(--paper); font-size: 0.76rem; }
.agreement-notice.tone-available { border-left-color: var(--green); }
.agreement-notice.tone-limited { border-left-color: var(--amber); }
.agreement-notice.tone-unavailable { border-left-color: var(--red); }
.agreement-notice.tone-pilot { border-left-color: var(--blue); }
.agreement-notice .agr-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.agreement-notice .agr-head b { font-family: var(--font-display); font-size: 0.9rem; }
.agreement-notice p { margin-top: 4px; color: var(--ink-muted); }
.agreement-notice .links-row { margin-top: 7px; }
.agreement-notice details { margin-top: 9px; }
.agreement-notice summary { color: var(--ink-muted); font-size: 0.72rem; font-weight: 700; }
.agreement-notice dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin: 9px 0 0; }
.agreement-notice dt { color: var(--ink-faint); font-size: 0.59rem; font-weight: 850; letter-spacing: 0.09em; text-transform: uppercase; }
.agreement-notice dd { margin: 1px 0 0; color: var(--ink-muted); font-size: 0.73rem; }
.score-legend { display: grid; grid-template-columns: repeat(3, auto) minmax(260px, 1fr); align-items: center; gap: 8px 20px; margin-top: 20px; padding: 12px 0; border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule); color: var(--ink-muted); font-size: 0.73rem; }
.score-legend em { justify-self: end; color: var(--ink-faint); font-style: normal; text-align: right; }
.dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; }
.dot-strong { background: var(--green); }
.dot-medium { background: var(--gold); }
.dot-explore { background: var(--ink-faint); }

.empty-state { display: grid; justify-items: center; gap: 7px; padding: 54px 28px; border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule); text-align: center; }
.empty-state::before { content: "∴"; color: var(--oxblood); font-family: var(--font-display); font-size: 1.4rem; }
.empty-state h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 650; }
.empty-state p { max-width: 520px; color: var(--ink-muted); font-size: 0.8rem; }
.empty-state .btn { margin-top: 9px; }

/* ---------- catalogue ---------- */
.catalog-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 30px; align-items: start; }
.filter-panel { position: sticky; top: 88px; border-top: 3px solid var(--oxblood); border-bottom: 1px solid var(--rule-strong); background: var(--paper); box-shadow: var(--shadow-paper); }
.filter-panel > summary { display: flex; justify-content: space-between; align-items: center; padding: 13px 36px 13px 16px; font-family: var(--font-display); font-size: 1rem; font-weight: 650; }
.filter-panel > summary::after { right: 16px; top: 14px; }
.filter-panel > summary span { color: var(--ink-faint); font-family: var(--font-body); font-size: 0.66rem; font-weight: 650; }
.filter-panel[open] > summary { border-bottom: 1px solid var(--rule); }
.filter-body { padding: 17px 16px; }
.filter-body fieldset { margin: 0 0 17px; padding: 0; border: 0; }
.filter-body legend { margin-bottom: 6px; font-size: 0.74rem; font-weight: 780; letter-spacing: 0.04em; text-transform: uppercase; }
.filter-body .field { margin-bottom: 16px; }
.check-row { display: grid; grid-template-columns: 23px 1fr auto; align-items: center; min-height: 34px; border-bottom: 1px dotted var(--rule); }
.check-row:last-child { border-bottom: 0; }
.check-row input { width: 15px; height: 15px; margin: 0; accent-color: var(--forest); }
.check-row span { font-size: 0.79rem; }
.check-row b { color: var(--ink-faint); font-size: 0.68rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.result-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.result-toolbar p { color: var(--ink-muted); font-size: 0.79rem; }
.result-toolbar p b { color: var(--ink); font-family: var(--font-display); font-size: 1.12rem; font-variant-numeric: tabular-nums; }
.result-toolbar label { display: flex; align-items: center; gap: 8px; color: var(--ink-muted); font-size: 0.72rem; }
.result-toolbar select { width: auto; min-width: 190px; min-height: 36px; padding: 5px 9px; }
.load-more { width: 100%; margin-top: 16px; }

/* ---------- comparison & institutional panel ---------- */
.compare-wrap { overflow-x: auto; border-top: 2px solid var(--forest); border-bottom: 1px solid var(--rule-strong); background: var(--paper-raised); box-shadow: var(--shadow-paper); }
.compare-table { width: 100%; min-width: 1160px; border-collapse: collapse; font-size: 0.77rem; }
.compare-table th, .compare-table td { padding: 12px 13px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.compare-table th:last-child, .compare-table td:last-child { border-right: 0; }
.compare-table thead th { position: sticky; top: 0; background: var(--paper-deep); color: var(--ink-muted); font-size: 0.61rem; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.compare-table tbody tr:last-child td { border-bottom: 0; }
.compare-table tbody tr:hover { background: var(--forest-soft); }
.compare-table td.is-best { background: var(--forest-soft); box-shadow: inset 2px 0 0 var(--forest); }
.compare-table td.is-best b { color: var(--forest-deep); }
.compare-table td:first-child b { color: var(--ink); font-family: var(--font-display); font-size: 0.88rem; }
.compare-table small { color: var(--ink-faint); }
.compare-note { margin-top: 14px; color: var(--ink-faint); font-size: 0.74rem; line-height: 1.62; }
.panel-details { margin-top: 34px; border-top: 2px solid var(--oxblood); border-bottom: 1px solid var(--rule-strong); background: var(--paper); box-shadow: var(--shadow-paper); }
.panel-details > summary { padding: 15px 48px 15px 18px; font-family: var(--font-display); font-size: 1rem; font-weight: 650; }
.panel-details > summary::after { right: 18px; top: 16px; }
.panel-details[open] > summary { border-bottom: 1px solid var(--rule); }
.institution-content { display: grid; gap: 17px; padding: 23px 20px; }
.institution-content h2 { margin-top: 6px; font-family: var(--font-display); font-size: 1.16rem; font-weight: 650; }
.institution-content > p { max-width: 780px; color: var(--ink-muted); font-size: 0.8rem; }
.support-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule); }
.support-grid article { padding: 13px 14px; border-right: 1px solid var(--rule); }
.support-grid article:last-child { border-right: 0; }
.support-grid span { display: block; color: var(--oxblood); font-size: 0.64rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.support-grid b { display: block; margin: 3px 0; font-family: var(--font-display); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.support-grid small { color: var(--ink-faint); font-size: 0.68rem; }
.agreement-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.agreement-overview article { padding: 12px 13px; border: 1px solid var(--rule); border-left-width: 3px; background: var(--paper-raised); font-size: 0.75rem; }
.agreement-overview article.tone-available { border-left-color: var(--green); }
.agreement-overview article.tone-limited { border-left-color: var(--amber); }
.agreement-overview article.tone-unavailable { border-left-color: var(--red); }
.agreement-overview article.tone-neutral { border-left-color: var(--ink-faint); }
.agreement-overview span { display: block; color: var(--ink-faint); font-size: 0.63rem; font-weight: 750; letter-spacing: 0.07em; text-transform: uppercase; }
.agreement-overview b { display: block; margin: 3px 0; font-family: var(--font-display); font-size: 0.88rem; }
.agreement-overview small { color: var(--ink-muted); }
.agreement-overview .links-row { margin-top: 8px; }
.note-box { padding: 12px 14px; border-left: 3px solid var(--blue); background: var(--blue-soft); color: var(--ink-muted); font-size: 0.77rem; }
.note-box a { display: inline-block; margin-left: 6px; }

/* ---------- method ledger ---------- */
.formula-box { margin-bottom: 19px; padding: 18px 20px; border-top: 2px solid var(--forest); border-bottom: 1px solid var(--rule); background: var(--paper-raised); box-shadow: var(--shadow-paper); }
.formula-box code { display: block; padding: 0; border: 0; background: none; color: var(--forest-deep); font-family: var(--font-display); font-size: 1rem; line-height: 1.55; white-space: normal; }
.formula-box p { margin-top: 10px; color: var(--ink-muted); font-size: 0.76rem; }
.method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rule-strong); }
.method-grid article { padding: 15px 16px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: color-mix(in srgb, var(--paper) 68%, transparent); }
.method-grid article:nth-child(even) { border-right: 0; }
.method-grid b { display: block; margin-bottom: 4px; color: var(--ink); font-family: var(--font-display); font-size: 0.93rem; }
.method-grid p { color: var(--ink-muted); font-size: 0.76rem; }
.method-limits { margin: 22px 0 0; padding-left: 20px; color: var(--ink-muted); font-size: 0.77rem; }
.method-limits li { padding-left: 3px; }
.method-limits li + li { margin-top: 7px; }
.method-limits li::marker { color: var(--oxblood); }
.method-links { display: flex; flex-wrap: wrap; gap: 5px 18px; margin-top: 18px; font-size: 0.76rem; font-weight: 650; }
.data-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rule-strong); }
.data-summary article { padding: 15px 16px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: color-mix(in srgb, var(--paper) 68%, transparent); }
.data-summary article:nth-child(even) { border-right: 0; }
.data-summary span { display: block; color: var(--oxblood); font-size: 0.6rem; font-weight: 850; letter-spacing: 0.11em; text-transform: uppercase; }
.data-summary b { display: block; margin: 4px 0 3px; font-family: var(--font-display); font-size: 0.9rem; }
.data-summary a { font-size: 0.72rem; font-weight: 650; }

/* ---------- footer ---------- */
.app-footer { border-top: 1px solid var(--rule-strong); background: var(--paper); }
.app-footer p { max-width: 1380px; margin: 0 auto; padding: 3px 28px; color: var(--ink-faint); font-size: 0.72rem; }
.app-footer p:first-child { padding-top: 20px; }
.app-footer p:first-child b { color: var(--ink-muted); font-family: var(--font-display); font-size: 0.85rem; }
.app-footer p:last-child { padding-bottom: 21px; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .header-inner { grid-template-columns: auto 1fr auto; padding-inline: 20px; }
  .brand small { display: none; }
  .steps a { padding-inline: 11px; }
  .catalog-layout { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
  .advanced-grid, .agreement-overview { grid-template-columns: 1fr 1fr; }
  .priority-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .decision-toolbar { grid-template-columns: 1fr auto; }
  .decision-toolbar > label { grid-column: 1 / -1; grid-row: 2; }
  .support-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .support-grid article:nth-child(2) { border-right: 0; }
  .support-grid article:nth-child(-n + 2) { border-bottom: 1px solid var(--rule); }
  .breakdown-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .breakdown-grid div:nth-child(3) { border-right: 0; }
  .breakdown-grid div:nth-child(n + 4) { border-top: 1px solid var(--rule); }
  .row-main { grid-template-columns: 68px minmax(0, 1fr) minmax(210px, 250px); gap-inline: 17px; }
}

@media (max-width: 760px) {
  .app-header { position: sticky; }
  .header-inner { grid-template-columns: 1fr auto; gap: 0 8px; min-height: 0; padding: 8px 14px 0; }
  .brand { grid-column: 1; grid-row: 1; min-height: 36px; }
  .brand > span { font-size: 1.08rem; }
  .aux-nav { grid-column: 2; grid-row: 1; }
  .aux-nav::before { display: none; }
  .aux-nav a { padding: 6px 7px; font-size: 0.66rem; }
  .steps { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
  .steps a { justify-content: center; min-height: 43px; padding: 0 6px; font-size: 0.72rem; }
  .steps a::after { right: 6px; left: 6px; }
  .steps a b { width: 19px; height: 19px; font-size: 0.67rem; }
  .view { padding: 36px 18px 56px; }
  .view-head { align-items: stretch; flex-direction: column; gap: 16px; margin-bottom: 22px; }
  .view-head .btn { width: 100%; }
  .head-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .lead-grid { grid-template-columns: 1fr; gap: 24px; margin-bottom: 29px; }
  .lead-note { max-width: 520px; }
  .priority-intro { align-items: stretch; flex-direction: column; gap: 13px; }
  .priority-presets { justify-content: flex-start; }
  .priority-foot { grid-template-columns: auto auto; }
  .priority-foot p { grid-column: 1 / -1; justify-self: start; text-align: left; }
  .manuscript-sheet { padding: 22px 18px 0; }
  .manuscript-sheet::after { inset: 6px -3px -5px 4px; }
  .sheet-heading { grid-template-columns: 35px minmax(0, 1fr); }
  .privacy-band { grid-template-columns: 48px minmax(0, 1fr); margin-inline: -18px; padding: 16px 18px; }
  .privacy-mark { width: 44px; }
  .privacy-band .btn { grid-column: 2; justify-self: start; }
  .advanced-grid, .method-grid, .data-summary, .agreement-overview { grid-template-columns: 1fr; }
  .method-grid article, .data-summary article { border-right: 0; }
  .actions-row .btn-primary { width: 100%; }
  .row-main {
    grid-template-columns: 58px minmax(0, 1fr);
    grid-template-areas:
      "score title"
      "why why"
      "facts facts"
      "side side";
    gap: 12px 14px;
    padding: 19px 17px 17px;
  }
  .score-badge { padding-right: 12px; font-size: 1.8rem; }
  .row-title h3 { font-size: 1.12rem; }
  .row-side { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 14px; padding: 13px 0 0; border-top: 1px solid var(--rule); border-left: 0; }
  .result-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
  .result-metrics > div { padding: 0 10px 0 0; border-right: 1px solid var(--rule); border-bottom: 0; }
  .result-metrics > div + div { padding-left: 10px; border-right: 0; }
  .row-main.no-score { grid-template-columns: 1fr; grid-template-areas: "title" "facts" "side"; }
  .row-main.no-score .row-side { grid-template-columns: 1fr auto; }
  .detail-body { padding-inline: 17px; }
  .row-details > summary { padding-left: 17px; }
  .row-details > summary::after { right: 17px; }
  .breakdown-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .breakdown-grid div, .breakdown-grid div:nth-child(3) { border-right: 1px solid var(--rule); }
  .breakdown-grid div:nth-child(even) { border-right: 0; }
  .breakdown-grid div:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .breakdown-grid div:first-child { padding-left: 10px; }
  .agreement-notice dl { grid-template-columns: 1fr; }
  .score-legend { grid-template-columns: repeat(3, auto); gap: 8px 12px; }
  .score-legend em { grid-column: 1 / -1; justify-self: start; text-align: left; }
  .decision-toolbar { grid-template-columns: 1fr; }
  .decision-toolbar > label { grid-column: 1; grid-row: auto; grid-template-columns: 1fr; }
  .decision-toolbar select, .decision-toolbar .btn { width: 100%; }
  .result-toolbar { align-items: stretch; flex-direction: column; }
  .result-toolbar label { justify-content: space-between; }
  .result-toolbar select { flex: 1; min-width: 0; }
  .support-grid { grid-template-columns: 1fr; }
  .support-grid article, .support-grid article:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--rule); }
  .support-grid article:last-child { border-bottom: 0; }
}

@media (max-width: 430px) {
  body { font-size: 14px; }
  .header-inner { padding-inline: 12px; }
  .aux-nav a { padding-inline: 5px; letter-spacing: 0.035em; }
  .steps a { gap: 5px; }
  .view { padding-inline: 14px; }
  .view h1 { font-size: 2.15rem; }
  .view-sub { font-size: 0.92rem; }
  .priority-panel > summary { grid-template-columns: 34px minmax(0, 1fr); padding-inline: 14px 42px; }
  .priority-panel > summary::after { right: 15px; }
  .priority-body { padding-inline: 14px; }
  .priority-grid { grid-template-columns: 1fr; }
  .priority-control { padding-inline: 12px; }
  .priority-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .priority-presets button { width: 100%; }
  .manuscript-sheet { padding-inline: 15px; }
  .privacy-band { grid-template-columns: 1fr; gap: 8px; margin-inline: -15px; padding-inline: 15px; }
  .privacy-band .btn { grid-column: 1; }
  .privacy-mark { width: 46px; height: 29px; }
  .input-meta-row { gap: 10px; }
  .input-meta-row .kbd-hint { display: none; }
  .head-actions { grid-template-columns: 1fr; }
  .row-main { grid-template-columns: 52px minmax(0, 1fr); padding-inline: 14px; }
  .row-side, .row-main.no-score .row-side { grid-template-columns: 1fr; align-items: start; }
  .result-metrics { width: 100%; }
  .select-btn { width: 100%; }
  .row-facts { gap: 3px 12px; }
  .why-line { padding-inline: 10px; }
  .score-legend { grid-template-columns: 1fr; }
  .score-legend em { grid-column: 1; }
  .filter-body { padding-inline: 13px; }
  .compare-table { min-width: 960px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .view { animation: none; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

@media print {
  .app-header, .filter-panel, .btn, .back-link, .score-legend, .privacy-band { display: none !important; }
  body { background: #fff; color: #111; }
  .view { max-width: none; padding: 0; animation: none; }
  .manuscript-sheet, .result-row, .compare-wrap { border: 1px solid #aaa; box-shadow: none; }
  .result-row, .compare-table tr { break-inside: avoid; }
}
