/* ==========================================================================
   POS Documentation — design tokens & components
   Built on top of Tailwind Play CDN. Tokens mirror the product's admin theme
   (orange accent, Inter typeface) so the manual feels like part of the product.
   ========================================================================== */

:root {
  color-scheme: light;
  --bg-page:      #FAFAFA;
  --bg-surface:   #FFFFFF;
  --bg-elevated:  #FFFFFF;
  --bg-hover:     #F4F4F5;
  --bg-active:    #EEEEEF;
  --bg-sidebar:   #FFFFFF;

  --border-subtle:  #ECECEE;
  --border-default: #E0E0E3;

  --text-primary:   #1C1C1F;
  --text-secondary: #62656B;
  --text-tertiary:  #9296A0;

  --accent:       #F97316;   /* orange-500 */
  --accent-hover: #EA580C;   /* orange-600 */
  --accent-fg:    #FFFFFF;
  --accent-soft:  rgba(249, 115, 22, 0.10);
  --accent-ring:  rgba(249, 115, 22, 0.28);
  --accent-grad:  linear-gradient(135deg, #FB923C 0%, #F97316 55%, #EA580C 100%);

  /* category accent hues (for colourful icon tiles & cards) */
  --hue-orange: #F97316; --hue-orange-soft: rgba(249,115,22,.12);
  --hue-blue:   #3B82F6; --hue-blue-soft:   rgba(59,130,246,.12);
  --hue-green:  #16A34A; --hue-green-soft:  rgba(22,163,74,.12);
  --hue-violet: #8B5CF6; --hue-violet-soft: rgba(139,92,246,.12);
  --hue-pink:   #EC4899; --hue-pink-soft:   rgba(236,72,153,.12);
  --hue-cyan:   #06B6D4; --hue-cyan-soft:   rgba(6,182,212,.12);
  --hue-amber:  #D97706; --hue-amber-soft:  rgba(217,119,6,.14);
  --hue-rose:   #E11D48; --hue-rose-soft:   rgba(225,29,72,.12);

  --info:    #3B82F6;  --info-soft:    rgba(59, 130, 246, 0.10);
  --success: #16A34A;  --success-soft: rgba(22, 163, 74, 0.10);
  --warning: #D97706;  --warning-soft: rgba(217, 119, 6, 0.12);
  --danger:  #DC2626;  --danger-soft:  rgba(220, 38, 38, 0.10);
  --tip:     #8B5CF6;  --tip-soft:     rgba(139, 92, 246, 0.10);

  --shadow-sm: 0 1px 2px rgba(16, 17, 20, 0.06);
  --shadow-md: 0 4px 16px rgba(16, 17, 20, 0.08);
  --shadow-lg: 0 12px 40px rgba(16, 17, 20, 0.12);

  --radius: 12px;
  --sidebar-w: 290px;
  --toc-w: 230px;
  --topbar-h: 60px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg-page:      #08090A;
  --bg-surface:   #0D0E10;
  --bg-elevated:  #141517;
  --bg-hover:     #16171A;
  --bg-active:    #1C1D21;
  --bg-sidebar:   #0A0B0C;

  --border-subtle:  #1C1D21;
  --border-default: #26272B;

  --text-primary:   #ECECEE;
  --text-secondary: #8A8F98;
  --text-tertiary:  #5C616B;

  --accent-soft:  rgba(249, 115, 22, 0.14);
  --accent-ring:  rgba(249, 115, 22, 0.34);
  --hue-orange-soft: rgba(249,115,22,.18);
  --hue-blue-soft:   rgba(59,130,246,.18);
  --hue-green-soft:  rgba(22,163,74,.20);
  --hue-violet-soft: rgba(139,92,246,.20);
  --hue-pink-soft:   rgba(236,72,153,.18);
  --hue-cyan-soft:   rgba(6,182,212,.18);
  --hue-amber-soft:  rgba(217,119,6,.20);
  --hue-rose-soft:   rgba(225,29,72,.18);
  --info-soft:    rgba(59, 130, 246, 0.16);
  --success-soft: rgba(22, 163, 74, 0.16);
  --warning-soft: rgba(217, 119, 6, 0.18);
  --danger-soft:  rgba(220, 38, 38, 0.16);
  --tip-soft:     rgba(139, 92, 246, 0.16);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-ring); }

