/* PriceUWant "Corner Shop": warm paper, hand-written price tags, real typefaces. */
:root {
  --paper: #FBF6EC; --kraft: #F1E4CC; --surface: #FFFDF8; --ink: #2B2118; --muted: #66574A; --line: #E4D6BD;
  --tomato: #B23A1A; --leaf: #2C6A3F; --leaf-soft: #E3F0E3; --teal: #1D5C70; --mustard: #E3A72F; --mustard-soft: #FBEBC4;
  --c-sold: #2C6A3F; --c-ebay: #1D5C70; --c-amazon: #C27C0E;
  --festive: #A8460B; --festive-soft: #FFF1D6;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Segoe Print", cursive;
  --r-card: 14px 14px 18px 12px; --r-ctl: 10px;
  --shadow: 0 1px 0 rgba(43, 33, 24, .06), 0 6px 18px -10px rgba(43, 33, 24, .35);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1E1914; --kraft: #362B1F; --surface: #28211A; --ink: #F3EADB; --muted: #C4B49E; --line: #45392B;
    --tomato: #FF8A65; --leaf: #86CF98; --leaf-soft: #22352A; --teal: #7CC3D6; --mustard: #F0BC55; --mustard-soft: #3F3218;
    --c-sold: #86CF98; --c-ebay: #7CC3D6; --c-amazon: #F0BC55;
    --festive: #F6B25A; --festive-soft: #35271A;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 8px 20px -12px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
  .art { filter: saturate(.9) brightness(.94); }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 var(--sans); }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--serif); font-variation-settings: "SOFT" 100, "opsz" 72; font-weight: 650; letter-spacing: -0.01em; line-height: 1.12; }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0.5em 0 0.3em; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); margin: 1.6em 0 0.5em; }
h3 { font-size: 1.15rem; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.note { font-family: var(--hand); font-size: 1.35rem; font-weight: 600; color: var(--tomato); line-height: 1; }
.tag { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.02em; }
.tnum, .price, .stats b, .table td { font-variant-numeric: tabular-nums lining-nums; }

/* Header */
.top { background: var(--paper); border-bottom: 2px dashed var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 8px 20px; min-height: 68px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 750; font-size: 1.45rem; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.logo svg { width: 30px; height: 30px; transform: rotate(-12deg); }
.logo em { font-style: normal; color: var(--tomato); }
.top nav { display: flex; gap: 4px 6px; flex-wrap: wrap; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 600; padding: 6px 10px; border-radius: 999px; }
.top nav a:hover, .top nav a[aria-current] { background: var(--kraft); }
.demo-banner { background: var(--mustard-soft); color: var(--ink); text-align: center; padding: 7px 16px; font-size: 0.9rem; border-bottom: 1px solid var(--line); }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: 40px 0 16px; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 3.9rem); margin-top: 0; }
.hero h1 .swash { position: relative; white-space: nowrap; }
.hero h1 .swash svg { position: absolute; left: -2%; bottom: -0.18em; width: 104%; height: 0.32em; }
.hero p.lead { color: var(--muted); font-size: 1.15rem; max-width: 34em; }
.hero-art svg { width: 100%; height: auto; display: block; }
.hero.small { display: block; padding-top: 56px; max-width: 760px; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; padding-top: 24px; } .hero-art { max-width: 300px; margin: 0 auto; } }

