/* hydecogames.com, dressed as a HydeCo Workshop page.

   The Steam pages are one theme top to bottom: a 1200x290 header banner, then
   1200x72 section banners, each over a dark gradient with a tiled outline
   motif and accent rules, titles in heavy Rubik with a hard drop shadow. The
   banner backgrounds here are rendered by tools/build_home_banners.py with the
   same tool; the words are real text laid over them.

   One stylesheet for every page except the Tool-Kit apps (/tools/icons/,
   /tools/tiles/, /tools/recipes/ and /tools/mapformats/, which keep their own
   hc-ui.css or the older style.css) and the asset library (/art/). The
   Tool-Kit's own hub, /tools/, is on this sheet.
   The front page's rules come first and are unchanged; the parts the inner
   pages add follow them. */

@font-face {
  font-family: "Rubik"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../assets/fonts/Rubik-Regular.ttf") format("truetype");
}
@font-face {
  font-family: "Rubik"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("../assets/fonts/Rubik-Bold.ttf") format("truetype");
}

:root {
  --bright: #ff8a28;          /* the logo's GAMES orange: titles, rules */
  --deep: #d64810;            /* the swoosh's red end: lower rules */
  --tag: #ffa866;             /* the header tagline, readable on navy */
  --pale: #ffebb4;            /* banner subtitle cream */
  --ink: #e4e8f2;
  --ink-2: #b7bfd2;
  --dim: #8590aa;
  --ground: #050817;
  --panel: #0c1430;
  --panel-2: #08102a;
  --line: rgba(255, 138, 40, .28);
  --cc0: #5fe08d;
  --ccby: #5ad1ff;
  --col: 1200px;
}

* { box-sizing: border-box }
html { scroll-behavior: smooth; scroll-padding-top: 76px }
body {
  margin: 0; color: var(--ink); background: var(--ground);
  font: 400 17px/1.6 "Rubik", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(1200px 520px at 50% -120px, rgba(28, 46, 120, .55), transparent 70%),
    linear-gradient(180deg, #080d24 0, var(--ground) 900px);
  background-repeat: no-repeat;
}
a { color: var(--bright) }
img { display: block; max-width: 100% }
h1, h2, h3 { font-weight: 700; margin: 0 }

/* ---- top bar ------------------------------------------------------------ */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(5, 8, 23, .88);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 138, 40, .18);
}
.topbar-in {
  max-width: var(--col); margin: 0 auto; padding: 8px 16px;
  display: flex; align-items: center; gap: 24px;
}
.brand img { height: 46px; width: auto }
.topnav { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap }
.topnav a {
  color: var(--ink-2); text-decoration: none; font-weight: 400; font-size: 16px;
  padding: 8px 14px; border-radius: 6px; border: 1px solid transparent;
}
.topnav a:hover { color: var(--bright); border-color: var(--line); background: rgba(255, 138, 40, .06) }

/* ---- the page column ---------------------------------------------------- */
.page { max-width: var(--col); margin: 0 auto; padding: 22px 16px 0; container-type: inline-size }

/* ---- header banner ------------------------------------------------------ */
.hero {
  position: relative; text-align: center;
  min-height: clamp(230px, 24.2cqw, 290px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(8px, 1.4cqw, 16px); padding: 26px 16px;
  background-color: #08102c; background-size: cover; background-position: center;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(5, 9, 28, .92), rgba(5, 9, 28, .55) 60%, rgba(5, 9, 28, 0)) center / 88% 118% no-repeat;
}
.hero > * { position: relative; z-index: 2 }
.hero::before, .band::before { z-index: 1 }
.hero, .band { overflow: hidden; isolation: isolate }
.hero-title {
  color: var(--bright); line-height: 1; letter-spacing: -.01em;
  font-size: clamp(42px, 7.25cqw, 88px);
  text-shadow: .06em .06em 0 rgba(0, 0, 0, .8);
}
.hero-sub {
  margin: 0; color: var(--pale); line-height: 1.15;
  font-size: clamp(18px, 2.9cqw, 35px);
  padding: 0 .15em .14em; position: relative;
}
.hero-sub::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--pale);
}
.hero-sub .bar { margin: 0 .45em; opacity: .85 }
.hero-tag { margin: 0; color: var(--tag); font-size: clamp(14px, 2.05cqw, 25px); line-height: 1.2 }
.hero-tag .bar { margin: 0 .45em; opacity: .7 }

