.buy-error { color: var(--accent); font-size: 14px; min-height: 1em; margin: 8px 0 0; }
@font-face { font-family: "Young Serif"; src: url("fonts/young-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("fonts/work-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("fonts/work-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("fonts/work-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --paper: #f5f1ea;
  --card: #ece6db;
  --ink: #23201c;
  --muted: #6f675c;
  --rule: #d9d1c3;
  --accent: #9a4a2a;
  --serif: "Young Serif", Georgia, serif;
  --sans: "Work Sans", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1b1916;
    --card: #26231f;
    --ink: #ece6dc;
    --muted: #a39a8c;
    --rule: #3a352e;
    --accent: #e0916b;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--sans); }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1, h2, h3, .wordmark { font-family: var(--serif); font-weight: 400; letter-spacing: -0.005em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.12; margin: 0 0 16px; }
h2 { font-size: 1.45rem; line-height: 1.2; margin: 0 0 20px; }
h3 { font-size: 1.1rem; margin: 0 0 6px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* header */
.preview-bar { background: #e8c95a; color: #2a2300; text-align: center; font-size: 13px; padding: 5px 16px; }
.notice { background: var(--ink); color: var(--paper); text-align: center; font-size: 13px; padding: 7px 16px; letter-spacing: .02em; }
.site-header { border-bottom: 1px solid var(--rule); }
.header-row { display: flex; align-items: baseline; justify-content: space-between; padding-top: 22px; padding-bottom: 14px; gap: 16px; }
.wordmark { font-size: 1.7rem; text-decoration: none; }
.wordmark.small { font-size: 1.3rem; margin-bottom: 8px; }
.util { display: flex; gap: 20px; font-size: 14px; }
.util a, .catnav a { text-decoration: none; color: var(--muted); }
.util a:hover, .catnav a:hover { color: var(--ink); }
.catnav { display: flex; gap: 26px; padding-bottom: 14px; font-size: 15px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.catnav a { color: var(--ink); }

/* home */
.intro { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: end; padding-top: 48px; padding-bottom: 56px; }
.intro-text p { color: var(--muted); max-width: 44ch; margin: 0 0 22px; }
.intro-img { display: block; text-decoration: none; }
.intro-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--card); }
.caption { display: block; font-size: 13px; color: var(--muted); margin-top: 8px; }
.link { font-weight: 500; }
.block { padding-top: 40px; padding-bottom: 40px; border-top: 1px solid var(--rule); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 20px; }
.tile { display: flex; flex-direction: column; gap: 2px; text-decoration: none; }
.tile-img { aspect-ratio: 1; background: var(--card); overflow: hidden; margin-bottom: 8px; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.tile:hover .tile-img img { transform: scale(1.03); }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.how p { color: var(--muted); margin: 0; font-size: 15px; }
.num { display: block; font-family: var(--serif); color: var(--accent); margin-bottom: 8px; }

/* product grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 32px 20px; }
.card { text-decoration: none; display: block; }
.card-img { position: relative; aspect-ratio: 1; background: var(--card); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img .alt { position: absolute; inset: 0; opacity: 0; transition: opacity .25s ease; }
.card:hover .card-img .alt { opacity: 1; }
.card-text { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; font-size: 15px; }
.card-name { line-height: 1.35; }
.card-price { white-space: nowrap; color: var(--muted); }

/* category */
.crumbs { font-size: 13px; color: var(--muted); padding: 18px 0 8px; }
.crumbs a { color: var(--muted); }
.cat-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding: 8px 0 28px; border-bottom: 1px solid var(--rule); margin-bottom: 28px; flex-wrap: wrap; }
.cat-head p { margin: 0; max-width: 52ch; }
.sort, .field { display: flex; flex-direction: column; gap: 6px; }
select {
  font: inherit; font-size: 15px; color: var(--ink); background: transparent; border: 1px solid var(--rule);
  border-radius: 2px; padding: 9px 12px; min-width: 220px;
}

/* product */
.product { display: grid; grid-template-columns: 7fr 5fr; gap: 56px; padding: 8px 0 48px; }
.main-img { aspect-ratio: 1; background: var(--card); overflow: hidden; }
.main-img img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.thumb { width: 72px; height: 72px; padding: 0; border: 1px solid transparent; background: var(--card); cursor: pointer; }
.thumb.on { border-color: var(--ink); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.buybox { position: sticky; top: 24px; align-self: start; }
.buybox h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 10px; }
.price { font-size: 1.35rem; font-weight: 500; }
.buybox .small { margin: 4px 0 0; }
.blurb { margin: 20px 0 0; font-size: 1.05rem; }
.points { margin: 14px 0 0; padding-left: 18px; color: var(--muted); font-size: 15px; }
.points li { margin-bottom: 4px; }
.desc p { max-width: 64ch; }
.demo { width: 100%; max-width: 420px; aspect-ratio: 1; background: var(--card); display: block; }
.buybox .field { margin-top: 24px; }
.variants { display: flex; flex-wrap: wrap; gap: 8px; }
.variant {
  display: flex; align-items: center; gap: 8px; font: inherit; font-size: 14px; color: var(--ink);
  background: transparent; border: 1px solid var(--rule); border-radius: 2px; padding: 5px 10px 5px 5px; cursor: pointer;
}
.variant img { width: 32px; height: 32px; object-fit: cover; }
.variant:not(:has(img)) { padding-left: 10px; }
.variant.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.eta { margin: 12px 0 20px; font-size: 15px; }
.btn {
  display: block; width: 100%; font: inherit; font-weight: 500; letter-spacing: .02em; background: var(--ink);
  color: var(--paper); border: 0; border-radius: 2px; padding: 15px 20px; cursor: pointer;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.buybox .btn + .small { margin-top: 12px; }
.details { border-top: 1px solid var(--rule); padding: 36px 0; }
.hl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 48px; max-width: 980px; }
.hl p { margin: 0; color: var(--muted); }
.specs { border-collapse: collapse; width: 100%; max-width: 720px; font-size: 15px; }
.specs th, .specs td { text-align: left; padding: 10px 16px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.specs th { font-weight: 500; width: 40%; }
.details p { max-width: 70ch; }

/* text pages */
.prose { max-width: 760px; padding-top: 36px; padding-bottom: 64px; }
.prose h2 { font-size: 1.25rem; margin: 36px 0 10px; }
.prose p, .prose li { color: var(--ink); }
.prose .lede { font-size: 1.15rem; }
.prose ol, .prose ul { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose .specs { margin: 8px 0 16px; }
.form-box { border: 1px solid var(--rule); padding: 8px 20px; }
mark.todo { background: #f3d36b; color: #2a2300; padding: 0 4px; }

/* footer */
.site-footer { border-top: 1px solid var(--rule); margin-top: 24px; padding: 44px 0 28px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid p { margin: 0; max-width: 34ch; }
.site-footer h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 500; margin: 6px 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 7px; }
.site-footer li a { text-decoration: none; }
.site-footer li a:hover { text-decoration: underline; }
.fineprint { color: var(--muted); font-size: 13px; margin-top: 36px; }

@media (max-width: 860px) {
  .intro, .product { grid-template-columns: 1fr; gap: 28px; }
  .intro { padding-top: 28px; }
  .buybox { position: static; }
  .how { grid-template-columns: 1fr; gap: 24px; }
  .hl-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 24px 14px; }
  .card-text { flex-direction: column; gap: 2px; font-size: 14px; }
  .util { display: none; }
  select { min-width: 0; width: 100%; }
}
