/* ===========================================================================
   voltionX — brand tokens and type scale
   ---------------------------------------------------------------------------
   One source of truth for colour, spacing, radius and typography. Every page
   links this first, then adds only what is specific to that page.

   Why this file exists: the pages used to each carry their own :root block,
   and they drifted -- body text was 16px on one page and 15px on the next,
   headings ran 34px/38px, labels 10px/12.5px/13px, and three different reds
   were all called "bad". Anything defined here must NOT be redefined in a
   page, or the drift comes straight back.
   =========================================================================== */

:root{
  /* ---- brand palette ---- */
  --navy:#0A1633;          /* headings, strongest text */
  --ink:#0F1B33;           /* body text */
  --slate:#64748B;         /* secondary text, labels */
  --line:#E6EDF7;          /* hairlines, borders */
  --white:#FFFFFF;

  --blue-50:#EFF5FF;
  --blue-100:#DBE8FE;
  --blue-200:#BFD5FE;
  --blue-400:#5B93FB;
  --blue-500:#0B5FFF;      /* primary action */
  --blue-600:#0748C4;

  --ok:#0E9F6E;
  --warn:#B54708;
  --bad:#D92D20;

  /* ---- surfaces ---- */
  --glass:rgba(255,255,255,.66);
  --shadow-sm:0 2px 8px -2px rgba(10,22,51,.08);
  --shadow:0 10px 40px -12px rgba(10,22,51,.16);
  --shadow-lg:0 30px 70px -22px rgba(10,22,51,.28);

  /* ---- shape ---- */
  --r:20px;
  --r-sm:12px;

  /* ---- type ---- */
  --sans:"Plus Jakarta Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  --mono:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,monospace;

  /* One scale, used everywhere. Sizes are the rendered px value. */
  --t-h1:38px;
  --t-h2:26px;
  --t-h3:17px;
  --t-body:15px;
  --t-lead:17px;
  --t-small:13.5px;   /* helper text under a field, captions */
  --t-micro:12.5px;   /* the smallest text that is still prose */
  --t-label:11px;     /* uppercase mono labels and table headers */
  --t-code:13px;

  /* Line height goes down as text gets bigger. */
  --lh-tight:1.15;    /* h1 */
  --lh-head:1.25;     /* h2, h3 */
  --lh-body:1.65;     /* paragraphs */
  --lh-code:1.75;

  --ls-head:-.02em;   /* headings tighten */
  --ls-label:.11em;   /* uppercase labels open up */
}

/* ===========================================================================
   Base typography — shared by every light-themed page.
   The dark Live Scanner opts out by not linking this file.
   =========================================================================== */

*{box-sizing:border-box}

body{
  margin:0;
  font-family:var(--sans);
  font-size:var(--t-body);
  line-height:var(--lh-body);
  color:var(--ink);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  overflow-x:hidden;
}

h1,h2,h3,h4{
  color:var(--navy);
  font-weight:800;
  letter-spacing:var(--ls-head);
  /* Headings own the space above them, never the space below -- that keeps
     the gap between a heading and its first paragraph constant. */
  margin:0 0 12px;
}
h1{font-size:var(--t-h1);line-height:var(--lh-tight)}
h2{font-size:var(--t-h2);line-height:var(--lh-head);margin-top:44px}
h3{font-size:var(--t-h3);line-height:var(--lh-head);margin-top:26px;font-weight:700}
h2:first-child,h3:first-child{margin-top:0}

p{margin:0 0 14px}
p:last-child{margin-bottom:0}

ul,ol{margin:0 0 14px;padding-left:22px}
li{margin-bottom:6px}
li:last-child{margin-bottom:0}

a{color:var(--blue-500);text-decoration:none}
/* ...but a link inside prose still has to look like a link. */
p a,li a,td a,.note a,.lead a{text-decoration:underline;text-underline-offset:2px}
a:hover{text-decoration-color:var(--blue-400)}

.lead{font-size:var(--t-lead);line-height:1.6;color:var(--slate);max-width:62ch}
.muted{color:var(--slate)}
.small{font-size:var(--t-small)}

/* Uppercase mono labels: form fields, table headers, section eyebrows. */
label,.eyebrow{
  display:block;
  font-family:var(--mono);
  font-size:var(--t-label);
  letter-spacing:var(--ls-label);
  text-transform:uppercase;
  color:var(--slate);
  margin-bottom:7px;
}

code{
  font-family:var(--mono);
  font-size:.88em;
  background:var(--blue-50);
  color:var(--blue-600);
  padding:2px 6px;
  border-radius:5px;
  overflow-wrap:anywhere;
}
pre{
  margin:0 0 14px;
  background:#0C1B2E;
  border-radius:var(--r-sm);
  padding:18px 20px;
  overflow-x:auto;
  font-family:var(--mono);
  font-size:var(--t-code);
  line-height:var(--lh-code);
  color:#CBD9EC;
}
pre code{background:none;color:inherit;padding:0;font-size:inherit;border-radius:0}

