/* Qpare — soft, rounded, single-column. */

:root {
  --bg: #f6f7f9;
  --surface: #fff;
  --ink: #111418;
  --ink-2: #2a2f37;
  --body: #3a404b;
  --muted: #5b6270;
  --faint: #b4b9c2;
  --soft: #f1f3f6;
  --line: #eef0f3;
  --hover: #e7e9ee;
  --dash: #d5d9e0;

  --accent: #0088b0;
  --accent-dark: #006786;
  --accent-soft: #e9f8ff;
  --warn: #a0681a;
  --warn-dark: #7a4f12;
  --warn-soft: #fdf3e1;
  --fail: #c2413b;
  --fail-dark: #9b2f2a;
  --fail-soft: #fdecea;

  --shadow-xs: 0 1px 2px rgba(17, 20, 24, .06);
  --shadow-card: 0 1px 2px rgba(17, 20, 24, .04), 0 12px 32px rgba(17, 20, 24, .06);
  --ease-open: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font-family: inherit; }
button { color: inherit; }
h1, h2, h3, p, ol { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.app { min-height: 100vh; display: flex; flex-direction: column; }

/* ------------------------------------------------------------ header */

.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 20px;
  padding: 12px 28px;
  background: rgba(246, 247, 249, .9);
  backdrop-filter: blur(12px);
}
.brand {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
  border: 0; background: none; padding: 0; cursor: pointer; color: var(--ink); text-align: left;
}
.brand-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; min-width: 0; overflow: hidden; }
.brand-sub {
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.brand-mark {
  width: 36px; height: 36px; border-radius: 12px; flex: none;
  background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 20px;
}
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -.01em; }

