/* =========================================================
   PALLIS DESIGN SYSTEM · v1.0
   Token + component stylesheet
   ========================================================= */

:root {
  /* INK */
  --ink-1000: #07090d;
  --ink-900: #0f1419;
  --ink-800: #1a2029;
  --ink-700: #2b333f;
  --ink-600: #404956;
  --ink-500: #5d6675;
  --ink-400: #8b94a3;
  --ink-300: #b8bfca;
  --ink-200: #d8dde4;
  --ink-100: #ecedf0;
  --ink-50:  #f3f4f6;

  /* PAPER */
  --paper:      #f6f4ee;
  --paper-deep: #efece4;
  --surface:    #ffffff;

  /* BLUE */
  --blue-900: #061a4d;
  --blue-800: #062d85;
  --blue-700: #0a3fb8;
  --blue-600: #1454e6;
  --blue-500: #2d6bff;
  --blue-400: #5489ff;
  --blue-300: #8bafff;
  --blue-200: #b8c8ff;
  --blue-100: #dde6ff;
  --blue-50:  #eef2ff;

  /* CYAN — positive / link */
  --cyan-700: #0e7490;
  --cyan-600: #0891b2;
  --cyan-500: #06b6d4;
  --cyan-300: #67e8f9;
  --cyan-100: #cffafe;

  /* AMBER — sparing highlight */
  --amber-600: #b87327;
  --amber-500: #e89b2a;
  --amber-300: #fbbf24;
  --amber-100: #fdecc8;

  /* RED — destructive / errors */
  --red-600: #c53030;
  --red-500: #e53e3e;
  --red-100: #fed7d7;

  /* SEMANTIC */
  --bg:          var(--paper);
  --bg-deep:     var(--paper-deep);
  --surface-1:   var(--surface);
  --border:      var(--ink-100);
  --border-strong: var(--ink-200);
  --text:        var(--ink-900);
  --text-muted:  var(--ink-500);
  --text-soft:   var(--ink-400);
  --accent:      var(--blue-600);
  --action:      var(--blue-500);

  /* MOTION */
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-inout:  cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-1:       120ms;
  --dur-2:       200ms;
  --dur-3:       320ms;
  --dur-4:       560ms;

  /* RADIUS */
  --r-1: 4px;
  --r-2: 6px;
  --r-3: 8px;
  --r-4: 12px;
  --r-5: 16px;
  --r-pill: 999px;

  /* SHADOW */
  --shadow-sm: 0 1px 2px rgba(15,20,30,0.04), 0 1px 1px rgba(15,20,30,0.03);
  --shadow-md: 0 2px 4px rgba(15,20,30,0.04), 0 6px 12px -4px rgba(15,20,30,0.08);
  --shadow-lg: 0 24px 48px -28px rgba(15,20,30,0.25), 0 2px 6px -2px rgba(15,20,30,0.06);
  --shadow-blue: 0 12px 30px -10px rgba(20,84,230,0.4);

  /* TYPE */
  --sans:  "Geist", ui-sans-serif, -apple-system, "Inter", sans-serif;
  --mono:  "Geist Mono", ui-monospace, "JetBrains Mono", monospace;
  --serif: "Fraunces", "Tiempos", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* ===== TOP CHROME ===== */
.topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 40px;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.topbar .brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.topbar .brand strong { font-family: var(--sans); font-weight: 500; font-size: 13px; letter-spacing: 0; text-transform: none; }
.topbar nav { display: flex; gap: 22px; }
.topbar nav a { transition: color var(--dur-2) var(--ease-out); }
.topbar nav a:hover { color: var(--text); }
.topbar .ver { color: var(--text-soft); }

/* ===== LAYOUT ===== */
.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 112px 64px;
  border-bottom: 1px solid var(--border);
}
.page.alt { background: var(--bg-deep); }
.page.dark { background: var(--ink-900); color: var(--paper); border-bottom-color: transparent; }
.page.dark .small-cap, .page.dark .text-muted { color: var(--ink-400); }
.page.dark h1, .page.dark h2, .page.dark h3, .page.dark h4 { color: var(--paper); }
.page.dark .rule { background: rgba(255,255,255,0.12); }
.page.bleed { max-width: none; padding-left: 0; padding-right: 0; }
.page.bleed > .inner { max-width: 1280px; margin: 0 auto; padding: 0 64px; }

