/* Propuesta B — Estación DeTodoUIS
   Cálido, claro. Vibra de fanzine / tablón de pasillo / cuaderno.
   DIY, recortes, anotaciones. Tropelorio se asoma como sticker.   */

* { margin: 0; padding: 0; box-sizing: border-box; }

.home {
  /* Palette mirrors detodouis_core MyColors:
     accent          = MyColors.theMural    (#e3a125)
     accent-bright   = MyColors.accent      (#ffba08)
     red             = MyColors.cutScores   (#b63a24)
     teal            = MyColors.subjects    (#2a9d8f)
     blue            = MyColors.careers     (#0087BD)
     ink             = MyColors.blackText   (#363636) */
  --paper: #f4ede0;
  --paper-2: #ebe2cf;
  --paper-3: #ddd1b6;
  --ink: #363636;
  --ink-soft: #4a4a4a;
  --ink-mute: #6b6358;
  --border: #c5b994;
  --border-soft: #d8cdac;
  --rule: #8a7e60;
  --accent: #e3a125;
  --accent-bright: #ffba08;
  --red: #b63a24;
  --teal: #2a9d8f;
  --blue: #0087BD;
  --rule-line: rgba(138, 126, 96, 0.10);
  --tape-yellow: rgba(255,186,8,0.55);
  --tape-grey: rgba(0,0,0,0.08);
  --postit-shadow: rgba(0,0,0,0.10);
  --pin-shadow: rgba(0,0,0,0.30);

  background: var(--paper);
  color: var(--ink);
  font-family: 'Fragment Mono', ui-monospace, monospace;
  min-height: 100%;
  position: relative;
  overflow: hidden;
}

/* DARK THEME — kraft / aged-leather notebook
   Not black-cold: dark warm brown paper with cream ink. */
/* DARK THEME — graphite notebook
   Casi negro neutral con un punto cálido. Cream ink. */
.home[data-theme="dark"] {
  --paper: #0e0e10;        /* almost black, neutral */
  --paper-2: #18181b;      /* card / panel */
  --paper-3: #232328;      /* deeper layer */
  --ink: #f0e6d2;          /* cream */
  --ink-soft: #d6cdb8;
  --ink-mute: #8a8170;
  --border: #3a3a40;
  --border-soft: #2a2a30;
  --rule: #5a5a62;
  /* Dark palette also from detodouis_core MyColors:
     accent          = MyColors.theMuralDark (#b7821f)
     accent-bright   = mid-tone toward MyColors.accent for legible pop
     red/teal/blue   = brightened brand hues for dark legibility */
  --accent: #b7821f;
  --accent-bright: #cc8e1f;
  --red: #cc4a35;
  --teal: #3eb5a4;
  --blue: #3aa9d6;
  --rule-line: rgba(240, 230, 210, 0.05);
  --tape-yellow: rgba(183,130,31,0.30);
  --tape-grey: rgba(255,255,255,0.10);
  --postit-shadow: rgba(0,0,0,0.50);
  --pin-shadow: rgba(0,0,0,0.6);
}

/* Feature card (Oráculo): in dark must POP — pure black with yellow border + glow */
.home[data-theme="dark"] .h-card-feat {
  background: #000;
  color: #f0e6d2;
  border: 1px solid var(--accent);
  box-shadow:
    0 0 0 1px var(--accent),
    4px 4px 0 var(--accent-bright);
  --feat-soft: rgba(240,230,210,0.65);
  --feat-demo-bg: rgba(183,130,31,0.10);
  --feat-demo-border: rgba(183,130,31,0.40);
}
.home[data-theme="dark"] .h-card-feat:hover {
  transform: translate(-2px, -2px);
  box-shadow:
    0 0 0 1px var(--accent),
    6px 6px 0 var(--accent-bright);
}
.home[data-theme="dark"] .h-card-feat .h-card-tag {
  background: #000;
  color: var(--accent-bright);
  border: 1px solid var(--accent);
  padding: 2px 8px;
}

/* Marker (yellow Carreras) card — keep dark text, but in dark mode tone DOWN
   so it doesn't out-shout the Oráculo. Use the soft mustard, not bright yellow. */
.home[data-theme="dark"] .h-card-marker {
  background: var(--accent);   /* mustard d49b00 — quieter than bright */
  color: #363636;
  border-color: #363636;
}
.home[data-theme="dark"] .h-card-marker p { color: rgba(0,0,0,0.7); }
.home[data-theme="dark"] .h-card-marker .h-card-tag {
  color: rgba(0,0,0,0.55);
  background: var(--accent);
}
.home[data-theme="dark"] .h-card-marker .h-card-num { color: rgba(0,0,0,0.7); }

