/* tsurineko.org — the site's only stylesheet. Tokens, base elements, then
   components, in that order. No raw color values below the token blocks. */

@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/spectral-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/spectral-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/spectral-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/spectral-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/spectral-600-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/spectral-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* ── Base palette ─────────────────────────────────────────────── */
  --color-page: #f7f3ea;
  --color-page-deep: #efe7d6;
  --color-surface: rgba(255, 255, 255, 0.92);
  --color-surface-strong: #ffffff;
  --color-ink: #1a2332;
  --color-muted: #5a6372;
  --color-border: rgba(26, 35, 50, 0.14);
  --color-border-strong: rgba(26, 35, 50, 0.28);

  --color-kuwairo: #785337;
  --color-kuwairo-hover: #5e3f29;
  --color-kuwairo-soft: #f0e8e0;
  --color-kakiiro: #c2562a;
  --color-kakiiro-hover: #a84620;
  --color-kakiiro-soft: #f8e6dc;
  --color-aizome: #2c4a6b;
  --color-aizome-soft: #e7ecf2;
  --color-matcha: #5f6b3a;
  --color-matcha-soft: #ecefe2;
  --color-kinari: #d4c4a0;
  --color-danger: #8a2a2a;

  /* ── Semantic aliases ─────────────────────────────────────────── */
  --color-primary: var(--color-kuwairo);
  --color-primary-hover: var(--color-kuwairo-hover);
  --color-primary-soft: var(--color-kuwairo-soft);
  --color-secondary: var(--color-aizome);
  --color-highlight: var(--color-kakiiro);
  --color-success: var(--color-matcha);
  --color-focus: var(--color-aizome);
  --color-text: var(--color-ink);

  --text-body: var(--color-ink);
  --text-muted: var(--color-muted);
  --text-on-primary: #ffffff;
  --text-link: var(--color-aizome);
  --text-link-hover: var(--color-kuwairo);

  --surface-page: var(--color-page);
  --surface-card: var(--color-surface);
  --surface-card-strong: var(--color-surface-strong);
  --surface-sunken: var(--color-page);
  --surface-utility: var(--color-page-deep);
  --surface-editorial: var(--color-aizome-soft);
  --surface-header: rgba(247, 243, 234, 0.88);
  --border-hairline: var(--color-border);
  /* Hairlines are decorative; a control's boundary needs WCAG 1.4.11's 3:1.
     0.6 alpha over ink clears it on both the page and the deep footer ground. */
  --border-control: rgba(26, 35, 50, 0.6);

  --selected-tint: rgba(120, 83, 55, 0.05);

  --page-gradient: radial-gradient(115% 75% at 50% 0%,
    #fffdf7 0%, var(--color-page) 42%, var(--color-page-deep) 100%);

  /* ── Typography ───────────────────────────────────────────────── */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: Spectral, Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --font-body: var(--font-sans);
  --font-heading: var(--font-display);
  --font-price: var(--font-display);

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  --text-hero: 2.75rem;
  --text-page-title: var(--text-3xl);
  --text-section-title: var(--text-2xl);
  --text-card-title: var(--text-lg);
  --text-price-large: var(--text-2xl);
  --text-eyebrow: var(--text-xs);
  --text-fine: var(--text-xs);
  --text-utility: 0.8125rem;

  --leading-body: 1.6;
  --leading-tight: 1.15;
  --leading-relaxed: 1.625;

  --weight-regular: 400;
  --weight-strong: 500;
  --weight-active: 600;

  --tracking-eyebrow: 0.05em;
  --tracking-status: 0.18em;
  --tracking-wide: 0.025em;
  --tracking-lockup: 0.22em;
  --tracking-display: -0.015em;

  /* ── Spacing & layout ─────────────────────────────────────────── */
  --space-0-5: 0.125rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  --max-content-width: 720px;
  --max-grid-width: 1040px;

  --measure-prose: 68ch;

  --page-gutter: var(--space-5);
  --page-block: var(--space-10);
  --header-block: var(--space-4);

  --grid-gap: var(--space-6);
  --column-gap: var(--space-10);
  --stack-gap: var(--space-6);
  --card-padding: var(--space-5);
  --surface-padding: var(--space-8);
  --control-padding-y: var(--space-3);
  --control-padding-x: var(--space-4);

  --tap-min: 44px;

  /* ── Radii ────────────────────────────────────────────────────── */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-button: 14px;
  --radius-card: 20px;
  --radius-pill: 999px;

  --border-width: 1px;
  --border-width-selected: 2px;
  --focus-ring-width: 2px;
  --focus-ring-offset: 2px;

  /* ── Elevation ────────────────────────────────────────────────── */
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-hover-warm: 0 6px 16px rgba(120, 83, 55, 0.22);
  --shadow-photo: 0 2px 8px rgba(26, 35, 50, 0.06);
  --shadow-none: none;

  --blur-card: 6px;
  --blur-sticky: 8px;

  /* ── Motion ───────────────────────────────────────────────────── */
  --duration-fast: 150ms;
  --duration-base: 200ms;
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-colors: color var(--duration-fast) var(--ease-standard),
    background-color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard);
  /* Buttons also move. Lift and shadow must share the colour timing or the
     shadow lands before the button does. */
  --transition-button: var(--transition-colors),
    transform var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
  --hover-lift: translateY(-1px);
}

