/* =========================================================================
   Fiscal Services Solutions - Documentation
   Shared design system, styled to match the DevExpress Blazor FLUENT theme
   used by FiscFlow and SPEDfisc.

   Colors are lifted directly from DevExpress.Blazor.Themes.Fluent (the same
   package the apps ship): the neutral ramp, the accent brand colors, and the
   success/warning/danger palette. Theming mirrors the app's own switcher -
   a light/dark MODE crossed with an ACCENT color - set via data-theme and
   data-accent on <html>. Everything else derives from those with color-mix().
   ========================================================================= */

/* ---- Fluent neutral ramp (identical across modes) ---------------------- */
:root {
  --n-10:#fffffe; --n-20:#f4f4f3; --n-30:#e9e9e8; --n-40:#dededd; --n-50:#d3d3d2;
  --n-60:#c8c8c7; --n-70:#bdbebd; --n-80:#b3b3b2; --n-90:#a8a9a8; --n-100:#9e9e9e;
  --n-110:#949493; --n-120:#8a8a89; --n-130:#808080; --n-140:#767676; --n-150:#6c6d6c;
  --n-160:#636363; --n-170:#595a59; --n-180:#505150; --n-190:#474847; --n-200:#3f3f3e;
  --n-210:#363636; --n-220:#2e2e2d; --n-230:#252525; --n-240:#1d1e1d; --n-250:#161616;

  /* Accent brand colors - exact values from each Fluent accent pack.
     The active one is chosen by [data-accent] below; blue is the DX default. */
  --a-blue:#0f6cbd;  --a-cool-blue:#2d7d9a;  --a-steel:#68768a;  --a-storm:#4c4a48;
  --a-mint:#018574;  --a-moss:#486860;       --a-desert:#847545; --a-rust:#da3b01;
  --a-rose:#ea005e;  --a-orchid:#c239b3;     --a-purple:#5b5fc7;

  /* Typography - Segoe UI, matching the Fluent app shell */
  --font-sans: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "Cascadia Code", "Consolas", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Metrics - Fluent uses small 4px radii and subtle depth shadows */
  --header-h: 56px;
  --sidebar-w: 280px;
  --toc-w: 220px;
  --content-max: 820px;
  --radius: 6px;
  --radius-sm: 4px;

  /* Default accent = Fluent Blue. The accent picker overrides --accent-base. */
  --accent-base: var(--a-blue);
}

/* ---- Accent selection (mode-independent brand hue) --------------------- */
:root[data-accent="blue"]      { --accent-base: var(--a-blue); }
:root[data-accent="cool-blue"] { --accent-base: var(--a-cool-blue); }
:root[data-accent="steel"]     { --accent-base: var(--a-steel); }
:root[data-accent="storm"]     { --accent-base: var(--a-storm); }
:root[data-accent="mint"]      { --accent-base: var(--a-mint); }
:root[data-accent="moss"]      { --accent-base: var(--a-moss); }
:root[data-accent="desert"]    { --accent-base: var(--a-desert); }
:root[data-accent="rust"]      { --accent-base: var(--a-rust); }
:root[data-accent="rose"]      { --accent-base: var(--a-rose); }
:root[data-accent="orchid"]    { --accent-base: var(--a-orchid); }
:root[data-accent="purple"]    { --accent-base: var(--a-purple); }