/* Store buttons in dark: cream button on dark — high contrast */
.home[data-theme="dark"] .h-store-btn { color: #0e0e10; }
.home[data-theme="dark"] .h-store-btn .lab .small { color: rgba(14,14,16,0.6); }

/* Post-it (always yellow) — quiet text stays dark */
.home[data-theme="dark"] .h-cta-postit { color: #363636; }
.home[data-theme="dark"] .h-cta-postit .quiet { color: rgba(0,0,0,0.6); }
.home[data-theme="dark"] .h-cta-postit-pin { background: #363636; }

/* Sticker — keep dark text in dark mode (yellow burst) */
.home[data-theme="dark"] .h-sticker { color: #363636; }

/* Lema in DARK: drop the marker highlight entirely.
   The .a spans (yellow text on near-black bg) read perfectly fine
   without any background band. */
.home[data-theme="dark"] .h-lema-line .a.marker,
.home[data-theme="dark"] .h-lema-line .marker {
  background: none;
  color: var(--accent);
  padding: 0;
  border-radius: 0;
  box-decoration-break: initial;
  -webkit-box-decoration-break: initial;
}

/* Trop sticker red badge */
.home[data-theme="dark"] .h-trop-sticker::after {
  color: #f0e6d2; border-color: #363636;
}

/* CTA mark underline */
.home[data-theme="dark"] .h-cta-mark::after { opacity: 0.55; }

/* Mast logo dot keeps white circle */
.home[data-theme="dark"] .h-mast-logo .dot { box-shadow: 2px 2px 0 #000; }

/* Buttons (.h-btn): in dark, ink=cream so default is cream-button on dark — text needs to be dark */
.home[data-theme="dark"] .h-btn { color: #0e0e10; }
.home[data-theme="dark"] .h-btn-ghost { color: var(--ink); background: transparent; }

/* Dark-mode polish — fix invisible/awkward elements */
.home[data-theme="dark"] .h-mast-extras a {
  text-decoration-color: var(--rule);
}
.home[data-theme="dark"] .h-mast-extras a:hover {
  text-decoration-color: var(--accent);
}
/* Stores: huge cream box on dark looked off — keep accent shadow but soften the border */
.home[data-theme="dark"] .h-stores {
  background: var(--paper-2);
  border-color: var(--accent);
  box-shadow: 8px 8px 0 var(--accent);
}
.home[data-theme="dark"] .h-stores-stamp,
.home[data-theme="dark"] .h-stores-soon {
  background: var(--paper);
}
/* Receipt pin: in dark the "black border" was cream — invert so the dot reads */
.home[data-theme="dark"] .h-receipt::before {
  background: var(--accent);
  border-color: var(--paper);
  box-shadow: 0 0 0 1px var(--accent);
}
/* CTA stamp / trop sticker: cream-on-paper-2 with cream border was washed out */
.home[data-theme="dark"] .h-cta-stamp {
  background: var(--paper);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 2px 2px 0 var(--accent-bright);
}
.home[data-theme="dark"] .h-cta-trop img {
  background: var(--paper);
  border-color: var(--accent);
  box-shadow: 3px 3px 0 var(--accent);
}
.home[data-theme="dark"] .h-cta-trop-bubble {
  background: var(--paper);
  border-color: var(--accent);
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--accent);
}
.home[data-theme="dark"] .h-cta-line a {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.home[data-theme="dark"] .h-cta-line a:hover { color: var(--accent-bright); }
/* Card tag floating label: in dark on near-black, cream on near-black with paper bg matches */
.home[data-theme="dark"] .h-card-tag {
  background: var(--paper);
  color: var(--ink-mute);
}
/* Marker card tag — keep dark-on-yellow */
.home[data-theme="dark"] .h-card-marker .h-card-tag {
  background: var(--accent);
}
/* Receipt shadow: paper-3 was warm; keep but use a tighter neutral */
.home[data-theme="dark"] .h-receipt {
  box-shadow: 3px 3px 0 var(--paper-3);
}
/* Trop sticker on side panel — dashed rule got too dim */
.home[data-theme="dark"] .h-trop-sticker {
  border-color: var(--border);
}

/* paper texture: ruled lines + faint warmth */
.home::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 31px,
      var(--rule-line) 31px,
      var(--rule-line) 32px
    );
  pointer-events: none;
}
.home::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 30% at 50% 0%, rgba(255, 186, 8, 0.08), transparent 70%),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(182, 58, 36, 0.04), transparent 70%);
  pointer-events: none;
}

.h-shell {
  position: relative; z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px 80px;
}

/* masthead */
.h-mast {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 3px double var(--rule);
}
.h-mast-issue {
  font-size: 10px; color: var(--ink-mute);
  letter-spacing: 0.12em; text-transform: uppercase;
  display: flex; flex-direction: column; gap: 4px;
}
.h-mast-issue b { color: var(--ink); font-weight: 400; font-size: 13px; }
.h-mast-logo {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  color: inherit; text-decoration: none;
}
.h-mast-logo:hover .name b { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.h-mast-logo .dot {
  width: 36px; height: 36px; background: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.h-mast-logo .dot img { width: 26px; }
.h-mast-logo .name {
  font-size: 22px; letter-spacing: -0.02em;
}
.h-mast-logo .name b { color: var(--accent); font-weight: 400; }

/* Mast CTA — give it a tiny stamp feel so it reads as a button-link, not just text */
.h-mast-extras .h-mast-cta {
  border: 1px solid var(--accent);
  padding: 4px 10px;
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.15s, color 0.15s;
}
.h-mast-extras .h-mast-cta:hover {
  background: var(--accent);
  color: var(--paper);
  text-decoration: none;
}
.home[data-theme="dark"] .h-mast-extras .h-mast-cta:hover {
  color: var(--paper);
}
.h-mast-extras {
  display: flex; gap: 18px; font-size: 11px;
  color: var(--ink-mute); letter-spacing: 0.04em;
}
.h-mast-extras a { color: var(--ink-soft); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 4px; transition: color 0.15s, text-decoration-color 0.15s; }
.h-mast-extras a:hover { text-decoration-color: var(--accent); color: var(--ink); }
.h-mast-extras .h-mast-cta {
  color: var(--accent);
  text-decoration-color: var(--accent);
  font-weight: 400;
  letter-spacing: 0.06em;
}

/* Settings toggle (theme + lang) — stamp/ticket style */
.h-settings {
  display: inline-flex;
  align-items: stretch;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.06em;
}
.h-settings-block {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--border);
  background: var(--paper-2);
  padding: 2px;
  border-radius: 2px;
  position: relative;
}
.h-toggle-btn {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--ink-mute);
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 1px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px;
  text-transform: uppercase;
}
.h-toggle-btn:hover { color: var(--ink); }
.h-toggle-btn.active {
  background: var(--ink);
  color: var(--paper);
}
.h-toggle-btn.icon {
  font-size: 13px;
  padding: 3px 8px;
  letter-spacing: 0;
}
.h-settings-sep {
  color: var(--border);
  font-size: 9px;
  user-select: none;
  align-self: center;
  padding: 0 1px;
}

/* Mast extras layout: settings + CTA inline */
.h-mast-extras {
  align-items: center;
}
.h-mast-extras .h-settings + .h-mast-cta { margin-left: 4px; }

/* the headline newspaper */
.h-front {
  padding: 48px 0 32px;
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 40px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.h-overline {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.h-overline::before, .h-overline::after { content: ""; flex: 0 0 24px; height: 1px; background: var(--accent); }
.h-overline::after { display: none; }

.h-front h1 {
  font-size: clamp(36px, 5.2vw, 64px);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 400;
  margin-bottom: 24px;
  text-wrap: balance;
}
.h-front h1 .a { color: var(--accent); }
.h-front h1 i { font-style: italic; color: var(--red); }

.h-deck {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.75;
  max-width: 540px;
  margin-bottom: 28px;
}

.h-byline {
  font-size: 11px; color: var(--ink-mute); letter-spacing: 0.04em;
  margin-bottom: 32px;
}
.h-byline b { color: var(--ink); font-weight: 400; }

.h-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.h-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  font-size: 12px; letter-spacing: 0.04em;
  font-family: inherit; text-decoration: none; cursor: pointer;
  border: 2px solid var(--ink);
  background: var(--ink); color: var(--paper);
  box-shadow: 4px 4px 0 var(--accent);
  transition: transform 0.1s, box-shadow 0.1s;
}
.h-btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--accent); }
.h-btn-ghost { background: var(--paper); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.h-btn-ghost:hover { box-shadow: 6px 6px 0 var(--ink); }

/* sticker side panel */
.h-side {
  position: relative;
  display: flex; flex-direction: column; gap: 16px;
  padding: 24px;
  background: var(--paper-2);
  border: 1px solid var(--border);
}
/* Sticker — round promo badge (dark disc with yellow ring) */
.h-sticker {
  position: absolute;
  top: -22px; left: -18px;
  width: 86px; height: 86px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(-10deg);
  z-index: 3;
  box-shadow:
    0 0 0 4px var(--accent-bright),
    0 0 0 5px var(--ink),
    3px 3px 0 var(--ink);
  padding: 6px;
  border: none;
  filter: none;
}
.h-sticker b {
  display: block;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--accent-bright);
  font-style: italic;
  margin: 2px 0;
}
.h-sticker .ring-top,
.h-sticker .ring-bot {
  display: block;
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--paper);
  opacity: 0.7;
  line-height: 1;
}
.h-sticker span:not(.ring-top):not(.ring-bot) { display: none; }

