/* ============================================================================
   Cooper Audio Services — the site's design language: tokens, base, buttons,
   header and footer, and the docs typography (hero, sidebar, article, steps,
   callouts, pager).
   Shared by every site page AND bundled into the account portal
   (web/src/main.tsx). Change it here and both follow.

   This file is LIGHT ONLY and holds the shared tokens (the portal is light-only
   and its tests enforce it). Everything that is site-only lives in cas.css,
   which loads after this file and adds: dark mode, per-product accents, the
   header, the marketing sections and the form styles.
   Colors that must flip in dark mode are written as tokens here.
   Page-specific pieces (hub cards, FAQ, search, screenshots, the feedback
   form) live in support.css, which the portal does NOT load — keep form and
   field rules out of this file, or they restyle every portal form.
   ============================================================================ */

:root{
  --ink:#0e1116;
  --ink-soft:#3a424e;
  --muted:#5e6672;
  --line:#e6e8ec;
  --bg:#ffffff;
  --bg-soft:#f6f7f9;
  --bg-ink:#0e1116;
  --accent:#2f57ff;
  --accent-soft:#eef1ff;
  /* The header's Sign in / Account button: ONE colour on every page of the site and the portal (the brand's
     primary blue), whatever product accent or section the page is in. cas.css gives it the dark-mode pair. */
  --signin:#2f57ff;
  --on-signin:#ffffff;
  --tip:#15803d; --tip-bg:#e9f9ee; --tip-line:#bfead0;
  --note:#2f57ff; --note-bg:#eef1ff; --note-line:#d4ddff;
  --warn:#b45309; --warn-bg:#fff5e8; --warn-line:#f3dcb8;
  --danger:#c8323a;
  --radius:16px;
  --maxw:1180px;
  --font:-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",Inter,Roboto,Helvetica,Arial,sans-serif;
  --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:var(--font);color:var(--ink);background:var(--bg);line-height:1.6;
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
img,svg{display:block;max-width:100%}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
[id]{scroll-margin-top:128px}

.wrap{max-width:var(--maxw);margin:0 auto;padding:0 24px}

/* ---------- Buttons ---------- */
.btn{display:inline-flex;align-items:center;gap:9px;font-weight:600;font-size:15px;
  padding:12px 20px;border-radius:999px;border:1px solid transparent;cursor:pointer;
  transition:transform .15s ease,background .2s ease,border-color .2s ease;text-decoration:none}
.btn:hover{transform:translateY(-1px);text-decoration:none}
.btn-primary{background:var(--ink);color:var(--bg)}
.btn-primary:hover{background:#000}
.btn-ghost{background:transparent;color:var(--ink);border-color:var(--line)}
.btn-ghost:hover{border-color:var(--ink)}
.btn svg{width:17px;height:17px}

/* ---------- Header / nav ---------- */
header.nav{position:sticky;top:0;z-index:50;background:color-mix(in srgb,var(--bg) 82%,transparent);
  backdrop-filter:saturate(180%) blur(14px);-webkit-backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid var(--line)}
.nav-inner{display:flex;align-items:center;justify-content:space-between;height:62px;gap:18px}
.brand{display:flex;align-items:center;gap:11px;font-weight:700;letter-spacing:-.02em;font-size:18px;color:var(--ink)}
.brand:hover{text-decoration:none}
.brand .mark{width:26px;height:26px}
.nav-links{display:flex;align-items:center;gap:26px}
.nav-links a{font-size:14.5px;color:var(--ink-soft);font-weight:500}
.nav-links a:hover{color:var(--ink);text-decoration:none}
.nav-links a.active{color:var(--accent)}
.nav-cta{display:flex;align-items:center;gap:12px}
.nav-cta .btn{padding:8px 16px;font-size:14px}
/* Qualified with header.nav so the portal's own .btn rules (loaded later) can't repaint it. */
header.nav .btn-signin{background:var(--signin);color:var(--on-signin);border-color:transparent}
header.nav .btn-signin:hover{background:var(--signin);color:var(--on-signin);border-color:transparent;opacity:.9}
/* "Sign in" becomes "Account" while a portal session is stored (the head snippet
   sets html.vl-signed-in). "Account" also carries [hidden], so a stale copy of
   this file can only ever show "Sign in". */
.vl-signed-in .btn-signin .si-out{display:none}
.vl-signed-in .btn-signin .si-in{display:inline}
.menu-btn{display:none;background:none;border:0;cursor:pointer;padding:10px;margin:-10px -8px -10px 0;line-height:0;color:var(--ink)}

/* ---------- Doc hero / breadcrumb ---------- */
.doc-hero{padding:54px 0 30px;border-bottom:1px solid var(--line);background:var(--bg-soft)}
.breadcrumb{font-size:13.5px;color:var(--muted);margin-bottom:16px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.breadcrumb a{color:var(--muted)}
.breadcrumb a:hover{color:var(--ink)}
.breadcrumb .sep{opacity:.5}
.doc-hero .eyebrow{font-size:12.5px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--accent);margin-bottom:12px}
.doc-hero h1{font-size:clamp(30px,4.6vw,46px);letter-spacing:-.02em;line-height:1.08;font-weight:700}
.doc-hero p.sub{font-size:clamp(16px,1.6vw,19px);color:var(--ink-soft);max-width:680px;margin-top:14px}
.doc-hero .meta{font-size:13px;color:var(--muted);margin-top:18px}

/* ---------- Two-column doc layout (sidebar + content) ---------- */
.layout{display:grid;grid-template-columns:248px minmax(0,1fr);gap:48px;align-items:start;padding:44px 0 80px}
.toc{position:sticky;top:92px;align-self:start;max-height:calc(100vh - 110px);overflow:auto;
  font-size:14px;border-right:1px solid var(--line);padding-right:18px}
.toc .toc-title{font-size:11.5px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);margin:0 0 12px}
.toc ul{list-style:none}
.toc li{margin:0}
.toc a{display:block;padding:6px 10px;border-radius:8px;color:var(--ink-soft);font-weight:500;line-height:1.4}
.toc a:hover{background:var(--bg-soft);color:var(--ink);text-decoration:none}
.toc a.sub{padding-left:22px;font-size:13px;color:var(--muted)}
.toc a.active{background:var(--accent-soft);color:var(--accent)}
.toc .group{margin-top:14px}

/* ---------- Article typography ---------- */
.article{min-width:0;max-width:760px}
.article h2{font-size:26px;letter-spacing:-.02em;font-weight:700;margin:46px 0 14px;padding-top:8px}
.article h2:first-child{margin-top:0}
.article h2.chapter{font-size:12.5px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--accent);
  margin:70px 0 4px;padding-top:30px;border-top:2px solid var(--ink)}
