/* QueueSim site layer (2026-09-27), docs/brand-style-guide.md.
   Loads AFTER each page's own <style>, so rules here win at equal specificity.
   Every page carries body.qs.

   Parts:  nav / footer (same markup on every page)
           type (text-wrap: headings balance, prose pretty)
           buttons  .btn.btn-primary (caramel, one per section) | .btn-outline | .qs-textlink
           bands    .qs-ground | .qs-ground-2 | .qs-warm (Deep Q closer)
           page     .qs-page-hero, .qs-wrap, .qs-cards
   No light bands anywhere: sections step between espresso tones, and the
   Deep Q closer (2.6:1 against espresso) is the only color band. */

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body.qs { background: var(--ground); color: var(--on-ground); overflow-x: clip; -webkit-font-smoothing: antialiased; }

/* ── Type ── */
body.qs h1, body.qs h2, body.qs h3, body.qs h4 { text-wrap: balance; font-family: var(--font-display); }
body.qs p, body.qs li, body.qs dd, body.qs figcaption, body.qs td, body.qs blockquote { text-wrap: pretty; }
body.qs code, body.qs pre, body.qs kbd { font-family: var(--font-mono); }
body.qs :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
/* links in running text are underlined: color is never the only cue */
body.qs p a:not([class]), body.qs li a:not([class]), body.qs td a:not([class]) {
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}

/* ── Buttons: caramel is the one action; outlines for the rest ── */
body.qs .btn, body.qs a.btn-primary, body.qs button.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 1.2; letter-spacing: 0;
  padding: 13px 24px; min-height: 46px; border-radius: 8px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
body.qs .btn { text-transform: none; letter-spacing: 0; }
body.qs .btn-primary, body.qs .btn-upsell {
  background: var(--action) !important; color: var(--on-action) !important; border: 0 !important; filter: none;
}
body.qs .btn-primary:hover, body.qs .btn-upsell:hover { background: var(--action-hi) !important; text-decoration: none; }
body.qs .btn-outline {
  background: transparent; color: var(--on-ground); border: 1.5px solid var(--accent);
}
body.qs .btn-outline:hover { background: rgba(74,144,217,0.1); text-decoration: none; }
/* quiet text link with an arrow: the "second action" of a section */
body.qs .qs-textlink {
  font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--on-ground);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px;
}
body.qs .qs-textlink::after { content: ' \2192'; color: var(--accent); }
body.qs .qs-textlink:hover { text-decoration-thickness: 2.5px; }
.qs-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 26px; }
.qs-actions.center { justify-content: center; }

/* ── Nav (same markup on every page) ── */
nav.qs-nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 12px;
  height: 64px; padding: 0 max(16px, 4vw);
  background: rgba(20,18,16,0.96); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.qs-logo {
  display: inline-flex; align-items: baseline; flex: none; text-decoration: none !important;
  font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.5px; color: #E2E8F0; line-height: 1;
}
.qs-logo .q, .qs-logo .sim { font-family: var(--font-script); font-weight: 400; color: var(--q-blue); letter-spacing: 0; }
.qs-logo .q { font-size: 36px; }
.qs-logo .sim { font-size: 36px; margin-left: 2px; }
.qs-nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.qs-nav-links a {
  font-family: var(--font-mono); font-weight: 500; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--on-ground-2); text-decoration: none; padding: 8px 12px; border-radius: 6px; white-space: nowrap;
}
.qs-nav-links a:hover { color: var(--on-ground); background: rgba(74,144,217,0.1); text-decoration: none; }
.qs-nav-links a[aria-current="page"] { color: var(--on-ground); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.qs-nav-links a.qs-nav-talk { margin-left: 8px; color: var(--on-ground); border: 1.5px solid var(--accent); }
.qs-nav-toggle {
  display: none; margin-left: auto; background: transparent; color: var(--on-ground); cursor: pointer;
  border: 1px solid var(--rule-strong); border-radius: 8px; font-family: var(--font-mono); font-size: 14px;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 9px 12px; min-height: 40px;
}
body.qs nav.qs-nav .loading { margin-left: 12px; }
/* Four links + logo need ~760px; below that, a menu button. */
@media (max-width: 820px) {
  .qs-nav-toggle { display: block; }
  .qs-nav-links { display: none; }
  .qs-nav-links.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    background: rgba(20,18,16,0.98); padding: 10px 16px 16px; border-bottom: 1px solid var(--rule);
  }
  .qs-nav-links.open a { padding: 12px 8px; font-size: 15px; }
  .qs-nav-links.open a.qs-nav-talk { margin: 8px 0 0; text-align: center; }
}