/* ---- LIGHT mode (Fluent) ----------------------------------------------- */
:root, :root[data-theme="light"] {
  --bg:            var(--n-20);   /* app canvas    */
  --bg-subtle:     var(--n-20);   /* header/sidebar tint, callouts */
  --bg-sunken:     var(--n-30);   /* code, table head */
  --surface:       var(--n-10);   /* cards, content panel (white) */
  --border:        var(--n-40);
  --border-strong: var(--n-50);

  --text:          var(--n-250);
  --text-muted:    var(--n-160);
  --text-faint:    var(--n-140);
  --link:          var(--accent);

  /* Accent, tuned for light mode; derivations from --accent-base */
  --accent:         var(--accent-base);
  --accent-strong:  color-mix(in srgb, var(--accent-base) 82%, #000);
  --accent-soft:    color-mix(in srgb, var(--accent-base) 12%, var(--surface));
  --accent-border:  color-mix(in srgb, var(--accent-base) 38%, var(--surface));
  --accent-contrast:#ffffff;

  /* Fluent status palette */
  --note:   #0f6cbd;  --note-bg:   #eaf2fb;
  --tip:    #107c10;  --tip-bg:    #e7f2e6;
  --warn:   #d54f00;  --warn-bg:   #fbebe4;
  --danger: #c50f1f;  --danger-bg: #fceae8;

  /* Fluent depth shadows */
  --shadow-sm: 0 .3px .9px rgba(0,0,0,.10), 0 1.6px 3.6px rgba(0,0,0,.13);
  --shadow-md: 0 1.2px 3.6px rgba(0,0,0,.11), 0 6.4px 14.4px rgba(0,0,0,.13);
}

/* ---- DARK mode (Fluent) ------------------------------------------------- */
:root[data-theme="dark"] {
  --bg:            var(--n-240);
  --bg-subtle:     var(--n-230);
  --bg-sunken:     var(--n-250);
  --surface:       var(--n-230);
  --border:        var(--n-210);
  --border-strong: var(--n-190);

  --text:          var(--n-10);
  --text-muted:    var(--n-90);
  --text-faint:    var(--n-110);

  /* In dark mode the brand hue is lightened for legibility on dark surfaces */
  --accent:         color-mix(in srgb, var(--accent-base) 68%, #fff);
  --accent-strong:  color-mix(in srgb, var(--accent-base) 45%, #fff);
  --accent-soft:    color-mix(in srgb, var(--accent-base) 22%, var(--surface));
  --accent-border:  color-mix(in srgb, var(--accent-base) 45%, var(--surface));
  --accent-contrast:#0b0b0b;

  --note:   #5da2ec;  --note-bg:   color-mix(in srgb, #5da2ec 14%, var(--surface));
  --tip:    #4ba747;  --tip-bg:    color-mix(in srgb, #4ba747 14%, var(--surface));
  --warn:   #f7804c;  --warn-bg:   color-mix(in srgb, #f7804c 14%, var(--surface));
  --danger: #e0615a;  --danger-bg: color-mix(in srgb, #e0615a 14%, var(--surface));

  --shadow-sm: 0 .3px .9px rgba(0,0,0,.28), 0 1.6px 3.6px rgba(0,0,0,.36);
  --shadow-md: 0 1.2px 3.6px rgba(0,0,0,.34), 0 6.4px 14.4px rgba(0,0,0,.44);
}

/* ---- Base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; gap: 18px;
  padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--text); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 28px; height: 28px; border-radius: 7px;
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}
.brand .brand-name { font-size: 15px; }
.brand .brand-sub { color: var(--text-faint); font-weight: 500; font-size: 12.5px; }

.product-switch { display: flex; gap: 4px; padding: 3px; background: var(--bg-sunken); border-radius: 999px; }
.product-switch a {
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  padding: 5px 14px; border-radius: 999px; line-height: 1;
}
.product-switch a:hover { color: var(--text); text-decoration: none; }
.product-switch a.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }

.header-spacer { flex: 1; }

.header-link {
  display: inline-flex; align-items: center; height: 36px; padding: 0 12px;
  border-radius: 999px; font-size: 13.5px; font-weight: 600; white-space: nowrap;
  color: var(--text-muted); border: 1px solid var(--border-strong);
}
.header-link:hover { color: var(--text); background: var(--bg-subtle); text-decoration: none; }

.search { position: relative; }
.search input {
  width: 240px; height: 36px; padding: 0 12px 0 34px;
  border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--bg-subtle); color: var(--text); font-size: 14px; font-family: inherit;
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-faint); pointer-events: none; }
.search-results {
  position: absolute; top: 44px; left: 0; right: 0; z-index: 60;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-md); overflow: hidden; display: none; max-height: 60vh; overflow-y: auto;
}
.search-results.open { display: block; }
.search-results a { display: block; padding: 9px 14px; color: var(--text); font-size: 14px; border-bottom: 1px solid var(--border); }
.search-results a:last-child { border-bottom: none; }
.search-results a:hover, .search-results a.hi { background: var(--accent-soft); text-decoration: none; }
.search-results .sr-prod { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); margin-right: 8px; }
.search-results .sr-empty { padding: 14px; color: var(--text-muted); font-size: 14px; }

.icon-btn {
  width: 36px; height: 36px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--bg-subtle); color: var(--text-muted); cursor: pointer;
  display: grid; place-items: center;
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); }
.icon-btn.on { color: var(--accent); border-color: var(--accent); }
.menu-btn { display: none; }

/* Theme switcher popover - mirrors the app's mode × accent theme picker */
.theme-menu { position: relative; }
.theme-pop {
  position: absolute; top: 46px; right: 0; z-index: 60; width: 250px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 14px; display: none;
}
.theme-pop.open { display: block; }
.theme-pop h4 { margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--text-faint); }
.theme-pop .seg { display: flex; gap: 4px; background: var(--bg-sunken); border-radius: var(--radius-sm);
  padding: 3px; margin-bottom: 16px; }
.theme-pop .seg button { flex: 1; border: none; background: none; cursor: pointer; font: inherit;
  font-size: 13px; font-weight: 600; color: var(--text-muted); padding: 6px 4px; border-radius: 3px;
  display: flex; align-items: center; justify-content: center; gap: 6px; }
.theme-pop .seg button:hover { color: var(--text); }
.theme-pop .seg button.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }
.accent-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; }
.accent-grid button { width: 27px; height: 27px; border-radius: 50%; border: 2px solid transparent;
  cursor: pointer; padding: 0; position: relative; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.accent-grid button:hover { transform: scale(1.08); }
.accent-grid button.active { border-color: var(--text); }
.accent-grid button.active::after { content: ""; position: absolute; inset: 0; margin: auto;
  width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }

/* ---- Layout ------------------------------------------------------------- */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0,1fr) var(--toc-w);
  align-items: start;
  max-width: 1440px; margin: 0 auto;
}

