/* GradingStamps — "red ink on worksheet paper"
   Palette: paper #FCFBF7 · ink #26304A · stamp red #C8102E · rule blue #C7D8E8
            manila #F3ECDA · gold #E4A93C                                      */

:root {
  --paper: #FCFBF7;
  --paper-line: rgba(103, 140, 177, 0.12);
  --card: #FFFFFF;
  --manila: #F3ECDA;
  --manila-edge: #E0D5B8;
  --ink: #26304A;
  --ink-soft: #5A6480;
  --stamp: #C8102E;
  --stamp-dark: #8E0B20;
  --stamp-soft: rgba(200, 16, 46, 0.07);
  --rule: #C7D8E8;
  --gold: #B97F14;
  --good: #2E6E4C;
  --shadow: 0 2px 10px rgba(38, 48, 74, 0.08);
  --display: "Alfa Slab One", "Rockwell", "Roboto Slab", serif;
  --body: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  --typewriter: "Special Elite", "Courier New", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  background-image: repeating-linear-gradient(
    to bottom, transparent 0, transparent 35px,
    var(--paper-line) 35px, var(--paper-line) 36px);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.65;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--stamp); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
p { max-width: 68ch; }

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
header.site {
  background: var(--card);
  border-bottom: 2px solid var(--rule);
}
.masthead {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px 0 12px;
}
.logo {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  line-height: 1;
}
.lg-word {
  font-family: var(--display);
  font-size: 19px;
  color: var(--ink);
  letter-spacing: 0.44em;
  margin-right: -0.44em; /* balance trailing letter-space */
  text-align: center;
}
.lg-tiles { display: flex; gap: 4px; }
.lg-tiles i {
  font-style: normal;
  font-family: var(--display);
  font-size: 18px;
  color: #FFF;
  background: var(--stamp);
  width: 28px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  box-shadow: 0 2px 0 var(--stamp-dark);
}
.lg-tiles i:nth-child(odd) { transform: rotate(-3deg); }
.lg-tiles i:nth-child(even) { transform: rotate(2.5deg); }
.lg-rule {
  height: 6px;
  border-radius: 2px;
  background:
    repeating-linear-gradient(to right,
      transparent 0 7px, var(--manila-edge) 7px 8.5px,
      transparent 8.5px 15px, #C9B583 15px 16.5px) ,
    linear-gradient(var(--manila), #E2D3AC);
  border: 1px solid var(--manila-edge);
}
.byline {
  font-family: var(--typewriter);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-soft);
}
nav.main {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
nav.main a {
  font-weight: 800;
  font-size: 14.5px;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 7px 11px;
  border-radius: 8px;
}
nav.main a:hover { color: var(--ink); background: var(--stamp-soft); }
nav.main a[aria-current="page"] { color: var(--stamp); }
nav.main a.cart {
  background: var(--stamp);
  color: #FFF;
  border-radius: 999px;
  padding: 7px 16px;
  box-shadow: 0 2px 0 var(--stamp-dark);
}
nav.main a.cart:hover { background: var(--stamp-dark); }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 36px;
  align-items: center;
  padding: 52px 0;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  margin: 0 0 16px;
  text-wrap: balance;
}
.hero h1 em { color: var(--stamp); font-style: normal; }
.hero .sub { font-size: 18px; color: var(--ink-soft); margin: 0 0 22px; }
.hero-art {
  background: var(--manila);
  border: 2px dashed var(--manila-edge);
  border-radius: 50%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.hero-art svg, .hero-art img { max-height: 100%; }

.btn {
  display: inline-block;
  background: var(--stamp);
  color: #FFF;
  font-family: var(--body);
  font-weight: 800;
  font-size: 15.5px;
  padding: 12px 24px;
  border: 0;
  border-radius: 9px;
  box-shadow: 0 3px 0 var(--stamp-dark);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--stamp-dark); }
.btn.ghost {
  background: var(--card);
  color: var(--ink);
  border: 2px solid var(--rule);
  box-shadow: none;
}
.btn.ghost:hover { border-color: var(--ink-soft); background: var(--card); }

.trust { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.trust span {
  font-family: var(--typewriter);
  font-size: 12px;
  border: 1.5px solid var(--rule);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 4px 13px 2px;
  background: var(--card);
}

/* ---------- cart ---------- */
.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 999px;
  background: #FFF;
  color: var(--stamp);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.btn.add-to-cart.added { background: var(--good); box-shadow: 0 2px 0 #1E4A33; }

.page.cartpage { max-width: 1020px; }
.cart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 26px;
  align-items: start;
  margin-top: 14px;
}
.cart-list { display: flex; flex-direction: column; gap: 12px; }
.cart-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  background: var(--card);
  border: 1.5px solid var(--rule);
  border-radius: 12px;
  padding: 12px 16px 12px 12px;
  box-shadow: var(--shadow);
}
.cr-thumb {
  width: 86px;
  height: 72px;
  background: #FFF;
  border: 1.5px dashed var(--rule);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
}
.cr-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cr-name b { font-size: 15.5px; line-height: 1.3; display: block; }
.cr-id {
  display: block;
  font-family: var(--typewriter);
  font-size: 11.5px;
  color: var(--ink-soft);
  margin-top: 3px;
}
.cr-controls { display: flex; align-items: center; gap: 16px; }
.cr-qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
  overflow: hidden;
}
.qbtn {
  width: 30px;
  height: 30px;
  border: 0;
  background: none;
  color: var(--stamp);
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
}
.qbtn:hover { background: var(--stamp-soft); }
.qnum {
  min-width: 26px;
  text-align: center;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: 14.5px;
}
.cr-line {
  font-family: var(--display);
  font-size: 17px;
  min-width: 62px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.cr-remove {
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-size: 20px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  line-height: 1;
}
.cr-remove:hover { color: #FFF; background: var(--stamp); }

.cart-side {
  background: var(--manila);
  border: 1.5px solid var(--manila-edge);
  border-radius: 12px;
  padding: 18px 20px;
  position: sticky;
  top: 16px;
}
.cs-line {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--ink-soft);
  padding-bottom: 10px;
  border-bottom: 1.5px dashed var(--manila-edge);
}
.cs-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0 14px;
  font-size: 15px;
}
.cs-total b { font-family: var(--display); font-size: 27px; }
.cs-checkout { width: 100%; text-align: center; }
.cs-note {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 12px 0 10px;
}
.cs-keep { font-weight: 800; font-size: 14px; }

