/* ============================================================
   MEDIAPAD — the look.

   Bright studio: bone paper, ink lines, two loud accents and no
   blur anywhere. Every card is a printed object — a hard border
   and a solid offset shadow, the way a poster sits on a wall —
   so the page reads as a physical grid rather than a soft feed.

   Committed to one light theme on purpose. The design is paper;
   there is no dark version of paper.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@62..125,100..900&family=DM+Mono:wght@400;500&display=swap');

:root {
  color-scheme: light;

  /* paper + ink */
  --paper: #f7f5f0;
  --paper-2: #ffffff;
  --paper-3: #eeebe3;
  --ink: #0b0b0f;
  --ink-80: rgba(11, 11, 15, 0.8);
  --ink-60: rgba(11, 11, 15, 0.58);
  --ink-40: rgba(11, 11, 15, 0.38);
  --ink-15: rgba(11, 11, 15, 0.14);

  /* the two that shout */
  --blue: #1b3cff;
  --magenta: #ff2d8d;
  --yellow: #ffe01f;
  --cyan: #25f4ee;
  --green: #12a150;
  --red: #e5142b;

  /* the printed object */
  --line: 1.6px solid var(--ink);
  --radius: 5px;
  --drop: 5px 5px 0 var(--ink);
  --drop-lift: 8px 8px 0 var(--ink);
  --drop-sm: 3px 3px 0 var(--ink);

  --shell: 1240px;
  --bar: 58px;

  --sans: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'DM Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  /* The paper has a tooth: a faint grid, and two accent washes that
     keep the bone from reading as flat grey on a big monitor. */
  background-image:
    radial-gradient(60rem 40rem at 88% -12%, rgba(27, 60, 255, 0.07), transparent 62%),
    radial-gradient(50rem 34rem at -8% 4%, rgba(255, 45, 141, 0.07), transparent 60%),
    linear-gradient(var(--ink-15) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink-15) 1px, transparent 1px);
  background-size: auto, auto, 88px 88px, 88px 88px;
  background-position: 0 0, 0 0, -1px -1px, -1px -1px;
  background-attachment: fixed, fixed, scroll, scroll;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

::selection { background: var(--yellow); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

/* ---------- type ------------------------------------------- */

.display {
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.9;
  text-transform: lowercase;
  margin: 0;
}

.mono {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-60);
}

.sub {
  color: var(--ink-60);
  font-size: 1.02rem;
  max-width: 46ch;
}

.accent-mag { color: var(--magenta); }
.accent-blue { color: var(--blue); }

/* ---------- shell ------------------------------------------- */

.shell {
  width: min(100% - 40px, var(--shell));
  margin-inline: auto;
}

section { padding: 76px 0; }
section + section { padding-top: 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.section-head h2 { font-size: clamp(2.1rem, 5vw, 3.4rem); }

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

.top {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper-2);
  border-bottom: var(--line);
}

.top-in {
  height: var(--bar);
  display: flex;
  align-items: center;
  gap: 26px;
}

.mark {
  display: inline-flex;
  align-items: center;
  font-stretch: 125%;
  font-size: 1.3rem;
  letter-spacing: -0.045em;
  line-height: 1;
  margin-right: 4px;
}
.mark i { font-style: normal; font-weight: 800; }
.mark i + i { font-weight: 300; color: var(--magenta); }

/* The logo is his file, untouched: media/logo-src.jpg, a 2000×2000
   JPEG with the artwork in a 706×711 box at (646, 645) on pure
   white. The span is a square 30px window onto a square 730×730
   region of the source — a square box on a square image with auto
   height can only ever show a square:

     rendered image = 30 × 2.7397 = 82.19px, so 1 box px = 24.33 src px
     window         = 730 × 730 source px
     size           = 2000 / 730            = 273.97%
     x offset       = 634 / (2000 − 730)    = 49.92%  → shows x 634…1364
     y offset       = 635.5 / (2000 − 730)  = 50.04%  → shows y 635.5…1365.5

   which leaves 12px of white round the artwork horizontally and 9.5px
   vertically, so the anti-aliased edge is never clipped. Percent
   background-position aligns the same fraction of image and box,
   which is exactly a crop. The file is served as it was given — no
   trace, no re-encode — and its white ground vanishes into the white
   header. The favicon is the same 730×730 window copied out of the
   same file, pixel for pixel. */