@media (prefers-reduced-transparency: reduce) {
  :root {
    --color-surface: var(--color-surface-strong);
    --surface-card: var(--color-surface-strong);
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-base: 0ms;
    --hover-lift: none;
  }
}

/* ════════════════════════════════════════════════════════════════
   Base elements
   ════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box }

html { scroll-behavior: smooth }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto }
}

body {
  margin: 0;
  background: var(--page-gradient);
  background-attachment: fixed;
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: var(--weight-strong);
  line-height: 1.2;
  letter-spacing: var(--tracking-display);
  margin: 0;
}

p { margin: 0; text-wrap: pretty }

a { color: var(--text-link) }
a:hover { color: var(--text-link-hover) }

:focus-visible {
  outline: var(--focus-ring-width) solid var(--color-focus);
  outline-offset: var(--focus-ring-offset);
}

/* ════════════════════════════════════════════════════════════════
   Layout primitives
   ════════════════════════════════════════════════════════════════ */

.shell {
  width: 100%;
  max-width: var(--max-grid-width);
  margin: 0 auto;
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
}

main.home-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  padding-top: var(--space-12);
  padding-bottom: var(--space-16);
}

.page-wrap.shell {
  padding-top: var(--space-8);
  padding-bottom: var(--space-16);
}

/* ════════════════════════════════════════════════════════════════
   Header
   ════════════════════════════════════════════════════════════════ */

.site-header {
  z-index: 20;
  background: var(--surface-header);
  backdrop-filter: blur(var(--blur-card));
  border-bottom: 1px solid var(--border-hairline);
}

.site-header > .shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  padding-top: var(--header-block);
  padding-bottom: var(--header-block);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-ink);
  flex: 0 0 auto;
}

.wordmark-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-strong);
  letter-spacing: var(--tracking-display);
  line-height: 1;
}

.wordmark-rule {
  width: 1px;
  height: 1.1em;
  background: var(--color-kuwairo);
  opacity: 0.55;
  flex: 0 0 auto;
}

.wordmark-label {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: var(--weight-strong);
  text-transform: uppercase;
  letter-spacing: var(--tracking-lockup);
  color: var(--color-kuwairo);
  line-height: 1;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  margin-left: auto;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-strong);
  text-decoration: none;
  border-radius: var(--radius-lg);
  color: var(--color-ink);
  transition: var(--transition-colors);
}

.site-nav a:hover { color: var(--color-kuwairo) }

.site-nav a[aria-current="page"] {
  color: var(--color-kuwairo);
  background: var(--color-kuwairo-soft);
}

.site-nav a.nav-shop {
  gap: var(--space-1);
  color: var(--color-kuwairo);
}

/* Locale pills. postprocess.ts rewrites the builder package's Tailwind markup
   into these classes — the two have to move together. */
.lang-switch {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex: 0 0 auto;
}

/* Every pill gets the same box, transparent border included, so the three sit
   on one baseline. Padding alone sets the box: a two-letter label inside a
   --tap-min box comes out a disc, not a pill. The pill therefore lands under the
   site's own 44px minimum while clearing WCAG 2.5.8's 24px, a deliberate trade. */