/* Search */
.searchbox { display: flex; gap: 8px; margin: 18px 0 8px; flex-wrap: wrap; }
.searchbox input, .searchbox select { flex: 1 1 220px; }
.searchbox.big { background: var(--surface); padding: 8px; border: 2px solid var(--ink); border-radius: 16px; box-shadow: 4px 4px 0 var(--ink); flex-wrap: nowrap; }
.searchbox.big input { border: 0; background: transparent; font-size: 1.05rem; min-width: 0; }
.searchbox.big input:focus { outline: none; }
.searchbox.big:focus-within { box-shadow: 4px 4px 0 var(--tomato); }
.hints { font-size: 0.9rem; color: var(--muted); }
.hints a { color: var(--ink); }
input, select, textarea { font: inherit; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); }
input:focus-visible, select:focus-visible { outline: 3px solid var(--mustard); outline-offset: 1px; }
button, .btn { font: inherit; font-weight: 700; padding: 11px 20px; border: 2px solid var(--ink); border-radius: var(--r-ctl); background: var(--tomato); color: #FFF; cursor: pointer; display: inline-block; text-align: center; text-decoration: none; box-shadow: 2px 2px 0 var(--ink); transition: transform .08s, box-shadow .08s; }
button:hover, .btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
button:active, .btn:active { transform: translate(1px, 1px); box-shadow: 0 0 0 var(--ink); }
@media (prefers-color-scheme: dark) { button, .btn { color: #1E1914; } }
.btn.ghost { background: var(--surface); color: var(--ink); }
button.link { background: none; color: var(--teal); padding: 0; font-weight: 600; border: 0; box-shadow: none; }
.notice { background: var(--leaf-soft); padding: 12px 16px; border-radius: var(--r-ctl); border: 1.5px solid var(--leaf); }

/* Section heads */
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; }
.head h2 { margin-bottom: 0.2em; }
.head a { font-weight: 600; }
section { margin-bottom: 8px; }

/* Product grid and cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; margin-top: 12px; }
@media (max-width: 560px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-card); color: var(--ink); text-decoration: none; overflow: hidden; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease, border-color .15s; }
.card:hover { transform: translateY(-3px) rotate(-0.3deg); border-color: var(--ink); text-decoration: none; }
.card .pic { position: relative; aspect-ratio: 1 / 1; background: var(--kraft); border-bottom: 1.5px solid var(--line); overflow: hidden; }
.card .pic svg, .card .pic img { width: 100%; height: 100%; display: block; object-fit: contain; }
.card .body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; flex: 1; }
.card .kicker { font-size: 0.78rem; color: var(--muted); }
.card .name { font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .buy { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.card .ref { font-size: 0.82rem; color: var(--muted); }
.card .src { font-size: 0.8rem; color: var(--muted); }
.card .ribbon { position: absolute; bottom: 10px; left: -4px; background: var(--mustard); color: #2B2118; font-weight: 700; font-size: 0.8rem; padding: 3px 10px 3px 12px; border: 1.5px solid #2B2118; border-radius: 0 6px 6px 0; transform: rotate(-3deg); z-index: 1; }
.card.sample { border-style: dashed; box-shadow: none; }
.card.text-only .body { padding-top: 16px; }

/* Prices: tabular figures, small raised $ and cents, current price in weight + colour */
.price { font-family: var(--sans); font-weight: 700; font-size: 1.45rem; line-height: 1; color: var(--ink); white-space: nowrap; }
.price .cur { font-size: 0.62em; vertical-align: 0.42em; margin-right: 1px; }
.price .cents { font-size: 0.62em; vertical-align: 0.42em; }
.price.deal { color: var(--tomato); }
.was-wrap { color: var(--muted); font-size: 0.85rem; }
.was { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1.5px; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.save { display: inline-block; font-size: 0.8rem; font-weight: 700; color: var(--leaf); background: var(--leaf-soft); border-radius: 6px; padding: 1px 7px; white-space: nowrap; }

/* Hang tag: used for the big price on item pages and the watch form */
.hangtag { position: relative; background: var(--kraft); border: 2px solid var(--ink); border-radius: 6px 18px 18px 6px; padding: 18px 20px 18px 40px; box-shadow: 3px 3px 0 var(--ink); }
.hangtag::before { content: ""; position: absolute; left: 14px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); }
.hangtag .price { font-size: 2.4rem; }
.hangtag .label { font-size: 0.85rem; color: var(--muted); display: block; margin-bottom: 4px; }

/* Chips and category tiles */
.tiles { display: flex; flex-wrap: wrap; gap: 8px; }
.tile { background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 15px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.tile:hover { border-color: var(--ink); }
.tile.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tile span { color: inherit; opacity: .7; font-size: 0.85em; margin-left: 4px; }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 12px; }
@media (max-width: 560px) { .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.shelf a { display: flex; flex-direction: column; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-card); overflow: hidden; color: var(--ink); text-decoration: none; font-weight: 700; box-shadow: var(--shadow); transition: transform .15s; }
.shelf a:hover { transform: translateY(-3px) rotate(0.4deg); border-color: var(--ink); }
.shelf a svg { width: 100%; height: auto; aspect-ratio: 4 / 3; display: block; border-bottom: 1.5px solid var(--line); }
.shelf a span { padding: 10px 12px; line-height: 1.25; }
.shelf a small { display: block; font-weight: 400; color: var(--muted); font-size: 0.8rem; margin-top: 2px; }
.deal-tiles { margin-top: 16px; }

/* How it works */
.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin: 44px 0 12px; padding: 24px; background: var(--kraft); border-radius: 22px 14px 26px 16px; }
.how div { display: grid; grid-template-columns: 48px 1fr; gap: 0 12px; align-items: start; }
.how i { grid-row: span 2; width: 44px; height: 44px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; font: 700 1.6rem/1 var(--hand); font-style: normal; background: var(--surface); transform: rotate(-6deg); }
.how b { font-family: var(--serif); font-size: 1.1rem; }
.how p { color: var(--muted); margin: 2px 0 0; }

/* Festival banner */
.festival { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; padding: 14px 18px; margin: 18px 0; border-radius: 16px; background: var(--festive-soft); border: 2px solid var(--festive); color: var(--ink); text-decoration: none; position: relative; overflow: hidden; }
.festival b { font-family: var(--serif); font-size: 1.2rem; color: var(--festive); }
.festival .note { color: var(--festive); }
.festival:hover { border-color: var(--ink); text-decoration: none; }

/* Item page */
.crumbs { color: var(--muted); margin: 22px 0 0; font-size: 0.92rem; }
.item-top { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 8px; }
@media (max-width: 820px) { .item-top { grid-template-columns: 1fr; } .item-top .pic { max-width: 360px; } }
.item-top .pic { border: 1.5px solid var(--line); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow); }
.item-top .pic svg { display: block; width: 100%; height: auto; }
.item-top h1 { margin-top: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; }
.stats div { padding: 12px 14px; border-right: 1px dashed var(--line); }
.stats div:last-child { border-right: 0; }
.stats span { display: block; color: var(--muted); font-size: 0.82rem; }
.stats b { font-size: 1.25rem; }
.ranges { display: flex; gap: 4px; }
.ranges a { padding: 4px 11px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 600; }
.ranges a.on { background: var(--ink); color: var(--paper); }
.chart { width: 100%; height: auto; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-ctl); }
.chart .grid { stroke: var(--line); }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
.chart .target { stroke: var(--tomato); stroke-dasharray: 4 4; }
.legend { color: var(--muted); font-size: 0.88rem; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.k { display: inline-block; width: 16px; height: 4px; border-radius: 2px; margin-left: 8px; }
.k.sold { background: var(--c-sold); } .k.ebay { background: var(--c-ebay); } .k.amazon { background: var(--c-amazon); }

.watch { display: flex; flex-direction: column; gap: 12px; }
.watch h2 { margin: 0; font-size: 1.35rem; }
.watch label { display: flex; flex-direction: column; gap: 4px; font-size: 0.92rem; font-weight: 600; }
.watch .toggle { display: flex; flex-direction: column; gap: 6px; }
.watch .toggle label { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.watch input[type=number], .watch input[type=email] { background: var(--surface); }
.out-buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.live { padding-left: 18px; font-size: 0.92rem; }
.inline { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin: 24px 0; }
.inline label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }

/* Lists and tables */
.rollout { list-style: none; padding: 0; display: grid; gap: 10px; }
.rollout a { display: flex; gap: 14px; align-items: center; padding: 10px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-card); color: var(--ink); text-decoration: none; }
.rollout a:hover { border-color: var(--ink); }
.rollout a svg { width: 72px; height: 72px; border-radius: 10px; flex: none; }
.rollout span { color: var(--muted); font-size: 0.9rem; display: block; }
.rollout li.lead a { border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; }
.table th { font-size: 0.82rem; text-transform: none; color: var(--muted); font-weight: 600; background: var(--kraft); }
.table th, .table td { text-align: left; padding: 11px 12px; border-bottom: 1px dashed var(--line); }
@media (max-width: 640px) { .table { display: block; overflow-x: auto; } }