.mark-logo {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin-right: 8px;
  background-image: url('/media/logo-src.jpg');
  background-repeat: no-repeat;
  background-size: 273.97% auto;
  background-position: 49.92% 50.04%;
}

.nav {
  display: flex;
  gap: 4px;
  margin-right: auto;
}
.nav a {
  padding: 7px 12px;
  border-radius: 3px;
  color: var(--ink-60);
  font-size: 0.9rem;
  border: 1.6px solid transparent;
}
.nav a:hover { color: var(--ink); background: var(--paper-3); }
.nav a[aria-current='page'] {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--yellow);
}

.top-side { display: flex; align-items: center; gap: 10px; }

/* ---------- buttons ----------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  box-shadow: var(--drop-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  transition: transform 0.09s ease, box-shadow 0.09s ease, background 0.12s ease;
  white-space: nowrap;
}
.btn:hover { transform: translate(-1.5px, -1.5px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(1.5px, 1.5px); box-shadow: 1px 1px 0 var(--ink); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: var(--drop-sm); }

.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #1d1d26; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-mag { background: var(--magenta); color: #fff; }
.btn-yellow { background: var(--yellow); }
.btn-sm { padding: 7px 12px; font-size: 0.82rem; box-shadow: 2px 2px 0 var(--ink); }
.btn-lg { padding: 15px 26px; font-size: 1.02rem; box-shadow: var(--drop); }
.btn-lg:hover { box-shadow: var(--drop-lift); }
.btn-ghost { background: transparent; box-shadow: none; border-color: var(--ink-15); }
.btn-ghost:hover { border-color: var(--ink); box-shadow: var(--drop-sm); }
.btn-block { width: 100%; }

.icon-btn {
  border: var(--line);
  background: var(--paper-2);
  border-radius: var(--radius);
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
}
.icon-btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }

.menu-btn { display: none; }

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

.hero {
  position: relative;
  padding: 84px 0 64px;
  overflow: hidden;
  isolation: isolate;
}

.hero-in { position: relative; z-index: 2; text-align: center; }

.hero h1 {
  font-size: clamp(3.1rem, 10.5vw, 8.6rem);
  margin: 0 auto;
  max-width: 15ch;
}
.hero h1 span { display: block; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(96deg, var(--magenta), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .sub {
  margin: 26px auto 0;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  max-width: 52ch;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 34px;
}

.hero-meta {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.pip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: var(--line);
  border-radius: 100px;
  background: var(--paper-2);
  padding: 7px 15px;
  font-size: 0.84rem;
  box-shadow: 2px 2px 0 var(--ink);
}
.pip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(18, 161, 80, 0.2);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

.rotator { color: var(--ink-60); font-size: 0.92rem; }
.rotator b {
  color: var(--ink);
  font-weight: 700;
  border-bottom: 2.5px solid var(--magenta);
  padding-bottom: 1px;
}

/* floating platform tiles behind the headline */
.wall {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.tile {
  position: absolute;
  width: var(--w, 74px);
  aspect-ratio: 1;
  border: var(--line);
  border-radius: 12px;
  background: var(--paper-2);
  box-shadow: var(--drop);
  display: grid;
  place-items: center;
  color: var(--ink);
  animation: bob 9s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  transform: rotate(var(--r, 0deg));
}
.tile svg { width: 52%; height: 52%; }
@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -16px; }
}
@media (prefers-reduced-motion: reduce) {
  .tile { animation: none; }
  .pip i { animation: none; }
}

/* ---------- filter strip ------------------------------------ */

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.filters .rule {
  width: 1.6px;
  height: 22px;
  background: var(--ink-15);
  margin-inline: 4px;
}
.chip {
  border: var(--line);
  border-radius: 100px;
  background: var(--paper-2);
  padding: 7px 15px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform 0.09s ease, box-shadow 0.09s ease;
}
.chip:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.chip[aria-pressed='true'] {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 2px 2px 0 var(--magenta);
}
.chip[aria-pressed='true'][data-accent] {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 2px 2px 0 var(--ink);
}

/* A platform chip carries its real mark. Resting, the mark is in
   its own brand colour; pressed, it inherits the chip's ink so it
   stays legible on a saturated background — TikTok's black mark on
   TikTok red would otherwise disappear. */
.chip-brand { display: inline-flex; align-items: center; gap: 7px; }
.chip-mark { display: inline-flex; color: var(--mark, currentColor); }
.chip[aria-pressed='true'] .chip-mark { color: currentColor; }