.stepper { display: flex; align-items: center; gap: 6px; }
.step-line { width: 28px; height: 2px; border-radius: 2px; background: var(--dash); }
.step-line.on { background: var(--accent); }
.step-pill {
  display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px;
  border: 0; border-radius: 999px; background: var(--surface); color: var(--ink);
  font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.step-pill:disabled { color: #9aa1ab; cursor: default; }
.step-pill.current { background: var(--ink); color: #fff; }
.step-dot {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; background: var(--line); color: var(--muted);
}
.step-dot i { font-size: 13px; }
.step-pill.done .step-dot { background: var(--accent-soft); color: var(--accent); }
.step-pill.current .step-dot { background: var(--accent); color: #fff; }

.example-banner {
  margin: 0 28px; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff;
  font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
}
.example-banner i { font-size: 17px; }
.topbar-right { flex: 1; display: flex; justify-content: flex-end; align-items: center; gap: 10px; }

.tabs {
  display: flex; gap: 4px; padding: 4px;
  background: var(--surface); border-radius: 999px; box-shadow: var(--shadow-xs);
}
.tabs button {
  display: flex; align-items: center; gap: 7px; padding: 8px 16px;
  border: 0; border-radius: 999px; background: transparent; color: var(--muted);
  font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.tabs button i { font-size: 17px; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { background: var(--ink); color: #fff; }

/* ------------------------------------------------------------ buttons */

.pill-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border: 0; border-radius: 999px;
  font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.pill-btn i { font-size: 16px; }
.pill-btn:disabled { opacity: .45; cursor: default; }
.pill-sm { padding: 9px 16px; font-size: 13px; }
.pill-lg { padding: 14px 24px; font-size: 15px; font-weight: 700; }
.pill-lg i { font-size: 18px; }
.pill-dark { background: var(--ink); color: #fff; }
.pill-dark:not(:disabled):hover { background: var(--ink-2); }
.pill-white { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); }
.pill-white:not(:disabled):hover { background: var(--line); }
.pill-soft { background: var(--soft); color: var(--ink); }
.pill-soft:not(:disabled):hover { background: var(--hover); }
.pill-accent { background: var(--accent); color: #fff; }
.pill-accent:not(:disabled):hover { background: var(--accent-dark); }
.caret-sm { font-size: 13px !important; }

.icon-btn {
  width: 36px; height: 36px; border: 0; border-radius: 50%; flex: none;
  background: var(--soft); cursor: pointer; display: grid; place-items: center; font-size: 16px;
}
.icon-btn:hover { background: var(--hover); }
.icon-btn.ghost { width: 30px; height: 30px; background: transparent; color: var(--muted); font-size: 15px; }
.icon-btn.ghost:hover { background: var(--hover); }
.icon-btn:disabled { opacity: .35; cursor: default; }

.pill-xl { padding: 16px 28px; font-size: 16px; font-weight: 700; }
.pill-danger { background: var(--fail); color: #fff; font-weight: 700; }
.pill-danger:hover { background: var(--fail-dark); }
/* A button-looking label inside a larger button. */
.pill-btn.fake { pointer-events: none; align-self: flex-start; margin-top: 6px; font-weight: 700; }

.link-btn {
  border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--accent); font-size: 14px; font-weight: 700; text-align: left;
}
.link-btn:hover { color: var(--accent-dark); }
.link-btn.light { color: #7fd6f2; }
.link-btn.light:hover { color: #fff; }

/* ------------------------------------------------------------ export */

.export { position: relative; }
.export-menu {
  position: absolute; right: 0; top: calc(100% + 8px); width: 300px; z-index: 6;
  background: var(--surface); border-radius: 20px; padding: 8px;
  box-shadow: 0 16px 40px rgba(17, 20, 24, .14);
  display: flex; flex-direction: column; gap: 2px;
}
.export-menu button {
  display: flex; gap: 12px; align-items: flex-start; text-align: left;
  padding: 12px; border: 0; border-radius: 14px; background: transparent; cursor: pointer;
}
.export-menu button:hover { background: var(--bg); }
.export-menu button > i { font-size: 20px; color: var(--accent); margin-top: 1px; }
.export-menu b { display: block; font-weight: 700; font-size: 14px; }
.export-menu small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.export-error { font-size: 13px; color: var(--fail-dark); padding: 8px 12px; line-height: 1.45; }

/* ------------------------------------------------------------ layout */

.screen { flex: 1; display: flex; justify-content: center; padding: 40px 24px 80px; }
.col { width: 100%; max-width: 920px; display: flex; flex-direction: column; gap: 40px; }
.col-narrow { max-width: 640px; gap: 28px; }
.col-wide { max-width: 1040px; gap: 20px; }
#screenResult { padding-top: 32px; padding-bottom: 96px; }

.hero { text-align: center; }
.hero h1 { font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.hero p { font-size: 17px; color: var(--muted); margin-top: 12px; text-wrap: pretty; }

.card {
  background: var(--surface); border-radius: 28px; padding: 24px;
  box-shadow: var(--shadow-card);
}

.label { font-weight: 700; font-size: 15px; }
.hint { font-size: 13px; color: var(--muted); line-height: 1.45; }
.center { text-align: center; }
.small-label { font-size: 12px; font-weight: 700; color: var(--muted); }

.error {
  padding: 12px 16px; border-radius: 16px;
  background: var(--fail-soft); color: var(--fail-dark); font-size: 14px; line-height: 1.5;
}

/* ------------------------------------------------------------ steps */

.drop {
  border: 2px dashed var(--dash); border-radius: 24px; padding: 26px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
}
.drop-title { font-weight: 800; font-size: 16px; }
.screen.over .drop, .screen.over .choice:first-child { border-color: var(--accent); background: var(--accent-soft); }
.drop-actions { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; justify-content: center; }

.model-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.model-note { margin-top: -16px; text-align: right; }
.seg { display: flex; gap: 4px; padding: 4px; background: var(--soft); border-radius: 999px; }
.seg-opt {
  display: flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted); position: relative;
}
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt i { font-size: 15px; }
.seg-opt.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(17, 20, 24, .12); }
.seg-opt.off { opacity: .45; cursor: not-allowed; }
.seg-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ------------------------------------------------------------ analysing */

.screen-analyzing { align-items: flex-start; padding-top: 80px; }
.analyzing-card { width: 100%; max-width: 520px; padding: 36px; display: flex; flex-direction: column; gap: 22px; }
.analyzing-head { display: flex; align-items: center; gap: 14px; }
.analyzing-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.analyzing-head .hint { font-size: 14px; margin-top: 2px; }
.spinner {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  border: 4px solid var(--accent-soft); border-top-color: var(--accent);
  animation: qSpin .9s linear infinite;
}
@keyframes qSpin { to { transform: rotate(360deg); } }
.progress { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: var(--accent); width: 0; transition: width .6s; }
.steps { display: flex; flex-direction: column; gap: 12px; }
.step { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 600; color: var(--faint); }
.step i { font-size: 20px; }
.step.active { color: var(--ink); }
.step.active i { animation: qSpin 1.2s linear infinite; }
.step.done { color: var(--accent); }

/* ------------------------------------------------------------ priorities */

.factor-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.factor {
  display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 10px;
  background: var(--surface); border-radius: 20px; cursor: grab; user-select: none;
  box-shadow: 0 1px 2px rgba(17, 20, 24, .04);
  transition: box-shadow .15s, opacity .15s;
}
.factor.dragging { opacity: .45; }
.factor.drop-target { outline: 2px dashed var(--accent); box-shadow: 0 8px 24px rgba(0, 136, 176, .18); }
.factor-grip { font-size: 22px; color: var(--faint); flex: none; }
.factor-n {
  width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-size: 14px; font-weight: 800; background: var(--soft); color: var(--body);
}
.factor:first-child .factor-n { background: var(--accent); color: #fff; }
.factor-body { flex: 1; min-width: 0; }
.factor-name { display: block; font-weight: 700; font-size: 15px; }
.factor-desc { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.factor-weight { font-size: 12px; font-weight: 700; color: var(--muted); flex: none; }
.factor-moves { display: flex; gap: 2px; flex: none; }
.factor-moves .icon-btn { width: 34px; height: 34px; font-size: 15px; }
.center-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ------------------------------------------------------------ findings */

.intro { display: flex; flex-direction: column; gap: 14px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700;
  padding: 6px 12px; border-radius: 999px; border: 0; background: var(--surface); color: var(--body);
}
.chip i { font-size: 15px; }
button.chip { cursor: pointer; }
button.chip:hover { background: var(--line); }
.chip .caret { font-size: 12px; }
.conf-High { background: var(--accent-soft); color: var(--accent-dark); }
.conf-Medium { background: var(--warn-soft); color: var(--warn-dark); }
.conf-Low { background: var(--fail-soft); color: var(--fail-dark); }

.basis-card { background: var(--surface); border-radius: 20px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.num-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.num-list li { display: flex; gap: 12px; font-size: 14px; line-height: 1.5; }
.num {
  width: 22px; height: 22px; border-radius: 50%; background: var(--soft); flex: none;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.basis-card .pill-btn { align-self: flex-start; margin-top: 4px; }

.headline { font-size: 44px; font-weight: 800; letter-spacing: -.035em; line-height: 1.08; max-width: 20ch; text-wrap: balance; }
.lede { font-size: 18px; line-height: 1.55; color: var(--muted); max-width: 60ch; text-wrap: pretty; }

.section { display: flex; flex-direction: column; gap: 14px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.stack { display: flex; flex-direction: column; gap: 8px; }

.legend { display: flex; gap: 14px; font-size: 12px; font-weight: 600; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend i { font-size: 15px; }

.st-ok { color: var(--accent); }
.st-warn { color: var(--warn); }
.st-fail { color: var(--fail); }

/* citation chips */
.cite {
  margin-left: 4px; padding: 1px 7px; border: 0; border-radius: 999px;
  font-size: 11px; font-weight: 700; cursor: pointer; vertical-align: 1px;
  background: var(--line); color: var(--body);
}
.cite:hover { background: var(--hover); }
.cite.on { background: var(--accent); color: #fff; }

/* accordions (ranking + questions) */
.acc { background: var(--surface); border-radius: 22px; overflow: hidden; outline: 2px solid transparent; transition: outline-color .3s; }
.acc-body {
  display: grid; grid-template-rows: 0fr; opacity: 0;
  transition: grid-template-rows .32s var(--ease-open), opacity .25s ease;
}
.acc.open .acc-body { grid-template-rows: 1fr; opacity: 1; }
.acc-body > div { overflow: hidden; min-height: 0; }
.acc-toggle {
  width: 100%; border: 0; background: transparent; cursor: pointer; text-align: left; color: var(--ink);
}
.acc-toggle .turn { font-size: 18px; color: var(--muted); transition: transform .3s; }

.rank-row.top { outline-color: var(--accent); }
.rank-btn {
  display: grid; grid-template-columns: 40px minmax(120px, 220px) minmax(0, 1fr) 56px 20px;
  gap: 18px; align-items: center; padding: 16px 20px;
}
.rank-row.open .turn { transform: rotate(180deg); }
.badge {
  width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center;
  font-weight: 800; font-size: 17px; background: var(--line); color: var(--ink);
}
.badge.sm { width: 24px; height: 24px; border-radius: 8px; font-size: 12px; flex: none; }
.badge.top { background: var(--accent); color: #fff; }
.rank-name { font-weight: 700; font-size: 16px; line-height: 1.25; }
.meter { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 999px; background: var(--faint); }
.rank-row.top .meter span { background: var(--accent); }
.score { text-align: right; }
.score b { font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.score small { font-size: 12px; font-weight: 600; color: var(--muted); }
.rank-detail { padding: 0 24px 22px 78px; display: flex; flex-direction: column; gap: 12px; }
.rank-summary { font-size: 15px; line-height: 1.6; color: var(--body); max-width: 68ch; }
.rank-line { display: flex; gap: 10px; font-size: 14px; line-height: 1.5; }
.rank-line b { font-weight: 700; }
.mark {
  width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12px;
}
.mark-ok { background: var(--accent-soft); color: var(--accent); }
.mark-fail { background: var(--fail-soft); color: var(--fail); }
.mark-move { background: var(--soft); color: var(--muted); }

/* grid tables */
.grid-card { background: var(--surface); border-radius: 28px; padding: 8px; overflow: auto; }
.grid { display: grid; gap: 4px; }
.grid-head { padding: 12px 14px; font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.grid-head.muted { font-size: 12px; font-weight: 700; color: var(--muted); }
.grid-cell {
  padding: 14px; font-size: 13.5px; line-height: 1.5; background: var(--bg);
  display: flex; gap: 8px;
}
.grid-cell.last { border-radius: 0 16px 16px 0; }
.grid-cell > i { font-size: 17px; flex: none; margin-top: 1px; }
.grid-row-head {
  text-align: left; padding: 14px 16px; border: 0; font-size: 14px; font-weight: 700; color: var(--ink);
  background: var(--bg); border-radius: 16px 0 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
button.grid-row-head { cursor: pointer; }
button.grid-row-head:hover { background: var(--line); }
.grid-row-head i { font-size: 14px; color: var(--muted); flex: none; }
.grid-row-head.topic { font-size: 13.5px; color: var(--muted); }

/* questions */
.q-btn { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.q-n {
  width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; background: var(--soft); color: var(--muted);
}
.question.open .q-n { background: var(--ink); color: #fff; }
.question.open .turn { transform: rotate(45deg); }
.question.flash { outline-color: var(--accent); }
.q-text { flex: 1; }
.q-crit { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
.q-title { display: block; font-size: 16px; font-weight: 700; margin-top: 1px; }
.q-body { padding: 0 24px 22px 62px; font-size: 15px; line-height: 1.65; color: var(--body); text-wrap: pretty; }

.note { display: flex; gap: 10px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.note > i { font-size: 17px; flex: none; }

/* ------------------------------------------------------------ documents */

.page-head h1 { font-size: 36px; font-weight: 800; letter-spacing: -.03em; }
.page-head p { font-size: 15px; color: var(--muted); margin-top: 8px; max-width: 64ch; text-wrap: pretty; }

.ev-cell {
  text-align: left; padding: 14px; border: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink);
  cursor: pointer; display: flex; gap: 8px; align-items: flex-start; justify-content: space-between;
  background: var(--bg); outline-offset: -2px;
}
.ev-cell:hover { background: var(--line); }
.ev-cell.on { background: var(--accent-soft); outline: 2px solid var(--accent); }
.ev-cell.last, .ev-none.last { border-radius: 0 16px 16px 0; }
.ev-ref {
  flex: none; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: var(--surface); color: var(--body);
}
.ev-none { padding: 14px; font-size: 13.5px; color: var(--faint); background: var(--bg); }

.info-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.info-card { background: var(--surface); border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.info-card h3 { font-size: 16px; font-weight: 800; }
.doc-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.doc-pill {
  display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
  background: var(--bg); font-size: 13px; font-weight: 600;
}
.doc-pill i { font-size: 16px; color: var(--muted); }

/* ------------------------------------------------------------ drawer */

.scrim { position: fixed; inset: 0; background: rgba(17, 20, 24, .18); z-index: 10; }
.drawer {
  position: fixed; top: 16px; right: 16px; bottom: 16px; width: min(400px, calc(100vw - 32px));
  background: var(--surface); border-radius: 28px; box-shadow: 0 24px 64px rgba(17, 20, 24, .18);
  z-index: 11; padding: 28px; display: flex; flex-direction: column; gap: 16px; overflow: auto;
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; }
.ev-badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); }
.drawer-supplier { font-weight: 800; font-size: 18px; }
#evidenceTopic { font-size: 14px; margin-top: 2px; }
.drawer-value { font-size: 20px; font-weight: 700; letter-spacing: -.01em; line-height: 1.35; }
.drawer-passages { display: flex; flex-direction: column; gap: 10px; }
.drawer-passages blockquote { margin: 0; padding: 20px; border-radius: 20px; background: var(--bg); font-size: 16px; line-height: 1.55; }
.drawer-passages small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 10px; }
.drawer-table { align-self: flex-start; margin-top: auto; }

/* ------------------------------------------------------------ overview */

.overview { max-width: 960px; gap: 64px; }
.screen:has(.overview) { padding-top: 56px; padding-bottom: 96px; }
.overview-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }
.overview-hero h1 { font-size: 52px; font-weight: 800; letter-spacing: -.04em; line-height: 1.05; max-width: 16ch; text-wrap: balance; }
.overview-hero > p { font-size: 18px; line-height: 1.55; color: var(--muted); max-width: 58ch; text-wrap: pretty; }
.overview-hero .narrow { max-width: 60ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
#exampleError { color: var(--fail-dark); }
.kicker { font-size: 12px; font-weight: 800; letter-spacing: .1em; color: var(--muted); }
.kicker.accent { color: var(--accent-dark); }
.kicker.light { color: #7fd6f2; }

.how { display: flex; flex-direction: column; gap: 20px; }
.how h2 { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin-top: 6px; }
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.how-card { background: var(--surface); border-radius: 24px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.how-card h3 { font-size: 18px; font-weight: 800; }
.how-card p { font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.how-n { font-size: 12px; font-weight: 800; color: var(--muted); }
.tile-icon {
  width: 44px; height: 44px; border-radius: 14px; flex: none;
  background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 22px;
}
.tile-icon.lg { width: 48px; height: 48px; border-radius: 16px; font-size: 24px; }
.tile-icon.soft { background: var(--soft); color: var(--body); }

.callout {
  background: var(--ink); color: #fff; border-radius: 32px; padding: 40px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; align-items: center;
}
.callout-head { display: flex; flex-direction: column; gap: 12px; }
.callout h2 { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; text-wrap: balance; }
.callout-body { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.callout-body p { font-size: 16px; line-height: 1.6; color: #c9ced6; text-wrap: pretty; }

/* ------------------------------------------------------------ requirements + quotations */

.col-step { max-width: 860px; gap: 24px; }
.col-step.narrow { max-width: 820px; }
.step-head h1 { font-size: 40px; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.step-head p { font-size: 17px; line-height: 1.55; color: var(--muted); margin-top: 12px; max-width: 62ch; text-wrap: pretty; }

#reqChoose { display: flex; flex-direction: column; gap: 14px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.choice {
  text-align: left; border: 2px solid transparent; background: var(--surface); border-radius: 28px; padding: 28px;
  cursor: pointer; display: flex; flex-direction: column; gap: 12px; color: var(--ink);
  box-shadow: 0 1px 2px rgba(17, 20, 24, .04); transition: box-shadow .15s;
}
.choice:hover { box-shadow: 0 12px 32px rgba(0, 136, 176, .14); }
.choice h3 { font-size: 19px; font-weight: 800; }
.choice p { font-size: 14.5px; line-height: 1.55; color: var(--muted); }

.reading { display: flex; align-items: center; gap: 14px; padding: 28px; }
.reading h2 { font-size: 19px; font-weight: 800; }
.reading .hint { font-size: 14px; margin-top: 2px; }

#reqDoc, #reqPri { display: flex; flex-direction: column; gap: 16px; }
.status-bar {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 20px;
  background: var(--accent-soft); color: #00536d; font-size: 14.5px; font-weight: 600;
}
.status-bar > i { font-size: 20px; color: var(--accent); flex: none; }
.status-bar > span { flex: 1; }
.status-bar .link-btn { color: var(--accent-dark); font-size: 13px; white-space: nowrap; }
.body-text { font-size: 14.5px; line-height: 1.55; color: var(--body); max-width: 68ch; }
.with-icon { display: flex; gap: 8px; align-items: center; }
.with-icon i { font-size: 16px; flex: none; }

.req-grid {
  display: grid; grid-template-columns: minmax(150px, 1fr) minmax(200px, 1.4fr) 200px;
  gap: 4px; min-width: 610px;
}
.req-grid .grid-head i { font-size: 14px; cursor: help; }
.req-grid .nowrap { white-space: nowrap; }
.req-cell { padding: 14px 16px; background: var(--bg); }
.req-cell.first { border-radius: 16px 0 0 16px; }
.req-cell.last { border-radius: 0 16px 16px 0; }
.req-cell.accept { font-size: 14.5px; display: flex; align-items: center; }
.req-name { font-weight: 700; font-size: 15px; }
.req-origin { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; align-items: flex-start; gap: 4px; }
.req-origin i { font-size: 13px; margin-top: 1px; flex: none; }
.weight-cell { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.must {
  display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
  background: var(--surface); color: var(--muted); border: 1.5px solid var(--dash);
}
.must i { font-size: 13px; }
.must.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.importance {
  padding: 6px 10px; border-radius: 999px; border: 1.5px solid var(--dash);
  background: var(--surface); font-size: 13px; font-weight: 600; color: var(--ink);
}

.info-steps { display: flex; flex-direction: column; gap: 14px; box-shadow: none; }
.info-steps p { font-size: 14.5px; line-height: 1.55; color: var(--body); }
.weights { display: flex; gap: 8px; flex-wrap: wrap; }
.weight {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px;
  background: var(--bg); font-size: 13px; font-weight: 700; color: var(--muted);
}
.weight:first-child .num { background: var(--accent); color: #fff; }

.step-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.foot-meta { font-size: 14px; font-weight: 600; color: var(--muted); }
.foot-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.foot-hint { font-size: 13.5px; font-weight: 600; color: var(--warn); }
.foot-hint.ready-text { color: #1d7a52; }

.stack-lg { display: flex; flex-direction: column; gap: 12px; }
.stack-lg:empty { display: none; }
.quote-card { background: var(--surface); border-radius: 24px; padding: 20px; display: flex; align-items: center; gap: 14px; }
.quote-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.field-label { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.supplier-input {
  font-size: 16px; font-weight: 700; padding: 6px 10px; margin-left: -10px; max-width: 340px;
  border: 1.5px solid transparent; border-radius: 10px; background: transparent; color: var(--ink);
}
.supplier-input:hover { border-color: var(--dash); }
.supplier-input:focus { border-color: var(--accent); outline: none; background: var(--surface); }
.quote-file { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ready {
  display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: #e6f5ee; color: #1d7a52; font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.ready i { font-size: 15px; }
.quote-card .icon-btn { width: 34px; height: 34px; color: var(--muted); }

/* ------------------------------------------------------------ results bar */

.result-col { max-width: 960px; gap: 24px; }
#screenResult .col-wide.result-col:has(.page-head) { max-width: 1040px; }
.result-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.result-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.result-bar .tabs { box-shadow: none; }

/* ------------------------------------------------------------ dialog */

.modal { position: fixed; inset: 0; background: rgba(17, 20, 24, .3); z-index: 20; display: grid; place-items: center; padding: 24px; }
.dialog {
  width: 100%; max-width: 420px; background: var(--surface); border-radius: 28px; padding: 28px;
  display: flex; flex-direction: column; gap: 14px; box-shadow: 0 24px 64px rgba(17, 20, 24, .2);
}
.dialog h2 { font-size: 22px; font-weight: 800; }
.dialog p { font-size: 15px; color: var(--muted); line-height: 1.5; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }

/* ------------------------------------------------------------ small screens */

@media (max-width: 760px) {
  .topbar { padding: 12px 16px; flex-wrap: wrap; gap: 12px; }
  .brand-sub { display: none; }
  .stepper { order: 3; width: 100%; justify-content: center; }
  .step-line { width: 14px; }
  .step-pill { padding-right: 10px; font-size: 13px; }
  .example-banner { margin: 0 16px; border-radius: 20px; }
  .screen { padding: 24px 16px 64px; }
  .screen:has(.overview) { padding-top: 32px; }
  .overview { gap: 44px; }
  .overview-hero h1 { font-size: 36px; }
  .callout { padding: 28px; }
  .hero h1, .step-head h1 { font-size: 32px; }
  .quote-card { flex-wrap: wrap; }
  .ready { order: 3; }
  .headline { font-size: 32px; }
  .rank-btn { grid-template-columns: 40px minmax(0, 1fr) 56px 20px; gap: 12px; padding: 14px 16px; }
  .rank-btn .meter { display: none; }
  .rank-detail { padding: 0 18px 18px; }
  .q-body { padding: 0 18px 18px; }
  .factor-desc { display: none; }
}
