/* ==========================================================================
   The Scottish Science Society — house stylesheet
   Navy, gold and Garamond. One file for the whole site.

   Contents
     1  Tokens            6  Buttons and links      11 The Press
     2  Fonts             7  Page furniture         12 Forms and the till
     3  Base              8  Cards and grids        13 Search
     4  Header            9  Prose                  14 Utilities
     5  Footer            10 The Journal            15 Print
     16 Collections: references, episodes, embedded instruments
   ========================================================================== */

/* 1  Tokens --------------------------------------------------------------- */
:root {
  --navy: #052243;            /* the crest */
  --navy-950: #03162c;
  --navy-800: #0b2f5c;
  --navy-600: #1d4a80;
  --ink: #18212e;
  --muted: #566070;
  --faint: #6b7482;

  --gold: #b08d3c;
  --gold-700: #876618;        /* legible on white */
  --gold-300: #d9c088;        /* legible on navy */
  --claret: #7a2533;

  --paper: #ffffff;
  --cream: #f7f4ec;
  --cream-deep: #efe9da;
  --parchment: #eee0c8;       /* the ground of the engravings */
  --line: #ddd6c6;
  --line-soft: #ebe6da;

  --ok: #1f6b45;
  --warn: #8a5a00;
  --warn-bg: #fdf4dc;
  --bad: #9b2226;

  --serif: "EB Garamond", "EB Garamond Variable", Garamond, "Adobe Garamond Pro", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Source Sans 3 Variable", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 2px;
  --shadow: 0 1px 2px rgba(5, 34, 67, .06), 0 10px 28px rgba(5, 34, 67, .07);
  --shadow-lg: 0 2px 4px rgba(5, 34, 67, .08), 0 18px 44px rgba(5, 34, 67, .14);
}

/* 2  Fonts (self-hosted; SIL Open Font Licence) --------------------------- */
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../assets/fonts/eb-garamond-latin-wght-normal.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: "EB Garamond"; font-style: italic; font-weight: 400 800; font-display: swap;
  src: url("../assets/fonts/eb-garamond-latin-wght-italic.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: "EB Garamond"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../assets/fonts/eb-garamond-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: "EB Garamond"; font-style: italic; font-weight: 400 800; font-display: swap;
  src: url("../assets/fonts/eb-garamond-latin-ext-wght-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: "EB Garamond"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../assets/fonts/eb-garamond-greek-wght-normal.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "EB Garamond"; font-style: italic; font-weight: 400 800; font-display: swap;
  src: url("../assets/fonts/eb-garamond-greek-wght-italic.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("../assets/fonts/source-sans-3-latin-wght-normal.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: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("../assets/fonts/source-sans-3-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* 3  Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1875rem;         /* 19px: Garamond sets small */
  line-height: 1.6;
  font-feature-settings: "kern", "liga", "onum";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy); font-weight: 500; line-height: 1.15; margin: 0; text-wrap: balance; font-feature-settings: "kern", "liga", "lnum"; }
h1 { font-size: clamp(2.2rem, 4.4vw, 3.35rem); letter-spacing: -.012em; }
h2 { font-size: clamp(1.65rem, 2.7vw, 2.2rem); letter-spacing: -.006em; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--navy-600); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--gold) 70%, transparent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--navy); text-decoration-color: var(--gold-700); text-decoration-thickness: 2px; }
strong, b { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
::selection { background: var(--navy); color: #fff; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: var(--radius); }
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--navy); color: #fff; padding: .75rem 1.25rem; font: 600 .9rem var(--sans); }
.skip-link:focus { left: 1rem; top: 1rem; color: #fff; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: calc(820px + 2 * var(--gutter)); }
.wrap--mid { max-width: calc(1000px + 2 * var(--gutter)); }

/* 4  Header --------------------------------------------------------------- */
.utility { background: var(--navy-950); color: #cdd5e0; font: 600 .74rem/1.2 var(--sans); letter-spacing: .09em; text-transform: uppercase; }
.utility__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 38px; }
.utility__id { margin: 0; display: flex; gap: .7rem; align-items: center; color: #aab5c5; }
.utility__id .dot { color: var(--gold-300); }
.utility__nav { display: flex; gap: 1.6rem; }
.utility a { color: #dfe5ee; text-decoration: none; padding: .55rem 0; }
.utility a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--gold-300); }

.masthead { background: var(--paper); }
.masthead__row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1.15rem; }
.brand { display: flex; align-items: center; gap: 1rem; color: var(--navy); text-decoration: none; min-width: 0; }
.brand:hover { color: var(--navy); }
.brand__crest { width: 66px; height: 56px; flex: none; }
.brand__text { display: flex; flex-direction: column; gap: .18rem; min-width: 0; }
.brand__name { font: 600 clamp(1.02rem, 2.1vw, 1.42rem)/1.1 var(--serif); letter-spacing: .13em; text-transform: uppercase; font-feature-settings: "lnum"; }
.brand__motto { font: italic 400 1rem/1.1 var(--serif); color: var(--gold-700); letter-spacing: .02em; }

.searchbox { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); min-width: min(320px, 100%); }
.searchbox:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 45%, transparent); }
.searchbox input { flex: 1; min-width: 0; border: 0; background: transparent; padding: .6rem .8rem; font: 400 .95rem var(--sans); color: var(--ink); outline: none; }
.searchbox input::placeholder { color: var(--faint); }
.searchbox button { border: 0; background: var(--navy); color: #fff; padding: 0 .9rem; display: inline-flex; align-items: center; border-radius: 0 1px 1px 0; }
.searchbox button:hover { background: var(--navy-800); }
.searchbox svg { width: 18px; height: 18px; }

.nav-toggle { display: none; align-items: center; gap: .55rem; border: 1px solid var(--navy); background: var(--paper); color: var(--navy); padding: .6rem .9rem; border-radius: var(--radius); font: 600 .8rem var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.nav-toggle__bars { width: 18px; height: 12px; position: relative; display: inline-block; border-block: 2px solid currentColor; }
.nav-toggle__bars::before { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 2px solid currentColor; }

.primary { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; z-index: 30; }
.primary__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.primary__item { position: relative; display: flex; align-items: stretch; }
.primary__link { display: block; padding: 1rem 1.15rem .85rem; margin-bottom: -1px; border-bottom: 3px solid transparent; color: var(--navy); text-decoration: none; font: 600 .84rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.primary__item:first-child .primary__link { padding-left: 0; }
.primary__link:hover, .primary__item:hover > .primary__link, .primary__item:focus-within > .primary__link { border-bottom-color: var(--gold); color: var(--navy); }
.primary__link[aria-current] { border-bottom-color: var(--navy); }
.primary__more { display: none; }
.primary__menu { display: none; position: absolute; left: 0; top: 100%; width: max-content; min-width: 290px; max-width: 360px; background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--gold); box-shadow: var(--shadow-lg); padding: 1.1rem 1.35rem 1.2rem; }
.primary__item:nth-last-child(-n+2) > .primary__menu { left: auto; right: 0; }
.primary__blurb { margin: 0 0 .7rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line-soft); font: italic 400 1rem/1.4 var(--serif); color: var(--muted); }
.primary__menu ul { list-style: none; margin: 0; padding: 0; }
.primary__menu a { display: block; padding: .36rem 0; color: var(--navy); text-decoration: none; font: 400 1.08rem/1.3 var(--serif); }
.primary__menu a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }
@media (hover: hover) and (min-width: 961px) {
  .primary__item:hover > .primary__menu, .primary__item:focus-within > .primary__menu { display: block; }
}
@media (min-width: 961px) { .primary__item.is-open > .primary__menu { display: block; } .primary .searchbox { display: none; } }

