/* Security Zines, design 2: the light sketchnote zine. White paper with a faint dot grid,
   navy marker ink, every topic in its own bright marker colour, bubble lettering for titles. */

@font-face {
  font-family: "Shantell";
  src: url("/fonts/shantell-sans.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --paper-2: #f5f7fb;
  --ink: #16213e;
  --ink-2: #4a5470;
  --rule-soft: #d9deea;

  /* topic markers: bright for borders and fills, tint for grounds, deep for text on white */
  --sky: #2b9bf4;      --sky-t: #e4f2fe;      --sky-d: #0b6fc2;
  --violet: #8b5cf6;   --violet-t: #efe8ff;   --violet-d: #6534d6;
  --mint: #12b886;     --mint-t: #dbf6ec;     --mint-d: #077052;
  --orange: #ff8a1f;   --orange-t: #ffecd9;   --orange-d: #9a4b00;
  --magenta: #ec3a78;  --magenta-t: #fde3ec;  --magenta-d: #c01d58;
  --lime: #7ac70c;     --lime-t: #edf8dc;     --lime-d: #3d6b00;
  --yellow: #ffd43b;   --yellow-t: #fff6cf;
  --red-d: #c92a2a;

  --gap: clamp(12px, 1.3vw, 20px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t: 0.4s;
  --font: "Shantell", "Comic Neue", "Segoe Print", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  color-scheme: light;
  scrollbar-color: var(--ink-2) var(--paper-2);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 1px 1px, rgba(22, 33, 62, 0.13) 1px, transparent 1.4px) 0 0 / 22px 22px,
    var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(16px, 0.35vw + 14.5px, 18px);
  line-height: 1.55;
}

::selection { background: var(--yellow); color: var(--ink); }
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
a:hover { text-decoration-color: var(--c, var(--yellow)); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88em; background: var(--paper-2); padding: 0.05em 0.35em; border-radius: 5px; }

:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }

