@font-face {
  font-family: 'Roboto Slab';
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
  src: url('/static/fonts/roboto-slab.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  src: url('/static/fonts/plex-sans.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('/static/fonts/plex-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('/static/fonts/plex-mono-500.woff2') format('woff2');
}

:root {
  --ink: #15111F;
  --surface: #1F1830;
  --surface-2: #251D3C;
  --text: #F1ECF9;
  --text-dim: #B7ADD1;
  --gold: #C9A34C;
  --gold-bright: #E3C374;
  --teal: #3CBDB4;
  --magenta: #D25497;
  --border: rgba(241,236,249,0.14);
  --page-bg: #15111F;
  --shadow: rgba(8,6,14,0.45);
}
@media (prefers-color-scheme: light) {
  :root {
    --ink: #211936; --surface: #FFFFFF; --surface-2: #EFE9F9;
    --text: #211936; --text-dim: #5B5175;
    --gold: #A6812E; --gold-bright: #8C6C22;
    --teal: #1C8B85; --magenta: #A23570;
    --border: rgba(33,25,54,0.14); --page-bg: #F6F2FB; --shadow: rgba(33,25,54,0.10);
  }
}
:root[data-theme="dark"] {
  --ink: #15111F; --surface: #1F1830; --surface-2: #251D3C;
  --text: #F1ECF9; --text-dim: #B7ADD1;
  --gold: #C9A34C; --gold-bright: #E3C374;
  --teal: #3CBDB4; --magenta: #D25497;
  --border: rgba(241,236,249,0.14); --page-bg: #15111F; --shadow: rgba(8,6,14,0.45);
}
:root[data-theme="light"] {
  --ink: #211936; --surface: #FFFFFF; --surface-2: #EFE9F9;
  --text: #211936; --text-dim: #5B5175;
  --gold: #A6812E; --gold-bright: #8C6C22;
  --teal: #1C8B85; --magenta: #A23570;
  --border: rgba(33,25,54,0.14); --page-bg: #F6F2FB; --shadow: rgba(33,25,54,0.10);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--page-bg);
  color: var(--text);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: 'Roboto Slab', Georgia, serif; font-weight: 900; text-wrap: balance; margin: 0; }
.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); font-weight: 500;
}
.num { font-variant-numeric: tabular-nums; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem); }

.cut { clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%); }
.cut-sm { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); }

header { border-bottom: 1px solid var(--border); background: var(--surface-2); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; padding-top: 0.9rem; padding-bottom: 0.9rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; }
.brand img { height: 30px; width: auto; }
.brand-word { font-family: 'Roboto Slab', Georgia, serif; font-weight: 900; font-size: 1.25rem; letter-spacing: -0.01em; }
.brand-word span { color: var(--gold); }
nav.links { display: flex; gap: 0.5rem clamp(0.9rem, 2.2vw, 2rem); font-size: 0.92rem; font-weight: 500; align-items: center; flex-wrap: wrap; }
nav.links a { text-decoration: none; color: var(--text-dim); transition: color 0.15s ease; }
nav.links a:hover, nav.links a:focus-visible { color: var(--gold); }
.cart-link { position: relative; }
.cart-count {
  background: var(--gold); color: var(--ink); font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem; font-weight: 500; border-radius: 999px; padding: 0.05rem 0.4rem; margin-left: 0.3rem;
}

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.4rem; font-family: 'IBM Plex Sans', sans-serif; font-weight: 600;
  font-size: 0.95rem; text-decoration: none; border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--gold-bright); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover, .btn-ghost:focus-visible { border-color: var(--teal); color: var(--teal); }
.btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

section.block { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section-head h1, .section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.section-head p { color: var(--text-dim); margin: 0.35rem 0 0; max-width: 52ch; }

.trust {
  background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 1.4rem 0;
}
.trust .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.trust p { margin: 0; font-size: 0.95rem; color: var(--text-dim); }
.trust p strong { color: var(--text); }
.trust-link {
  font-size: 0.88rem; font-weight: 600; text-decoration: none; color: var(--teal);
  display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap;
}
.trust-link:hover, .trust-link:focus-visible { color: var(--gold); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; }
.card { background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; }
.card-art { width: 100%; aspect-ratio: 5 / 7; overflow: hidden; background: var(--surface-2); }
.card-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.card-meta { font-family: 'IBM Plex Mono', monospace; font-size: 0.74rem; color: var(--text-dim); }
.card-name { font-family: 'Roboto Slab', Georgia, serif; font-weight: 700; font-size: 1.08rem; line-height: 1.2; text-decoration: none; color: var(--text); }
.card-price { font-family: 'IBM Plex Mono', monospace; font-weight: 500; font-size: 1.3rem; color: var(--gold); margin-top: auto; }
.card-links { display: flex; flex-direction: column; gap: 0.3rem; margin-top: 0.4rem; font-size: 0.82rem; }
.card-links a { text-decoration: none; font-weight: 600; }
.buy-direct { color: var(--text); }
.buy-direct:hover, .buy-direct:focus-visible { color: var(--gold); }
.buy-else { color: var(--text-dim); }
.buy-else:hover, .buy-else:focus-visible { color: var(--teal); }

table.lines { width: 100%; border-collapse: collapse; }
table.lines th, table.lines td { text-align: left; padding: 0.7rem 0.5rem; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
table.lines th { font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); font-weight: 500; }

.qty-input {
  width: 4rem; padding: 0.4rem 0.5rem; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); font-family: 'IBM Plex Mono', monospace;
}
.prose { max-width: 68ch; color: var(--text-dim); }
.prose h2 { color: var(--text); margin: 2rem 0 0.75rem; font-size: 1.3rem; }
.prose p { margin: 0 0 1rem; }

