/* DISKO LABS — site styles. Dark glassmorphic, teal accent (#10b981). */
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 300 800;
  src: local('Outfit'); } /* falls back to system if Outfit absent */

:root {
  --bg: #08080b;
  --ink: #e7e9ee;
  --muted: #9aa3b2;
  --teal: #10b981;
  --amber: #fbbf24;
  --line: rgba(255,255,255,0.08);
  --card: rgba(255,255,255,0.04);
  --card-hi: rgba(255,255,255,0.07);
  --radius: 16px;
  /* Body/UI is a code-oriented mono; the DISKO brand wordmark stays Outfit. */
  --font: 'Space Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'Space Mono', ui-monospace, Menlo, Consolas, monospace;
  --marker: 'Permanent Marker', 'Space Mono', cursive;
  --label: 'Share Tech Mono', 'Space Mono', monospace;
  --hand: 'Schoolbell', 'Space Mono', cursive;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font);
  -webkit-font-smoothing: antialiased; line-height: 1.6; min-height: 100vh;
}
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- dance floor canvas (homepage) ------------------------------------- */
canvas.dancefloor {
  position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block;
}
.home .stage {
  position: relative; z-index: 2; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 60px 20px; pointer-events: none;
}
.home .stage > * { pointer-events: auto; }

/* ---- wordmark / hero --------------------------------------------------- */
.hero { position: relative; display: flex; flex-direction: column; align-items: center; isolation: isolate; }
/* Soft "frosted spotlight" behind the title: blurs + darkens the dance floor
   directly behind the text, fading to nothing at the edges so the shapes stay
   crisp and lively around it. Keeps the title and tagline readable always. */
.hero::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  left: 50%; top: 47%; transform: translate(-50%, -50%);
  width: min(165%, 880px); height: 188%; min-height: 360px;
  background: radial-gradient(ellipse at center,
    rgba(8,8,11,0.85) 0%, rgba(8,8,11,0.6) 42%, rgba(8,8,11,0.3) 64%, transparent 100%);
  -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px);
  /* Feather the whole layer — the darkening AND the backdrop-blur edge — with a
     soft radial mask so it melts into the dance floor with no hard boundary. */
  -webkit-mask-image: radial-gradient(ellipse at center, #000 24%, rgba(0,0,0,0.5) 56%, transparent 84%);
          mask-image: radial-gradient(ellipse at center, #000 24%, rgba(0,0,0,0.5) 56%, transparent 84%);
}
.wordmark { font-family: var(--display); font-size: clamp(34px, 7vw, 72px); font-weight: 800; letter-spacing: -1px; text-shadow: 0 2px 26px rgba(0,0,0,0.5); }
/* The DISKO brand wordmark keeps its display typeface everywhere it appears. */
.brand { font-family: var(--display); }
.wordmark .a { color: var(--teal); }
.tagline { color: var(--ink); font-size: clamp(14px, 2vw, 19px); margin-top: 4px; max-width: 620px; text-shadow: 0 1px 12px rgba(0,0,0,0.6); }
.intro { color: var(--muted); font-size: 14px; max-width: 560px; margin: 10px auto 0; opacity: .9; text-shadow: 0 1px 10px rgba(0,0,0,0.7); }

/* ---- app grid ---------------------------------------------------------- */
.grid {
  display: grid; gap: 16px; margin: 42px auto 0; max-width: 920px; width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.tile {
  position: relative; cursor: pointer; text-align: left; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 18px 18px; display: flex; flex-direction: column; gap: 4px;
  font-family: var(--font); transition: transform .25s cubic-bezier(.2,.7,.2,1), border-color .25s, background .25s, box-shadow .25s;
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  overflow: hidden;
}
.tile::before { /* color glow that blooms on hover */
  content: ''; position: absolute; inset: -1px; border-radius: inherit; opacity: 0;
  background: radial-gradient(120% 120% at 50% 0%, color-mix(in srgb, var(--c) 30%, transparent), transparent 70%);
  transition: opacity .3s; pointer-events: none;
}
.tile:hover, .tile.lit {
  transform: translateY(-4px); border-color: color-mix(in srgb, var(--c) 55%, transparent);
  background: var(--card-hi); box-shadow: 0 12px 40px -12px color-mix(in srgb, var(--c) 55%, transparent);
}
.tile:hover::before, .tile.lit::before { opacity: 1; }
.tile-glyph { width: 40px; height: 40px; }
.tile-glyph svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 4px 12px color-mix(in srgb, var(--c) 50%, transparent)); }
/* App-icon image — when a card supplies an `icon` instead of a generated glyph. */
.tile-img { width: 100%; height: 100%; border-radius: 11px; object-fit: cover; display: block;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--c) 45%, transparent); }
.modal-img { width: 100%; height: 100%; border-radius: 13px; object-fit: cover; display: block;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--c) 40%, transparent); }
.tile-name { font-weight: 700; font-size: 17px; margin-top: 8px; }
.tile-tag { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.tile-status {
  align-self: flex-start; margin-top: 8px; font-size: 10px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; padding: 2px 8px; border-radius: 999px;
}
.status-live { background: color-mix(in srgb, var(--teal) 18%, transparent); color: var(--teal); }
.status-beta { background: color-mix(in srgb, var(--amber) 18%, transparent); color: var(--amber); }
.status-soon { background: rgba(255,255,255,0.08); color: var(--muted); }

.home-foot { position: relative; z-index: 2; text-align: center; color: var(--muted); font-size: 12px; padding: 26px 16px; }
.home-foot a { margin: 0 8px; }
/* Matching frosted oval behind the homepage footer, same treatment as the hero. */
.home .home-foot { padding: 42px 16px 46px; }
.home .home-foot::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(130%, 720px); height: 250%; min-height: 170px;
  background: radial-gradient(ellipse at center,
    rgba(8,8,11,0.82) 0%, rgba(8,8,11,0.55) 44%, rgba(8,8,11,0.24) 66%, transparent 100%);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, rgba(0,0,0,0.5) 54%, transparent 84%);
          mask-image: radial-gradient(ellipse at center, #000 20%, rgba(0,0,0,0.5) 54%, transparent 84%);
}
.site-foot .foot-nav { margin-top: 8px; }
.site-foot .foot-nav a { margin: 0 7px; }
.site-foot .foot-legal { margin-top: 12px; font-size: 11px; opacity: .6; }
.site-foot .foot-legal a { color: var(--muted); margin: 0; }
.legal h2 { font-size: 20px; margin-top: 32px; }
.legal code { background: rgba(255,255,255,0.07); padding: 1px 6px; border-radius: 5px; font-family: var(--mono); font-size: 12.5px; }