/* Scrollbars ------------------------------------------------------------- */
.scroll-y { overflow-y: auto; }
.scroll-y::-webkit-scrollbar { width: 10px; height: 10px; }
.scroll-y::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border: 3px solid var(--bg-page);
  border-radius: 999px;
}
.scroll-y::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* ==========================================================================
   Reading-progress bar
   ========================================================================== */
.doc-progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60;
  background: transparent; pointer-events: none;
}
.doc-progress__bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  transition: width 80ms linear;
}

/* ==========================================================================
   Topbar
   ========================================================================== */
.doc-topbar {
  position: fixed; top: 0; inset-inline: 0; height: var(--topbar-h); z-index: 50;
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px;
  background: color-mix(in srgb, var(--bg-surface) 86%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.doc-brand { display: flex; align-items: center; gap: 11px; font-weight: 650; letter-spacing: -0.01em; }
.doc-brand__mark {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.doc-brand__name { font-size: 15px; }
.doc-brand__tag {
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent); background: var(--accent-soft); padding: 2px 7px; border-radius: 999px;
}
/* When a real logo image is present, drop the generated gradient mark */
.doc-brand__mark.has-img { background: none; box-shadow: none; width: auto; height: auto; flex: none; }
.doc-brand__img { display: block; height: 30px; width: auto; max-width: 180px; object-fit: contain; }
/* A real uploaded logo carries the brand name itself — hide the wordmark text
   next to it so they don't overlap (the square placeholder keeps its text). */
.doc-brand.has-logo .doc-brand__name,
.doc-footer__brand.has-logo .doc-footer__name { display: none; }
.doc-topbar__spacer { flex: 1; }

.doc-searchbtn {
  display: flex; align-items: center; gap: 9px;
  min-width: 230px; height: 38px; padding: 0 11px;
  border: 1px solid var(--border-default); border-radius: 9px;
  background: var(--bg-page); color: var(--text-tertiary);
  font-size: 13px; cursor: pointer; transition: border-color 120ms, background 120ms;
}
.doc-searchbtn:hover { border-color: var(--accent); background: var(--bg-surface); }
.doc-searchbtn kbd {
  margin-inline-start: auto; font-family: var(--mono); font-size: 11px;
  background: var(--bg-active); color: var(--text-secondary);
  padding: 2px 6px; border-radius: 5px; border: 1px solid var(--border-subtle);
}

.doc-iconbtn {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--border-default); border-radius: 9px;
  background: var(--bg-page); color: var(--text-secondary); cursor: pointer;
  transition: border-color 120ms, color 120ms, background 120ms;
}
.doc-iconbtn:hover { border-color: var(--accent); color: var(--text-primary); }
.doc-iconbtn svg { width: 18px; height: 18px; }
.doc-menubtn { display: none; }

html[data-theme="dark"] .theme-sun  { display: block; }
html[data-theme="dark"] .theme-moon { display: none; }
.theme-sun  { display: none; }
.theme-moon { display: block; }

/* ==========================================================================
   Layout
   ========================================================================== */
.doc-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
  max-width: none; width: 100%;
  padding-top: var(--topbar-h);
}