.error-banner {
  background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--magenta);
  padding: 1rem 1.25rem; margin-bottom: 2rem; font-size: 0.92rem;
}

footer { padding: 3rem 0 2.5rem; border-top: 1px solid var(--border); }
.foot-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; flex-wrap: wrap; }
.foot-brand { display: flex; gap: 0.75rem; align-items: center; }
.foot-brand img { height: 26px; width: auto; }
.foot-tag { color: var(--text-dim); font-size: 0.85rem; margin-top: 0.3rem; }
.foot-links { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.foot-links h4 {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim); margin: 0 0 0.7rem; font-weight: 500;
}
.foot-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.foot-links a { text-decoration: none; color: var(--text); font-size: 0.9rem; }
.foot-links a:hover, .foot-links a:focus-visible { color: var(--gold); }
.copyright { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: 0.8rem; color: var(--text-dim); }

/* The wordmark in the full logo is dark brown, so it always sits on a light
   panel - otherwise it disappears against the dark theme. */
.hero-logo { width: 100%; background: #FBF8F2; border-radius: 12px; padding: clamp(1rem, 3vw, 1.75rem); }

.narrow { max-width: 34rem; }
.lede { color: var(--text-dim); margin: 0 0 1.25rem; }
.stack { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.field { display: flex; flex-direction: column; gap: 0.35rem; width: 100%; font-size: 0.9rem; font-weight: 500; }
.text-input {
  width: 100%; padding: 0.75rem 0.9rem; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); font: inherit; font-size: 1rem;
}
.text-input:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.order-link { color: var(--gold); text-decoration: none; font-weight: 600; }
.order-link:hover, .order-link:focus-visible { color: var(--gold-bright); text-decoration: underline; }
.status {
  display: inline-block; font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 0.2rem 0.55rem; border: 1px solid var(--border); color: var(--text-dim); white-space: nowrap;
}
.status-shipped, .status-delivered { border-color: var(--teal); color: var(--teal); }
.status-refunded { border-color: var(--magenta); color: var(--magenta); }
.panel { background: var(--surface); border: 1px solid var(--border); padding: 1.1rem 1.25rem; margin-bottom: 1.75rem; }
.panel p { margin: 0.3rem 0 0.8rem; color: var(--text-dim); }
.order-foot { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; margin-top: 1.75rem; }
.address { color: var(--text-dim); margin: 0.4rem 0 0; }
.totals { display: grid; grid-template-columns: auto auto; gap: 0.35rem 2rem; margin: 0; min-width: 14rem; }
.totals dt { color: var(--text-dim); }
.totals dd { margin: 0; text-align: right; }
.totals .grand { font-weight: 600; color: var(--text); padding-top: 0.4rem; border-top: 1px solid var(--border); }
.totals dd.grand { color: var(--gold); }
.totals dd.refund { color: var(--magenta); }
.refund-panel { margin-top: 2rem; }
.refund-panel > strong { display: block; font-family: 'Roboto Slab', Georgia, serif; font-size: 1.05rem; }
.refund-panel details summary { cursor: pointer; color: var(--gold); font-weight: 600; margin-top: 0.6rem; }
.refund-panel details[open] summary { margin-bottom: 0.25rem; }
.refund-panel .stack { max-width: 36rem; }
.refund-panel .field textarea { min-height: 7rem; }
.refund-panel .hint { color: var(--text-dim); font-size: 0.85rem; margin: -0.4rem 0 0; }
.refund-panel .quoted { font-style: italic; white-space: pre-wrap; }
textarea.text-input { resize: vertical; font-family: inherit; }
@media (max-width: 640px) {
  table.lines-compact th:nth-child(3), table.lines-compact td:nth-child(3) { display: none; }
}

.hidden { display: none; }
.search-suggestion-row { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.5rem 0.85rem; cursor: pointer; font-size: 0.9rem; text-decoration: none; color: var(--text); }
.search-suggestion-row:hover, .search-suggestion-row:focus-visible { background: var(--surface-3, var(--surface-2)); color: var(--gold); }
.search-suggestion-meta { color: var(--text-dim); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