.skip { position: fixed; left: -999px; top: 0; z-index: 100; background: var(--yellow); color: var(--ink); padding: 0.5em 1em; }
.skip:focus { left: 12px; top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { width: min(1320px, 100% - 2 * clamp(16px, 4vw, 56px)); margin-inline: auto; }

/* topic colour binding: --c (bright), --c-t (tint), --c-d (deep, for text on white) */
.t-web { --c: var(--sky); --c-t: var(--sky-t); --c-d: var(--sky-d); }
.t-identity { --c: var(--violet); --c-t: var(--violet-t); --c-d: var(--violet-d); }
.t-network { --c: var(--mint); --c-t: var(--mint-t); --c-d: var(--mint-d); }
.t-cloud { --c: var(--orange); --c-t: var(--orange-t); --c-d: var(--orange-d); }
.t-devsecops { --c: var(--magenta); --c-t: var(--magenta-t); --c-d: var(--magenta-d); }
.t-linux { --c: var(--lime); --c-t: var(--lime-t); --c-d: var(--lime-d); }

/* ---------- header ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
}
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--ink); filter: url(#pen); }
.top .wrap { display: flex; align-items: center; gap: clamp(10px, 2vw, 28px); padding: 12px 0; }
.top nav { margin-left: auto; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: clamp(1.15rem, 1vw + 0.9rem, 1.45rem); text-decoration: none; white-space: nowrap; letter-spacing: -0.01em; }
.wordmark img { width: 34px; height: 34px; flex: none; }
.wordmark b { color: var(--magenta-d); margin-left: -9px; }
.wordmark small { margin-left: -9px; }
.wordmark small { font-size: 0.6em; color: var(--ink-2); font-weight: 600; }
.nav { display: flex; gap: clamp(2px, 0.8vw, 12px); margin: 0 0 0 auto; padding: 0; list-style: none; font-weight: 700; }
.nav a {
  display: inline-block;
  padding: 5px 12px 6px;
  border-radius: 999px;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.nav a[aria-current="page"] { border-color: var(--ink); background: var(--yellow-t); filter: url(#pen); }

/* ---------- buttons, chips, prices ---------- */

.btn {
  --bg: var(--yellow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  padding: 0.55em 1.15em 0.6em;
  border: 2px solid transparent;
  border-radius: 999px;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  isolation: isolate;
  transition: transform 0.18s var(--ease);
}
.btn::before { content: ""; position: absolute; inset: -2px; z-index: -1; border: 2px solid var(--ink); border-radius: inherit; background: var(--bg); filter: url(#pen); transition: background-color var(--t) var(--ease); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn--ghost { --bg: var(--paper); }
.btn--sm { padding: 0.38em 0.9em 0.42em; font-size: 0.92em; }
a .logo-full { display: none; } /* span Gumroad's script appends to links it takes over */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 3px;
  border-radius: 999px;
  background: var(--c-t, var(--paper-2));
  color: var(--c-d, var(--ink));
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--ink-2)); }
a.chip:hover { text-decoration: underline; }
.chip.fmt { background: var(--paper); border: 1.5px solid var(--rule-soft); color: var(--ink-2); }
.chip.fmt::before { display: none; }

.price {
  position: relative;
  isolation: isolate;
  display: inline-block;
  padding: 2px 10px 3px;
  font-weight: 800;
  transform: rotate(-2deg);
}
.price::before { content: ""; position: absolute; inset: 0; z-index: -1; border: 2px dashed var(--ink); border-radius: 8px; background: var(--yellow-t); filter: url(#pen); }

/* ---------- headings ---------- */

h1, h2, h3 { margin: 0; line-height: 1.05; letter-spacing: -0.015em; text-wrap: balance; }

/* bubble lettering from the pastel zines: bright face, navy outline, darker offset edge */
.bubble {
  --face: var(--yellow);
  --o: 2.5px;
  color: var(--face);
  text-shadow:
    var(--o) 0 var(--ink), calc(-1 * var(--o)) 0 var(--ink), 0 var(--o) var(--ink), 0 calc(-1 * var(--o)) var(--ink),
    calc(var(--o) * .7) calc(var(--o) * .7) var(--ink), calc(var(--o) * -.7) calc(var(--o) * .7) var(--ink),
    calc(var(--o) * .7) calc(var(--o) * -.7) var(--ink), calc(var(--o) * -.7) calc(var(--o) * -.7) var(--ink),
    4px 5px 0 var(--ink);
}

.display {
  font-weight: 800;
  font-size: clamp(3rem, 6.6vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  font-variation-settings: "BNCE" 45;
}
.display .b1 { --face: var(--sky); }
.display .b2 { --face: var(--yellow); }

.head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 22px; margin: 0 0 clamp(16px, 2vw, 24px); }
.head h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 800; font-variation-settings: "BNCE" 35; }
.head p { margin: 0; color: var(--ink-2); max-width: 56ch; }
.head .more { margin-left: auto; }

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr);
  gap: clamp(20px, 2.6vw, 36px) clamp(24px, 4vw, 56px);
  align-items: start;
  padding: clamp(20px, 2.4vw, 32px) 0 0;
}
.hero > .member { grid-column: 2; grid-row: 1; }
.hero > .hero-wall { grid-column: 1 / -1; }
.hero-copy { position: relative; isolation: isolate; }
.hero-copy::before {
  /* the soft tinted blob behind the title, as on the pastel zines */
  content: "";
  position: absolute;
  z-index: -1;
  left: -5%;
  top: -14%;
  width: 78%;
  height: 64%;
  background: var(--lime-t);
  border-radius: 46% 54% 58% 42% / 52% 40% 60% 48%;
}
.lede { margin: clamp(14px, 1.6vw, 20px) 0 0; font-size: clamp(1.12rem, 0.6vw + 0.95rem, 1.4rem); max-width: 36ch; }
.byline { margin: 12px 0 0; color: var(--ink-2); }
.byline a { color: var(--ink); font-weight: 700; }
.handle-note {
  display: inline-block;
  position: relative;
  isolation: isolate;
  font-weight: 600;
  font-size: 0.82em;
  padding: 4px 10px 5px;
  margin-top: 10px;
  transform: rotate(-1.2deg);
}
.handle-note::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--yellow); border: 2px solid var(--ink); border-radius: 10px; filter: url(#pen); }
.handle-note s { opacity: 0.65; }
.handle-note a { font-weight: 800; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

.hero-wall { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }


/* topic jump chips under the hero */
.topic-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(28px, 3vw, 40px); align-items: center; }
.topic-jump .lbl { font-weight: 700; color: var(--ink-2); margin-right: 4px; }
.topic-jump .chip { font-size: 0.92rem; padding: 4px 12px 5px; }

/* ---------- sketchnote boxes ---------- */

.box {
  position: relative;
  isolation: isolate;
  border-radius: 26px 32px 24px 34px / 30px 24px 34px 26px;
  background: var(--paper);
  padding: clamp(20px, 2.4vw, 34px);
}
/* the outline is drawn, not ruled: a 4px marker line pushed through an SVG wobble filter (see base layout) */
.box::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 4px solid var(--c, var(--ink));
  border-radius: inherit;
  filter: url(#marker);
  pointer-events: none;
}
.box > .label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: clamp(14px, 1.8vw, 20px); }
.box > .label h2 { font-size: clamp(1.5rem, 2.2vw, 2rem); font-weight: 800; color: var(--c-d, var(--ink)); }
.box > .label p { margin: 0; color: var(--ink-2); }
.box > .label p::before { content: "("; }
.box > .label p::after { content: ")"; }
.box > .label .more { margin-left: auto; }
.shelves { display: grid; gap: clamp(28px, 4vw, 44px); }
.box .tile .chip:not(.fmt), .t-page .tile .chip:not(.fmt) { display: none; } /* the box already names the topic */

