/* ============================================================
   MAESTRO — Marketing docs (guides on the marketing site).

   The guide prose (resources/views/guides/content/*) is shared verbatim with
   the in-app help centre, which styles it from the workspace CSS bundle. Here
   we re-style the SAME classes for the marketing shell. The rules are the app's
   guide-article rules, unchanged — they are entirely token-driven, and the
   marketing tokens.css already defines every token they use except two, which
   we alias below. So the same markup renders in marketing's teal, fonts and
   (free) dark theme with no per-rule edits.

   Loaded only on /docs pages (pushed from marketing/guide + marketing/docs-index),
   so these generic selectors never touch the rest of the marketing site.
   ============================================================ */

:root {
  --card: var(--surface);
  --card-sunk: var(--surface-sunk);
}

/* ---------- guide article: solid nav + clear the fixed nav ----------
   The marketing nav is position:fixed and defaults to transparent with light
   text (it assumes a dark hero underneath). A guide opens on a light header, so
   force the solid treatment and pad the article below the 64px nav. Scoped to
   html.docs-article (set by marketing/guide.blade.php) so the docs INDEX, which
   keeps its dark hero, is untouched. */
html.docs-article .nav { background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--border); }
html.docs-article .nav .logo__word { color: var(--fg); }
html.docs-article .nav .nav__links a { color: var(--fg-secondary); }
html.docs-article .nav .nav__links a:hover,
html.docs-article .nav .nav__links a.is-active { color: var(--fg); }
html.docs-article .nav .nav__links a::after { background: var(--accent); }
html.docs-article .nav .nav__signin { color: var(--fg-secondary); }
html.docs-article .nav .nav__signin:hover { color: var(--fg); }
html.docs-article .nav .nav__toggle span { background: var(--fg); }
html.docs-article main { padding-top: 64px; }

/* ---------- docs page header ---------- */
.docwrap-outer { padding: 32px 0 88px; }
.docbc { display: flex; align-items: center; gap: 7px; font-size: var(--text-xs); color: var(--fg-tertiary); margin: 0 0 14px; flex-wrap: wrap; }
.docbc a { color: var(--fg-tertiary); text-decoration: none; display: inline-flex; align-items: center; gap: 7px; }
.docbc a:hover { color: var(--accent); }
.docbc .ic { width: 14px; height: 14px; stroke-width: 1.6; }
.dochead { margin: 0 0 30px; max-width: 720px; }
.dochead h1 { font-family: var(--font-display); font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.02; margin: 0 0 12px; color: var(--fg); }
.dochead p { font-size: var(--text-md); line-height: var(--lh-normal); color: var(--fg-secondary); margin: 0; text-wrap: pretty; }

/* ---------- shared dark brand band (matches the app) ---------- */
.brandband { position: relative; overflow: hidden; color: #F4F6F8; background: radial-gradient(120% 130% at 85% -20%, #17322E 0%, #111620 50%, #0A0C10 100%); border: 1px solid rgba(255,255,255,.06); }

/* ---------- article + TOC layout ---------- */
.guidewrap { display: grid; grid-template-columns: minmax(0,1fr) 236px; gap: 44px; align-items: start; }
@media(max-width:1080px){ .guidewrap { grid-template-columns: 1fr; } .gtoc { display: none; } }
.gtoc { position: sticky; top: 100px; border-left: 1px solid var(--border); padding-left: 18px; }
.gtoc p { font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: .08em; color: var(--fg-tertiary); font-weight: 700; margin: 0 0 12px; }
.gtoc a { display: block; font-size: 13px; color: var(--fg-secondary); text-decoration: none; padding: 7px 0; line-height: 1.4; border-left: 2px solid transparent; margin-left: -20px; padding-left: 18px; transition: color 120ms, border-color 120ms; }
.gtoc a:hover { color: var(--accent); }
.gtoc a.on { color: var(--accent); font-weight: 600; border-color: var(--accent); }

/* content links (guide prose) */
.garticle a { color: var(--accent); text-decoration: none; font-weight: var(--weight-medium); }
.garticle a:hover { text-decoration: underline; }

/* ---------- section headings ---------- */
.gsec-h { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--fg); margin: 38px 0 16px; scroll-margin-top: 96px; }
.gsec-h:first-child { margin-top: 0; }
.glede { font-size: var(--text-sm); color: var(--fg-secondary); line-height: 1.6; margin: 0 0 18px; }

