/* MMP Scorecard: "marked exam paper". Lined paper, red margin rule, ink blue, red-pen marks. Light mode only. */
:root {
  --paper: #fbfaf6;
  --rule: #dfe7f1;
  --margin: #e9a3a3;
  --ink: #1d3557;
  --ink-2: #3c5272;
  --muted: #5d6b80;
  --red: #d62828;
  --green: #2e7d32;
  --amber: #b26a00;
  --red-soft: #fbe9e7;
  --pencil: #8a94a3;
  --line-h: 28px;
  --gutter: 64px;
  --serif: "Crimson Pro", Georgia, serif;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pen: "Caveat", "Comic Sans MS", cursive;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image: linear-gradient(to bottom, transparent calc(var(--line-h) - 1px), var(--rule) calc(var(--line-h) - 1px), var(--rule) var(--line-h));
  background-size: 100% var(--line-h);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  overflow-x: hidden;
}
body::before { /* red margin rule */
  content: ""; position: fixed; top: 0; bottom: 0; left: calc(var(--gutter) - 10px); width: 0;
  border-left: 1.5px solid var(--margin); box-shadow: 4px 0 0 -2.5px var(--margin); z-index: 0; pointer-events: none;
}
main, header, footer { position: relative; z-index: 1; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px 0 var(--gutter); }
a { color: var(--ink); text-decoration-color: rgba(214, 40, 40, .55); text-underline-offset: 3px; }
a:hover { color: var(--red); }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.3rem); font-weight: 700; letter-spacing: -.01em; }
h1 em { font-family: var(--pen); font-style: normal; color: var(--red); font-weight: 700; font-size: 1.12em; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); font-weight: 600; }
h3 { font-size: 1.3rem; font-weight: 600; margin-top: 1.3em; }
h4 { font-size: 1.08rem; font-weight: 600; margin: 1.1em 0 .3em; }
p { margin: 0 0 1em; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
code { font-size: .9em; background: #eef2f7; padding: 1px 4px; border-radius: 2px; }

/* header */
.top { background: var(--paper); border-bottom: 2px solid var(--ink); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--serif); font-size: 1.35rem; color: var(--ink); }
.brand b { font-weight: 700; }
.brand .tick { flex: none; }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.tabs a { text-decoration: none; padding: 6px 10px; font-size: .92rem; font-weight: 500; color: var(--ink-2); border-bottom: 2px solid transparent; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--red); }
.tabs a:hover { color: var(--red); }

/* hero */
.hero { padding: 44px 0 20px; }
.crumb { font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.crumb a { color: var(--muted); }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 760px; }
.answer { margin-top: 22px; max-width: 860px; border-left: 3px solid var(--red); padding: 4px 0 4px 18px; background: rgba(251, 250, 246, .85); }
.answer .lbl { display: block; font-family: var(--pen); color: var(--red); font-size: 1.35rem; line-height: 1; margin-bottom: 4px; }
.answer p { margin: 0; font-size: 1.04rem; }

