/* =============================================================
   Openline · eSIM Compatibility Check
   Single-file stylesheet. Designed to work standalone and as a
   full-screen modal embedded in openline.com.
   ============================================================= */

/* -------- 1 · Tokens ---------- */
:root {
  --brand: #FF6A00;
  --brand-ink: #E85E00;
  --brand-2: #FF8A3D;
  --ink: #0F1114;
  --ink-2: #3A3F47;
  --ink-3: #6B7280;
  --ink-4: #9CA3AF;
  --line: #EAEBEE;
  --line-2: #F1F2F5;
  --bg: #FFFFFF;
  --bg-2: #FAFAFB;
  --bg-3: #F5F5F7;
  --accent-bg: #FFF3E9;
  --accent-bg-2: #FFEADC;

  --ok: #128A3D;
  --ok-bg: #E3F4E8;
  --ok-bg-2: #CDEBD5;
  --err: #B3261E;
  --err-bg: #FBE6E4;
  --err-bg-2: #F6D3CF;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;

  --shadow-1: 0 1px 2px rgba(15, 17, 20, .04), 0 1px 3px rgba(15, 17, 20, .06);
  --shadow-2: 0 8px 24px rgba(15, 17, 20, .08);
  --shadow-3: 0 24px 60px rgba(15, 17, 20, .20);

  --content-w: 1180px;
  --hero-w: 780px;

  --cat: var(--brand);
  --cat-bg: var(--accent-bg);
}

/* -------- 2 · Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
  font-size: 15.5px;
  font-feature-settings: "ss01", "cv11";
}
a { color: var(--brand-ink); text-decoration: none; }
a:hover {
  text-decoration: underline;
  text-decoration-color: rgba(255, 106, 0, .5);
  text-underline-offset: 3px;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -100px; left: 12px;
  background: var(--ink); color: #fff; padding: 8px 14px;
  border-radius: 8px; text-decoration: none; z-index: 100;
  font-weight: 500; font-size: 14px;
}
.skip-link:focus { top: 12px; }

/* -------- 3 · Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { display: block; }
.brand-word { font-weight: 800; letter-spacing: -0.01em; font-size: 17px; }
.brand-sub {
  font-weight: 500; color: var(--ink-2);
  border-left: 1px solid #D9DBE0;
  padding-left: 14px; margin-left: 8px;
  font-size: 14.5px;
  letter-spacing: -0.005em;
}
.topnav { display: flex; gap: 8px; align-items: center; }
.topnav a {
  color: var(--ink-2);
  font-weight: 500; font-size: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background .12s ease, color .12s ease;
}
.topnav a:hover {
  color: var(--ink); text-decoration: none;
  background: var(--bg-3);
}
.topnav a.cta {
  color: #fff;
  background: var(--ink);
  padding: 9px 16px;
}
.topnav a.cta:hover {
  background: var(--brand); color: #fff;
}

/* -------- 4 · Layout / Hero ---------- */
main { max-width: var(--content-w); margin: 0 auto; padding: 0 22px 80px; }

.hero {
  padding: 64px 0 28px;
  text-align: center;
  max-width: var(--hero-w);
  margin: 0 auto;
}
.hero-logo { display: block; margin: 0 auto 22px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 12px;
  border-radius: 999px;
  background: var(--accent-bg);
  color: var(--brand-ink);
  font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 auto 20px;
}
.eyebrow-dot {
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 106, 0, .22);
}
.hero-title {
  font-size: clamp(32px, 4.2vw, 44px);
  font-weight: 800;
  letter-spacing: -0.028em;
  margin: 0 0 12px;
  line-height: 1.08;
}
.hero-title .accent { color: var(--brand); }
.hero-tag {
  color: var(--ink-3);
  font-size: 17px;
  margin: 0 auto 32px;
  max-width: 580px;
  line-height: 1.55;
}
.hero-tag strong { color: var(--ink); font-weight: 700; white-space: nowrap; }

