/* Sandbox Daily — печатная логика, экранная вёрстка */

:root {
  --paper: #f4efe4;
  --paper-2: #eae2d2;
  --paper-3: #e0d6c2;
  --ink: #15120c;
  --ink-soft: #3a342a;
  --muted: #6d6455;
  --rule: #cec3ae;
  --rule-dark: #a2957c;
  --red: #a32a1b;
  --red-bright: #d0452c;
  --blue: #1d3f5e;
  --serif: 'Literata', Georgia, 'Times New Roman', serif;
  --display: 'Playfair Display', Georgia, serif;
  --mono: 'JetBrains Mono', 'Courier New', monospace;
  --wrap: 1220px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 64px;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  background-image:
    radial-gradient(1200px 600px at 15% -10%, rgba(255, 255, 255, .55), transparent 70%),
    radial-gradient(900px 500px at 100% 0%, rgba(163, 42, 27, .035), transparent 65%);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.62;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: inherit;
  text-decoration-color: var(--rule-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .15s ease, text-decoration-color .15s ease;
}
a:hover { color: var(--red); text-decoration-color: var(--red); }

::selection { background: var(--ink); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 12px;
}
.skip:focus { left: 8px; color: var(--paper); }

.progress {
  position: fixed;
  inset: 0 auto auto 0;
  height: 3px;
  width: 0;
  background: var(--red);
  z-index: 60;
  pointer-events: none;
}

/* --- шапка ---------------------------------------------------------------- */

.topbar {
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.topbar__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 9px 28px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
}
.topbar__mid { color: var(--muted); }

.masthead {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 20px 28px 0;
}

.masthead__kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.masthead__title {
  display: block;
  text-align: center;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(42px, 11.4vw, 146px);
  line-height: .88;
  letter-spacing: -.045em;
  text-decoration: none;
  color: var(--ink);
  margin: 8px 0 2px;
  white-space: nowrap;
}
.masthead__title em {
  font-style: italic;
  font-weight: 700;
  color: var(--red);
  letter-spacing: -.055em;
}
.masthead__title:hover { color: var(--ink); }
.masthead__title:hover em { color: var(--red); }

.masthead__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 9px 0 8px;
  margin-top: 14px;
}

.masthead__tagline {
  margin: 0;
  font-size: 15px;
  font-style: italic;
  color: var(--ink-soft);
}

.masthead__meta {
  margin: 0;
  text-align: right;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(244, 239, 228, .95);
  backdrop-filter: blur(8px);
}
.nav a { text-decoration: none; color: var(--ink-soft); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--red); }
.nav a[aria-current="page"]::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--red);
  margin-right: 7px;
  vertical-align: 1px;
}
.nav__spacer { flex: 1; }
.nav__mail {
  border-bottom: 1px solid var(--red);
  padding-bottom: 2px;
}

/* --- содержanie ----------------------------------------------------------- */

.toc {
  width: 100%;
  min-width: 0;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 9px 28px;
  display: flex;
  gap: 26px;
  align-items: center;
  overflow-x: auto;
  border-bottom: 3px double var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  scrollbar-width: none;
}
.toc::-webkit-scrollbar { display: none; }
.toc a { text-decoration: none; color: var(--ink-soft); }
.toc a:hover { color: var(--red); }
.toc__short { display: none; }
.toc__label {
  color: var(--paper);
  background: var(--red);
  padding: 3px 7px 2px;
  font-weight: 700;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
  flex: 1 0 auto;
}

.previewbar {
  background: var(--red);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  text-align: center;
  padding: 7px 16px;
}
.previewbar span {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 700;
  margin-right: 8px;
}
.previewbar--draft { background: var(--ink); }

/* --- главный материал ----------------------------------------------------- */

.lead {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  margin-top: 26px;
  border-bottom: 1px solid var(--ink);
}

.lead__head {
  padding: 22px 40px 22px 0;
}