/* ===== TYPE ===== */
h1, h2, h3, h4 { font-weight: 500; letter-spacing: -0.02em; margin: 0; color: var(--text); }
h1 { font-size: 84px; line-height: 0.96; letter-spacing: -0.035em; font-weight: 400; }
h2 { font-size: 48px; line-height: 1.04; letter-spacing: -0.03em; }
h3 { font-size: 28px; line-height: 1.15; letter-spacing: -0.022em; }
h4 { font-size: 17px; line-height: 1.3; font-weight: 500; }
p  { margin: 0 0 1em; max-width: 60ch; color: var(--ink-700); }
.lede { font-size: 20px; line-height: 1.45; color: var(--ink-700); max-width: 58ch; font-weight: 400; }
.text-muted { color: var(--text-muted); }
.text-soft { color: var(--text-soft); }
.small-cap { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.serif-i { font-family: var(--serif); font-style: italic; font-weight: 300; }
.mono { font-family: var(--mono); }

/* ===== UTIL ===== */
.rule { height: 1px; background: var(--border-strong); border: 0; margin: 32px 0; }
.row { display: flex; gap: 24px; }
.row.tight { gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.col { flex: 1; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.stack > * + * { margin-top: var(--stack, 16px); }
.center { display: flex; align-items: center; justify-content: center; }

/* ===== SECTION HEADER ===== */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 40px;
}
.section-head .label { display: flex; gap: 18px; align-items: baseline; flex-wrap: wrap; }
.section-head .num { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.section-head h2 em { font-family: var(--serif); font-style: italic; font-weight: 300; color: var(--ink-700); }
.section-head .tagline { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); text-align: right; max-width: 280px; }
.page.dark .section-head .tagline { color: rgba(255,255,255,0.55); }
.page.dark .section-head h2 em { color: var(--blue-300); }

/* ===== STAGE / CELL ===== */
.stage {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  position: relative;
  overflow: hidden;
}
.stage.padded { padding: 56px; }
.stage.tall   { min-height: 320px; }
.stage.dark   { background: var(--ink-900); border-color: var(--ink-900); color: var(--paper); }
.stage.tinted { background: var(--blue-600); border-color: var(--blue-600); color: white; }
.stage.deep   { background: var(--blue-900); border-color: var(--blue-900); color: white; }
.stage.flex   { display: flex; align-items: center; justify-content: center; }

.stage .label-tl {
  position: absolute; top: 14px; left: 18px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-soft); z-index: 2;
}
.stage.dark .label-tl, .stage.tinted .label-tl, .stage.deep .label-tl { color: rgba(255,255,255,0.6); }
.stage .label-bl {
  position: absolute; bottom: 12px; left: 18px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-soft); z-index: 2;
}
.stage.dark .label-bl, .stage.tinted .label-bl, .stage.deep .label-bl { color: rgba(255,255,255,0.55); }

/* ===== NOTES ROW ===== */
.notes {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 32px; margin-top: 36px;
  padding-top: 28px; border-top: 1px solid var(--border-strong);
}
.notes h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; font-weight: 400; }
.notes p  { font-size: 14px; color: var(--ink-700); margin: 0; }

/* ===== ORBIT ANIMATIONS ===== */
@keyframes orbit-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes orbit-counter {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}
@keyframes core-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}
@keyframes ring-pulse {
  0%   { transform: scale(1);   opacity: 0.35; }
  100% { transform: scale(1.8); opacity: 0; }
}
@keyframes trace-draw {
  0%, 12% { stroke-dashoffset: 24; opacity: 0; }
  20%     { opacity: 1; }
  60%     { stroke-dashoffset: 0; opacity: 1; }
  100%    { stroke-dashoffset: 0; opacity: 0.45; }
}
@keyframes satellite-pop {
  0%, 30% { transform: scale(0); opacity: 0; }
  60%     { transform: scale(1.4); opacity: 1; }
  100%    { transform: scale(1); opacity: 1; }
}

