/* SWANDEX articles: one stylesheet for the web page and its A4 PDF. */

@font-face { font-family: "Manrope"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/Manrope-400.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/Manrope-500.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/Manrope-600.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/Manrope-700.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/SpaceGrotesk-400.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/SpaceGrotesk-500.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/SpaceGrotesk-600.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/SpaceGrotesk-700.woff2") format("woff2"); }
@font-face { font-family: "Space Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/SpaceMono-400.woff2") format("woff2"); }

:root {
  --ink: #0c1117;
  --text: #222c35;
  --muted: #4b5864;
  --faint: #7b8794;
  --rule: #d8dee4;
  --panel: #f2f5f8;
  --accent: #2f8fd6;
  --link: #1b6aa8;
  --sans: "Manrope", "DejaVu Sans", "IPAPGothic", "Hiragino Sans", "Yu Gothic", "Noto Sans CJK JP", system-ui, sans-serif;
  --display: "Space Grotesk", "Manrope", "DejaVu Sans", system-ui, sans-serif;
  --mono: "Space Mono", "DejaVu Sans Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html {
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.62;
  font-kerning: normal;
  /* plain glyphs keep the PDF text layer identical to the source for every extractor */
  font-variant-ligatures: none;
  font-feature-settings: "calt" 0, "liga" 0, "clig" 0;
  -webkit-font-smoothing: antialiased;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

a { color: var(--link); text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.18em; text-decoration-color: rgba(27, 106, 168, 0.45); }
a.url { overflow-wrap: anywhere; word-break: break-word; }

.page { max-width: 46rem; margin: 0 auto; padding: 1.6rem 1.25rem 4rem; }

/* ---------- masthead ---------- */
.masthead {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
  padding-bottom: 0.7rem; margin-bottom: 1.15rem;
  border-bottom: 1px solid var(--ink);
}
.masthead .logo { display: block; line-height: 0; text-decoration: none; }
.masthead .logo img { height: 1.45rem; width: auto; display: block; }
.masthead .site {
  font-family: var(--display); font-weight: 500; font-size: 0.74rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); text-decoration: none;
  line-height: 1;
}

/* ---------- cover ---------- */
.cover { margin: 0 0 1.5rem; break-inside: avoid; }
.cover figcaption.credit { margin-top: 0.35rem; text-align: right; font-family: var(--display); font-size: 0.66rem; letter-spacing: 0.05em; color: var(--faint); }
.cover img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 2; object-fit: cover; border-radius: 0.35rem; background: var(--panel); }
.cover.band {
  aspect-ratio: 5 / 2; border-radius: 0.35rem; background: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.1rem;
}
.cover.band img { width: 34%; height: auto; aspect-ratio: auto; border-radius: 0; background: none; }
.cover.band .band-caption {
  font-family: var(--display); font-weight: 500; font-size: 0.78rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: #9fb1c2;
}

/* ---------- title block ---------- */
.article-head { margin-bottom: 1.7rem; }
.title {
  font-family: var(--display); font-weight: 600; color: var(--ink);
  font-size: 2.35rem; line-height: 1.08; letter-spacing: -0.02em;
  margin: 0 0 0.55rem; text-wrap: balance;
}
.subtitle {
  font-family: var(--display); font-weight: 400; color: #34414d;
  font-size: 1.32rem; line-height: 1.28; letter-spacing: -0.005em;
  margin: 0 0 0.75rem; text-wrap: balance;
}
.dek { font-size: 1.1rem; line-height: 1.5; color: var(--muted); margin: 0 0 0.75rem; text-wrap: pretty; }
.byline {
  display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.55rem; row-gap: 0.2rem;
  margin-top: 1.1rem; padding-top: 0.6rem; border-top: 1px solid var(--rule);
  font-family: var(--display); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--faint);
}
.byline .by { color: var(--ink); }
.byline span + span::before { content: "·"; margin-right: 0.55rem; color: var(--rule); font-weight: 700; }

