/* ============================================================================
   X! — editorial stylesheet
   ----------------------------------------------------------------------------
   Same tokens as the app, tuned for reading rather than browsing: a measure that
   tops out near 68 characters, tables that survive a phone, and type that holds
   up over 2,000 words.
   ========================================================================== */

:root {
  --paper: #F6F2EB;
  --paper-2: #EFEAE1;
  --paper-3: #E6DFD3;
  --ink: #14120F;
  --ink-2: #46423C;
  --ink-3: #7E7870;
  --line: #DED7CB;
  --line-2: #CFC7B8;
  --accent: #E2472C;
  --moss: #254A38;
  --gold: #A67C2E;

  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --measure: 68ch;
  --gutter: 22px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14120F; --paper-2: #1D1A16; --paper-3: #262119;
    --ink: #F4EFE7; --ink-2: #BCB5AC; --ink-3: #857F76;
    --line: #2C2721; --line-2: #3A342C;
    --accent: #FF5638; --moss: #6FA688; --gold: #D9AE5A;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--paper);
  padding: 12px 18px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip:focus { left: 0; top: 0; }

/* ─────────────────────────────  chrome  ───────────────────────────── */

.site-head {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 28px;
  padding: 0 var(--gutter);
  height: 62px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.site-mark { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--accent); }
.site-mark b { font-family: var(--serif); font-size: 21px; font-weight: 400; letter-spacing: -.05em; color: var(--ink); }

.site-nav { display: flex; gap: 22px; margin-left: auto; }
.site-nav a {
  font-size: 12.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-3); text-decoration: none;
  transition: color .2s var(--ease);
}
.site-nav a:hover { color: var(--ink); }
@media (max-width: 560px) { .site-nav a:not(:last-child) { display: none; } }

/* ─────────────────────────────  document  ─────────────────────────── */

.doc { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter) 90px; }

.doc-head { padding: 48px 0 30px; }

.crumbs {
  display: flex; gap: 8px; align-items: center;
  font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 20px;
}
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

.doc-head h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(33px, 6.4vw, 52px);
  line-height: 1.04;
  letter-spacing: -.032em;
}

.standfirst {
  margin-top: 18px;
  font-size: clamp(17px, 2.4vw, 20px);
  line-height: 1.5;
  color: var(--ink-2);
}

.byline {
  margin-top: 22px; padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-3);
}

/* ── on this page ─────────────────────────────────────────────────── */

.toc {
  margin: 8px 0 40px;
  padding: 20px 22px;
  background: var(--paper-2);
  border-radius: 14px;
}
.toc-label {
  display: block;
  font-size: 10.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.toc ol { list-style: none; counter-reset: toc; display: grid; gap: 9px; }
.toc li { counter-increment: toc; }
.toc a {
  display: flex; gap: 10px;
  font-size: 14.5px; color: var(--ink-2); text-decoration: none;
  transition: color .2s var(--ease);
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 12px;
  padding-top: 2px;
}
.toc a:hover { color: var(--accent); }

/* ─────────────────────────────  prose  ────────────────────────────── */

.prose > * + * { margin-top: 22px; }

.prose h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(25px, 4.2vw, 33px);
  line-height: 1.12;
  letter-spacing: -.026em;
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.prose h3 {
  font-size: 18px; font-weight: 700; letter-spacing: -.01em;
  margin-top: 36px;
}

/* The anchor stays out of the way until you go looking for it. */
.anchor {
  margin-left: 10px;
  color: var(--line-2);
  text-decoration: none;
  font-family: var(--sans); font-size: .5em; font-weight: 600;
  opacity: 0;
  transition: opacity .2s var(--ease), color .2s;
}
h2:hover .anchor, h3:hover .anchor, .anchor:focus { opacity: 1; }
.anchor:hover { color: var(--accent); }

.prose p { color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 650; }

.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  transition: color .2s var(--ease);
}
.prose a:hover { color: var(--accent); }

.prose ul, .prose ol { padding-left: 22px; color: var(--ink-2); }
.prose li + li { margin-top: 9px; }
.prose li::marker { color: var(--ink-3); }

.prose blockquote {
  margin-left: 0;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--accent);
  font-family: var(--serif);
  font-size: 20px; line-height: 1.45;
  color: var(--ink);
}

.prose code {
  font-size: .88em;
  background: var(--paper-2);
  padding: 2px 6px; border-radius: 5px;
}

.prose hr { border: 0; border-top: 1px solid var(--line); margin: 44px 0; }

/* ─────────────────────────────  tables  ───────────────────────────── */
/* A size guide is mostly table. It has to survive a 390px screen, so it scrolls
   inside its own box rather than pushing the page sideways. */

.table-wrap {
  overflow-x: auto;
  margin: 30px calc(var(--gutter) * -1);
  padding: 0 var(--gutter);
  -webkit-overflow-scrolling: touch;
}
.table-wrap table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: 14.5px; }

.table-wrap th, .table-wrap td {
  text-align: right;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table-wrap thead th {
  text-align: right;
  font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 10px;
}
.table-wrap th:first-child, .table-wrap td:first-child, .table-wrap thead th:first-child {
  text-align: left;
  position: sticky; left: 0;
  background: var(--paper);
}
.table-wrap tbody th {
  font-family: var(--serif); font-weight: 400; font-size: 16px;
  letter-spacing: -.02em; color: var(--ink);
}
.table-wrap td { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.table-wrap tbody tr:hover td, .table-wrap tbody tr:hover th { background: var(--paper-2); }

/* ─────────────────────────────  faq  ──────────────────────────────── */

.faq { margin-top: 60px; }
.faq h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(25px, 4.2vw, 33px); line-height: 1.12; letter-spacing: -.026em;
  padding-top: 26px; border-top: 1px solid var(--line);
  margin-bottom: 8px;
}
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  padding: 18px 30px 18px 0;
  font-size: 16.5px; font-weight: 600;
  cursor: pointer; list-style: none;
  position: relative;
  transition: color .2s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 4px; top: 50%;
  width: 9px; height: 9px;
  border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .28s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-20%) rotate(-135deg); }