.rubric {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.rubric__mark {
  background: var(--ink);
  color: var(--paper);
  padding: 4px 8px 3px;
  font-weight: 700;
  letter-spacing: .14em;
}
.rubric--light { color: #cfc3ac; }
.rubric--light .rubric__mark { background: var(--red-bright); color: #fff; }

.lead__title {
  margin: 0 0 20px;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(50px, 7.4vw, 106px);
  line-height: .9;
  letter-spacing: -.038em;
}

.lead__dek {
  margin: 0 0 20px;
  max-width: 26em;
  font-size: clamp(19px, 1.75vw, 23px);
  line-height: 1.42;
  color: var(--ink-soft);
}

.byline {
  display: flex;
  gap: 16px;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.byline span + span::before {
  content: "·";
  margin-right: 16px;
  color: var(--rule-dark);
}

.keycard {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--paper);
  padding: 22px 24px 20px;
  min-height: 100%;
}

.keycard__label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #b7a98f;
}

.keycard__hex {
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.9;
  letter-spacing: .02em;
  color: #7c7059;
  word-break: break-all;
  margin: 14px 0 0;
}

.keycard__big {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(150px, 18vw, 260px);
  line-height: .62;
  color: var(--red-bright);
  text-align: right;
  margin: auto 0 4px;
  letter-spacing: -.06em;
}

.keycard__caption {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid #3d3529;
  font-size: 12.5px;
  line-height: 1.5;
  color: #cfc3ac;
  max-width: 30ch;
}

.keycard__stats {
  display: flex;
  gap: 18px;
  margin: 16px 0 0;
  padding: 0;
}
.keycard__stats div { flex: 1; }
.keycard__stats dt {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}
.keycard__stats dd {
  margin: 5px 0 0;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #a89b83;
}

.lead__body {
  columns: 2;
  column-gap: 52px;
  column-rule: 1px solid var(--rule);
  padding: 30px 0 34px;
  font-size: 18.5px;
  hyphens: auto;
}

/* Одинаковые переносы во всём основном тексте: и в лиде, и в фиче, и в заметках.
   Префиксы нужны для WKWebView в Telegram на iOS. */
.lead__body p,
.feature__body p:not(.rubric),
.note p:not(.rubric) {
  -webkit-hyphens: auto;
  hyphens: auto;
  -webkit-hyphenate-character: "-";
  hyphenate-character: "-";
  hyphenate-limit-chars: 7 3 3;
}
.lead__body code,
.feature__body code,
.note code {
  -webkit-hyphens: none;
  hyphens: none;
}

/* главный материал с фотографией вместо карточки */
.lead--photo {
  display: block;
  border-bottom: 0;
}
.lead--photo .lead__head {
  padding: 22px 0 0;
}
.lead--photo .lead__title {
  max-width: 14ch;
}
.lead--photo .lead__dek {
  max-width: 40em;
}
.lead__dek code {
  font-family: var(--mono);
  font-size: .78em;
  background: rgba(21, 18, 12, .06);
  padding: 1px 4px;
}
.lead__photo {
  margin: 26px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--ink);
}
.lead__photo img {
  width: 100%;
  height: clamp(260px, 38vw, 460px);
  object-fit: cover;
  object-position: center 45%;
  border: 1px solid var(--rule-dark);
  filter: saturate(.82) contrast(1.04);
}
.lead__photo figcaption {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--muted);
}
.lead__body > p { margin: 0 0 1.05em; }
.lead__body > p:last-of-type { margin-bottom: 0; }

.lead__body code, .practice code {
  font-family: var(--mono);
  font-size: .82em;
  background: rgba(21, 18, 12, .06);
  padding: 1px 4px;
}

.dropcap > p:first-child::first-letter {
  float: left;
  font-family: var(--display);
  font-weight: 900;
  font-size: 4.5em;
  line-height: .76;
  padding: 7px 9px 0 0;
  color: var(--red);
}

.keyline {
  column-span: all;
  margin: 4px 0 20px;
  padding: 12px 16px;
  background: var(--paper-2);
  border-left: 3px solid var(--red);
  overflow-x: auto;
}
.keyline code {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .01em;
  background: none;
  padding: 0;
  color: var(--ink-soft);
  white-space: nowrap;
}

.pullquote {
  column-span: all;
  margin: 16px 0 22px;
  padding: 18px 0 18px 26px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  border-left: 4px solid var(--red);
}
.pullquote p {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.2;
  letter-spacing: -.02em;
}

.sources {
  column-span: all;
  margin: 18px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.8;
  letter-spacing: .02em;
  color: var(--muted);
}
.sources span {
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-right: 6px;
}
.sources a { margin-right: 12px; color: var(--ink-soft); }