.cart-empty { text-align: center; padding: 26px 0 10px; }
.cart-empty img { opacity: 0.85; }
.cart-empty h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 26px;
  margin: 14px 0 6px;
}
.cart-empty p { margin: 0 auto 20px; color: var(--ink-soft); }

@media (max-width: 800px) {
  .cart-grid { grid-template-columns: 1fr; }
  .cart-side { position: static; }
}
@media (max-width: 560px) {
  .cart-row { grid-template-columns: 64px minmax(0, 1fr); }
  .cr-thumb { width: 64px; height: 56px; }
  .cr-controls { grid-column: 1 / -1; justify-content: space-between; }
}

/* ---------- section headings ---------- */
.stampchip {
  display: inline-block;
  font-family: var(--typewriter);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--stamp);
  border: 2px dashed var(--stamp);
  border-radius: 7px;
  padding: 4px 14px 2px;
  transform: rotate(-1.6deg);
  background: var(--stamp-soft);
}
h2.sec {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(24px, 3.5vw, 32px);
  margin: 14px 0 22px;
  text-wrap: balance;
}
section { padding: 40px 0; }

/* ---------- category tiles ---------- */
.cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.cat-tile {
  position: relative;
  display: block;
  background: var(--manila);
  border: 1.5px solid var(--manila-edge);
  border-radius: 12px;
  padding: 18px 20px 16px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
}
.cat-tile:hover { border-color: var(--stamp); }
.cat-tile b { font-size: 17px; display: block; }
.cat-tile span { font-size: 13.5px; color: var(--ink-soft); }
.cat-tile .count {
  position: absolute;
  top: -10px;
  right: 12px;
  font-family: var(--typewriter);
  font-size: 11.5px;
  background: var(--card);
  border: 1.5px solid var(--rule);
  border-radius: 999px;
  padding: 2px 10px 0;
  color: var(--ink-soft);
}