/* ---- jump row under the header ----------------------------------------- */
.jump { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px }
.jump a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; text-decoration: none; color: var(--ink);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-top: 3px solid var(--bright);
  transition: border-color .15s, transform .15s, background .15s;
}
.jump a b { font-size: 20px; font-weight: 400; color: var(--ink) }
.jump a small { display: block; color: var(--dim); font-size: 14px; margin-top: 2px }
.jump a .arr { color: var(--bright); font-size: 26px; font-weight: 700; line-height: 1 }
.jump a:hover { border-color: rgba(255, 138, 40, .7); transform: translateY(-2px) }
.jump a:hover b { color: var(--bright) }

/* ---- section banners ---------------------------------------------------- */
.band {
  height: 72px; margin-top: 64px;
  display: flex; align-items: center; justify-content: center;
  background-color: #08102c; background-size: cover; background-position: center;
}
.band { position: relative }
.band::before {
  content: ""; position: absolute; inset: 2px 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(5, 9, 28, .9), rgba(5, 9, 28, 0)) center / 56% 130% no-repeat;
}
.band h2 { position: relative; z-index: 2;
  color: var(--bright); text-transform: uppercase; letter-spacing: .01em;
  font-size: clamp(24px, 3.1cqw, 37px); line-height: 1;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, .8);
}
.sec { max-width: 940px; margin: 30px auto 0 }
.lead { font-size: 19px; color: var(--ink); text-align: center; max-width: 760px; margin: 0 auto 26px }
.lead b { color: var(--pale) }

/* ---- the library cards (markup written by tools/build_art.py) ---------- */
.tool-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px }
.tool-cards--3 { grid-template-columns: repeat(3, 1fr); margin-top: 18px }
.tool-card-strip--render { image-rendering: auto }
.tool-card {
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-top: 3px solid var(--bright); overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.tool-card:hover { border-color: rgba(255, 138, 40, .7); transform: translateY(-2px) }
.tool-card-strip {
  width: 100%; height: 64px; object-fit: cover; object-position: left center;
  image-rendering: pixelated; background: #4a515e; border-bottom: 1px solid var(--line);
}
.tool-card-cap {
  height: 78px; display: flex; align-items: center; justify-content: center; gap: 12px;
  border-bottom: 1px solid var(--line); color: var(--ccby); font-size: 16px;
  background: repeating-linear-gradient(135deg, rgba(90, 209, 255, .07) 0 10px, transparent 10px 20px), #0a1530;
}
.tool-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1 }
.tool-card-body h3 { font-size: 23px; color: var(--bright); display: flex; align-items: center; gap: 10px }
.tool-card-body p { margin: 0; color: var(--ink-2); font-size: 16px }
.tool-count { margin-top: auto; padding-top: 8px; color: var(--pale); font-size: 16px }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px;
  font-weight: 700; letter-spacing: .06em; vertical-align: middle; white-space: nowrap;
}
.badge--cc0 { color: var(--cc0); background: rgba(95, 224, 141, .12); border: 1px solid rgba(95, 224, 141, .45) }
.badge--ccby { color: var(--ccby); background: rgba(90, 209, 255, .1); border: 1px solid rgba(90, 209, 255, .45) }

/* ---- Project Zomboid ---------------------------------------------------- */
.tally { text-align: center; font-size: 22px; color: var(--ink-2); margin: 0 0 22px }
.tally strong { color: var(--pale); font-size: 34px; font-weight: 700; margin: 0 .15em }
.wide-card {
  display: flex; align-items: center; gap: 22px; padding: 22px 26px; text-decoration: none;
  color: var(--ink); background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-top: 3px solid var(--bright);
  transition: border-color .15s, transform .15s;
}
.wide-card:hover { border-color: rgba(255, 138, 40, .7); transform: translateY(-2px) }
.wide-card h3 { font-size: 23px; color: var(--bright) }
.wide-card p { margin: 6px 0 0; color: var(--ink-2); font-size: 16px }
.wide-card .arr { margin-left: auto; color: var(--bright); font-size: 32px; font-weight: 700 }

/* ---- affiliate showcase (tools/build_partner.py writes these) -------------
   Always labelled, the disclosure under it in plain words. HydeCo's own pages
   only: check_zones.py keeps paid links off the Project Zomboid pages. */