.subnav { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 14px; }
.subnav a { padding: 6px 13px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-size: 0.92rem; font-weight: 600; text-decoration: none; }
.subnav a.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.dealwrap { display: flex; flex-direction: column; gap: 8px; }
.rank { font: 700 1.8rem/1 var(--hand); color: var(--tomato); }
.vote { align-self: flex-start; background: var(--surface); color: var(--ink); padding: 5px 12px; font-size: 0.88rem; box-shadow: 2px 2px 0 var(--ink); }
.lede { color: var(--muted); font-size: 1.08rem; max-width: 720px; }
.browse { margin: 16px 0; }
.filters { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 0; }
.facts div { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-ctl); padding: 12px 14px; }
.facts dt { font-weight: 700; font-family: var(--serif); }
.facts dd { margin: 4px 0 0; color: var(--muted); font-size: 0.94rem; }
.cat-head { display: flex; gap: 16px; align-items: center; }
.cat-head svg { width: 84px; height: 84px; border-radius: 16px; border: 1.5px solid var(--line); flex: none; transform: rotate(-3deg); }

/* Celebrations */
.celebration-art svg { border: 2px solid var(--ink); border-radius: 28px 18px 30px 20px; box-shadow: 5px 5px 0 var(--ink); max-width: 380px; margin-left: auto; }
.shelf.cal a.on { border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
@media (max-width: 760px) { .celebration-art { max-width: 220px; } }
.hero .btn { margin: 6px 6px 0 0; }


.foot { border-top: 2px dashed var(--line); margin-top: 56px; padding: 24px 16px 44px; color: var(--muted); font-size: 0.88rem; }
.foot a { color: var(--muted); }
.foot .sign { font-family: var(--hand); font-size: 1.4rem; color: var(--ink); margin: 0 0 8px; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .top nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .top nav a { white-space: nowrap; }
  .card .body { padding: 10px 11px 12px; }
  .price { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