/* --- практика ------------------------------------------------------------- */

.practice {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 36px;
  margin: 34px 0 0;
  padding: 30px 34px;
  background: var(--ink);
  color: var(--paper);
}
.practice__head,
.practice__code { min-width: 0; }
.practice h2 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.06;
  letter-spacing: -.02em;
}
.practice p { margin: 0 0 12px; font-size: 15px; line-height: 1.6; color: #d8ccb6; }
.practice__code pre {
  margin: 0 0 12px;
  padding: 14px 16px;
  background: #0b0906;
  border: 1px solid #3d3529;
  overflow-x: auto;
  max-width: 100%;
}
.practice__code pre code {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.85;
  color: #f0e5cf;
  background: none;
  padding: 0;
  white-space: pre;
}
.practice .fine {
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.65;
  color: #a89b83;
}
.practice .fine code { color: #e8dcc4; background: #2a2419; }

/* --- второй материал ------------------------------------------------------ */

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  margin-top: 46px;
  padding-top: 26px;
  border-top: 3px solid var(--ink);
}

.feature__media figure { margin: 0; }
.feature__media img {
  width: 100%;
  border: 1px solid var(--rule-dark);
  background: #fff;
}
.feature__media figcaption,
.note__figure figcaption {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.6;
  letter-spacing: .01em;
  color: var(--muted);
}
.credit { display: block; color: var(--rule-dark); }

.feature__text h2 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(44px, 5.6vw, 74px);
  line-height: .92;
  letter-spacing: -.035em;
}
.feature__dek {
  margin: 0 0 18px;
  font-size: 20px;
  line-height: 1.45;
  color: var(--ink-soft);
}
.feature__text p { margin: 0 0 1em; }
.feature__text .dropcap > p:first-child::first-letter,
.feature__text > p.dropcap::first-letter,
.feature__body > p.dropcap::first-letter {
  float: left;
  font-family: var(--display);
  font-weight: 900;
  font-size: 4.3em;
  line-height: .76;
  padding: 7px 9px 0 0;
  color: var(--red);
}

.figure-inline {
  width: 100%;
  margin: 18px 0;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--rule);
}
.figure-inline figcaption {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.5;
  color: var(--muted);
}
.figure-inline img { border: 0; filter: grayscale(1) contrast(1.06); }

/* --- заметки -------------------------------------------------------------- */

.notes {
  margin-top: 52px;
  padding-top: 24px;
  border-top: 3px solid var(--ink);
}

.notes__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 26px;
}
.notes__head h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(44px, 6vw, 76px);
  line-height: .9;
  letter-spacing: -.035em;
}
.notes__head p {
  margin: 0 0 6px;
  max-width: 34ch;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
  text-align: right;
}

.notes {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 30px 34px;
}
.notes__head { grid-column: 1 / -1; }

.note {
  grid-column: span 2;
  border-top: 1px solid var(--ink);
  padding-top: 13px;
  min-width: 0;
}
.note--wide { grid-column: span 3; }

.note .rubric { margin-bottom: 9px; }
.note h3 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(23px, 2.4vw, 30px);
  line-height: 1.08;
  letter-spacing: -.02em;
}
.note p {
  margin: 0 0 .8em;
  font-size: 15.5px;
  line-height: 1.56;
  color: var(--ink-soft);
}
.note .sources {
  margin-top: 12px;
  font-size: 9.5px;
  line-height: 1.6;
  border-top: 1px solid var(--rule);
}
.note__figure {
  margin: 10px 0 12px;
}
.note--wide .note__figure {
  float: right;
  width: 46%;
  margin: 2px 0 10px 20px;
}
.note--wide .sources { clear: both; }
.note__figure img {
  width: 100%;
  border: 1px solid var(--rule-dark);
  background: #fff;
}
.note__figure--crop img {
  aspect-ratio: 2.5 / 1;
  object-fit: cover;
  object-position: center 55%;
  filter: saturate(.9) contrast(1.03);
}
.note__figure img[src$="nethack.png"] { image-rendering: pixelated; }