/* ---- Sidebar ------------------------------------------------------------ */
.sidebar {
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto; overscroll-behavior: contain;
  padding: 22px 14px 40px 20px;
  border-right: 1px solid var(--border);
}

/* Themed scrollbars for the left nav and the on-this-page rail (Firefox + WebKit/Chromium/Edge).
   A slim, rounded thumb that floats on the panel background and follows the theme. */
.sidebar, .toc { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.sidebar::-webkit-scrollbar, .toc::-webkit-scrollbar { width: 11px; }
.sidebar::-webkit-scrollbar-track, .toc::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb, .toc::-webkit-scrollbar-thumb {
  background: var(--border-strong); border-radius: 999px;
  border: 3px solid var(--bg); background-clip: padding-box;
}
.sidebar::-webkit-scrollbar-thumb:hover, .toc::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }
@media (max-width: 860px) { .sidebar::-webkit-scrollbar-thumb { border-color: var(--surface); } }
.sidebar .side-product {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--accent); margin: 2px 0 14px 8px;
}
.nav-group { margin-bottom: 20px; }
.nav-group > .nav-group-title {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; box-sizing: border-box; text-align: left; cursor: pointer;
  background: none; border: 0; font-family: inherit;
  font-size: 13px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  color: var(--text-muted); padding: 4px 8px; margin: 0 0 6px; border-radius: var(--radius-sm);
}
.nav-group > .nav-group-title:hover { color: var(--text); background: var(--bg-subtle); }
.nav-group .nav-chevron { flex: none; width: 13px; height: 13px; opacity: .65; transition: transform .15s ease; }
.nav-group.collapsed .nav-chevron { transform: rotate(-90deg); }
.nav-group.collapsed > ul { display: none; }
.nav-group ul { list-style: none; margin: 0; padding: 0; }
.nav-group li a {
  display: block; padding: 6px 10px 6px 22px; margin: 1px 0;
  border-radius: var(--radius-sm); color: var(--text-muted); font-size: 14px; line-height: 1.4;
  border-left: 2px solid transparent;
}
.nav-group li a:hover { background: var(--bg-subtle); color: var(--text); text-decoration: none; }
.nav-group li a.active {
  background: var(--accent-soft); color: var(--accent-strong); font-weight: 600;
  border-left-color: var(--accent);
}
.nav-group li a .badge { font-size: 10px; }
.badge {
  display: inline-block; padding: 1px 7px; border-radius: 999px; font-weight: 700;
  font-size: 10.5px; letter-spacing: .02em; vertical-align: middle; margin-left: 6px;
  background: var(--bg-sunken); color: var(--text-faint);
}
.badge.soon { background: var(--warn-bg); color: var(--warn); }