.article h2.chapter:first-child{margin-top:0;padding-top:0;border-top:0}
.article h2.chapter + .doc-sec h2{margin-top:18px}
.article h3{font-size:19px;letter-spacing:-.01em;font-weight:700;margin:30px 0 10px}
.article h2 + h3{margin-top:14px}
.article p{margin:0 0 14px;color:var(--ink-soft)}
.article ul,.article ol{margin:0 0 16px;padding-left:22px;color:var(--ink-soft)}
.article li{margin:6px 0}
.article a{font-weight:500}
.article strong{color:var(--ink)}
.article .lead{font-size:18px;color:var(--ink-soft);margin-bottom:24px}
.article hr{border:0;border-top:1px solid var(--line);margin:40px 0}
.article code{font-family:var(--mono);font-size:.88em;background:var(--bg-soft);border:1px solid var(--line);
  padding:1.5px 6px;border-radius:6px;color:var(--ink)}
.article pre{background:#0e1116;color:#e7ebf2;border-radius:12px;padding:16px 18px;overflow:auto;margin:0 0 18px;
  font-family:var(--mono);font-size:13px;line-height:1.6}
.article pre code{background:none;border:0;padding:0;color:inherit;font-size:inherit}
.section-anchor{display:block;height:0}
.article h4{font-size:16px;font-weight:700;margin:22px 0 8px}
.article blockquote{border-left:3px solid var(--line);padding-left:14px;margin:0 0 16px;color:var(--muted)}
.article img{height:auto}
.article figure{margin:22px 0}
.article figure img{border:1px solid var(--line);border-radius:10px;box-shadow:0 18px 40px -24px rgba(14,17,22,.35)}
.article figcaption{font-size:13px;color:var(--muted);margin-top:8px;line-height:1.5}
.article details{margin:0 0 14px}
.article summary{cursor:pointer;font-weight:600;color:var(--ink)}

/* ---------- Doc tables ----------
   A plain <table> in an article (one with no class of its own: the legal, account-help and RyDF key tables
   keep theirs). In the account portal's beta Support pages each sits in a .doc-table box that scrolls
   sideways, so a wide table never widens a phone's page; the static site's cas.css makes the table scroll. */
.article .doc-table{overflow-x:auto;border:1px solid var(--line);border-radius:10px;margin:0 0 18px;-webkit-overflow-scrolling:touch}
.article table:not([class]){width:100%;border-collapse:collapse;margin:0 0 18px;font-size:14.5px;line-height:1.5}
.article .doc-table > table:not([class]){margin:0}
/* On a phone a table of three or more columns keeps readable columns and scrolls sideways in its box,
   rather than squeezing every column into a tall, narrow strip. */