/* dark mode: invert — yellow disc with dark text reads strong on near-black */
.home[data-theme="dark"] .h-sticker {
  background: var(--accent-bright);
  color: #363636;
  box-shadow:
    0 0 0 4px #363636,
    0 0 0 5px var(--accent-bright),
    3px 3px 0 #000;
}
.home[data-theme="dark"] .h-sticker b {
  color: #363636;
}
.home[data-theme="dark"] .h-sticker .ring-top,
.home[data-theme="dark"] .h-sticker .ring-bot {
  color: #363636;
  opacity: 0.55;
}

.h-side h3 {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 400;
  border-bottom: 1px solid var(--border); padding-bottom: 8px;
  text-align: right;
}
.h-stat-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px dotted var(--border);
}
.h-stat-row:last-child { border-bottom: none; }
.h-stat-row .lab { font-size: 12px; color: var(--ink-soft); }
.h-stat-row .num { font-size: 16px; color: var(--ink); }
.h-stat-row .num b { color: var(--accent); font-weight: 400; }

/* tropelorio sticker */
.h-trop-sticker {
  margin-top: 8px;
  padding: 14px;
  background: var(--paper);
  border: 1px dashed var(--rule);
  display: flex; align-items: center; gap: 12px;
  position: relative;
}
.h-trop-sticker img {
  width: 42px; height: 42px; object-fit: contain;
}
.h-trop-sticker .meta {
  font-size: 11px; color: var(--ink-mute); line-height: 1.5;
}
.h-trop-sticker .meta b { color: var(--ink); font-weight: 400; display: block; font-size: 12px; }
.h-trop-sticker::after {
  content: "?";
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px;
  background: var(--red); color: var(--paper);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1;
  border: 1.5px solid var(--ink);
  transform: rotate(12deg);
}