/* ---------- product grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 18px;
}
.pcard {
  background: var(--card);
  border: 1.5px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.pcard:hover { border-color: var(--ink-soft); }
.pcard .art {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 170px;
  padding: 16px;
  background: #FFF;
  border-bottom: 1.5px dashed var(--rule);
}
.pcard .art img { max-height: 100%; object-fit: contain; }
.pcard .info {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.pcard .cat {
  font-family: var(--typewriter);
  font-size: 10.5px;
  letter-spacing: 1px;
  color: var(--ink-soft);
}
.pcard .pname {
  font-weight: 800;
  font-size: 15px;
  line-height: 1.3;
  color: var(--ink);
  text-decoration: none;
}
.pcard .pname:hover { color: var(--stamp); }
.pcard .size { font-size: 12.5px; color: var(--ink-soft); }
.pcard .buyrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}
.pcard .price { font-family: var(--display); font-size: 18px; }
.btn.small { font-size: 13px; padding: 8px 14px; box-shadow: 0 2px 0 var(--stamp-dark); }

/* ---------- filter rail ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 26px; }
.filters a {
  font-weight: 800;
  font-size: 13.5px;
  text-decoration: none;
  color: var(--ink-soft);
  background: var(--card);
  border: 1.5px solid var(--rule);
  border-radius: 999px;
  padding: 6px 16px;
}
.filters a:hover { border-color: var(--ink-soft); color: var(--ink); }
.filters a.on { background: var(--stamp); border-color: var(--stamp); color: #FFF; }

/* ---------- product page ---------- */
.product {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 40px;
  align-items: start;
  padding: 44px 0;
}
.product .stage {
  background: var(--card);
  border: 1.5px solid var(--rule);
  border-radius: 14px;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  box-shadow: var(--shadow);
}
.product h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  margin: 0 0 6px;
  text-wrap: balance;
}
.specline {
  font-family: var(--typewriter);
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.product .price {
  font-family: var(--display);
  font-size: 30px;
  margin: 6px 0 16px;
}
.product .desc { color: var(--ink); }
.buy-panel {
  background: var(--manila);
  border: 1.5px solid var(--manila-edge);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 18px 0;
}
.buy-panel form { margin: 0 0 10px; }
.mini-facts { list-style: none; padding: 0; margin: 12px 0 0; }
.mini-facts li {
  font-size: 13.5px;
  color: var(--ink-soft);
  padding-left: 22px;
  position: relative;
  margin-bottom: 4px;
}
.mini-facts li::before {
  content: "✓";
  position: absolute;
  left: 2px;
  color: var(--good);
  font-weight: 800;
}
.truesize {
  margin-top: 26px;
  background: var(--card);
  border: 1.5px dashed var(--rule);
  border-radius: 12px;
  padding: 18px 20px;
}
.truesize .lbl {
  font-family: var(--typewriter);
  font-size: 11.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.truesize .box { overflow-x: auto; padding: 4px 0; }
.related { padding-bottom: 60px; }

/* ---------- content pages ---------- */
.page { padding: 44px 0 60px; max-width: 760px; }
.page h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 40px);
  margin: 10px 0 18px;
  text-wrap: balance;
}
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 800; font-size: 14px; margin-bottom: 5px; }
.field input, .field textarea, .field select {
  width: 100%;
  font-family: var(--body);
  font-size: 15px;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  padding: 10px 12px;
}
.field textarea { min-height: 130px; resize: vertical; }
.notice {
  background: var(--stamp-soft);
  border-left: 4px solid var(--stamp);
  border-radius: 0 10px 10px 0;
  padding: 12px 18px;
  margin: 20px 0;
  font-size: 14.5px;
}

/* ---------- story strip ---------- */
.story {
  background: var(--card);
  border-top: 2px solid var(--rule);
  border-bottom: 2px solid var(--rule);
}
.story .cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}
.story h3 { font-family: var(--display); font-weight: 400; font-size: 19px; margin: 0 0 8px; }
.story p { font-size: 14.5px; color: var(--ink-soft); margin: 0; }

/* ---------- footer ---------- */
footer.site {
  background: var(--ink);
  color: #D9DCE8;
  margin-top: 40px;
  padding: 36px 0 28px;
  font-size: 14px;
}
footer.site a { color: #FFF; }
footer.site .cols {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: space-between;
}
footer.site .maker {
  font-family: var(--typewriter);
  font-size: 12px;
  letter-spacing: 1.5px;
  margin-top: 18px;
  color: #9AA3BC;
}

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; padding: 36px 0; }
  .hero-art { max-width: 260px; margin: 0 auto; }
  .product { grid-template-columns: 1fr; }
  .masthead { padding: 12px 0 10px; gap: 8px; }
  .lg-word { font-size: 13px; }
  .lg-tiles i { width: 19px; height: 21px; font-size: 12.5px; }
  .lg-rule { height: 5px; }
  .byline { display: none; }
  nav.main { margin-left: 0; width: 100%; gap: 0; }
  nav.main a { padding: 6px 8px; font-size: 13.5px; }
  nav.main a.cart { margin-left: auto; padding: 6px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.cs-err {
  color: var(--stamp);
  font-size: 13.5px;
  margin: 10px 0 0;
}
