* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  /* ink on paper */
  --bg: #ece6d6; --bg-2: #f6f1e3; --bg-3: #e2dbc8; --line: #141412;
  --dim: #77725f; --text: #2c2a25; --bright: #141412; --ink: #141412;
  --accent: #b9a6f0; --accent-ink: #141412; --moss: #4f6b3a;
  /* illustrations */
  --sky: #c9c0e6; --far: #9a8fc4; --mid: #5d538a; --near: #141412; --moon: #f6f1e3; --mist: #ece6d6; --lit: #f2c84b; --hatch: #141412;
  --tone: #7f73b5; --paper: #f6f1e3; --star: #f6f1e3; --reg: #8a6fe6; --void: #141412;
  --b: 2px solid var(--ink);
  --rule: 2px solid var(--line);
}
html { background: var(--bg); }
body { background: var(--bg); color: var(--text); font-family: 'Inter Tight', sans-serif; font-size: 14px; line-height: 1.5; position: relative; }
body::after { content: ''; position: fixed; inset: 0; pointer-events: none; opacity: .08; z-index: 100; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.85'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
.page { max-width: 1240px; margin: 0 auto; border-left: var(--rule); border-right: var(--rule); min-height: 100vh; background: var(--bg); }

/* proto banner */
.proto { background: var(--ink); color: var(--bg); font-size: 12px; padding: 6px 20px; text-align: center; }

/* nav */
nav.top { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-bottom: var(--rule); }
nav.top .logo { font-weight: 700; color: var(--ink); font-size: 16px; letter-spacing: -.3px; margin-right: 16px; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
nav.top .logo svg { width: 28px; height: 28px; }
nav.top .links { display: flex; gap: 20px; flex: 1; }
nav.top .links a:hover, nav.top .links a.on { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
nav.top .search { border: var(--b); width: 240px; background: var(--bg-2); }
nav.top .search input { width: 100%; background: none; border: 0; padding: 8px 12px; color: var(--ink); outline: none; }
nav.top .search input::placeholder { color: var(--dim); }
nav.top .side { padding: 8px 4px; }
nav.top .side:hover { text-decoration: underline; text-underline-offset: 4px; }
nav.top .cart { white-space: nowrap; border: var(--b); padding: 8px 14px; font-weight: 600; background: var(--accent); color: var(--accent-ink); transition: transform .12s, box-shadow .12s; }
nav.top .cart:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--ink); text-decoration: none; }

/* type */
.h-xl { font-weight: 600; font-size: clamp(40px, 5.2vw, 70px); line-height: .95; letter-spacing: -2.4px; color: var(--ink); }
.h-l { font-weight: 600; font-size: clamp(28px, 3.4vw, 42px); line-height: 1; letter-spacing: -1.2px; color: var(--ink); }
.h-m { font-weight: 600; font-size: 22px; letter-spacing: -.5px; color: var(--ink); }
.dim { color: var(--dim); }
.bright { color: var(--ink); }
.moss { color: var(--moss); }
.small { font-size: 12px; }

/* buttons */
.btn { display: inline-block; border: var(--b); color: var(--ink); padding: 10px 18px; background: var(--bg); cursor: pointer; font-weight: 600; transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--ink); }
.btn.solid { background: var(--accent); color: var(--accent-ink); }
.btn.wide { display: block; width: 100%; text-align: center; }
.link { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
.link:hover { background: var(--accent); }

/* chips */
.chips { display: flex; gap: 10px; padding: 16px 20px; border-bottom: var(--rule); flex-wrap: wrap; }
.chip { border: var(--b); padding: 5px 14px; color: var(--ink); font-weight: 500; transition: transform .12s, box-shadow .12s; background: var(--bg); }
.chip:hover, .chip.on { transform: translate(-2px, -2px); box-shadow: 2px 2px 0 var(--ink); }
.chip.on { background: var(--accent); color: var(--accent-ink); }

/* marquee band */
.band { border-bottom: var(--rule); overflow: hidden; white-space: nowrap; background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.band div { display: inline-block; padding: 10px 0; animation: run 40s linear infinite; }
.band span { margin: 0 22px; }
@keyframes run { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .band div { animation: none; } }

/* illustration slot */
.ph { background: var(--sky); position: relative; overflow: hidden; }
.ph > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ph .tag { position: absolute; left: 0; bottom: 0; background: var(--bg); border-top: var(--b); border-right: var(--b); padding: 3px 8px; font-size: 11px; color: var(--ink); z-index: 1; }

/* section header */
.sec-h { display: flex; justify-content: space-between; align-items: baseline; padding: 28px 20px 16px; }
.sec-h a { text-decoration: underline; text-underline-offset: 3px; }

/* product grid: Gumroad-style cards */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 0 20px 32px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.item { border: var(--b); background: var(--bg-2); display: flex; flex-direction: column; transition: transform .12s, box-shadow .12s; }
.item:hover { transform: translate(-4px, -4px); box-shadow: 4px 4px 0 var(--ink); }
.item .ph { aspect-ratio: 1; border-bottom: var(--b); }
.item .body { padding: 12px 14px; flex: 1; }
.item h3 { font-weight: 600; color: var(--ink); font-size: 15px; line-height: 1.2; }
.item .by { color: var(--dim); margin-top: 4px; font-size: 13px; }
.item .foot { display: flex; justify-content: space-between; align-items: center; border-top: var(--b); padding: 8px 14px; }
.price-tag { background: var(--accent); color: var(--accent-ink); font-weight: 600; padding: 1px 8px; border: var(--b); }
.rating { color: var(--dim); font-size: 13px; }

/* lists */
.rows { list-style: none; }
.rows li, .rows a.r { display: grid; gap: 24px; padding: 16px 20px; border-bottom: var(--rule); align-items: center; }
.rows a.r:hover { background: var(--bg-2); }

/* forms */
.field { display: block; margin-bottom: 16px; }
.field span { display: block; color: var(--dim); font-size: 12px; margin-bottom: 6px; }
.field input, .field textarea, .field select { width: 100%; background: var(--bg-2); border: var(--b); padding: 10px 12px; color: var(--ink); outline: none; }
.field input:focus, .field textarea:focus, .field select:focus { box-shadow: 3px 3px 0 var(--ink); }

/* footer */
footer { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; border-top: var(--rule); background: var(--bg-3); }
footer > div { padding: 24px 20px 48px; border-right: var(--rule); line-height: 1.9; }
footer > div:last-child { border-right: 0; }
footer .t { color: var(--ink); font-weight: 600; margin-bottom: 8px; }
footer a:hover { text-decoration: underline; }

/* split layouts */
.split { display: grid; grid-template-columns: 7fr 5fr; border-bottom: var(--rule); }
.split > * { min-width: 0; }
.split > :first-child { border-right: var(--rule); }
.pad { padding: 20px; }
.pad-l { padding: 56px 20px 40px; }
.bb { border-bottom: var(--rule); }
.status-open { color: var(--moss); font-weight: 600; }
.status-closed { color: var(--dim); }

/* risograph hero scenes (riso.js) */
.riso .reg { mix-blend-mode: multiply; transform: translate(7px, -5px); opacity: .85; }
.riso .reg .hatch, .riso .reg .noreg { display: none; }
.riso .tw { animation: tw 3.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes tw { 50% { opacity: .25; transform: scale(.6); } }
.riso .flick { animation: flick 5s steps(1) infinite; }
@keyframes flick { 40% { opacity: .55; } 42% { opacity: 1; } 71% { opacity: .7; } 73% { opacity: 1; } }
.riso .flame { animation: flame .35s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
.riso .f2 { animation-delay: .17s; }
@keyframes flame { to { transform: scale(.9, 1.08) skewX(3deg); } }
.riso .drift { animation: drift 18s ease-in-out infinite alternate; }
.riso .d2 { animation-duration: 24s; }
@keyframes drift { to { transform: translateX(-80px); } }
@media (prefers-reduced-motion: reduce) { .riso .tw, .riso .flick, .riso .flame, .riso .drift { animation: none; } }

@media (max-width: 1060px) { nav.top .search { display: none; } nav.top .links { justify-content: flex-start; } }

@media (max-width: 860px) {
  nav.top .links, nav.top .search, nav.top .side { display: none; }
  nav.top .logo { flex: 1; }
  .split { grid-template-columns: 1fr; }
  .split > :first-child { border-right: 0; border-bottom: var(--rule); }
  .grid, .grid.three { grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 12px 20px; }
  footer { grid-template-columns: 1fr 1fr; }
  footer > div:nth-child(2n) { border-right: 0; }
}

/* ---------- open layout: no structural rules, space and tints instead ---------- */
/* The page spans the whole window; --gut centres a 1184px content column. Bands and footer bleed to the window edge. */
html.open { --line: transparent; }
html.open body { overflow-x: clip; }
html.open .page { border: 0; max-width: none; --gut: max(28px, calc((100vw - 1184px) / 2)); padding: 0 var(--gut); }
html.open .proto, html.open .band, html.open footer { margin-left: calc(-1 * var(--gut)); margin-right: calc(-1 * var(--gut)); }
html.open .proto { padding-left: var(--gut); padding-right: var(--gut); }
html.open nav.top { padding: 18px 0; }
html.open .pad, html.open .pad-l { padding-left: 0; padding-right: 0; }
html.open .split { gap: 40px; }
html.open .sec-h { padding-left: 0; padding-right: 0; }
html.open .grid { padding-left: 0; padding-right: 0; }
html.open .chips { padding-left: 0; padding-right: 0; }
html.open .rows li, html.open .rows a.r { padding-left: 0; padding-right: 0; }
html.open .rows a.r { padding: 14px 16px; background: var(--bg-2); margin-bottom: 8px; }
html.open .rows a.r:hover { background: var(--bg-3); }
html.open footer { margin-top: 72px; padding: 0 var(--gut); }
html.open footer > div { padding-left: 0; }
html.open .toggle-layout b { background: var(--accent); color: var(--ink); }
.toggle-layout { margin-left: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.toggle-layout b { font-weight: 600; padding: 0 4px; }
@media (max-width: 860px) {
  html.open .page { --gut: 16px; }
  html.open footer { margin-top: 48px; }
}
/* open layout: per-page touches */
html.open .hero .r { margin: 12px 0 32px; }
html.open .cats { gap: 14px; margin-top: 28px; }
html.open .cats a { background: var(--bg-2); }
html.open .cats a:hover { background: var(--bg-3); }
html.open .artists .rows { padding-top: 40px; }
html.open .filters { background: var(--bg-2); padding: 4px 16px; align-self: start; margin-top: 20px; }
html.open .layout { gap: 28px; }
html.open .threads, html.open .menu { background: var(--bg-2); }
html.open aside.side { background: var(--bg-3); }
html.open .stats { gap: 14px; margin-top: 20px; }
html.open .stats > div { background: var(--bg-2); }
html.open th, html.open td { border-bottom: 1px solid var(--bg-3); }
html.open .gallery { gap: 12px; }
html.open .buy .block { background: var(--bg-2); margin-bottom: 12px; }
html.open .how { gap: 14px; }
html.open .how > div { background: var(--bg-2); }
html.open .art { gap: 20px; }
html.open .card { border: var(--b); }
html.open .work, html.open .portfolio { gap: 12px; }