.faq summary:hover { color: var(--accent); }
.faq details > div { padding: 0 0 20px; color: var(--ink-2); }
.faq details > div > * + * { margin-top: 14px; }

/* ─────────────────────────────  related  ──────────────────────────── */

.related { margin-top: 60px; padding-top: 26px; border-top: 1px solid var(--line); }
.related ul { list-style: none; display: grid; gap: 2px; }
.related a {
  display: block;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: padding-left .28s var(--ease);
}
.related a:hover { padding-left: 10px; }
.related b { display: block; font-family: var(--serif); font-weight: 400; font-size: 19px; letter-spacing: -.02em; }
.related span { display: block; margin-top: 5px; font-size: 14px; color: var(--ink-3); }

/* ─────────────────────────────  index  ───────────────────────────── */

.idx-group + .idx-group { margin-top: 54px; }
.idx-group h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(24px, 4vw, 30px); letter-spacing: -.026em;
  padding-bottom: 14px; border-bottom: 1px solid var(--ink);
}
.idx-list { list-style: none; }
.idx-list a {
  display: block; padding: 22px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: padding-left .28s var(--ease);
}
.idx-list a:hover { padding-left: 10px; }
.idx-list b { display: block; font-family: var(--serif); font-weight: 400; font-size: 21px; letter-spacing: -.022em; line-height: 1.2; }
.idx-list span { display: block; margin-top: 7px; font-size: 14.5px; color: var(--ink-2); }
.idx-list time { display: block; margin-top: 9px; font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }

/* ─────────────────────────────  footer  ───────────────────────────── */

.site-foot { border-top: 1px solid var(--line); background: var(--paper-2); }
.foot-in {
  max-width: 980px; margin: 0 auto;
  padding: 46px var(--gutter) 30px;
  display: grid; gap: 34px;
}
@media (min-width: 720px) { .foot-in { grid-template-columns: 1fr 1fr; gap: 60px; } }
.foot-in b { font-family: var(--serif); font-size: 22px; font-weight: 400; letter-spacing: -.04em; }
.foot-in p { margin-top: 12px; font-size: 14px; line-height: 1.6; color: var(--ink-2); max-width: 46ch; }
.foot-legal {
  max-width: 980px; margin: 0 auto;
  padding: 0 var(--gutter) 40px;
  font-size: 12.5px; color: var(--ink-3);
}
.foot-legal a { color: inherit; }

/* ─────────────────────────────  desktop  ──────────────────────────── */

@media (min-width: 900px) {
  :root { --gutter: 40px; }
  body { font-size: 18px; }
  .doc { padding-top: 10px; }
  .doc-head { padding: 66px 0 34px; }
  .table-wrap { margin-inline: 0; padding-inline: 0; }
}

@media print {
  .site-head, .site-nav, .toc, .related, .site-foot, .anchor, .skip { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .doc { max-width: none; }
  .faq details { open: true; }
}

/* ─────────────────────────  collection pages  ─────────────────────────
   Generated from live stock, so the grid has to hold up at 60 items and
   stay quiet enough that the photography does the work. */

.lede { font-size: 1.08em; color: var(--ink) !important; }
.footnote { font-size: 13.5px; color: var(--ink-3) !important; }

.pgrid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px 14px;
  margin-top: 26px;
  padding: 0;
}
@media (min-width: 620px) { .pgrid { grid-template-columns: repeat(3, 1fr); gap: 32px 20px; } }
@media (min-width: 980px) { .pgrid { grid-template-columns: repeat(4, 1fr); } }

.pcard a { display: block; text-decoration: none; }
.pcard img {
  width: 100%; height: auto; aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  background: var(--paper-2);
}
.pcard span { display: block; }
.pbrand {
  margin-top: 10px;
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3);
}
.ptitle {
  margin-top: 4px;
  font-family: var(--serif); font-size: 15px; line-height: 1.25; letter-spacing: -.015em;
  color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pprice { margin-top: 6px; font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.pprice s { color: var(--ink-3); font-weight: 400; font-size: 12px; margin-left: 4px; }
.psizes { margin-top: 5px; font-size: 11px; letter-spacing: .06em; color: var(--ink-3); }
.pcard a:hover .ptitle { color: var(--accent); }

/* ─────────────────────────  images in articles  ───────────────────────
   A hero sits above the byline so the page has a face in a share card and
   in a feed; inline figures keep their caption attached to the image. */

.hero-shot { margin: 26px 0 4px; }
.hero-shot img {
  width: 100%; height: auto;
  aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 14px;
  background: var(--paper-2);
}
.hero-shot figcaption,
.prose figcaption {
  margin-top: 9px;
  font-size: 12.5px; line-height: 1.5; color: var(--ink-3);
}

.prose img {
  width: 100%; height: auto;
  border-radius: 12px;
  background: var(--paper-2);
  margin-block: 6px;
}
/* A lone image in a paragraph is a figure in everything but name — give it
   the same breathing room rather than letting it sit tight against text. */
.prose p > img:only-child { margin-block: 30px; }
.prose figure { margin-block: 30px; }