/* Sidebar ---------------------------------------------------------------- */
.doc-sidebar {
  position: sticky; top: var(--topbar-h);
  align-self: start;
  height: calc(100vh - var(--topbar-h));
  border-inline-end: 1px solid var(--border-subtle);
  background: var(--bg-sidebar);
  padding: 22px 14px 60px;
}
.doc-sidebar__group { margin-bottom: 22px; }
.doc-sidebar__title {
  font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--text-tertiary); padding: 0 10px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.doc-navlink {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; font-size: 13.5px;
  color: var(--text-secondary); transition: background 110ms, color 110ms;
  position: relative;
}
.doc-navlink:hover { background: var(--bg-hover); color: var(--text-primary); }
.doc-navlink svg { width: 16px; height: 16px; flex: none; opacity: 0.8; }
.doc-navlink.is-active {
  background: var(--accent-soft); color: var(--accent); font-weight: 600;
}
.doc-navlink.is-active::before {
  content: ""; position: absolute; inset-inline-start: -14px; top: 50%;
  transform: translateY(-50%); width: 3px; height: 18px;
  background: var(--accent); border-radius: 0 3px 3px 0;
}
.doc-navlink.is-active svg { opacity: 1; }

/* Main ------------------------------------------------------------------- */
.doc-main {
  min-width: 0;
  padding: 30px clamp(20px, 4vw, 60px) 0;
  transition: opacity 130ms ease;
}
.doc-main.is-swapping { opacity: 0; }
.doc-article { max-width: 900px; }

/* TOC -------------------------------------------------------------------- */
.doc-toc {
  position: sticky; top: var(--topbar-h);
  align-self: start; height: calc(100vh - var(--topbar-h));
  padding: 34px 20px 40px; overflow-y: auto;
}
.doc-toc__title {
  font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--text-tertiary); margin-bottom: 12px;
}
.doc-toc a {
  display: block; padding: 5px 0 5px 12px; font-size: 12.5px;
  color: var(--text-tertiary); border-inline-start: 2px solid var(--border-subtle);
  transition: color 110ms, border-color 110ms;
}
.doc-toc a:hover { color: var(--text-primary); }
.doc-toc a.lvl-3 { padding-inline-start: 24px; }
.doc-toc a.is-active { color: var(--accent); border-inline-start-color: var(--accent); font-weight: 600; }

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.doc-breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: 7px;
  font-size: 12.5px; color: var(--text-tertiary); margin-bottom: 18px;
}
.doc-breadcrumb a:hover { color: var(--accent); }
.doc-breadcrumb svg { width: 13px; height: 13px; opacity: 0.6; }
.doc-breadcrumb .current { color: var(--text-secondary); font-weight: 500; }

/* ==========================================================================
   Article typography
   ========================================================================== */
.doc-article h1 {
  font-size: 34px; line-height: 1.15; font-weight: 720; letter-spacing: -0.02em;
  margin: 4px 0 12px;
}
.doc-article > p.lead {
  font-size: 17px; line-height: 1.6; color: var(--text-secondary); margin: 0 0 28px;
}
.doc-article h2 {
  font-size: 23px; font-weight: 660; letter-spacing: -0.01em;
  margin: 48px 0 14px; padding-top: 8px; scroll-margin-top: 80px;
  display: flex; align-items: center; gap: 12px;
}
.doc-article h2::before {
  content: ""; flex: none; width: 5px; height: 22px; border-radius: 3px;
  background: var(--accent-grad);
}
.doc-article h2 .anchor, .doc-article h3 .anchor {
  opacity: 0; color: var(--text-tertiary); font-weight: 400; transition: opacity 120ms;
}
.doc-article h2:hover .anchor, .doc-article h3:hover .anchor { opacity: 1; }
.doc-article .anchor { display: inline-flex; align-items: center; }
.doc-article .anchor svg { width: 15px; height: 15px; }
.doc-article h3 {
  font-size: 17.5px; font-weight: 640; margin: 32px 0 10px; scroll-margin-top: 80px;
}
.doc-article h4 { font-size: 15px; font-weight: 640; margin: 22px 0 8px; }
.doc-article p { font-size: 15px; line-height: 1.72; color: var(--text-primary); margin: 0 0 16px; }
.doc-article ul, .doc-article ol { margin: 0 0 18px; padding-inline-start: 22px; }
.doc-article li { font-size: 15px; line-height: 1.7; margin-bottom: 7px; }
.doc-article li::marker { color: var(--text-tertiary); }
.doc-article strong { font-weight: 650; color: var(--text-primary); }
.doc-article a:not(.btn):not(.feature-card):not(.next-card) {
  color: var(--accent); text-decoration: underline; text-underline-offset: 2px;
  text-decoration-color: var(--accent-ring);
}
.doc-article a:not(.btn):not(.feature-card):not(.next-card):hover { text-decoration-color: var(--accent); }
.doc-article hr { border: none; border-top: 1px solid var(--border-subtle); margin: 40px 0; }