.article .doc-table > table:not([class]):has(tr > :nth-child(3)){min-width:600px}
.article .doc-table > table:not([class]):has(tr > :nth-child(4)){min-width:720px}
.article table:not([class]) th{text-align:left;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  color:var(--muted);background:var(--bg-soft);padding:9px 14px;border-bottom:1px solid var(--line);vertical-align:bottom}
.article table:not([class]) td{padding:9px 14px;border-bottom:1px solid var(--line);color:var(--ink-soft);vertical-align:top}
.article table:not([class]) th,.article table:not([class]) td{min-width:8em}
.article table:not([class]) tr:last-child td{border-bottom:0}
.article table:not([class]) td p{margin:0 0 6px}
.article table:not([class]) td p:last-child{margin:0}

/* ---------- Steps ---------- */
ol.steps{list-style:none;counter-reset:s;padding:0;margin:18px 0 22px}
ol.steps li{counter-increment:s;position:relative;padding:0 0 16px 44px;color:var(--ink-soft)}
ol.steps li::before{content:counter(s);position:absolute;left:0;top:-2px;width:28px;height:28px;border-radius:50%;
  background:var(--ink);color:var(--bg);font-size:13.5px;font-weight:700;display:grid;place-items:center}
ol.steps li:not(:last-child)::after{content:"";position:absolute;left:13.5px;top:30px;bottom:2px;width:1.5px;background:var(--line)}
ol.steps li strong{color:var(--ink)}

/* ---------- Callouts ---------- */
.callout{border:1px solid var(--line);border-left-width:4px;border-radius:10px;padding:14px 16px;margin:18px 0;
  font-size:14.5px;color:var(--ink-soft);background:var(--bg-soft)}
.callout .lab{font-weight:700;font-size:12px;letter-spacing:.08em;text-transform:uppercase;display:block;margin-bottom:5px}
.callout p{margin:0 0 8px}.callout p:last-child{margin:0}
.callout.tip{background:var(--tip-bg);border-color:var(--tip-line);border-left-color:var(--tip)}
.callout.tip .lab{color:var(--tip)}
.callout.note{background:var(--note-bg);border-color:var(--note-line);border-left-color:var(--note)}
.callout.note .lab{color:var(--note)}
.callout.warn{background:var(--warn-bg);border-color:var(--warn-line);border-left-color:var(--warn)}
.callout.warn .lab{color:var(--warn)}

/* ---------- Keyboard / path chips ---------- */
kbd{font-family:var(--font);font-size:12.5px;font-weight:600;background:var(--bg);border:1px solid var(--line);
  border-bottom-width:2px;border-radius:6px;padding:2px 7px;color:var(--ink);white-space:nowrap}
.path{font-family:var(--mono);font-size:13px;background:var(--bg-soft);border:1px solid var(--line);
  padding:2px 7px;border-radius:6px;color:var(--ink-soft)}

/* ---------- prev/next + back-to-top ---------- */
.pager{display:flex;justify-content:space-between;gap:14px;margin-top:48px;border-top:1px solid var(--line);padding-top:24px}
.pager a{font-weight:600;font-size:15px}
.pager .nxt{margin-left:auto;text-align:right}

/* ---------- Footer ---------- */
footer{border-top:1px solid var(--line);padding:40px 0;margin-top:8px;background:var(--bg-soft)}
.foot{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:16px}
.foot .brand{font-size:16px}
.foot-links{display:flex;gap:22px;font-size:14px}
.foot-links a{color:var(--muted)}
.foot-links a:hover{color:var(--ink)}
.foot .copy{font-size:13px;color:var(--muted);width:100%}

/* ---------- Responsive ---------- */
@media(max-width:920px){
  .nav-links{display:none;position:absolute;top:100%;left:0;right:0;flex-direction:column;align-items:stretch;gap:0;
    background:color-mix(in srgb,var(--bg) 98%,transparent);backdrop-filter:saturate(180%) blur(14px);-webkit-backdrop-filter:saturate(180%) blur(14px);
    border-bottom:1px solid var(--line);padding:6px 0;box-shadow:0 16px 30px -20px rgba(14,17,22,.4)}
  .nav-links.open{display:flex}
  .nav-links a{padding:13px 24px;font-size:15px}
  .menu-btn{display:block}
  .layout{grid-template-columns:1fr;gap:0;padding:28px 0 64px}
  .toc{position:static;max-height:none;overflow:visible;border-right:0;border-bottom:1px solid var(--line);
    padding:0 0 18px;margin-bottom:28px}
  .toc ul{columns:2;column-gap:18px}
  .article{max-width:none}
}
@media(max-width:560px){
  .toc ul{columns:1}
}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* "Where next" buttons at the end of quick starts and FAQs. */
.doc-next{display:flex;flex-wrap:wrap;gap:12px;margin:36px 0 12px}