@media (max-width: 960px) {
  .utility__id { display: none; }
  .utility__row { justify-content: flex-end; }
  .masthead .searchbox { display: none; }
  .nav-toggle { display: inline-flex; flex: none; min-height: 44px; }
  .brand__crest { width: 52px; height: 44px; }
  .js .primary { display: none; }
  .js .primary.is-open { display: block; }
  .primary { border-bottom: 3px solid var(--navy); }
  .primary .wrap { padding-block: .75rem 1.25rem; }
  .primary .searchbox { margin-bottom: .75rem; }
  .primary__list { flex-direction: column; }
  .primary__item { flex-wrap: wrap; border-bottom: 1px solid var(--line-soft); }
  .primary__link, .primary__item:first-child .primary__link { flex: 1; padding: 1.05rem 0; border-bottom: 0; margin: 0; white-space: normal; min-height: 44px; }
  .primary__more { display: inline-flex; align-items: center; justify-content: center; width: 48px; border: 0; background: transparent; color: var(--navy); }
  .primary__more::before { content: ""; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s; }
  .primary__item.is-open > .primary__more::before { transform: rotate(-135deg) translate(-2px, -2px); }
  .primary__menu { position: static; width: 100%; max-width: none; min-width: 0; border: 0; box-shadow: none; padding: 0 0 .9rem .9rem; border-left: 3px solid var(--gold); margin-bottom: .9rem; }
  .primary__item.is-open > .primary__menu { display: block; }
  .no-js-nav .primary__menu { display: block; }
  .primary__blurb { display: none; }
}
html:not(.js) .primary__menu { position: static; display: none; }
@media (max-width: 960px) { html:not(.js) .primary__menu { display: block; } }
@media (max-width: 520px) {
  .utility__nav { gap: 1.1rem; }
  .brand__motto { display: none; }
  .brand__name { letter-spacing: .09em; }
}

/* A lighter header for full-screen instruments */