/* -------- 5 · Search ---------- */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 4px 4px 4px 22px;
  box-shadow: var(--shadow-2);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.search-wrap:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(255, 106, 0, .14), var(--shadow-2);
}
.search-wrap .search-icon { color: var(--ink-4); flex-shrink: 0; }
.search-wrap input {
  flex: 1;
  border: 0; outline: 0;
  background: transparent;
  padding: 22px 12px;
  font-size: 17px;
  font-family: inherit;
  color: var(--ink);
  min-width: 0;
  -webkit-appearance: none; appearance: none;
}
.search-wrap input::placeholder { color: var(--ink-4); }
.search-wrap .clear {
  background: var(--bg-3);
  color: var(--ink-2);
  border: 0; border-radius: 999px;
  width: 44px; height: 44px;
  font-size: 22px; line-height: 1; cursor: pointer;
  transition: background .12s ease, color .12s ease;
  display: inline-flex; align-items: center; justify-content: center;
}
.search-wrap .clear:hover { background: var(--line); color: var(--ink); }
.search-wrap .clear[hidden] { display: none; }

/* Hero stats row — quick "at a glance" numbers under search */
.hero-stats {
  display: flex; align-items: stretch; justify-content: center;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.hero-stat {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.hero-stat b {
  font-weight: 700; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.hero-stat .dot-ok, .hero-stat .dot-err { width: 8px; height: 8px; }

/* -------- 6 · Filters bar (collapsible) ---------- */
.filters {
  margin: 20px auto 32px;
  max-width: 880px;
}
.filters-toggle {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 14px 20px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.filters-toggle:hover { border-color: var(--ink-4); box-shadow: var(--shadow-1); }
.filters-toggle[aria-expanded="true"] {
  border-color: var(--brand);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.filters-toggle > svg:first-of-type { color: var(--brand); flex-shrink: 0; }
.filters-label { font-weight: 600; color: var(--ink); }
.filters-summary {
  flex: 1;
  color: var(--ink-3);
  font-size: 13.5px;
  text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.filters-count-badge {
  background: var(--brand); color: #fff;
  font-size: 11.5px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
  min-width: 22px; text-align: center;
}
.filters-chevron { color: var(--ink-3); transition: transform .18s ease; margin-left: auto; }
.filters-toggle[aria-expanded="true"] .filters-chevron { transform: rotate(180deg); }

.filters-panel {
  border: 1px solid var(--brand);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 20px;
  background: var(--bg-2);
  animation: opl-slideDown .22s ease;
}
@keyframes opl-slideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.filters-explain {
  margin: 0 0 16px;
  color: var(--ink-3);
  font-size: 13.5px;
  line-height: 1.5;
}
.filters-group + .filters-group { margin-top: 18px; }
.filters-group-title {
  margin: 0 0 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.cat-btn {
  position: relative;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px 34px 12px 20px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: all .12s ease;
  display: flex; flex-direction: column;
  gap: 3px;
  overflow: hidden;
}
.cat-btn::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--cat);
}
.cat-btn:hover {
  border-color: var(--cat);
  box-shadow: var(--shadow-1);
  transform: translateY(-1px);
}
.cat-btn.active {
  border-color: var(--cat);
  background: var(--cat-bg);
}
.cat-btn.active::after {
  content: "";
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  border-radius: 999px;
  background: var(--cat) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round' d='M5 12l5 5L20 7'/></svg>") no-repeat center / 12px 12px;
}
.cat-name { font-weight: 600; color: var(--ink); font-size: 14px; }
.cat-count { color: var(--ink-3); font-size: 12.5px; }

/* Compat cat-btns tinted per state */
#compat-cats .cat-btn[data-value="yes"] { --cat: var(--ok);  --cat-bg: var(--ok-bg); }
#compat-cats .cat-btn[data-value="no"]  { --cat: var(--err); --cat-bg: var(--err-bg); }

/* Brand chips — tighter columns since there are ~30 of them */
#brand-cats { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
#brand-cats .cat-btn { padding: 10px 30px 10px 18px; }

.filters-actions {
  margin-top: 16px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
}
.filters-count { color: var(--ink-3); font-size: 13px; }
.filters-count strong { color: var(--ink); font-weight: 700; }
.filters-clear {
  background: transparent;
  border: 1px solid var(--line); color: var(--ink-2);
  font-family: inherit; font-size: 13px;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 999px;
  transition: all .12s ease;
}
.filters-clear:hover:not(:disabled) {
  color: var(--ink); border-color: var(--ink-4); background: var(--bg);
}
.filters-clear:disabled { opacity: .5; cursor: not-allowed; }

/* -------- 7 · Results ---------- */
.results-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  margin-bottom: 16px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.results-head h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.count { color: var(--ink-3); font-size: 14px; font-variant-numeric: tabular-nums; }
.count strong { color: var(--ink); font-weight: 700; }
.legend { display: flex; gap: 16px; margin: 0; color: var(--ink-3); font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot-ok, .dot-err {
  width: 8px; height: 8px; border-radius: 999px; display: inline-block;
}
.dot-ok  { background: var(--ok); }
.dot-err { background: var(--err); }

/* -------- 8 · Row list ---------- */
.row-list {
  list-style: none; margin: 0; padding: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.row {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-top: 1px solid var(--line-2);
  transition: background .1s ease;
}
.row:first-child { border-top: 0; }
.row:hover { background: var(--bg-2); }
.row .indicator {
  width: 10px; height: 10px; border-radius: 999px; justify-self: center;
}
.row.ok  .indicator { background: var(--ok);  box-shadow: 0 0 0 4px var(--ok-bg); }
.row.err .indicator { background: var(--err); box-shadow: 0 0 0 4px var(--err-bg); }
.row .meta { min-width: 0; }
.row .name {
  font-weight: 600; font-size: 15.5px; letter-spacing: -0.005em;
  color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row .sub {
  display: flex; gap: 10px; align-items: center;
  color: var(--ink-3); font-size: 12.5px; margin-top: 3px;
  flex-wrap: wrap;
}
.row .code {
  font-family: ui-monospace, SFMono-Regular, Menlo, "JetBrains Mono", monospace;
  font-size: 11.5px; color: var(--ink-2);
  padding: 2px 6px; background: var(--bg-3);
  border-radius: 4px;
  letter-spacing: 0.01em;
}
.row .note { color: var(--ink-3); font-style: italic; font-size: 12px; }

/* Regional-caveat warning button */
.note-warn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px 3px 7px;
  background: #FFF4E5;
  border: 1px solid #FFD9A8;
  border-radius: 999px;
  color: #A65A00;
  font-family: inherit; font-size: 11.5px; font-weight: 600;
  cursor: pointer;
  transition: all .12s ease;
  line-height: 1.2;
  white-space: nowrap;
}
.note-warn svg { flex-shrink: 0; color: #E58A00; }
.note-warn:hover {
  background: #FFE7C7;
  border-color: #FFB86B;
  color: #7A4300;
}
.note-warn:focus-visible {
  outline: 2px solid #FF6A00;
  outline-offset: 2px;
}

/* Regional-caveat popover */
.note-popover {
  position: fixed;
  z-index: 2000;
  min-width: 280px;
  max-width: 360px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-3);
  padding: 14px 16px 16px;
  animation: opl-popIn .15s cubic-bezier(.2,.7,.2,1);
}
@keyframes opl-popIn {
  from { opacity: 0; transform: translateY(-4px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.note-popover-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-2);
}
.note-popover-head svg { color: #E58A00; flex-shrink: 0; }
.note-popover-head strong {
  flex: 1; color: var(--ink); font-size: 13.5px; font-weight: 700;
  letter-spacing: -0.005em;
}
.note-popover-close {
  background: transparent; border: 0; padding: 4px;
  color: var(--ink-3); cursor: pointer;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .1s ease, color .1s ease;
}
.note-popover-close:hover { background: var(--bg-3); color: var(--ink); }
.note-popover p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.55;
}
.row .badge {
  font-size: 12.5px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px;
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.row .badge::before {
  content: "";
  width: 6px; height: 6px; border-radius: 999px;
  background: currentColor;
}
.row.ok  .badge { background: var(--ok-bg);  color: var(--ok); }
.row.err .badge { background: var(--err-bg); color: var(--err); }
.row mark {
  background: rgba(255, 106, 0, .22);
  color: inherit; padding: 0 2px; border-radius: 2px;
}

/* -------- 9 · Empty state ---------- */
.empty {
  padding: 48px 20px; text-align: center; color: var(--ink-3);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.empty-title { font-weight: 700; font-size: 18px; margin: 0 0 6px; color: var(--ink); }
.empty p { margin: 0 auto; max-width: 520px; }
.empty em {
  font-style: normal;
  font-family: ui-monospace, SFMono-Regular, Menlo, "JetBrains Mono", monospace;
  font-size: 13px;
  background: var(--bg-3);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--ink);
}
.empty-actions {
  margin-top: 22px;
  display: flex; gap: 10px; justify-content: center;
  flex-wrap: wrap;
}
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: inherit; font-size: 14px; font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all .12s ease;
}
.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-1px);
  box-shadow: var(--shadow-1);
}
.btn-ghost:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* -------- 10 · Rules / footnote ---------- */
.rules {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.rules-title {
  font-size: 20px; font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}
.rule {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.rule p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}
.badge-pill {
  display: inline-flex; align-items: center; gap: 6px;
  align-self: flex-start;
  font-size: 11.5px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-pill.ok  { background: var(--ok-bg);  color: var(--ok);  }
.badge-pill.err { background: var(--err-bg); color: var(--err); }
.footnote {
  margin-top: 22px;
  font-size: 13px;
  color: var(--ink-3);
  max-width: 720px;
  line-height: 1.6;
}
.footnote code {
  font-family: ui-monospace, SFMono-Regular, Menlo, "JetBrains Mono", monospace;
  background: var(--bg-3);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--ink);
}
.footnote strong { color: var(--ink); }

/* -------- 11 · Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 22px 22px 40px;
  max-width: var(--content-w);
  margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; flex-wrap: wrap;
  color: var(--ink-3); font-size: 13.5px;
}
.footer a { color: var(--ink-2); }
.footer a:hover { color: var(--brand); }
.footer-count b { color: var(--ink); }
.footer-socials {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  order: 2;
}
.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  color: var(--ink-3);
  border: 1px solid transparent;
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease, transform 120ms ease;
}
.footer-socials a:hover {
  color: var(--brand);
  border-color: var(--brand);
  background: var(--accent-bg);
  transform: translateY(-1px);
}
.footer-meta { order: 1; }
.footer-count { order: 3; }
@media (max-width: 640px) {
  .footer { flex-direction: column; align-items: flex-start; gap: 12px; padding-bottom: 32px; }
  .footer-socials { order: 3; align-self: center; }
  .footer-count { order: 2; }
}

/* =============================================================
   12 · Embedded / modal mode
   When the app is loaded inside an iframe (openline.com modal),
   apply :root[data-embed] via the parent, or via ?embed=1 query.
   ============================================================= */
:root[data-embed="1"] .topbar { position: static; background: transparent; }
:root[data-embed="1"] .skip-link { display: none; }
:root[data-embed="1"] .footer { padding: 20px 22px 32px; border-top: 1px solid var(--line); }
:root[data-embed="1"] .hero { padding-top: 32px; }
:root[data-embed="1"] main { padding-bottom: 40px; }

/* -------- 13 · Responsive ---------- */
@media (max-width: 640px) {
  .topbar { padding: 12px 14px; gap: 10px; }
  .brand-sub { padding-left: 10px; margin-left: 4px; font-size: 13px; }
  .topnav { gap: 6px; }
  .topnav a { font-size: 13px; padding: 7px 10px; }
  .topnav a.cta { padding: 7px 12px; }
  .hero { padding: 40px 0 20px; }
  .hero-tag { font-size: 15.5px; }
  main { padding: 0 14px 60px; }
  .search-wrap { padding: 3px 3px 3px 16px; }
  .search-wrap input { padding: 18px 8px; font-size: 16px; }
  .search-wrap .clear { width: 40px; height: 40px; }
  .row { grid-template-columns: 12px 1fr auto; gap: 12px; padding: 12px 14px; }
  .row .name { font-size: 14.5px; }
  .row .badge { font-size: 11.5px; padding: 4px 9px; }
  .rules { margin-top: 40px; padding-top: 28px; }
  .hero-stats { gap: 6px; }
  .hero-stat { padding: 8px 12px; font-size: 12.5px; }
}

/* -------- 14 · Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* =============================================================
   15 · KB extensions
   ============================================================= */

/* View switching (in-app: list ↔ article) */
.view[hidden] { display: none; }


/* KB rows — buttons in row-list (comp uses <div>, we need clicks) */
.row.kb {
  all: unset;
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-top: 1px solid var(--line-2);
  transition: background .1s ease;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--ink);
  width: 100%;
  box-sizing: border-box;
}
.row.kb:first-child { border-top: 0; }
.row.kb:hover { background: var(--bg-2); }
.row.kb:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}
.row-list li:first-child .row.kb { border-top: 0; }

.row.kb .indicator {
  width: 10px; height: 10px; border-radius: 999px;
  justify-self: center;
  background: var(--cat);
  box-shadow: 0 0 0 4px var(--cat-bg);
}
.row.kb.ok .badge,
.row.kb.err .badge,
.row.kb .badge {
  background: var(--cat-bg);
  color: var(--cat);
}
.row.kb.ok .indicator,
.row.kb.err .indicator {
  background: var(--cat);
  box-shadow: 0 0 0 4px var(--cat-bg);
}
.row.kb .snippet {
  color: var(--ink-3);
  font-size: 13.5px;
  line-height: 1.5;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row.kb mark {
  background: var(--cat-bg);
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 600;
}

/* Article toolbar — stays visible under the sticky topbar */
.article-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}
.btn-back {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-2);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .12s ease;
  flex-shrink: 0;
  white-space: nowrap;
}
.btn-back:hover {
  border-color: var(--ink);
  color: var(--ink);
  transform: translateX(-1px);
}
.btn-back svg { flex-shrink: 0; }

/* Compact search bar inside the article toolbar */
.search-wrap.search-wrap--compact {
  flex: 1;
  padding: 3px 3px 3px 14px;
  border-radius: 999px;
  box-shadow: none;
  border: 1px solid var(--line);
  position: relative;
}
.search-wrap.search-wrap--compact:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 106, 0, .12);
}
.search-wrap.search-wrap--compact .search-icon { width: 18px; height: 18px; }
.search-wrap.search-wrap--compact input {
  padding: 10px 8px;
  font-size: 14.5px;
}

/* Inline search results dropdown */
.search-inline-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  z-index: 30;
  max-height: 420px;
  overflow-y: auto;
  padding: 6px;
}
.search-inline-results[hidden] { display: none; }
.search-inline-results .row.kb {
  padding: 10px 14px;
  border-top: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  margin: 2px 0;
  grid-template-columns: 10px 1fr auto;
  gap: 12px;
}
.search-inline-results .row.kb:first-child { border-top: 0; }
.search-inline-results .row.kb:hover { background: var(--bg-2); }
.search-inline-results .row.kb .name { font-size: 14px; }
.search-inline-results .row.kb .snippet { display: none; }
.search-inline-results .row.kb .badge { font-size: 11.5px; padding: 3px 9px; }
.search-inline-results .empty-inline {
  padding: 14px 16px;
  color: var(--ink-3);
  font-size: 13.5px;
}

/* Hero autosuggest dropdown */
.suggest {
  position: absolute;
  top: calc(100% + 10px);
  left: 0; right: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(15, 17, 20, .10), 0 2px 6px rgba(15, 17, 20, .04);
  z-index: 30;
  max-height: 60vh;
  overflow-y: auto;
  padding: 8px;
}
.suggest[hidden] { display: none; }
.suggest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--ink);
  transition: background .12s ease;
}
.suggest-item:hover,
.suggest-item[aria-selected="true"] {
  background: var(--bg-3);
}
.suggest-item[aria-selected="true"] {
  background: var(--accent-bg);
}
.suggest-dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
  background: var(--cat, var(--brand));
}
.suggest-title {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggest-title mark {
  background: rgba(255, 106, 0, .18);
  color: var(--brand-ink);
  padding: 0 2px;
  border-radius: 3px;
  font-weight: 600;
}
.suggest-cat {
  font-size: 12px;
  color: var(--ink-3);
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-3);
}
.suggest-empty {
  padding: 14px 16px;
  color: var(--ink-3);
  font-size: 14px;
  text-align: center;
}
.suggest-footer {
  padding: 10px 14px 6px;
  border-top: 1px solid var(--line-2);
  margin-top: 6px;
  color: var(--ink-3);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.suggest-footer kbd {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-family: inherit;
  color: var(--ink-2);
}

.article-nav {
  display: inline-flex; gap: 6px;
  flex-shrink: 0;
}
.article-nav .foot-btn {
  padding: 8px 10px;
  min-width: 36px;
  justify-content: center;
}

/* Article view */
.article-view { max-width: 780px; margin: 0 auto; padding: 8px 0 60px; }
.article-view .eyebrow { margin-bottom: 16px; }
.article-view .eyebrow-dot { background: var(--cat); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cat) 22%, transparent); }
.article-view .article-eyebrow-text { color: var(--cat); }
.article-title {
  font-size: clamp(30px, 4.2vw, 44px);
  font-weight: 800;
  letter-spacing: -0.028em;
  margin: 0 0 14px;
  line-height: 1.08;
  color: var(--ink);
}
.article-crumbs {
  color: var(--ink-3);
  font-size: 13.5px;
  margin: 0 0 20px;
}
.article-crumbs a { color: var(--ink-3); }
.article-crumbs a:hover { color: var(--brand); }
.article-crumbs .sep { color: var(--ink-4); margin: 0 6px; }

