/* 16.sandroasatiani.com — hand-written. The whole site is set in 16Questions. */
@font-face { font-family: "16Q"; src: url("fonts/16Questions-ExtraLight.woff2?v=1") format("woff2"); font-weight: 200; font-display: swap; }
@font-face { font-family: "16Q"; src: url("fonts/16Questions-Light.woff2?v=1") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "16Q"; src: url("fonts/16Questions-Regular.woff2?v=1") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "16Q"; src: url("fonts/16Questions-Bold.woff2?v=1") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "16Q"; src: url("fonts/16Questions-Black.woff2?v=1") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  --ink: #000;
  --paper: #fff;
  --red: #e30613;
  --mute: #8a8a8a;
  --pad: 16px;
  --gap: 16px;
}
@media (min-width: 800px) { :root { --pad: 32px; --gap: 24px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.45 "16Q", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
h1, h2, h3, p, ol, ul { margin: 0; padding: 0; font-size: inherit; font-weight: inherit; }
ol, ul { list-style: none; }
em { font-style: normal; }
a { color: inherit; text-decoration: underline; text-underline-offset: 0.18em; }
a:hover { color: var(--red); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
::selection { background: var(--red); color: var(--paper); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--pad);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--gap);
}
.bar { display: flex; justify-content: space-between; gap: var(--gap); }
.bar > :last-child { text-align: right; }
@media (max-width: 599px) {
  .hero > .bar:first-child { flex-direction: column; gap: 0; }
  .hero > .bar:first-child > :last-child { text-align: left; }
}
.hero-q {
  display: block;
  width: 100%;
  text-align: left;
  text-transform: uppercase;
  font-size: clamp(2.25rem, min(8.4vw, 15vh), 9rem);
  line-height: 1.06;
  font-weight: 900;
  max-width: 18ch;
}
.hero-q span { display: block; }

.notice {
  background: var(--red);
  color: var(--paper);
  padding: 14px var(--pad);
  text-align: center;
}

/* ---------- Sections ---------- */
.sec {
  border-top: 1px solid var(--ink);
  padding: var(--pad) var(--pad) calc(var(--pad) * 3);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--gap);
}
.notice + main > .sec:first-child { border-top: 0; }
.sec > h2 { color: var(--mute); }
@media (min-width: 800px) {
  .sec { grid-template-columns: repeat(12, minmax(0, 1fr)); padding-bottom: calc(var(--pad) * 4); }
  .sec > h2 { grid-column: 1 / span 2; position: sticky; top: var(--pad); align-self: start; }
  .sec > .body { grid-column: 3 / -1; }
}
.note { margin-top: calc(var(--pad) * 1.5); color: var(--mute); max-width: 60ch; }

/* ---------- Weights ---------- */
.weights li { border-bottom: 1px solid var(--ink); padding: 10px 0 14px; }
.weights li:first-child { padding-top: 0; }
.w-name { display: block; font-weight: 400; color: var(--mute); }
.w-line { display: block; font-size: clamp(1.75rem, 6.4vw, 6.5rem); line-height: 1.15; }

/* ---------- Questions ---------- */
.questions { counter-reset: q; }
.questions li {
  counter-increment: q;
  display: grid;
  grid-template-columns: 2.6em minmax(0, 1fr);
  border-bottom: 1px solid var(--ink);
  padding: 0.28em 0 0.34em;
  text-transform: uppercase;
  font-weight: 300;
  font-size: clamp(1.5rem, 4vw, 3.75rem);
  line-height: 1.1;
}
.questions li:first-child { padding-top: 0; }
.questions li::before { content: counter(q, decimal-leading-zero); color: var(--red); font-weight: 400; }
@media (hover: hover) { .questions li:hover { font-weight: 900; } }

/* ---------- Tester ---------- */
.controls { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; margin-bottom: var(--pad); }
.group { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.group button { padding: 4px 0; border-bottom: 2px solid transparent; }
.group button:hover { color: var(--red); }
.group button[aria-pressed="true"] { border-bottom-color: var(--ink); }
.size { display: flex; align-items: center; gap: 10px; color: var(--mute); }
.size output { min-width: 3ch; font-variant-numeric: tabular-nums; }
input[type="range"] { accent-color: var(--ink); width: 140px; }
.tester {
  font-size: 64px;
  line-height: 1.12;
  min-height: 2.3em;
  padding-bottom: 0.2em;
  border-bottom: 1px solid var(--ink);
  outline: none;
  caret-color: var(--red);
  white-space: pre-wrap;
}

/* ---------- Glyphs ---------- */
.glyphs { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); }
.g-view {
  position: sticky; top: 0; z-index: 1;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--gap);
  padding: 4px 0;
}
.g-big { font-size: 72px; line-height: 1.5; font-weight: 400; }
.g-code { color: var(--mute); }
@media (min-width: 800px) {
  .glyphs { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .g-view { grid-column: 1 / span 3; top: var(--pad); align-self: start; display: block; border: 1px solid var(--ink); padding: 0; text-align: center; }
  .g-big { display: block; font-size: clamp(120px, 15vw, 240px); }
  .g-code { display: block; border-top: 1px solid var(--ink); padding: 8px; }
  #g-sets { grid-column: 4 / -1; }
}
.g-set + .g-set { margin-top: calc(var(--pad) * 1.5); }
.g-set h3 { color: var(--mute); margin-bottom: 8px; }
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.g-grid button {
  aspect-ratio: 1;
  border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  font-size: 22px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.g-grid button:hover, .g-grid button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.g-grid button:focus-visible { outline-offset: -4px; }

/* ---------- Series ---------- */
.lead { font-size: clamp(1.25rem, 2.2vw, 2rem); line-height: 1.3; font-weight: 300; max-width: 34em; }
.volumes { margin-top: calc(var(--pad) * 2); display: grid; grid-template-columns: minmax(0, 1fr); gap: calc(var(--pad) * 1.5) var(--gap); }
@media (min-width: 800px) { .volumes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.volumes li { border-top: 1px solid var(--ink); padding-top: 10px; }
.v-no, .v-meta { color: var(--mute); }
.volumes h3 { text-transform: uppercase; font-weight: 400; font-size: clamp(1.75rem, 3.1vw, 3rem); line-height: 1.1; margin: 14px 0 18px; }
.volumes h3 b { font-weight: 900; color: var(--red); }

/* ---------- Footer ---------- */
.foot { padding-bottom: var(--pad); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); }
@media (min-width: 800px) { .cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- 404 ---------- */
.lost { min-height: 100vh; min-height: 100svh; padding: var(--pad); display: flex; flex-direction: column; justify-content: space-between; }
.lost .big { font-size: clamp(3rem, 14vw, 14rem); line-height: 1; font-weight: 900; text-transform: uppercase; }
