/* bestpersonalizednewsapp.com: a judge's scorecard. Canary card stock, the form printed in navy, the judge's marks in ballpoint blue. The tally card is the only rich element. */
@font-face { font-family: "Barlow"; src: url("/fonts/barlow-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/fonts/barlow-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/barlow-condensed-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --card: #f2df8f;
  --card-2: #ead27a;
  --paper: #fbf5dc;
  --ink: #15203b;
  --ink-2: #3a4460;
  --ink-3: #555d78;
  --rule: rgba(21, 32, 59, 0.14);
  --rule-strong: rgba(21, 32, 59, 0.4);
  --pen: #1c3fc4;
  --sans: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cond: "Barlow Condensed", "Barlow", "Arial Narrow", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: 16px;
  --crit-w: 132px;
  --col-w: 112px;
  --label-w: 264px;
}

* { box-sizing: border-box; }
html { background: var(--paper); color-scheme: light; -webkit-text-size-adjust: 100%; scrollbar-color: var(--ink) var(--card); }
body { margin: 0; font: 400 17px/1.55 var(--sans); color: var(--ink); background: var(--paper); font-variant-numeric: tabular-nums; caret-color: var(--pen); overflow-x: clip; }
::selection { background: var(--pen); color: #fff; }

a { color: var(--pen); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color 140ms var(--ease); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--pen); outline-offset: 2px; border-radius: 2px; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }
.defs { position: absolute; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.mast-in, main, .foot-in { max-width: 1312px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* Masthead: the head of the card. Name of the contest, who prepared it, when it was checked. */
.mast { background: var(--card); border-bottom: 3px solid var(--ink); }
.mast-in { padding-top: 16px; padding-bottom: 12px; display: grid; gap: 8px 32px; align-items: end; }
.docname { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.name { font: 600 28px/1 var(--cond); color: var(--ink); text-decoration: none; }
.name:hover { color: var(--pen); }
.by { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink); text-decoration: none; }
.by:hover { color: var(--pen); }
.ulsa-mark { display: block; }
.doclinks { display: flex; gap: 8px; font: 500 18px/1 var(--cond); }
.doclinks a { color: var(--ink); text-decoration: none; padding: 13px 14px; border: 1.5px solid var(--ink); border-radius: 6px; transition: background-color 140ms var(--ease), color 140ms var(--ease); }
.doclinks a:hover { background: var(--ink); color: var(--card); }
.doclinks a[aria-current="page"] { background: var(--ink); color: var(--card); }
.checked { margin: 0; font-size: 14px; color: var(--ink-2); }

main { padding-top: 32px; padding-bottom: 72px; }

h1, h2, h3, h4 { font-family: var(--cond); font-weight: 600; text-wrap: balance; }
h1 { font-size: 38px; line-height: 1.02; margin: 0 0 20px; max-width: 20ch; }
h2 { font-size: 26px; line-height: 1.1; margin: 0 0 12px; }
h3 { font-size: 21px; line-height: 1.2; margin: 28px 0 4px; }
h4 { font-size: 20px; line-height: 1.2; margin: 0 0 8px; }
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px; padding-left: 20px; }
li { margin-bottom: 8px; }
strong { font-weight: 600; }

.intro { max-width: 66ch; }
.lead { font-size: 20px; line-height: 1.45; }
.stamp { font-size: 14px; color: var(--ink-3); margin-bottom: 0; }

/* The tally card */
.hero { display: grid; gap: 32px; }
.card { margin: 0; background: var(--card); border: 2px solid var(--ink); border-radius: 10px; box-shadow: 0 1px 0 var(--card-2), 0 14px 28px -18px rgba(21, 32, 59, 0.45); min-width: 0; }
.tally { width: 100%; border-collapse: collapse; }
.tally caption { text-align: left; font: 600 24px/1.1 var(--cond); padding: 14px 10px 10px; border-bottom: 2px solid var(--ink); }
.tally th, .tally td { text-align: left; vertical-align: middle; padding: 7px 2px 7px 10px; border-bottom: 1px solid var(--rule-strong); }
.tally thead th { font: 600 16px/1.1 var(--cond); padding-top: 10px; padding-bottom: 6px; vertical-align: bottom; }
.tally thead td { border-bottom: 1px solid var(--rule-strong); }
.tally tbody th { font: 500 17px/1.1 var(--cond); }
.tally { table-layout: fixed; }
.tally thead td { width: 22%; }
.tally thead th:nth-child(2) { width: 27%; }
.tally thead th:nth-child(4) { width: 28%; }
.tally td + td, .tally thead th + th { border-left: 1px solid var(--rule-strong); }
.dots { display: flex; gap: 3px; }
.d { flex: none; display: inline-block; width: 10px; height: 10px; border: 1.5px solid var(--ink); border-radius: 50%; position: relative; }
.d i { position: absolute; inset: -1.5px; border-radius: 50%; background: var(--pen); }
.n { display: inline-flex; align-items: baseline; gap: 5px; margin-top: 3px; white-space: nowrap; font-size: 13px; color: var(--ink-2); }
.num { position: relative; display: inline-block; min-width: 14px; text-align: center; }
.top .num { margin: 0 7px 0 6px; }
.num b { font: 600 22px/1 var(--cond); color: var(--ink); }
.ring { position: absolute; left: 50%; top: 50%; width: 32px; height: 28px; margin: -15px 0 0 -16px; color: var(--pen); overflow: visible; pointer-events: none; }
.card-key { margin: 0; padding: 10px 12px 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; }
.card-key > span { display: inline-flex; align-items: center; gap: 7px; }
.key-ring { width: 26px; height: 20px; }
.key-ring .ring { width: 26px; height: 20px; margin: -10px 0 0 -13px; }
.card figcaption { padding: 8px 12px 14px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.owner { margin: 0; padding: 12px; border-top: 2px dashed var(--ink); font-size: 14.5px; line-height: 1.45; color: var(--ink); }

/* The sheet */
.sheet { margin: 48px 0 0; }

.legend { margin: 0; padding: 12px 0; border-top: 2px solid var(--ink); display: grid; gap: 8px; font-size: 14px; }
.legend dt { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.legend dd { margin: 0 0 0 22px; color: var(--ink-2); }

.mk { flex: none; display: inline-block; vertical-align: -2px; }
.mk-yes { color: var(--pen); }
.mk-no { color: var(--ink); }
.mk-ns { color: var(--ink-3); }

.picker { display: none; margin: 0; padding: 12px 0; border-top: 1px solid var(--rule); font-size: 15px; }
.picker label { font-weight: 600; margin-right: 8px; }
.picker select { font: inherit; color: var(--ink); background: var(--card); border: 1.5px solid var(--ink); border-radius: 6px; padding: 8px 12px; min-height: 44px; max-width: 100%; accent-color: var(--pen); }

.ledger-wrap { overflow-x: auto; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); scrollbar-color: var(--ink) var(--card); }
.ledger { border-collapse: separate; border-spacing: 0; width: 100%; min-width: calc(var(--crit-w) + 8 * var(--col-w)); table-layout: fixed; font-size: 14.5px; line-height: 1.3; }
.ledger caption { caption-side: bottom; text-align: left; padding: 12px 0; font-size: 14px; color: var(--ink-3); position: sticky; left: 0; }
.ledger th, .ledger td { padding: 10px 8px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--rule); background: var(--paper); }
.ledger td { border-left: 1px solid var(--rule); width: var(--col-w); }
.ledger thead th { font: 600 18px/1.1 var(--cond); vertical-align: bottom; border-bottom: 0; border-left: 1px solid var(--rule); width: var(--col-w); padding-top: 12px; padding-bottom: 10px; }
.ledger thead th.corner { border-left: 0; color: var(--ink-3); font: 400 14px/1.3 var(--sans); }
.ledger th[scope="row"], .ledger thead th.corner { position: sticky; left: 0; z-index: 2; width: var(--crit-w); padding-left: 0; padding-right: 12px; font-weight: 400; box-shadow: 1px 0 0 var(--rule-strong); }
.ledger th[scope="row"] a { color: var(--ink); text-decoration-color: var(--rule-strong); }
.ledger th[scope="row"] a:hover { color: var(--pen); text-decoration-color: currentColor; }
.ledger .own, .ledger td[data-app="ulsa"] { background: #f6ecbd; }
/* Section bars, as on a printed form. */
.ledger .group th { background: var(--ink); color: #f6ecbd; padding: 7px 12px; border: 0; font-weight: 400; font-size: 14px; }
.ledger .group .g-name { display: inline-block; position: sticky; left: 12px; font: 600 18px/1.1 var(--cond); color: var(--card); padding-right: 10px; }
.ledger td a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; text-decoration: none; min-height: 24px; }
.ledger td a:hover span { text-decoration: underline; color: var(--pen); }
.ledger td a:focus-visible { outline-offset: 3px; }
.ledger td.v-ns a { color: var(--ink-3); font-weight: 400; }
.ledger .plan { display: block; padding-left: 20px; font-size: 13px; line-height: 1.3; color: var(--ink-2); }
.ledger tfoot tr:last-child th, .ledger tfoot tr:last-child td { border-bottom: 0; }
.ledger tfoot th[scope="row"] { font-weight: 600; }
.ledger tfoot td { white-space: nowrap; color: var(--ink-2); }
.ledger tfoot b { font: 600 24px/1 var(--cond); color: var(--ink); margin-right: 2px; }
.ledger tfoot .top b { color: var(--pen); }
.ledger tfoot .most { display: block; font-size: 13px; line-height: 1.3; color: var(--pen); font-weight: 600; }
.sheet-note { margin: 12px 0 0; font-size: 14px; color: var(--ink-2); max-width: 68ch; }
.hint { color: var(--ink-3); }

/* Sections: a ruled opener, then the entry. On wide screens the heading sits in a label column. */
.prose > section, .evidence, .faq { border-top: 2px solid var(--ink); padding-top: 14px; margin-top: 48px; }
.prose > section > *, .evidence > *, .prose > h1, .prose > .lead, .prose > .stamp { max-width: 68ch; }
.prose > h1 { max-width: 22ch; }
.prose > .stamp { margin-bottom: 8px; }

/* Contents rail, wide screens only. */
.rail { display: none; }
.rail ul { list-style: none; margin: 0; padding: 0; }
.rail li { margin: 0; border-bottom: 1px solid var(--rule-strong); }
.rail a { display: block; padding: 9px 0; font: 500 18px/1.2 var(--cond); color: var(--ink); text-decoration: none; }
.rail a:hover { color: var(--pen); text-decoration: underline; }

/* Evidence */
.evidence > details, .evidence > p { max-width: 920px; }
.evidence details { border-top: 1px solid var(--rule-strong); }
.evidence details:last-of-type { border-bottom: 1px solid var(--rule-strong); }
.evidence summary { cursor: pointer; padding: 12px 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; list-style: none; }
.evidence summary::-webkit-details-marker { display: none; }
.evidence summary::before { content: "+"; width: 16px; flex: none; font: 600 20px/1.2 var(--cond); color: var(--ink); }
.evidence details[open] summary::before { content: "2"; }
.ev-name { font: 600 19px/1.25 var(--cond); flex: 1 1 200px; }
.ev-count { color: var(--ink-3); font-size: 14px; }
.evidence summary:hover .ev-name { color: var(--pen); }
.evidence ul { list-style: none; padding: 0 0 0 20px; margin: 0; }
.evidence li { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 12px 0; margin: 0; border-top: 1px solid var(--rule); font-size: 15px; }
.ev-app { font-weight: 600; }
.ev-val { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.ev-more { padding: 8px 0 16px 20px; margin: 0; font-size: 14px; }

.picks ul { list-style: none; padding: 0; }
.picks li { padding: 12px 0; margin: 0; border-top: 1px solid var(--rule-strong); }
.picks li:last-child { border-bottom: 1px solid var(--rule-strong); }

/* Criteria page */
.prose > section.wide > .grp, .prose > section.wide > .crit { max-width: none; }
.grp { background: var(--ink); color: #f6ecbd; padding: 8px 12px; margin-top: 28px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; }
.grp h3 { margin: 0; color: var(--card); }
.grp-means { margin: 0; font-size: 15px; }
.crit { padding: 16px 0; border-bottom: 1px solid var(--rule-strong); scroll-margin-top: 16px; }
.crit dl, .reasons { margin: 0; }
.crit dt { font: 600 16px/1.3 var(--cond); color: var(--ink-3); margin-top: 10px; }
.crit dd, .reasons dd { margin: 0; }
.crit dd { font-size: 16px; }
.reasons dt { font: 600 19px/1.25 var(--cond); margin-top: 16px; }
.reasons { margin-bottom: 16px; }
details { scroll-margin-top: 16px; }

/* The publisher's stub: a tear-off slip at the foot of the card. */
.pub { margin-top: 64px; padding: 20px 16px; background: var(--card); border: 2px solid var(--ink); border-top-style: dashed; border-radius: 0 0 10px 10px; max-width: 68ch; }
.pub h2 { margin: 0 0 8px; }
.pub-facts { font-size: 15px; color: var(--ink-2); }
.pub p:last-child { margin: 0; }
.btn { display: inline-block; background: var(--ink); color: var(--card); font: 600 19px/1 var(--cond); text-decoration: none; padding: 12px 18px; border-radius: 6px; transition: background-color 140ms var(--ease); }
.btn:hover { background: var(--pen); color: #fff; }

/* Footer */
.sheetfoot { background: var(--card); border-top: 3px solid var(--ink); font-size: 14px; color: var(--ink); scrollbar-color: var(--ink) var(--card); }
.foot-in { margin-top: 0; margin-bottom: 0; padding-top: 16px; padding-bottom: 28px; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.sheetfoot a { color: var(--ink); }
.sheetfoot a:hover { color: var(--pen); }

/* Narrow screens with JS: one app's column next to the criterion. */
@media (max-width: 719px) {
  .js .picker { display: block; }
  .js .ledger { min-width: 0; }
  .js .ledger .off { display: none; }
  .js .ledger th[scope="row"], .js .ledger thead th.corner { width: 54%; }
  .js .ledger td a, .js .ledger .plan { white-space: nowrap; }
  .js .ledger td, .js .ledger thead th { width: auto; }
  .js .ledger .group .g-means { display: block; }
  .js .hint { display: none; }
}

@media (min-width: 560px) {
  .tally th, .tally td { padding: 10px 8px 10px 16px; }
  .tally caption { padding: 16px 16px 12px; font-size: 28px; }
  .tally thead th { font-size: 19px; }
  .tally tbody th { font-size: 19px; }
  .tally thead td { width: 20%; }
  .tally thead th:nth-child(2) { width: 31%; }
  .tally thead th:nth-child(4) { width: 22%; }
  .tally td { white-space: nowrap; }
  .dots { display: inline-flex; gap: 4px; vertical-align: -2px; margin-right: 8px; }
  .d { width: 14px; height: 14px; }
  .n { margin-top: 0; }
  .num b { font-size: 26px; }
  .top .num { margin: 0 11px 0 9px; }
  .top .dots { margin-right: 6px; }
  .tally .ring { width: 46px; height: 34px; margin: -17px 0 0 -23px; }
  .card-key, .card figcaption { padding-left: 16px; padding-right: 16px; }
  .owner { padding: 14px 16px; }
}

@media (min-width: 720px) {
  :root { --gutter: 32px; --crit-w: 224px; }
  h1 { font-size: 52px; }
  h2 { font-size: 30px; }
  .mast-in { grid-template-columns: 1fr auto; padding-top: 20px; padding-bottom: 16px; }
  .name { font-size: 40px; }
  .doclinks { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .checked { grid-column: 1; }
  main { padding-top: 48px; }
  .legend { grid-template-columns: repeat(3, auto); justify-content: start; gap: 8px 40px; }
  .ledger th[scope="row"], .ledger thead th.corner { font-size: 15px; }
  .evidence li { grid-template-columns: 128px 112px 1fr; gap: 16px; align-items: baseline; }
  .pub { padding: 24px; }
}

/* Wide screens: text left, the tally card right; headings move into a label column. */
@media (min-width: 1080px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 664px); gap: 48px; align-items: start; }
  h1 { font-size: 60px; }
  .prose > section, .evidence, .pub { display: grid; grid-template-columns: var(--label-w) minmax(0, 1fr); column-gap: 40px; align-items: start; }
  .prose > section > *, .evidence > *, .pub > * { grid-column: 2; }
  .prose > section > h2, .evidence > h2, .pub > h2 { grid-column: 1; grid-row: 1 / span 99; position: sticky; top: 16px; }
  .prose > section.wide { display: block; }
  .prose > section.wide > h2 { position: static; margin-bottom: 0; }
  .pub { max-width: calc(var(--label-w) + 40px + 68ch + 48px); }
  .crit { display: grid; grid-template-columns: 220px minmax(0, 1fr); column-gap: 32px; }
  .crit dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 32px; }
  .crit dl > div { min-width: 0; }
  .crit dt { margin-top: 0; }
  .reasons { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0 32px; max-width: none !important; }
  .reasons dt, .reasons dd { padding: 12px 0; margin: 0; border-top: 1px solid var(--rule-strong); }
}

@media (min-width: 1280px) {
  .below { display: grid; grid-template-columns: minmax(0, 1fr) 216px; column-gap: 56px; align-items: start; }
  .rail { display: block; position: sticky; top: 24px; margin-top: 48px; border-top: 2px solid var(--ink); }
}

/* The whole sheet fits, so the header row sticks to the viewport. */
@media (min-width: 1184px) {
  .ledger-wrap { overflow: visible; }
  .ledger thead th { position: sticky; top: 0; z-index: 3; box-shadow: 0 2px 0 var(--ink); }
  .ledger thead th.corner { z-index: 4; box-shadow: 0 2px 0 var(--ink); }
  .hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

@media print {
  .picker, .skip, .btn { display: none; }
  .ledger-wrap { overflow: visible; }
}

/* Laptop widths: the tally card goes under the opening so the headline keeps its line length */
@media (min-width: 1080px) and (max-width: 1279px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
}

/* AI disclosure line (added by the build) keeps the footer's gutters */
.sheetfoot .ai-note { max-width: 1312px !important; margin: 0 auto !important; padding: 0 var(--gutter) 24px; }