/* Inline code + kbd */
code:not(pre code) {
  font-family: var(--mono); font-size: 0.86em;
  background: var(--bg-active); color: var(--accent-hover);
  padding: 2px 6px; border-radius: 6px; border: 1px solid var(--border-subtle);
}
html[data-theme="dark"] code:not(pre code) { color: #fdba74; }
kbd {
  font-family: var(--mono); font-size: 0.8em; font-weight: 600;
  background: var(--bg-elevated); color: var(--text-secondary);
  padding: 2px 7px; border-radius: 6px;
  border: 1px solid var(--border-default); box-shadow: 0 1px 0 var(--border-default);
}

/* ==========================================================================
   Callouts  (info / success / warning / danger / tip)
   ========================================================================== */
.callout {
  display: flex; gap: 13px; padding: 15px 17px; margin: 22px 0;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  border-inline-start-width: 4px;
  background: var(--bg-surface);
}
.callout__icon { flex: none; width: 22px; height: 22px; margin-top: 1px; }
.callout__icon svg { width: 22px; height: 22px; }
.callout__body { min-width: 0; }
.callout__title { font-weight: 650; font-size: 14px; margin-bottom: 3px; }
.callout__body p { font-size: 14px; line-height: 1.65; margin: 0; color: var(--text-secondary); }
.callout__body p + p { margin-top: 8px; }
.callout__body ul { margin: 8px 0 0; }
.callout__body li { font-size: 14px; color: var(--text-secondary); }

.callout--info    { border-inline-start-color: var(--info);    background: var(--info-soft); }
.callout--info    .callout__icon { color: var(--info); }
.callout--success { border-inline-start-color: var(--success); background: var(--success-soft); }
.callout--success .callout__icon { color: var(--success); }
.callout--warning { border-inline-start-color: var(--warning); background: var(--warning-soft); }
.callout--warning .callout__icon { color: var(--warning); }
.callout--danger  { border-inline-start-color: var(--danger);  background: var(--danger-soft); }
.callout--danger  .callout__icon { color: var(--danger); }
.callout--tip     { border-inline-start-color: var(--tip);     background: var(--tip-soft); }
.callout--tip     .callout__icon { color: var(--tip); }

/* ==========================================================================
   Step list (numbered procedure)
   ========================================================================== */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 24px 0; }
.steps > li {
  position: relative; padding: 2px 0 22px 48px; margin: 0;
  border-inline-start: 2px solid var(--border-subtle); margin-inline-start: 15px;
}
.steps > li:last-child { border-inline-start-color: transparent; padding-bottom: 0; }
.steps > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; inset-inline-start: -16px; top: -2px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 700; display: grid; place-items: center;
  box-shadow: 0 0 0 4px var(--bg-page);
}
.steps > li > .step-title { font-weight: 640; font-size: 15.5px; display: block; margin-bottom: 4px; }
.steps > li p { font-size: 14.5px; margin: 0 0 8px; color: var(--text-secondary); }

/* ==========================================================================
   Cards / feature grids
   ========================================================================== */