/* lema banner — composed like a printed proclamation */
.h-lema {
  margin: 56px 0 72px;
  padding: 48px 32px 40px;
  background: var(--paper-2);
  text-align: center;
  position: relative;
  border-top: 3px double var(--rule);
  border-bottom: 3px double var(--rule);
}
/* corner ornaments */
.h-lema::before, .h-lema::after {
  content: "✦";
  position: absolute;
  font-size: 18px;
  color: var(--accent);
  background: var(--paper);
  padding: 0 14px;
  top: -12px;
}
.h-lema::before { left: 24px; }
.h-lema::after { right: 24px; content: "✦"; }
.h-lema-stamp {
  display: inline-block;
  font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-mute);
  background: var(--paper);
  padding: 0 14px;
  position: relative;
  top: -64px;
  margin-bottom: -52px;
}
.h-lema-line {
  font-size: clamp(20px, 3vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1.45;
  font-weight: 400;
  text-wrap: balance;
  margin-top: 4px;
}
.h-lema-line .a { color: var(--accent); }
.h-lema-line .b { color: var(--red); font-style: italic; }
.h-lema-line .c { color: var(--ink); }
/* When a span is BOTH .a (yellow) and .marker (yellow highlight),
   force the text to dark ink so it's readable on the yellow band. */
.h-lema-line .a.marker { color: #363636; }
.h-lema-line .marker {
  background: linear-gradient(transparent 60%, rgba(255,186,8,0.45) 60%);
  padding: 0 4px;
}
.h-lema-foot {
  margin-top: 24px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.h-lema-foot .line { width: 32px; height: 1px; background: var(--rule); }

/* section title */
.h-sec {
  margin-top: 72px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
}
.h-sec h2 {
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.h-sec h2 i { font-style: italic; color: var(--accent); }
.h-sec p {
  font-size: 12px; color: var(--ink-mute); max-width: 320px; line-height: 1.6;
}
.h-sec .typed {
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  max-width: 360px;
  text-align: right;
  font-family: 'Fragment Mono', monospace;
  border-left: 2px solid var(--accent);
  padding: 8px 0 8px 14px;
  text-align: left;
  position: relative;
  line-height: 1.65;
  min-height: 1.65em;
}
.h-sec .typed::after {
  content: "▍";
  color: var(--accent);
  margin-left: 2px;
  animation: h-blink 1.05s steps(2) infinite;
}
@keyframes h-blink { 50% { opacity: 0; } }

/* tools — clipped articles */
.h-tools {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}
.h-card {
  background: var(--paper-2);
  border: 1px solid var(--border);
  padding: 22px;
  position: relative;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.h-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink);
}
.h-card-tag {
  position: absolute; top: -10px; left: 14px;
  background: var(--paper); padding: 0 8px;
  font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-mute);
}
.h-card-num {
  font-size: 10px; color: var(--accent); letter-spacing: 0.12em;
}
.h-card h4 {
  font-size: 20px;
  letter-spacing: -0.02em;
  font-weight: 400;
  line-height: 1.1;
}
.h-card h4 i { font-style: italic; color: var(--accent); }
.h-card p {
  font-size: 12px; color: var(--ink-mute); line-height: 1.65;
}
.h-card .pin {
  position: absolute; top: 10px; right: 10px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 2px rgba(182,58,36,0.2);
}
.home[data-theme="dark"] .h-card .pin {
  box-shadow: 0 0 0 2px rgba(204, 74, 53, 0.20);
}
.h-w2 { grid-column: span 2; }
.h-w3 { grid-column: span 3; }
.h-w4 { grid-column: span 4; }
.h-h2 { grid-row: span 2; }

.h-card-feat {
  background: var(--ink); color: var(--paper);
  --feat-soft: rgba(255,255,255,0.7);
  --feat-demo-bg: rgba(255,255,255,0.04);
  --feat-demo-border: rgba(255,255,255,0.2);
}
.h-card-feat .h-card-num { color: var(--accent-bright); }
.h-card-feat p { color: var(--feat-soft, rgba(255,255,255,0.7)); }
.h-card-feat .h-card-tag { color: var(--paper-2); background: var(--ink); }
.h-card-feat .demo {
  margin-top: auto;
  background: var(--feat-demo-bg, rgba(255,255,255,0.04));
  border: 1px dashed var(--feat-demo-border, rgba(255,255,255,0.2));
  padding: 14px;
  font-size: 11px;
  color: var(--feat-soft, rgba(255,255,255,0.7));
  line-height: 1.6;
}
.h-card-feat .demo b { color: var(--accent-bright); font-weight: 400; }

.h-card-marker {
  background: var(--accent-bright);
  border-color: var(--ink);
  color: var(--ink);
}
.h-card-marker p { color: var(--ink-soft); }

/* three audiences — receipts */
.h-aud {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.h-receipt {
  background: var(--paper);
  border: 1px solid var(--border);
  padding: 24px 22px;
  position: relative;
  box-shadow: 3px 3px 0 var(--paper-3);
}
.h-receipt::before {
  content: "";
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  width: 24px; height: 24px; background: var(--accent-bright);
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.h-receipt-step {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin-top: 8px; margin-bottom: 10px;
}
.h-receipt h4 {
  font-size: 22px; font-weight: 400; letter-spacing: -0.025em;
  line-height: 1.1; margin-bottom: 14px;
}
.h-receipt h4 i { font-style: italic; }
.h-receipt p { font-size: 12.5px; color: var(--ink-soft); line-height: 1.7; margin-bottom: 14px; }
.h-receipt .total {
  border-top: 1px dashed var(--border); padding-top: 12px;
  font-size: 11px; color: var(--ink-mute); letter-spacing: 0.04em;
}
.h-receipt .total b { color: var(--ink); font-weight: 400; }

/* The closing — zine sign-off (last page, with stickers/tape/postit) */
.h-cta {
  position: relative;
  margin-top: 72px;
  padding: 56px 32px 60px;
  background:
    repeating-linear-gradient(0deg, transparent 0 27px, var(--rule-line) 27px 28px),
    var(--paper-2);
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
  overflow: hidden;
}
/* Strips of masking tape at top corners */
.h-cta-tape {
  position: absolute;
  top: -10px;
  width: 110px; height: 22px;
  background: var(--tape-yellow);
  border: 1px dashed var(--border);
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}
.h-cta-tape-l { left: 6%; transform: rotate(-4deg); }
.h-cta-tape-r { right: 6%; transform: rotate(5deg); background: var(--tape-grey); }

.h-cta-stamp {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 5px 12px;
  transform: rotate(-1.5deg);
  margin-bottom: 28px;
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--accent);
}

.h-cta-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  align-items: center;
  gap: 18px;
  max-width: 760px;
  margin: 0 auto;
}

/* Post-it on the left */
.h-cta-postit {
  position: relative;
  background: var(--accent-bright);
  color: var(--ink);
  padding: 18px 16px 16px;
  font-size: 13px;
  line-height: 1.5;
  transform: rotate(-3.5deg);
  box-shadow: 3px 4px 0 var(--postit-shadow);
  border-radius: 1px 1px 8px 1px;
  text-align: left;
  font-style: italic;
}
.h-cta-postit .quiet { color: rgba(0,0,0,0.6); margin-top: 4px; font-size: 12px; }
.h-cta-postit-pin {
  position: absolute;
  top: -6px; left: 50%;
  width: 10px; height: 10px;
  background: var(--ink);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 1px 2px var(--pin-shadow);
}

/* Center column */
.h-cta-mid { text-align: center; }
.h-cta-mark {
  font-size: 56px;
  line-height: 1;
  font-style: italic;
  color: var(--ink);
  letter-spacing: -0.04em;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}
.h-cta-mark::after {
  content: "";
  position: absolute;
  left: -6px; right: -6px; bottom: 4px;
  height: 14px;
  background: var(--accent);
  z-index: -1;
  transform: rotate(-1.5deg);
  opacity: 0.85;
}
.h-cta-line {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
  max-width: 380px;
  margin: 0 auto 18px;
  text-wrap: pretty;
}
.h-cta-line a {
  color: var(--ink);
  border-bottom: 1.5px solid var(--accent);
  text-decoration: none;
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
  font-style: italic;
}
.h-cta-line a:hover { color: var(--accent); }
.h-cta-foot {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 10px; color: var(--ink-mute); letter-spacing: 0.16em; text-transform: uppercase;
}
.h-cta-foot .line { flex: 0 0 32px; height: 1px; background: var(--border); }

/* Tropelorio sticker on the right (clickable: opens instagram.com/tropelorio) */
.h-cta-trop {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  transform: rotate(4deg);
  color: inherit; text-decoration: none;
  transition: transform 0.18s;
}
.h-cta-trop:hover { transform: rotate(2deg) scale(1.04); }
.h-cta-trop img {
  width: 78px; height: 78px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 4px;
  object-fit: contain;
}
.h-cta-trop-bubble {
  position: absolute;
  top: -14px; right: -8px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 14px 14px 14px 4px;
  padding: 5px 10px;
  font-size: 11px;
  font-style: italic;
  white-space: nowrap;
  transform: rotate(-6deg);
  box-shadow: 2px 2px 0 var(--ink);
}

@media (max-width: 720px) {
  .h-cta-grid { grid-template-columns: 1fr; gap: 32px; }
  .h-cta-postit { max-width: 220px; margin: 0 auto; }
  .h-cta-trop { margin-top: 8px; }
}

/* footer */
.h-foot {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 3px double var(--rule);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  font-size: 11px; color: var(--ink-mute);
}
.h-foot a { color: var(--ink-soft); margin-right: 14px; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.h-foot a:hover { color: var(--accent); }
.h-foot-credit {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}
.h-foot-credit b { color: var(--ink); font-weight: 400; }
.h-foot-credit .quiet { color: var(--ink-mute); font-size: 10px; letter-spacing: 0.06em; }

/* big stores block — featured download CTA */
.h-stores {
  margin-top: 72px;
  padding: 40px 32px;
  border: 2px solid var(--ink);
  background: var(--paper-2);
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  box-shadow: 8px 8px 0 var(--accent-bright);
}
.h-stores-stamp {
  position: absolute;
  top: -14px; left: 28px;
  background: var(--paper);
  padding: 0 14px;
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-mute);
}
.h-stores-soon {
  position: absolute;
  bottom: -14px; right: 28px;
  background: var(--paper);
  padding: 0 14px;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent);
}
.h-stores-text h3 {
  font-size: clamp(22px, 2.6vw, 32px);
  letter-spacing: -0.025em;
  line-height: 1.15;
  font-weight: 400;
  margin-bottom: 10px;
  text-wrap: balance;
}
.h-stores-text h3 i { font-style: italic; color: var(--accent); }
.h-stores-text p {
  font-size: 12.5px; color: var(--ink-soft); line-height: 1.65; max-width: 480px;
}
.h-stores-buttons {
  display: flex; flex-direction: column; gap: 10px; min-width: 220px;
}
.h-store-btn {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: var(--ink); color: var(--paper);
  border: 2px solid var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.1s;
  position: relative;
}
.h-store-btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--accent-bright); }
.h-store-btn .ico {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 22px;
  line-height: 1;
}
.h-store-btn .lab {
  display: flex; flex-direction: column; gap: 2px; line-height: 1;
}
.h-store-btn .lab .small {
  font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase;
  color: color-mix(in srgb, var(--paper) 60%, transparent);
}
.h-store-btn .lab .big {
  font-size: 16px; letter-spacing: -0.01em;
}
.h-store-btn.android { box-shadow: 4px 4px 0 var(--accent-bright); }
.h-store-btn.ios { box-shadow: 4px 4px 0 var(--red); }
@media (max-width: 720px) {
  .h-stores { grid-template-columns: 1fr; }
}