.orbit-anim { transform-origin: center; }
.orbit-anim .satellites-group {
  transform-origin: 32px 32px;
  animation: orbit-rotate 14s linear infinite;
}
.orbit-anim.fast .satellites-group { animation-duration: 6s; }
.orbit-anim .core { transform-origin: 32px 32px; animation: core-breathe 3.6s var(--ease-inout) infinite; }
.orbit-anim .ring { transform-origin: 32px 32px; transform-box: fill-box; }

.orbit-anim.loading .ring-pulse {
  transform-origin: 32px 32px;
  transform-box: fill-box;
  animation: ring-pulse 2.4s var(--ease-out) infinite;
}

.orbit-anim.trace .trace-line {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: trace-draw 3s var(--ease-inout) infinite;
}
.orbit-anim.trace .trace-line:nth-child(1) { animation-delay: 0s; }
.orbit-anim.trace .trace-line:nth-child(2) { animation-delay: 0.6s; }
.orbit-anim.trace .trace-line:nth-child(3) { animation-delay: 1.2s; }
.orbit-anim.trace .trace-line:nth-child(4) { animation-delay: 1.8s; }
.orbit-anim.trace .satellite { transform-origin: center; transform-box: fill-box; }
.orbit-anim.trace .satellite:nth-child(5) { animation: satellite-pop 3s var(--ease-out) infinite; animation-delay: 0.4s; }
.orbit-anim.trace .satellite:nth-child(6) { animation: satellite-pop 3s var(--ease-out) infinite; animation-delay: 1.0s; }
.orbit-anim.trace .satellite:nth-child(7) { animation: satellite-pop 3s var(--ease-out) infinite; animation-delay: 1.6s; }
.orbit-anim.trace .satellite:nth-child(8) { animation: satellite-pop 3s var(--ease-out) infinite; animation-delay: 2.2s; }

.orbit-hover { transition: transform var(--dur-3) var(--ease-out); }
.orbit-hover .satellite { transition: transform var(--dur-4) var(--ease-spring); transform-origin: 32px 32px; transform-box: view-box; }
.orbit-hover:hover .satellite:nth-child(1) { transform: translate(0, -4px); }
.orbit-hover:hover .satellite:nth-child(2) { transform: translate(4px, -2px); }
.orbit-hover:hover .satellite:nth-child(3) { transform: translate(3px, 4px); }
.orbit-hover:hover .satellite:nth-child(4) { transform: translate(-4px, 1px); }

@media (prefers-reduced-motion: reduce) {
  .orbit-anim *, .orbit-anim .core, .orbit-anim .satellites-group, .orbit-anim .ring-pulse, .orbit-anim .trace-line { animation: none !important; }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  letter-spacing: -0.005em;
  padding: 9px 16px; border-radius: var(--r-3);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
  user-select: none;
  background: transparent; color: var(--text);
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--blue-300); outline-offset: 2px; }

.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: var(--r-2); }
.btn.lg { padding: 12px 20px; font-size: 15px; }

.btn.primary { background: var(--blue-600); color: white; box-shadow: var(--shadow-sm); }
.btn.primary:hover { background: var(--blue-700); }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn.secondary:hover { background: var(--ink-50); border-color: var(--ink-300); }
.btn.ghost { background: transparent; color: var(--text); }
.btn.ghost:hover { background: var(--ink-50); }
.btn.danger { background: var(--red-500); color: white; }
.btn.danger:hover { background: var(--red-600); }
.btn.link { padding: 0; background: transparent; color: var(--cyan-600); font-weight: 500; }
.btn.link:hover { color: var(--cyan-700); text-decoration: underline; }
.btn[disabled], .btn.disabled { opacity: 0.5; pointer-events: none; }

.btn .arrow { transition: transform var(--dur-2) var(--ease-out); }
.btn:hover .arrow { transform: translateX(2px); }