/* ---------- callouts ---------- */
.gcall { display: flex; gap: 13px; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--border); margin: 0 0 20px; }
.gcall__ic { width: 19px; height: 19px; stroke-width: 1.9; flex: none; margin-top: 1px; }
.gcall__t h4 { font-size: var(--text-sm); font-weight: 700; margin: 0 0 5px; color: var(--fg); }
.gcall__t p, .gcall__t ul { margin: 0; font-size: var(--text-sm); line-height: 1.55; color: var(--fg-secondary); }
.gcall__t ul { padding-left: 17px; }
.gcall__t ul li { margin: 3px 0; }
.gcall--info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.gcall--info .gcall__ic { stroke: var(--accent); }
.gcall--warn { background: color-mix(in srgb, var(--warning) 11%, var(--card)); border-color: color-mix(in srgb, var(--warning) 34%, transparent); }
.gcall--warn .gcall__ic { stroke: var(--warning); }
.gcall--crit { background: var(--coral-soft); border-color: color-mix(in srgb, var(--coral) 34%, transparent); }
.gcall--crit .gcall__ic { stroke: var(--coral); }
.gcall--ok { background: color-mix(in srgb, var(--success) 11%, var(--card)); border-color: color-mix(in srgb, var(--success) 34%, transparent); }
.gcall--ok .gcall__ic { stroke: var(--success); }
.gcall--dark { color: #F4F6F8; border: none; }
.gcall--dark .gcall__ic { stroke: #7FD8CA; }
.gcall--dark .gcall__t h4 { color: #fff; }
.gcall--dark .gcall__t ul { color: rgba(244,246,248,.8); }

/* ---------- two-column overview ---------- */
.govw { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
@media(max-width:640px){ .govw { grid-template-columns: 1fr; } }
.govw h4 { display: flex; align-items: center; gap: 8px; font-size: var(--text-sm); font-weight: 700; color: var(--fg); margin: 0 0 12px; }
.govw h4 .ic { width: 16px; height: 16px; stroke: var(--accent); stroke-width: 1.9; }
.gli-list { list-style: none; padding: 0; margin: 0; }
.gli { display: flex; gap: 9px; font-size: var(--text-sm); color: var(--fg-secondary); padding: 6px 0; line-height: 1.45; }
.gli .ic { width: 15px; height: 15px; stroke: var(--accent); stroke-width: 2.25; flex: none; margin-top: 3px; }

/* ---------- numbered steps ---------- */
.gstep { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-bottom: 16px; background: var(--card); scroll-margin-top: 96px; }
.gstep__h { display: flex; align-items: center; gap: 14px; padding: 15px 20px; background: var(--accent-soft); border-bottom: 1px solid color-mix(in srgb, var(--accent) 20%, transparent); }
.gstep__n { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff; font-family: var(--font-mono); font-weight: 600; font-size: 15px; display: grid; place-items: center; flex: none; }
.gstep__t { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--fg); margin: 0; letter-spacing: -0.01em; }
.gstep__b { padding: 20px 22px; }
.gsub { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--fg-tertiary); font-weight: 700; margin: 20px 0 10px; }
.gsub:first-child { margin-top: 0; }
.gstep__b p { font-size: var(--text-sm); color: var(--fg-secondary); line-height: 1.6; margin: 0 0 12px; }
.gstep__b ol, .gstep__b ul { margin: 0 0 14px; padding-left: 20px; font-size: var(--text-sm); color: var(--fg-secondary); line-height: 1.75; }
.gstep__b code { font-family: var(--font-mono); font-size: 12px; background: var(--card-sunk); border: 1px solid var(--border); border-radius: 5px; padding: 2px 6px; color: var(--fg); }
.gstep__b .table { margin: 6px 0 4px; }
.gstep__b .table td { color: var(--fg-secondary); }
.gstep__b .table td:first-child { color: var(--fg); font-weight: var(--weight-medium); }

/* ---------- status chips + accordions ---------- */
.gstatus { display: inline-flex; align-items: center; gap: 6px; font-weight: var(--weight-medium); }
.gstatus .ic { width: 14px; height: 14px; stroke-width: 2; }
.gstatus--auto { color: var(--success); }
.gstatus--manual { color: var(--warning); }
.gacc { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; background: var(--card); overflow: hidden; }
.gacc summary { list-style: none; cursor: pointer; padding: 15px 18px; display: flex; align-items: center; gap: 11px; font-size: var(--text-sm); font-weight: 600; color: var(--fg); }
.gacc summary::-webkit-details-marker { display: none; }
.gacc summary .lead { width: 16px; height: 16px; stroke: var(--warning); stroke-width: 2; flex: none; }
.gacc summary .chev { width: 16px; height: 16px; stroke: var(--fg-tertiary); stroke-width: 2; margin-left: auto; transition: transform 160ms; }
.gacc[open] summary .chev { transform: rotate(180deg); }
.gacc__b { padding: 0 18px 16px 45px; font-size: var(--text-sm); color: var(--fg-secondary); line-height: 1.6; }
.gacc__b p { margin: 0 0 8px; }

/* ---------- tables (used in guide prose) ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--fg-tertiary); font-weight: var(--weight-semibold); padding: 12px; border-bottom: 1px solid var(--border); }
.table td { padding: 14px 12px; border-bottom: 1px solid var(--border); font-size: var(--text-sm); color: var(--fg-secondary); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background 120ms ease; }
.table tbody tr:hover { background: var(--surface-hover); }

/* ---------- next-steps cards ---------- */
.gnext { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
@media(max-width:700px){ .gnext { grid-template-columns: 1fr; } }
.gnextcard { border: 1px solid var(--border); border-radius: 12px; padding: 20px; background: var(--card); }
.gnextcard__top { display: flex; align-items: center; gap: 11px; margin-bottom: 11px; }
.gnextcard__ic { width: 36px; height: 36px; border-radius: 9px; background: var(--accent-soft); display: grid; place-items: center; flex: none; }
.gnextcard__ic .ic { width: 18px; height: 18px; stroke: var(--accent); stroke-width: 1.75; }
.gnextcard h4 { font-family: var(--font-display); font-size: 16px; font-weight: 700; margin: 0; color: var(--fg); }
.gnextcard p { font-size: var(--text-sm); color: var(--fg-secondary); margin: 0; line-height: 1.5; }

/* ---------- support band (rebuilt in the marketing shell) ---------- */
.docsupport { border-radius: 16px; padding: 28px 30px; margin-top: 34px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.docsupport__b { flex: 1; min-width: 240px; display: flex; align-items: center; gap: 16px; }
.docsupport__ic { width: 44px; height: 44px; border-radius: 12px; background: rgba(92,201,184,.16); border: 1px solid rgba(92,201,184,.3); display: grid; place-items: center; flex: none; }
.docsupport__ic .ic { width: 22px; height: 22px; stroke: #7FD8CA; stroke-width: 1.75; }
.docsupport h3 { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin: 0 0 5px; letter-spacing: -0.01em; color: #fff; }
.docsupport p { margin: 0; color: rgba(244,246,248,.72); font-size: var(--text-sm); max-width: 560px; }

/* ---------- docs index cards ---------- */
.dgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media(max-width:720px){ .dgrid { grid-template-columns: 1fr; } }
.dcat { font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: .08em; color: var(--fg-tertiary); font-weight: 700; margin: 34px 0 14px; }
.dcat:first-of-type { margin-top: 0; }
.dcard { display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--border); border-radius: 16px; padding: 26px; background: var(--surface); text-decoration: none; transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.dcard:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.dcard__ic { width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; margin-bottom: 18px; }
.dcard__ic .ic { width: 23px; height: 23px; stroke: var(--accent); stroke-width: 1.7; }
.dcard h3 { font-family: var(--font-display); font-size: 21px; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.01em; color: var(--fg); }
.dcard p { font-size: var(--text-sm); color: var(--fg-secondary); line-height: 1.55; margin: 0 0 18px; flex: 1; }
.dcard__go { display: inline-flex; align-items: center; gap: 7px; font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--accent); }
.dcard__go .ic { width: 16px; height: 16px; stroke-width: 2; transition: transform 160ms; }
.dcard:hover .dcard__go .ic { transform: translateX(3px); }