/* Tables: numbers and short values, so they sit on one line where possible. */
table{width:100%;border-collapse:collapse;font-size:var(--t-small)}
th{
  text-align:left;
  font-family:var(--mono);
  font-size:var(--t-label);
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--slate);
  font-weight:600;
  padding:10px 12px;
  border-bottom:1px solid var(--line);
  white-space:nowrap;
}
td{padding:11px 12px;border-bottom:1px solid var(--line);vertical-align:top}
tr:last-child td{border-bottom:none}
.tscroll{overflow-x:auto;-webkit-overflow-scrolling:touch}

/* Inputs share one size so forms line up across pages. */
input,select,textarea{
  width:100%;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--r-sm);
  padding:12px 14px;
  font-family:var(--sans);
  font-size:14.5px;
  line-height:1.4;
  color:var(--ink);
  transition:border-color .18s, box-shadow .18s;
}
input:focus,select:focus,textarea:focus{
  outline:none;
  border-color:var(--blue-400);
  box-shadow:0 0 0 3px rgba(91,147,251,.18);
}
input::placeholder,textarea::placeholder{color:#9AACC6}

/* One button, three weights. */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  font-family:var(--sans);font-weight:700;font-size:14.5px;line-height:1;
  /* Pill buttons are the established brand shape -- keep every page on it. */
  border:none;cursor:pointer;border-radius:999px;
  padding:12px 22px;min-height:44px;
  color:var(--white);
  background:linear-gradient(135deg,#2E6FEF,var(--blue-500));
  box-shadow:0 8px 20px -10px rgba(11,95,255,.8);
  transition:transform .12s, box-shadow .18s, opacity .15s;
  text-decoration:none;
}
.btn:hover{transform:translateY(-1px)}
.btn:active{transform:translateY(0)}
.btn.ghost{background:var(--glass);color:var(--navy);
  border:1px solid rgba(255,255,255,.9);box-shadow:var(--shadow-sm)}
.btn.sm{padding:9px 17px;min-height:38px;font-size:13.5px}
.btn.full{width:100%}
.btn:disabled{opacity:.5;cursor:default;transform:none;box-shadow:none}

/* Tab bar: one job per tab, used by the admin console and the customer portal. */
.tabbar{display:flex;gap:8px;margin:26px 0 18px;flex-wrap:wrap}
.tab{
  font-family:var(--sans);font-size:13.5px;font-weight:600;color:var(--slate);
  background:rgba(255,255,255,.55);border:1px solid var(--line);border-radius:999px;
  padding:9px 18px;min-height:38px;cursor:pointer;
  display:inline-flex;align-items:center;gap:8px;
  transition:color .15s,border-color .15s,background .15s;
}
.tab:hover{color:var(--navy);border-color:var(--blue-200)}
.tab.on{background:var(--blue-500);color:var(--white);border-color:var(--blue-500)}
.badge{background:#FF5A5F;color:var(--white);font-size:10px;font-weight:700;
  border-radius:999px;padding:2px 7px;line-height:1.4}
.tab.on .badge{background:rgba(255,255,255,.25)}
.tabpage{display:none}
.tabpage.on{display:block}

/* Small status pills. */
.chip{
  display:inline-block;font-family:var(--mono);font-size:var(--t-label);
  letter-spacing:.06em;padding:4px 9px;border-radius:99px;
  background:var(--blue-50);color:var(--blue-600);border:1px solid var(--blue-100);
}
.chip.ok{background:#E9F9F1;color:var(--ok);border-color:#BFE9D5}
.chip.warn{background:#FFF6E9;color:var(--warn);border-color:#F6DDB8}
.chip.bad{background:#FDECEA;color:var(--bad);border-color:#F5C6C2}

/* Callout used on the docs pages. */
.note{
  background:var(--blue-50);border:1px solid var(--blue-100);
  border-radius:var(--r-sm);padding:14px 16px;
  font-size:var(--t-small);line-height:1.6;color:#2A3F5F;margin:16px 0;
}
.note b{color:var(--navy);font-weight:600}
.note.warn{background:#FFF7ED;border-color:#F6DDB8;color:#6B4A1B}
.note.warn b{color:#8A5A16}

.err{color:var(--bad);font-size:var(--t-small);min-height:18px}
.mono{font-family:var(--mono)}
.right{text-align:right}
.nowrap{white-space:nowrap}

/* Visible to screen readers, not on screen. Used where a section needs a
   heading for structure but the design doesn't show one. */
.sr-only{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;
}
.hide{display:none!important}

/* ---------------------------------------------------------------------------
   Mobile. iOS Safari zooms the page whenever a focused field is under 16px,
   so every input goes to 16px on small screens regardless of its desktop size.
   --------------------------------------------------------------------------- */
@media(max-width:600px){
  :root{
    --t-h1:28px;
    --t-h2:21px;
    --t-h3:16px;
    --t-lead:15.5px;
  }
  input,select,textarea{font-size:16px}
  .btn{min-height:46px}
  .tabbar{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;
    margin:18px -16px 14px;padding:0 16px 4px;scrollbar-width:none}
  .tabbar::-webkit-scrollbar{display:none}
  .tab{white-space:nowrap;flex:none}
  h2{margin-top:36px}
  pre{padding:15px 16px;font-size:12.5px}
  th,td{padding:9px 10px}
}

@media (prefers-reduced-motion:reduce){
  *{animation:none!important;transition:none!important}
}
