/* KarenBench. A paper open in a PDF viewer, marked up by Karen in pink pen.
   Tokens: viewer grey, paper white, ink, Karen's pen, link blue, and five highlighters for the five axes. */
:root {
  --viewer: #50545a;
  --bar: #2f3236;
  --paper: #ffffff;
  --ink: #141417;
  --faint: #62656d;
  --hair: #c9ccd2;
  --pen: #e5177b;
  --link: #1b3fb8;
  --hl-K: #ffe66b;
  --hl-A: #ffa8d2;
  --hl-R: #ffbe7a;
  --hl-E: #bdeb94;
  --hl-N: #a6d8ff;
  --serif: 'STIX Two Text', 'Times New Roman', Times, serif;
  --mono: 'Courier Prime', 'Courier New', Courier, monospace;
  --hand: 'Reenie Beanie', 'Bradley Hand', 'Segoe Print', cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--viewer);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17.5px;
  line-height: 1.52;
  text-rendering: optimizeLegibility;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--pen); outline-offset: 2px; }
[hidden] { display: none !important; }

/* viewer toolbar */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  height: 52px; padding: 0 14px;
  background: var(--bar); color: #f1f2f4;
  font-family: system-ui, 'Segoe UI', Roboto, sans-serif; font-size: 14px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .35);
}
.bar-file { display: inline-flex; align-items: center; gap: 10px; color: inherit; min-width: 0; }
.bar-file:hover { text-decoration: none; }
.kn { width: 30px; height: 30px; flex: none; }
.bar-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .01em; }
.bar-page { background: #1b1d20; border-radius: 4px; padding: 4px 12px; font-variant-numeric: tabular-nums; color: #d5d7db; }
.bar-do { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.bar-link { color: #d5d7db; }
.bar-run {
  background: var(--pen); color: #fff; font-weight: 600;
  padding: 8px 14px; border-radius: 5px; white-space: nowrap;
}
.bar-run:hover { text-decoration: none; background: #c90f69; }

/* pages */
.stack { padding: 26px 12px 60px; display: grid; gap: 22px; justify-content: center; }
.sheet {
  position: relative;
  width: min(960px, calc(100vw - 24px));
  background: var(--paper);
  padding: 76px 236px 84px 84px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
}
.folio { position: absolute; left: 0; right: 0; bottom: 28px; text-align: center; font-size: 15px; color: var(--ink); }

/* title block, the way conference papers set it */
.titleblock { text-align: center; margin-bottom: 26px; }
.titleblock h1 {
  margin: 0; padding: 18px 0 20px;
  border-top: 4px solid var(--ink); border-bottom: 1px solid var(--ink);
  font-size: clamp(1.55rem, 3.6vw, 2.05rem); line-height: 1.18; font-weight: 700; letter-spacing: -.005em;
  text-wrap: balance;
}
.authors { margin: 18px 0 0; font-weight: 600; }
.affil { font-weight: 400; color: var(--faint); font-size: .94em; }

.epigraph {
  margin: 0 auto 26px; max-width: 520px; padding: 0 0 0 18px;
  border-left: 3px solid var(--ink);
  font-style: italic; font-size: 1.08em; line-height: 1.45;
}
.epigraph p { margin: 0 0 6px; }
.epigraph footer { font-style: normal; font-size: .86em; }
.circled { position: relative; white-space: nowrap; }
.circled::after {
  content: ''; position: absolute; inset: -5px -9px -6px -9px;
  border: 2.5px solid var(--pen); border-radius: 50% 46% 52% 44% / 60% 52% 58% 50%;
  transform: rotate(-2deg); pointer-events: none;
}

.abstract { margin: 0 auto 30px; max-width: 560px; }
.abstract h2 { text-align: center; font-size: 1.02em; margin: 0 0 6px; font-weight: 700; }
.abstract p { margin: 0; font-size: .96em; text-align: justify; hyphens: auto; }

.sec { font-size: 1.2em; font-weight: 700; margin: 34px 0 10px; line-height: 1.25; }
.sub { font-size: 1.04em; font-weight: 700; margin: 26px 0 8px; }
.no { display: inline-block; min-width: 1.5em; margin-right: .35em; }
.sheet > .sec:first-child { margin-top: 0; }
p { margin: 0 0 12px; }
.sheet > p { text-align: justify; hyphens: auto; }
.tt { font-family: var(--mono); font-size: .9em; background: #f1f1f3; padding: 1px 5px; border-radius: 3px; white-space: nowrap; }
.eq { text-align: center !important; font-size: 1.02em; margin: 18px 0; white-space: normal; }
.note { font-size: .88em; color: var(--faint); text-align: left !important; }
.indie { margin-top: 30px; font-size: .86em; color: var(--faint); text-align: left !important; }

/* Karen's pen */
.pen {
  position: absolute; right: 26px; width: 178px; margin: 0;
  font-family: var(--hand); color: var(--pen);
  font-size: 1.72rem; line-height: .98; text-align: left !important; hyphens: manual !important;
  transform: rotate(-4deg); transform-origin: left center;
  pointer-events: none;
}
.pen-title { top: 96px; transform: rotate(5deg); }
.pen-abs { top: 372px; }
.pen-fig { top: auto; bottom: 250px; transform: rotate(3deg); }
.pen-unit { top: auto; bottom: auto; margin-top: -64px; transform: rotate(-7deg); font-size: 2rem; }
.pen-res { top: 84px; transform: rotate(4deg); }
.pen-lim { top: auto; margin-top: -78px; transform: rotate(-5deg); font-size: 1.95rem; }

/* figures and tables */
.fig { margin: 24px 0 8px; }
.fig figcaption, .tbl caption { font-size: .9em; text-align: left; line-height: 1.4; }
.fig figcaption { margin-top: 10px; }
.fig-mascot img { display: block; width: min(100%, 400px); height: auto; margin: 0 auto; }
.fig-mascot figcaption { text-align: center; }

.tbl { width: 100%; border-collapse: collapse; margin: 16px 0 20px; font-size: .93em; }
.tbl caption { caption-side: top; padding-bottom: 8px; }
.tbl thead th { border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 7px 8px; text-align: left; font-weight: 600; vertical-align: bottom; }
.tbl tbody td, .tbl tbody th { padding: 7px 8px; vertical-align: top; text-align: left; font-weight: 400; }
.tbl tbody tr:last-child > * { border-bottom: 2px solid var(--ink); }
.say { font-style: italic; color: #33353b; }
.tbl-tiers { max-width: 360px; }

.chip {
  display: inline-grid; place-items: center; width: 1.65em; height: 1.65em;
  font-family: var(--serif); font-weight: 700; font-size: .95em; line-height: 1; color: var(--ink);
  border-radius: 3px;
}
.ax-K { background: var(--hl-K); } .ax-A { background: var(--hl-A); } .ax-R { background: var(--hl-R); }
.ax-E { background: var(--hl-E); } .ax-N { background: var(--hl-N); }

/* the test */
.lab { border: 1.5px solid var(--ink); padding: 0; margin: 22px -152px 8px 0; background: #fff; }
.lab figcaption { padding: 10px 18px 12px; border-top: 1px solid var(--ink); margin: 0; }
.step { padding: 18px 18px 20px; }
.step + .step { border-top: 1px dashed var(--hair); }
.step h4 { margin: 0 0 12px; font-size: 1em; font-weight: 600; }
.stepno { font-family: var(--mono); font-weight: 700; font-size: .82em; text-transform: uppercase; letter-spacing: .06em; background: var(--ink); color: #fff; padding: 3px 8px 2px; border-radius: 3px; margin-right: 8px; white-space: nowrap; }
.prompt {
  margin: 0 0 12px; padding: 14px 16px; max-height: 232px; overflow: auto;
  background: #f6f6f7; border: 1px solid var(--hair);
  font-family: var(--mono); font-size: .82em; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere;
}
.lbl { display: block; font-size: .86em; font-weight: 600; margin: 0 0 4px; }
input[type=text], textarea {
  display: block; width: 100%; margin: 0 0 12px; padding: 10px 12px;
  border: 1.5px solid var(--ink); border-radius: 0; background: #fff; color: var(--ink);
  font-family: var(--mono); font-size: 16px; line-height: 1.45;
}
input[type=text] { max-width: 340px; }
textarea { resize: vertical; min-height: 150px; }
::placeholder { color: #8b8e96; opacity: 1; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.spec { font-size: .88em; color: var(--faint); }
.msg { margin: 10px 0 0; font-size: .9em; color: var(--pen); min-height: 1.3em; text-align: left; }

.btn {
  display: inline-block; cursor: pointer;
  font-family: var(--serif); font-size: 1rem; font-weight: 600; line-height: 1.2; text-align: center;
  padding: 10px 16px; border: 1.5px solid var(--ink); border-radius: 0;
  background: #fff; color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:hover { text-decoration: none; transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn-go { background: var(--pen); border-color: var(--ink); color: #fff; }
.linkbtn { font: inherit; color: var(--link); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }

/* the measurement */
.readout { display: grid; grid-template-columns: 1fr minmax(220px, 290px); gap: 10px 24px; align-items: center; }
.dial { text-align: left; }
.r-who { margin: 0; font-family: var(--mono); font-size: .86em; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); overflow-wrap: anywhere; }
.r-num { margin: 0; font-size: clamp(4.6rem, 15vw, 7.2rem); line-height: .95; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.r-num small { font-size: .26em; font-weight: 400; letter-spacing: 0; margin-left: 6px; color: var(--faint); }
.r-kn { margin: 2px 0 14px; font-style: italic; font-size: 1.1em; }
.stamp {
  display: inline-block; margin: 0; padding: 7px 14px 5px;
  border: 3px double var(--pen); color: var(--pen); border-radius: 4px;
  font-family: var(--mono); font-weight: 700; font-size: 1.12em; text-transform: uppercase; letter-spacing: .09em;
  transform: rotate(-4deg); transform-origin: left center;
}
.stamp.thunk { animation: thunk .42s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes thunk { from { transform: rotate(-12deg) scale(2.1); opacity: 0; } to { transform: rotate(-4deg) scale(1); opacity: 1; } }
.pent { width: 100%; height: auto; display: block; }
.pent text { font-family: var(--serif); font-weight: 700; font-size: 15px; fill: var(--ink); }
.tbl-out { margin: 18px 0 16px; }
.tbl-out td { vertical-align: middle; border-bottom: 1px solid #e6e7ea; }
.tbl-out tr:last-child > * { border-bottom: 1px solid #e6e7ea; }
.tbl-out .o-name { font-weight: 600; white-space: nowrap; }
.tbl-out .o-val { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl-out .o-bar { width: 42%; min-width: 84px; }
.meter { display: block; height: 12px; background: #eeeff1; position: relative; }
.meter i { position: absolute; inset: 0 auto 0 0; display: block; }
.share { display: flex; flex-wrap: wrap; gap: 12px; margin: 4px 0 16px; }
.exhibit { border-top: 1px dashed var(--hair); padding-top: 12px; }
.exhibit summary { cursor: pointer; font-weight: 600; }
.found { font-size: .88em; color: var(--faint); margin: 8px 0 0; text-align: left; }
.item { margin: 14px 0 0; }
.item-q { font-family: var(--mono); font-size: .8em; color: var(--faint); margin: 0 0 4px; text-align: left; }
.item-a { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .95em; text-align: left; }
.item-n { margin: 4px 0 0; font-size: .84em; text-align: left; }
.item-n span { padding: 1px 6px; margin-right: 6px; display: inline-block; }
mark { color: inherit; padding: 1px 2px; border-radius: 2px; }
.calm { color: var(--faint); font-style: italic; }

/* the board */
.wide { margin-right: -152px; overflow-x: auto; }
.tbl-board { margin-top: 8px; min-width: 560px; }
.tbl-board td { vertical-align: middle; border-bottom: 1px solid #e6e7ea; }
.tbl-board .c-rank { width: 2.2em; color: var(--faint); font-variant-numeric: tabular-nums; }
.tbl-board .c-ax { width: 2.6em; text-align: center; font-variant-numeric: tabular-nums; }
.tbl-board .c-score { width: 30%; }
.tbl-board .c-tier { white-space: nowrap; font-size: .92em; }
.m-name { font-weight: 600; display: block; line-height: 1.2; }
.m-maker { color: var(--faint); font-size: .84em; }
.sc { display: grid; grid-template-columns: 2.4em 1fr; align-items: center; gap: 8px; }
.sc b { font-size: 1.14em; font-variant-numeric: tabular-nums; text-align: right; }
.sortbtn { font: inherit; font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }
.rowbtn { cursor: pointer; }
.rowbtn:hover td { background: #fafafb; }
.rowbtn:focus-visible { outline-offset: -3px; }
.open-row td { background: #fbfbfc; padding: 4px 14px 18px; }
.row-share { margin: 14px 0 4px; text-align: left; }
.soon { text-align: center !important; padding: 34px 8px !important; font-style: italic; color: var(--faint); }

.refs { padding-left: 2.1em; font-size: .92em; }
.refs li { margin-bottom: 8px; overflow-wrap: anywhere; }
.refs li::marker { content: '[' counter(list-item) ']  '; }

/* narrow screens: the margin folds away and Karen writes between the lines */
@media (max-width: 900px) {
  body { font-size: 16.5px; }
  .stack { padding: 14px 0 40px; gap: 14px; }
  .sheet { width: 100vw; padding: 38px 22px 70px; }
  .lab, .wide { margin-right: 0; }
  .pen { position: static; width: auto; margin: 2px 0 14px !important; font-size: 1.6rem; transform: rotate(-2deg); text-align: right !important; }
  .pen-unit, .pen-lim { font-size: 1.7rem; }
  .readout { grid-template-columns: 1fr; }
  .tbl-out .o-name { white-space: normal; font-size: .94em; }
  .tbl-out td { padding-left: 4px; padding-right: 4px; }
  .pent { max-width: 300px; margin: 0 auto; }
  .bar-link { display: none; }
  .bar { grid-template-columns: 1fr auto auto; }
  .tbl-axes thead th:last-child, .tbl-axes td.say { display: none; }
  .abstract p, .sheet > p { text-align: left; }
}
@media (max-width: 560px) {
  .bar-name { display: none; }
  .tbl-board .c-ax { display: none; }
  .tbl-board { min-width: 0; }
  .tbl-board .c-tier { white-space: normal; }
  .step { padding: 16px 14px 18px; }
  .share .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stamp.thunk { animation: none; }
  .btn { transition: none; }
}
@media print {
  .bar, .share, #copy, .spec { display: none; }
  body { background: #fff; }
  .sheet { box-shadow: none; width: auto; }
}