.feature-grid { display: grid; gap: 16px; margin: 24px 0; }
.feature-grid.cols-2 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.feature-grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.feature-card {
  position: relative; display: block; padding: 20px; border-radius: 16px;
  border: 1px solid var(--border-subtle); background: var(--bg-surface);
  box-shadow: var(--shadow-sm); overflow: hidden;
  transition: border-color 160ms, transform 160ms, box-shadow 160ms;
}
.feature-card::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--accent-grad); opacity: 0; transition: opacity 160ms;
}
a.feature-card:hover { border-color: var(--border-default); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
a.feature-card:hover::after { opacity: 1; }
.feature-card__icon {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 14px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 14%, transparent);
}
.feature-card__icon svg { width: 22px; height: 22px; }
.feature-card h3 { font-size: 15.5px; font-weight: 650; margin: 0 0 5px; display: flex; align-items: center; gap: 6px; }
.feature-card p { font-size: 13.5px; line-height: 1.6; color: var(--text-secondary); margin: 0; }
.feature-card .arrow { margin-inline-start: auto; opacity: 0; transform: translateX(-4px); transition: opacity 160ms, transform 160ms; color: var(--text-tertiary); }
.feature-card .arrow svg { width: 16px; height: 16px; }
a.feature-card:hover .arrow { opacity: 1; transform: translateX(0); }

/* Colourful icon tiles — add one of these next to .feature-card__icon */
.ic-orange { background: var(--hue-orange-soft); color: var(--hue-orange); }
.ic-blue   { background: var(--hue-blue-soft);   color: var(--hue-blue); }
.ic-green  { background: var(--hue-green-soft);  color: var(--hue-green); }
.ic-violet { background: var(--hue-violet-soft); color: var(--hue-violet); }
.ic-pink   { background: var(--hue-pink-soft);   color: var(--hue-pink); }
.ic-cyan   { background: var(--hue-cyan-soft);   color: var(--hue-cyan); }
.ic-amber  { background: var(--hue-amber-soft);  color: var(--hue-amber); }
.ic-rose   { background: var(--hue-rose-soft);   color: var(--hue-rose); }

/* ==========================================================================
   Section eyebrow label
   ========================================================================== */
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--accent-grad); }

/* ==========================================================================
   Hero (landing page)
   ========================================================================== */
