/* AroraMSP — shared styles */
:root {
  --bg: #0f1117;
  --bg-1: #12151d;
  --bg-2: #171a23;
  --bg-3: #1d212c;
  --line: #242936;
  --line-2: #2e3344;
  --fg: #e7eaf0;
  --fg-dim: #a6acbb;
  --fg-mute: #6b7184;
  --accent: #0078d4;
  --accent-soft: color-mix(in oklab, var(--accent) 20%, transparent);
  --accent-line: color-mix(in oklab, var(--accent) 40%, transparent);
  --cyan: #22d3ee;
  --cyan-soft: color-mix(in oklab, var(--cyan) 20%, transparent);
  --cyan-line: color-mix(in oklab, var(--cyan) 40%, transparent);
  --good: #10b981;
  --warn: #d29922;
  --red: #f85149;
  --radius: 10px;
  --radius-sm: 6px;
  --maxw: 1200px;
  --pad: clamp(20px, 4vw, 40px);
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --nav-h: 72px;
}
[data-density="compact"] { --pad: clamp(16px, 3vw, 28px); }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  display: flex; flex-direction: column;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-soft); color: var(--fg); }

/* Grid bg */
.grid-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 0%, transparent 70%);
  opacity: .35;
}
body[data-grid="off"] .grid-bg { display: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); position: relative; z-index: 1; width: 100%; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(10px);
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--nav-h); padding: 16px 0; }
.brand { display: flex; align-items: center; gap: 10px; height: 100%; color: var(--fg); }
.brand-icon { width: 32px; height: 32px; display: block; flex-shrink: 0; }
.brand-word { font-family: var(--sans); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; color: var(--fg); line-height: 1; }
.brand-msp { font-weight: 300; color: var(--accent); letter-spacing: 0.02em; margin-left: 1px; }
.nav-links { display: flex; gap: 28px; font-family: var(--mono); font-size: 13px; color: var(--fg-dim); }
.nav-links a { position: relative; padding: 4px 0; }
.nav-links a:hover { color: var(--fg); }
.nav-links a[aria-current="page"] { color: var(--fg); }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -22px; height: 1px; background: var(--cyan);
}
.nav-cta {
  font-family: var(--mono); font-size: 13px;
  padding: 8px 14px; border-radius: 8px;
  background: var(--accent); color: white;
  border: 1px solid color-mix(in oklab, white 15%, var(--accent));
  transition: filter .15s ease;
}
.nav-cta:hover { filter: brightness(1.1); }
@media (max-width: 820px) { .nav-links { display: none; } }

/* Main + page */
main { flex: 1; display: flex; flex-direction: column; position: relative; z-index: 1; }
.page {
  padding: clamp(24px, 3vw, 40px) 0 clamp(40px, 5vw, 64px);
  flex: 1; display: flex; flex-direction: column;
}
.page.center { justify-content: center; }

.page-head { margin-bottom: clamp(20px, 2.5vw, 32px); max-width: 720px; }
.sec-label {
  font-family: var(--mono); font-size: 12px; color: var(--cyan);
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.sec-label::before { content: ""; width: 18px; height: 1px; background: var(--cyan); }
.page-head h2 {
  font-size: clamp(28px, 3.8vw, 44px); margin: 0 0 12px;
  letter-spacing: -0.02em; line-height: 1.1; font-weight: 600; color: var(--fg);
}
.page-head p { color: var(--fg-dim); margin: 0; font-size: 16px; max-width: 60ch; }

/* Buttons */
.btn {
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  padding: 12px 18px; border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px;
  transition: filter .15s ease, background .2s, border-color .2s;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: white; border-color: color-mix(in oklab, white 15%, var(--accent)); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost { background: var(--bg-1); color: var(--fg); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--bg-2); }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* Footer — two rows */
footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 20px; font-family: var(--mono); font-size: 12px; color: var(--fg-mute);
  flex-shrink: 0; margin-top: auto;
}
body[data-page="home"] footer { display: block; }
.foot-top {
  display: flex; flex-wrap: wrap; gap: 18px;
  justify-content: space-between; align-items: center;
  padding-bottom: 14px; margin-bottom: 14px;
  border-bottom: 1px dashed var(--line);
}
.foot-copy { display: flex; flex-direction: column; gap: 4px; color: var(--fg-dim); }
.foot-copy .sm { color: var(--fg-mute); font-size: 11px; }
.foot-links { display: flex; gap: 22px; }
.foot-links a:hover { color: var(--fg); }
.foot-bottom {
  text-align: center; color: var(--fg-mute); font-size: 11px;
  letter-spacing: .06em; text-transform: uppercase;
}
.foot-bottom .dot { color: var(--good); }

/* Tweaks panel */
.tweaks {
  position: fixed; right: 20px; bottom: 20px; z-index: 100;
  width: 280px; background: var(--bg-1);
  border: 1px solid var(--line-2); border-radius: 12px;
  font-family: var(--mono); font-size: 12px;
  box-shadow: 0 20px 40px -20px rgba(0,0,0,.8);
  display: none;
}
.tweaks.open { display: block; }
.tweaks-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  color: var(--fg-mute); text-transform: uppercase; letter-spacing: .06em; font-size: 10px;
}
.tweaks-head .close { cursor: pointer; }
.tweaks-head .close:hover { color: var(--fg); }
.tweaks-body { padding: 14px; display: flex; flex-direction: column; gap: 16px; }
.tweak-group > label { display: block; color: var(--fg-dim); margin-bottom: 8px; font-size: 11px; }
.swatch-row { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 24px; height: 24px; border-radius: 6px; cursor: pointer; border: 2px solid transparent; transition: border-color .15s; }
.swatch.active { border-color: var(--fg); }
.seg { display: flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px; }
.seg button { flex: 1; background: none; border: none; color: var(--fg-mute); font-family: var(--mono); font-size: 11px; padding: 6px 8px; border-radius: 4px; cursor: pointer; transition: all .15s; }
.seg button.active { background: var(--accent); color: white; }
.tweak-toggle { display: flex; align-items: center; justify-content: space-between; color: var(--fg-dim); cursor: pointer; font-size: 11px; }
.tg { width: 32px; height: 18px; background: var(--bg-3); border-radius: 20px; position: relative; transition: background .2s; }
.tg::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--fg-mute); transition: all .2s; }
.tweak-toggle[data-on="true"] .tg { background: var(--accent); }
.tweak-toggle[data-on="true"] .tg::after { left: 16px; background: white; }