.lang-switch-current,
.lang-switch-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-4);
  border: var(--border-width) solid transparent;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-eyebrow);
  transition: var(--transition-colors);
}

.lang-switch-current {
  background: var(--color-kuwairo-soft);
  color: var(--color-kuwairo);
  font-weight: var(--weight-active);
}

.lang-switch-link {
  border-color: var(--border-control);
  color: var(--color-muted);
  font-weight: var(--weight-regular);
  text-decoration: none;
}

.lang-switch-link:hover {
  border-color: var(--color-kuwairo);
  color: var(--color-kuwairo);
}

/* ════════════════════════════════════════════════════════════════
   Breadcrumb
   ════════════════════════════════════════════════════════════════ */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin-bottom: var(--space-6);
}

.breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  color: var(--color-aizome);
  text-decoration: none;
}

.breadcrumb a:hover { color: var(--color-kuwairo) }

.breadcrumb > *:not(:first-child)::before {
  content: "·";
  display: inline-block;
  margin: 0 var(--space-2);
  opacity: 0.5;
}

/* ════════════════════════════════════════════════════════════════
   Info-page two-column layout
   ════════════════════════════════════════════════════════════════ */

/* One column by default, article first, the aside following it as a jump
   list. The aside is ~650px of card, contents list and site links on a
   phone; ahead of the article it pushed the h1 and the page's primary action
   about 1.5 screens down. The article leads the DOM too, so the stacked
   reading order needs no `order` — that only comes back at 900px, to put the
   aside in the left column. */
.page {
  display: flex;
  flex-direction: column;
  gap: var(--column-gap);
}

.page-content {
  min-width: 0;
}

/* The sticky offset (104px), the h2 scroll-margin-top (104px) and the
   sidebar max-height (100vh - 132px, the extra 28px is the header's own
   vertical padding) — all three live in the min-width media query below —
   are one coupled measurement: change one, change all three. A fourth
   coupled constant lives outside this file: the SCROLLSPY_OFFSET (140) in
   scripts/template.html's inline scroll-spy script, which must stay close
   to the 104px sticky offset. */
aside.sidebar {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* The two-column row is desktop-only — the one width media query in the file,
   a documented DESIGN.md exception. It has to own the column count as well as
   stickiness: a sticky aside slides over the article once the columns stack,
   and the stacked order differs from the row order, so both have to flip on
   the same number. The multi-row header below 900px also outgrows the 104px
   offsets. */
@media (min-width: 900px) {
  .site-header {
    position: sticky;
    top: 0;
  }

  .page {
    flex-direction: row;
    align-items: flex-start;
  }

  .page-content {
    flex: 1 1 520px;
  }

  aside.sidebar {
    flex: 0 0 260px;
    order: -1;
    position: sticky;
    top: 104px;
    max-height: calc(100vh - 132px);
  }
}

.sidebar-card {
  background: var(--surface-sunken);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.sidebar-card img {
  width: 48px;
  height: auto;
  display: block;
}

.sidebar-card-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--weight-strong);
  color: var(--color-ink);
}

.sidebar-card-summary {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-muted);
}

.toc-heading {
  display: block;
  font-size: var(--text-eyebrow);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  color: var(--color-muted);
  padding-bottom: var(--space-1);
  margin-bottom: var(--space-1);
  border-bottom: 1px solid var(--border-hairline);
}

nav.toc {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-height: 0;
  overflow: auto;
}

nav.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

nav.toc a {
  display: block;
  font-size: var(--text-sm);
  line-height: 1.4;
  font-weight: var(--weight-regular);
  color: var(--color-muted);
  text-decoration: none;
  padding: var(--space-1) 0 var(--space-1) var(--space-3);
  border-left: 2px solid transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: var(--transition-colors);
}

nav.toc a:hover { color: var(--color-kuwairo) }

nav.toc a.active {
  color: var(--color-kuwairo);
  font-weight: var(--weight-strong);
  border-left-color: var(--color-kuwairo);
}

.elsewhere {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.elsewhere a {
  display: flex;
  align-items: center;
  min-height: var(--tap-min);
  font-size: var(--text-sm);
  color: var(--color-aizome);
  text-decoration: none;
}

.elsewhere a:hover { color: var(--color-kuwairo) }

.page-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-bottom: var(--space-6);
  margin-bottom: var(--space-8);
  border-bottom: 1px solid var(--border-hairline);
}