.promo {
  display: grid; grid-template-columns: 1fr auto; gap: 10px 28px; align-items: center;
  margin-top: 18px; padding: 18px 26px 16px; text-align: left;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-top: 3px solid var(--bright);
}
.promo-tag {
  grid-column: 1 / -1; justify-self: start; margin: 0; padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--tag); border: 1px solid var(--line); background: rgba(255, 138, 40, .08);
}
.promo h3 { font-size: 23px; color: var(--bright) }
.promo-text p { margin: 6px 0 0; color: var(--ink-2); font-size: 16px }
.promo-text b { color: var(--pale) }
.promo-side { display: flex; flex-direction: column; gap: 10px; min-width: 230px }
.promo-code {
  display: flex; align-items: stretch; border: 2px dashed rgba(255, 235, 180, .5);
  background: rgba(255, 235, 180, .04);
}
.promo-code code {
  flex: 1; padding: 9px 14px; font: 700 21px/1.2 "Rubik", "Segoe UI", system-ui, sans-serif;
  letter-spacing: .14em; color: var(--pale); text-align: center;
}
.promo-copy {
  flex: none; padding: 0 14px; cursor: pointer; font: 700 14px/1 "Rubik", "Segoe UI", system-ui, sans-serif;
  color: var(--ink); background: rgba(255, 138, 40, .14); border: 0; border-left: 2px dashed rgba(255, 235, 180, .5);
}
.promo-copy:hover { color: var(--bright) }
.promo-copy.done { color: var(--cc0) }
.promo-go {
  display: block; padding: 11px 18px; text-align: center; text-decoration: none;
  font-size: 17px; font-weight: 700; color: var(--ground); background: var(--bright);
  transition: background .15s, transform .15s;
}
.promo-go:hover { background: var(--tag); transform: translateY(-1px) }
.promo-fine { grid-column: 1 / -1; margin: 4px 0 0; color: var(--dim); font-size: 13px; line-height: 1.5 }
.promo-fine a { color: var(--ink-2) }
.prose .promo p { margin: 0 }
.prose .promo .promo-text p { margin-top: 6px }
.prose .promo .promo-fine { margin-top: 4px; font-size: 13px; color: var(--dim) }
/* A partner's own banner: 728x90 on a wide screen, 300x250 on a phone. The
   one not shown is never fetched (both load lazily). A [data-swap] part flips
   when the banner's bundle ends, so [hidden] must win over the display rules;
   the whole card hides when an ad blocker refuses the banner. */
.promo[hidden], .promo [hidden] { display: none !important }
.promo-banner { grid-column: 1 / -1; display: flex; justify-content: center }
.promo-banner a { display: block; width: 100%; line-height: 0 }
.promo .promo-banner img { display: block; width: 100%; height: auto; margin: 0; image-rendering: auto }
.promo-banner .banner-narrow { display: none !important }
@media (max-width: 760px) {
  .promo { grid-template-columns: 1fr; padding: 16px 18px 14px }
  .promo-side { min-width: 0 }
  .promo-banner .banner-wide { display: none !important }
  .promo-banner .banner-narrow { display: block !important }
}

/* ---- EVERYBIT ----------------------------------------------------------- */
.eb { text-align: center }
.eb img { width: min(560px, 100%); height: auto; margin: 8px auto 22px; image-rendering: pixelated }

/* ---- Twitch ------------------------------------------------------------- */
.stream {
  position: relative; aspect-ratio: 16 / 9; background: #000;
  border: 1px solid var(--line); border-top: 3px solid var(--bright);
}
.stream iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0 }
.below { text-align: center; margin: 14px 0 0; color: var(--ink-2) }
.below a { text-decoration: none; font-size: 18px }

/* ---- community ---------------------------------------------------------- */
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 26px }
.socials a {
  padding: 11px 22px; text-decoration: none; font-size: 17px; color: var(--ink);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); transition: border-color .15s, color .15s;
}
.socials a:hover { color: var(--bright); border-color: rgba(255, 138, 40, .7) }
.socials a.soon { opacity: .45; pointer-events: none }
.discord-widget { display: block; margin: 0 auto; border: 0; max-width: 100% }

/* ---- the studio and the footer ----------------------------------------- */
.studio { text-align: center; color: var(--ink-2); font-size: 19px; margin: 0 }
footer {
  max-width: var(--col); margin: 70px auto 0; padding: 22px 16px 34px; text-align: center;
  border-top: 3px solid var(--bright); color: var(--dim); font-size: 14px;
}
footer p { margin: 4px 0 }
footer a { color: var(--ink-2) }
footer .fine { font-size: 13px; color: #5d6780 }

/* ---- contact bubble ----------------------------------------------------- */
.chat-bubble {
  position: fixed; right: 18px; bottom: 18px; z-index: 30; width: 52px; height: 52px;
  border-radius: 50%; border: 1px solid var(--line); cursor: pointer; font-size: 22px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2)); color: var(--ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .55);
}
.chat-bubble:hover { border-color: var(--bright) }
.chat-popout {
  position: fixed; right: 18px; bottom: 80px; z-index: 30; padding: 12px 16px;
  background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--bright);
}