.doc-hero {
  position: relative; overflow: hidden;
  margin: 6px calc(clamp(20px, 4vw, 60px) * -1) 8px;
  padding: 56px clamp(20px, 4vw, 60px) 52px;
  border-radius: 18px 18px 0 0;
  border-bottom: 1px solid var(--border-subtle);
  background:
    radial-gradient(900px 380px at 88% -10%, var(--accent-soft), transparent 60%),
    radial-gradient(700px 320px at 5% 0%, var(--hue-violet-soft), transparent 55%),
    var(--bg-page);
}
.doc-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image:
    linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(640px 380px at 70% 0%, #000, transparent 75%);
          mask-image: radial-gradient(640px 380px at 70% 0%, #000, transparent 75%);
}
.doc-hero__inner { position: relative; max-width: 760px; }
.doc-hero h1 {
  font-size: clamp(32px, 5vw, 46px); line-height: 1.08; letter-spacing: -0.025em;
  font-weight: 760; margin: 0 0 16px;
}
.doc-hero h1 .grad {
  background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.doc-hero p { font-size: 17.5px; line-height: 1.6; color: var(--text-secondary); margin: 0 0 26px; max-width: 620px; }
.hero-search {
  display: flex; align-items: center; gap: 11px; width: min(440px, 100%);
  height: 50px; padding: 0 16px; cursor: text;
  border: 1px solid var(--border-default); border-radius: 13px;
  background: var(--bg-surface); color: var(--text-tertiary); font-size: 15px;
  box-shadow: var(--shadow-md); transition: border-color 140ms, box-shadow 140ms;
}
.hero-search:hover { border-color: var(--accent); }
.hero-search svg { width: 19px; height: 19px; color: var(--text-tertiary); }
.hero-search kbd {
  margin-inline-start: auto; font-family: var(--mono); font-size: 11px;
  background: var(--bg-active); color: var(--text-secondary);
  padding: 3px 7px; border-radius: 6px; border: 1px solid var(--border-subtle);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 34px; }
.hero-stat b { display: block; font-size: 24px; font-weight: 720; letter-spacing: -0.02em; }
.hero-stat span { font-size: 12.5px; color: var(--text-tertiary); }

/* ==========================================================================
   "Start here" prominent cards
   ========================================================================== */
.start-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 22px 0; }
.start-card {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 22px; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--border-subtle); background: var(--bg-surface); box-shadow: var(--shadow-sm);
  transition: transform 160ms, box-shadow 160ms, border-color 160ms;
}
a.start-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-default); }
.start-card__num {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  font-size: 13px; font-weight: 750; color: #fff; background: var(--accent-grad);
}
.start-card h3 { font-size: 16.5px; font-weight: 660; margin: 0; }
.start-card p { font-size: 13.5px; line-height: 1.6; color: var(--text-secondary); margin: 0; flex: 1; }
.start-card .go { font-size: 13px; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.start-card .go svg { width: 15px; height: 15px; }

/* Support cards (help section) */
.support-card { display: flex; gap: 14px; align-items: flex-start; }
.support-card .feature-card__icon { margin-bottom: 0; }

/* ==========================================================================
   Screenshots (placeholder-aware)
   ========================================================================== */
figure.shot { margin: 24px 0; }
figure.shot .shot__frame {
  border: 1px solid var(--border-subtle); border-radius: var(--radius);
  background: var(--bg-surface); overflow: hidden; box-shadow: var(--shadow-sm);
}
figure.shot .shot__bar {
  height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 12px;
  border-bottom: 1px solid var(--border-subtle); background: var(--bg-page);
}
figure.shot .shot__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-default); }
figure.shot img { display: block; width: 100%; height: auto; }
figure.shot .shot__ph {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 220px; padding: 28px; text-align: center; color: var(--text-tertiary);
  background:
    repeating-linear-gradient(45deg, transparent, transparent 11px,
      color-mix(in srgb, var(--border-subtle) 60%, transparent) 11px,
      color-mix(in srgb, var(--border-subtle) 60%, transparent) 12px);
}
figure.shot .shot__ph svg { width: 34px; height: 34px; opacity: 0.5; }
figure.shot .shot__ph .path { font-family: var(--mono); font-size: 11.5px; color: var(--text-secondary); word-break: break-all; }
figure.shot figcaption { font-size: 12.5px; color: var(--text-tertiary); text-align: center; margin-top: 10px; }

/* ==========================================================================
   Tables
   ========================================================================== */
.doc-tablewrap { overflow-x: auto; margin: 22px 0; border-radius: var(--radius); border: 1px solid var(--border-subtle); }
.doc-article table { width: 100%; border-collapse: collapse; font-size: 14px; }
.doc-article thead th {
  text-align: start; font-weight: 640; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-tertiary); background: var(--bg-page);
  padding: 11px 15px; border-bottom: 1px solid var(--border-subtle);
}
.doc-article tbody td { padding: 12px 15px; border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary); vertical-align: top; }
.doc-article tbody tr:last-child td { border-bottom: none; }
.doc-article tbody tr:hover td { background: var(--bg-hover); }
.doc-article td strong { color: var(--text-primary); }

/* ==========================================================================
   Badges & misc
   ========================================================================== */