.note__portrait {
  float: right;
  width: 96px;
  margin: 2px 0 10px 14px;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--rule);
}
.note__portrait img {
  width: 100%;
  filter: grayscale(1) contrast(1.05);
}
.note__portrait figcaption {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.4;
  color: var(--muted);
}
.note--portrait::after { content: ""; display: block; clear: both; }

.note--culture {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 30px;
  align-items: start;
  margin-top: 6px;
}
.note--culture figure { margin: 0; }
.note--culture figure img {
  width: 100%;
  border: 1px solid var(--rule-dark);
}
.note--culture figcaption {
  margin-top: 7px;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.55;
  color: var(--muted);
}
.note--culture h3 {
  font-size: clamp(30px, 3.6vw, 42px);
  margin-bottom: 12px;
}
.note--culture p { font-size: 16px; }

/* --- от редактора --------------------------------------------------------- */

.editor-note {
  max-width: 730px;
  margin: 56px auto 0;
  padding: 26px 0 0;
  border-top: 3px double var(--ink);
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink-soft);
}
.editor-note .rubric { margin-bottom: 14px; }
.editor-note__lede {
  font-family: var(--display);
  font-size: 24px;
  line-height: 1.32;
  letter-spacing: -.015em;
  color: var(--ink);
}
.editor-note p { margin: 0 0 .9em; }

/* --- подвал --------------------------------------------------------------- */

.colophon {
  margin-top: 56px;
  background: var(--ink);
  color: #d8ccb6;
  padding: 34px 28px 30px;
}
.colophon__mast {
  max-width: var(--wrap);
  margin: 0 auto 22px;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(36px, 6vw, 64px);
  letter-spacing: -.04em;
  line-height: 1;
  color: var(--paper);
}
.colophon__mast em { font-style: italic; color: #e0614a; }
.colophon__cols {
  max-width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  border-top: 1px solid #3d3529;
  padding-top: 18px;
}
.colophon__cols p { margin: 0; font-size: 13px; line-height: 1.65; }
.colophon__label {
  font-family: var(--mono);
  font-size: 9px !important;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #a89b83;
  margin-bottom: 7px !important;
}
.colophon a { color: var(--paper); }
.colophon__fine {
  max-width: var(--wrap);
  margin: 24px auto 0;
  padding-top: 12px;
  border-top: 1px solid #3d3529;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #8d8069;
}

/* --- архив ---------------------------------------------------------------- */

.pagehead { margin: 40px 0 30px; }
.pagehead h1 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(64px, 12vw, 132px);
  line-height: .85;
  letter-spacing: -.05em;
}
.pagehead__dek {
  margin: 0;
  max-width: 38ch;
  font-size: 18px;
  color: var(--muted);
}

.archive-list { border-top: 2px solid var(--ink); }

.archive-row {
  display: grid;
  grid-template-columns: 80px 190px 1fr 100px 24px;
  align-items: baseline;
  gap: 18px;
  padding: 20px 8px;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  transition: background .15s ease;
}
.archive-row:hover { background: var(--paper-2); color: var(--ink); }
.archive-row__no,
.archive-row__date,
.archive-row__time {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.archive-row__no em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  color: var(--red);
  font-size: 9px;
}
.archive-row__title {
  font-family: var(--display);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.archive-row__arrow { color: var(--red); text-align: right; }

/* --- о газете ------------------------------------------------------------- */

.about { max-width: 780px; margin: 0 auto; padding: 26px 0 40px; }
.about h1 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(52px, 9vw, 96px);
  line-height: .9;
  letter-spacing: -.04em;
  margin: 0 0 18px;
}
.about__lede {
  font-size: 22px;
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 0 0 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--ink);
}
.about h2 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  margin: 34px 0 10px;
  letter-spacing: -.02em;
}
.about p, .about li { font-size: 17px; line-height: 1.62; color: var(--ink-soft); }
.about ul { margin: 0 0 1em; padding-left: 20px; }
.about li { margin-bottom: .45em; }
.about dl { margin: 0; }
.about dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
  margin-top: 18px;
}
.about dd { margin: 4px 0 0; font-size: 17px; }

/* --- Telegram Mini App ------------------------------------------------ */

html.tg .topbar { display: none; }
html.tg .masthead { padding-top: 10px; }
html.tg .masthead__title { font-size: clamp(40px, 10vw, 110px); }

/* --- адаптив -------------------------------------------------------------- */

