/* ============================================================
   Quilr Deployment SOP — shared design system
   Theme aligned to installdocs.quilrai.dev (Infima · indigo · JetBrains Mono)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700;800&display=swap');

:root {
  /* Brand — indigo, matching installdocs.quilrai.dev */
  --brand:        #4f46e5;
  --brand-600:    #4338ca;
  --brand-700:    #3730a3;
  --brand-soft:   #eef2ff;
  --brand-ring:   rgba(99, 102, 241, .35);
  --indigo:       #6366f1;

  /* Neutrals */
  --bg:           #f6f7fb;
  --surface:      #ffffff;
  --sidebar:      #0e1018;
  --sidebar-2:    #161a26;
  --ink:          #1a1d29;
  --ink-soft:     #4b5266;
  --ink-faint:    #7a8194;
  --line:         #e6e8f0;
  --line-strong:  #d3d7e3;

  /* Code */
  --code-bg:      #11141d;
  --code-ink:     #e7eaf3;
  --code-line:    #232838;

  /* Status — accent palette from installdocs.quilrai.dev */
  --ok:           #16a34a;
  --ok-soft:      #e7f7ec;
  --warn:         #d97706;
  --warn-soft:    #fdf2e3;
  --crit:         #dc2626;
  --crit-soft:    #fdeaea;
  --info:         #0891b2;
  --info-soft:    #e6f6fa;

  --radius:       14px;
  --radius-sm:    9px;
  --shadow:       0 1px 2px rgba(16,18,30,.04), 0 8px 28px rgba(16,18,30,.06);
  --shadow-lg:    0 12px 48px rgba(16,18,30,.14);
  --maxw:         920px;
  --sidebar-w:    288px;

  /* installdocs.quilrai.dev uses JetBrains Mono throughout */
  --font: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   Layout
   ============================================================ */