.badge {
  display: inline-flex; align-items: center; gap: 5px; vertical-align: middle;
  font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px;
  background: var(--bg-active); color: var(--text-secondary); border: 1px solid var(--border-subtle);
}
.badge--accent  { background: var(--accent-soft);  color: var(--accent);  border-color: transparent; }
.badge--success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge--warning { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.badge--info    { background: var(--info-soft);    color: var(--info);    border-color: transparent; }
.badge--danger  { background: var(--danger-soft);  color: var(--danger);  border-color: transparent; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  height: 42px; padding: 0 18px; border-radius: 10px; font-size: 14px; font-weight: 600;
  border: 1px solid var(--border-default); background: var(--bg-surface); color: var(--text-primary);
  transition: background 120ms, border-color 120ms, transform 120ms;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 17px; height: 17px; }
.btn--primary { background: var(--accent); color: #fff; border-color: transparent; }
.btn--primary:hover { background: var(--accent-hover); }

/* Pill list used by "in this section" / chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.chip {
  font-size: 12.5px; padding: 5px 12px; border-radius: 999px;
  background: var(--bg-surface); border: 1px solid var(--border-default); color: var(--text-secondary);
  transition: border-color 120ms, color 120ms;
}
a.chip:hover { border-color: var(--accent); color: var(--accent); }

/* Definition list (used in glossary) */
.defcard {
  border: 1px solid var(--border-subtle); border-radius: var(--radius);
  background: var(--bg-surface); padding: 16px 18px; margin-bottom: 12px;
}
.defcard dt { font-weight: 640; font-size: 15px; margin-bottom: 4px; }
.defcard dd { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-secondary); }

/* FAQ accordion */
.faq { border: 1px solid var(--border-subtle); border-radius: var(--radius); overflow: hidden; margin: 18px 0; background: var(--bg-surface); }
.faq details { border-bottom: 1px solid var(--border-subtle); }
.faq details:last-child { border-bottom: none; }
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 600; font-size: 15px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chevron { transition: transform 160ms; color: var(--text-tertiary); flex: none; }
.faq details[open] summary .chevron { transform: rotate(180deg); }
.faq .faq__body { padding: 0 18px 18px; }
.faq .faq__body p { font-size: 14.5px; color: var(--text-secondary); margin: 0 0 10px; line-height: 1.7; }

/* Prev / next pager */
.doc-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 56px; }
.next-card {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 18px;
  border: 1px solid var(--border-subtle); border-radius: var(--radius); background: var(--bg-surface);
  transition: border-color 130ms, transform 130ms;
}
.next-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.next-card .dir { font-size: 12px; color: var(--text-tertiary); display: flex; align-items: center; gap: 6px; }
.next-card .dir svg { width: 15px; height: 15px; flex: none; }
.next-card .ttl { font-size: 15px; font-weight: 640; color: var(--text-primary); }
.next-card.is-next { text-align: end; }
.next-card.is-next .dir { justify-content: flex-end; }

/* Mini overview / "at a glance" box at top of feature pages */
.glance {
  border: 1px solid var(--border-subtle); border-radius: 14px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 55%, transparent), transparent 60%),
    var(--bg-surface);
  padding: 20px 22px; margin: 4px 0 28px; box-shadow: var(--shadow-sm);
  display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.glance__row { display: flex; gap: 12px; align-items: flex-start; }
.glance__row svg { width: 18px; height: 18px; color: var(--accent); flex: none; margin-top: 2px; }
.glance__row b { display: block; font-size: 13px; margin-bottom: 1px; }
.glance__row span { font-size: 13.5px; color: var(--text-secondary); }

/* ==========================================================================
   Search overlay (⌘K)
   ========================================================================== */
.doc-search { position: fixed; inset: 0; z-index: 80; display: none; }
.doc-search.is-open { display: block; }
.doc-search__backdrop { position: absolute; inset: 0; background: rgba(8, 9, 10, 0.5); backdrop-filter: blur(3px); }
.doc-search__panel {
  position: relative; max-width: 580px; margin: 12vh auto 0;
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.doc-search__input {
  display: flex; align-items: center; gap: 11px; padding: 16px 18px;
  border-bottom: 1px solid var(--border-subtle);
}
.doc-search__input svg { width: 18px; height: 18px; color: var(--text-tertiary); }
.doc-search__input input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 16px; color: var(--text-primary); font-family: var(--font);
}
.doc-search__results { max-height: 56vh; overflow-y: auto; padding: 8px; }
.doc-search__results a {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 9px;
  color: var(--text-secondary);
}
.doc-search__results a.is-active, .doc-search__results a:hover { background: var(--accent-soft); color: var(--text-primary); }
.doc-search__results a svg { width: 17px; height: 17px; color: var(--text-tertiary); flex: none; }
.doc-search__results .r-title { font-size: 14px; font-weight: 550; color: var(--text-primary); }
.doc-search__results .r-sec { font-size: 11.5px; color: var(--text-tertiary); margin-inline-start: auto; }
.doc-search__empty { padding: 32px; text-align: center; color: var(--text-tertiary); font-size: 14px; }