/* ---------- body ---------- */
.article-body p { margin: 0 0 0.86em; orphans: 2; widows: 2; text-wrap: pretty; }
.article-body h2 {
  font-family: var(--display); font-weight: 600; color: var(--ink);
  font-size: 1.32rem; line-height: 1.22; letter-spacing: -0.01em;
  margin: 1.75em 0 0.62em; break-after: avoid; page-break-after: avoid;
  break-inside: avoid; page-break-inside: avoid; text-wrap: balance;
}
.article-body h2::before {
  content: ""; display: block; width: 2.1rem; height: 0.19rem; background: var(--accent);
  margin-bottom: 0.62rem; border-radius: 1px;
}
.article-body h3 {
  font-family: var(--display); font-weight: 600; color: var(--ink);
  font-size: 1.08rem; line-height: 1.3; margin: 1.5em 0 0.45em; break-after: avoid; page-break-after: avoid;
  break-inside: avoid; text-wrap: balance;
}
.article-body h3.about { padding-top: 1.1em; border-top: 1px solid var(--rule); margin-top: 1.9em; }
.article-body strong { font-weight: 700; color: var(--ink); }
.article-body p.dateline { font-family: var(--display); font-size: 0.86rem; letter-spacing: 0.02em; color: var(--muted); }
.article-body p.dateline strong { font-weight: 600; letter-spacing: 0.04em; }
.article-body p.lead { font-size: 1.04rem; }

.pull {
  margin: 1.35em 0 1.35em; padding: 0.1em 0 0.1em 1.15rem;
  border-left: 0.2rem solid var(--accent);
  font-size: 1.14rem; line-height: 1.52; color: var(--ink);
  break-inside: avoid;
}
.pull p { margin: 0; }

.article-body ul { list-style: none; margin: 0 0 1em; padding: 0; }
.article-body ul li { position: relative; padding-left: 1.25rem; margin: 0 0 0.5em; break-inside: avoid; }
.article-body ul li::before {
  content: ""; position: absolute; left: 0.18rem; top: 0.62em;
  width: 0.36rem; height: 0.36rem; border-radius: 50%; background: var(--accent);
}

.log {
  margin: 0.2em 0 1.05em; padding: 0.62rem 0.95rem;
  background: var(--panel); border-left: 0.2rem solid var(--accent); border-radius: 0 0.3rem 0.3rem 0;
  font-family: var(--mono); font-size: 0.8rem; line-height: 1.6; color: var(--ink);
  white-space: pre-wrap; overflow-wrap: anywhere; break-inside: avoid;
}

.cite {
  font-family: var(--display); font-weight: 600; font-size: 0.74em;
  vertical-align: 0.42em; line-height: 0; letter-spacing: 0.01em;
  color: var(--link); text-decoration: none; white-space: nowrap;
}

.store-links { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.3em 0 1.3em; }
.store-links a {
  display: inline-block; padding: 0.42rem 1rem; border-radius: 999px;
  background: var(--ink); color: #ffffff; text-decoration: none;
  font-family: var(--display); font-weight: 600; font-size: 0.82rem; letter-spacing: 0.01em;
}

/* ---------- sign-off ---------- */
.signoff {
  margin: 2.1em 0 0; padding: 1rem 1.2rem 0.9rem;
  background: var(--panel); border-radius: 0.35rem;
  font-size: 0.9rem; line-height: 1.55; break-inside: avoid;
}
.signoff p { margin: 0 0 0.45em; }
.signoff p:last-child { margin-bottom: 0; }
.signoff .org { font-family: var(--display); font-weight: 600; color: var(--ink); letter-spacing: 0.005em; font-size: 0.95rem; }
.signoff hr.dash { border: 0; width: 1.6rem; height: 0.14rem; background: var(--accent); margin: 0.75em 0; border-radius: 1px; }