@media (max-width: 1040px) {
  .lead { grid-template-columns: 1.15fr .85fr; }
  .lead__head { padding-right: 28px; }
  .lead__body { column-gap: 38px; }
  .notes { gap: 26px 26px; }
}

@media (min-width: 861px) {
  .feature__media {
    position: sticky;
    top: 22px;
    align-self: start;
  }
}

@media (max-width: 860px) {
  body { font-size: 17.5px; }
  .wrap, .masthead { padding-left: 20px; padding-right: 20px; }
  .topbar__inner { padding-left: 20px; padding-right: 20px; }
  .toc { padding-left: 20px; padding-right: 20px; }

  .lead { grid-template-columns: 1fr; }
  .lead__head { padding: 18px 0 20px; }
  .lead__title { font-size: clamp(52px, 12vw, 86px); }
  .keycard { min-height: 0; padding: 20px; }
  .keycard__big { text-align: left; font-size: 150px; margin-top: 6px; }
  .keycard__hex { max-height: 5.9em; }

  .lead__body { columns: 1; padding-top: 24px; }

  .practice { grid-template-columns: 1fr; gap: 20px; padding: 26px 22px; }

  .feature { display: flex; flex-direction: column; gap: 22px; }
  .feature__text { display: contents; }
  .feature__head { order: 1; }
  .feature__media { order: 2; }
  .feature__body { order: 3; }
  .feature__media img { max-height: 62vh; object-fit: cover; object-position: center 35%; }
  .figure-inline { float: none; width: 100%; margin: 14px 0; }

  .notes { grid-template-columns: repeat(2, 1fr); }
  .note, .note--wide { grid-column: span 1; }
  .note--wide .note__figure { float: none; width: 100%; margin: 10px 0 12px; }
  .note--culture { grid-column: 1 / -1; grid-template-columns: 1fr; gap: 16px; }
  .notes__head { display: block; }
  .notes__head p { text-align: left; margin-top: 10px; }

  .editor-note { margin-top: 44px; }

  .archive-row { grid-template-columns: 64px 1fr 20px; gap: 6px 14px; }
  .archive-row__date { display: none; }
  .archive-row__time { grid-column: 2; }
  .archive-row__arrow { grid-row: 1 / span 2; grid-column: 3; }
}

@media (max-width: 620px) {
  .topbar__mid { display: none; }
  .topbar__inner { font-size: 9px; letter-spacing: .1em; }
  .masthead__kicker { font-size: 9px; letter-spacing: .16em; }
  .masthead__title { margin-top: 10px; }
  .masthead__bottom { display: block; }
  .masthead__meta { text-align: left; margin-top: 7px; }
  .masthead__tagline { font-size: 13.5px; }
  .nav { gap: 16px; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav__mail { display: none; }
  .toc {
    flex-wrap: wrap;
    gap: 7px 18px;
    white-space: normal;
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
    padding-top: 11px;
    padding-bottom: 11px;
  }
  .toc__full { display: none; }
  .toc__short { display: inline; }

  .lead__title { font-size: clamp(46px, 13.5vw, 64px); }
  .lead__dek { font-size: 18.5px; }
  .keycard__big { font-size: 132px; }
  .lead--photo .lead__title { max-width: none; }
  .lead__photo img { height: 240px; }
  .note__portrait { width: 84px; }

  .notes { grid-template-columns: 1fr; }
  .note--wide { grid-column: span 1; }

  .colophon__cols { grid-template-columns: 1fr; gap: 18px; }
  .practice { padding: 22px 18px; }
  .practice__code pre { padding: 12px; }
  .practice__code pre code { font-size: 11px; }
  .pagehead { margin-top: 30px; }
  .editor-note__lede { font-size: 21px; }
  .keyline code { white-space: pre-wrap; word-break: break-all; font-size: 11px; }
  .practice__code pre code { white-space: pre-wrap; overflow-wrap: break-word; font-size: 10.5px; }
}

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

@media print {
  .topbar, .nav, .toc, .progress, .previewbar, .colophon__cols { display: none; }
  body { background: #fff; font-size: 10.5pt; }
  .masthead__title { font-size: 54pt; }
  .lead, .feature { break-inside: avoid; }
  a { text-decoration: none; }
  .lead__body { columns: 2; }
}