/* ---- narrow screens ----------------------------------------------------- */
@media (max-width: 760px) {
  .topbar-in { gap: 12px; padding: 6px 12px }
  .brand img { height: 36px }
  .topnav a { font-size: 13px; padding: 6px 8px }
  .jump, .tool-cards { grid-template-columns: 1fr }
  .band { margin-top: 48px }
  .lead { font-size: 17px }
  .wide-card { flex-wrap: wrap }
  .wide-card .arr { display: none }
  .tally { font-size: 17px }
  .tally strong { font-size: 26px }
}
@media (max-width: 560px) {
  /* the jump row right under the header carries the same links */
  .topnav { display: none }
}

/* ==== motion: js/home.js draws the walls; this stages everything else ==== */

/* the live brick walls sit over their stills, under the dark pool and words */
.hero > .wall-canvas, .band > .wall-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0;
  opacity: 0; transition: opacity .6s ease;
}
.hero > .wall-canvas.on, .band > .wall-canvas.on { opacity: 1 }

/* the CC0 card's sine bar replaces the still strip */
.strip-canvas { display: block; width: 100%; height: 78px; border-bottom: 1px solid var(--line) }
.tool-card-strip.strip-done { display: none }

/* hover: a warm glow under the card and a sheen across it */
.jump a, .tool-card, .wide-card, .socials a { position: relative; overflow: hidden }
.jump a::after, .tool-card::after, .wide-card::after, .socials a::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -70%; width: 45%; pointer-events: none;
  background: linear-gradient(100deg, rgba(255, 200, 140, 0), rgba(255, 200, 140, .14), rgba(255, 200, 140, 0));
  transform: skewX(-18deg); transition: left .7s cubic-bezier(.2, .8, .2, 1);
}
.jump a:hover::after, .tool-card:hover::after, .wide-card:hover::after, .socials a:hover::after { left: 135% }
.jump a:hover, .tool-card:hover, .wide-card:hover { box-shadow: 0 14px 34px -14px rgba(255, 138, 40, .45) }
.jump a .arr, .wide-card .arr { transition: transform .2s ease }
.jump a:hover .arr, .wide-card:hover .arr { transform: translateX(5px) }
.topnav a { position: relative }
.topnav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
  background: var(--bright); transform: scaleX(0); transition: transform .25s ease;
}
.topnav a:hover::after { transform: scaleX(1) }

@media (prefers-reduced-motion: no-preference) {
  /* the header arrives: title, then its line, then the rule draws, then the tag */
  .hero-title { animation: hc-rise .9s cubic-bezier(.2, .8, .2, 1) .15s both, hc-glow 4.5s ease-in-out 1.4s infinite }
  .hero-sub { animation: hc-rise .8s cubic-bezier(.2, .8, .2, 1) .45s both }
  .hero-sub::after { transform: scaleX(0); animation: hc-draw .8s cubic-bezier(.6, 0, .2, 1) .9s forwards }
  .hero-tag { animation: hc-rise .8s cubic-bezier(.2, .8, .2, 1) .75s both }
  .jump a .arr { animation: hc-nudge 2.6s ease-in-out 2s infinite }

  /* section titles drop in once their wall has laid its bricks */
  .band.wait h2 { opacity: 0; transform: scale(1.18); filter: blur(5px) }
  .band.wait.in h2 {
    opacity: 1; transform: none; filter: none;
    transition: opacity .5s ease .45s, transform .6s cubic-bezier(.2, .8, .2, 1) .45s, filter .5s ease .45s;
  }

  /* everything below rises in as it scrolls into view */
  .rv { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .8s cubic-bezier(.2, .8, .2, 1) }
  .rv.in { opacity: 1; transform: none }
}

@keyframes hc-rise { from { opacity: 0; transform: translateY(18px) } to { opacity: 1; transform: none } }
@keyframes hc-draw { to { transform: scaleX(1) } }
@keyframes hc-glow {
  0%, 100% { text-shadow: .06em .06em 0 rgba(0, 0, 0, .8), 0 0 16px rgba(255, 138, 40, .14) }
  50% { text-shadow: .06em .06em 0 rgba(0, 0, 0, .8), 0 0 36px rgba(255, 138, 40, .45) }
}
@keyframes hc-nudge { 0%, 80%, 100% { transform: none } 88% { transform: translateX(5px) } }


