/* CO Tech Underground — the shared platform look, served publicly by home at /platform.css and
   loaded by every app before its own styles. Apps keep their own accent: each sets --accent
   (and --accent-ink, the text color on accent backgrounds) in its own :root.

   Component rules are prefixed `html body` so they win over each app's older single-class
   nav/pill rules without having to delete those from 13 files at once. */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&family=Space+Mono:wght@400;700&display=swap');

:root {
  --ptf-bg: #0b0f1c;
  --ptf-surface: #151a2e;
  --ptf-border: #262c48;
  --ptf-border-strong: #2c3354;
  --ptf-text: #eef0f6;
  --ptf-text-soft: #d8dbe7;
  --ptf-muted: #a9aec2;
  --ptf-link: #c3c7d6;
  --ptf-faint: #5b6285;
  --ptf-font: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ptf-mono: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --ptf-gold: #f2b134;
  --ptf-sunset: #c74c2b;
  --ptf-forest: #2f8f6b;
  --accent: var(--ptf-gold);
  --accent-ink: #2f2013;
}

/* Zero-specificity base: a page's own body styles win (Radio and Portfolio keep their looks) */
:where(body) { background: var(--ptf-bg); color: var(--ptf-text-soft); font-family: var(--ptf-font); }
html body :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Top bar: dusk band with the Front Range ridge along its bottom edge ── */
/* Position + stacking at zero specificity, so an app's own sticky header (news, rentals,
   Your Area, Automotive, Emulators) keeps sticking; relative is only the fallback */
:where(html body .site-nav, html body .ptf-bar) { position: relative; z-index: 50; }
html body .site-nav,
html body .ptf-bar {
  font-family: var(--ptf-font);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 32px 34px; border: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 38' preserveAspectRatio='none'%3E%3Cpath d='M0 28 L90 13 L170 24 L260 4 L360 22 L450 11 L560 26 L650 6 L760 24 L860 13 L960 26 L1060 9 L1200 22 L1200 38 L0 38Z' fill='%2324162a'/%3E%3Cpath d='M0 33 L120 24 L240 33 L380 22 L520 34 L660 24 L800 33 L940 25 L1080 34 L1200 29 L1200 38 L0 38Z' fill='%230b0f1c'/%3E%3C/svg%3E") bottom / 100% 30px no-repeat,
    linear-gradient(180deg, var(--ptf-bg) 0%, #1b1d3a 55%, #4a2638 100%);
}
html body .nav-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
html body .nav-brand {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  color: var(--ptf-text); text-decoration: none;
  font-size: 0.98rem; font-weight: 600; letter-spacing: 0; text-transform: none;
}
html body .nav-brand svg { width: 28px; height: 28px; margin: 0 !important; flex-shrink: 0; }
html body .ptf-slash { color: var(--ptf-faint); font-weight: 300; }
html body .ptf-app { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
html body .ptf-app::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
html body .nav-right { display: flex; align-items: center; gap: 14px; position: relative; }
html body .nav-links { display: flex; align-items: center; gap: 20px; }
html body .nav-links a, html body .nav-username { font-size: 0.88rem; color: var(--ptf-link); text-decoration: none; }
html body .nav-links a:hover { color: var(--ptf-text); }
html body .nav-hamburger { display: none; background: none; border: none; cursor: pointer; color: var(--ptf-link); font-size: 1.3rem; padding: 4px 6px; line-height: 1; }
@media (max-width: 700px) {
  html body .ptf-org, html body .ptf-slash { display: none; }
}
@media (max-width: 600px) {
  html body .site-nav, html body .ptf-bar { padding: 14px 16px 30px; }
  html body .nav-hamburger { display: block; }
  html body .nav-links {
    display: none; position: absolute; top: calc(100% + 8px); right: 0; min-width: 170px; z-index: 200;
    flex-direction: column; align-items: flex-start; gap: 14px; padding: 14px 18px 16px;
    background: var(--ptf-surface); border: 1px solid var(--ptf-border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  }
  html body .nav-links.open { display: flex; }
  html body .nav-username { font-weight: 600; color: var(--ptf-text); }
}

/* ── Mini radio player pill ── */
html body .radio-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 9px;
  background: rgba(11, 15, 28, 0.5); border: 1px solid var(--ptf-border-strong); border-radius: 999px;
  color: var(--ptf-link); font-family: inherit; font-size: 0.78rem; cursor: pointer; white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}
html body .radio-pill:hover, html body .radio-pill.playing { border-color: var(--accent); color: var(--ptf-text); }
html body .radio-pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ptf-faint); flex-shrink: 0; }
html body .radio-pill.playing .radio-pill-dot { background: var(--accent); animation: ptf-pulse 1.8s ease-in-out infinite; }
@keyframes ptf-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.radio-pill-hint {
  position: fixed; z-index: 400; max-width: min(320px, calc(100vw - 24px));
  padding: 9px 13px; border-radius: 10px; font-family: var(--ptf-font); font-size: 0.8rem; line-height: 1.45;
  background: var(--ptf-surface); color: var(--ptf-text-soft); border: 1px solid var(--ptf-border-strong);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
.radio-pill-hint[hidden] { display: none; }
.radio-pill-hint a { color: var(--ptf-gold); font-weight: 600; text-decoration: none; white-space: nowrap; }
.radio-pill-hint a:hover { text-decoration: underline; }

/* ── Small shared pieces apps can opt into ── */
.ptf-stripes { display: flex; gap: 4px; }
.ptf-stripes span { width: 26px; height: 4px; border-radius: 2px; }
.ptf-stripes span:nth-child(1) { background: var(--ptf-sunset); }
.ptf-stripes span:nth-child(2) { background: var(--ptf-gold); }
.ptf-stripes span:nth-child(3) { background: var(--ptf-forest); }

@media (prefers-reduced-motion: reduce) {
  html body .radio-pill.playing .radio-pill-dot { animation: none; }
}