/* Audience pills - mark who a heading/section is for (admin/champion vs everyday user) */
.pill-admin, .pill-user {
  display: inline-block; vertical-align: middle; margin-left: 10px;
  padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: .02em; text-transform: none;
}
.pill-admin { background: var(--accent-soft); color: var(--accent-strong); }
.pill-user  { background: var(--bg-sunken); color: var(--text-faint); }
h1 .pill-admin, h1 .pill-user, h2 .pill-admin, h2 .pill-user { font-size: .6em; }
/* Audience banner - a leading note stating who a whole page is for */
.audience {
  display: flex; align-items: center; gap: 8px; margin: 0 0 18px;
  padding: 8px 14px; border-radius: var(--radius); font-size: 13px;
  background: var(--bg-subtle); border: 1px solid var(--border); color: var(--text-muted);
}
.audience strong { color: var(--text); font-weight: 700; }

/* ---- Content ------------------------------------------------------------ */
.content { min-width: 0; padding: 26px 44px 96px; background: var(--surface); border-right: 1px solid var(--border); }
.content-inner { max-width: var(--content-max); margin: 0 auto; }

.breadcrumbs { font-size: 13px; color: var(--text-faint); margin-bottom: 18px; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs .sep { margin: 0 7px; opacity: .6; }

article h1 { font-size: 32px; line-height: 1.2; margin: 0 0 6px; letter-spacing: -.01em; }
article .lead { font-size: 18px; color: var(--text-muted); margin: 0 0 28px; line-height: 1.55; }
article h2 {
  font-size: 23px; margin: 42px 0 12px; padding-top: 6px; letter-spacing: -.01em;
  border-top: 1px solid var(--border);
}
article h2:first-of-type { border-top: none; padding-top: 0; }
article h3 { font-size: 18px; margin: 28px 0 8px; }
article p { margin: 12px 0; }
article ul, article ol { margin: 12px 0; padding-left: 24px; }
article li { margin: 5px 0; }
article img { max-width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }
article strong { font-weight: 650; }
.anchor-h { position: relative; scroll-margin-top: calc(var(--header-h) + 12px); }
.anchor-h .anchor-link { opacity: 0; margin-left: 8px; color: var(--text-faint); font-weight: 400; text-decoration: none; }
.anchor-h:hover .anchor-link { opacity: 1; }

/* Inline UI references - makes "click Save" read as a real button */
.ui { font-weight: 600; color: var(--text); background: var(--bg-sunken); border: 1px solid var(--border);
      border-radius: 4px; padding: .5px 6px; font-size: .92em; white-space: nowrap; }
kbd { font-family: var(--font-mono); font-size: .85em; background: var(--bg-sunken);
      border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; padding: 1px 6px; }
code { font-family: var(--font-mono); font-size: .88em; background: var(--bg-sunken);
       padding: 2px 6px; border-radius: 4px; color: var(--accent-strong); }
pre { background: var(--bg-sunken); border: 1px solid var(--border); border-radius: var(--radius);
      padding: 14px 16px; overflow-x: auto; }
pre code { background: none; padding: 0; color: var(--text); }

/* Callouts */
.callout {
  display: flex; gap: 12px; margin: 20px 0; padding: 14px 16px;
  border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--radius);
  background: var(--bg-subtle);
}
.callout .co-icon { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.callout .co-body { min-width: 0; }
.callout .co-body > :first-child { margin-top: 0; }
.callout .co-body > :last-child { margin-bottom: 0; }
.callout .co-title { font-weight: 700; margin-bottom: 2px; }
.callout.note   { border-left-color: var(--note);   background: var(--note-bg);   } .callout.note   .co-icon, .callout.note   .co-title { color: var(--note); }
.callout.tip    { border-left-color: var(--tip);    background: var(--tip-bg);    } .callout.tip    .co-icon, .callout.tip    .co-title { color: var(--tip); }
.callout.warn   { border-left-color: var(--warn);   background: var(--warn-bg);   } .callout.warn   .co-icon, .callout.warn   .co-title { color: var(--warn); }
.callout.danger { border-left-color: var(--danger); background: var(--danger-bg); } .callout.danger .co-icon, .callout.danger .co-title { color: var(--danger); }

/* Step lists - numbered task walkthroughs */
.steps { list-style: none; counter-reset: step; margin: 20px 0; padding: 0; }
.steps > li { position: relative; padding: 2px 0 18px 46px; margin: 0; }
.steps > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: var(--accent-contrast);
  font-weight: 700; font-size: 14px; display: grid; place-items: center;
}
.steps > li::after {
  content: ""; position: absolute; left: 14px; top: 32px; bottom: 2px; width: 2px; background: var(--border);
}
.steps > li:last-child::after { display: none; }
.steps > li .step-title { font-weight: 650; }