/* ==========================================================================
   Footer — lives inside the main content column (not under the sidebar),
   full-bleed to the column edges. Injected by docs.js on every page.
   ========================================================================== */
.doc-footer {
  margin: 64px calc(clamp(20px, 4vw, 60px) * -1) 0;
  border-top: 1px solid var(--border-subtle);
  background:
    radial-gradient(700px 220px at 50% 130%, var(--accent-soft), transparent 70%),
    var(--bg-surface);
}
.doc-footer__inner {
  max-width: 760px; margin: 0 auto; padding: 40px clamp(20px, 4vw, 60px) 48px;
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.doc-footer__brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15px; }
.doc-footer__brand .doc-brand__mark { width: 30px; height: 30px; }
.doc-footer__brand .doc-brand__mark svg { width: 17px; height: 17px; }
.doc-footer__tag { font-size: 13.5px; color: var(--text-secondary); margin: 0; max-width: 460px; }
.doc-footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; margin: 4px 0 2px; }
.doc-footer__links a { font-size: 13px; color: var(--text-secondary); }
.doc-footer__links a:hover { color: var(--accent); }
.doc-footer__copy { font-size: 12.5px; color: var(--text-tertiary); margin: 8px 0 0; }
.doc-footer__made { font-size: 12.5px; color: var(--text-tertiary); margin: 0; }
.doc-footer__made a { color: var(--accent); font-weight: 600; }
.doc-footer__made a:hover { text-decoration: underline; }
.doc-footer__heart { color: #ef4444; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .doc-layout { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .doc-toc { display: none; }
}
@media (max-width: 860px) {
  :root { --topbar-h: 56px; }
  .doc-layout { grid-template-columns: minmax(0, 1fr); }
  .doc-menubtn { display: grid; }
  .doc-searchbtn { min-width: 0; }
  .doc-searchbtn .label { display: none; }
  .doc-searchbtn kbd { display: none; }
  .doc-brand__tag { display: none; }
  .doc-sidebar {
    position: fixed; inset-block: var(--topbar-h) 0; inset-inline-start: 0;
    width: min(86vw, var(--sidebar-w)); z-index: 45;
    transform: translateX(-105%); transition: transform 220ms ease;
    box-shadow: var(--shadow-lg); overflow-y: auto;
  }
  html[dir="rtl"] .doc-sidebar { transform: translateX(105%); }
  .doc-sidebar.is-open { transform: translateX(0); }
  .doc-scrim {
    position: fixed; inset: var(--topbar-h) 0 0; background: rgba(0,0,0,0.4);
    z-index: 44; opacity: 0; pointer-events: none; transition: opacity 200ms;
  }
  .doc-scrim.is-open { opacity: 1; pointer-events: auto; }
  .doc-main { padding: 22px 20px 0; }
  .doc-article h1 { font-size: 28px; }
  .doc-pager { grid-template-columns: 1fr; }
  .doc-hero { margin: 4px -20px 8px; padding: 36px 20px 32px; }
  .doc-hero h1 { font-size: clamp(27px, 8vw, 34px); }
  .doc-hero p { font-size: 16px; }
}

/* Print */
@media print {
  .doc-topbar, .doc-sidebar, .doc-toc, .doc-progress, .doc-pager, .doc-search { display: none !important; }
  .doc-layout { display: block; padding: 0; }
  .doc-main { padding: 0; }
}