/* ==== the inner pages ====================================================
   Everything below is used by the inner pages only, so the front page above
   renders exactly as it did when it had a stylesheet of its own. */

.topnav a[aria-current] { color: var(--bright) }
.topnav a[aria-current]::after { transform: scaleX(1) }

/* breadcrumb line above an inner page's header */
.crumbs { margin: 0 0 12px; font-size: 14px; color: var(--dim) }
.crumbs a { color: var(--ink-2); text-decoration: none }
.crumbs a:hover { color: var(--bright) }
.crumbs .sep { margin: 0 .5em; color: #4a5470 }

/* the compact header for reading pages: the same wall, shorter, smaller words */
.hero--page { min-height: clamp(168px, 16.7cqw, 200px); padding: 22px 16px }
.hero--page .hero-title { font-size: clamp(28px, 4.5cqw, 54px); line-height: 1.08; text-wrap: balance; max-width: 92% }
.hero--page .hero-sub { font-size: clamp(16px, 2.1cqw, 25px) }
.hero--page .hero-tag { font-size: clamp(13px, 1.6cqw, 19px) }
.hero-tag strong { color: var(--pale); font-weight: 700 }

/* a panel: the card frame without the link behaviour */
.panel {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-top: 3px solid var(--bright);
}

/* buttons */
.btn-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px }
.btn {
  display: inline-block; padding: 12px 22px; text-decoration: none; font-size: 17px; color: var(--ink);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); transition: border-color .15s, color .15s, transform .15s;
  position: relative; overflow: hidden;
}
.btn:hover { color: var(--bright); border-color: rgba(255, 138, 40, .7); transform: translateY(-2px) }
.btn--primary {
  color: #1a0b02; font-weight: 700; border-color: #ffb36e;
  background: linear-gradient(180deg, #ffa24a, var(--bright) 55%, #f07020);
}
.btn--primary:hover { color: #1a0b02; border-color: #ffd2a6; box-shadow: 0 14px 34px -14px rgba(255, 138, 40, .7) }
.btn.is-off { color: var(--dim); border-style: dashed; pointer-events: none }
.btn::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -70%; width: 45%; pointer-events: none;
  background: linear-gradient(100deg, rgba(255, 200, 140, 0), rgba(255, 200, 140, .14), rgba(255, 200, 140, 0));
  transform: skewX(-18deg); transition: left .7s cubic-bezier(.2, .8, .2, 1);
}
.btn:hover::after { left: 135% }

/* small pills: Workshop tags and build status */
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px }
.tag {
  padding: 3px 12px; font-size: 14px; color: var(--ink-2); border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 138, 40, .05);
}
.mod-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px }
.mod-subs { color: var(--pale); font-size: 15px }
.build-badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 2px 10px; border-radius: 999px;
  font-size: 13px; color: var(--ink-2); white-space: nowrap;
  border: 1px solid rgba(95, 224, 141, .35); background: rgba(95, 224, 141, .07);
}
.build-badge::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--cc0); box-shadow: 0 0 8px rgba(95, 224, 141, .8);
}

/* ---- the Project Zomboid hub: the mod grid ------------------------------ */
.mod-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px }
.mod-card {
  display: flex; align-items: center; gap: 18px; padding: 14px 18px 14px 14px;
  text-decoration: none; color: var(--ink); position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-top: 3px solid var(--bright);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.mod-card img { width: 96px; height: 96px; flex: none; border: 1px solid var(--line); background: #08102a }
.mod-card h3 { font-size: 19px; color: var(--bright); line-height: 1.25; text-wrap: balance }
.mod-card p { margin: 4px 0 8px; color: var(--ink-2); font-size: 15px; line-height: 1.45 }
.mod-card:hover { border-color: rgba(255, 138, 40, .7); transform: translateY(-2px); box-shadow: 0 14px 34px -14px rgba(255, 138, 40, .45) }
.mod-card::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -70%; width: 45%; pointer-events: none;
  background: linear-gradient(100deg, rgba(255, 200, 140, 0), rgba(255, 200, 140, .14), rgba(255, 200, 140, 0));
  transform: skewX(-18deg); transition: left .7s cubic-bezier(.2, .8, .2, 1);
}
.mod-card:hover::after { left: 135% }
.poster-blank {
  width: 96px; height: 96px; flex: none; display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--line); color: var(--dim); font-size: 30px; font-weight: 700;
}
/* tabs show only when the catalogue has more than one group */
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 18px }
.tab {
  font: inherit; font-size: 15px; cursor: pointer; padding: 8px 16px; color: var(--ink-2);
  background: transparent; border: 1px solid var(--line);
}
.tab.is-active { color: var(--bright); border-color: rgba(255, 138, 40, .7); background: rgba(255, 138, 40, .07) }
.tab-count { color: var(--pale); margin-left: 4px }
.tab-panel { display: none }
.tab-panel.is-active { display: grid }