/* ── Footer (same markup on every page) ── */
body.qs footer.qs-footer {
  background: var(--ground); border-top: 1px solid var(--rule); padding: 36px max(16px, 5vw) 40px;
  font-family: var(--font-mono); font-size: 14px; line-height: 1.7; color: var(--on-ground-3); text-align: center;
}
body.qs footer.qs-footer p { margin: 0 0 8px; }
body.qs footer.qs-footer a { color: var(--on-ground-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule-strong); }
body.qs footer.qs-footer a:hover { color: var(--on-ground); text-decoration-color: var(--accent); }
body.qs footer.qs-footer .qs-foot-links a { margin: 0 4px; }

/* ── Sections ── */
.qs-ground   { background: var(--ground); }
.qs-ground-2 { background: var(--ground-2); }
.qs-section  { padding: 88px max(16px, 5vw); }
.qs-section.tight { padding-top: 56px; padding-bottom: 56px; }
.qs-wrap { max-width: 1120px; margin: 0 auto; }
.qs-wrap.narrow { max-width: 760px; }
.qs-eyebrow {
  display: block; font-family: var(--font-mono); font-weight: 500; font-size: 14px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 14px;
}
.qs-h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; letter-spacing: -0.8px; color: var(--on-ground); margin: 0 0 16px; }
.qs-lede { font-family: var(--font-text); font-size: 18px; line-height: 1.65; color: var(--on-ground-2); max-width: 64ch; margin: 0; }
.qs-center { text-align: center; }
.qs-center .qs-lede { margin-left: auto; margin-right: auto; }

/* Deep Q closer: the one color band, eased in with a curve */
.qs-warm {
  background: var(--warm); color: var(--on-warm); border-radius: 0 0 120px 0;
  --text: var(--on-warm); --text-dim: var(--on-warm); --text-faint: #D5DDE6;
}
.qs-warm .qs-h2 { color: #FAF8F3; }
.qs-warm .qs-lede, .qs-warm p { color: var(--on-warm); }
.qs-warm .qs-eyebrow { color: #D5E4F3; }
.qs-warm .qs-textlink { color: #FAF8F3; text-decoration-color: #FAF8F3; }
.qs-warm .qs-textlink::after { color: #FAF8F3; }
.qs-curve { display: block; width: 100%; height: 48px; }
@media (max-width: 700px) { .qs-warm { border-radius: 0 0 56px 0; } .qs-curve { height: 28px; } }

/* Cards on the ground: icon in an outlined circle, one text link each */
.qs-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
.qs-card {
  background: var(--ground-3); border: 1px solid var(--rule); border-radius: var(--radius); padding: 26px 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.qs-card h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; color: var(--on-ground); margin: 4px 0 0; line-height: 1.25; }
.qs-card p { font-family: var(--font-text); font-size: 16px; line-height: 1.6; color: var(--on-ground-2); margin: 0; flex: 1; }
.qs-card .qs-textlink { font-size: 15px; margin-top: 6px; align-self: flex-start; }
.qs-icon {
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--accent);
  display: inline-flex; align-items: center; justify-content: center; color: var(--accent);
}
.qs-icon svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.75; fill: none; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) { .qs-cards { grid-template-columns: 1fr; } }

/* Short page hero (content pages) */
.qs-page-hero { padding: 72px max(16px, 5vw) 56px; text-align: center; }
.qs-page-hero h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 4.6vw, 52px); line-height: 1.1; letter-spacing: -1.2px; color: var(--on-ground); margin: 0 auto 18px; max-width: 18em; }
.qs-page-hero h1 em { font-style: normal; color: var(--accent); }
.qs-page-hero .qs-lede { margin: 0 auto; }
@media (max-width: 600px) { .qs-page-hero { padding: 48px 16px 40px; } .qs-lede { font-size: 17px; } }