/* ===== INPUTS ===== */
.field { display: flex; flex-direction: column; gap: 6px; }
.field .label { font-size: 12px; font-weight: 500; color: var(--text); letter-spacing: 0; }
.field .helper { font-size: 12px; color: var(--text-muted); }
.field .err { font-size: 12px; color: var(--red-600); }
.input {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-3); padding: 9px 12px;
  font-family: var(--sans); font-size: 14px; color: var(--text);
  transition: border-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}
.input:focus-within { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(45,107,255,0.15); }
.input input, .input select {
  flex: 1; border: 0; outline: none; background: transparent; font: inherit; color: inherit;
}
.input input::placeholder { color: var(--text-soft); }
.input.error { border-color: var(--red-500); }
.input.error:focus-within { box-shadow: 0 0 0 3px rgba(229,62,62,0.15); }

.switch {
  position: relative; width: 36px; height: 20px;
  background: var(--ink-200); border-radius: 999px;
  transition: background var(--dur-2) var(--ease-out); cursor: pointer; flex: none;
}
.switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; background: white; border-radius: 999px;
  transition: transform var(--dur-2) var(--ease-out);
  box-shadow: var(--shadow-sm);
}
.switch.on { background: var(--blue-600); }
.switch.on::after { transform: translateX(16px); }

.check {
  width: 16px; height: 16px; border-radius: 4px;
  background: var(--surface); border: 1.5px solid var(--ink-300);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.check.on { background: var(--blue-600); border-color: var(--blue-600); }
.check.on::after {
  content: ''; width: 8px; height: 4px;
  border-left: 1.5px solid white; border-bottom: 1.5px solid white;
  transform: rotate(-45deg) translate(1px, -1px);
}

/* ===== BADGES / PILLS ===== */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--ink-50); border: 1px solid var(--border);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-700); white-space: nowrap;
}
.badge .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--cyan-500); }
.badge.blue { background: var(--blue-50); color: var(--blue-700); border-color: var(--blue-100); }
.badge.cyan { background: var(--cyan-100); color: var(--cyan-700); border-color: color-mix(in oklab, var(--cyan-500) 30%, transparent); }
.badge.amber { background: var(--amber-100); color: #7a5a0c; border-color: color-mix(in oklab, var(--amber-500) 40%, transparent); }
.badge.red { background: var(--red-100); color: var(--red-600); border-color: color-mix(in oklab, var(--red-500) 35%, transparent); }
.badge.ink { background: var(--ink-900); color: var(--paper); border-color: var(--ink-900); }
.badge.outline { background: transparent; }

/* ===== AVATAR ===== */
.avatar {
  width: 28px; height: 28px; border-radius: 999px; background: var(--blue-600);
  color: white; display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 500; letter-spacing: 0; flex: none;
}
.avatar.md { width: 36px; height: 36px; font-size: 13px; }
.avatar.lg { width: 48px; height: 48px; font-size: 15px; }
.avatar.cyan { background: var(--cyan-600); }
.avatar.ink { background: var(--ink-700); }
.avatar.amber { background: var(--amber-500); color: var(--ink-900); }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar + .avatar { margin-left: -10px; box-shadow: 0 0 0 2px var(--surface); }

/* ===== TABS ===== */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); }
.tabs a {
  padding: 10px 14px; font-size: 13px; color: var(--text-muted);
  position: relative; transition: color var(--dur-2) var(--ease-out);
}
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); }
.tabs a.active::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px;
  background: var(--blue-600); border-radius: 2px;
}

.seg {
  display: inline-flex; background: var(--ink-50);
  border: 1px solid var(--border); border-radius: var(--r-3); padding: 3px;
}
.seg a {
  padding: 5px 12px; font-size: 12px; font-weight: 500; color: var(--text-muted);
  border-radius: var(--r-2); transition: all var(--dur-2) var(--ease-out);
}
.seg a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ===== CARDS ===== */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-3); padding: 20px;
}
.card.lg { padding: 28px; }
.card h4 { margin-bottom: 6px; }
.card .head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }

.stat .k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.stat .v { font-size: 32px; font-weight: 500; letter-spacing: -0.025em; line-height: 1; }
.stat .d { font-size: 12px; color: var(--cyan-600); margin-top: 6px; font-family: var(--mono); letter-spacing: 0.04em; }
.stat .d.down { color: var(--red-600); }