.tools-all { display: block; width: max-content; margin: 22px auto 0; text-decoration: none; font-size: 17px }
.tools-all:hover { text-decoration: underline }

/* ---- a mod's own page --------------------------------------------------- */
.mod-detail { display: grid; grid-template-columns: 220px 1fr; gap: 30px; align-items: start; padding: 26px 28px; margin-top: 22px }
.mod-detail .mod-poster { width: 220px; height: 220px; border: 1px solid var(--line); background: #08102a }
.mod-detail .poster-blank { width: 220px; height: 220px; font-size: 64px }
.mod-copy p { margin: 0 0 12px; font-size: 17px }
.mod-copy p:first-child { font-size: 19px; color: var(--pale) }
.soon-note {
  margin: 22px auto 0; max-width: 520px; padding: 12px 16px; text-align: center;
  color: var(--dim); font-size: 15px; border: 1px dashed rgba(255, 138, 40, .25);
}

/* The mods' update feeds (tools/build_feed.py): the address in a box with a
   copy button, under the hub's mod grid and on each update history page. A
   browser shows a feed file as raw XML, so no button links to one. */
.feed-follow { max-width: 640px; margin: 28px auto 0; text-align: center }
.items-page .feed-follow { margin: 26px 0 0; text-align: left }
.feed-follow-lead { margin: 0 0 8px; font-size: 15px; color: var(--ink-2) }
.feed-follow-lead::before {
  content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 9px;
  border-radius: 2px; background: var(--bright); vertical-align: 1px;
}
.feed-follow-row { display: flex; align-items: stretch; text-align: left; border: 1px solid var(--line); background: var(--panel) }
.feed-follow-row code {
  flex: 1; min-width: 0; padding: 9px 12px; font-size: 14px; color: var(--pale);
  overflow-wrap: anywhere; user-select: all;
}
.feed-copy {
  flex: none; padding: 0 16px; cursor: pointer; font: 700 14px/1 "Rubik", "Segoe UI", system-ui, sans-serif;
  color: var(--ink); background: rgba(255, 138, 40, .14); border: 0; border-left: 1px solid var(--line);
}
.feed-copy:hover { color: var(--bright) }
.feed-copy.done { color: var(--cc0) }
.feed-follow-hint { margin: 8px 0 0; font-size: 13.5px; color: var(--dim) }

/* ---- long reading: terms, privacy, the asset policy --------------------- */
.prose { max-width: 800px; margin: 30px auto 0 }
.prose h2 {
  margin: 36px 0 10px; padding-bottom: 6px; font-size: 22px; color: var(--bright);
  border-bottom: 1px solid var(--line);
}
.prose p, .prose li { color: var(--ink-2); font-size: 17px; line-height: 1.7 }
.prose p { margin: 12px 0 0 }
.prose ul { margin: 10px 0 0; padding-left: 1.3em }
.prose li { margin-top: 6px }
.prose li::marker { color: var(--bright) }
.prose b { color: var(--ink) }
.prose code {
  font-size: .9em; padding: 1px 6px; color: var(--pale);
  background: rgba(255, 138, 40, .08); border: 1px solid var(--line);
}
.prose .lede-box {
  margin: 0; padding: 16px 20px; color: var(--ink); font-size: 18px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-left: 3px solid var(--bright);
}
.prose .lede-box + .lede-box, .prose p + .lede-box { margin-top: 14px }
.prose .fine-print { margin-top: 40px; font-size: 14px; color: var(--dim) }

/* the footer on Project Zomboid pages carries The Indie Stone's notice */
footer .notice { max-width: 820px; margin: 0 auto 10px; color: var(--ink-2); font-size: 14px; line-height: 1.6 }

@media (max-width: 760px) {
  .mod-grid { grid-template-columns: 1fr }
  .mod-card img, .mod-card .poster-blank { width: 76px; height: 76px }
  .mod-detail { grid-template-columns: 1fr; gap: 18px; padding: 20px 18px; justify-items: center }
  .mod-detail .mod-poster, .mod-detail .poster-blank { width: 180px; height: 180px }
  .mod-copy { justify-self: stretch }
  .prose p, .prose li { font-size: 16px }
  .prose h2 { font-size: 20px }
  .btn { font-size: 16px; padding: 11px 18px }
}

@media (max-width: 560px) {
  /* inner pages have no jump row, so they keep a short top bar on phones */
  .topnav--keep { display: flex; gap: 0; flex-wrap: nowrap }
  .topnav--keep a { font-size: 12.5px; padding: 6px 6px; white-space: nowrap }
  .topnav--keep .opt { display: none }
  .topnav--keep a::after { left: 6px; right: 6px; bottom: 2px }
  .crumbs { font-size: 13px }
}

/* the logo never gives up its width to the links */
.topbar .brand { flex: none }
@media (max-width: 380px) {
  .topnav--keep a:last-child { display: none }
}
/* the translated menus run longer (Russian, French), so the smallest phones
   pull the bar in a little rather than scroll the page sideways */
@media (max-width: 400px) {
  .topbar-in { gap: 8px }
  .topnav--keep a { font-size: 12px; padding: 6px 4px }
  .topnav--keep a::after { left: 4px; right: 4px }
}

/* a long section title wraps centred instead of running off its banner */
.band h2 { text-align: center; text-wrap: balance; padding: 0 12px }

/* ---- a mod's Workshop description, copied (tools/workshop_clone.py) -------
   636px wide, the Workshop's own description column, so the banners and GIFs
   made for it sit at their native size. */
.workshop { max-width: 636px; margin: 30px auto 0; font-size: 16.5px; line-height: 1.65; color: var(--ink-2) }
.workshop p { margin: 0 0 16px }
.workshop .ws-art { text-align: center; line-height: 0; font-size: 0; margin: 0 0 18px }
.workshop .ws-art img { margin: 3px }
.workshop img { display: inline-block; max-width: 100%; height: auto; vertical-align: top }
.workshop b { color: var(--ink) }
.workshop a { color: var(--bright) }
.workshop .ws-h { font-size: 22px; color: var(--bright); margin: 28px 0 12px; text-align: center; line-height: 1.3 }
.workshop hr { border: 0; height: 1px; margin: 28px 0; background: linear-gradient(90deg, transparent, var(--line), rgba(255, 138, 40, .6), var(--line), transparent) }
.workshop ul, .workshop ol { margin: 0 0 18px; padding-left: 1.3em }
.workshop li { margin: 4px 0 }
.workshop li::marker { color: var(--bright) }
.workshop pre {
  margin: 0 0 18px; padding: 12px 14px; overflow-x: auto; font-size: 14px; line-height: 1.5; color: var(--pale);
  background: #060c22; border: 1px solid var(--line); border-left: 3px solid var(--bright);
}
.workshop blockquote { margin: 0 0 18px; padding: 10px 16px; border-left: 3px solid var(--line) }
.workshop .ws-spoiler { background: var(--ink-2); color: var(--ink-2) }
.workshop .ws-spoiler:hover { color: var(--ground) }
@media (max-width: 560px) {
  .workshop { font-size: 16px }
  .workshop .ws-art img { margin: 2px }
}

/* ---- the Tool-Kit hub, /tools/ (tools/build_tools_page.py) --------------
   A jump row of five, then one band per tool over a card: the drifting strip
   of the tool's own art, what it holds and what it does. */
.jump--4 { grid-template-columns: repeat(4, 1fr) }
.jump--5 { grid-template-columns: repeat(5, 1fr) }
.kit {
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-top: 3px solid var(--bright);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.kit:hover { border-color: rgba(255, 138, 40, .7); transform: translateY(-2px); box-shadow: 0 14px 34px -14px rgba(255, 138, 40, .45) }
.kit::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -70%; width: 45%; pointer-events: none;
  background: linear-gradient(100deg, rgba(255, 200, 140, 0), rgba(255, 200, 140, .14), rgba(255, 200, 140, 0));
  transform: skewX(-18deg); transition: left .7s cubic-bezier(.2, .8, .2, 1);
}
.kit:hover::after { left: 135% }
/* the strip: the same picture laid end to end (--n copies), drifting by one */
.kit-strip {
  height: 116px; overflow: hidden; background: linear-gradient(180deg, #131d44, #070d24);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.kit-track { display: flex; width: max-content; height: 100% }
.kit-track img { height: 100%; width: auto; max-width: none; image-rendering: pixelated }
.kit-body {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px 34px; align-items: start;
  padding: 22px 26px 24px; border-top: 1px solid var(--line);
}
.kit-strip + .kit-body { border-top-color: rgba(255, 138, 40, .45) }
.kit > .kit-body:first-child { border-top: 0 }
.kit-say p { margin: 0; color: var(--ink-2); font-size: 17px }
.kit-say .kit-stat { margin: 0 0 8px; font-size: 16px; color: var(--ink-2) }
.kit-stat strong { color: var(--pale); font-size: 22px; font-weight: 700 }
.kit-stat .bar { margin: 0 .55em; color: #4a5470 }
.kit-does { margin: 4px 0 0; padding-left: 1.2em; color: var(--ink); font-size: 16px }
.kit-does li { margin: 3px 0 }
.kit-does li::marker { color: var(--bright) }
.kit .btn { grid-column: 1 / -1; justify-self: start; margin-top: 4px }
.kit:hover .btn--primary { border-color: #ffd2a6; box-shadow: 0 14px 34px -14px rgba(255, 138, 40, .7) }
.kit:hover .btn::after { left: 135% }

@media (prefers-reduced-motion: no-preference) {
  .kit-track { animation: kit-drift 44s linear infinite }
  .kit:hover .kit-track { animation-play-state: paused }
}
@keyframes kit-drift { to { transform: translateX(calc(-100% / var(--n, 2))) } }

@media (max-width: 980px) {
  .jump--4 { grid-template-columns: repeat(2, 1fr) }
  .jump--5 { grid-template-columns: repeat(3, 1fr) }
}
@media (max-width: 760px) {
  .jump--4, .jump--5 { grid-template-columns: 1fr }
  .kit-strip { height: 92px }
  .kit-body { grid-template-columns: 1fr; padding: 18px 18px 20px }
  .kit-say p { font-size: 16px }
}

/* ---- the Support button: a small card with the shop and the tip jar ------
   HydeCo's own pages only (tools/site_chrome.py); it sits at the right end of
   the top bar, after the language menu. */
.give { position: relative; flex: none }
.give > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 7px;
  padding: 7px 13px; font-size: 15px; color: var(--ink);
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 6px;
  transition: border-color .15s, color .15s;
}
.give > summary::-webkit-details-marker { display: none }
.give > summary:hover, .give[open] > summary { color: var(--bright); border-color: var(--bright) }
.give > summary:focus-visible { outline: 2px solid var(--bright); outline-offset: 2px }
.give-heart { display: block; fill: #ea4aaa }
.give-card {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; width: 330px; padding: 16px 18px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-top: 3px solid var(--bright);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .8);
}
.give-card p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.5 }
.give-card .give-go { display: flex; gap: 8px; margin-top: 14px }
.give-go .btn { flex: 1; padding: 9px 10px; font-size: 15px; text-align: center; white-space: nowrap }

/* ---- the contact page's four tabs (contact/index.html) -------------------
   Without the script every panel shows, one after another. */
.ct-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 28px; border-bottom: 1px solid var(--line) }
.ct-tabs[hidden] { display: none }
.ct-tabs button {
  margin-bottom: -1px; padding: 10px 16px; cursor: pointer;
  font: inherit; font-size: 16px; color: var(--ink-2);
  background: none; border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0;
}
.ct-tabs button:hover { color: var(--bright) }
.ct-tabs button[aria-selected="true"] {
  color: var(--ink); background: linear-gradient(180deg, var(--panel), var(--ground));
  border-color: var(--line); box-shadow: inset 0 3px 0 var(--bright);
}
.ct-tabs button:focus-visible { outline: 2px solid var(--bright); outline-offset: 2px }
.ct-panel[hidden] { display: none }
.prose .ct-go { justify-content: flex-start; margin-top: 20px }

@media (max-width: 560px) {
  /* phones keep the heart and drop the word, which the card repeats; the
     card carries the shop, and the community links sit on the front page */
  .topnav--keep a[href^="https://shop.hydecogames.com"], .topnav--keep a[href$="/#community"] { display: none }
  /* the links that still do not fit scroll sideways inside the bar, so a long
     translation never widens the page */
  .topnav--keep { min-width: 0; overflow-x: auto; scrollbar-width: none }
  .topnav--keep::-webkit-scrollbar { display: none }
  .give > summary { padding: 6px 8px }
  .give > summary span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
  .give-card { position: fixed; left: 12px; right: 12px; top: 58px; width: auto }
  .ct-tabs button { padding: 8px 10px; font-size: 15px }
}