.page-header h1 { font-size: var(--text-page-title) }

article > h1 {
  font-size: var(--text-page-title);
  padding-bottom: var(--space-6);
  margin-bottom: var(--space-8);
  border-bottom: 1px solid var(--border-hairline);
}

.home-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.footer-wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

/* ════════════════════════════════════════════════════════════════
   Eyebrow
   ════════════════════════════════════════════════════════════════ */

.eyebrow {
  display: inline-block;
  font-size: var(--text-eyebrow);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  color: var(--color-kuwairo);
}

/* ════════════════════════════════════════════════════════════════
   Article / prose — shared by info-page <article> and any homepage
   section marked .prose
   ════════════════════════════════════════════════════════════════ */

article h2, .prose h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-strong);
  letter-spacing: var(--tracking-display);
  line-height: 1.25;
  margin: var(--space-12) 0 var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-hairline);
  scroll-margin-top: var(--space-4);
}

/* Must follow the base h2 rule above — equal specificity, cascade decides.
   Couples to the 104px sticky trio (see the sidebar comment). */
@media (min-width: 900px) {
  article h2, .prose h2 {
    scroll-margin-top: 104px;
  }
}

article > h2:first-child, .prose > h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

article h3, .prose h3 {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-strong);
  letter-spacing: 0;
  color: var(--color-kuwairo);
  margin: var(--space-8) 0 var(--space-3);
}

article h4, .prose h4 {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-active);
  color: var(--color-ink);
  margin: var(--space-6) 0 var(--space-3);
}

article p, .prose p {
  margin: 0 0 var(--space-4);
  max-width: var(--measure-prose);
  text-wrap: pretty;
}

article ul, .prose ul, article ol, .prose ol {
  margin: 0 0 var(--space-5);
  padding-left: 1.15rem;
}

article ul ul, .prose ul ul {
  margin: var(--space-2) 0 0;
}

article li, .prose li {
  margin-bottom: var(--space-2);
  max-width: 66ch;
  text-wrap: pretty;
}

article li::marker, .prose li::marker { color: var(--color-kuwairo) }

article strong, .prose strong { font-weight: var(--weight-strong) }

article a, .prose a {
  text-underline-offset: 2px;
  text-decoration-color: color-mix(in srgb, var(--color-aizome) 40%, transparent);
}

article blockquote, .prose blockquote {
  margin: 0 0 var(--space-5);
  padding: var(--space-3) var(--space-5);
  border-left: 2px solid var(--color-kuwairo);
  color: var(--color-muted);
  font-style: italic;
}

article table, .prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 var(--space-5);
  font-size: var(--text-sm);
}

article th, .prose th, article td, .prose td {
  border-bottom: 1px solid var(--border-hairline);
  padding: var(--space-2) var(--space-3);
  text-align: left;
}

article th, .prose th { font-weight: var(--weight-strong) }

/* ════════════════════════════════════════════════════════════════
   Homepage — hero
   ════════════════════════════════════════════════════════════════ */

.section-title {
  font-size: var(--text-section-title);
  margin: 0;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-8) var(--space-10);
  padding-bottom: var(--space-10);
  border-bottom: 1px solid var(--border-hairline);
}

.hero-intro {
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  align-items: flex-start;
}

.hero-intro img {
  width: 76px;
  height: auto;
  display: block;
}

.hero-intro h1 {
  font-size: var(--text-hero);
  line-height: 1.1;
}

.hero-intro p {
  margin: 0;
  font-size: var(--text-lg);
  color: var(--color-muted);
  max-width: 40ch;
  line-height: 1.5;
}

.hero-actions {
  flex: 0 1 356px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  align-items: flex-start;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
  padding: var(--control-padding-y) var(--space-6);
  border: 1px solid transparent;
  border-radius: var(--radius-button);
  font-size: var(--text-base);
  font-weight: var(--weight-strong);
  line-height: 1.2;
  text-decoration: none;
  transition: var(--transition-button);
}

.btn-primary {
  background: var(--color-kuwairo);
  color: var(--text-on-primary);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  color: var(--text-on-primary);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border-control);
  color: var(--color-ink);
}

