/* Research — a broadsheet on paper. The site's face (TeX Gyre Heros) set as
   a newspaper would: a big masthead over a double rule, small-caps kickers,
   column rules, and photographs set among the briefs. Ink on warm paper;
   dark follows the device. */
@font-face { font-family: "TeX Gyre Heros"; src: url("fonts/texgyreheros-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "TeX Gyre Heros"; src: url("fonts/texgyreheros-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --bg: #F4F1EC; --fg: #130F0C;
  --muted: color-mix(in srgb, #130F0C 58%, transparent);
  --line: color-mix(in srgb, #130F0C 16%, transparent);
  --well: color-mix(in srgb, #130F0C 6%, transparent);
  --ph: #E4DED5;
  --accent: #FF4D00;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --pad: clamp(16px, 4vw, 48px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #130F0C; --fg: #F4F1EC;
    --muted: color-mix(in srgb, #F4F1EC 58%, transparent);
    --line: color-mix(in srgb, #F4F1EC 16%, transparent);
    --well: color-mix(in srgb, #F4F1EC 7%, transparent);
    --ph: #2A231D;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: "TeX Gyre Heros", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.45; letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.is-w { display: none; }
@media (prefers-color-scheme: dark) { .is-k { display: none; } .is-w { display: block; } }
mark { background: color-mix(in srgb, var(--accent) 24%, transparent); color: inherit; border-radius: 2px; }

/* ── Bar ── */
.rbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; height: calc(60px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) var(--pad) 0;
  background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); }
.rbar__brand { display: flex; }
.rbar__brand img { height: 28px; width: auto; }
.rbar__here { padding-left: 14px; border-left: 1px solid var(--line); font-size: 16px; }
.rbar .amenu { margin-left: auto; }

.bs { max-width: 1320px; margin: 0 auto; padding: 0 var(--pad) 80px; }

/* ── Masthead ── */
.bs__mast { padding: clamp(20px, 3vw, 36px) 0 0; text-align: center; }
.bs__dateline { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 8px 0; border-top: 1px solid var(--fg); border-bottom: 1px solid var(--line); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.bs__title { margin: 18px 0 10px; font-weight: 400; font-size: clamp(46px, 10.5vw, 150px); line-height: .92; letter-spacing: -0.055em; }
.bs__dek { max-width: 60ch; margin: 0 auto; padding-bottom: 18px; font-size: clamp(15px, 1.6vw, 18px); line-height: 1.4; color: color-mix(in srgb, var(--fg) 78%, transparent); }

/* ── In figures ── */
.bs__figs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 4px double var(--fg); border-bottom: 1px solid var(--fg); }
.bs-fig { display: grid; align-content: start; gap: 4px; padding: 16px 16px 18px; transition: color .2s; }
.bs-fig + .bs-fig { border-left: 1px solid var(--line); }
.bs-fig:first-child { padding-left: 0; }
.bs-fig b { font-weight: 400; font-size: clamp(30px, 3.4vw, 46px); line-height: 1; letter-spacing: -0.05em; }
.bs-fig span { font-size: 14px; line-height: 1.3; }
.bs-fig small { font-size: 11.5px; color: var(--muted); }
.bs-fig:hover b { color: var(--accent); }
@media (max-width: 860px) {
  .bs__figs { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 46%; overflow-x: auto; scrollbar-width: none; }
  .bs__figs::-webkit-scrollbar { display: none; }
}

/* ── Section bar ── */
.bs__bar { position: sticky; top: calc(60px + env(safe-area-inset-top, 0px)); z-index: 20; display: flex; align-items: center; gap: 16px; padding: 10px 0; background: var(--bg); border-bottom: 1px solid var(--fg); }
.bs__sections { display: flex; flex: 1; min-width: 0; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.bs__sections::-webkit-scrollbar { display: none; }
.bs__sections button { flex: none; padding: 6px 10px; border: 0; border-radius: 999px; background: none; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); cursor: pointer; transition: color .2s, background-color .2s; }
.bs__sections button:hover { color: var(--fg); }
.bs__sections button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.bs__tools { display: flex; flex: none; align-items: center; gap: 6px; }
.bs__search { position: relative; display: flex; align-items: center; }
.bs__search svg { position: absolute; left: 10px; width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; pointer-events: none; }
.bs__search input { width: 180px; height: 32px; padding: 0 12px 0 32px; border: 0; border-radius: 999px; background: var(--well); font-size: 14px; outline: none; -webkit-appearance: none; appearance: none; transition: width .3s var(--ease), box-shadow .2s; }
.bs__search input:focus { width: 240px; box-shadow: inset 0 0 0 1.5px var(--fg); }
.bs__tools select { height: 32px; padding: 0 26px 0 12px; border: 0; border-radius: 999px; font-size: 13px; cursor: pointer; -webkit-appearance: none; appearance: none;
  background: var(--well) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") right 8px center / 13px no-repeat; }
@media (max-width: 860px) {
  .bs__bar { flex-wrap: wrap; gap: 8px; }
  .bs__sections { flex-basis: 100%; }
  .bs__tools { flex: 1; }
  .bs__search { flex: 1; }
  .bs__search input, .bs__search input:focus { width: 100%; }
}
.bs__count { margin: 14px 0 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ── Photographs (placeholders for now) ── */
.bs-ph { margin: 0 0 14px; }
.bs-ph__img { display: grid; place-items: center; width: 100%; aspect-ratio: 3 / 2; border-radius: 2px;
  background: repeating-linear-gradient(-45deg, transparent 0 9px, color-mix(in srgb, var(--fg) 5%, transparent) 9px 10px), var(--ph); }
.bs-ph__img svg { width: 30px; height: 30px; fill: none; stroke: var(--muted); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
.bs-ph--lead .bs-ph__img { aspect-ratio: 16 / 9; }
.bs-ph--lead svg { width: 44px; height: 44px; }
.bs-ph--square .bs-ph__img { aspect-ratio: 1; }
.bs-ph--tall .bs-ph__img { aspect-ratio: 4 / 5; }
.bs-ph figcaption { margin-top: 6px; font-size: 11.5px; font-style: italic; color: var(--muted); }
.bs-ph figcaption::before { content: "Photo · "; font-style: normal; letter-spacing: .06em; text-transform: uppercase; font-size: 10.5px; }

/* ── The front page ── */
.bs-kick { margin: 0 0 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.bs-kick span { color: var(--fg); }
.bs-tools { margin: 8px 0 0; }
.bs-copy { padding: 0; border: 0; background: none; font-size: 12px; color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .2s, color .2s; }
article:hover .bs-copy, .bs-copy:focus-visible { opacity: 1; }
.bs-copy:hover { color: var(--fg); }
@media (hover: none) { .bs-copy { opacity: 1; } }
article h2 a:hover, article h3 a:hover, article h4 a:hover, .bs-lead__t a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .12em; }
.is-hit { animation: bsHit 1.6s var(--ease); }
@keyframes bsHit { 0%, 40% { background: color-mix(in srgb, var(--accent) 14%, transparent); box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 14%, transparent); } }

.bs-top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 28px; padding: 24px 0; border-bottom: 1px solid var(--fg); }
.bs-lead h2 { margin: 2px 0 12px; font-weight: 400; font-size: clamp(30px, 4vw, 54px); line-height: 1.02; letter-spacing: -0.045em; }
.bs-lead__t { margin: 0; font-size: 18px; letter-spacing: -0.02em; }
.bs-lead__sum { max-width: 60ch; margin: 8px 0 0; color: color-mix(in srgb, var(--fg) 78%, transparent); }
.bs-seconds { display: grid; align-content: start; gap: 22px; padding-left: 28px; border-left: 1px solid var(--line); }
.bs-seconds article + article { padding-top: 22px; border-top: 1px solid var(--line); }
.bs-seconds h3 { margin: 0 0 6px; font-weight: 400; font-size: 22px; line-height: 1.12; letter-spacing: -0.03em; }
.bs-seconds p:not([class]) { margin: 0; font-size: 15px; }

.bs-cols { columns: 4 230px; column-gap: 28px; column-rule: 1px solid var(--line); padding-top: 22px; }
.bs-cols > * { break-inside: avoid; }
.bs-brief { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.bs-brief h4 { margin: 0 0 6px; font-weight: 400; font-size: 17px; line-height: 1.18; letter-spacing: -0.02em; }
.bs-brief p:not([class]) { margin: 0; font-size: 14px; line-height: 1.4; color: color-mix(in srgb, var(--fg) 82%, transparent); }
.bs-cols .bs-ph { margin-bottom: 18px; }

@media (max-width: 860px) {
  .bs-top { grid-template-columns: 1fr; }
  .bs-seconds { padding: 22px 0 0; border-left: 0; border-top: 1px solid var(--line); }
}

.bs__empty { padding: 60px 0; text-align: center; color: var(--muted); }
.bs__empty button { margin-top: 12px; min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--fg); color: var(--bg); cursor: pointer; }

.bs__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-top: 30px; padding-top: 22px; border-top: 4px double var(--fg); font-size: 14px; color: var(--muted); }
.bs__foot p { max-width: 58ch; margin: 0; }
.bs__foot a { color: var(--fg); }
.bs__footmark img { width: 36px; height: 36px; }

.bs-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 50; padding: 10px 16px; border-radius: 999px; background: var(--fg); color: var(--bg); font-size: 14px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .3s var(--ease); }
.bs-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
/* one column on a phone: tall and square pictures would fill the screen */
@media (max-width: 600px) { .bs-ph--tall .bs-ph__img, .bs-ph--square .bs-ph__img { aspect-ratio: 3 / 2; } }