/* ---------- membership ---------- */

.member { --c: var(--ink); background: var(--yellow-t); display: flex; flex-direction: column; gap: 10px; }
.hero .member { padding-block: clamp(14px, 1.6vw, 20px); }
.member h2 { font-size: clamp(1.6rem, 2.1vw, 2.1rem); font-weight: 800; }
.member .sub { margin: -4px 0 0; font-weight: 700; font-size: 1.08em; }
.perks { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 5px; counter-reset: p; line-height: 1.35; }
.perks li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; counter-increment: p; }
.perks li::before {
  content: counter(p);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
  font-size: 0.8rem;
  margin-top: 1px;
}
.member .terms { margin: 4px 0 0; color: var(--ink-2); font-size: 0.92em; }
.member .btn { align-self: flex-start; font-size: 1.08em; }
.sticker {
  position: absolute;
  top: -20px;
  right: 22px;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--magenta);
  color: var(--paper);
  font-weight: 800;
  font-size: 0.72rem;
  line-height: 1.05;
  text-align: center;
  transform: rotate(10deg);
  filter: url(#pen);
}

/* ---------- tiles ---------- */

.tile { position: relative; display: flex; flex-direction: column; min-width: 0; text-decoration: none; color: inherit; }
/* the whole poster is always shown (title included): contain, never crop, on the topic's tint */
.tile .media {
  position: relative;
  aspect-ratio: var(--ar, 1);
  border-radius: 12px;
  background: var(--c-t, var(--paper-2));
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.tile .media::after { content: ""; position: absolute; inset: 0; border: 2px solid var(--ink); border-radius: inherit; filter: url(#pen); pointer-events: none; }
.tile .media img { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); object-fit: contain; filter: drop-shadow(0 2px 4px rgba(22, 33, 62, 0.25)); }
.tile .cap { padding: 9px 2px 0; display: grid; gap: 5px; justify-items: start; }
.tile h3 { font-size: clamp(1rem, 0.35vw + 0.92rem, 1.15rem); font-weight: 700; line-height: 1.2; }
.tile .sub { color: var(--ink-2); font-size: 0.88em; line-height: 1.35; }
.tile .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tile:focus-visible .media { transform: translateY(-4px) rotate(-0.8deg); box-shadow: 0 10px 22px -10px rgba(22, 33, 62, 0.55); }
.tile:focus-visible { outline: none; }
.tile:focus-visible .media { outline: 3px solid var(--sky); outline-offset: 3px; }

/* every grid uses one 4:3 cell so mixed portrait/landscape posters line up */
.grid {
  --cols: 2;
  display: grid;
  gap: calc(var(--gap) * 1.5) var(--gap);
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
}
@media (min-width: 620px) { .grid { --cols: 3; } }
@media (min-width: 1000px) { .grid { --cols: 4; } }

/* ---------- shop cards: equal heights, price + action on one line ---------- */

.shop { --cols: 1; display: grid; gap: var(--gap); grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
@media (min-width: 620px) { .shop { --cols: 2; } }
@media (min-width: 1000px) { .shop { --cols: 3; } }
.zine {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 8px;
  padding: 12px 12px 14px;
  border-radius: 18px;
  position: relative;
  isolation: isolate;
}
.zine::before { content: ""; position: absolute; inset: 0; z-index: -1; border: 2px solid var(--ink); border-radius: inherit; background: var(--paper); filter: url(#marker); }
.zine.off::before { background: var(--paper-2); }
.zine .tile .media { --ar: 16 / 10; }
.zine .tile.port .media { --ar: 1; }
.zine .tile .cap { display: none; }
.zine h3 { font-size: 1.2rem; font-weight: 800; padding: 0 4px; }
.zine h3 a { text-decoration: none; }
.zine h3 a:hover { text-decoration: underline; }
.zine p { margin: 0; padding: 0 4px; color: var(--ink-2); }
.zine .row { display: flex; align-items: center; gap: 10px; padding: 4px 4px 0; min-height: 44px; }
.zine .row .btn { margin-left: auto; }
.zine .soon { color: var(--red-d); font-weight: 700; font-size: 0.92em; }

.extras {
  margin-top: var(--gap);
  padding: 14px 20px;
  border-radius: 14px;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
}
.extras::before { content: ""; position: absolute; inset: 0; z-index: -1; border: 2px dashed var(--ink-2); border-radius: inherit; filter: url(#pen); }
.extras h3 { font-size: 1.05rem; color: var(--ink-2); font-weight: 700; }
.extras a { font-weight: 700; text-decoration: none; }
.extras a span { margin-left: 6px; padding: 1px 8px; border-radius: 6px; background: var(--yellow); }
.extras a:hover { text-decoration: underline; }

/* ---------- library filters ---------- */

.filters { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 0 0 12px; }
.filters .lbl { color: var(--ink-2); font-weight: 700; margin-right: 4px; min-width: 4.5em; }
.filters button {
  font: inherit;
  font-weight: 700;
  font-size: 0.92em;
  padding: 4px 13px 5px;
  border-radius: 999px;
  border: 2px solid transparent;
  background: none;
  color: var(--c-d, var(--ink));
  white-space: nowrap;
  flex: none;
  cursor: pointer;
  position: relative;
  isolation: isolate;
  transition: color var(--t) var(--ease);
}
.filters button::before { content: ""; position: absolute; inset: -2px; z-index: -1; border: 2px solid var(--c, var(--ink)); border-radius: inherit; background: var(--paper); filter: url(#pen); transition: background-color var(--t) var(--ease); }
.filters button[aria-pressed="true"] { color: var(--paper); }
.filters button[aria-pressed="true"]::before { background: var(--c-d, var(--ink)); border-color: var(--c-d, var(--ink)); }
.count { color: var(--ink-2); margin: 8px 0 18px; }
[hidden] { display: none !important; }

/* ---------- poster page ---------- */

.crumbs { margin: clamp(18px, 2.4vw, 30px) 0 12px; color: var(--ink-2); font-size: 0.95em; }
.crumbs a { color: var(--ink-2); }
.poster-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 28px; margin-bottom: clamp(18px, 2vw, 26px); }
.poster-head h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 800; font-variation-settings: "BNCE" 40; }
.poster-head h1.bubble { --face: var(--c, var(--yellow)); }
.poster-head .sub { margin: 8px 0 0; color: var(--ink-2); font-size: 1.15em; }
.poster-head .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.poster-head .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.poster { margin: 0; position: relative; border-radius: 16px; background: var(--paper-2); }
.poster::after { content: ""; position: absolute; inset: 0; border: 2px solid var(--ink); border-radius: inherit; filter: url(#marker); pointer-events: none; }
.poster img { border-radius: 14px; }
.poster img { width: 100%; height: auto; }
.poster.port { max-width: 880px; margin-inline: auto; }
.read {
  display: grid;
  grid-template-columns: minmax(0, 68ch) minmax(280px, 380px);
  justify-content: space-between;
  gap: clamp(28px, 5vw, 80px);
  margin-top: clamp(32px, 5vw, 60px);
}
.prose h2 { font-size: clamp(1.5rem, 2.2vw, 2rem); font-weight: 800; margin-bottom: 0.6em; color: var(--c-d, var(--ink)); }
.prose p { margin: 0 0 1em; }
.prose ul { padding-left: 1.2em; }
.read .member { align-self: start; position: sticky; top: 96px; }
.author-note { margin: 0 0 1.4em; padding: 10px 14px; background: var(--magenta-t); border-radius: 10px; }
.also { margin: 1.4em 0 0; padding: 12px 16px; border: 2px dashed var(--ink-2); border-radius: 12px; }

/* zine product page */
.product { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.buybox { --c: var(--ink); background: var(--yellow-t); display: grid; gap: 14px; justify-items: start; }
.buybox .pricebig { font-size: 2.4rem; font-weight: 800; line-height: 1; }
.buybox h2 { font-size: 1.15rem; font-weight: 800; }
.buybox ul { margin: 0; padding-left: 1.2em; }
.buybox p { margin: 0; }
.buybox .or { color: var(--ink-2); font-size: 0.95em; }

/* ---------- sections, newsletter, footer ---------- */

.section { margin-top: clamp(56px, 8vw, 100px); }

.closer { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--gap); margin-top: clamp(64px, 9vw, 120px); }
.news { --c: var(--sky); display: flex; flex-direction: column; gap: 12px; }
.news h2 { font-size: clamp(1.7rem, 2.3vw, 2.3rem); font-weight: 800; }
.news p { margin: 0; color: var(--ink-2); }
.news form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.news input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 0.6em 0.95em;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  caret-color: var(--magenta);
  filter: url(#pen);
}
.news input::placeholder { color: #6b7389; }
.closer > :only-child { grid-column: 1 / -1; }
.closer > *, .hero > *, .product > *, .read > * { min-width: 0; }
html, body { overflow-x: clip; }

.foot {
  margin: clamp(48px, 6vw, 80px) 0 26px;
  padding-top: 18px;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  align-items: baseline;
  color: var(--ink-2);
  font-size: 0.95em;
}
.foot::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--ink); filter: url(#pen); }
.foot a { color: var(--ink); }
.foot .spacer { flex: 1; }

/* ---------- lightbox ---------- */

.viewer { width: min(1200px, 94vw); max-height: 94vh; padding: 0; border: 2px solid var(--ink); border-radius: 16px; background: var(--paper); color: var(--ink); overflow: hidden; }
.viewer::backdrop { background: rgba(22, 33, 62, 0.6); }
.viewer[open] { animation: pop var(--t) var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
.viewer .bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 2px solid var(--ink); }
.viewer .bar h2 { font-size: 1.2rem; font-weight: 800; margin-right: auto; }
.viewer .stage { overflow: auto; max-height: calc(94vh - 64px); }
.viewer .stage img { width: 100%; height: auto; }

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .hero, .product, .read, .closer { grid-template-columns: minmax(0, 1fr); }
  .hero > .member { grid-column: auto; grid-row: auto; }
  .read .member { position: relative; top: auto; }
}
@media (max-width: 760px) {
  .top .wrap { flex-wrap: wrap; row-gap: 6px; }
  .top nav { order: 3; width: 100%; }
  .nav { margin: 0; overflow-x: auto; scrollbar-width: none; font-size: 0.95em; }
  .top .btn { margin-left: auto; }
  .hero-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { gap: 6px 7px; }
  .filters .lbl { min-width: 100%; margin: 4px 0 0; font-size: 0.9em; }
  .filters button { font-size: 0.85em; padding: 3px 11px 4px; }
  .nav { justify-content: space-between; }
  .nav a { padding: 5px 9px 6px; }
  .head .more, .box > .label .more { margin-left: 0; }
}

/* hover effects only where a real pointer hovers: on touch screens they stick after a tap */
@media (hover: hover) {
  .tile:hover .media { transform: translateY(-4px) rotate(-0.8deg); box-shadow: 0 10px 22px -10px rgba(22, 33, 62, 0.55); }
  .tile:hover .media::after { border-color: var(--c, var(--ink)); }
  .tile:hover h3 { text-decoration: underline; text-decoration-color: var(--c, var(--yellow)); text-decoration-thickness: 3px; }
  .btn:hover { transform: translateY(-2px) rotate(-1deg); --bg: #ffe169; }
  .btn--ghost:hover { --bg: var(--yellow-t); }
  .nav a:hover { background: var(--paper-2); }
  .filters button:hover::before { background: var(--c-t, var(--paper-2)); }
}

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