/* ---------- references ---------- */
.references { margin-top: 2.3rem; }
.references h2 {
  font-family: var(--display); font-weight: 600; color: var(--ink);
  font-size: 1.05rem; letter-spacing: 0.01em; margin: 0 0 0.8rem; padding-top: 0.75rem;
  border-top: 1px solid var(--ink); break-after: avoid; page-break-after: avoid; break-inside: avoid;
}
.references ol { list-style: none; margin: 0; padding: 0; font-size: 0.78rem; line-height: 1.46; color: var(--text); }
.references li { display: flex; gap: 0.5rem; margin: 0 0 0.52em; break-inside: avoid; scroll-margin-top: 1rem; }
.references li .n {
  flex: 0 0 2.15rem; font-family: var(--display); font-weight: 600; color: var(--link);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.references li .t { flex: 1 1 auto; min-width: 0; }
.references li:last-child { break-after: avoid; page-break-after: avoid; }

.colophon {
  margin-top: 1.1rem;
  font-family: var(--display); font-size: 0.72rem; letter-spacing: 0.02em; color: var(--faint);
}
.colophon p { margin: 0; }
.colophon a { color: var(--muted); }

.web-only { }
.print-only { display: none !important; }
picture { display: block; }
.site-nav { display: flex; align-items: flex-end; gap: 1.1rem; }

/* ---------- end-of-article navigation (web only) ---------- */
.more { margin-top: 3rem; padding-top: 1.3rem; border-top: 1px solid var(--ink); }
.more-head {
  margin: 0 0 1rem; font-family: var(--display); font-weight: 600; font-size: 0.76rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.more-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.4rem; }
.more-card { display: flex; flex-direction: column; gap: 0.3rem; color: var(--ink); text-decoration: none; }
.more-card img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 2; object-fit: cover; border-radius: 0.3rem; }
.more-label {
  margin-top: 0.45rem; font-family: var(--display); font-weight: 600; font-size: 0.68rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--link);
}
.more-title { font-family: var(--display); font-weight: 600; font-size: 1.05rem; line-height: 1.25; letter-spacing: -0.01em; }
.more-meta { font-family: var(--display); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--faint); }
.more-card:hover .more-title { color: var(--link); }
.more-links {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.3rem; margin: 1.5rem 0 0;
  font-family: var(--display); font-weight: 500; font-size: 0.86rem;
}
.index-head p.index-app { margin-top: 0.7rem; font-size: 0.95rem; }

/* ---------- index page ---------- */
.index-head { margin: 0.8rem 0 1.8rem; }
.index-head h1 { font-family: var(--display); font-weight: 600; color: var(--ink); font-size: 2rem; letter-spacing: -0.02em; margin: 0 0 0.3rem; }
.index-head p { margin: 0; color: var(--muted); }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem; }
.card a.thumb { display: block; line-height: 0; }
.card a.thumb img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 2; object-fit: cover; border-radius: 0.35rem; }
.card .thumb.band { aspect-ratio: 5 / 2; background: var(--ink); border-radius: 0.35rem; display: flex; align-items: center; justify-content: center; }
.card .thumb.band img { width: 30%; height: auto; aspect-ratio: auto; border-radius: 0; }
.card h2 { font-family: var(--display); font-weight: 600; font-size: 1.3rem; line-height: 1.2; letter-spacing: -0.01em; margin: 0.8rem 0 0.3rem; }
.card h2 a { color: var(--ink); text-decoration: none; }
.card .meta { font-family: var(--display); font-size: 0.72rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--faint); margin: 0 0 0.35rem; }
.card p.sum { margin: 0 0 0.4rem; color: var(--muted); }
.card .links { font-family: var(--display); font-size: 0.8rem; font-weight: 500; display: flex; gap: 1rem; }

/* ---------- print / PDF ---------- */
@page {
  size: A4;
  margin: 17mm 25mm 19mm 25mm;
  @bottom-left {
    content: "swandex.com";
    font-family: "Space Grotesk", sans-serif; font-weight: 500; font-size: 7.4pt;
    letter-spacing: 0.02em; color: #8b96a1; vertical-align: top; padding-top: 4.5mm;
  }
  @bottom-right {
    content: counter(page) " / " counter(pages);
    font-family: "Space Grotesk", sans-serif; font-weight: 500; font-size: 7.4pt;
    letter-spacing: 0.04em; color: #8b96a1; vertical-align: top; padding-top: 4.5mm;
  }
}
@page :first { margin-top: 13mm; }

@media print {
  html { font-size: 11pt; }
  body { line-height: 1.6; }
  .page { max-width: none; margin: 0; padding: 0; }
  .web-only { display: none !important; }
  .print-only { display: inline !important; }
  .cover img, .cover.band { border-radius: 1.6mm; }
  .article-head, .article-body, .signoff, .references, .colophon { margin-left: 9mm; margin-right: 9mm; }
  .title .seg { white-space: nowrap; }
  a { text-decoration-color: rgba(27, 106, 168, 0.35); }
}

@media screen and (min-width: 720px) {
  .title .seg { white-space: nowrap; }
}

@media screen and (max-width: 560px) {
  html { font-size: 16px; }
  .title { font-size: 1.85rem; }
  .subtitle { font-size: 1.15rem; }
}