/* Tropelorio peek behind cta */
.h-trop-peek {
  position: absolute;
  bottom: -10px; right: 24px;
  width: 80px; height: 80px;
  opacity: 0.35;
  filter: brightness(0) invert(1);
}

/* ──────────────────────────────────────────────
   RESPONSIVE — tablet & mobile
   ────────────────────────────────────────────── */

/* Tablet — squeeze the 6-col tools grid to 2 cols of 3 */
@media (max-width: 960px) {
  .h-shell { padding: 0 24px 64px; }
  .h-tools {
    grid-template-columns: repeat(2, 1fr);
  }
  .h-w2, .h-w3, .h-w4 { grid-column: span 1; }
  .h-h2 { grid-row: span 1; }
  .h-aud { grid-template-columns: 1fr; gap: 24px; }
  .h-front { grid-template-columns: 1fr; gap: 32px; }
  .h-front h1 { font-size: clamp(34px, 6vw, 52px); }
  .h-side { order: -1; }  /* keep sidebar above headline? actually below — leave default */
  .h-side { order: 0; }
  .h-sec { grid-template-columns: 1fr; gap: 16px; }
  .h-sec .typed { text-align: left; max-width: 100%; }
}

/* Mobile */
@media (max-width: 600px) {
  .h-shell { padding: 0 16px 56px; }

  /* paper texture lines a bit smaller */
  .home::before {
    background-image:
      repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 25px,
        var(--rule-line) 25px,
        var(--rule-line) 26px
      );
  }

  /* masthead: stack vertically, hide/wrap nav */
  .h-mast {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px 0;
    text-align: center;
  }
  .h-mast-issue {
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    align-items: baseline;
    flex-wrap: wrap;
    font-size: 9px;
  }
  .h-mast-issue b { font-size: 11px; }
  .h-mast-logo { justify-content: center; }
  .h-mast-logo .name { font-size: 20px; }
  .h-mast-extras {
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 16px;
    font-size: 10px;
  }

  /* hero */
  .h-front {
    padding: 32px 0 24px;
    gap: 24px;
  }
  .h-front h1 {
    font-size: clamp(30px, 9vw, 44px);
    margin-bottom: 16px;
  }
  .h-deck { font-size: 13px; margin-bottom: 22px; }
  .h-overline { font-size: 10px; margin-bottom: 12px; }
  .h-overline::before { flex: 0 0 16px; }

  /* sticker side panel — keep some space for the sticker */
  .h-side {
    padding: 20px 18px 18px;
    margin-top: 14px;
  }
  .h-sticker {
    width: 70px; height: 70px;
    top: -16px; left: -8px;
  }
  .h-sticker b { font-size: 14px; }
  .h-sticker .ring-top, .h-sticker .ring-bot { font-size: 7px; }
  .h-side h3 { font-size: 10px; padding-top: 4px; }
  .h-stat-row .lab { font-size: 11px; }
  .h-stat-row .num { font-size: 14px; }

  /* trop sticker */
  .h-trop-sticker { padding: 12px; gap: 10px; }
  .h-trop-sticker img { width: 36px; height: 36px; }
  .h-trop-sticker .meta { font-size: 10px; }

  /* buttons stretch */
  .h-actions { flex-direction: column; align-items: stretch; }
  .h-btn {
    justify-content: center;
    padding: 14px 18px;
    font-size: 13px;
  }

  /* stores block */
  .h-stores {
    margin-top: 40px;
    padding: 28px 18px;
    box-shadow: 5px 5px 0 var(--accent-bright);
    gap: 20px;
  }
  .h-stores-stamp { left: 14px; font-size: 9px; padding: 0 8px; }
  .h-stores-soon { right: 14px; font-size: 9px; padding: 0 8px; }
  .h-stores-buttons { min-width: 0; }
  .h-store-btn { padding: 12px 16px; gap: 12px; }
  .h-store-btn .lab .big { font-size: 14px; }

  /* lema */
  .h-lema {
    margin: 40px 0 48px;
    padding: 36px 18px 30px;
  }
  .h-lema::before, .h-lema::after { font-size: 14px; padding: 0 10px; top: -10px; }
  .h-lema::before { left: 12px; }
  .h-lema::after { right: 12px; }
  .h-lema-stamp { font-size: 9px; padding: 0 10px; top: -50px; margin-bottom: -42px; }
  .h-lema-line { font-size: clamp(18px, 6vw, 26px); line-height: 1.4; }
  .h-lema-foot .line { width: 20px; }
  .h-lema-foot { font-size: 10px; gap: 8px; }

  /* sections */
  .h-sec { margin-top: 40px; padding-bottom: 12px; }
  .h-sec h2 { font-size: clamp(24px, 7vw, 32px); }

  /* tools — 1 col */
  .h-tools {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 22px;
  }
  .h-card { padding: 20px 18px; }
  .h-card h4 { font-size: 18px; }
  .h-card p { font-size: 12px; }
  .h-card-feat .demo { padding: 12px; font-size: 10.5px; }
  .h-card:hover { transform: none; box-shadow: none; }

  /* audiences */
  .h-aud { margin-top: 40px; gap: 22px; }
  .h-receipt { padding: 22px 18px; }
  .h-receipt h4 { font-size: 19px; margin-bottom: 12px; }
  .h-receipt p { font-size: 12px; line-height: 1.65; }

  /* CTA closing — keep zine spirit but tame */
  .h-cta {
    padding: 44px 18px 48px;
    margin-top: 48px;
  }
  .h-cta-tape { width: 80px; height: 18px; top: -8px; }
  .h-cta-tape-l { left: 4%; }
  .h-cta-tape-r { right: 4%; }
  .h-cta-stamp { font-size: 9px; padding: 4px 10px; margin-bottom: 22px; }
  .h-cta-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: center;
  }
  .h-cta-postit {
    max-width: 200px;
    margin: 0 auto;
    font-size: 12px;
    padding: 14px 14px 12px;
  }
  .h-cta-mark { font-size: 44px; }
  .h-cta-line { font-size: 12px; max-width: 320px; }
  .h-cta-trop {
    transform: rotate(4deg) scale(0.9);
  }

  /* footer */
  .h-foot {
    grid-template-columns: 1fr;
    gap: 18px;
    text-align: center;
    margin-top: 36px;
  }
  .h-foot > div:first-child {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
  }
  .h-foot a { margin-right: 0; font-size: 11px; }
  .h-foot-credit {
    text-align: center;
    align-items: center;
  }
}