.article-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 28px; }
.article-tags span {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  background: var(--bg-3);
  color: var(--ink-2);
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, "JetBrains Mono", monospace;
  letter-spacing: 0.01em;
}

/* Prose body */
.article-body {
  font-size: 16px;
  line-height: 1.72;
  color: var(--ink-2);
}
.article-body h2 {
  margin: 32px 0 10px;
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.article-body h3 {
  margin: 26px 0 8px;
  font-size: 17px; font-weight: 700;
  color: var(--ink);
}
.article-body p { margin: 0 0 14px; }
.article-body a {
  color: var(--brand-ink);
  text-decoration: underline;
  text-decoration-color: rgba(255, 106, 0, .35);
  text-underline-offset: 3px;
  font-weight: 500;
}
.article-body a:hover { text-decoration-color: currentColor; }
.article-body ul, .article-body ol { margin: 0 0 16px; padding-left: 22px; }
.article-body li { margin: 6px 0; }
.article-body strong { color: var(--ink); font-weight: 700; }
.article-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, "JetBrains Mono", monospace;
  font-size: 0.9em;
  background: var(--bg-3);
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid var(--line);
}
.article-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 18px 0 22px;
  font-size: 14.5px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.article-body th, .article-body td {
  border-bottom: 1px solid var(--line-2);
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}
.article-body tr:last-child td { border-bottom: 0; }
.article-body th {
  background: var(--bg-2);
  font-weight: 700;
  color: var(--ink);
}
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