.btn-secondary:hover {
  color: var(--color-kuwairo);
  border-color: var(--color-kuwairo);
}

/* On touch-primary devices :hover latches after a tap. Everything that reads
   as elevation lives in here, or a tapped button keeps it for good. */
@media (hover: hover) {
  .btn-primary:hover, .btn-secondary:hover { transform: var(--hover-lift) }
  .btn-primary:hover { box-shadow: var(--shadow-hover-warm) }
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  /* Row gap only bites once these wrap, and then it has to: without it the two
     22px targets sit 22px apart and their WCAG 2.5.8 circles overlap. */
  gap: var(--space-2) var(--space-5);
  font-size: var(--text-sm);
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-aizome);
  text-decoration: none;
}

/* The 44px tap floor earns its keep only without a cursor. On pointer devices
   it just pads the hero's right column and rides the buttons up past the h1. */
@media (pointer: coarse) {
  .social-links a { min-height: var(--tap-min) }
}

.social-links a:hover { color: var(--color-kuwairo) }

.social-links svg { display: block }

/* ════════════════════════════════════════════════════════════════
   Homepage — upcoming band, offers, contact
   ════════════════════════════════════════════════════════════════ */

/* Same horizontal layout, different surfaces: the band is the one tinted
   ground, the contact panel the one surface card (DESIGN.md "Surfaces and
   radii" and the homepage anatomy). */
.band-upcoming, .contact-panel {
  border: 1px solid var(--border-hairline);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4) var(--space-8);
}

.band-upcoming {
  background: var(--surface-editorial);
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-8);
}

.contact-panel {
  background: var(--surface-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(var(--blur-card));
  padding: var(--surface-padding);
}

.band-upcoming .eyebrow { color: var(--color-aizome) }

.band-upcoming p, .contact-panel p {
  margin: 0;
  max-width: 56ch;
}

/* Sentence per line, but only from 640px up: below that the second sentence
   no longer fits one line, so forcing the split costs a third line and
   strands "by email." on its own. A <br /> would do this too, but it would
   also survive a failed stylesheet and any reader mode that keeps the
   markup and drops the CSS. Blocking a span degrades to ordinary prose. */
@media (min-width: 640px) {
  .band-upcoming .band-sentence { display: block }
}

.band-upcoming a, .contact-panel a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  flex: 0 0 auto;
  white-space: nowrap;
  font-weight: var(--weight-strong);
  color: var(--color-aizome);
  text-decoration: none;
}

.band-upcoming a:hover, .contact-panel a:hover { color: var(--color-kuwairo) }

.contact-panel-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Not a .prose h2, so it needs the anchor offset spelled out — it carries an
   id and is a fragment target like the prose headings are. */
.contact-panel h2 {
  font-size: var(--text-section-title);
  scroll-margin-top: var(--space-4);
}

@media (min-width: 900px) {
  .contact-panel h2 { scroll-margin-top: 104px }
}

.contact-panel-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.offers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--grid-gap);
}

.offer-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--card-padding);
  min-height: 200px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-hairline);
  background: var(--surface-card);
  text-decoration: none;
  transition: var(--transition-colors);
}

.offer-card:hover {
  border-color: var(--color-kuwairo);
  background: var(--surface-card-strong);
}

.offer-card-icon {
  display: block;
  color: var(--color-kuwairo);
}

.offer-card-title {
  font-family: var(--font-display);
  font-size: var(--text-card-title);
  font-weight: var(--weight-strong);
  color: var(--color-ink);
}

.offer-card-body {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-muted);
}

.offer-card-link {
  margin-top: auto;
  font-size: var(--text-sm);
  font-weight: var(--weight-strong);
  color: var(--color-kuwairo);
}

/* ════════════════════════════════════════════════════════════════
   Content widgets — raw HTML embedded in markdown
   ════════════════════════════════════════════════════════════════ */

/* Widgets are raw HTML block siblings of the prose. Paragraphs and lists carry
   no top margin, so without this a widget's last edge touches the one that
   follows: the stock list reads as if the paragraph is another row. Headings
   bring their own larger top margin and collapse over this. */
article > .glance,
article > .stock-list,
article > .kit-tiles,
article > .price-tiles,
article > .safewords,
article > .curriculum,
article > .btn-row { margin-bottom: var(--space-6) }

