/* Limit Case. Plain CSS, light mode only, no build step. */

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #faf9f6;
  --card: #f1f0ed;
  --text: #161616;
  --muted: #6b6b66;
  --hair: #e4e2dc;
  --accent: #1f6feb;
  --correct: #3a7d5c;
  --missing: #b8b5ad;
  --wrong: #c2452d;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Newsreader", "Iowan Old Style", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  background: var(--text);
  color: var(--bg);
  padding: 8px 12px;
  border-radius: 6px;
  z-index: 20;
}
.skip:focus { top: 12px; }

/* Footer, shared */
.site-footer {
  max-width: 520px;
  margin: 96px auto 0;
  padding: 0 16px 40px;
}
.site-footer hr {
  border: 0;
  border-top: 1px solid var(--hair);
  margin: 0 0 20px;
}
.site-footer p {
  margin: 0;
  text-align: center;
  font-family: var(--sans);
  font-size: 17px;
  color: var(--muted);
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* Home */
.home { font-family: var(--serif); }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
}
.wordmark img { width: 24px; height: 24px; display: block; }

.wordmark--fixed {
  position: fixed;
  top: 16px;
  left: 20px;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}
.wordmark--fixed.is-visible { opacity: 1; visibility: visible; }

.essay {
  max-width: 600px;
  margin: 0 auto;
  padding: 56px 20px 0;
}
.essay .mark { display: block; width: 120px; height: 120px; margin: 0 auto 28px; }
.essay h1 {
  margin: 0;
  text-align: center;
  font-weight: 400;
  font-size: clamp(40px, 11vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.pill {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px auto 56px;
  font-family: var(--sans);
  font-size: 17px;
  text-align: center;
}
.badge {
  background: var(--hair);
  color: #44443f;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 4px;
}
.pill a { text-decoration: underline; text-underline-offset: 3px; }

.essay p.body {
  margin: 0 0 1.3em;
  font-size: 19px;
  line-height: 1.7;
}
.signoff { margin: 1.6em 0 0; font-size: 19px; }

/* GlassBench page */
.report-top { max-width: 1040px; margin: 0 auto; padding: 20px 20px 0; }

.layout {
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 20px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 56px;
}
@media (min-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr) 180px; }
}
main { min-width: 0; max-width: 760px; }

.hero {
  background: var(--card);
  border-radius: 8px;
  padding: 32px 28px;
}
.hero h1 {
  margin: 0;
  font-size: clamp(34px, 9vw, 46px);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.hero .sub { margin: 10px 0 0; font-size: 19px; color: var(--text); }
.hero .licence { margin: 18px 0 0; font-size: 15px; color: var(--muted); }
.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--text);
}
.btn--primary { background: var(--text); color: var(--bg); }
.btn--primary:hover { background: #333; }
.btn--secondary { background: transparent; color: var(--text); }
.btn--secondary:hover { background: #fff; }

.visual { margin: 20px 0 0; }
.visual img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: var(--card);
}
.visual-scroll { overflow-x: auto; border-radius: 8px; }
@media (max-width: 719px) { .visual img { min-width: 720px; } }
.visual figcaption { margin: 10px 0 0; font-size: 15px; color: var(--muted); }

section { padding: 40px 0 0; scroll-margin-top: 16px; }
section > h2 {
  margin: 0 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--hair);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
section p { margin: 0 0 14px; max-width: 64ch; }
.note { font-size: 16px; color: var(--muted); }

/* TOC */
.toc { display: none; }
@media (min-width: 1000px) {
  .toc {
    display: block;
    position: sticky;
    top: 32px;
    align-self: start;
    padding-top: 24px;
  }
}
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc a {
  display: block;
  padding: 3px 0 3px 14px;
  border-left: 2px solid transparent;
  font-size: 16px;
  color: var(--muted);
  text-decoration: none;
}
.toc a:hover { color: var(--text); }
.toc a[aria-current="true"] { color: var(--text); border-left-color: var(--text); }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 14px; }
table { width: 100%; border-collapse: collapse; font-size: 17px; }
th, td {
  text-align: left;
  vertical-align: top;
  padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--hair);
}
thead th {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
tbody th { font-weight: 500; }
.spec th { width: 32%; color: var(--muted); font-weight: 400; }
.num { text-align: right; font-variant-numeric: tabular-nums; padding-right: 12px; white-space: nowrap; }
th.num { text-align: right; }

/* Cards */
.cards { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--card); border-radius: 8px; padding: 16px; font-size: 16px; }
.card h3 { margin: 0 0 6px; font-size: 16px; font-weight: 500; }
.card p { margin: 0; color: var(--muted); }

/* Bars */
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 18px; font-size: 15px; color: var(--muted); }
.legend span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 2px;
  background: var(--c);
}
.bars { margin: 0 0 24px; }
.bar-row { margin: 0 0 14px; }
.bar-label { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 4px; font-size: 15px; }
.bar-label span:last-child { color: var(--muted); white-space: nowrap; }
.bar { display: flex; height: 22px; border-radius: 4px; overflow: hidden; background: var(--hair); }
.bar i {
  display: block;
  flex: 0 0 auto;
  width: var(--w);
  background: var(--c);
  font-style: normal;
  font-size: 13px;
  line-height: 22px;
  color: #fff;
  padding-left: 6px;
  overflow: hidden;
  white-space: nowrap;
}
.bar i.dark { color: #161616; }
.js .bar i { width: 0; }
.js .bars.in .bar i { width: var(--w); transition: width 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
@media (prefers-reduced-motion: reduce) {
  .js .bar i, .js .bars.in .bar i { transition: none; }
}

.c-correct { --c: var(--correct); }
.c-missing { --c: var(--missing); }
.c-wrong { --c: var(--wrong); }

/* Stats */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; margin: 0 0 20px; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { border-top: 1px solid var(--hair); padding-top: 10px; }
.stat b { display: block; font-size: 26px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 15px; color: var(--muted); }

/* Code */
pre, code { font-family: var(--mono); }
pre {
  margin: 0 0 14px;
  padding: 14px 16px;
  background: var(--card);
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.55;
  overflow-x: auto;
}
.codebox { position: relative; }
.copy {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 10px;
  font: 500 12px var(--sans);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--hair);
  border-radius: 6px;
  cursor: pointer;
}
.copy:hover { border-color: var(--muted); }
.codebox pre { padding-right: 76px; }

/* Access */
.steps { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 16px; }
.steps li { display: grid; grid-template-columns: 36px 1fr; gap: 4px; }
.steps .n { font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.steps h3 { margin: 0; font-size: 17px; font-weight: 500; }
.steps p { margin: 2px 0 0; color: var(--muted); }
.perm { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 640px) { .perm { grid-template-columns: 1fr 1fr; } }
.perm h3 { margin: 0 0 8px; font-size: 15px; font-weight: 500; }
.perm ul { margin: 0; padding-left: 18px; }
.perm li { margin: 0 0 6px; }