/* Contact ("Still stuck?") box */
.contact-box {
  margin: 44px 0 0;
  padding: 22px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.contact-icon {
  flex-shrink: 0;
  color: var(--cat);
  width: 56px; height: 56px;
  display: inline-flex; align-items: center; justify-content: center;
}
.contact-icon svg { display: block; overflow: visible; }
.contact-icon .ring { transform-origin: 24px 24px; }
.contact-icon .ring-1 { opacity: .30; animation: opl-pulse 2.4s ease-in-out infinite; }
.contact-icon .ring-2 { opacity: .50; animation: opl-pulse 2.4s ease-in-out infinite .3s; }
.contact-icon .ring-3 { opacity: .70; animation: opl-pulse 2.4s ease-in-out infinite .6s; }
.contact-icon .chat-bubble { animation: opl-bob 2.4s ease-in-out infinite; transform-origin: 24px 24px; }
@keyframes opl-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.10); } }
@keyframes opl-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.contact-copy { flex: 1; min-width: 0; }
.contact-copy h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.contact-copy p {
  margin: 0 0 14px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.6;
}
.contact-copy a { color: var(--brand-ink); font-weight: 500; }
.contact-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.cta-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--bg);
  transition: all .12s ease;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}
.cta-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-1px);
  box-shadow: var(--shadow-1);
  text-decoration: none;
}
.cta-btn.primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.cta-btn.primary:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* Contact-box social row */
.contact-socials {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 13px;
  flex-wrap: wrap;
}
.contact-socials-label {
  margin-right: 4px;
  color: var(--ink-2);
  font-weight: 500;
}
.contact-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--line);
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease, transform 120ms ease;
}
.contact-socials a:hover {
  color: var(--brand);
  border-color: var(--brand);
  background: var(--accent-bg);
  transform: translateY(-1px);
}