/* ---------- poster grid ------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
  gap: 22px;
}

.card {
  border: var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  box-shadow: var(--drop);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.11s ease, box-shadow 0.11s ease;
}
.card:hover { transform: translate(-3px, -3px); box-shadow: var(--drop-lift); }

/* Near-paper with a wash of the platform's colour. colour-mix keeps
   the two tokens honest — one --tint drives both the panel and the
   hairline, so a new platform needs one hex, not three. */
.poster {
  position: relative;
  aspect-ratio: 16 / 10;
  border-bottom: var(--line);
  background:
    linear-gradient(160deg,
      color-mix(in srgb, var(--tint, #0b0b0f) 9%, #fff),
      color-mix(in srgb, var(--tint, #0b0b0f) 3%, #fff));
  overflow: hidden;
  display: grid;
  place-items: center;
}
.poster img { width: 100%; height: 100%; object-fit: cover; }
.poster .glyph { display: grid; place-items: center; opacity: 0.92; }
.poster .glyph svg { width: min(92px, 34%); height: auto; }

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--paper-2);
  border: var(--line);
  border-radius: 100px;
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 2px 2px 0 var(--ink);
}
.badge svg { width: 11px; height: 11px; flex: 0 0 auto; }
.badge-right { left: auto; right: 10px; }
.badge-reg { background: var(--paper-3); color: var(--ink-60); }
.badge-live { background: var(--yellow); }
.badge-hit { background: var(--green); color: #fff; }
.badge-missed { background: var(--ink); color: var(--paper); }

.card-body { padding: 15px 16px 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }

.card-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.card-title h3 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tick {
  font-family: var(--mono);
  font-size: 0.76rem;
  background: var(--ink);
  color: var(--paper);
  padding: 3px 7px;
  border-radius: 3px;
  flex: 0 0 auto;
}

.card-desc {
  color: var(--ink-60);
  font-size: 0.87rem;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.stat { padding: 8px 10px; }
.stat + .stat { border-left: var(--line); }
.stat dt {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-40);
  margin: 0 0 2px;
}
.stat dd { margin: 0; font-weight: 700; font-size: 0.95rem; letter-spacing: -0.02em; }
.stat dd small { font-weight: 500; font-size: 0.68rem; color: var(--ink-40); margin-left: 3px; }
.up { color: var(--green); }
.down { color: var(--red); }
.flat { color: var(--ink-40); }

.spark { display: block; width: 100%; height: 42px; }
.spark-empty {
  height: 42px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink-40);
  border: 1.6px dashed var(--ink-15);
  border-radius: 4px;
}

.card-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}
.card-foot .when {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink-40);
  margin-left: auto;
}

/* ---------- spotlight --------------------------------------- */

.spotlight {
  border: var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  box-shadow: var(--drop-lift);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  overflow: hidden;
}
.spotlight .poster { aspect-ratio: auto; border-bottom: 0; border-right: var(--line); min-height: 340px; }
.spotlight-body { padding: 30px 32px; display: flex; flex-direction: column; gap: 18px; }
.spotlight-body h3 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -0.03em; line-height: 1.05; }

.meter { display: flex; flex-direction: column; gap: 7px; }
.meter-bar {
  height: 14px;
  border: var(--line);
  border-radius: 100px;
  background: var(--paper-3);
  overflow: hidden;
}
.meter-bar i {
  display: block;
  height: 100%;
  background: repeating-linear-gradient(45deg, var(--magenta) 0 7px, #ff56a4 7px 14px);
  border-right: 1.6px solid var(--ink);
  transition: width 0.4s ease;
}
.meter-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-60);
}

/* ---------- steps ------------------------------------------- */

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step {
  border: var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  box-shadow: var(--drop);
  padding: 22px 20px 24px;
  position: relative;
}
.step .n {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  padding: 4px 9px;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 14px;
}
.step:nth-child(2) .n { background: var(--blue); }
.step:nth-child(3) .n { background: var(--magenta); }
.step:nth-child(4) .n { background: var(--yellow); color: var(--ink); }
.step h3 { margin: 0 0 7px; font-size: 1.14rem; letter-spacing: -0.02em; }
.step p { margin: 0; color: var(--ink-60); font-size: 0.9rem; }

/* ---------- page head --------------------------------------- */

.page-head { padding: 54px 0 30px; border-bottom: var(--line); }
.page-head h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
.page-head .sub { margin-top: 12px; }