/* Forms on the ground */
.qs-form label { display: block; font-family: var(--font-mono); font-size: 14px; font-weight: 500; color: var(--on-ground-2); margin: 0 0 6px; }
.qs-form input[type=text], .qs-form input[type=email] {
  width: 100%; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--rule-strong); background: var(--ground);
  color: var(--on-ground); font-family: var(--font-text); font-size: 16px; margin: 0 0 16px;
}
.qs-form input::placeholder { color: var(--on-ground-3); }
.qs-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

/* ── Legal pages (privacy, terms, license): short hero, one reading column on the ground ── */
body.qs.qs-legal main { max-width: 780px; margin: 0 auto; padding: 56px 24px 88px; background: none; border: 0; border-radius: 0; }
body.qs.qs-legal main h1 { font-family: var(--font-display); font-size: clamp(32px, 4vw, 44px); line-height: 1.1; letter-spacing: -1px; color: var(--on-ground); margin: 0 0 10px; }
body.qs.qs-legal .subtitle { font-family: var(--font-mono); font-size: 14px; color: var(--on-ground-3); margin-bottom: 36px; }
body.qs.qs-legal main h2 { font-family: var(--font-display); font-size: 22px; color: var(--on-ground); margin: 40px 0 12px; letter-spacing: -0.3px; }
body.qs.qs-legal main h3 { font-family: var(--font-display); font-size: 17px; color: var(--on-ground); margin: 22px 0 8px; }
body.qs.qs-legal main p, body.qs.qs-legal main li { font-family: var(--font-text); font-size: 16px; line-height: 1.7; color: var(--on-ground-2); margin-bottom: 12px; }
body.qs.qs-legal main strong { color: var(--on-ground); }
body.qs.qs-legal main code { font-family: var(--font-mono); font-size: 14px; background: var(--ground-3); color: var(--on-ground); padding: 1px 6px; border-radius: 4px; overflow-wrap: anywhere; }
body.qs.qs-legal main table { font-family: var(--font-text); font-size: 14px; }
body.qs.qs-legal main th, body.qs.qs-legal main td { font-size: 14px; color: var(--on-ground-2); border-color: var(--rule-strong); overflow-wrap: anywhere; }
body.qs.qs-legal main th { background: var(--ground-3); color: var(--on-ground); }
body.qs.qs-legal .toc { background: var(--ground-2); border: 1px solid var(--rule); border-radius: 10px; padding: 18px 22px; }
body.qs.qs-legal .toc h3 { font-family: var(--font-mono); font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--on-ground-3); margin: 0 0 10px; }
body.qs.qs-legal .toc li { font-size: 15px; margin-bottom: 4px; }
body.qs.qs-legal .product-list { background: var(--ground-2); border-left: 3px solid var(--accent); }
body.qs.qs-legal .product-list p { font-size: 15px; }
@media (max-width: 600px) {
  body.qs.qs-legal main { padding: 36px 16px 64px; }
  body.qs.qs-legal main table { display: block; overflow-x: auto; }
}

/* ── Text floor + contrast fixes on page-level styles (14px text, >=7:1 body) ── */
body.qs footer.qs-footer { color: var(--on-ground-2); }
body.qs .mmc-card .punchline, body.qs .insight-dot { font-size: 14px; color: var(--on-ground-2); }
body.qs .card p { font-size: 15px; }
body.qs .card code, body.qs .prompt-list code, body.qs .tool-card code { font-size: 14px; }
body.qs .card pre, body.qs .card pre code { font-size: 14px; }
body.qs .prompt-list li .what { font-size: 14px; color: var(--on-ground-2); }
body.qs.qs-legal .subtitle { color: var(--on-ground-2); }
body.qs.qs-legal main a { color: var(--accent-soft); }