/* ---- modal ------------------------------------------------------------- */
.modal {
  position: fixed; inset: 0; z-index: 50; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(4,4,7,0.66); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.modal.open { display: flex; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  position: relative; width: 540px; max-width: 100%; max-height: 88vh; overflow-y: auto;
  background: #101016; border: 1px solid color-mix(in srgb, var(--c) 40%, var(--line));
  border-radius: 20px; padding: 26px; animation: pop .28s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 30px 80px -20px color-mix(in srgb, var(--c) 45%, transparent);
}
@keyframes pop { from { transform: scale(.94) translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close {
  position: absolute; top: 14px; right: 16px; background: none; border: none; color: var(--muted);
  font-size: 26px; line-height: 1; cursor: pointer;
}
.modal-close:hover { color: var(--ink); }
.modal-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.modal-glyph { width: 52px; height: 52px; flex: none; }
.modal-glyph svg { width: 100%; height: 100%; }
.modal-name { font-size: 24px; font-weight: 800; }
.modal-meta { color: var(--muted); font-size: 12.5px; }
.modal-desc { color: #cfd4de; font-size: 15px; }
.modal-bullets { margin: 4px 0 0; padding-left: 18px; color: #cfd4de; font-size: 14px; }
.modal-bullets li { margin: 5px 0; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

.btn {
  display: inline-block; padding: 11px 18px; border-radius: 11px; font-weight: 700;
  font-size: 14px; cursor: pointer; border: 1px solid transparent;
}
.btn-download, .btn-link { background: var(--c); color: #07120d; border-color: var(--c); }
.btn-download:hover, .btn-link:hover { filter: brightness(1.1); text-decoration: none; }
.btn-ghost { background: rgba(255,255,255,0.04); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--c); color: #fff; text-decoration: none; }

body.modal-open { overflow: hidden; }

/* ---- shared page chrome (blog/admin) ----------------------------------- */
.page { max-width: 820px; margin: 0 auto; padding: 28px 20px 80px; position: relative; z-index: 2; }
.topbar {
  position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px);
  background: rgba(8,8,11,0.7); border-bottom: 1px solid var(--line);
}
.topbar-inner { max-width: 820px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; }
.topbar .brand { font-weight: 800; font-size: 17px; }
.topbar .brand .a { color: var(--teal); }
.topbar nav a { color: var(--muted); margin-left: 18px; font-size: 14px; font-weight: 600; }
.topbar nav a:hover { color: var(--ink); text-decoration: none; }

h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 800; letter-spacing: -.5px; line-height: 1.15; }
h2 { font-size: 24px; font-weight: 700; margin-top: 38px; }
h3 { font-size: 18px; font-weight: 700; margin-top: 26px; }
.lead { color: var(--muted); font-size: 18px; }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; color: var(--teal); }

/* ---- blog -------------------------------------------------------------- */
.post-list { display: flex; flex-direction: column; gap: 14px; margin-top: 26px; }
.post-card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; transition: border-color .2s, transform .2s, background .2s;
}
.post-card:hover { border-color: color-mix(in srgb, var(--app, var(--teal)) 50%, transparent); transform: translateY(-2px); background: var(--card-hi); text-decoration: none; }
.post-card .ptag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--app, var(--teal)); }
.post-card .ptitle { font-size: 20px; font-weight: 700; color: var(--ink); margin: 4px 0; }
.post-card .pexc { color: var(--muted); font-size: 14.5px; }
.post-card .pmeta { color: var(--muted); font-size: 12px; margin-top: 8px; opacity: .8; }

.article { font-size: 16.5px; }
.article p { margin: 16px 0; color: #d6dae2; }
.article ul, .article ol { color: #d6dae2; }
.article img { max-width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.article-meta { color: var(--muted); font-size: 13px; margin: 8px 0 26px; }
.media-embed {
  position: relative; border: 1px dashed var(--line); border-radius: 14px; background: var(--card);
  aspect-ratio: 16/9; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--muted); margin: 22px 0; overflow: hidden; text-align: center; gap: 6px;
}
.media-embed svg { width: 46px; height: 46px; opacity: .5; }
.media-embed iframe, .media-embed video, .media-embed img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.chip { font-size: 12px; padding: 6px 13px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--muted); letter-spacing: .02em; transition: border-color .2s, color .2s, background .2s; }
.chip:hover { color: #fff; border-color: var(--teal); text-decoration: none; }
.chip.on { color: #061a12; border-color: transparent; background: linear-gradient(90deg, var(--teal), #22d3ee); font-weight: 700; }

/* ===== VHS rental wall (blog) + retro article ============================ */
/* faint CRT scanline + vignette overlay, only on pages that opt in (.crt) */
.crt { position: fixed; inset: 0; pointer-events: none; z-index: 9; opacity: .5; mix-blend-mode: overlay; }
.crt::before { content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.06) 0 1px, transparent 1px 3px); }
.crt::after { content: ''; position: absolute; inset: 0;
  background: radial-gradient(125% 100% at 50% 0%, transparent 58%, rgba(0,0,0,.55) 100%); }
@media (prefers-reduced-motion: no-preference) { .crt { animation: crt-flicker 6s infinite steps(60); } }
@keyframes crt-flicker { 0%,97%,100% { opacity:.5; } 98% { opacity:.38; } 99% { opacity:.55; } }

.blogwall { max-width: 1120px; }
.vhs-intro { text-align: center; margin-bottom: 18px; }
.vhs-intro h1 { font-family: var(--display); font-size: clamp(34px, 6vw, 60px); letter-spacing: -1px;
  text-shadow: 2px 0 var(--amber), -2px 0 #22d3ee; }
.blink { display: inline-block; color: #f97316; }
@media (prefers-reduced-motion: no-preference) { .blink { animation: blink 1.4s steps(1) infinite; } }
@keyframes blink { 50% { opacity: .25; } }

.tape-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 34px 26px; margin-top: 30px; perspective: 1400px; }

.tape {
  position: relative; display: flex; flex-direction: column; aspect-ratio: 1.6 / 1;
  border-radius: 9px; padding: 13px 13px 15px; text-decoration: none; color: inherit; cursor: pointer;
  background: linear-gradient(157deg, #2a2a32 0%, #17171c 44%, #0d0d11 100%);
  box-shadow: 0 16px 34px -14px rgba(0,0,0,.85), 0 2px 0 rgba(0,0,0,.5),
              inset 0 1px 0 rgba(255,255,255,.07), inset 0 0 0 1px rgba(0,0,0,.6);
  transform: rotate(var(--rot));
  transition: transform .28s cubic-bezier(.2,.7,.2,1), box-shadow .28s, filter .28s;
  animation: tape-in .5s both;
}
@keyframes tape-in { from { opacity: 0; transform: rotate(var(--rot)) translateY(18px); } to { opacity: 1; transform: rotate(var(--rot)); } }
.tape::after { /* two screw dimples bottom corners */
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 4px; pointer-events: none;
  background: radial-gradient(circle 2px at 4px 50%, rgba(0,0,0,.6) 60%, transparent), radial-gradient(circle 2px at calc(100% - 4px) 50%, rgba(0,0,0,.6) 60%, transparent); }
.tape:hover { transform: rotate(0deg) translateY(-7px) scale(1.035); z-index: 5; filter: brightness(1.05);
  box-shadow: 0 30px 56px -16px rgba(0,0,0,.92), 0 0 0 1px color-mix(in srgb, var(--a1) 55%, transparent), 0 0 30px -6px color-mix(in srgb, var(--a1) 45%, transparent); }

.tape-top { position: relative; height: 33%; min-height: 62px; border-radius: 5px; margin-bottom: 11px;
  background: linear-gradient(180deg, #0b0b0e, #15151a); display: flex; align-items: center; justify-content: center; gap: 16%;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), inset 0 6px 14px rgba(0,0,0,.6); overflow: hidden; }
.tape-top::after { content: ''; position: absolute; left: 7%; right: 7%; top: 54%; bottom: 12%; border-radius: 4px;
  background: linear-gradient(115deg, rgba(255,255,255,.07), transparent 45%); pointer-events: none; }
.reel { width: 23%; aspect-ratio: 1; border-radius: 50%; position: relative;
  background: radial-gradient(circle, transparent 0 33%, #0a0a0d 33% 38%, transparent 38%),
              repeating-conic-gradient(#2b2b34 0 12deg, #16161b 12deg 24deg);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.05), 0 1px 2px rgba(0,0,0,.6); }
.reel::before { content: ''; position: absolute; inset: 38%; border-radius: 50%; background: #0a0a0d; box-shadow: 0 0 0 2px #23232b; }
.tape:hover .reel { animation: reel-spin 2.4s linear infinite; }
@keyframes reel-spin { to { transform: rotate(360deg); } }
.tape-speed { position: absolute; top: 6px; right: 9px; font-family: var(--label); font-size: 10px; letter-spacing: .14em;
  color: color-mix(in srgb, var(--a1) 75%, #fff); opacity: .85; }

.tape-label { flex: 1; position: relative; border-radius: 4px; overflow: hidden; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #f4eedd, #e6dcc3); color: #1a1813;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 2px 6px rgba(0,0,0,.4); }
.tape-label::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(0deg, transparent 0 21px, rgba(0,0,0,.07) 21px 22px); }
.label-stripe { display: flex; justify-content: space-between; align-items: center; padding: 5px 9px; position: relative; z-index: 1;
  background: linear-gradient(90deg, var(--a1), var(--a2)); color: #0b0b0e; }
.label-brand { font-family: var(--label); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.label-tc { font-family: var(--label); font-size: 10px; opacity: .65; }
.label-title { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; padding: 7px 12px; position: relative; z-index: 1;
  overflow: hidden; }
.title--written { font-family: var(--marker); font-size: clamp(19px, 2.4vw, 29px); line-height: 1.04; color: #8a2418; transform: rotate(-1.3deg); }
.title--printed { font-family: var(--label); font-size: clamp(14px, 1.7vw, 19px); font-weight: 700; letter-spacing: .03em; text-transform: uppercase; line-height: 1.15; }
.label-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 10px 7px; position: relative; z-index: 1;
  border-top: 1px dashed rgba(0,0,0,.28); font-family: var(--label); font-size: 10px; color: #3b3930; }
.label-cat { font-weight: 700; letter-spacing: .08em; color: color-mix(in srgb, var(--a1) 55%, #2a2a2a); }

/* ---- retro article reading view ---------------------------------------- */
.retro .slate { position: relative; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 6px 0 30px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0)); }
.smpte { height: 12px; background: linear-gradient(90deg,
  #10b981 0 14.28%, #22d3ee 14.28% 28.57%, #8b5cf6 28.57% 42.85%, #a78bfa 42.85% 57.14%,
  #f97316 57.14% 71.42%, #fbbf24 71.42% 85.71%, #fb923c 85.71% 100%); }
.slate-body { padding: 20px 22px 22px; }
.slate .rec { display: inline-flex; align-items: center; gap: 7px; font-family: var(--label); font-size: 12px; letter-spacing: .14em; color: var(--muted); }
.slate .rec b { width: 9px; height: 9px; border-radius: 50%; background: #f43f5e; box-shadow: 0 0 10px #f43f5e; }
@media (prefers-reduced-motion: no-preference) { .slate .rec b { animation: blink 1.2s steps(1) infinite; } }
.slate h1 { font-size: clamp(26px, 4.4vw, 42px); margin: 12px 0 6px; line-height: 1.1; letter-spacing: -.5px; }
.slate .tc { font-family: var(--label); font-size: 12px; color: var(--muted); }
.retro .kicker { color: var(--app, var(--teal)); }

/* media placeholders on the article read like a paused VHS frame */
.retro .media-embed { border-style: solid; border-color: rgba(255,255,255,.1); background: #0a0a0d; }
.retro .media-embed::before { content: 'PLAY  \25B6'; position: absolute; top: 10px; left: 12px; z-index: 2;
  font-family: var(--label); font-size: 11px; letter-spacing: .18em; color: #d7dbe2; opacity: .85; }
.retro .media-embed::after { content: 'SP   0:00:00'; position: absolute; bottom: 10px; right: 12px; z-index: 2;
  font-family: var(--label); font-size: 11px; letter-spacing: .12em; color: #d7dbe2; opacity: .7; }
.retro .media-embed > svg { z-index: 1; }
.retro blockquote.cta, .retro .article-quote { border-left: 3px solid var(--app, var(--teal)); }

.back { color: var(--muted); font-size: 14px; }
.cta {
  margin-top: 40px; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(120deg, color-mix(in srgb, var(--app, var(--teal)) 14%, transparent), transparent);
}
.cta h3 { margin: 0 0 6px; }

/* ---- admin ------------------------------------------------------------- */
.adm-body { background: #0a0a0e; }
.adm-top { position: sticky; top: 0; z-index: 20; background: rgba(8,8,11,0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.adm-top-inner { max-width: 1040px; margin: 0 auto; padding: 12px 22px; display: flex; align-items: center; gap: 22px; }
.adm-top .brand { font-weight: 800; font-size: 17px; }
.adm-top .brand .a { color: var(--teal); }
.adm-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.adm-nav a { color: var(--muted); font-size: 14px; font-weight: 600; padding: 7px 12px; border-radius: 9px; }
.adm-nav a:hover { color: var(--ink); text-decoration: none; background: var(--card); }
.adm-nav a.on { color: #fff; background: color-mix(in srgb, var(--teal) 18%, transparent); }
.adm-nav .adm-out { color: #fca5a5; }
.adm-flash { max-width: 1040px; margin: 16px auto -8px; padding: 11px 16px; border-radius: 10px; background: color-mix(in srgb, var(--teal) 15%, transparent); color: var(--teal); font-size: 14px; font-weight: 600; }

.adm-main { max-width: 1040px; margin: 0 auto; padding: 30px 22px 90px; }
.adm-h1 { font-size: 30px; font-weight: 800; letter-spacing: -.5px; margin: 0 0 6px; }
.adm-h2 { font-size: 18px; font-weight: 700; margin: 0 0 14px; }
.adm-sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.adm-sub code, .adm-cheat code { background: rgba(255,255,255,0.07); padding: 1px 6px; border-radius: 5px; font-family: var(--mono); font-size: 12px; color: #cfd4de; }
.adm-head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; flex-wrap: wrap; }
.adm-head-row .adm-h1 { margin-bottom: 0; }
.back { color: var(--muted); font-size: 14px; display: inline-block; margin-bottom: 12px; }

/* auth */
.adm-auth { max-width: 380px; margin: 13vh auto 0; padding: 0 20px; }
.adm-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.adm-err { background: rgba(239,68,68,.14); color: #fca5a5; padding: 11px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }

/* stat cards */
.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 26px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.stat-n { font-size: 30px; font-weight: 800; color: var(--teal); line-height: 1; }
.stat-l { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 6px; }

/* dashboard tiles */
.adm-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 30px; }
.adm-tile { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; transition: border-color .2s, transform .2s, background .2s; }
.adm-tile:hover { border-color: color-mix(in srgb, var(--teal) 50%, transparent); transform: translateY(-2px); background: var(--card-hi); text-decoration: none; }
.adm-tile h3 { margin: 0 0 6px; font-size: 17px; color: var(--ink); }
.adm-tile p { margin: 0; color: var(--muted); font-size: 13.5px; }
.pill { display: inline-block; background: color-mix(in srgb, var(--teal) 20%, transparent); color: var(--teal); font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin-left: 4px; }

/* forms */
.adm-form { margin-top: 8px; }
.adm-block { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.field { margin-bottom: 16px; }
.field > span { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.field em { text-transform: none; font-style: normal; font-weight: 400; opacity: .7; letter-spacing: 0; }
.field input, .field textarea, .field select {
  width: 100%; background: #0f0f15; border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink); padding: 11px 13px; font: inherit; font-size: 14px;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--teal); }
.field textarea { min-height: 90px; resize: vertical; line-height: 1.55; }
.adm-mono { font-family: var(--mono); font-size: 13px; }
.adm-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.adm-3col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--teal); }
.check em { color: var(--muted); font-style: normal; }
.adm-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 8px; }
.adm-cheat { line-height: 1.9; }

/* per-app accordions */
.adm-app { background: #0f0f15; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.adm-app > summary { cursor: pointer; padding: 14px 16px; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 10px; }
.adm-app > summary::-webkit-details-marker { display: none; }
.adm-app > summary em { color: var(--muted); font-style: normal; font-weight: 400; font-size: 12px; margin-left: auto; font-family: var(--mono); }
.adm-app[open] > summary { border-bottom: 1px solid var(--line); }
.adm-app-body { padding: 16px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }

/* advanced + details */
.adm-advanced > summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.adm-advanced[open] > summary { margin-bottom: 12px; color: var(--ink); }

/* tables */
table.adm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm-table th, .adm-table td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.adm-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.adm-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.adm-slug { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.adm-row-actions { white-space: nowrap; }
.adm-row-actions a, .adm-row-actions .linklike { margin-right: 12px; font-size: 13px; }
.linklike { background: none; border: none; color: var(--teal); font: inherit; font-size: 13px; cursor: pointer; padding: 0; }
.linklike:hover { text-decoration: underline; }
.linklike.danger { color: #fca5a5; }
.badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,0.07); color: var(--muted); }
.badge.on { background: color-mix(in srgb, var(--teal) 18%, transparent); color: var(--teal); }

/* segmented range control */
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg a { padding: 7px 13px; font-size: 13px; font-weight: 600; color: var(--muted); border-right: 1px solid var(--line); }
.seg a:last-child { border-right: none; }
.seg a:hover { color: var(--ink); text-decoration: none; background: var(--card-hi); }
.seg a.on { background: color-mix(in srgb, var(--teal) 18%, transparent); color: #fff; }

/* views-over-time column chart */
.chart { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding: 8px 0; }
.chart-col { flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 2px; }
.chart-bar { width: 100%; background: linear-gradient(180deg, var(--teal), color-mix(in srgb, var(--teal) 40%, transparent)); border-radius: 3px 3px 0 0; transition: opacity .15s; }
.chart-col:hover .chart-bar { opacity: .7; }

/* horizontal bar breakdowns */
.bar-list { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 42px; align-items: center; gap: 12px; font-size: 13.5px; }
.bar-label { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { background: rgba(255,255,255,0.05); border-radius: 5px; height: 9px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--teal), color-mix(in srgb, var(--teal) 55%, transparent)); border-radius: 5px; }
.bar-n { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

.adm-foot { max-width: 1040px; margin: 0 auto; padding: 24px 22px 40px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }
.adm-foot code { font-family: var(--mono); }

@media (max-width: 640px) {
  .adm-2col, .adm-3col { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 110px 1fr 36px; }
}