/* question sections, numbered in the margin like an exam paper */
.q { padding: 26px 0; border-top: 1px dashed #c9d4e2; }
.q .wrap { position: relative; }
.qn { position: absolute; left: 6px; top: -4px; width: 40px; text-align: right; font-family: var(--pen); font-weight: 700; color: var(--red); font-size: 2.1rem; line-height: 1; }
.qn::after { content: "."; }
.sub { color: var(--muted); margin-top: -.2em; }
.note { color: var(--muted); font-size: .9rem; }
.prose { max-width: 800px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.verdict { border: 2px solid var(--red); padding: 12px 16px; background: var(--paper); transform: rotate(-.3deg); }
.verdict strong:first-child { font-family: var(--pen); font-size: 1.3rem; color: var(--red); font-weight: 700; }

/* marks */
.mk { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.mk b { font-family: var(--pen); font-weight: 700; font-size: 1.45rem; line-height: 1; width: 1.1em; text-align: center; }
.mk-y b { color: var(--green); }
.mk-p b { color: var(--amber); font-size: 1.3rem; }
.mk-n b { color: var(--red); }
.mk-u b { color: #111; }
.ml { font-size: .82rem; color: var(--ink-2); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .9rem; margin-bottom: 10px; }

/* tables: ruled, sticky label column */
.grid-wrap { position: relative; overflow-x: auto; max-width: 100%; border: 1px solid #c9d4e2; background: var(--paper); margin: 8px 0 12px; -webkit-overflow-scrolling: touch; }
.grid-wrap.narrow { max-width: 420px; }
.grid { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .9rem; background: var(--paper); }
.grid th, .grid td { padding: 8px 10px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.grid thead th { font-weight: 600; font-size: .82rem; color: var(--ink-2); border-bottom: 2px solid var(--ink); background: var(--paper); white-space: nowrap; }
.grid thead th a { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }
.grid thead th img { border-radius: 3px; }
.grid tbody th { font-weight: 600; font-family: var(--serif); font-size: 1rem; }
.grid tbody th, .grid thead th:first-child {
  position: sticky; left: 0; z-index: 2; background: var(--paper); min-width: 150px;
  box-shadow: 6px 0 6px -4px rgba(29, 53, 87, .18); border-right: 1px solid #c9d4e2;
}
.grid td { text-align: center; }
.grid.wide td { text-align: left; min-width: 170px; }
.grid.wide .ct { display: block; font-size: .82rem; color: var(--ink-2); margin-top: 2px; white-space: normal; }
.grid.plain td, .grid.kv td { text-align: left; }
.grid.kv td:last-child { min-width: 220px; }
.src { font-size: .78rem; color: var(--muted); }

/* ruled index lists */
.ruled { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); max-width: 900px; }
.ruled li { border-bottom: 1px solid var(--rule); }
.ruled a { display: block; padding: 10px 0; text-decoration: none; }
.ruled b { font-family: var(--serif); font-size: 1.15rem; display: inline-flex; align-items: center; gap: 6px; }
.ruled span { display: block; color: var(--ink-2); font-size: .92rem; }
.ruled a:hover b { color: var(--red); }
.ticks { list-style: none; padding: 0; max-width: 820px; }
.ticks li { position: relative; padding-left: 28px; margin-bottom: 8px; }
.ticks li::before { content: "\2713"; position: absolute; left: 2px; top: -4px; font-family: var(--pen); font-weight: 700; color: var(--green); font-size: 1.5rem; }

/* scorecard tool */
.sc { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 10px; }
.sc-key { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .88rem; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.sc-key p { margin: 0; }
.wk { display: inline-block; min-width: 20px; text-align: center; border: 1px solid var(--ink-2); font-weight: 600; margin: 0 2px 0 6px; }
button, .btn {
  font: 500 .88rem var(--sans); color: var(--ink); background: var(--paper); border: 1.5px solid var(--ink); padding: 6px 12px; cursor: pointer; text-decoration: none; display: inline-block;
}
button:hover, .btn:hover { border-color: var(--red); color: var(--red); }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.cg h3 { font-size: 1.15rem; margin: 18px 0 2px; }
.cg h3 a { text-decoration: none; }
.crit { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0 8px 8px; border-bottom: 1px solid var(--rule); border-left: 3px solid transparent; }
.crit.on { border-left-color: var(--red); background: rgba(251, 233, 231, .45); }
.cl b { display: block; font-weight: 600; }
.cl span { display: block; font-size: .82rem; color: var(--muted); line-height: 1.4; }
.vol { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: .85rem; font-weight: 500; }
.vol input { width: 120px; font: 500 .95rem var(--sans); color: var(--ink); padding: 4px 6px; border: 1.5px solid var(--ink); background: #fff; }
.ws { border: 0; padding: 0; margin: 0; display: flex; gap: 3px; flex: none; align-self: center; }
.w { position: relative; cursor: pointer; }
.w input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.w span { display: block; width: 30px; height: 30px; line-height: 28px; text-align: center; border: 1.5px solid #9fb0c6; font-weight: 600; font-size: .9rem; color: var(--ink-2); background: #fff; }
.w input:checked + span { border-color: var(--red); color: #fff; background: var(--red); }
.w0 input:checked + span { background: var(--ink); border-color: var(--ink); }
.w input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.sc-out { position: sticky; top: 12px; }
.sc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-bottom: 2px solid var(--ink); padding-bottom: 6px; flex-wrap: wrap; }
.sc-head b { font-family: var(--serif); font-size: 1.3rem; }
.sc-head span { font-size: .85rem; color: var(--muted); }
.papers { list-style: none; padding: 0; margin: 0 0 18px; max-height: 70vh; overflow-y: auto; }
.papers .empty { padding: 14px 0; color: var(--muted); }
.paper { display: grid; grid-template-columns: 20px 62px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--rule); align-items: start; }
.rank { font-family: var(--serif); color: var(--muted); font-weight: 600; padding-top: 16px; }
.circle {
  width: 58px; height: 58px; display: flex; align-items: center; justify-content: center; font-family: var(--pen); font-weight: 700; font-size: 1.75rem; color: var(--red);
  border: 2.5px solid var(--red); border-radius: 52% 46% 55% 44% / 48% 55% 45% 52%; transform: rotate(-6deg);
}
.circle small { font-size: .9rem; margin-left: 1px; }
.phead { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.phead a { display: inline-flex; align-items: center; gap: 6px; font-family: var(--serif); font-size: 1.2rem; font-weight: 600; text-decoration: none; }
.range { font-size: .78rem; color: var(--muted); }
.marks { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: .8rem; color: var(--ink-2); }
.m { display: inline-flex; align-items: center; gap: 3px; }
.m b { font-family: var(--pen); font-size: 1.25rem; line-height: 1; }
.m-y b { color: var(--green); }
.m-p b { color: var(--amber); }
.m-n b { color: var(--red); }
.m-u b { color: #111; }
.m-n span { text-decoration: line-through; text-decoration-color: rgba(29, 53, 87, .5); }
.warn { margin: 6px 0 0; font-size: .82rem; color: var(--red); font-weight: 600; }
.ask { margin: 4px 0 0; font-size: .82rem; color: var(--muted); }
.rfp textarea { width: 100%; font: .82rem/1.5 var(--sans); color: var(--ink); background: #fff; border: 1.5px solid #9fb0c6; padding: 10px; margin: 8px 0; resize: vertical; }

/* RFP bank */
.rfpbank h3 { border-bottom: 2px solid var(--ink); padding-bottom: 4px; }
.rfpbank h3 a { text-decoration: none; }
.bank { padding-left: 2.2em; }
.bank li::marker { font-family: var(--pen); color: var(--red); font-weight: 700; font-size: 1.15em; }

/* FAQ */
.faq { max-width: 860px; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: 10px 0; font-family: var(--serif); font-size: 1.12rem; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q."; font-family: var(--pen); color: var(--red); font-weight: 700; margin-right: 8px; font-size: 1.2em; }
.faq details p { margin: 0 0 12px; color: var(--ink-2); }

/* footer */
.site { border-top: 2px solid var(--ink); margin-top: 32px; padding: 28px 0 20px; background: var(--paper); }
.site .cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 24px; }
.site p { font-size: .9rem; color: var(--ink-2); }
.site h4 { font-family: var(--sans); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 6px 0 8px; }
.site ul { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.site li { margin-bottom: 4px; }
.site .fine { font-size: .8rem; color: var(--muted); margin-top: 18px; }

@media (max-width: 980px) {
  .sc { grid-template-columns: 1fr; }
  .sc-out { position: static; }
  .papers { max-height: none; }
  .site .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  :root { --gutter: 30px; }
  .wrap { padding: 0 16px 0 var(--gutter); }
  body::before { left: 16px; }
  .qn { position: static; display: block; width: auto; text-align: left; font-size: 1.6rem; margin-bottom: 2px; }
  .hide-sm { display: none; }
  .tabs a { padding: 6px 7px; font-size: .86rem; }
  .crit { flex-direction: column; gap: 6px; }
  .ws { align-self: flex-start; }
  .grid tbody th, .grid thead th:first-child { min-width: 118px; }
  .grid.wide td { min-width: 150px; }
  .site .cols { grid-template-columns: 1fr; }
  .paper { grid-template-columns: 52px minmax(0, 1fr); }
  .rank { display: none; }
  .circle { width: 50px; height: 50px; font-size: 1.5rem; }
}