/* ===== SWATCHES ===== */
.swatch {
  background: var(--surface);
  border-radius: var(--r-3);
  overflow: hidden;
  border: 1px solid var(--border);
}
.swatch .chip { height: 96px; }
.swatch .meta { padding: 12px 14px; }
.swatch .name { font-weight: 500; font-size: 13px; margin-bottom: 2px; }
.swatch .hex { font-family: var(--mono); font-size: 11px; color: var(--text-muted); }
.swatch .ratio { font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-soft); margin-top: 6px; }
.swatch .ratio b { color: var(--text); font-weight: 500; }

.scale-row {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  border-radius: var(--r-3); overflow: hidden;
  border: 1px solid var(--border);
}
.scale-row .step {
  aspect-ratio: 1/1;
  display: flex; align-items: flex-end; padding: 8px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.06em;
  color: rgba(255,255,255,0.65);
}
.scale-row .step.light { color: rgba(0,0,0,0.5); }

/* ===== TYPE SCALE TABLE ===== */
.type-scale { border-top: 1px solid var(--border-strong); }
.scale-line {
  display: grid; grid-template-columns: 110px 1fr 140px;
  align-items: baseline; padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.scale-line .lbl { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--text-muted); text-transform: uppercase; }
.scale-line .ex  { color: var(--text); letter-spacing: -0.02em; font-weight: 500; }
.scale-line .px  { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--text-muted); text-align: right; }

/* ===== ICON GRID ===== */
.icon-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.icon-cell {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-3); aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; position: relative;
  transition: border-color var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out);
}
.icon-cell:hover { border-color: var(--blue-300); }
.icon-cell .name {
  position: absolute; bottom: 8px; left: 0; right: 0;
  text-align: center;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.04em; color: var(--text-soft);
}

/* ===== PATTERN BG ===== */
.constellation {
  position: relative; overflow: hidden;
}
.constellation::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 12% 18%, currentColor 1.2px, transparent 1.4px),
    radial-gradient(circle at 38% 8%,  currentColor 0.9px, transparent 1.1px),
    radial-gradient(circle at 62% 28%, currentColor 1.4px, transparent 1.6px),
    radial-gradient(circle at 88% 14%, currentColor 0.8px, transparent 1px),
    radial-gradient(circle at 22% 56%, currentColor 1.6px, transparent 1.8px),
    radial-gradient(circle at 52% 70%, currentColor 1.1px, transparent 1.3px),
    radial-gradient(circle at 78% 64%, currentColor 1.3px, transparent 1.5px),
    radial-gradient(circle at 14% 88%, currentColor 0.9px, transparent 1.1px),
    radial-gradient(circle at 44% 92%, currentColor 1.2px, transparent 1.4px),
    radial-gradient(circle at 72% 86%, currentColor 1px, transparent 1.2px);
  opacity: 0.5;
  pointer-events: none;
}

/* ===== APPLICATIONS / DEVICE FRAMES ===== */
.browser {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.browser .chrome {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--ink-50);
  border-bottom: 1px solid var(--border);
}
.browser .dots { display: flex; gap: 6px; }
.browser .dots span { width: 11px; height: 11px; border-radius: 999px; background: var(--ink-200); }
.browser .url {
  flex: 1; margin: 0 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 10px;
  font-family: var(--mono); font-size: 11px; color: var(--text-muted);
}

.phone {
  width: 280px; aspect-ratio: 9/19.5;
  border-radius: 36px;
  padding: 8px;
  background: var(--ink-900);
  border: 1px solid var(--ink-800);
  box-shadow: var(--shadow-lg);
  position: relative;
}
.phone .screen {
  width: 100%; height: 100%; border-radius: 28px; overflow: hidden;
  background: var(--surface);
  display: flex; flex-direction: column;
  position: relative;
}
.phone .screen .notch {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 84px; height: 22px; border-radius: 12px; background: var(--ink-900);
  z-index: 5;
}

/* ===== FOOTER ===== */
footer.pageend {
  padding: 64px;
  text-align: center;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted);
}