/* Article-navigation footer */
.article-foot {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--ink-3);
  font-size: 14px;
}
.article-foot .foot-nav { display: flex; gap: 8px; }
.foot-btn {
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .12s ease;
  display: inline-flex; align-items: center; gap: 6px;
}
.foot-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.foot-btn:disabled { opacity: .35; cursor: not-allowed; }

/* Toolbar prev/next: give them the same weight as the back button */
.article-toolbar .foot-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  justify-content: center;
  color: var(--ink-2);
  border-color: var(--line);
}
.article-toolbar .foot-btn svg { width: 18px; height: 18px; }
.article-toolbar .foot-btn:hover:not(:disabled) {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--bg-3);
}

/* Related articles */
.article-related {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.article-related h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 14px;
}

/* Responsive tweaks for KB rows */
@media (max-width: 720px) {
  .article-toolbar { flex-wrap: wrap; }
  .search-wrap.search-wrap--compact { order: 3; width: 100%; flex-basis: 100%; }
  .btn-back { order: 1; }
  .article-nav { order: 2; margin-left: auto; }
}
@media (max-width: 640px) {
  .row.kb .badge { display: none; }
  .article-view { padding: 4px 0 40px; }
  .contact-box { flex-direction: column; gap: 14px; padding: 18px; }
}

/* -------- 13 · Real links for rows + category directory (SEO) ---------- */
a.row.kb { text-decoration: none; cursor: pointer; }
a.row.kb:hover .name { color: var(--ink); }
.footer-cats {
  max-width: var(--content-w);
  margin: 8px auto 0;
  padding: 26px 22px 6px;
  border-top: 1px solid var(--line);
}
.footer-cats h2 {
  font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 12px;
}
.footer-cats ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 18px;
}
.footer-cats a { color: var(--ink-2); font-size: 14px; text-decoration: none; }
.footer-cats a:hover { color: var(--brand); }
.footer-cats .n { color: var(--ink-4); font-size: 12.5px; margin-left: 4px; }
html[data-embed="1"] .footer-cats { display: none; }
.article-crumbs a { color: inherit; text-decoration: none; }
.article-crumbs a:hover { color: var(--cat, var(--brand)); text-decoration: underline; }