.layout { display: flex; min-height: 100vh; }

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--sidebar);
  color: #c7ccda;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 22px 18px 40px;
  border-right: 1px solid #20232f;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 8px 18px;
  margin-bottom: 12px;
  border-bottom: 1px solid #20232f;
}
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--indigo) 100%);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 17px;
  box-shadow: 0 4px 14px rgba(91,91,246,.45);
}
.brand .brand-name { color: #fff; font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.brand .brand-sub  { color: #7d8499; font-size: 11.5px; font-weight: 500; }

.nav-group-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: .09em;
  color: #707892; font-weight: 700;
  padding: 18px 10px 7px;
}
.nav { list-style: none; margin: 0; padding: 0; }
.nav li { margin: 1px 0; }
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 10px; border-radius: 8px;
  color: #b4bacb; font-size: 13.5px; font-weight: 500;
  text-decoration: none; transition: background .12s, color .12s;
}
.nav a:hover { background: var(--sidebar-2); color: #fff; text-decoration: none; }
.nav a.active { background: rgba(91,91,246,.16); color: #fff; }
.nav a.active .step-num { background: var(--brand); color: #fff; border-color: transparent; }

.step-num {
  flex: 0 0 22px; width: 22px; height: 22px;
  display: grid; place-items: center;
  border: 1px solid #333a4d; border-radius: 50%;
  font-size: 11px; font-weight: 700; color: #9aa1b5;
  font-variant-numeric: tabular-nums;
}

.sidebar-foot {
  margin-top: 26px; padding: 14px 10px 0; border-top: 1px solid #20232f;
  font-size: 11.5px; color: #6f7790; line-height: 1.5;
}
.sidebar-foot a { color: #9aa1d8; }

/* ---- Main ---- */
.main { flex: 1 1 auto; min-width: 0; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  background: rgba(246,247,251,.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 12px 32px;
}
.topbar .crumbs { font-size: 13px; color: var(--ink-faint); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.topbar .crumbs a { color: var(--ink-soft); }
.topbar .crumbs .sep { color: var(--line-strong); }
.topbar .crumbs .here { color: var(--ink); font-weight: 600; }

.menu-btn {
  display: none; border: 1px solid var(--line-strong); background: var(--surface);
  border-radius: 8px; width: 38px; height: 38px; cursor: pointer; font-size: 18px;
}

.content { max-width: var(--maxw); margin: 0 auto; padding: 40px 32px 96px; }

/* ============================================================
   Typography & content blocks
   ============================================================ */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--brand-600); background: var(--brand-soft);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 18px;
}

h1 { font-size: 33px; line-height: 1.18; letter-spacing: -.02em; margin: 0 0 14px; font-weight: 800; }
h2 {
  font-size: 22px; letter-spacing: -.015em; margin: 46px 0 16px; font-weight: 750; font-weight: 700;
  padding-bottom: 9px; border-bottom: 1px solid var(--line);
}
h3 { font-size: 17px; margin: 30px 0 10px; font-weight: 700; letter-spacing: -.01em; }
h4 { font-size: 14px; margin: 22px 0 8px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }

.lead { font-size: 17.5px; color: var(--ink-soft); line-height: 1.6; margin: 0 0 18px; }

p { margin: 0 0 14px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin: 6px 0; }
li::marker { color: var(--ink-faint); }
strong { font-weight: 650; font-weight: 600; color: var(--ink); }

hr { border: 0; border-top: 1px solid var(--line); margin: 38px 0; }

/* inline code */
:not(pre) > code {
  font-family: var(--mono); font-size: .86em;
  background: #eef0f6; color: #3a3f73;
  padding: 2px 6px; border-radius: 6px; border: 1px solid #e2e5f0;
  word-break: break-word;
}

/* ============================================================
   Code blocks
   ============================================================ */
.code {
  position: relative; margin: 18px 0; border-radius: var(--radius-sm);
  background: var(--code-bg); border: 1px solid var(--code-line);
  box-shadow: var(--shadow); overflow: hidden;
}
.code-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px 8px 14px; background: #0b0e16;
  border-bottom: 1px solid var(--code-line);
  font-size: 12px; color: #8c93a8;
}
.code-head .label { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .02em; }
.code-head .dot { width: 8px; height: 8px; border-radius: 50%; background: #2c64d6; box-shadow: 0 0 0 3px rgba(44,100,214,.18); }
.code pre {
  margin: 0; padding: 16px; overflow-x: auto;
  font-family: var(--mono); font-size: 13px; line-height: 1.7; color: var(--code-ink);
  tab-size: 2;
}
.code pre code { font-family: inherit; background: none; border: 0; padding: 0; color: inherit; }

.copy-btn {
  border: 1px solid #2a3042; background: #171c28; color: #aab1c6;
  font-size: 11.5px; font-weight: 600; padding: 5px 11px; border-radius: 7px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: background .12s, color .12s, border-color .12s;
}
.copy-btn:hover { background: #222838; color: #fff; }
.copy-btn.copied { color: #58e08f; border-color: #2c5a40; }

/* comments inside code (lightweight) */
.code .c { color: #6b7488; font-style: italic; }
.code .v { color: #f0b86c; }   /* placeholder values */

/* ============================================================
   Callouts
   ============================================================ */
.callout {
  display: flex; gap: 13px; padding: 14px 16px; margin: 18px 0;
  border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface); font-size: 14.5px; line-height: 1.6;
}
.callout .ico { flex: 0 0 22px; font-size: 17px; line-height: 1.4; }
.callout p:last-child { margin-bottom: 0; }
.callout .ct { font-weight: 700; display: block; margin-bottom: 2px; }
.callout.note { background: var(--info-soft); border-color: #cfe0fa; }
.callout.note .ct { color: var(--info); }
.callout.tip  { background: var(--ok-soft); border-color: #c6ecd6; }
.callout.tip .ct { color: var(--ok); }
.callout.warn { background: var(--warn-soft); border-color: #f4e2bd; }
.callout.warn .ct { color: var(--warn); }
.callout.crit { background: var(--crit-soft); border-color: #f6cdd2; }
.callout.crit .ct { color: var(--crit); }

/* ============================================================
   Tables
   ============================================================ */
.table-wrap { overflow-x: auto; margin: 18px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; background: var(--surface); }
thead th {
  text-align: left; background: #f3f4fa; color: var(--ink-soft);
  font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  padding: 11px 14px; border-bottom: 1px solid var(--line);
}
tbody td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbff; }
td code, th code { white-space: nowrap; }

/* ============================================================
   Platform tabs
   ============================================================ */
.tabs { margin: 22px 0; }
.tab-btns { display: flex; gap: 6px; border-bottom: 2px solid var(--line); margin-bottom: 0; }
.tab-btn {
  border: 0; background: none; cursor: pointer;
  padding: 10px 16px; font-size: 14px; font-weight: 650; font-weight: 600; color: var(--ink-faint);
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--font);
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active { color: var(--brand-600); border-bottom-color: var(--brand); }
.tab-panel { display: none; padding-top: 20px; }
.tab-panel.active { display: block; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* ============================================================
   Step / part cards
   ============================================================ */
.part {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 22px 24px; margin: 20px 0;
  box-shadow: var(--shadow);
}
.part-head { display: flex; align-items: center; gap: 13px; margin-bottom: 6px; }
.part-badge {
  flex: 0 0 auto; min-width: 30px; height: 30px; padding: 0 9px;
  background: var(--brand-soft); color: var(--brand-700);
  border-radius: 8px; display: inline-grid; place-items: center;
  font-weight: 800; font-size: 13px;
}
.part-head h3 { margin: 0; }

/* checklist */
.checklist { list-style: none; padding: 0; margin: 16px 0; }
.checklist li {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); margin: 8px 0;
}
.checklist .box {
  flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px;
  border: 2px solid var(--line-strong); border-radius: 5px;
}
.checklist .ck { color: var(--ok); font-weight: 800; flex: 0 0 auto; }

/* expected output */
.expect {
  border-left: 3px solid var(--ok); background: var(--ok-soft);
  padding: 9px 14px; border-radius: 0 8px 8px 0; margin: -8px 0 18px;
  font-size: 13.5px; color: #14663d;
}
.expect strong { color: #0f4f2f; }

/* hero (landing) */
.hero { padding: 8px 0 6px; }
.hero h1 { font-size: 40px; }
.hero .lead { max-width: 640px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin: 24px 0; }
.track-card {
  display: block; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 22px; box-shadow: var(--shadow);
  transition: transform .14s, box-shadow .14s, border-color .14s; text-decoration: none; color: inherit;
}
.track-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand-ring); text-decoration: none; }
.track-card.soon { opacity: .82; }
.track-card .tc-ico { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; font-size: 22px; margin-bottom: 14px; }
.track-card h3 { margin: 0 0 6px; }
.track-card p { color: var(--ink-soft); font-size: 14px; margin: 0 0 14px; }
.track-card .tc-go { font-weight: 700; font-size: 13.5px; color: var(--brand-600); }
.pill {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; background: var(--warn-soft); color: var(--warn);
}

.steplist { counter-reset: s; list-style: none; padding: 0; margin: 22px 0; }
.steplist li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.steplist li:last-child { border-bottom: 0; }
.steplist .sn { flex: 0 0 30px; height: 30px; background: var(--sidebar); color: #fff; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.steplist a { font-weight: 650; font-weight: 600; }
.steplist .sd { color: var(--ink-soft); font-size: 13.5px; }

.meta-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 26px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px;
}
.chip .k { color: var(--ink-faint); font-weight: 500; }

/* ============================================================
   Wizard — top step progress bar
   ============================================================ */
.wizard {
  display: flex; align-items: flex-start; gap: 0;
  margin: 0 0 34px; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  overflow-x: auto;
}
.wstep {
  flex: 1 1 0; min-width: 78px; position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-decoration: none; text-align: center;
}
.wstep:hover { text-decoration: none; }
/* connector line */
.wstep::before, .wstep::after {
  content: ""; position: absolute; top: 15px; height: 2px; background: var(--line-strong);
}
.wstep::before { left: 0; right: 50%; margin-right: 16px; }
.wstep::after  { left: 50%; right: 0; margin-left: 16px; }
.wstep:first-child::before { display: none; }
.wstep:last-child::after { display: none; }
.wdot {
  position: relative; z-index: 1;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: var(--surface); border: 2px solid var(--line-strong); color: var(--ink-faint);
  font-variant-numeric: tabular-nums; transition: transform .12s;
}
.wlabel { font-size: 11.5px; font-weight: 600; color: var(--ink-faint); line-height: 1.25; max-width: 92px; }

/* done */
.wstep.done .wdot { background: var(--ok); border-color: var(--ok); color: #fff; }
.wstep.done::before, .wstep.done::after { background: var(--ok); }
.wstep.done .wlabel { color: var(--ink-soft); }
.wstep.current + .wstep::before,
.wstep.done::after { background: var(--ok); }
/* current */
.wstep.current .wdot { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 0 0 5px var(--brand-ring); }
.wstep.current .wlabel { color: var(--brand-700); font-weight: 700; }
.wstep.current::before { background: var(--ok); }
/* upcoming hover */
.wstep:not(.current):hover .wdot { transform: scale(1.08); border-color: var(--brand-ring); color: var(--brand-600); }

/* ============================================================
   Wizard — footer Back / Next controls
   ============================================================ */
.wizard-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 52px; padding-top: 24px; border-top: 1px solid var(--line);
}
.wizard-nav .wcount { font-size: 13px; font-weight: 600; color: var(--ink-faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wbtn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 20px; border-radius: 10px; font-size: 14.5px; font-weight: 650; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: all .14s;
  max-width: 48%;
}
.wbtn .wbt { display: flex; flex-direction: column; line-height: 1.15; }
.wbtn .wbt small { font-size: 11px; font-weight: 600; opacity: .7; }
.wbtn.back { background: var(--surface); border-color: var(--line-strong); color: var(--ink-soft); text-align: left; }
.wbtn.back:hover { border-color: var(--ink-faint); color: var(--ink); text-decoration: none; background: #fbfbfe; }
.wbtn.next { background: var(--brand); color: #fff; box-shadow: 0 6px 18px var(--brand-ring); text-align: right; }
.wbtn.next:hover { background: var(--brand-600); text-decoration: none; transform: translateY(-1px); box-shadow: 0 10px 24px var(--brand-ring); }
.wbtn.next .wbt small { color: rgba(255,255,255,.85); }
.wbtn[aria-disabled="true"] { visibility: hidden; }

@media (max-width: 560px) {
  .wizard-nav .wcount { display: none; }
  .wbtn { max-width: 50%; padding: 10px 14px; }
  .wbtn .wbt b { font-size: 13px; }
}

/* ============================================================
   Prev / next
   ============================================================ */
.pager { display: flex; gap: 14px; margin-top: 54px; }
.pager a {
  flex: 1; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 15px 18px; text-decoration: none; color: inherit;
  transition: border-color .14s, box-shadow .14s;
}
.pager a:hover { border-color: var(--brand-ring); box-shadow: var(--shadow); text-decoration: none; }
.pager a.next { text-align: right; }
.pager .dir { font-size: 12px; color: var(--ink-faint); font-weight: 600; }
.pager .ttl { font-weight: 700; color: var(--brand-600); font-size: 14.5px; margin-top: 2px; }
.pager a.disabled { visibility: hidden; }

/* ============================================================
   Responsive
   ============================================================ */
.scrim { display: none; }

@media (max-width: 1020px) {
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 50;
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: var(--shadow-lg);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(10,12,20,.45); }
  .menu-btn { display: inline-grid; place-items: center; }
}

@media (max-width: 640px) {
  .content { padding: 26px 18px 80px; }
  .topbar { padding: 10px 16px; }
  h1, .hero h1 { font-size: 27px; }
  .pager { flex-direction: column; }
}

/* print */
@media print {
  .sidebar, .topbar, .pager, .copy-btn, .menu-btn { display: none !important; }
  .content { max-width: none; }
  .code, .part, .table-wrap { box-shadow: none; }
}

/* ============================================================
   Single-screen wizard mode — no navigation panel
   (overrides the panelled layout above)
   ============================================================ */
.sidebar, .scrim, .menu-btn { display: none !important; }
.layout { display: block; min-height: 0; }
.main { width: 100%; }

html, body { height: 100%; }
body { overflow: hidden; }                 /* the page itself never scrolls */

/* slim top brand/breadcrumb bar — deep navbar, like installdocs.quilrai.dev */
.topbar {
  height: 54px; padding: 0 28px;
  display: flex; align-items: center; gap: 14px;
  background: #0c0b16; border-bottom: 1px solid #1c1b2e; backdrop-filter: none;
}
.topbar::before {
  content: "Quilr AI";
  font-weight: 800; font-size: 15px; color: #fff; letter-spacing: -.01em;
  padding-right: 14px; border-right: 1px solid rgba(255,255,255,.16);
}
.topbar .crumbs { color: #9aa0b5; }
.topbar .crumbs a { color: #c7cbd9; }
.topbar .crumbs a:hover { color: #fff; }
.topbar .crumbs .here { color: #fff; }
.topbar .crumbs .sep { color: #3a3950; }
.filterbar .fl { color: #8b90a6; }

/* the single "screen": only this region scrolls — full viewport width */
.content {
  --pad-x: 48px;
  max-width: none; width: 100%; margin: 0;
  height: calc(100vh - 54px);
  overflow-y: auto;
  padding: 0 var(--pad-x);
  scroll-padding-top: 130px;
}

/* full-bleed step navigator pinned to the top of the screen */
.wizard {
  position: sticky; top: 0; z-index: 8;
  margin: 0 calc(-1 * var(--pad-x)) 22px;
  padding: 15px var(--pad-x);
  background: var(--surface);
  border: 0; border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: 0 4px 14px rgba(16,18,30,.05);
}

/* full-bleed Back / Next bar pinned to the bottom of the screen */
.wizard-nav {
  position: sticky; bottom: 0; z-index: 8;
  margin: 36px calc(-1 * var(--pad-x)) 0;
  padding: 14px var(--pad-x) 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 -4px 14px rgba(16,18,30,.05);
}

/* landing page has no wizard chrome — give its top a little air */
.hero { padding-top: 16px; }

/* ---- Platform / Environment filter bar (injected into the top bar) ---- */
.filterbar { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.filterbar .fl { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.filterbar select {
  font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 6px 30px 6px 11px; cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a8194' stroke-width='3'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 9px center;
  transition: border-color .12s, box-shadow .12s;
}
.filterbar select:hover { border-color: var(--ink-faint); }
.filterbar select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }

/* let the filter hide individual OS tab buttons */
.tab-btn[hidden] { display: none !important; }

/* platform/environment-tagged free-form content */
[data-os][hidden], [data-env][hidden] { display: none !important; }

/* small caption above a command */
.muted-note { font-size: 12.5px; color: var(--ink-faint); font-weight: 600; margin: 0 0 8px; }

/* collapsible "paste the full script" fallback */
details.fallback { margin: 12px 0 2px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
details.fallback > summary {
  cursor: pointer; list-style: none; padding: 10px 13px;
  font-size: 13px; font-weight: 600; color: var(--brand-600);
  display: flex; align-items: center; gap: 8px; user-select: none;
}
details.fallback > summary::-webkit-details-marker { display: none; }
details.fallback > summary::before { content: "▸"; color: var(--ink-faint); font-size: 10px; }
details.fallback[open] > summary { border-bottom: 1px solid var(--line); }
details.fallback[open] > summary::before { content: "▾"; }
details.fallback > summary:hover { color: var(--brand-700); }
details.fallback .code { margin: 12px; }

/* ---- Windows installer dialog mock (screenshot replica) ---- */
.shot { margin: 20px 0; }
.shot figcaption { font-size: 12.5px; color: var(--ink-faint); margin-top: 9px; text-align: center; }
.winstaller {
  width: 100%; max-width: 540px; margin: 0 auto;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  border: 1px solid #b9bdc7; border-radius: 6px; overflow: hidden;
  box-shadow: var(--shadow-lg); background: #ececec;
}
.wi-title {
  display: flex; align-items: center; gap: 9px;
  background: linear-gradient(180deg, #c8102e, #a90c25); color: #fff;
  font-size: 13px; font-weight: 600; padding: 8px 12px;
}
.wi-title .wi-ico { width: 16px; height: 16px; border-radius: 3px; background: linear-gradient(135deg, #3aa0ff, #1f6fe0); flex: 0 0 auto; }
.wi-title .wi-x { margin-left: auto; font-weight: 400; font-size: 16px; line-height: 1; }
.wi-head { display: flex; align-items: flex-start; gap: 12px; background: #fff; padding: 16px 18px 14px; }
.wi-head > div:first-child { flex: 1; }
.wi-h1 { color: #2f6fed; font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.wi-sub { color: #1a1a1a; font-size: 13px; line-height: 1.4; }
.wi-logo {
  flex: 0 0 auto; width: 46px; height: 42px;
  background:
    radial-gradient(circle at 32% 38%, #3ec6f0 0 7px, transparent 8px),
    radial-gradient(circle at 60% 30%, #6aa3ff 0 8px, transparent 9px),
    radial-gradient(circle at 46% 62%, #b46cf0 0 7px, transparent 8px),
    radial-gradient(circle at 72% 58%, #ff5db0 0 6px, transparent 7px),
    radial-gradient(circle at 30% 66%, #34d3c0 0 5px, transparent 6px);
}
.wi-rule { height: 3px; background: linear-gradient(90deg, #16c0e0, #7c5cff 55%, #e23ea0); }
.wi-body { background: #ececec; padding: 24px 18px 28px; }
.wi-label { display: block; font-size: 13px; color: #1a1a1a; margin-bottom: 9px; }
.wi-input { height: 30px; background: #fff; border: 1px solid #8a8f99; border-radius: 2px; }
.wi-help { font-size: 12.5px; color: #1a1a1a; line-height: 1.5; margin: 18px 0 0; }
.wi-foot { display: flex; justify-content: flex-end; gap: 10px; background: #ececec; padding: 12px 18px 16px; border-top: 1px solid #dcdce0; }
.wi-btn {
  font-family: inherit; font-size: 13px; min-width: 92px; padding: 7px 14px;
  background: #fdfdfd; border: 1px solid #8a8f99; border-radius: 3px; color: #1a1a1a; cursor: default;
}
.wi-btn:disabled { color: #a0a4ad; border-color: #c8ccd4; background: #f0f0f0; }
.wi-btn.wi-primary { border: 2px solid #2f6fed; font-weight: 600; padding: 6px 13px; }

/* ---- macOS installer dialog mock ---- */
.macinstaller {
  width: 100%; max-width: 540px; margin: 0 auto;
  font-family: -apple-system, "SF Pro Text", "Helvetica Neue", system-ui, Arial, sans-serif;
  border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-lg);
  background: #fff; border: 1px solid #d4d4da;
}
.mac-title { position: relative; height: 40px; background: linear-gradient(#f7f7f8, #e8e8ec); border-bottom: 1px solid #d4d4da; display: flex; align-items: center; justify-content: center; }
.mac-lights { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); display: flex; gap: 8px; }
.mac-lights span { width: 12px; height: 12px; border-radius: 50%; display: block; }
.mac-lights .r { background: #ff5f57; box-shadow: inset 0 0 0 1px #e0443e; }
.mac-lights .y { background: #febc2e; box-shadow: inset 0 0 0 1px #e0a223; }
.mac-lights .g { background: #28c840; box-shadow: inset 0 0 0 1px #1dad2b; }
.mac-title .t { font-size: 13px; font-weight: 600; color: #3a3a40; }
.mac-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 24px 6px; }
.mac-head > div:first-child { flex: 1; }
.mac-h1 { font-size: 17px; font-weight: 700; color: #1a1a1a; margin: 0 0 5px; }
.mac-sub { font-size: 13px; color: #3a3a40; line-height: 1.4; }
.mac-logo {
  flex: 0 0 auto; width: 46px; height: 42px;
  background:
    radial-gradient(circle at 32% 38%, #3ec6f0 0 7px, transparent 8px),
    radial-gradient(circle at 60% 30%, #6aa3ff 0 8px, transparent 9px),
    radial-gradient(circle at 46% 62%, #b46cf0 0 7px, transparent 8px),
    radial-gradient(circle at 72% 58%, #ff5db0 0 6px, transparent 7px),
    radial-gradient(circle at 30% 66%, #34d3c0 0 5px, transparent 6px);
}
.mac-body { padding: 14px 24px 8px; }
.mac-label { display: block; font-size: 13px; font-weight: 600; color: #1a1a1a; margin-bottom: 8px; }
.mac-input { height: 30px; background: #fff; border: 1px solid #b7b7be; border-radius: 6px; box-shadow: inset 0 1px 1px rgba(0,0,0,.04); }
.mac-help { font-size: 12.5px; color: #6a6a72; line-height: 1.5; margin: 14px 0 0; }
.mac-foot { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 24px 20px; }
.mac-btn {
  font-family: inherit; font-size: 13px; min-width: 96px; padding: 6px 16px;
  background: #fff; border: 1px solid #c2c2c9; border-radius: 7px; color: #1a1a1a; cursor: default;
}
.mac-btn:disabled { color: #a6a6ad; background: #f4f4f6; }
.mac-btn.primary { background: #2f6fed; border-color: #2f6fed; color: #fff; font-weight: 600; }

/* active environment row in tables */
tbody tr.env-active { background: var(--brand-soft) !important; box-shadow: inset 3px 0 0 var(--brand); }
tbody tr.env-active td:first-child { font-weight: 700; color: var(--brand-700); }

@media (max-width: 760px) {
  .filterbar .fl span { display: none; }       /* hide labels, keep selects */
  .filterbar { gap: 8px; }
}
@media (max-width: 480px) {
  .topbar .crumbs { display: none; }            /* make room for the selects */
}

@media (max-width: 640px) {
  .content { height: calc(100vh - 54px); --pad-x: 16px; }
  .topbar { padding: 0 16px; }
  .topbar::before { font-size: 14px; padding-right: 10px; }
  h1, .hero h1 { font-size: 25px; }
}


/* ── Brand logo override — show the real Quilr icon instead of the 'Q' placeholder. */
.brand .logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #ffffff url('quilr-icon.png') center / 80% no-repeat;
  color: transparent;
  font-size: 0;
  flex-shrink: 0;
  box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 0 0 1px rgba(255,255,255,.04);
}


/* sop-brand-iconize v1 */
/* Drop the 'Quilr AI' wordmark — the icon alone carries the brand. */
.brand .brand-name { display: none; }

/* Re-balance the brand row now that the wordmark is gone. */
.brand { gap: 12px; padding: 8px 8px 18px; }
.brand .logo { width: 40px; height: 40px; border-radius: 9px; background-size: 78%; }
.brand .brand-sub { font-size: 12px; color: #9098ad; }


/* sop-feedback-widget v1 */
.fb-btn {
  /* Lives in the SOP topbar, immediately after the Platform/Env selectors. */
  display: inline-flex; align-items: center; gap: 7px;
  margin-left: 8px;
  padding: 7px 13px; border: 0; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand, #5b5bf6) 0%, var(--indigo, #7c5cff) 100%);
  color: #fff; font: 600 12px/1 var(--ui-font, system-ui, -apple-system, "Segoe UI", sans-serif);
  letter-spacing: .02em;
  cursor: pointer; box-shadow: 0 2px 6px rgba(91,91,246,.30);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.fb-btn:hover { filter: brightness(1.06); box-shadow: 0 4px 10px rgba(91,91,246,.40); }
.fb-btn:active { transform: translateY(1px); }
.fb-ico { font-size: 13px; line-height: 1; }

/* Fallback when no topbar exists (defensive — every SOP page has one). */
.fb-btn.fb-floating {
  position: fixed; right: 18px; bottom: 18px; z-index: 9999;
  margin: 0; padding: 10px 16px; border-radius: 999px;
  font-size: 13.5px; box-shadow: 0 6px 20px rgba(91,91,246,.35);
}

.fb-modal {
  position: fixed; inset: 0; z-index: 10000;
  display: none; align-items: center; justify-content: center;
  padding: 16px; background: rgba(4,6,10,.62);
  backdrop-filter: blur(2px);
}
.fb-modal.fb-open { display: flex; }

.fb-modal-card {
  width: 100%; max-width: 540px;
  background: #0f1218; color: #e6ebf3;
  border: 1px solid #20232f; border-radius: 14px;
  padding: 22px 22px 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
}
.fb-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.fb-modal-head h3 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.fb-close {
  background: transparent; border: 0; color: #9098ad;
  font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 8px;
}
.fb-close:hover { color: #fff; }
.fb-sub { font-size: 12.5px; color: #9098ad; margin: 4px 0 8px; }
.fb-sub code { background: rgba(255,255,255,.05); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

.fb-form .fb-l {
  display: block; margin-top: 12px;
  font-size: 12px; font-weight: 600; color: #9098ad; letter-spacing: .02em;
  text-transform: uppercase;
}
.fb-form input, .fb-form select, .fb-form textarea {
  display: block; width: 100%; margin-top: 5px; box-sizing: border-box;
  background: #0a0c12; color: #e6ebf3;
  border: 1px solid #20232f; border-radius: 8px;
  padding: 9px 11px; font: 400 13.5px/1.45 inherit;
}
.fb-form input:focus, .fb-form select:focus, .fb-form textarea:focus {
  outline: 0; border-color: var(--brand, #5b5bf6);
  box-shadow: 0 0 0 3px rgba(91,91,246,.18);
}
.fb-form textarea { resize: vertical; min-height: 110px; font-family: var(--mono-font, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: 12.5px; }
.fb-form .fb-err { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.18); }

.fb-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.fb-cancel, .fb-submit {
  border: 0; border-radius: 8px;
  padding: 9px 16px; font: 600 13px/1 inherit; cursor: pointer;
}
.fb-cancel { background: #1a1d27; color: #9098ad; }
.fb-cancel:hover { background: #20242f; color: #e6ebf3; }
.fb-submit { background: linear-gradient(135deg, var(--brand, #5b5bf6), var(--indigo, #7c5cff)); color: #fff; }
.fb-submit:hover { filter: brightness(1.08); }
.fb-hint { margin: 10px 0 0; font-size: 12px; color: #59c879; min-height: 14px; }

@media (max-width: 640px) {
  .fb-btn .fb-label { display: none; }
  .fb-btn { padding: 7px 9px; margin-left: 6px; }
  .fb-btn.fb-floating { padding: 12px; }
  .fb-modal-card { max-width: 100%; }
}