/* ---------- empty state ------------------------------------- */

.empty {
  border: 1.6px dashed var(--ink-15);
  border-radius: var(--radius);
  padding: 62px 30px;
  text-align: center;
  background: rgba(255, 255, 255, 0.5);
}
.empty h3 { margin: 0 0 8px; font-size: 1.5rem; letter-spacing: -0.02em; }
.empty p { margin: 0 auto 22px; color: var(--ink-60); max-width: 44ch; }

.skeleton {
  border: var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  box-shadow: var(--drop);
  height: 344px;
  position: relative;
  overflow: hidden;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(11, 11, 15, 0.05) 50%, transparent 80%);
  animation: sweep 1.3s linear infinite;
}
@keyframes sweep { to { transform: translateX(100%); } }

/* ---------- activity list ----------------------------------- */

.feed { display: flex; flex-direction: column; gap: 0; border: var(--line); border-radius: var(--radius); background: var(--paper-2); box-shadow: var(--drop); overflow: hidden; }
.feed-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
}
.feed-row + .feed-row { border-top: var(--line); }
.feed-row:hover { background: var(--paper-3); }
.feed-ic {
  width: 34px;
  height: 34px;
  border: var(--line);
  border-radius: 4px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: color-mix(in srgb, var(--tint, #0b0b0f) 10%, #fff);
  overflow: hidden;
}
.feed-ic svg { width: 16px; height: 16px; }
.feed-ic img { width: 100%; height: 100%; object-fit: cover; }
.feed-txt { min-width: 0; }
.feed-txt strong { font-weight: 700; }
.feed-txt p { margin: 0; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-txt span { font-family: var(--mono); font-size: 0.68rem; color: var(--ink-40); }
.feed-amt { margin-left: auto; font-family: var(--mono); font-size: 0.8rem; flex: 0 0 auto; }

/* ---------- forms / composer -------------------------------- */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(11, 11, 15, 0.55);
  display: grid;
  place-items: start center;
  padding: 26px 18px 60px;
  overflow-y: auto;
}
.sheet-card {
  width: min(100%, 620px);
  border: var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 10px 10px 0 var(--ink);
}
.sheet-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: var(--line);
  background: var(--paper-2);
  position: sticky;
  top: 0;
  border-radius: var(--radius) var(--radius) 0 0;
}
.sheet-head h2 { margin: 0; font-size: 1.32rem; letter-spacing: -0.03em; margin-right: auto; }
.sheet-body { padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.sheet-foot {
  padding: 18px 22px;
  border-top: var(--line);
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--paper-2);
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.82rem; font-weight: 600; }
.field .hint { font-family: var(--mono); font-size: 0.68rem; color: var(--ink-40); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

input[type='text'], input[type='url'], input[type='number'], textarea, select {
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--paper-2);
  border: var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  width: 100%;
  box-shadow: 2px 2px 0 var(--ink-15);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  box-shadow: 2px 2px 0 var(--blue);
  border-color: var(--blue);
}
textarea { resize: vertical; min-height: 78px; }
input::placeholder, textarea::placeholder { color: var(--ink-40); }

.drop-zone {
  border: 1.6px dashed var(--ink-40);
  border-radius: var(--radius);
  background: var(--paper-2);
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  color: var(--ink-60);
  font-size: 0.88rem;
}
.drop-zone:hover, .drop-zone.over { border-color: var(--blue); color: var(--blue); background: rgba(27, 60, 255, 0.04); }
.drop-zone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.drop-zone svg { width: 26px; height: 26px; margin: 0 auto 8px; }

.note {
  border: var(--line);
  border-left-width: 6px;
  border-radius: 4px;
  padding: 12px 14px;
  font-size: 0.86rem;
  background: var(--paper-2);
}
.note-warn { border-left-color: var(--yellow); background: #fffdf0; }
.note-bad { border-left-color: var(--red); background: #fff5f5; }
.note-good { border-left-color: var(--green); background: #f3fbf6; }
.note-info { border-left-color: var(--blue); background: #f4f6ff; }
.note b { display: block; margin-bottom: 3px; }

/* ---------- market page ------------------------------------- */

.market {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 24px;
  align-items: start;
}
.panel {
  border: var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  box-shadow: var(--drop);
  overflow: hidden;
}
.panel-head {
  padding: 14px 18px;
  border-bottom: var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel-head h2 { margin: 0; font-size: 1rem; letter-spacing: -0.01em; }
.panel-body { padding: 18px; }

.kv { display: flex; flex-direction: column; gap: 0; }
.kv div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; align-items: baseline; }
.kv div + div { border-top: 1.6px solid var(--ink-15); }
.kv dt { color: var(--ink-60); font-size: 0.86rem; }
.kv dd { margin: 0; font-family: var(--mono); font-size: 0.8rem; text-align: right; overflow-wrap: anywhere; }

.chart { width: 100%; height: 190px; display: block; }

.addr {
  font-family: var(--mono);
  font-size: 0.75rem;
  border: var(--line);
  border-radius: 4px;
  padding: 6px 9px;
  background: var(--paper-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.addr button { border: 0; background: none; cursor: pointer; opacity: 0.5; display: inline-flex; }
.addr button:hover { opacity: 1; }

/* ---------- footer ------------------------------------------ */

.foot {
  border-top: var(--line);
  background: var(--paper-2);
  margin-top: 60px;
  padding: 44px 0 34px;
}
.foot-in { display: flex; gap: 30px; flex-wrap: wrap; align-items: flex-start; }
.foot-brand { margin-right: auto; max-width: 30ch; }
.foot-brand p { color: var(--ink-60); font-size: 0.88rem; margin: 8px 0 0; }
.foot nav { display: flex; flex-direction: column; gap: 7px; }
.foot nav a { color: var(--ink-60); font-size: 0.9rem; }
.foot nav a:hover { color: var(--ink); }
.foot h4 {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-40);
}
.foot-fine {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1.6px solid var(--ink-15);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink-40);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: space-between;
}

/* ---------- mobile tab bar ---------------------------------- */

.tabbar { display: none; }

/* ---------- toast ------------------------------------------- */

.toasts {
  position: fixed;
  z-index: 120;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(92vw, 380px);
}
.toast {
  border: var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  box-shadow: var(--drop);
  padding: 12px 14px;
  font-size: 0.88rem;
  animation: pop 0.18s ease;
}
.toast b { display: block; margin-bottom: 2px; }
.toast-bad { border-left: 6px solid var(--red); }
.toast-good { border-left: 6px solid var(--green); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }

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

@media (max-width: 1040px) {
  /* minmax(0, 1fr), never a bare 1fr: a bare one is minmax(auto,
     1fr), so a child with a wide intrinsic size — a 46ch paragraph,
     an svg with its own width — pushes the track past the container
     and the card silently clips it instead of wrapping. */
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spotlight { grid-template-columns: minmax(0, 1fr); }
  /* aspect-ratio and min-height together set a minimum WIDTH too:
     240px tall at 16/9 is 427px wide, which is how a poster ends up
     wider than the phone it is on. Height follows width here. */
  .spotlight .poster {
    border-right: 0;
    border-bottom: var(--line);
    min-height: 0;
    width: 100%;
    aspect-ratio: 16 / 9;
  }
  .spotlight-body { min-width: 0; }
  .market { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .nav, .top-side .btn-hide { display: none; }
  .menu-btn { display: inline-grid; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .top-in { gap: 12px; }
  .mark { margin-right: auto; }
}

/* On a narrow phone the header cannot hold the logo, the wordmark, a
   connected wallet's address AND the menu: measured with the font
   loaded, the "wrong network" state needs 349px and a 375px screen
   gives the shell 335. Below 400px the wordmark goes and the logo
   stands for the brand alone — the name is in the tab title, and the
   logo is the part he cares about. */
@media (max-width: 400px) {
  .mark i { display: none; }
  .mark-logo { margin-right: 0; }

  .nav.open {
    display: flex;
    position: absolute;
    top: var(--bar);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--paper-2);
    border-bottom: var(--line);
    padding: 12px 20px 18px;
    gap: 2px;
  }
  .nav.open a { padding: 11px 12px; font-size: 1rem; }

  body { padding-bottom: 66px; }
  section { padding: 52px 0; }
  .hero { padding: 56px 0 44px; }
  .wall { display: none; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .grid { grid-template-columns: minmax(0, 1fr); }

  .tabbar {
    display: flex;
    position: fixed;
    z-index: 80;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--paper-2);
    border-top: var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 2px;
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-40);
    border-radius: 4px;
  }
  .tabbar a svg { width: 19px; height: 19px; }
  .tabbar a[aria-current='page'] { color: var(--ink); background: var(--yellow); }
  .toasts { bottom: 78px; }
}