/* Extra-small phones */
@media (max-width: 380px) {
  .h-shell { padding: 0 14px 48px; }
  .h-front h1 { font-size: 28px; }
  .h-lema-line { font-size: 16px; }
  .h-stores { padding: 24px 14px; }
  .h-store-btn .lab .big { font-size: 13px; }
}

/* ──────────────────────────────────────────────
   INNER PAGES — changelog, privacy, account-deletion.
   Reuse the masthead/footer; add a page head + content blocks
   that match the fanzine vocabulary (rules, tape, receipt).
   ────────────────────────────────────────────── */

.h-page-head {
  padding: 40px 0 28px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 32px;
}
.h-page-head h1 {
  font-size: clamp(32px, 4.6vw, 52px);
  letter-spacing: -0.03em;
  font-weight: 400;
  line-height: 1.05;
  text-wrap: balance;
}
.h-page-head h1 i { font-style: italic; color: var(--accent); }
.h-page-head .deck {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  max-width: 640px;
  line-height: 1.65;
}

/* Changelog: each version = a folded "version" card with an open/close toggle */
.h-versions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.h-version {
  background: var(--paper-2);
  border: 1px solid var(--border);
  position: relative;
  transition: transform 0.15s, box-shadow 0.15s;
}
.h-version[open] {
  box-shadow: 4px 4px 0 var(--ink);
  transform: translate(-1px, -1px);
}
.h-version > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 22px;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 14px;
}
.h-version > summary::-webkit-details-marker { display: none; }
.h-version > summary:hover { background: var(--paper-3); }
.h-version-badge {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.18em;
  padding: 4px 6px;
  text-align: center;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  text-transform: uppercase;
}
.h-version-badge.app    { background: var(--accent); color: #363636; border-color: #363636; }
.h-version-badge.web    { background: var(--blue); color: var(--paper); border-color: var(--blue); }
.h-version-badge.idea   { background: var(--red); color: var(--paper); border-color: var(--red); }
.h-version-title {
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.h-version-arrow {
  font-size: 14px;
  color: var(--ink-mute);
  transition: transform 0.18s;
}
.h-version[open] > summary .h-version-arrow { transform: rotate(180deg); }
.h-version-body {
  padding: 4px 22px 22px 92px;
  border-top: 1px dashed var(--border);
}
.h-version-body ul {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}
.h-version-body li {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
  padding: 6px 0 6px 18px;
  position: relative;
}
.h-version-body li::before {
  content: "·";
  position: absolute; left: 4px; top: 4px;
  color: var(--accent); font-weight: 700;
}

/* Privacy / generic legal sections — use the .h-receipt vocabulary already
   defined for audiences but stretched to a single column. */
.h-doc {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.h-doc .h-receipt {
  text-align: left;
}
.h-doc .h-receipt::before { display: none; } /* drop the round pin marker */
.h-doc .h-receipt h3,
.h-doc .h-receipt h4 {
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.h-doc .h-receipt h3 i,
.h-doc .h-receipt h4 i { font-style: italic; color: var(--accent); }
.h-doc .h-receipt p,
.h-doc .h-receipt li {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 10px;
}
.h-doc .h-receipt ul {
  padding: 0; list-style: none;
}
.h-doc .h-receipt li {
  padding-left: 18px; position: relative;
}
.h-doc .h-receipt li::before {
  content: "·";
  position: absolute; left: 4px; top: 0;
  color: var(--accent); font-weight: 700;
}
.h-doc .h-receipt strong { color: var(--ink); font-weight: 400; background: var(--accent-bright); padding: 0 3px; }
.h-doc .h-receipt a {
  color: var(--ink); border-bottom: 1.5px solid var(--accent);
  text-decoration: none; transition: color 0.15s;
}
.h-doc .h-receipt a:hover { color: var(--accent); }
.h-doc .updated {
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* Account deletion: instructions strip + mailto button */
.h-instructions ol {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0 0 28px;
}
.h-instructions ol li {
  counter-increment: step;
  padding: 18px 22px 18px 76px;
  position: relative;
  background: var(--paper-2);
  border: 1px solid var(--border);
  margin-bottom: 12px;
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.7;
}
.h-instructions ol li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 22px; top: 16px;
  font-size: 24px;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.h-instructions ol li strong { color: var(--ink); font-weight: 400; background: var(--accent-bright); padding: 0 3px; }
.h-instructions .mailto-btn {
  display: inline-flex;
  align-items: center; gap: 10px;
  padding: 14px 22px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.04em;
  box-shadow: 4px 4px 0 var(--accent);
  transition: transform 0.1s, box-shadow 0.1s;
}
.h-instructions .mailto-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--accent);
}

@media (max-width: 600px) {
  .h-version > summary { grid-template-columns: 48px 1fr auto; padding: 12px 16px; gap: 10px; }
  .h-version-body { padding: 4px 16px 16px 16px; }
  .h-version-body li { font-size: 12.5px; }
  .h-instructions ol li { padding: 16px 16px 16px 60px; font-size: 12.5px; }
  .h-instructions ol li::before { left: 16px; font-size: 20px; }
  .h-page-head { padding: 28px 0 22px; margin-bottom: 24px; }
}

/* Body background — light default to match SSR first paint, flips with theme. */
body { margin: 0; background: #f4ede0; }
body:has(.home[data-theme="dark"]) { background: #0e0e10; }