.glance {
  background: var(--surface-sunken);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4);
}

.glance-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.glance-label {
  font-size: var(--text-eyebrow);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  color: var(--color-muted);
}

.glance-value { font-size: var(--text-sm) }

.tile {
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.tile-label {
  font-size: var(--text-sm);
  color: var(--color-muted);
}

/* Body size, not --text-card-title: a tile title is not in the document
   outline, and at 1.125rem it outranked the real article h3s beside it on
   /rope-for-sale-leuven and /house-rules. Spectral plus weight 500 carries it
   instead. */
.tile-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--weight-strong);
  color: var(--color-ink);
}

.tile-price {
  font-family: var(--font-display);
  font-size: var(--text-price-large);
  font-variant-numeric: tabular-nums;
}

.tile-note, .tile-body {
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.6;
}

.price-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}

/* Column count is declared, not derived: four kits in three columns leave a lone
   tile in a half-empty row. auto-fit cannot avoid that here, because the article
   is full-width below the 900px sidebar breakpoint and 560px above it, and no
   track minimum blocks three tracks at the wide measure while still allowing two
   at the narrow one. */
.kit-tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 560px) {
  .kit-tiles { grid-template-columns: 1fr 1fr }
}

.kit-tiles > .tile {
  padding: var(--space-5);
  gap: var(--space-3);
  transition: var(--transition-colors);
}

.kit-tiles > .tile:hover { border-color: var(--color-kuwairo) }

/* A whole tile as the tap target, resetting the UA underline and the site link
   colour — a tile is a control, not a link in a sentence. Same treatment as
   `.offer-card`. */
a.tile {
  color: inherit;
  text-decoration: none;
}

/* Strip the prose <ul> treatment: the indent is sized for body copy and buys
   nothing in a tile, and the kuwairo markers land at the weight of the kuwairo
   CTA below them. Title, spec lines and link then share one edge. */
a.tile > .tile-body {
  margin-bottom: 0;
  padding-left: 0;
  list-style: none;
}

a.tile > .tile-body > li:last-child { margin-bottom: 0 }

.tile-link {
  margin-top: auto;
  padding-top: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-strong);
  color: var(--color-kuwairo);
}

.curriculum {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.curriculum > .block {
  border-top: 1px solid var(--border-hairline);
  padding-top: var(--space-4);
}

.block-title {
  margin: 0 0 var(--space-2);
  font-weight: var(--weight-strong);
  color: var(--color-kuwairo);
}

.block-body { margin: 0 }

.stock-list {
  display: flex;
  flex-direction: column;
}

.stock-list > .stock-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--border-hairline);
}

.stock-info {
  flex: 1 1 220px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.stock-name { font-weight: var(--weight-strong) }

.stock-desc {
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.6;
  max-width: var(--measure-prose);
}

.safewords {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-3);
}

.safewords > .tile.safeword-green .tile-title { color: var(--color-matcha) }
.safewords > .tile.safeword-yellow .tile-title { color: var(--color-kakiiro-hover) }
.safewords > .tile.safeword-red .tile-title { color: var(--color-danger) }

/* ════════════════════════════════════════════════════════════════
   Footer
   ════════════════════════════════════════════════════════════════ */

.site-footer {
  border-top: 1px solid var(--border-hairline);
  background: var(--surface-utility);
}

.shell.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-8);
  padding-top: var(--space-12);
  padding-bottom: var(--space-8);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-col .wordmark-name { font-size: var(--text-lg) }
.footer-col .wordmark-label { font-size: 0.5625rem }

.footer-col h2 {
  font-family: var(--font-sans);
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-regular);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  color: var(--color-muted);
}

.footer-col p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.6;
}

.footer-col a {
  font-size: var(--text-sm);
  color: var(--color-aizome);
  text-decoration: none;
}

.footer-col a:hover { color: var(--color-kuwairo) }

.shell.fine-print {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding-top: var(--space-5);
  padding-bottom: var(--space-10);
  border-top: 1px solid var(--border-hairline);
  font-size: var(--text-fine);
  color: var(--color-muted);
}

.fine-print > *:not(:first-child)::before {
  content: "·";
  display: inline-block;
  margin: 0 var(--space-2);
  opacity: 0.5;
}