/* Tables - the low-level field references */
.table-wrap { overflow-x: auto; margin: 18px 0; border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
thead th { text-align: left; background: var(--bg-subtle); color: var(--text); font-weight: 650;
           padding: 10px 14px; border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
tbody td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-subtle); }
td .req { color: var(--danger); font-weight: 700; }

/* Status glyphs pulled from the FiscFlow app (DevExpress XAF images) */
.status-icon { width: 18px; height: 18px; vertical-align: -4px; margin-right: 8px; }
:root[data-theme="dark"] .status-icon { filter: brightness(1.35) saturate(1.1); }

/* App screenshots - captured light/dark pairs from the demo database.
   Authors write <figure class="screenshot" data-shot="ID"><figcaption>…</figcaption></figure>;
   site.js injects the light+dark <img>, and the pair below shows the one matching the theme. */
figure.screenshot { margin: 24px 0; }
figure.screenshot .shot-frame {
  display: block; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--bg-subtle); box-shadow: var(--shadow-sm); line-height: 0;
}
figure.screenshot .shot-frame img { display: block; width: 100%; height: auto; }
:root[data-theme="light"] figure.screenshot .shot-dark  { display: none; }
:root[data-theme="dark"]  figure.screenshot .shot-light { display: none; }
figure.screenshot figcaption { margin-top: 9px; font-size: 13px; color: var(--text-muted); text-align: center; line-height: 1.5; }
figure.screenshot.missing .shot-frame {
  display: grid; place-items: center; min-height: 200px; border-style: dashed;
  color: var(--text-faint); font-size: 13.5px; text-align: center; padding: 24px; line-height: 1.6;
}
figure.screenshot.missing .shot-frame code { font-size: .92em; }
figure.screenshot:not(.missing) .shot-frame { cursor: zoom-in; }
figure.screenshot:not(.missing) .shot-frame:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Full-screen viewer for a clicked screenshot */
.lightbox { position: fixed; inset: 0; z-index: 100; display: none; place-items: center;
  background: rgba(8,12,16,.86); padding: 16px; box-sizing: border-box; }
.lightbox.open { display: grid; }
/* Fit the image inside the padded area (viewport minus the padding) so edges never clip. */
.lightbox img { max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); width: auto; height: auto;
  object-fit: contain; border-radius: 8px; box-shadow: 0 16px 60px rgba(0,0,0,.55); cursor: zoom-out; }
.lightbox .lb-close { position: fixed; top: 16px; right: 18px; width: 40px; height: 40px;
  border: none; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff;
  font-size: 24px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lightbox .lb-close:hover { background: rgba(255,255,255,.28); }

/* Cards - used on landing + overview pages */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 16px; margin: 22px 0; }
.card {
  display: block; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm); color: var(--text);
  transition: border-color .12s, transform .12s;
}
.card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.card .card-icon { width: 26px; height: 26px; color: var(--accent); margin-bottom: 10px; }
.card h3 { margin: 0 0 4px; font-size: 16px; }
.card p { margin: 0; font-size: 14px; color: var(--text-muted); }