/* 5  Footer --------------------------------------------------------------- */
.site-footer { background: var(--navy); color: #d6dde8; margin-top: clamp(3rem, 7vw, 5.5rem); font-size: 1.05rem; }
/* Where a page ends on a coloured band, the footer follows it directly, with no white strip between. */
main:has(> .band--paper:last-child, > .band--navy:last-child) ~ .site-footer { margin-top: 0; }
.site-footer a { color: #e9eef5; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--gold-300); }
.footer__top { display: grid; grid-template-columns: minmax(220px, 1.25fr) 3fr; gap: clamp(2rem, 5vw, 4.5rem); padding-block: clamp(2.5rem, 5vw, 4rem) 2.5rem; border-top: 4px solid var(--gold); }
.footer__brand img { width: 150px; height: auto; margin-bottom: 1.2rem; }
.footer__brand p { margin: 0 0 .8rem; line-height: 1.5; color: #c3ccd9; max-width: 30ch; }
.footer__motto { font-style: italic; color: var(--gold-300) !important; font-size: 1.2rem; }
.footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 2rem 1.75rem; }
.footer__col h2 { color: var(--gold-300); font: 600 .76rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; margin: 0 0 .9rem; }
.footer__col ul { list-style: none; margin: 0; padding: 0; }
.footer__col li { margin-bottom: .42rem; line-height: 1.35; }
.footer__legal { border-top: 1px solid rgba(255, 255, 255, .16); padding-block: 1.25rem 1.6rem; display: flex; flex-wrap: wrap; gap: .75rem 2rem; align-items: baseline; justify-content: space-between; font: 400 .84rem/1.5 var(--sans); color: #aeb9c9; }
.footer__legal p { margin: 0; }
.footer__legal p a { text-decoration: underline; text-underline-offset: .18em; }
.footer__legal ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
@media (max-width: 760px) { .footer__top { grid-template-columns: 1fr; } }

/* 6  Buttons and links ---------------------------------------------------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; padding: .82rem 1.45rem; border: 1px solid var(--navy); border-radius: var(--radius); background: transparent; color: var(--navy); font: 600 .82rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; text-align: center; transition: background .15s, color .15s, border-color .15s; }
.button:hover { background: var(--navy); color: #fff; text-decoration: none; }
.button--primary { background: var(--navy); color: #fff; }
.button--primary:hover { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.button--gold { background: var(--gold-700); border-color: var(--gold-700); color: #fff; }
.button--gold:hover { background: #6f5412; border-color: #6f5412; color: #fff; }
.button--light { border-color: rgba(255, 255, 255, .6); color: #fff; }
.button--light:hover { background: #fff; color: var(--navy); border-color: #fff; }
.button--block { width: 100%; }
.button--small { padding: .55rem 1rem; font-size: .76rem; }
.button[disabled], .button[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.button-row { display: flex; flex-wrap: wrap; gap: .75rem; }

.more { display: inline-flex; align-items: baseline; gap: .4rem; font: 600 .82rem/1.3 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--navy); text-decoration: none; border-bottom: 2px solid var(--gold); padding-bottom: .15rem; }
.more::after { content: "\2192"; transition: transform .15s; }
.more:hover { color: var(--navy); border-bottom-color: var(--navy); text-decoration: none; }
.more:hover::after { transform: translateX(3px); }
.band--navy .more { color: #fff; }

/* 7  Page furniture ------------------------------------------------------- */
.eyebrow { font: 600 .76rem/1.3 var(--sans); letter-spacing: .15em; text-transform: uppercase; color: var(--gold-700); margin: 0 0 .8rem; }
.band--navy .eyebrow { color: var(--gold-300); }
.lede { font-size: clamp(1.2rem, 1.7vw, 1.38rem); line-height: 1.5; color: #333d4b; max-width: 62ch; }
.band--navy .lede { color: #dfe5ee; }

.band { padding-block: clamp(2.75rem, 6vw, 4.75rem); }
.band--tight { padding-block: clamp(1.75rem, 4vw, 2.75rem); }
.band--paper { background: var(--cream); border-block: 1px solid var(--line-soft); }
.band--navy { background: var(--navy); color: #e3e9f1; }
.band--navy h1, .band--navy h2, .band--navy h3 { color: #fff; }
.band--navy a { color: #fff; }
.band + .band:not(.band--paper):not(.band--navy) { padding-top: 0; }
.band--paper + .band:not(.band--paper):not(.band--navy), .band--navy + .band:not(.band--paper):not(.band--navy) { padding-top: clamp(2.75rem, 6vw, 4.75rem); }

.section-head { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; border-top: 1px solid var(--line); padding-top: 1.35rem; margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.section-head::before { content: ""; position: absolute; left: 0; top: -2px; width: 72px; height: 3px; background: var(--navy); }
.section-head .eyebrow { flex: 0 0 100%; max-width: none; margin: 0 0 .3rem; }
.section-head p:not(.eyebrow) { flex: 0 0 100%; margin: .5rem 0 0; color: var(--muted); padding-right: max(0px, calc(100% - 70ch)); }
.band--navy .section-head { border-top-color: rgba(255, 255, 255, .22); }
.band--navy .section-head::before { background: var(--gold-300); }

/* The opening of the home page */
.hero { background: var(--cream); border-bottom: 1px solid var(--line); }
.hero__row { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding-block: clamp(2.5rem, 6vw, 5rem); }
.hero h1 { font-size: clamp(2.5rem, 5.4vw, 4.1rem); line-height: 1.04; }
.hero .lede { margin-top: 1.4rem; }
.hero .button-row { margin-top: 2rem; }
@media (max-width: 860px) { .hero__row { grid-template-columns: 1fr; } .hero__plate { order: -1; max-width: 520px; } }

/* The opening of an inner page */
.page-hero { background: var(--cream); border-bottom: 1px solid var(--line); }
.page-hero__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding-block: clamp(2rem, 4.5vw, 3.5rem); }
.page-hero--plate .page-hero__row { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.page-hero .lede { margin: 1.1rem 0 0; }
.page-hero .button-row { margin-top: 1.6rem; }
@media (max-width: 860px) { .page-hero--plate .page-hero__row { grid-template-columns: 1fr; } .page-hero--plate .plate { max-width: 420px; } }

.crumbs { font: 400 .84rem/1.4 var(--sans); color: var(--muted); margin: 0 0 1.1rem; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem .5rem; }
.crumbs li + li::before { content: "/"; margin-right: .5rem; color: var(--faint); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--navy); text-decoration: underline; }

.plate { border: 1px solid var(--line); background: var(--parchment); outline: 5px solid var(--paper); outline-offset: -11px; box-shadow: var(--shadow); width: 100%; }
.plate--plain { outline: 0; }
figure { margin: 0; }
figcaption { font: 400 .84rem/1.45 var(--sans); color: var(--muted); margin-top: .6rem; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); border-block: 1px solid var(--line); margin: 0; }
.fact { padding: 1.5rem 1.5rem 1.4rem 0; margin: 0; }
.fact + .fact { border-left: 1px solid var(--line-soft); padding-left: 1.5rem; }
/* The figure stands above its label, so that figures align across the strip however long the labels run. */
.fact { display: flex; flex-direction: column; }
.fact dt { order: 2; font: 600 .74rem/1.35 var(--sans); letter-spacing: .13em; text-transform: uppercase; color: var(--muted); margin-top: .5rem; }
.fact dd { order: 1; margin: 0; font: 500 2.5rem/1 var(--serif); color: var(--navy); font-feature-settings: "lnum"; }
.fact dt a { color: inherit; text-decoration: none; }
.fact dt a:hover { color: var(--navy); text-decoration: underline; }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr 1fr; } .fact { padding: 1.1rem .9rem 1rem 0; } .fact + .fact { padding-left: .9rem; } .fact:nth-child(odd) { border-left: 0; padding-left: 0; } .fact dd { font-size: 2rem; } }

.callout { border: 1px solid var(--line); border-left: 4px solid var(--gold); background: var(--cream); padding: 1rem 1.25rem; margin: 0 0 1.5rem; font-size: 1.05rem; }
.callout > :last-child { margin-bottom: 0; }
.callout--warn { border-left-color: #c8870a; background: var(--warn-bg); }
.callout--ok { border-left-color: var(--ok); background: #eef7f1; }
.callout--bad { border-left-color: var(--bad); background: #fbeeee; }
.callout__title { font: 600 .78rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--navy); margin: 0 0 .35rem; }

.badge { display: inline-block; font: 600 .68rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; padding: .38rem .6rem; border: 1px solid var(--gold-700); color: var(--gold-700); border-radius: 999px; white-space: nowrap; vertical-align: middle; }
.badge--solid { background: var(--navy); border-color: var(--navy); color: #fff; }
.badge--muted { border-color: var(--faint); color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; margin: 0; padding: 0; }
.chip { display: inline-block; font: 600 .74rem/1 var(--sans); letter-spacing: .06em; padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 999px; color: var(--navy); background: var(--paper); text-decoration: none; }
a.chip:hover { border-color: var(--navy); text-decoration: none; }

/* 8  Cards and grids ------------------------------------------------------ */
.grid { display: grid; gap: clamp(1.1rem, 2.4vw, 1.9rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr)); }

.card { position: relative; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--navy); padding: 1.5rem 1.5rem 1.4rem; transition: box-shadow .18s, transform .18s; }
.card--media { padding: 0; border-top-width: 1px; }
.card--media .card__body { padding: 1.3rem 1.4rem 1.35rem; display: flex; flex-direction: column; flex: 1; }
.card__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-bottom: 1px solid var(--line); background: var(--parchment); }
.card__eyebrow { font: 600 .72rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-700); margin: 0 0 .55rem; }
.card__title { font-size: 1.42rem; line-height: 1.2; margin: 0 0 .6rem; }
.card__title a { color: var(--navy); text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card__text { color: #3c4654; margin: 0 0 1rem; font-size: 1.08rem; line-height: 1.5; }
.card__foot { margin-top: auto; font: 600 .78rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--navy); }
.card__foot::after { content: " \2192"; }
.card:has(.card__title a):hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card:has(.card__title a:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.card__title a:focus-visible { outline: 0; }
.card--flat { border-top-width: 1px; }
.card .badge { align-self: flex-start; margin-bottom: .8rem; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.75rem, 5vw, 4rem); align-items: center; }
.split--wide-text { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.split--top { align-items: start; }
@media (max-width: 820px) { .split, .split--wide-text { grid-template-columns: 1fr; } }

.pull { margin: 0; padding: 0 0 0 1.5rem; border-left: 3px solid var(--gold); }
.pull p { font: italic 400 clamp(1.3rem, 2.2vw, 1.62rem)/1.42 var(--serif); color: var(--navy); margin: 0 0 .9rem; }
.pull footer, .pull cite { font: 600 .78rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-style: normal; }
.band--navy .pull p { color: #fff; }
.band--navy .pull cite, .band--navy .pull footer { color: var(--gold-300); }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.steps > li { counter-increment: step; border-top: 1px solid var(--line); padding-top: 1rem; position: relative; }
.steps > li::before { content: counter(step, upper-roman); display: block; font: 500 1.5rem/1 var(--serif); color: var(--gold-700); margin-bottom: .5rem; }
.steps h3 { font-size: 1.22rem; margin-bottom: .35rem; }
.steps p { margin: 0; color: #3c4654; font-size: 1.05rem; line-height: 1.5; }

.deflist { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.5rem; font-size: 1.05rem; }
.deflist dt { font: 600 .74rem/1.9 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.deflist dd { margin: 0; }
@media (max-width: 520px) { .deflist { grid-template-columns: 1fr; gap: 0; } .deflist dd { margin-bottom: .7rem; } }

/* 9  Prose ---------------------------------------------------------------- */
.prose { max-width: 70ch; }
.prose > * + * { margin-top: 1.05em; }
.prose p { margin-bottom: 0; }           /* the space between paragraphs is the margin-top above; a rule that set every margin to nought here once closed the paragraphs up */
.prose :where(li, td, dd, blockquote, .callout) > p { margin-top: 0; }
.prose :where(li, td, dd, blockquote, .callout) > p + p { margin-top: .7em; }
.prose h2 { margin-top: 2.4em; padding-top: 1.1rem; border-top: 1px solid var(--line); scroll-margin-top: 1.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.9em; scroll-margin-top: 1.5rem; }
.prose h4 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; margin-bottom: 0; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--gold-700); }
.prose blockquote { margin-inline: 0; padding-left: 1.4rem; border-left: 3px solid var(--gold); font-style: italic; color: #2a3442; }
.prose table { font-size: 1rem; margin-top: 1.4em; }
.prose th, .prose td, .table th, .table td { text-align: left; padding: .7rem .9rem .7rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th, .table th { font: 600 .74rem/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--navy); }
.prose sup a { text-decoration: none; font-family: var(--sans); font-size: .8em; }
.prose .dropcap::first-letter { float: left; font: 500 4.1rem/.82 var(--serif); padding: .28rem .5rem 0 0; color: var(--navy); }
.scroll-x { overflow-x: auto; }
.signature { font-style: italic; text-align: right; color: var(--muted); }

.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.with-aside > .prose { max-width: none; }
.aside { position: sticky; top: 1.5rem; border-top: 3px solid var(--navy); padding-top: 1.1rem; font-size: 1.02rem; }
.aside h2 { font: 600 .76rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 .8rem; }
.aside ul { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.aside li { border-bottom: 1px solid var(--line-soft); }
.aside li a { display: block; padding: .55rem 0; color: var(--navy); text-decoration: none; line-height: 1.3; }
.aside li a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
@media (max-width: 960px) { .with-aside { grid-template-columns: 1fr; } .aside { position: static; } }

/* 10 The Journal ---------------------------------------------------------- */
.issue-feature { display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.25rem); align-items: start; }
.issue-cover { width: 100%; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--cream-deep); aspect-ratio: 3 / 4; object-fit: cover; }
@media (max-width: 700px) { .issue-feature { grid-template-columns: 1fr; } .issue-cover { max-width: 240px; } }

.article-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.article-list > li { border-bottom: 1px solid var(--line); padding: 1.15rem 0 1.2rem; display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: 0 .9rem; }
.article-list__n { font: 500 1.35rem/1.25 var(--serif); color: var(--gold-700); font-feature-settings: "lnum"; }
.article-list h3 { font-size: 1.28rem; line-height: 1.25; margin: 0 0 .3rem; }
.article-list h3 a { color: var(--navy); text-decoration: none; }
.article-list h3 a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }
.article-list__meta { font: 400 .9rem/1.45 var(--sans); color: var(--muted); margin: 0; }
.article-list__links { margin: .55rem 0 0; display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; font: 600 .78rem var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.article-list__links a { color: var(--navy); text-decoration: none; border-bottom: 1px solid var(--gold); }
.article-list__links a:hover { border-bottom-color: var(--navy); }

.issue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: clamp(1.1rem, 2.4vw, 1.75rem); }
.issue-card { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 1.1rem; border: 1px solid var(--line); padding: 1.1rem; background: var(--paper); transition: box-shadow .18s, transform .18s; }
.issue-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.issue-card img { width: 96px; aspect-ratio: 3 / 4; object-fit: cover; border: 1px solid var(--line); background: var(--cream-deep); }
.issue-card h3 { font-size: 1.22rem; margin: .45rem 0 .3rem; }
.issue-card h3 a { color: var(--navy); text-decoration: none; }
.issue-card h3 a::after { content: ""; position: absolute; inset: 0; }
.issue-card p { margin: 0; font-size: .98rem; line-height: 1.42; color: #3c4654; }
.issue-card .when { font: 400 .84rem var(--sans); color: var(--muted); margin-bottom: .35rem; }

.abstract { background: var(--cream); border: 1px solid var(--line-soft); border-left: 4px solid var(--gold); padding: 1.35rem 1.5rem 1.45rem; }
.abstract h2 { font: 600 .78rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 .7rem; border: 0; padding: 0; }
.abstract p:last-child { margin-bottom: 0; }

.docs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.docs li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.docs__label { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.docs__type { flex: none; font: 600 .66rem var(--sans); letter-spacing: .1em; color: var(--claret); border: 1px solid var(--line); background: var(--cream); padding: .5rem .4rem; min-width: 2.6rem; text-align: center; }
.docs small { display: block; font: 400 .84rem var(--sans); color: var(--muted); }

.flow { display: grid; gap: .9rem; margin: 0; padding: 0; list-style: none; counter-reset: flow; }
.flow > li { counter-increment: flow; display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 0 1rem; border: 1px solid var(--line); border-left: 4px solid var(--navy); background: var(--paper); padding: 1rem 1.2rem; }
.flow > li::before { content: counter(flow); font: 500 1.9rem/1 var(--serif); color: var(--gold-700); font-feature-settings: "lnum"; }
.flow h3 { font-size: 1.2rem; margin: 0 0 .25rem; }
.flow p { margin: 0; font-size: 1.04rem; line-height: 1.5; color: #3c4654; }
.verdict--accept { color: var(--ok); font-weight: 600; }
.verdict--reject { color: var(--bad); font-weight: 600; }
.verdict--arbitrate { color: var(--warn); font-weight: 600; }

/* 11 The Press ------------------------------------------------------------ */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: clamp(1.25rem, 2.6vw, 2rem) clamp(1rem, 2.2vw, 1.6rem); list-style: none; margin: 0; padding: 0; }
.shelf--row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.book { position: relative; display: flex; flex-direction: column; }
.book__stand { display: block; position: relative; width: 100%; aspect-ratio: 2 / 3; }
.book__cover { display: block; position: absolute; left: 0; bottom: 0; width: auto; height: auto; max-width: 100%; max-height: 100%; border: 1px solid rgba(5, 34, 67, .18); border-radius: 1px 3px 3px 1px; background: var(--cream-deep); box-shadow: 0 1px 2px rgba(5, 34, 67, .14), 0 8px 18px rgba(5, 34, 67, .12); transition: transform .18s, box-shadow .18s; }
.book:hover .book__cover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(5, 34, 67, .16), 0 16px 30px rgba(5, 34, 67, .18); }
.book__title { font: 600 1.02rem/1.25 var(--serif); margin: .8rem 0 .2rem; color: var(--navy); }
.book__title a { color: inherit; text-decoration: none; }
.book__title a::after { content: ""; position: absolute; inset: 0; }
.book__title a:focus-visible { outline: 0; }
.book:has(a:focus-visible) .book__cover { outline: 3px solid var(--gold); outline-offset: 3px; }
.book__sub { font-size: .92rem; line-height: 1.3; color: var(--muted); margin: 0 0 .35rem; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.book__meta { font: 400 .82rem/1.4 var(--sans); color: var(--muted); margin: auto 0 0; padding-top: .2rem; }
.book__price { color: var(--navy); font-weight: 600; }

/* A cloth binding for titles that have no cover image yet */
.cloth { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 9% 9% 7% 12%; color: #ead7a4; border-radius: 1px 3px 3px 1px; position: relative; overflow: hidden; container-type: inline-size;
  background: linear-gradient(135deg, color-mix(in srgb, var(--cloth, var(--navy)) 86%, #fff), var(--cloth, var(--navy))); box-shadow: 0 1px 2px rgba(5, 34, 67, .14), 0 8px 18px rgba(5, 34, 67, .12); transition: transform .18s, box-shadow .18s; }
.book:hover .cloth { transform: translateY(-4px); }
.cloth::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5%; background: linear-gradient(90deg, rgba(0, 0, 0, .36), rgba(0, 0, 0, 0)); }
.cloth > span:first-child { display: block; }
.cloth__series, .cloth__rule, .cloth__title, .cloth__author, .cloth__imprint { display: block; }
.cloth__series { font: 600 4.2cqw/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; opacity: .85; }
.cloth__rule { border-block: 1px solid currentColor; height: 4px; margin: 5% 0 7%; opacity: .8; }
.cloth__title { font: 600 8cqw/1.18 var(--serif); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 7; line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.cloth__author { font: italic 400 6cqw/1.2 var(--serif); margin-top: 6%; opacity: .95; }
.cloth__imprint { font: 600 4cqw/1 var(--sans); letter-spacing: .24em; text-align: center; opacity: .8; }
.cloth--revivals { --cloth: #6f4a1c; } .cloth--enlightenment { --cloth: #1d2c4c; } .cloth--method { --cloth: #4d4562; }
.cloth--history, .cloth--law { --cloth: #6a2330; } .cloth--medicine, .cloth--lifesci { --cloth: #1f4a44; }

.field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: clamp(1rem, 2.2vw, 1.5rem); list-style: none; margin: 0; padding: 0; }
.field { position: relative; display: block; border: 1px solid var(--line); background: var(--paper); text-decoration: none; color: var(--navy); transition: box-shadow .18s, transform .18s; }
.field:hover { box-shadow: var(--shadow); transform: translateY(-2px); color: var(--navy); }
.field img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--parchment); }
.field__name { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; padding: .7rem .9rem; border-top: 1px solid var(--line); font: 600 1.05rem/1.2 var(--serif); }
.field__n { font: 400 .8rem var(--sans); color: var(--muted); white-space: nowrap; }

.filters { display: flex; flex-wrap: wrap; gap: .7rem; align-items: end; margin-bottom: 1rem; padding: 1rem; background: var(--cream); border: 1px solid var(--line-soft); }
.filters label { display: grid; gap: .3rem; font: 600 .7rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); flex: 1 1 160px; min-width: 0; }
.filters label.grow { flex: 2 1 260px; }
.countline { font-style: italic; color: var(--muted); margin: 0 0 1.5rem; }

.series { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); padding-block: 2.25rem; border-top: 1px solid var(--line); align-items: start; scroll-margin-top: 1rem; }
.series h2 { font-size: 1.6rem; }
.series__blurb { color: #3c4654; margin: .6rem 0 0; }
.series__count { font: 600 .74rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-700); margin: .9rem 0 0; }
@media (max-width: 820px) { .series { grid-template-columns: 1fr; } }

.bookpage { display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); gap: clamp(1.75rem, 5vw, 4rem); align-items: start; }
.bookpage__side { display: grid; gap: 1.25rem; position: sticky; top: 1.5rem; }
.bookpage__side .book__stand { max-width: 320px; aspect-ratio: auto; }
.bookpage__side .book__cover { position: static; max-height: none; width: 100%; }
.bookpage__side .cloth { aspect-ratio: 2 / 3; height: auto; }
.bookpage h1 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.bookpage__sub { font: 400 clamp(1.15rem, 1.8vw, 1.4rem)/1.35 var(--serif); color: var(--muted); margin: .7rem 0 0; }
.bookpage__by { font-size: 1.25rem; margin: 1.1rem 0 0; }
.bookpage__desc { margin-top: 1.6rem; font-size: 1.2rem; max-width: 62ch; }
@media (max-width: 760px) { .bookpage { grid-template-columns: 1fr; } .bookpage__side { position: static; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); align-items: start; } }
@media (max-width: 480px) { .bookpage__side { grid-template-columns: 1fr; } .bookpage__side .book__stand { max-width: 220px; } }

.orderbox { border: 1px solid var(--line); border-top: 3px solid var(--navy); background: var(--paper); padding: 1.15rem 1.2rem 1.25rem; }
.orderbox h2 { font: 600 .76rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 .7rem; }
.fmt { display: flex; align-items: center; gap: .65rem; padding: .55rem 0; border-bottom: 1px solid var(--line-soft); font: 400 .98rem var(--sans); }
.fmt input { accent-color: var(--navy); width: 1.05rem; height: 1.05rem; margin: 0; }
.fmt label { flex: 1; display: flex; justify-content: space-between; gap: .75rem; cursor: pointer; }
.fmt__price { font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; }
.fmt--static { color: var(--muted); }
.orderbox .button { margin-top: 1rem; }
.orderbox__note { font: 400 .84rem/1.45 var(--sans); color: var(--muted); margin: .85rem 0 0; }
.orderbox__alt { display: block; margin-top: .6rem; font: 600 .8rem var(--sans); }

/* 12 Forms and the till --------------------------------------------------- */
.field-row { display: grid; gap: .35rem; margin-bottom: 1rem; }
.field-row > label, .field-label { font: 600 .74rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.input, .select, .textarea, .filters input, .filters select { width: 100%; font: 400 1rem/1.3 var(--sans); color: var(--ink); background: var(--paper); border: 1px solid #c9c2b0; border-radius: var(--radius); padding: .68rem .8rem; }
.textarea { min-height: 9rem; resize: vertical; }
.input:focus, .select:focus, .textarea:focus, .filters input:focus, .filters select:focus { outline: 0; border-color: var(--navy); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 45%, transparent); }
.input[aria-invalid="true"] { border-color: var(--bad); }
.hint { font: 400 .84rem/1.4 var(--sans); color: var(--muted); margin: 0; }
.error { font: 600 .88rem/1.4 var(--sans); color: var(--bad); min-height: 1.3em; margin: 0; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 520px) { .duo { grid-template-columns: 1fr; } }

.till { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 860px) { .till { grid-template-columns: 1fr; } }
.summary { border: 1px solid var(--line); border-top: 3px solid var(--navy); background: var(--paper); padding: 1.25rem; display: grid; gap: 1rem; }
.summary__item { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 1rem; align-items: start; }
.summary__item .book__stand { aspect-ratio: auto; }
.summary__item .book__cover { position: static; width: 100%; max-height: none; box-shadow: none; }
.summary__item .cloth { aspect-ratio: 2 / 3; height: auto; box-shadow: none; }
.summary__title { font: 600 1.08rem/1.25 var(--serif); color: var(--navy); margin: 0 0 .2rem; }
.summary__meta { font: 400 .86rem/1.4 var(--sans); color: var(--muted); margin: 0; }
.sumline { display: flex; justify-content: space-between; gap: 1rem; font: 400 .98rem var(--sans); font-variant-numeric: tabular-nums; }
.sumline--total { border-top: 1px solid var(--line); padding-top: .8rem; font-weight: 700; font-size: 1.1rem; color: var(--navy); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.seg button { border: 0; background: var(--paper); color: var(--muted); padding: .5rem .9rem; font: 600 .78rem var(--sans); letter-spacing: .06em; }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }

.paybox { border: 1px solid var(--line); background: var(--paper); }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; border: 0; border-right: 1px solid var(--line); background: var(--cream); color: var(--muted); padding: 1rem .75rem; font: 600 .8rem var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.tabs button:last-child { border-right: 0; }
.tabs button[aria-selected="true"] { background: var(--paper); color: var(--navy); box-shadow: inset 0 3px 0 var(--gold); }
.tabpanel { padding: clamp(1.1rem, 3vw, 1.75rem); }
.pix { display: grid; gap: 1.1rem; justify-items: center; text-align: center; }
.pix__qr { background: #fff; padding: 12px; border: 1px solid var(--line); line-height: 0; }
.pix__code { width: 100%; font: 400 .78rem/1.4 var(--mono); padding: .7rem; border: 1px solid var(--line); background: var(--cream); resize: none; border-radius: var(--radius); }
.order-receipt { text-align: center; display: grid; gap: .8rem; justify-items: center; padding: clamp(1.5rem, 4vw, 2.5rem); border: 1px solid var(--line); border-top: 3px solid var(--ok); }
.order-receipt__ref { font: 600 1.1rem var(--mono); color: var(--gold-700); letter-spacing: .04em; }

/* 13 Search --------------------------------------------------------------- */
.results { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.results li { padding: 1.1rem 0 1.15rem; border-bottom: 1px solid var(--line); }
.results h2 { font-size: 1.3rem; margin: .25rem 0 .25rem; }
.results h2 a { color: var(--navy); text-decoration: none; }
.results h2 a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }
.results p { margin: 0; color: #3c4654; font-size: 1.04rem; line-height: 1.45; }
.results .kind { font: 600 .7rem var(--sans); letter-spacing: .13em; text-transform: uppercase; color: var(--gold-700); }

/* 14 Utilities ------------------------------------------------------------ */
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .95rem; }
.sans { font-family: var(--sans); }
.nowrap { white-space: nowrap; }
.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 2rem; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 1rem !important; } .mt-2 { margin-top: 2rem !important; } .mt-3 { margin-top: 3rem !important; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 1rem !important; } .mb-2 { margin-bottom: 2rem !important; }
.maxw { max-width: 70ch; }
.frame { border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); }
.embed { position: relative; width: 100%; border: 1px solid var(--line); background: var(--cream); box-shadow: var(--shadow); }
.embed iframe { display: block; width: 100%; height: min(82vh, 900px); min-height: 560px; border: 0; }
audio { width: 100%; }

/* 15 Print ---------------------------------------------------------------- */
@media print {
  .utility, .primary, .nav-toggle, .searchbox, .site-footer, .skip-link, .button-row, .aside { display: none !important; }
  body { font-size: 11.5pt; color: #000; }
  a { color: #000; text-decoration: none; }
  .band, .page-hero__row, .hero__row { padding-block: 1rem; }
  .page-hero, .hero, .band--paper { background: none; border: 0; }
}

/* Late additions ----------------------------------------------------------- */
.prose .flow, .prose .docs, .prose .steps, .prose .chips, .prose .article-list { padding-left: 0; }
.prose .flow > li + li, .prose .docs li + li { margin-top: 0; }
.prose .deflist { margin-top: 1.4em; }
.primary__item.is-dismissed > .primary__menu { display: none !important; }

/* 16 Collections: references, episodes, embedded instruments ---------------- */
.refs { padding-left: 1.6em; font: 400 .97rem/1.5 var(--sans); color: #333d4b; }
.prose .refs li + li { margin-top: .55em; }
.refs li { overflow-wrap: anywhere; scroll-margin-top: 1.5rem; }
.refs li:target { background: var(--warn-bg); outline: 6px solid var(--warn-bg); }
.refs cite, .prose cite { font-style: italic; }

.episodes { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.episode { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(1rem, 3vw, 2rem); padding: 1.75rem 0; border-bottom: 1px solid var(--line); scroll-margin-top: 1.5rem; }
.episode:not(:has(.episode__img)) { grid-template-columns: minmax(0, 1fr); }
.episode__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--line); background: var(--parchment); }
.episode__date { font: 600 .74rem/1.3 var(--sans); letter-spacing: .13em; text-transform: uppercase; color: var(--gold-700); margin: 0 0 .4rem; }
.episode__title { font-size: 1.5rem; margin: 0 0 .5rem; }
.episode__text { margin: 0 0 1rem; color: #333d4b; max-width: 68ch; }
.episode audio { display: block; width: 100%; max-width: 560px; }
@media (max-width: 640px) { .episode { grid-template-columns: minmax(0, 1fr); } .episode__img { max-width: 320px; } }

.embed--dark { background: var(--navy-950); border-color: var(--navy); }
@media (max-width: 760px) { .hide-narrow { display: none !important; } }
@media (min-width: 761px) { .show-narrow { display: none !important; } }
