:root {
  --bg: #F6F4EE;
  --surface: #FFFFFF;
  --ink: #1F1E1D;
  --muted: #6B6A65;
  --line: #D3D1C7;
  --code-bg: #EFEDE6;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

main, footer { max-width: 760px; margin: 0 auto; padding: 0 24px; }
main { padding-top: 72px; }

a { color: var(--ink); text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }

h1 { font-size: 44px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; margin-bottom: 20px; }
h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; margin: 72px 0 20px; }
.intro { color: var(--muted); }

/* The chart image carries its own title, which repeats the page heading, so its top is cropped off */
.chart-frame { margin-top: 32px; overflow: hidden; aspect-ratio: 1600 / 930; }
.chart { display: block; width: 100%; height: auto; margin-top: -11.25%; }

/* Label maker */
.questions { display: grid; grid-template-columns: repeat(2, minmax(min-content, max-content)); column-gap: 40px; row-gap: 24px; }
@media (max-width: 400px) { .questions { grid-template-columns: minmax(0, 1fr); } }
.question { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.options { display: inline-flex; flex-direction: column; gap: 8px; }
.options button {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 8px;
  font: 600 14px/1.2 inherit; font-family: inherit; color: var(--ink); text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px; cursor: pointer;
}
.options button[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.options button:not([aria-pressed="true"]) { color: var(--muted); }

/* Every description sits in the same grid cell; only the chosen one is visible, so the
   block is always as tall as the longest description and the preview below doesn't jump */
.chosen { display: grid; margin: 28px 0 14px; color: var(--muted); }
.chosen > p { grid-area: 1 / 1; visibility: hidden; }
.chosen > p.on { visibility: visible; }
.chosen a { text-decoration: none; }
.chosen strong { color: var(--ink); }

.preview {
  display: flex; align-items: center; justify-content: center;
  min-height: 96px; padding: 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
}
.preview img { max-width: 100%; height: auto; }

.snippet { position: relative; margin-top: 12px; }
.snippet pre {
  padding: 16px 92px 16px 16px;
  background: var(--code-bg); border-radius: 10px;
  font: 13px/1.6 ui-monospace, Menlo, Consolas, monospace;
  white-space: pre-wrap; word-break: break-all;
}
#copy {
  position: absolute; top: 10px; right: 10px;
  padding: 6px 14px; font: 600 13px inherit; font-family: inherit;
  color: var(--surface); background: var(--ink); border: none; border-radius: 6px; cursor: pointer;
}
.preview .text-line { color: var(--muted); }
.preview .text-line img { vertical-align: -3px; margin-right: 4px; }
.preview .text-line strong { color: var(--ink); }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 16px; border-bottom: 1px solid var(--line); }
.tabs button {
  padding: 8px 12px; margin-bottom: -1px;
  font: inherit; font-size: 14px; color: var(--muted);
  background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer;
}
.tabs button[aria-selected="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }

.tweaks { display: flex; flex-wrap: wrap; gap: 20px 32px; margin-top: 24px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices button {
  padding: 6px 12px; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px; cursor: pointer;
}
.choices button[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }

/* Labels list */
.labels { list-style: none; }
.labels li { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 20px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.labels li:last-child { border-bottom: 1px solid var(--line); }
.labels img { display: block; }
.labels li[aria-current="page"] p { color: var(--ink); font-weight: 600; }
.labels p { font-size: 15px; color: var(--muted); }
@media (max-width: 520px) { .labels li { grid-template-columns: minmax(0, 1fr); gap: 8px; } }

/* Label pages */
.back { display: inline-block; margin-bottom: 32px; font-size: 14px; font-weight: 600; text-decoration: none; }
.label-header { display: flex; align-items: center; gap: 24px; }
.label-header img { flex-shrink: 0; }
.label-header h1 { margin-bottom: 4px; }
.description { margin-top: 32px; font-size: 20px; line-height: 1.5; }
.scores { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-top: 16px; color: var(--muted); }
.scores dt { display: inline; font-weight: 600; color: var(--ink); }
.scores dt::after { content: ": "; }
.scores dd { display: inline; }
section .intro { margin-bottom: 16px; font-size: 15px; }
@media (max-width: 520px) { .label-header { flex-direction: column; align-items: flex-start; gap: 16px; } .label-header img { width: 72px; height: 72px; } }

/* Downloads */
.downloads { display: flex; flex-wrap: wrap; gap: 10px; }
.downloads a {
  padding: 9px 14px; font-size: 14px; font-weight: 600; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
}
.downloads a:hover { border-color: var(--ink); }
.downloads span { margin-left: 6px; font-weight: 500; color: var(--muted); font-size: 12px; }

footer {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  margin-top: 96px; padding-top: 24px; padding-bottom: 48px;
  border-top: 1px solid var(--line);
}
footer p { flex: 1 1 300px; font-size: 14px; color: var(--muted); }
footer img { display: block; }