/* Product hero cards on the landing page */
.hero { padding: 40px 0 8px; }
.hero h1 { font-size: 38px; margin: 0 0 10px; letter-spacing: -.02em; }
.hero .lead { font-size: 19px; max-width: 640px; }
.product-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 30px 0; }
.product-card {
  display: block; padding: 26px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); box-shadow: var(--shadow-sm); color: var(--text);
  border-top: 4px solid var(--pc-accent); transition: transform .12s, box-shadow .12s;
}
.product-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-md); }
.product-card .pc-mark { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 20px; margin-bottom: 14px; background: var(--pc-accent); }
.product-card h2 { border: none; margin: 0 0 6px; padding: 0; font-size: 22px; }
.product-card p { margin: 0 0 14px; color: var(--text-muted); }
.product-card .pc-go { font-weight: 650; color: var(--pc-accent); font-size: 14px; }
.pc-fiscflow { --pc-accent: #0e7c86; }
.pc-spedfisc { --pc-accent: #5b4bcf; }

/* Next/prev pager */
.pager { display: flex; gap: 14px; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--border); }
.pager a { flex: 1; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); }
.pager a:hover { border-color: var(--accent); text-decoration: none; }
.pager a.next { text-align: right; }
.pager .pg-label { font-size: 12px; color: var(--text-faint); }
.pager .pg-title { font-weight: 650; color: var(--accent); }

/* Feedback strip */
.page-meta { margin-top: 34px; font-size: 13px; color: var(--text-faint); display: flex; gap: 16px; flex-wrap: wrap; }

/* ---- On-this-page TOC --------------------------------------------------- */
.toc { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto; padding: 26px 20px 40px 8px; }
.toc .toc-title { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 10px; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: 4px 10px; font-size: 13px; color: var(--text-muted); border-left: 2px solid var(--border); line-height: 1.4; }
.toc a:hover { color: var(--text); text-decoration: none; }
.toc a.h3 { padding-left: 22px; font-size: 12.5px; }
.toc a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }

