/* Orbitsave — shared design system.
   One source of truth for tokens + primitives. Used by the engine-rendered pages
   (/report, /tool, /account, /admin) and the static trust/legal pages. */

:root {
  --bg: #f8fbff;
  --ink: #071334;
  --text: #26395e;
  --muted: #607296;
  --dim: #7585a6;
  --blue: #1559db;
  --blue-2: #158ac6;
  --teal: #13c6b6;
  --edge: #d8e8f8;
  --edge-2: #dceaf8;
  --gut: 32px;
  --max: 1000px;
  --serif: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

.page {
  position: relative; min-height: 100vh;
  background:
    radial-gradient(ellipse 48% 24% at 88% 6%, rgba(212,239,255,.75), transparent 85%),
    radial-gradient(ellipse 44% 22% at -11% 46%, rgba(213,239,255,.7), transparent 85%),
    radial-gradient(ellipse 42% 30% at 86% 82%, rgba(216,241,255,.5), transparent 82%),
    linear-gradient(180deg, #f8fcff 0%, #fff 42%, #f6fbff 73%, #fff 100%);
}

/* ---------- layout ---------- */
.shell {
  width: min(var(--max), 100%); margin-inline: auto;
  padding-left: max(var(--gut), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gut), env(safe-area-inset-right, 0px));
}
.wide { --max: 1120px; }

/* ---------- header ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 96px; padding-block: 18px;
}
.topbar .brand { display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.topbar .brand img { width: 186px; height: auto; display: block; }
.topbar nav { display: flex; align-items: center; gap: 20px; }
.topbar nav a { color: var(--text); font-size: 14.5px; font-weight: 500; }
.topbar nav a:hover { color: var(--blue); text-decoration: none; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px; white-space: nowrap;
  background: linear-gradient(135deg,#eff7ff,#dcecff); border: 1px solid #bad7ff;
  color: #174582; font-size: 12px; font-weight: 700; border-radius: 100px;
}

/* ---------- type ---------- */
h1 { font: 400 clamp(2rem,4vw,2.9rem)/1.1 var(--serif); letter-spacing: -.03em; margin: 30px 0 10px; }
h2 { font: 400 1.45rem/1.2 var(--serif); letter-spacing: -.02em; margin: 34px 0 10px; }
h3 { font-weight: 600; font-size: 1.02rem; margin: 22px 0 6px; }
.lede { color: #3c5077; max-width: 660px; margin: 0 0 8px; }
.muted { color: var(--muted); }
.dim2 { color: var(--dim); font-size: 12.8px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; border-radius: 100px; padding: 7px 15px;
  border: 1px solid #b8d6ff; background: linear-gradient(120deg,#f0f7ff,#dcecff);
  font-size: 13px; font-weight: 700; color: #1556af; letter-spacing: .02em;
}
.eyebrow i { width: 9px; height: 9px; background: #1685e8; border: 2px solid #d1e8ff;
  box-shadow: 0 0 0 3px rgba(20,121,226,.13); border-radius: 50%; }

/* ---------- prose (legal / docs) ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 34px; }
.prose h3 { margin-top: 24px; }
.prose p, .prose li { color: var(--text); }
.prose ul { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--ink); }
.prose .updated { color: var(--dim); font-size: 13px; }
blockquote {
  margin: 18px 0; padding: 14px 18px; border-left: 3px solid var(--teal);
  background: #f2fbfa; color: var(--text); border-radius: 0 10px 10px 0;
}

/* ---------- cards ---------- */
.card {
  border: 1px solid var(--edge); border-radius: 16px; padding: 22px; margin: 18px 0;
  background: linear-gradient(142deg, rgba(255,255,255,.96), rgba(248,252,255,.9));
  box-shadow: 0 14px 38px rgba(39,86,143,.06);
}
.card h2 { margin-top: 0; }
.card.tight { padding: 16px 18px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 11px; justify-content: center;
  background: linear-gradient(105deg,#245bea,#158ac6); color: #fff; font-weight: 700;
  text-decoration: none; padding: 13px 20px; border: 1px solid #4f9fe4; border-radius: 10px;
  box-shadow: 0 8px 20px rgba(43,104,211,.16); font-size: 15px;
}
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn:focus-visible { outline: 3px solid rgba(49,120,223,.4); outline-offset: 2px; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid #cfe0f2;
  box-shadow: 0 4px 12px rgba(30,71,113,.06); font-weight: 600; }
.btn.sm { padding: 9px 14px; font-size: 13.5px; }
.btn.danger { background: #fff; color: #ba3155; border-color: #f0c3d0; }

/* ---------- forms ---------- */
label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=search], select, textarea {
  width: 100%; height: 52px; border-radius: 10px; border: 1px solid #d8e2ee; background: #fff;
  box-shadow: 0 4px 12px rgba(30,71,113,.065); padding: 0 16px; outline: 0;
}
textarea { height: auto; min-height: 110px; padding: 12px 16px; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: #8696b3; }
input:focus, select:focus, textarea:focus { border-color: #4585e7; box-shadow: 0 0 0 4px rgba(49,120,223,.12); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > * { min-width: 0; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14.8px; margin: 12px 0; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid #e6eef8; vertical-align: top; }
th { color: #475d85; font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; }
td.num, th.num { text-align: right; }
tbody tr:hover { background: #f7fbff; }

/* ---------- product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px,1fr)); gap: 18px; margin-top: 18px; }
.item { border: 1px solid var(--edge); border-radius: 15px; overflow: hidden; background: #fff;
  box-shadow: 0 14px 38px rgba(39,86,143,.06); display: flex; flex-direction: column; }
.item img { width: 100%; aspect-ratio: 1/1; object-fit: cover; background: #eef5fd; }
.item .b { padding: 12px; }
.item .t { font-size: 13.5px; color: var(--text); height: 3.6em; overflow: hidden; line-height: 1.35; }
.price { font-weight: 700; color: var(--ink); }

/* ---------- code ---------- */
code { font: 13px ui-monospace, SFMono-Regular, Consolas, monospace; background: #eaf2fb;
  padding: 2px 6px; border-radius: 5px; color: #19406e; }
pre { background: #0d1b33; color: #dbe7f7; padding: 16px 18px; border-radius: 12px; overflow: auto;
  font: 13px ui-monospace, SFMono-Regular, Consolas, monospace; line-height: 1.6; }
pre code { background: none; color: inherit; padding: 0; }

/* ---------- status / badges ---------- */
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 100px; }
.badge.ok { background: #e4f8f5; color: #087e7c; }
.badge.warn { background: #fff4e5; color: #9a5b00; }
.badge.bad { background: #fdeaef; color: #ba3155; }
.notice { border: 1px solid #ffe3b8; background: #fff9ee; color: #7a4c00;
  border-radius: 12px; padding: 14px 16px; margin: 16px 0; font-size: 14.5px; }

/* ---------- brand rules ----------
   Rule 1: the ice horizon sits above the footer on EVERY page — identical to the coming-soon page.
   Rule 2: the earth-orbits art appears near the top (or middle) of CLIENT-FACING pages only. */
.horizon {
  height: 170px; position: relative; z-index: 1; margin-top: -27px;
  background: linear-gradient(180deg, transparent, #f1f8ff 87%, #fff);
}
.horizon::after {
  content: ''; position: absolute; inset: 0;
  background: url('/assets/ice-horizon.webp') center bottom / 100% 100% no-repeat;
  opacity: .94;
}
/* the orbits art is never alone: it pairs with the page's message as a hero */
.hero-split {
  display: grid; grid-template-columns: 1.08fr .92fr; gap: 30px; align-items: center;
  margin: 6px 0 26px;
}
.hero-split .hero-copy { min-width: 0; }
.hero-split h1 { margin-top: 0; }
.hero-split .hero-art { pointer-events: none; }
.hero-split .hero-art img { display: block; width: min(360px, 100%); height: auto; margin-left: auto; }
.orbits-band { position: relative; margin: 26px auto 0; width: min(620px, 94%); }
.orbits-band img { display: block; width: 100%; height: auto; opacity: .97; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--edge-2); background: rgba(255,255,255,.85); margin-top: 56px; }
footer .shell { display: flex; gap: 18px; align-items: center; justify-content: space-between;
  min-height: 83px; padding-block: 16px; color: #586a89; font-size: 12.6px; flex-wrap: wrap; }
footer a { color: #243a67; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

@media (max-width: 790px) { .horizon { height: 135px; margin-top: -25px; } }
@media (max-width: 500px) { .horizon { height: 110px; } }

@media (max-width: 860px) {
  .hero-split { grid-template-columns: 1fr; gap: 10px; margin-bottom: 18px; }
  .hero-split .hero-art { order: -1; }
  .hero-split .hero-art img { width: min(300px, 72%); margin: 0 auto; }
}

@media (max-width: 640px) {
  :root { --gut: 20px; }
  .topbar { min-height: 80px; }
  .topbar .brand img { width: 160px; }
  .topbar nav { gap: 14px; }
}