/* ---- Footer ------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-subtle); }
.site-footer .foot-inner { max-width: 1440px; margin: 0 auto; padding: 24px 44px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); }
.site-footer a { color: var(--text-muted); }

/* ---- Mobile backdrop ---------------------------------------------------- */
.backdrop { display: none; position: fixed; inset: var(--header-h) 0 0 0; background: rgba(10,16,22,.45); z-index: 40; }
.backdrop.open { display: block; }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 1180px) {
  .layout { grid-template-columns: var(--sidebar-w) minmax(0,1fr); }
  .toc { display: none; }
  .content { padding: 26px 40px 90px; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .menu-btn { display: grid; }
  .product-switch { display: none; }

  /* Two-row header on phones: the top bar (menu · brand · Support · theme) stays on one
     line, and the search drops to its own full-width row below. The brand is capped so the
     bar fits instead of wrapping the controls off-screen, and the header grows (no clipping). */
  :root { --header-h: 100px; }
  .site-header {
    height: auto; min-height: var(--header-h);
    flex-wrap: wrap; align-content: center;
    column-gap: 10px; row-gap: 8px; padding: 8px 16px;
  }
  .brand .brand-sub { display: none; }
  .brand { min-width: 0; max-width: calc(100vw - 230px); }
  .brand .brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .search { order: 1; flex: 1 1 100%; }
  .search input { width: 100%; }
  .sidebar {
    position: fixed; top: var(--header-h); left: 0; z-index: 45;
    width: min(86vw, var(--sidebar-w)); background: var(--surface);
    transform: translateX(-100%); transition: transform .2s ease;
    box-shadow: var(--shadow-md);
  }
  .sidebar.open { transform: translateX(0); }
  .content { padding: 22px 20px 80px; }
  .product-cards { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
}
@media (max-width: 380px) {
  /* Give the brand a bit more room on very small phones by tightening the Support pill. */
  .header-link { padding: 0 9px; }
}

/* ---- Article feedback widget (👍/👎 + optional suggestion) --------------- */
.feedback { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border); }
.fb-ask { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fb-q { font-weight: 600; color: var(--text); }
.fb-btns { display: flex; gap: 8px; }
.fb-btn {
  cursor: pointer; font: inherit; font-size: 14px; padding: 6px 14px; border-radius: 8px;
  border: 1px solid var(--border-strong); background: var(--bg-subtle); color: var(--text);
  transition: border-color .15s, background .15s, color .15s;
}
.fb-btn:hover { border-color: var(--accent); }
.fb-btn.sel { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.fb-btn[disabled] { opacity: .45; cursor: default; }
.fb-btn[disabled]:hover { border-color: var(--border-strong); }
.fb-more { margin-top: 16px; max-width: 560px; }
.fb-label { display: block; font-size: 14px; color: var(--text-muted); margin-bottom: 6px; }
.fb-opt { font-weight: 400; }
.fb-msg {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; padding: 9px 11px;
  border-radius: 8px; border: 1px solid var(--border-strong); background: var(--bg); color: var(--text);
  resize: vertical; min-height: 68px;
}
.fb-msg:focus { outline: none; border-color: var(--accent); }
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.fb-actions { margin-top: 10px; }
.fb-send {
  cursor: pointer; font: inherit; font-size: 14px; padding: 7px 16px; border-radius: 8px;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-contrast);
  transition: background .15s, border-color .15s;
}
.fb-send:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.fb-thanks { color: var(--text-muted); font-size: 15px; }

/* ---- Header "Print" button (a button styled as a header pill) ----------- */
button.header-link { background: transparent; cursor: pointer; font-family: inherit; }
@media (max-width: 560px) { .print-link { display: none; } }   /* keep the mobile top bar uncluttered */

/* ---- Print / PDF: article only, cleanly formatted ----------------------- */
@media print {
  /* Force the full LIGHT palette regardless of the on-screen theme, so nothing prints
     dark-on-dark (e.g. .ui / code chips use --bg-sunken, callouts use --note-bg, etc.). */
  :root, :root[data-theme="light"], :root[data-theme="dark"] {
    color-scheme: light;
    --bg: #fff; --surface: #fff; --bg-subtle: #f4f5f6; --bg-sunken: #eef0f2;
    --border: #d3d6da; --border-strong: #b6bbc1;
    --text: #111; --text-muted: #444; --text-faint: #666; --link: #1f4e8c;
    --accent: #1f4e8c; --accent-strong: #163a68; --accent-soft: #eef2f8; --accent-border: #c9d6e8; --accent-contrast: #fff;
    --note: #0f6cbd; --note-bg: #eaf2fb; --tip: #107c10; --tip-bg: #e7f2e6;
    --warn: #d54f00; --warn-bg: #fbebe4; --danger: #c50f1f; --danger-bg: #fceae8;
  }
  html { scroll-behavior: auto; }
  body { background: #fff; color: #000; }

  /* Strip all chrome - header, sidebar, on-this-page TOC, breadcrumbs, pager, feedback, controls. */
  .site-header, .sidebar, .toc, .breadcrumbs, .pager, .feedback,
  .menu-btn, #menu-btn, .backdrop, .search, .search-results, .lightbox,
  .theme-menu, .header-link, .anchor-link { display: none !important; }

  /* The article uses the full page width. */
  .layout { display: block; }
  .content { padding: 0; border: none; background: #fff; }
  .content-inner { max-width: 100%; padding: 0; margin: 0; }
  article { max-width: 100%; }
  @page { margin: 16mm; }

  /* Always print the light screenshot, never the dark one. */
  figure.screenshot .shot-light { display: block !important; }
  figure.screenshot .shot-dark { display: none !important; }
  figure.screenshot .shot-frame { cursor: default; }

  /* Tables print in full (no horizontal scroll box). */
  .table-wrap { overflow: visible; }

  /* Avoid awkward page breaks. */
  h1, h2, h3 { page-break-after: avoid; break-after: avoid; }
  figure, .callout, table, .card, .table-wrap, ol.steps > li { page-break-inside: avoid; break-inside: avoid; }
  p, li { orphans: 3; widows: 3; }
  img { max-width: 100% !important; height: auto !important; }

  /* Readable links, crisp surfaces. */
  a { color: #000; text-decoration: underline; }
  * { box-shadow: none !important; }
}
