@font-face { font-family: "APRegular"; src: url('fonts/APRegular.otf') format('opentype'); font-weight: 400; font-style: normal; }
@font-face { font-family: "APRegular"; src: url('fonts/APItalic.otf') format('opentype'); font-weight: 400; font-style: italic; }
@font-face { font-family: "APBold"; src: url('fonts/APBold.otf') format('opentype'); font-weight: 700; font-style: normal; }

/* ============================================================
   TOKENS — light theme (default)
   ============================================================ */
:root {
  /* Brand colours — fixed across themes */
  --green:   #174f43;
  --mint:    #dff3eb;
  --coral:   #e86f51;
  --blue:    #3478c8;
  --violet:  #7656c9;
  --amber:   #c88a22;

  /* Surfaces */
  --surface-1: #fbfcfb;   /* page background */
  --surface-2: #f8faf9;   /* sidebar, cards */
  --surface-3: #f2f6f4;   /* subtle tint, hover */
  --surface-4: #ffffff;   /* raised elements: dropdowns, modals, table */

  /* Text */
  --text-1: #14201e;      /* primary */
  --text-2: #66716e;      /* secondary / muted */
  --text-3: #8b9693;      /* tertiary / labels */

  /* Borders */
  --border: #dde4e1;

  /* Shadows */
  --shadow: 0 16px 40px rgba(22, 47, 41, .09);

  /* Semantic aliases (used by components) */
  --ink:   var(--text-1);
  --muted: var(--text-2);
  --line:  var(--border);
  --paper: var(--surface-1);
  --soft:  var(--surface-3);

  /* Component-specific */
  --topbar-bg:        rgba(251, 252, 251, .95);
  --nav-item-color:   #4b5855;
  --nav-icon-color:   #7a8884;
  --nav-icon-border:  #d9e0dd;
  --nav-hover-bg:     #edf3f0;
  --nav-active-bg:    #e2f0eb;
  --hero-bg-from:     #f1f7f4;
  --hero-bg-to:       #e7f2ee;
  --hero-border:      #d9e7e1;
  --scope-bg-from:    #eaf4f0;
  --scope-bg-to:      #f3f7f5;
  --scope-border:     #d4e4de;
  --progress-track:   #e6ece9;
  --progress-fill:    #3a966d;
  --step-check-border:#bed0c9;
  --insight-bg:       #f1eefa;
  --insight-btn-border:#cfc7e8;
  --insight-btn-color: #6046a1;
  --applicability-bg: #f1f7f4;
  --applicability-border: #cfe1da;
  --callout-bg:       #eef5fb;
  --help-card-bg:     #eaf3ef;
  --dialog-note-bg:   #eef5fb;
  --dialog-note-color:#50636e;
  --component-note-bg:#eef5fb;
  --component-note-color: #5f6f77;
  --component-tag-bg: #e5f2ed;
  --component-tag-color: #31765c;
  --filter-chip-active-bg: #e4f1ec;
  --filter-chip-active-border: #b9d5ca;
  --table-head-bg:    #f4f7f6;
  --table-head-color: #687570;
  --step-detail-bg:   #f2f6f4;
  --mode-switch-bg:   #edf2f0;
  --product-choice-checked-bg: #f0f7f4;
  --product-choice-checked-border: #85b5a5;
  --status-required-bg:   #e1f1eb;
  --status-required-color:#287155;
  --status-optional-bg:   #f0f1f1;
  --status-optional-color:#65706d;
  --status-upgrade-bg:    #fff1d8;
  --status-upgrade-color: #8a5c0d;
  --status-recommended-bg:#e8eef9;
  --status-recommended-color:#355f9a;
  --kbd-bg:           #ffffff;
  --kbd-border:       #cbd4d0;
  --scrollbar-thumb: #bcc7c3;
  --breadcrumb-color: #82908c;
  --eyebrow-color:    #71807b;
  --card-kicker-color:#749087;
  --on-this-page-small: #87928f;
  --backend-eyebrow:  #a9d7c7;
  --backend-small:    #c6dfd6;
  --connector-color:  #8ebcad;
  --platform-card-bg: #173f37;
  --platform-card-kicker: #a8d3c4;
  --platform-card-p:  #c3d8d1;
  --platform-card-btn:#b7dfd0;
  --coral-note-bg:    #fff1ed;
  --amber-note-bg:    #fff7e8;
  --tip-bg:           #eaf7f0;
  --setting-row-hover:#f8faf9;
  --accent:           #174f43;
  --pulse-dot:        #3e9d78;
  --pulse-ring:       #e4f2ed;
  --search-focus:     #82b7a7;
  --dialog-shadow:    rgba(16, 35, 30, .25);
  --backdrop-bg:      rgba(18, 30, 27, .55);
}

/* ============================================================
   TOKENS — dark theme
   ============================================================ */
[data-theme="dark"] {
  --accent:           #5abf96;
  --surface-1: #111917;
  --surface-2: #1a2421;
  --surface-3: #1f2d29;
  --surface-4: #243330;

  --text-1: #e8f0ee;
  --text-2: #a8bfb8;
  --text-3: #7a9690;

  --border: #2e3f3b;

  --shadow: 0 16px 40px rgba(0, 0, 0, .35);

  --topbar-bg:        rgba(17, 25, 23, .95);
  --nav-item-color:   #b0c4be;
  --nav-icon-color:   #7a9690;
  --nav-icon-border:  #2e3f3b;
  --nav-hover-bg:     #1f2d29;
  --nav-active-bg:    #1a3530;
  --hero-bg-from:     #162420;
  --hero-bg-to:       #1a2d28;
  --hero-border:      #2a3f3a;
  --scope-bg-from:    #162420;
  --scope-bg-to:      #1a2d28;
  --scope-border:     #2a3f3a;
  --progress-track:   #2a3a36;
  --progress-fill:    #3a966d;
  --step-check-border:#2e4f45;
  --insight-bg:       #1e1a2e;
  --insight-btn-border:#3d3560;
  --insight-btn-color: #a990e8;
  --applicability-bg: #162420;
  --applicability-border:#2a3f3a;
  --callout-bg:       #162030;
  --help-card-bg:     #162420;
  --dialog-note-bg:   #162030;
  --dialog-note-color:#8aacba;
  --component-note-bg:#162030;
  --component-note-color:#8aacba;
  --component-tag-bg: #1a3530;
  --component-tag-color:#5abf96;
  --filter-chip-active-bg:#1a3530;
  --filter-chip-active-border:#2e5a4e;
  --table-head-bg:    #1a2421;
  --table-head-color: #7a9690;
  --step-detail-bg:   #1a2421;
  --mode-switch-bg:   #1a2421;
  --product-choice-checked-bg:#1a3530;
  --product-choice-checked-border:#2e5a4e;
  --status-required-bg:   #1a3530;
  --status-required-color:#5abf96;
  --status-optional-bg:   #242e2b;
  --status-optional-color:#7a9690;
  --status-upgrade-bg:    #2e2410;
  --status-upgrade-color: #c8a060;
  --status-recommended-bg:#1a2035;
  --status-recommended-color:#7aaae8;
  --kbd-bg:           #1a2421;
  --kbd-border:       #2e3f3b;
  --scrollbar-thumb: #3d524c;
  --breadcrumb-color: #607870;
  --eyebrow-color:    #607870;
  --card-kicker-color:#5a8070;
  --on-this-page-small:#607870;
  --backend-eyebrow:  #5abf96;
  --backend-small:    #4a8a70;
  --connector-color:  #2e5a4e;
  --platform-card-bg: #0f2420;
  --platform-card-kicker:#5abf96;
  --platform-card-p:  #4a7a6a;
  --platform-card-btn:#5abf96;
  --coral-note-bg:    #2a1a16;
  --amber-note-bg:    #2a2010;
  --tip-bg:           #162e22;
  --setting-row-hover:#1a2421;
  --pulse-dot:        #5abf96;
  --pulse-ring:       #1a3530;
  --search-focus:     #4a8a70;
  --dialog-shadow:    rgba(0, 0, 0, .5);
  --backdrop-bg:      rgba(0, 0, 0, .7);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent:           #5abf96;
    --surface-1: #111917;
    --surface-2: #1a2421;
    --surface-3: #1f2d29;
    --surface-4: #243330;
    --text-1: #e8f0ee;
    --text-2: #a8bfb8;
    --text-3: #7a9690;
    --border: #2e3f3b;
    --shadow: 0 16px 40px rgba(0, 0, 0, .35);
    --topbar-bg:        rgba(17, 25, 23, .95);
    --nav-item-color:   #b0c4be;
    --nav-icon-color:   #7a9690;
    --nav-icon-border:  #2e3f3b;
    --nav-hover-bg:     #1f2d29;
    --nav-active-bg:    #1a3530;
    --hero-bg-from:     #162420;
    --hero-bg-to:       #1a2d28;
    --hero-border:      #2a3f3a;
    --scope-bg-from:    #162420;
    --scope-bg-to:      #1a2d28;
    --scope-border:     #2a3f3a;
    --progress-track:   #2a3a36;
    --progress-fill:    #3a966d;
    --step-check-border:#2e4f45;
    --insight-bg:       #1e1a2e;
    --insight-btn-border:#3d3560;
    --insight-btn-color: #a990e8;
    --applicability-bg: #162420;
    --applicability-border:#2a3f3a;
    --callout-bg:       #162030;
    --help-card-bg:     #162420;
    --dialog-note-bg:   #162030;
    --dialog-note-color:#8aacba;
    --component-note-bg:#162030;
    --component-note-color:#8aacba;
    --component-tag-bg: #1a3530;
    --component-tag-color:#5abf96;
    --filter-chip-active-bg:#1a3530;
    --filter-chip-active-border:#2e5a4e;
    --table-head-bg:    #1a2421;
    --table-head-color: #7a9690;
    --step-detail-bg:   #1a2421;
    --mode-switch-bg:   #1a2421;
    --product-choice-checked-bg:#1a3530;
    --product-choice-checked-border:#2e5a4e;
    --status-required-bg:   #1a3530;
    --status-required-color:#5abf96;
    --status-optional-bg:   #242e2b;
    --status-optional-color:#7a9690;
    --status-upgrade-bg:    #2e2410;
    --status-upgrade-color: #c8a060;
    --status-recommended-bg:#1a2035;
    --status-recommended-color:#7aaae8;
    --kbd-bg:           #1a2421;
    --kbd-border:       #2e3f3b;
    --scrollbar-thumb: #3d524c;
    --breadcrumb-color: #607870;
    --eyebrow-color:    #607870;
    --card-kicker-color:#5a8070;
    --on-this-page-small:#607870;
    --backend-eyebrow:  #5abf96;
    --backend-small:    #4a8a70;
    --connector-color:  #2e5a4e;
    --platform-card-bg: #0f2420;
    --platform-card-kicker:#5abf96;
    --platform-card-p:  #4a7a6a;
    --platform-card-btn:#5abf96;
    --coral-note-bg:    #2a1a16;
    --amber-note-bg:    #2a2010;
    --tip-bg:           #162e22;
    --setting-row-hover:#1a2421;
    --pulse-dot:        #5abf96;
    --pulse-ring:       #1a3530;
    --search-focus:     #4a8a70;
    --dialog-shadow:    rgba(0, 0, 0, .5);
    --backdrop-bg:      rgba(0, 0, 0, .7);
  }
}

/* ============================================================
   BASE RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
/* Scrollbars: thin, themed, transparent track — applies to the page and to
   every scrolling pane (On this page, chat, glossary, explorers, code
   blocks). Colours come from --scrollbar-thumb in each theme block. */
* { scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) transparent; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--surface-1);
  color: var(--text-1);
  font-family: "APRegular", sans-serif;
}
button, input, select { font: inherit; }
button { cursor: pointer; }

/* ============================================================
   APP SHELL LAYOUT
   ============================================================ */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template: 72px 1fr auto / 280px 1fr;
  grid-template-areas: "top top" "side main" "side foot";
}
.app-shell[data-chat-open],
.app-shell[data-support-open],
.app-shell[data-help-open],
.app-shell[data-glossary-open],
.app-shell[data-search-open] {
  grid-template: 72px 1fr auto / 280px 1fr 360px;
  grid-template-areas: "top top top" "side main panel" "side foot foot";
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  grid-area: top;
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 280px 1fr minmax(400px, 700px);
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: var(--topbar-bg);
  backdrop-filter: blur(14px);
}

.brand-area {
  height: 100%;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--border);
  position: relative;
}

.brand {
  height: 100%;
  padding: 8px 12px 0 28px;
  display: flex;
  align-items: flex-start;
  flex: 0 0 auto;
  color: var(--text-1);
  text-decoration: none;
}

.brand-logo { width: 35px; height: 35px; object-fit: contain; }

.brand b { font-family: "APBold"; font-size: 15px; }
.brand small {
  display: block;
  color: var(--text-2);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.landing-header .brand small { text-transform: none; letter-spacing: .03em; }

.brand-guide-btn {
  height: 100%;
  padding: 0 16px 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  flex: 1;
  min-width: 0;
}
.brand-guide-btn > span:first-child { display: flex; flex-direction: column; gap: 6px; }
.brand-guide-bottom { display: flex; align-items: center; gap: 4px; }
.guide-chevron {
  color: var(--text-2);
  font-size: 22px;
  flex: 0 0 auto;
  line-height: 1;
}
.brand-guide-btn b    { font-family: "APBold"; font-size: 15px; white-space: nowrap; color: var(--text-1); }
.brand-guide-btn > span:first-child { display: flex; flex-direction: column; gap: 6px; }
.brand-guide-btn small { display: flex; align-items: center; gap: 5px; color: var(--text-2); font-size: 11px; letter-spacing: .08em; white-space: nowrap; }
.brand-guide-btn small .material-icons { font-size: 11px !important; line-height: 1 !important; color: var(--accent); }

.topbar-context-chevron {
  color: var(--text-2);
  font-size: 22px;
  flex: 0 0 auto;
  line-height: 1;
}

/* Guide / version picker dropdown */
.guide-picker {
  position: absolute;
  top: 100%;
  left: 0;
  width: 300px;
  padding: 7px;
  background: var(--surface-4);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 50;
}
.guide-picker-heading {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: var(--text-2);
  font-weight: 700;
  padding: 10px 12px 4px;
}
.guide-picker-item {
  width: 100%;
  border: 0;
  background: var(--surface-4);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  color: var(--text-1);
}
.guide-picker-item:hover,
.guide-picker-item.selected { background: var(--surface-3); }
.guide-picker-item .material-icons { font-size: 18px; color: var(--accent); flex: 0 0 auto; }
.guide-picker-item b     { font-size: 13px; display: block; }
.guide-picker-item small { color: var(--text-2); font-size: 11px; margin-top: 2px; display: block; }

/* Top-actions area */
.top-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
}

@keyframes pulse-ring {
  0%   { transform: scale(1);   opacity: .7; }
  70%  { transform: scale(2.8); opacity: 0; }
  100% { transform: scale(2.8); opacity: 0; }
}

.pulse-dot {
  display: inline-block;
  position: relative;
  width: 7px;
  height: 7px;
  background: var(--pulse-dot);
  border-radius: 50%;
  margin-right: 7px;
  box-shadow: 0 0 0 4px var(--pulse-ring);
  flex: 0 0 auto;
}
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--pulse-dot);
  animation: pulse-ring 2s ease-out infinite;
}

.topbar-context-btn {
  display: flex;
  align-items: center;
  gap: 0;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font: inherit;
}
.topbar-context-chevron { font-size: 22px; color: var(--text-2); margin-left: 6px; line-height: 1; }
.topbar-context-label   { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.topbar-context-label b { color: var(--text-1); font-weight: 700; }

.topbar-version-wrap { position: relative; }
.topbar-version-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font: inherit;
}
.topbar-version-label   { font-size: 12px; color: var(--text-2); }
.topbar-version-label b { color: var(--text-1); font-weight: 700; }

/* Theme toggle */
.theme-toggle {
  border: 0;
  background: transparent;
  padding: 4px 6px;
  color: var(--text-2);
  line-height: 1;
  border-radius: 6px;
  display: flex;
  align-items: center;
}
.theme-toggle:hover { background: var(--surface-3); color: var(--text-1); }
.theme-toggle .material-icons,
.theme-toggle .material-icons-outlined { font-size: 20px; }
[data-theme="dark"] .theme-toggle { color: var(--text-1); }

/* Global search */
.search-area {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 28px 0 auto;
}

.global-search {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-3);
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 0 13px;
  color: var(--text-2);
}
.global-search:focus-within { border-color: var(--search-focus); background: var(--surface-4); }
.global-search input { border: 0; outline: 0; background: transparent; width: 100%; color: var(--text-1); }

kbd {
  font-size: 11px;
  border: 1px solid var(--kbd-border);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 2px 6px;
  background: var(--kbd-bg);
  color: var(--text-2);
}

/* Misc topbar buttons */
.ghost-button {
  border: 1px solid var(--border);
  background: var(--surface-4);
  border-radius: 8px;
  padding: 9px 13px;
  color: var(--text-1);
  font-weight: 600;
}
.avatar {
  border: 0;
  background: #d9eee6;
  color: var(--green);
  font-weight: 700;
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

/* ============================================================
   SIDEBAR & NAVIGATION
   ============================================================ */
.sidebar {
  grid-area: side;
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  padding: 24px 18px;
  border-right: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.eyebrow,
.nav-heading {
  display: block;
  color: var(--eyebrow-color);
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
}
.nav-heading { margin: 22px 12px 12px; }

.product-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: 5px;
  flex: 0 0 auto;
}

.nav-group { margin: 14px 0; }
.nav-group > span {
  display: block;
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin: 0 12px 6px;
}

.nav-item {
  border: 0;
  background: transparent;
  width: 100%;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  border-radius: 8px;
  color: var(--nav-item-color);
  font-size: 13px;
}
.nav-item i {
  font-style: normal;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--nav-icon-color);
  border: 1px solid var(--nav-icon-border);
  border-radius: 6px;
  font-size: 14px;
}
.nav-item:hover          { background: var(--nav-hover-bg); }
.nav-item.active         { background: var(--nav-active-bg); color: var(--accent); font-weight: 700; }
.nav-item.active i       { background: var(--green); border-color: var(--green); color: #fff; }

.empty-nav { font-size: 12px; color: var(--text-2); padding: 10px; }

.nav-home-link {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
  cursor: pointer;
}
.nav-home-link .material-icons { font-size: 14px; }
.nav-home-link:hover { background: var(--nav-hover-bg); border-radius: 8px; }

.help-card {
  margin-top: auto;
  background: var(--help-card-bg);
  border-radius: 12px;
  padding: 14px;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
}
.help-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
}
.help-card b      { font-size: 12px; }
.help-card p      { font-size: 11px; color: var(--text-2); margin: 3px 0 0; }
.help-card-actions { grid-column: 2; display: flex; gap: 6px; }
.help-card-actions button {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--surface-4);
  border-radius: 7px;
  color: var(--accent);
  padding: 6px 0;
  font-size: 11px;
  font-weight: 700;
}
.help-card-actions button:hover { background: var(--filter-chip-active-bg); border-color: var(--filter-chip-active-border); }

/* ============================================================
   CHAT PANE
   ============================================================ */
.chat-pane {
  grid-area: panel;
  display: none;
  flex-direction: column;
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  border-left: 1px solid var(--border);
  background: var(--surface-2);
}
.app-shell[data-chat-open] #chatPane,
.app-shell[data-support-open] #supportPane,
.app-shell[data-help-open] #helpPane,
.app-shell[data-glossary-open] #glossaryPane,
.app-shell[data-search-open] #searchPane { display: flex; }
#supportPane, #helpPane, #glossaryPane, #searchPane { grid-area: panel; display: none; flex-direction: column; position: sticky; top: 72px; height: calc(100vh - 72px); border-left: 1px solid var(--border); background: var(--surface-2); }

.chat-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}
.chat-pane-header div {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
}
.chat-pane-header .material-icons { font-size: 18px; color: var(--accent); }

.chat-pane-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 18px;
}
.chat-pane-body a { color: var(--accent); }

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
main { grid-area: main; min-width: 0; container-type: inline-size; }

.portal-footer {
  grid-area: foot;
  padding: 0 0 20px;
}
.portal-footer p {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 clamp(28px, 5vw, 76px);
  font-size: 11px;
  color: var(--text-3);
}

.content-wrap {
  max-width: 1260px;
  margin: 0 auto;
  padding: 25px clamp(28px, 5vw, 76px) 70px;
}

.breadcrumbs { font-size: 11px; color: var(--breadcrumb-color); margin-bottom: 20px; display: flex; align-items: center; gap: 16px; }
.breadcrumbs span { padding: 0 7px; }
.breadcrumb-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--accent);
  font-size: inherit;
  cursor: pointer;
}
.breadcrumb-link:hover { text-decoration: underline; }

.breadcrumb-prevnext {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  margin-left: auto;
}
.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--border);
  background: var(--surface-4);
  border-radius: 7px;
  padding: 5px 10px 5px 7px;
  font-size: 11px;
  color: var(--text-2);
  width: 180px;
  white-space: nowrap;
  overflow: hidden;
}
.breadcrumb-nav span:not(.material-icons) { overflow: hidden; text-overflow: ellipsis; }
.breadcrumb-nav:first-child { padding: 5px 7px 5px 5px; justify-content: flex-start; }
.breadcrumb-nav:last-child  { justify-content: flex-end; }
.breadcrumb-nav:hover { color: var(--text-1); border-color: var(--accent); }
.breadcrumb-nav:disabled { opacity: 0.35; cursor: default; }
.breadcrumb-nav:disabled:hover { color: var(--text-2); border-color: var(--border); }
.breadcrumb-nav .material-icons { font-size: 16px !important; flex: 0 0 auto; }
.no-transform { text-transform: none; }
.breadcrumb-version {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 1px 7px;
  margin-right: 8px;
  letter-spacing: .03em;
}

/* ============================================================
   HERO PANEL
   ============================================================ */
.hero-panel {
  background: linear-gradient(135deg, var(--hero-bg-from), var(--hero-bg-to));
  border: 1px solid var(--hero-border);
  border-radius: 18px;
  padding: clamp(28px, 4vw, 50px);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 50px;
  min-height: 310px;
  overflow: hidden;
}

.hero-copy h1,
.doc-article h1,
.catalog-header h1,
.generic-page h1 {
  font: 700 clamp(34px, 4vw, 52px) / 1.05 "APBold";
  margin: 11px 0 15px;
  letter-spacing: -.04em;
}
.hero-copy p,
.doc-article header p,
.catalog-header p,
.generic-page > p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-2);
  max-width: 650px;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge-row { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 24px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 99px;
  padding: 6px 9px;
  background: var(--surface-4);
  border: 1px solid var(--border);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-1);
}
.badge i { width: 6px; height: 6px; border-radius: 50%; }

.blue  i, .product-dot.blue,  .mini.blue  { background: var(--blue); }
.violet i, .product-dot.violet, .mini.violet { background: var(--violet); }
.amber i, .product-dot.amber, .mini.amber  { background: var(--amber); }
.coral i, .product-dot.coral, .mini.coral  { background: var(--coral); }
.green i, .product-dot.green, .mini.green  { background: #3a966d; }

/* ============================================================
   SYSTEM MAP (hero diagram)
   ============================================================ */
.system-map { display: flex; align-items: center; position: relative; }

.backend-card {
  width: 190px;
  background: var(--green);
  color: #fff;
  border-radius: 15px;
  padding: 22px;
  box-shadow: 0 16px 35px rgba(23, 79, 67, .2);
  z-index: 2;
}
.backend-card span  { font-size: 9px; letter-spacing: .14em; color: var(--backend-eyebrow); }
.backend-card b     { display: block; font: 700 17px "APBold"; margin: 7px 0; }
.backend-card small { color: var(--backend-small); font-size: 10px; }

.connector { height: 2px; width: 60px; background: var(--connector-color); position: relative; }
.connector::after {
  content: "";
  position: absolute;
  right: 0;
  top: -52px;
  width: 2px;
  height: 104px;
  background: var(--connector-color);
}

.frontends { display: flex; flex-direction: column; gap: 9px; z-index: 2; }

.frontend-card {
  background: var(--surface-4);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 165px;
  position: relative;
}
.frontend-card > i,
.product-symbol {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-style: normal;
  font-weight: 700;
}
.frontend-card.violet > i, .product-symbol.violet { background: var(--violet); }
.frontend-card.amber  > i, .product-symbol.amber  { background: var(--amber); }
.frontend-card.coral  > i, .product-symbol.coral  { background: var(--coral); }
.product-symbol.blue              { background: var(--blue); }
.frontend-card.dimmed {
  opacity: 0.45;
  filter: grayscale(1);
  border-style: dashed;
  border-color: var(--border);
  position: relative;
}
.frontend-card.dimmed > i {
  background: var(--surface-3);
  color: var(--text-3);
}
.frontend-card::after {
  font-family: "Material Icons";
  font-size: 13px;
  position: absolute;
  top: 6px;
  right: 7px;
}
.frontend-card.dimmed::after {
  content: "highlight_off";
  color: var(--text-3);
}
.frontend-card:not(.dimmed)::after {
  content: "check_circle";
  color: var(--progress-fill);
}
.frontend-card b     { display: block; font-size: 12px; color: var(--text-1); }
.frontend-card small { color: var(--text-2); font-size: 9px; }

/* ============================================================
   OVERVIEW — section heading, journey cards, insight strip
   ============================================================ */
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 50px 0 18px;
}
.section-heading h2 { font: 700 26px "APBold"; margin: 7px 0 0; }

.text-button { border: 0; background: transparent; color: var(--accent); font-weight: 700; font-size: 12px; }

.journey-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.journey-card {
  position: relative;
  min-height: 190px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-4);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: var(--text-1);
}
.journey-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); transition: .2s; }

.journey-card.platform-card { background: var(--platform-card-bg); color: #fff; }

.step-number { position: absolute; right: 18px; top: 10px; font: 700 44px "APBold"; opacity: .09; }

.card-kicker { font-size: 9px; text-transform: uppercase; letter-spacing: .12em; color: var(--card-kicker-color); font-weight: 700; }
.platform-card .card-kicker { color: var(--platform-card-kicker); }

.journey-card h3 { font: 700 17px "APBold"; margin: 10px 0 7px; }
.journey-card p  { margin: 0; color: var(--text-2); font-size: 12px; line-height: 1.55; max-width: 360px; }
.platform-card p { color: var(--platform-card-p); }

.journey-card button  { border: 0; background: transparent; color: var(--accent); font-size: 11px; font-weight: 700; padding: 0; text-align: left; }
.platform-card button { color: var(--platform-card-btn); }

.insight-strip {
  margin-top: 30px;
  padding: 24px;
  background: var(--insight-bg);
  border-radius: 14px;
  display: grid;
  grid-template-columns: 45px 1fr auto;
  align-items: center;
  gap: 16px;
}
.insight-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--violet);
  color: #fff;
  display: grid;
  place-items: center;
}
.insight-strip h3 { font: 700 16px "APBold"; margin: 4px 0; color: var(--text-1); }
.insight-strip p  { margin: 0; color: var(--text-2); font-size: 12px; }
.insight-strip button {
  border: 1px solid var(--insight-btn-border);
  background: var(--surface-4);
  border-radius: 8px;
  color: var(--insight-btn-color);
  padding: 10px 13px;
  font-weight: 700;
  font-size: 11px;
}

/* ============================================================
   ARTICLE PAGE
   ============================================================ */
.doc-article header,
.catalog-header {
  padding: 18px 0 24px;
  border-bottom: 1px solid var(--border);
}
.doc-article header h1,
.catalog-header h1,
.generic-page h1 { font-size: 42px; }

.applicability-card {
  margin: 24px 0 32px;
  padding: 18px 20px;
  border: 1px solid var(--applicability-border);
  background: var(--applicability-bg);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.applicability-card h3         { font: 700 15px "APBold"; margin: 4px 0; }
.applicability-card .badge-row { margin: 0; flex: 1; }
.applicability-card button     { border: 0; background: transparent; color: var(--accent); font-size: 11px; font-weight: 700; }

.article-layout {
  display: grid;
  /* Pane column stretches to the right edge of the content area (so the
     header divider and the "On this page" scrollbar line up); the main
     column stays capped at 760px. */
  grid-template-columns: minmax(0, 760px) minmax(190px, 1fr);
  gap: 70px;
}
.article-body { min-width: 0; }
.article-body h2 { font: 700 23px "APBold"; margin: 37px 0 12px; }
.article-body p  { font-size: 14px; line-height: 1.75; color: var(--text-2); }
.article-body ol,
.article-body ul { font-size: 14px; line-height: 1.75; color: var(--text-2); padding-left: 1.5em; margin: 12px 0; }
.article-body li { margin: 6px 0; }
.article-body li > p { margin: 0; }
.article-body table { display: block; border-spacing: 0; width: 100%; }
.article-body td { font-size: 14px; }
.article-body td p.table-text { margin: 0 0 6px; font-size: inherit; color: inherit; }
.article-body td p.table-text:last-child { margin-bottom: 0; }
.article-body td:first-child { color: var(--text-1); font-weight: 600; white-space: nowrap; background: var(--surface-2); }
.article-body a { color: var(--accent); text-decoration: underline; }
.article-body a:hover { opacity: 0.8; }
.article-body code { font-size: 12px; background: var(--surface-3); border-radius: 4px; padding: 2px 6px; color: var(--text-1); }

.article-body mark {
  background: #fff3b0;
  color: var(--text-1);
  border-radius: 2px;
  padding: 0 1px;
}
[data-theme="dark"] .article-body mark {
  background: #5a4a00;
  color: var(--text-1);
}

.callout,
.product-note {
  border-left: 3px solid var(--blue);
  background: var(--callout-bg);
  padding: 15px 18px;
  margin: 22px 0;
  border-radius: 0 8px 8px 0;
}
.callout p,
.product-note p { margin: 4px 0 0; font-size: 12px; }

.coral-note { border-color: var(--coral); background: var(--coral-note-bg); }
.amber-note { border-color: var(--amber); background: var(--amber-note-bg); }

.procedure { padding: 0; list-style: none; }
.procedure li {
  display: flex;
  gap: 13px;
  border-top: 1px solid var(--border);
  padding: 15px 0;
}
.procedure li > span {
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
}
.procedure p { margin: 1px 0; }

.on-this-page {
  border-left: 1px solid var(--border);
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  position: sticky;
  top: 100px;
  height: max-content;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.on-this-page > span {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-3);
  margin-bottom: 4px;
  padding-top: 16px;
}
.otp-h1 {
  font-weight: 700;
  color: var(--text-1);
}
.otp-link {
  display: block;
  color: var(--text-2);
  text-decoration: none;
  line-height: 1.4;
  padding: 2px 0;
  border-left: 2px solid transparent;
  margin-left: -22px;
  padding-left: 20px;
  transition: color .15s;
}
.otp-link:hover { color: var(--text-1); }
.otp-link[hidden] { display: none; }
.otp-count { margin-left: 6px; font-size: 10px; font-weight: 400; color: var(--text-3); }
.otp-link.active { color: var(--accent); border-left-color: var(--accent); font-weight: 700; }
.otp-h3 { padding-left: 44px; font-size: 11px; }
.otp-h2 { padding-left: 32px; }

/* Heading anchor links */
.heading-anchor {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  opacity: 0.2;
  color: var(--text-3);
  text-decoration: none !important;
  transition: opacity .15s;
  vertical-align: middle;
}
[data-theme="dark"] .heading-anchor { opacity: 0.45; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .heading-anchor { opacity: 0.45; } }
.heading-anchor .material-icons { font-size: 16px !important; line-height: 1 !important; }
.heading-anchor.copied { opacity: 1; color: var(--accent); }
.heading-anchor.targeted {
  opacity: 1;
  color: #fff;
  background: var(--accent);
  border-radius: 4px;
  padding: 1px 4px;
}
.heading-anchor-tip {
  font-size: 11px;
  font-weight: 700;
  color: var(--surface-4);
  background: var(--accent);
  border-radius: 5px;
  padding: 2px 8px;
  margin-left: 6px;
  white-space: nowrap;
  font-family: "APRegular", sans-serif;
  text-transform: none;
  letter-spacing: 0;
}
h2:hover .heading-anchor,
h3:hover .heading-anchor { opacity: 1; }

/* Article iframe delivery */
.article-loading,
.article-load-error {
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(127, 127, 127, .05);
}
.article-load-error b { display: block; margin-bottom: .35rem; }

/* ============================================================
   FILTER CHIPS AND DATA TABLES
   Shared by filesystem map, ports/protocols reference, and What's New filters.
   ============================================================ */
.filter-chip {
  border: 1px solid var(--border);
  background: var(--surface-4);
  border-radius: 99px;
  padding: 9px 12px;
  font-size: 11px;
  color: var(--text-1);
}
.filter-chip.active {
  background: var(--filter-chip-active-bg);
  color: var(--accent);
  border-color: var(--filter-chip-active-border);
  font-weight: 700;
}

.data-table-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: auto;
  background: var(--surface-4);
}
.data-table-wrap table,
.data-table-wrap .data-table { display: table; overflow-x: visible; border: 0; border-radius: 0; margin: 0; }
.data-table-wrap th { font-size: 9px; text-transform: uppercase; letter-spacing: .08em; border-left: 0; border-right: 0; border-top: 0; }
.data-table-wrap td { border-left: 0; border-right: 0; border-top: 1px solid var(--border); border-bottom: 0; padding: 15px; vertical-align: middle; font-size: 12px; font-weight: 400; background: transparent; white-space: normal; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 20px 0;
}
th {
  text-align: left;
  background: var(--table-head-bg);
  color: var(--table-head-color);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 9px;
  padding: 13px 15px;
  border: 1px solid var(--border);
}
td {
  border: 1px solid var(--border);
  padding: 11px 15px;
  color: var(--text-1);
  vertical-align: top;
}
td small { display: block; color: var(--accent); margin-top: 4px; font-size: 9px; }

.mini-badges { display: flex; gap: 4px; }
.mini {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 700;
}

.status { font-size: 10px; font-weight: 700; border-radius: 99px; padding: 5px 8px; }
.status.required             { background: var(--status-required-bg);     color: var(--status-required-color); }
.status.optional             { background: var(--status-optional-bg);     color: var(--status-optional-color); }
.status.required-for-upgrade { background: var(--status-upgrade-bg);      color: var(--status-upgrade-color); }
.status.recommended          { background: var(--status-recommended-bg);  color: var(--status-recommended-color); }
.status.as-needed,
.status.scenario,
.status.reference            { background: var(--status-optional-bg);     color: var(--status-optional-color); }

.table-foot { display: flex; justify-content: space-between; color: var(--text-2); font-size: 11px; padding: 13px; }
.table-foot button { border: 0; background: transparent; color: var(--accent); font-weight: 700; }

.setting-open { display: block; border: 0; background: transparent; color: var(--accent); font-size: 9px; font-weight: 700; padding: 5px 0 0; }
.setting-row:hover { background: var(--setting-row-hover); }

/* ============================================================
   GENERIC PAGE
   ============================================================ */
.generic-page { padding: 55px 0; }
.generic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 35px 0; }
.generic-grid article { border: 1px solid var(--border); border-radius: 12px; padding: 25px; background: var(--surface-4); }
.generic-grid article > span { color: var(--text-3); font: 700 30px "APBold"; }
.generic-grid h3 { font: 700 17px "APBold"; color: var(--text-1); }
.generic-grid p  { color: var(--text-2); font-size: 13px; }

.primary-button { border: 0; background: var(--green); color: #fff; border-radius: 8px; padding: 11px 16px; font-weight: 700; }

.help-guide { margin: 0; }
.help-guide dt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-1);
  margin: 18px 0 5px;
}
.help-guide dt:first-child { margin-top: 0; }
.help-guide dt .material-icons { font-size: 16px; color: var(--accent); }
.help-guide dd {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-2);
  padding-left: 24px;
}

/* ============================================================
   GLOSSARY PANE
   ============================================================ */
.gloss-toolbar {
  flex: 0 0 auto;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.gloss-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 18px 20px;
}

.gloss-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 10px;
}
.gloss-jump-btn {
  border: 0;
  background: transparent;
  padding: 2px 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  border-radius: 4px;
  line-height: 1.4;
}
.gloss-jump-btn:hover { background: var(--surface-3); }
.gloss-jump-btn:disabled { color: var(--text-3); cursor: default; }

.gloss-letter {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-3);
  padding: 14px 0 4px;
  margin-bottom: 2px;
}

.gloss-cat-label {
  margin-left: auto;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--accent);
}

.gloss-scroll mark {
  background: #fff3b0;
  color: var(--text-1);
  border-radius: 2px;
  padding: 0 1px;
}
[data-theme="dark"] .gloss-scroll mark {
  background: #5a4a00;
  color: var(--text-1);
}


.gloss-unconfirmed {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  background: var(--status-upgrade-bg);
  color: var(--status-upgrade-color);
  border-radius: 99px;
  padding: 2px 6px;
  cursor: help;
}

/* ============================================================
   SEARCH PANE
   ============================================================ */
.search-scope-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
  background: var(--surface-2);
}
.search-scope-btn {
  flex: 1;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  padding: 10px 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  cursor: pointer;
  transition: color .15s;
}
.search-scope-btn:hover { color: var(--text-1); }
.search-scope-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.search-scope-btn.dimmed { opacity: 0.45; }

.search-group-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  background: var(--surface-3);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1;
}
.search-group-header .material-icons { font-size: 14px; color: var(--accent); flex: 0 0 auto; }
.search-group-version {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: var(--surface-4);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 1px 7px;
  margin-left: 2px;
}
.search-group-count {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-3);
  font-weight: 400;
}

.search-result-count {
  padding: 8px 18px;
  font-size: 11px;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}
.search-result-count b { color: var(--text-1); }

.search-result-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  padding: 12px 18px;
  text-align: left;
  cursor: pointer;
  color: var(--text-1);
}
.search-result-row:hover { background: var(--nav-hover-bg); }

.search-result-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.3;
}
.search-result-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--text-3);
  flex-wrap: wrap;
}
.search-result-snippet {
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.5;
  margin-top: 2px;
}
.search-result-snippet mark,
.search-result-title mark {
  background: #fff3b0;
  color: var(--text-1);
  border-radius: 2px;
  padding: 0 1px;
}
[data-theme="dark"] .search-result-snippet mark,
[data-theme="dark"] .search-result-title mark {
  background: #5a4a00;
  color: var(--text-1);
}

.search-result-meta {
  display: block;
  font-size: 10px;
  color: var(--text-3);
  font-weight: 400;
  margin-top: 2px;
}

/* ============================================================
   AI ASSISTANT PANE
   ============================================================ */
.ai-voice-select {
  border: 1px solid var(--border);
  background: var(--surface-3);
  color: var(--text-2);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.ai-voice-select:focus { outline: none; border-color: var(--accent); }

.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-message { display: flex; flex-direction: column; }
.ai-message--user  { align-items: flex-end; }
.ai-message--assistant { align-items: flex-start; }

.ai-message__bubble {
  max-width: 88%;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-1);
}
.ai-message--user .ai-message__bubble {
  background: var(--green);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ai-message--assistant .ai-message__bubble {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.ai-message__bubble--error {
  background: var(--coral-note-bg);
  border-color: var(--coral);
  color: var(--text-2);
  font-style: italic;
}

/* Markdown rendered inside assistant bubbles */
.ai-message__bubble p  { margin: 0 0 8px; }
.ai-message__bubble p:last-child { margin-bottom: 0; }
.ai-message__bubble ul,
.ai-message__bubble ol { margin: 6px 0; padding-left: 1.6em; }
.ai-message__bubble li { margin: 3px 0; }
.ai-message__bubble li > ul,
.ai-message__bubble li > ol { margin: 2px 0; padding-left: 1.4em; }
.ai-message__bubble strong { font-weight: 700; }
.ai-message__bubble code {
  font-size: 11px;
  background: var(--surface-4);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
}
.ai-message__bubble pre {
  background: var(--surface-4);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  overflow-x: auto;
  font-size: 11px;
  margin: 8px 0;
}
.ai-message__bubble pre code { background: none; border: none; padding: 0; }

.ai-message__sources {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-3);
  padding: 0 2px;
}
.ai-message__sources-label { font-weight: 700; margin-right: 4px; }
.ai-inline-icon {
  height: 1.1em;
  width: auto;
  vertical-align: -0.15em;
  margin: 0 2px;
  display: inline;
}
.ai-icon-ref {
  display: inline-block;
  font-size: 10px;
  color: var(--text-2);
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
  vertical-align: baseline;
}
.ai-message__source-link {
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}
.ai-message__source-link:hover { opacity: 0.8; }

.ai-status {
  flex: 0 0 auto;
  padding: 4px 16px;
  font-size: 11px;
  color: var(--text-3);
  font-style: italic;
  min-height: 20px;
}

.ai-input-row {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.ai-input {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--surface-4);
  color: var(--text-1);
  border-radius: 8px;
  padding: 9px 12px;
  font: inherit;
  font-size: 13px;
  resize: none;
  line-height: 1.5;
  max-height: 120px;
  overflow-y: auto;
}
.ai-input:focus { outline: none; border-color: var(--search-focus); }
.ai-input::placeholder { color: var(--text-3); }

.ai-send-btn {
  border: 0;
  background: var(--green);
  color: #fff;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  transition: opacity .15s;
}
.ai-send-btn:hover { opacity: 0.85; }
.ai-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ai-send-btn .material-icons { font-size: 18px !important; line-height: 1 !important; }

.ai-disclaimer {
  flex: 0 0 auto;
  margin: 0;
  padding: 5px 16px 10px;
  font-size: 10px;
  color: var(--text-3);
  text-align: center;
  background: var(--surface-2);
}

.ai-no-guide {
  flex: 0 0 auto;
  padding: 10px 16px;
  font-size: 12px;
  color: var(--text-2);
  text-align: center;
  font-style: italic;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}


dialog {
  border: 0;
  padding: 0;
  border-radius: 18px;
  width: min(620px, calc(100vw - 30px));
  box-shadow: 0 30px 80px var(--dialog-shadow);
  background: var(--surface-4);
  color: var(--text-1);
}
dialog::backdrop { background: var(--backdrop-bg); backdrop-filter: blur(4px); }

.dialog-card         { padding: 28px; }
.dialog-card header  { display: flex; justify-content: space-between; }
.dialog-card h2      { font: 700 28px "APBold"; margin: 6px 0; }
.dialog-card > p     { color: var(--text-2); font-size: 13px; line-height: 1.5; }

.icon-button { border: 0; background: transparent; font-size: 25px; color: var(--text-2); }

.product-choices { display: grid; gap: 8px; margin: 20px 0; }
.product-choice {
  display: grid;
  grid-template-columns: 38px 1fr 22px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  color: var(--text-1);
}
.product-choice input { position: absolute; opacity: 0; }
.product-choice small { display: block; color: var(--text-2); font-size: 10px; }
.product-choice > i {
  width: 20px;
  height: 20px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: transparent;
  display: grid;
  place-items: center;
  font-style: normal;
}
.product-choice.checked              { border-color: var(--product-choice-checked-border); background: var(--product-choice-checked-bg); }
.product-choice.checked > i          { background: var(--green); color: #fff; border-color: var(--green); }

.dialog-note {
  display: flex;
  gap: 12px;
  background: var(--dialog-note-bg);
  padding: 14px;
  border-radius: 9px;
}
.dialog-note > span {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  flex: 0 0 auto;
}
.dialog-note p { margin: 0; color: var(--dialog-note-color); font-size: 11px; line-height: 1.5; }

.dialog-card footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }

/* Colour utility classes (badge/dot colour assignment) */
.blue   { --badge: var(--blue); }
.violet { --badge: var(--violet); }
.amber  { --badge: var(--amber); }
.coral  { --badge: var(--coral); }
.green  { --badge: #3a966d; }

/* ============================================================
   INSTALLATION PAGE
   ============================================================ */
.install-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  padding: 18px 0 24px;
  border-bottom: 1px solid var(--border);
}
.install-header h1 { font: 700 42px / 1.05 "APBold"; margin: 10px 0 12px; letter-spacing: -.04em; }
.install-header p  { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.6; max-width: 680px; }

.mode-switch {
  display: flex;
  padding: 4px;
  background: var(--mode-switch-bg);
  border-radius: 10px;
  flex: 0 0 auto;
}
.mode-switch button        { border: 0; background: transparent; border-radius: 7px; padding: 9px 13px; color: var(--text-2); font-size: 11px; font-weight: 700; }
.mode-switch button.active { background: var(--surface-4); color: var(--accent); box-shadow: 0 2px 8px rgba(30, 60, 52, .1); }

.scope-panel {
  margin: 24px 0 36px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(125deg, var(--scope-bg-from), var(--scope-bg-to));
  border: 1px solid var(--scope-border);
  border-radius: 13px;
}
.scope-panel h2        { font: 700 18px "APBold"; margin: 5px 0; }
.scope-panel .badge-row { margin-top: 11px; }

.install-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  align-items: start;
}

.plan-heading { display: flex; align-items: end; justify-content: space-between; }
.plan-heading h2 { font: 700 25px "APBold"; margin: 6px 0 0; }

.progress-copy         { display: flex; align-items: baseline; gap: 5px; }
.progress-copy b       { font: 700 19px "APBold"; }
.progress-copy span    { color: var(--text-2); font-size: 10px; }

.progress-track {
  height: 4px;
  background: var(--progress-track);
  border-radius: 99px;
  margin: 15px 0 3px;
  overflow: hidden;
}
.progress-track i {
  height: 100%;
  display: block;
  background: var(--progress-fill);
  border-radius: inherit;
  transition: width .25s;
}

.install-steps { list-style: none; padding: 0; margin: 0; }
.install-step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.step-check {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--step-check-border);
  background: var(--surface-4);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}
.install-step.complete .step-check          { background: var(--green); color: #fff; border-color: var(--green); }
.install-step.complete h3,
.install-step.complete > div > p            { color: var(--text-3); }

.step-meta { display: flex; align-items: center; gap: 9px; color: var(--text-3); font-size: 9px; }

.scope-label { padding: 4px 7px; border-radius: 99px; color: #fff; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.scope-label.blue   { background: var(--blue); }
.scope-label.violet { background: var(--violet); }
.scope-label.amber  { background: var(--amber); }
.scope-label.coral  { background: var(--coral); }

.step-copy h3    { font: 700 16px "APBold"; margin: 7px 0; color: var(--text-1); }
.step-copy > p   { color: var(--text-2); font-size: 12px; line-height: 1.55; margin: 0; }
.step-link       { border: 0; background: transparent; color: var(--accent); font-size: 10px; font-weight: 700; padding: 10px 0 0; }

.step-detail {
  background: var(--step-detail-bg);
  border-radius: 8px;
  padding: 12px;
  margin-top: 10px;
}
.step-detail b    { font-size: 10px; color: var(--text-1); }
.step-detail p    { font-size: 10px; color: var(--text-2); margin: 3px 0; }
.step-detail code { font-size: 9px; color: var(--text-1); }

.component-plan {
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-4);
  padding: 20px;
  position: sticky;
  top: 145px;
}
.component-plan > h3 { font: 700 16px "APBold"; margin: 6px 0 17px; color: var(--text-1); }

.component-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.component-row .product-symbol { width: 30px; height: 30px; font-size: 11px; }
.component-row b     { font-size: 11px; display: block; color: var(--text-1); }
.component-row small { font-size: 9px; color: var(--text-2); }
.component-row > i   { font-style: normal; font-size: 8px; color: var(--component-tag-color); background: var(--component-tag-bg); border-radius: 99px; padding: 4px 6px; }

.component-note {
  background: var(--component-note-bg);
  border-radius: 9px;
  padding: 13px;
  margin-top: 14px;
}
.component-note b { font-size: 10px; color: var(--text-1); }
.component-note p { font-size: 10px; color: var(--component-note-color); line-height: 1.5; margin: 4px 0 0; }

@container (max-width: 720px) {
  .content-wrap { padding-left: clamp(18px, 3vw, 40px); padding-right: clamp(18px, 3vw, 40px); }
  .hero-panel,
  .article-layout,
  .install-layout,
  .journey-grid,
  .generic-grid { grid-template-columns: 1fr; }
  .on-this-page,
  .component-plan { display: none; }
  .install-header { align-items: flex-start; flex-direction: column; }
  .scope-panel    { align-items: flex-start; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .app-shell {
    grid-template: 64px 1fr / 1fr;
    grid-template-areas: "top" "main";
  }
  .topbar { grid-template-columns: 210px 1fr; }
  .brand  { padding: 0 18px; border: 0; }
  .global-search { margin: 0 15px; }
  .top-actions, .sidebar { display: none; }
  .context-bar  { padding: 0 20px; }
  .content-wrap { padding: 20px; }
  .hero-panel   { grid-template-columns: 1fr; }
  .system-map   { margin-top: 10px; }
  .journey-grid { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .on-this-page   { display: none; }
  .install-layout { grid-template-columns: 1fr; }
  .component-plan { position: static; }
  .install-header { align-items: flex-start; flex-direction: column; }
  .scope-panel    { align-items: flex-start; }
}

@media (max-width: 600px) {
  .global-search kbd { display: none; }
  .context-bar { height: auto; min-height: 58px; gap: 8px; }
  .context-controls label { display: none; }
  .hero-panel  { padding: 25px; }
  .system-map  { transform: scale(.86); transform-origin: left; }
  .insight-strip { grid-template-columns: 40px 1fr; }
  .insight-strip button { grid-column: 2; }
  .applicability-card { align-items: flex-start; flex-direction: column; }
  .filter-bar { overflow: auto; }
  .settings-table-wrap { margin-right: -20px; }
  .generic-grid { grid-template-columns: 1fr; }
  .doc-article header h1,
  .catalog-header h1 { font-size: 34px; }
  .install-header h1 { font-size: 34px; }
  .scope-panel  { flex-direction: column; }
  .mode-switch  { width: 100%; }
  .mode-switch button { flex: 1; }
  .install-step { grid-template-columns: 34px 1fr; }
}

/* ============================================================
   LANDING PAGE
   ============================================================ */
.landing-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface-1);
}
.landing-page[hidden],
.app-shell[hidden] { display: none !important; }

body.portal-active .landing-page { display: none !important; }
body:not(.portal-active) .app-shell { display: none !important; }

.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 40px;
  border-bottom: 1px solid var(--border);
  flex: 0 0 72px;
}
.landing-header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-1);
  height: auto;
  padding: 0;
}
.landing-header .brand > span {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.landing-header .brand b     { font-family: "APBold"; font-size: 15px; }
.landing-header .brand small { color: var(--text-2); font-size: 11px; letter-spacing: .03em; }

.landing-body {
  flex: 1;
  display: flex;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
}

.landing-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  width: 100%;
  padding: 0;
  gap: 0;
  align-items: stretch;
}

.landing-copy {
  position: relative;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: clamp(28px, 4vw, 52px) clamp(40px, 6vw, 80px);
}
.landing-copy::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 20, 18, 0.75) 0%,
    rgba(10, 20, 18, 0.45) 100%
  );
  pointer-events: none;
}
.landing-photo-title {
  position: relative;
  z-index: 1;
  font: 700 clamp(52px, 6.5vw, 96px) / 1.0 "APBold";
  color: #fff;
  letter-spacing: -.04em;
  text-shadow: 0 4px 32px rgba(0,0,0,0.5);
}

.landing-copy-inline {
  margin-bottom: 8px;
}
.landing-copy-inline h1 {
  font: 700 clamp(22px, 2.5vw, 32px) / 1.15 "APBold";
  margin: 6px 0 8px;
  letter-spacing: -.02em;
  color: var(--text-1);
}
.landing-copy-inline p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-2);
  margin: 0;
}

.landing-right {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: clamp(60px, 8vw, 100px) clamp(28px, 4vw, 56px) clamp(28px, 4vw, 52px);
  background: var(--surface-1);
}

.landing-diagram .system-map {
  justify-content: center;
}

/* Landing frontend cards — clickable, larger hit area */
.landing-diagram .frontend-card {
  cursor: pointer;
  transition: box-shadow .15s, transform .15s;
  user-select: none;
  min-width: 0;
  width: 190px;
  padding: 10px 14px;
}
.landing-diagram .frontend-card:hover:not(.dimmed) {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.landing-diagram .frontend-card.dimmed:hover {
  opacity: 0.65;
  cursor: pointer;
}

.landing-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.landing-steps {
  display: flex;
  flex-direction: column;
  gap: 13px;
  width: 100%;
}
.landing-step {
  flex: none;
  min-height: 0 !important;
  justify-content: flex-start !important;
  gap: 20px;
  overflow: visible;
  padding-top: 44px !important;
  padding-right: 24px !important;
}

.landing-step-label {
  font: 700 13px "APBold";
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.landing-version {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 8px;
}
.landing-version-label { font-weight: 600; }

.landing-version-picker {
  display: flex;
  gap: 6px;
}
.landing-version-picker button {
  border: 1px solid var(--border);
  background: var(--surface-4);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  transition: .15s;
}
.landing-version-picker button:hover   { border-color: var(--accent); color: var(--text-1); }
.landing-version-picker button.selected { border-color: var(--accent); background: var(--surface-3); color: var(--accent); font-weight: 700; }

.landing-actions .primary-button {
  padding: 13px 24px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: 1;
  transition: opacity .15s;
}
.landing-actions .primary-button .material-icons { font-size: 18px; }
.landing-actions .primary-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.landing-hint {
  font-size: 12px;
  color: var(--text-3);
  margin: 0;
  min-height: 1.4em;
}

.insight-strip.guide-not-available { margin-top: 40px; }

/* Applicability mismatch notice */
.applicability-notice {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--amber-note-bg);
  border: 2px solid var(--amber);
  border-radius: 12px;
  margin-bottom: 24px;
  color: var(--text-1);
}
.applicability-notice .material-icons { color: var(--amber); font-size: 22px; flex: 0 0 auto; }
.applicability-notice p  { margin: 0; font-size: 14px; line-height: 1.5; }
.applicability-notice button { border: 0; background: transparent; color: var(--accent); font-weight: 700; font-size: 13px; padding: 0; margin-left: auto; white-space: nowrap; flex: 0 0 auto; }

.doc-article[data-mismatch] { opacity: 0.6; }

/* Landing layout — collapse to single column on narrow viewports */
@media (max-width: 900px) {
  .landing-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .landing-copy {
    min-height: 200px;
  }
  .landing-right { padding: 32px 28px 40px; }
}

/* ============================================================
   PORTAL HOME PAGE
   ============================================================ */
.portal-home-header {
  padding: 28px 0 32px;
  border-bottom: 1px solid var(--border);
}
.portal-home-header h1 {
  font: 700 clamp(28px, 3.5vw, 42px) / 1.1 "APBold";
  margin: 10px 0 12px;
  letter-spacing: -.03em;
}
.portal-home-header p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-2);
  max-width: 620px;
  margin: 0;
}

.portal-home-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 13px;
  margin-top: 32px;
}

.portal-home-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-4);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.portal-home-card.available,
.portal-home-card.coming-soon,
.portal-home-card.mockup {
  cursor: pointer;
  transition: box-shadow .15s, transform .15s;
}
.portal-home-card.available:hover,
.portal-home-card.coming-soon:hover,
.portal-home-card.mockup:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.portal-home-card.mockup .portal-home-icon {
  background: var(--green);
  color: #fff;
}
.portal-home-card.mockup .portal-home-status {
  background: var(--status-required-bg);
  color: var(--status-required-color);
}

.portal-home-icon {
  width: 38px;
  height: 38px;
  display: block !important;
  line-height: 38px !important;
  text-align: center;
  background: var(--surface-3);
  border-radius: 10px;
  color: var(--accent);
  font-size: 20px !important;
  flex-shrink: 0;
}
.portal-home-card.available .portal-home-icon {
  background: var(--amber);
  color: #fff;
}

.portal-home-card > div {
  flex: 1;
  min-width: 0;
}
.portal-home-card h3 {
  font: 700 16px "APBold";
  margin: 0 0 6px;
  color: var(--text-1);
}
.portal-home-card p {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-2);
  margin: 0;
}
.portal-home-card small {
  display: block;
  font-size: 11px;
  color: var(--text-3);
  margin-top: 8px;
  line-height: 1.5;
}

.portal-home-status {
  font-size: 10px;
  font-weight: 700;
  border-radius: 99px;
  padding: 4px 9px;
  white-space: nowrap;
  background: var(--status-optional-bg);
  color: var(--status-optional-color);
  flex-shrink: 0;
  margin-left: auto;
}
.portal-home-card.available .portal-home-status {
  background: var(--status-upgrade-bg);
  color: var(--status-upgrade-color);
}
/* What's New cards: the Ongoing tag keeps the same blue as the
   .wn-ongoing-badge on the release pages, whatever the card state. */
.portal-home-card .portal-home-status.wn-card-ongoing {
  background: var(--status-recommended-bg);
  color: var(--status-recommended-color);
}

@container (max-width: 720px) {
  .portal-home-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   NETWORK TOPOLOGY PAGE
   ============================================================ */
.nt-host {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-3);
  cursor: pointer;
  min-width: 110px;
  max-width: 140px;
  text-align: center;
  transition: box-shadow .15s, transform .15s;
}
.nt-host:hover    { background: var(--nav-hover-bg); box-shadow: var(--shadow); transform: translateY(-1px); }
.nt-host.selected { background: var(--nav-active-bg); border-color: var(--accent); }

.nt-host-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--surface-4);
  border: 1px solid var(--border);
  color: var(--text-2);
  flex: 0 0 auto;
}
.nt-host-icon .material-icons { font-size: 18px !important; line-height: 1 !important; }
.nt-host-icon.large {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--surface-3);
}
.nt-host-icon.large .material-icons { font-size: 22px !important; }

.nt-host-label { font-size: 13px; font-weight: 700; color: var(--text-1); line-height: 1.3; }
.nt-host-role  { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .07em; }

.nt-paths { margin-top: 4px; }

.nt-path {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-3);
  padding: 9px 12px;
  margin-bottom: 6px;
  font-size: 12px;
}
.nt-path-header {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.nt-path-dir   { font-size: 14px; font-weight: 700; color: var(--accent); flex: 0 0 auto; }
.nt-path-target{ font-weight: 700; color: var(--text-1); }
.nt-path-port  { font-size: 11px; font-weight: 700; background: var(--surface-4); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; color: var(--text-1); }
.nt-path-proto { font-size: 10px; color: var(--text-3); }
.nt-path-purpose { font-size: 11px; color: var(--text-2); margin-top: 5px; line-height: 1.4; }

/* ============================================================
   SETTINGS EXPLORER PAGE (prototype)
   Reuses .pr-layout/.pr-main/.data-table/.data-row/.fs-chips/.filter-chip.
   ============================================================ */
.se-source-chips { margin-bottom: 20px; }
.se-chip-group-label {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-3);
  padding: 0 4px;
  margin-left: 4px;
}
.se-chip-group-label:first-of-type { margin-left: 0; }
.se-name { font-weight: 700; color: var(--text-1); }
.se-source-header td {
  background: var(--surface-2);
  font-size: 11px;
  padding: 9px 15px;
  border-top: 1px solid var(--border);
}
.se-source-name { font-weight: 700; color: var(--text-1); }
.se-source-tool { color: var(--text-3); margin-left: 8px; }
.se-source-count { color: var(--text-3); margin-left: 8px; float: right; }
.data-row.se-related td { background: var(--insight-bg); }
.data-row.se-related.selected td { background: var(--nav-active-bg); }
.se-related-cell { display: flex; flex-wrap: wrap; gap: 4px; }
.se-related-chip {
  border: 1px solid var(--border);
  background: var(--surface-3);
  border-radius: 99px;
  padding: 3px 9px;
  font-size: 10px;
  color: var(--accent);
  font-weight: 700;
}
.se-related-chip:hover { background: var(--filter-chip-active-bg); }
.se-no-related { color: var(--text-3); font-size: 11px; }

/* ============================================================
   PORTS AND PROTOCOLS PAGE
   ============================================================ */
.pr-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-4);
  min-height: 520px;
}

.pr-main {
  border-right: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.pr-filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-4);
}

.data-table-wrap.pr-table-area {
  border: 0;
  border-radius: 0;
  overflow: auto;
  background: var(--surface-4);
  flex: 1;
}

.data-table { width: 100%; border-collapse: collapse; font-size: 12px; border: 0; margin: 0; display: table; overflow-x: visible; }
.data-table th {
  text-align: left;
  background: var(--table-head-bg);
  color: var(--table-head-color);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 9px;
  padding: 11px 13px;
  white-space: nowrap;
  border: 0;
  border-bottom: 1px solid var(--border);
}
.data-table td { border: 0; border-top: 1px solid var(--border); padding: 11px 13px; color: var(--text-1); vertical-align: middle; font-size: 12px; font-weight: 400; background: transparent; white-space: normal; }
.data-row:hover td { background: var(--setting-row-hover); }

.pr-source, .pr-dest { font-weight: 700; font-size: 12px; }
.pr-port {
  font-size: 11px;
  font-weight: 700;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  white-space: nowrap;
}
.pr-dir-icon { font-size: 16px !important; color: var(--text-3); vertical-align: middle; }
.pr-desc-cell { font-size: 11px; color: var(--text-2); max-width: 300px; }
.pr-row.selected td { background: var(--nav-active-bg); }
.data-row.selected td { background: var(--nav-active-bg); }
.data-row { cursor: pointer; }

.pr-helper {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-4);
  padding: 18px;
  position: sticky;
  top: 100px;
}
.pr-helper-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 10px;
}
.pr-helper-header .material-icons { font-size: 18px; color: var(--accent); }
.pr-helper-desc { font-size: 11px; color: var(--text-2); line-height: 1.5; margin: 0 0 14px; }
.pr-helper-empty { font-size: 11px; color: var(--text-3); margin: 0; }

.pr-helper-pre {
  font-size: 10px;
  line-height: 1.6;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin: 0 0 10px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-1);
}

.pr-copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface-3);
  border-radius: 7px;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  width: 100%;
  justify-content: center;
}
.pr-copy-btn:hover { background: var(--nav-hover-bg); }
.pr-legacy-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--status-upgrade-bg);
  color: var(--status-upgrade-color);
  border-radius: 99px;
  padding: 2px 6px;
  margin-left: 5px;
  vertical-align: middle;
}

@container (max-width: 720px) {
  .pr-layout { grid-template-columns: 1fr; }
}

/* ============================================================
   SYSTEM ARCHITECTURE MAP
   ============================================================ */
.sa-explorer {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-4);
  min-height: 520px;
}

.sa-diagram {
  border-right: 1px solid var(--border);
  background: var(--surface-2);
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sa-layer {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-4);
  overflow: hidden;
}

.sa-layer-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: var(--text-3);
  padding: 8px 14px 6px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.sa-layer-nodes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
}

.sa-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-3);
  cursor: pointer;
  min-width: 90px;
  max-width: 110px;
  text-align: center;
  transition: box-shadow .15s, transform .15s;
}
.sa-node:hover    { background: var(--nav-hover-bg); box-shadow: var(--shadow); transform: translateY(-1px); }
.sa-node.selected { background: var(--nav-active-bg); border-color: var(--accent); }

.sa-node-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  border: 1px solid var(--border);
  flex: 0 0 auto;
}
.sa-node-icon .material-icons { font-size: 18px !important; line-height: 1 !important; }
.sa-node-icon.large {
  width: 44px;
  height: 44px;
  border-radius: 11px;
}
.sa-node-icon.large .material-icons { font-size: 22px !important; }

/* Category colours — node icons */
.sa-node-icon.core,    .sa-node-icon.gateway { background: #e8f0fb; border-color: #c5d8f5; color: var(--blue); }
.sa-node-icon.auth                           { background: #f0ecfb; border-color: #d5c8f0; color: var(--violet); }
.sa-node-icon.ingest,  .sa-node-icon.worker  { background: #fff7e8; border-color: #f0d9a0; color: var(--amber); }
.sa-node-icon.search,  .sa-node-icon.index   { background: #f0ecfb; border-color: #d5c8f0; color: var(--violet); }
.sa-node-icon.data                           { background: #fdeee9; border-color: #f5c8bc; color: var(--coral); }
.sa-node-icon.feed,    .sa-node-icon.protocol,
.sa-node-icon.media,   .sa-node-icon.identity-provider { background: var(--surface-3); border-color: var(--border); color: var(--text-2); }
.sa-node-icon.desktop, .sa-node-icon.mobile,
.sa-node-icon.browser                        { background: #eaf4f0; border-color: #c5ddd5; color: var(--green); }

[data-theme="dark"] .sa-node-icon.core,
[data-theme="dark"] .sa-node-icon.gateway    { background: #1a2a40; border-color: #2a4060; color: #7aaae8; }
[data-theme="dark"] .sa-node-icon.auth,
[data-theme="dark"] .sa-node-icon.search,
[data-theme="dark"] .sa-node-icon.index      { background: #221a35; border-color: #3a2a55; color: #a990e8; }
[data-theme="dark"] .sa-node-icon.ingest,
[data-theme="dark"] .sa-node-icon.worker     { background: #2e2410; border-color: #4a3a18; color: #c8a060; }
[data-theme="dark"] .sa-node-icon.data       { background: #2e1a16; border-color: #4a2a22; color: #e8907a; }
[data-theme="dark"] .sa-node-icon.desktop,
[data-theme="dark"] .sa-node-icon.mobile,
[data-theme="dark"] .sa-node-icon.browser    { background: #1a2e28; border-color: #2a4a3a; color: var(--accent); }

/* Reuse fs-cat-badge colours for sa categories */
.fs-cat-badge.core,    .fs-cat-badge.gateway { background: #e8f0fb; color: var(--blue);   border-color: #c5d8f5; }
.fs-cat-badge.auth,    .fs-cat-badge.search,
.fs-cat-badge.index                          { background: #f0ecfb; color: var(--violet); border-color: #d5c8f0; }
.fs-cat-badge.ingest,  .fs-cat-badge.worker  { background: #fff7e8; color: var(--amber);  border-color: #f0d9a0; }
.fs-cat-badge.desktop, .fs-cat-badge.mobile,
.fs-cat-badge.browser                        { background: #eaf4f0; color: var(--green);  border-color: #c5ddd5; }
.fs-cat-badge.feed,    .fs-cat-badge.protocol,
.fs-cat-badge.media,   .fs-cat-badge.identity-provider { background: var(--surface-3); color: var(--text-2); border-color: var(--border); }

[data-theme="dark"] .fs-cat-badge.core,
[data-theme="dark"] .fs-cat-badge.gateway    { background: #1a2a40; color: #7aaae8; border-color: #2a4060; }
[data-theme="dark"] .fs-cat-badge.auth,
[data-theme="dark"] .fs-cat-badge.search,
[data-theme="dark"] .fs-cat-badge.index      { background: #221a35; color: #a990e8; border-color: #3a2a55; }
[data-theme="dark"] .fs-cat-badge.ingest,
[data-theme="dark"] .fs-cat-badge.worker     { background: #2e2410; color: #c8a060; border-color: #4a3a18; }
[data-theme="dark"] .fs-cat-badge.desktop,
[data-theme="dark"] .fs-cat-badge.mobile,
[data-theme="dark"] .fs-cat-badge.browser    { background: #1a2e28; color: var(--accent); border-color: #2a4a3a; }

.sa-node-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.3;
}
.sa-node-cat {
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .07em;
}

/* Detail panel */
.sa-detail {
  padding: 24px;
  overflow-y: auto;
  height: 100%;
}

.sa-detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.sa-conns {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sa-conns-group { display: flex; flex-direction: column; gap: 6px; }

.sa-conn-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface-3);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  color: var(--text-1);
}
.sa-conn-btn:hover { background: var(--nav-hover-bg); }
.sa-conn-btn .material-icons { font-size: 16px; color: var(--accent); flex: 0 0 auto; }
.sa-conn-btn.inbound .material-icons { color: var(--text-3); }
.sa-conn-btn b     { display: block; font-size: 12px; font-weight: 700; }
.sa-conn-btn small { display: block; font-size: 10px; color: var(--text-2); margin-top: 1px; }

@container (max-width: 720px) {
  .sa-explorer { grid-template-columns: 1fr; }
  .sa-detail   { border-top: 1px solid var(--border); }
}


.fs-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.fs-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-4);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  min-width: 240px;
}
.fs-search-wrap .material-icons { font-size: 16px; color: var(--text-3); flex: 0 0 auto; }
.fs-search-wrap input {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-1);
  font: inherit;
  font-size: 13px;
  width: 100%;
}
.fs-search-wrap:focus-within { border-color: var(--search-focus); }

.fs-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.fs-chip  { font-size: 11px; }

.fs-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.fs-note .material-icons { font-size: 16px; color: var(--text-3); flex: 0 0 auto; }

.fs-explorer {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  height: calc(100vh - 280px);
  min-height: 480px;
  background: var(--surface-4);
}

/* ── Tree panel ── */
.fs-tree {
  border-right: 1px solid var(--border);
  background: var(--surface-2);
  overflow-y: auto;
  padding: 0 0 8px;
  height: 100%;
}

.fst-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
  padding: 5px 8px 4px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface-2);
}
.fst-toolbar-btn {
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 3px 5px;
  color: var(--text-3);
  display: flex;
  align-items: center;
}
.fst-toolbar-btn:hover { background: var(--nav-hover-bg); color: var(--text-1); }
.fst-toolbar-btn .material-icons { font-size: 18px !important; line-height: 1 !important; }

.fst-drive { margin-bottom: 4px; }

.fst-drive-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  position: sticky;
  top: 27px;
  z-index: 1;
  background: var(--surface-2);
  width: 100%;
  text-align: left;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  border-radius: 0;
  cursor: pointer;
}
.fst-drive-header:hover    { background: var(--nav-hover-bg); }
.fst-drive-header.selected { background: var(--nav-active-bg); }

.fst-drive-letter {
  font: 700 13px "APBold";
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  flex: 0 0 auto;
}
.fst-drive-letter .material-icons { font-size: 18px !important; line-height: 1 !important; }
.fst-drive-blue   .fst-drive-letter { background: var(--blue); }
.fst-drive-violet .fst-drive-letter { background: var(--violet); }
.fst-drive-coral  .fst-drive-letter { background: var(--coral); }
.fst-drive-amber  .fst-drive-letter { background: var(--amber); }

.fst-drive-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-1);
}

.fst-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: var(--text-1);
  font-size: 13px;
  border-radius: 0;
}
.fst-row:hover    { background: var(--nav-hover-bg); }
.fst-row.selected { background: var(--nav-active-bg); color: var(--accent); font-weight: 700; }

.fst-toggle {
  width: 16px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}
.fst-chevron {
  font-size: 16px !important;
  color: var(--text-3);
  transition: transform .15s;
  line-height: 1 !important;
}
.fst-leaf {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border);
  display: block;
  margin: auto;
}

.fst-icon {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--surface-3);
  border: 1px solid var(--border);
}
.fst-icon .material-icons { font-size: 13px !important; line-height: 1 !important; }

/* Category tints — tree icons */
.fst-icon.binaries, .fst-icon.blue { background: #e8f0fb; border-color: #c5d8f5; color: var(--blue); }
.fst-icon.tools                    { background: #eaf4f0; border-color: #c5ddd5; color: var(--green); }
.fst-icon.config                   { background: #fff7e8; border-color: #f0d9a0; color: var(--amber); }
.fst-icon.logs                     { background: var(--surface-3); border-color: var(--border); color: var(--text-2); }
.fst-icon.index, .fst-icon.violet  { background: #f0ecfb; border-color: #d5c8f0; color: var(--violet); }
.fst-icon.data, .fst-icon.coral    { background: #fdeee9; border-color: #f5c8bc; color: var(--coral); }
.fst-icon.temp                     { background: var(--surface-3); border-color: var(--border); color: var(--text-3); }

[data-theme="dark"] .fst-icon.binaries,
[data-theme="dark"] .fst-icon.blue   { background: #1a2a40; border-color: #2a4060; color: #7aaae8; }
[data-theme="dark"] .fst-icon.tools  { background: #1a2e28; border-color: #2a4a3a; color: var(--accent); }
[data-theme="dark"] .fst-icon.config { background: #2e2410; border-color: #4a3a18; color: #c8a060; }
[data-theme="dark"] .fst-icon.index,
[data-theme="dark"] .fst-icon.violet { background: #221a35; border-color: #3a2a55; color: #a990e8; }
[data-theme="dark"] .fst-icon.data,
[data-theme="dark"] .fst-icon.coral  { background: #2e1a16; border-color: #4a2a22; color: #e8907a; }

.fst-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.fst-children { border-left: 1px solid var(--border); margin-left: 20px; }

/* ── Detail panel ── */
.fs-detail {
  padding: 28px 32px;
  overflow-y: auto;
  height: 100%;
}

.fs-detail-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-3);
}
.fs-detail-empty .material-icons { font-size: 40px; }
.fs-detail-empty p { font-size: 13px; margin: 0; }
.fs-detail-empty.se-detail-empty-top { justify-content: flex-start; padding-top: 40px; }

.fs-detail-panel {}

.fs-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  margin-bottom: 16px;
  font-size: 11px;
}
.fs-bc-seg {
  color: var(--text-2);
  padding: 2px 4px;
  border-radius: 4px;
}
.fs-bc-seg.current {
  color: var(--accent);
  font-weight: 700;
  background: var(--surface-3);
}
.fs-bc-sep {
  color: var(--text-3);
  padding: 0 2px;
  font-size: 13px;
}

.fs-detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.fst-icon.large {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex: 0 0 auto;
}
.fst-icon.large .material-icons { font-size: 22px !important; }

.fs-detail-label {
  font: 700 18px "APBold";
  color: var(--text-1);
  margin-bottom: 4px;
}

.fs-detail-path {
  font-size: 12px;
  color: var(--text-2);
  background: var(--surface-3);
  border-radius: 4px;
  padding: 2px 7px;
  display: inline-block;
}

.fs-cat-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  border-radius: 99px;
  padding: 3px 9px;
  margin-bottom: 16px;
  background: var(--surface-3);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.fs-cat-badge.binaries, .fs-cat-badge.blue   { background: #e8f0fb; color: var(--blue);   border-color: #c5d8f5; }
.fs-cat-badge.tools                           { background: #eaf4f0; color: var(--green);  border-color: #c5ddd5; }
.fs-cat-badge.config                          { background: #fff7e8; color: var(--amber);  border-color: #f0d9a0; }
.fs-cat-badge.index, .fs-cat-badge.violet     { background: #f0ecfb; color: var(--violet); border-color: #d5c8f0; }
.fs-cat-badge.data, .fs-cat-badge.coral       { background: #fdeee9; color: var(--coral);  border-color: #f5c8bc; }
.fs-cat-badge.deprecated                      { background: #fef3f2; color: #c0392b;       border-color: #f5c6c2; }
.fs-cat-badge.conditional                     { background: #f5f0fb; color: var(--violet); border-color: #d5c8f0; cursor: help; }

[data-theme="dark"] .fs-cat-badge.binaries,
[data-theme="dark"] .fs-cat-badge.blue   { background: #1a2a40; color: #7aaae8; border-color: #2a4060; }
[data-theme="dark"] .fs-cat-badge.tools  { background: #1a2e28; color: var(--accent); border-color: #2a4a3a; }
[data-theme="dark"] .fs-cat-badge.config { background: #2e2410; color: #c8a060; border-color: #4a3a18; }
[data-theme="dark"] .fs-cat-badge.index,
[data-theme="dark"] .fs-cat-badge.violet { background: #221a35; color: #a990e8; border-color: #3a2a55; }
[data-theme="dark"] .fs-cat-badge.data,
[data-theme="dark"] .fs-cat-badge.coral  { background: #2e1a16; color: #e8907a; border-color: #4a2a22; }
[data-theme="dark"] .fs-cat-badge.deprecated  { background: #2e1010; color: #e87a7a; border-color: #4a2020; }
[data-theme="dark"] .fs-cat-badge.conditional { background: #221a35; color: #a990e8; border-color: #3a2a55; }

.fs-detail-desc {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-2);
  margin: 0 0 20px;
}

.fs-detail-dl {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px 16px;
  margin: 0;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.fs-detail-dl dt {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-3);
  padding-top: 2px;
}
.fs-detail-dl dd {
  font-size: 13px;
  color: var(--text-1);
  margin: 0;
  line-height: 1.5;
}

.fs-refs {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.fs-refs-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-3);
  margin-bottom: 10px;
}
.fs-ref-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface-3);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-align: left;
  cursor: pointer;
  margin-bottom: 6px;
}
.fs-ref-btn:hover { background: var(--nav-hover-bg); }
.fs-ref-btn .material-icons { font-size: 14px; flex: 0 0 auto; }

/* Search highlight */
.fst-label mark {
  background: #fff3b0;
  color: var(--text-1);
  border-radius: 2px;
  padding: 0 1px;
}
[data-theme="dark"] .fst-label mark {
  background: #5a4a00;
  color: var(--text-1);
}

@container (max-width: 720px) {
  .fs-explorer { grid-template-columns: 1fr; height: auto; }
  .fs-tree { border-right: 0; border-bottom: 1px solid var(--border); max-height: 300px; height: auto; }
  .fs-detail { height: auto; }
}

/* ============================================================
   TABS
   ============================================================ */
.tabs {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-4);
  margin: 20px 0;
  overflow: hidden;
}
.tab-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.tab-btn {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  cursor: pointer;
  margin-bottom: -1px;
  transition: color .15s;
}
.tab-btn:hover { color: var(--text-1); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; padding: 20px; }
.tab-panel.active { display: block; }

/* ============================================================
   COLLAPSIBLE CONTENT BLOCK
   ============================================================ */
details.collapsible {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-4);
  margin: 20px 0;
  overflow: hidden;
}
details.collapsible summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-1);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
details.collapsible summary::-webkit-details-marker { display: none; }
details.collapsible summary::before {
  content: "chevron_right";
  font-family: "Material Icons";
  font-size: 18px;
  line-height: 1;
  color: var(--text-3);
  flex: 0 0 18px;
  transition: transform .2s;
}
details.collapsible[open] summary::before { transform: rotate(90deg); }
details.collapsible summary:hover { background: var(--surface-3); }
details.collapsible[open] summary { border-bottom: 1px solid var(--border); }
.collapsible-body {
  padding: 16px 20px;
}

/* ============================================================
   FLARE ARTICLE CONTENT
   Styles for classes produced by Flare Clean XHTML builds.
   These are NOT portal UI styles — they exist solely to render
   Flare-authored content correctly inside .article-body.
   Do not use these classes in portal UI templates.
   ============================================================ */

/* ── Callout boxes — global (usable anywhere in the portal) ── */
div.boxNote,
div.boxTip,
div.boxWarning,
div.boxMessage,
div.boxKnownIssue {
  display: flex;
  flex-direction: column;
  margin: 20px 0;
  border-radius: 10px;
  border: 1px solid;
  font-size: 14px;
  line-height: 1.6;
  overflow: hidden;
}
div.boxNote    { background: var(--status-recommended-bg); border-color: #b8cef0;                      padding: 12px 16px 14px; color: var(--text-2); }
div.boxTip     { background: var(--status-required-bg);    border-color: var(--applicability-border); padding: 12px 16px 14px; color: var(--text-2); }
div.boxWarning { background: var(--coral-note-bg);         border-color: #f0c0b0;                      padding: 12px 16px 14px; color: var(--text-2); }
div.boxMessage { background: var(--surface-3);             border-color: var(--border);                color: var(--text-2); }
div.boxKnownIssue { background: var(--insight-bg);         border-color: var(--insight-btn-border);    padding: 12px 16px 14px; color: var(--text-2); }
[data-theme="dark"] div.boxNote    { background: var(--status-recommended-bg); border-color: #2a4060; }
[data-theme="dark"] div.boxTip     { background: var(--status-required-bg);    border-color: var(--applicability-border); }
[data-theme="dark"] div.boxWarning { background: var(--coral-note-bg);         border-color: #4a2a22; }
[data-theme="dark"] div.boxMessage { background: var(--surface-3);             border-color: var(--border); }
[data-theme="dark"] div.boxKnownIssue { background: var(--insight-bg);         border-color: var(--insight-btn-border); }

.boxLabel {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  font-family: "APBold", sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  line-height: 1;
}
.boxLabel::before {
  font-family: "Material Symbols Outlined";
  font-size: 18px;
  line-height: 1;
  font-weight: 400;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  overflow: hidden;
}
div.boxNote    .boxLabel { color: var(--blue);   }
div.boxNote    .boxLabel::before { content: "info"; }
div.boxNote    .boxLabel::after  { content: "Note"; }
div.boxTip     .boxLabel { color: var(--accent); }
div.boxTip     .boxLabel::before { content: "tips_and_updates"; }
div.boxTip     .boxLabel::after  { content: "Tip"; }
div.boxWarning .boxLabel { color: var(--coral); }
div.boxWarning .boxLabel::before { content: "warning"; }
div.boxWarning .boxLabel::after  { content: "Warning"; }
div.boxMessage .boxLabel {
  padding: 7px 14px;
  margin-bottom: 0;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  color: var(--text-3);
}
div.boxMessage .boxLabel::before { content: "monitor"; }
div.boxMessage .boxLabel::after  { content: "On screen"; }
div.boxKnownIssue .boxLabel { color: var(--violet); }
div.boxKnownIssue .boxLabel::before { content: "bug_report"; }
div.boxKnownIssue .boxLabel::after  { content: "Known Issue"; }
div.boxNote > p,
div.boxTip > p,
div.boxWarning > p,
div.boxKnownIssue > p { margin: 0 0 0.6em; font-size: 14px; }
div.boxNote > p:last-child,
div.boxTip > p:last-child,
div.boxWarning > p:last-child,
div.boxKnownIssue > p:last-child { margin-bottom: 0; }
div.boxMessage > p { margin: 0; padding: 12px 16px; font-size: 14px; }

/* ── Callout boxes ── */
.article-body div.boxNote,
.article-body div.boxTip,
.article-body div.boxWarning,
.article-body div.boxMessage,
.article-body div.boxKnownIssue,
.article-body .codeSnippet {
  display: flex;
  flex-direction: column;
  margin: 20px 0;
  border-radius: 10px;
  border: 1px solid;
  font-size: 14px;
  line-height: 1.6;
  overflow: hidden;
}
.article-body div.boxNote    { background: var(--status-recommended-bg); border-color: #b8cef0;                      padding: 12px 16px 14px; color: var(--text-2); }
.article-body div.boxTip     { background: var(--status-required-bg);    border-color: var(--applicability-border); padding: 12px 16px 14px; color: var(--text-2); }
.article-body div.boxWarning { background: var(--coral-note-bg);         border-color: #f0c0b0;                      padding: 12px 16px 14px; color: var(--text-2); }
.article-body div.boxMessage { background: var(--surface-3);             border-color: var(--border);                color: var(--text-2); }
.article-body div.boxKnownIssue { background: var(--insight-bg);         border-color: var(--insight-btn-border);    padding: 12px 16px 14px; color: var(--text-2); }
[data-theme="dark"] .article-body div.boxNote    { background: var(--status-recommended-bg); border-color: #2a4060; }
[data-theme="dark"] .article-body div.boxTip     { background: var(--status-required-bg);    border-color: var(--applicability-border); }
[data-theme="dark"] .article-body div.boxWarning { background: var(--coral-note-bg);         border-color: #4a2a22; }
[data-theme="dark"] .article-body div.boxMessage { background: var(--surface-3);             border-color: var(--border); }
[data-theme="dark"] .article-body div.boxKnownIssue { background: var(--insight-bg);         border-color: var(--insight-btn-border); }

/* ── .boxLabel — shared label row ── */
.article-body .boxLabel {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  font-family: "APBold", sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  line-height: 1;
}
.article-body .boxLabel::before {
  font-family: "Material Symbols Outlined";
  font-size: 18px;
  line-height: 1;
  font-weight: 400;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  overflow: hidden;
}
.article-body div.boxKnownIssue .boxLabel { color: var(--violet); }
.article-body div.boxKnownIssue .boxLabel::before { content: "bug_report"; }
.article-body div.boxKnownIssue .boxLabel::after  { content: "Known Issue"; }
.article-body div.boxNote    .boxLabel { color: var(--blue);   }
.article-body div.boxNote    .boxLabel::before { content: "info"; }
.article-body div.boxNote    .boxLabel::after  { content: "Note"; }
.article-body div.boxTip     .boxLabel { color: var(--accent); }
.article-body div.boxTip     .boxLabel::before { content: "tips_and_updates"; }
.article-body div.boxTip     .boxLabel::after  { content: "Tip"; }
.article-body div.boxWarning .boxLabel { color: var(--coral); }
.article-body div.boxWarning .boxLabel::before { content: "warning"; }
.article-body div.boxWarning .boxLabel::after  { content: "Warning"; }
.article-body div.boxMessage .boxLabel {
  padding: 7px 14px;
  margin-bottom: 0;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  color: var(--text-3);
}
.article-body div.boxMessage .boxLabel::before { content: "monitor"; }
.article-body div.boxMessage .boxLabel::after  { content: "On screen"; }

/* ── box content paragraph ── */
.article-body div.boxNote > p > strong:first-child,
.article-body div.boxTip > p > strong:first-child,
.article-body div.boxWarning > p > strong:first-child,
.article-body div.boxKnownIssue > p > strong:first-child { display: none; }
.article-body div.boxNote > p,
.article-body div.boxTip > p,
.article-body div.boxWarning > p,
.article-body div.boxKnownIssue > p { margin: 0 0 0.6em; font-size: 14px; }
.article-body div.boxNote > p:last-child,
.article-body div.boxTip > p:last-child,
.article-body div.boxWarning > p:last-child,
.article-body div.boxKnownIssue > p:last-child { margin-bottom: 0; }
.article-body div.boxMessage > p { margin: 0; padding: 12px 16px; font-size: 14px; }

/* ── Code blocks ── */
.article-body .codeSnippet .boxLabel {
  padding: 6px 8px 6px 14px;
  margin-bottom: 0;
  background: var(--surface-3);
  border-bottom: 1px solid var(--border);
  justify-content: space-between;
  color: var(--text-3);
  min-height: 32px;
}
.article-body .codeSnippetFilename {
  font-family: monospace;
  font-size: 11px;
  color: var(--text-3);
}
.article-body .codeSnippetCopyButton {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border);
  background: var(--surface-3);
  color: var(--text-2);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  font-family: "APRegular", sans-serif;
  text-decoration: none;
  transition: background .15s, color .15s;
  line-height: 1.6;
  flex: 0 0 auto;
}
.article-body .codeSnippetCopyButton .material-icons { font-size: 13px !important; line-height: 1 !important; }
.article-body .codeSnippetCopyButton:hover { background: var(--nav-hover-bg); color: var(--text-1); }
.article-body .codeSnippetCopyButton.copied { color: var(--accent); border-color: var(--accent); }
.article-body .codeSnippetPre {
  margin: 0;
  padding: 14px 20px;
  background: transparent;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-2);
  white-space: pre;
}
.article-body .codeSnippetPre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
  border-radius: 0;
}
.article-body .codeSnippet { border-color: var(--border); border-radius: 4px; background: var(--surface-2); overflow-x: auto; }
[data-theme="dark"] .article-body .codeSnippet { border-color: var(--border); border-radius: 4px; background: var(--surface-2); overflow-x: auto; }
[data-theme="dark"] .article-body .codeSnippet .boxLabel { background: var(--surface-3); border-bottom-color: var(--border); }
[data-theme="dark"] .article-body .codeSnippetCopyButton { background: var(--surface-3); border-color: #2e3f3b; }
[data-theme="dark"] .article-body .codeSnippetPre { background: var(--surface-2); }


.article-body .ui-label          { font-weight: 700; }
.article-body .ui-value-option   { font-weight: 700; font-style: italic;  }
.article-body .emphasize         { font-weight: 700; border-bottom: 2px solid var(--text-2); }
.article-body .product-tool-name { font-weight: 700; }

.article-body .keyboard {
  font-size: 0.85em;
  font-weight: 700;
  border: 1px solid var(--kbd-border);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 6px;
  background: var(--kbd-bg);
  color: var(--text-2);
  white-space: nowrap;
}

.article-body .var-name {
  font-family: monospace;
  font-size: 0.88em;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--text-1);
  font-style: italic;
}

.article-body .var-value,
.article-body .code-inline {
  font-family: monospace;
  font-size: 0.88em;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--text-1);
}

.article-body .filename {
  font-family: monospace;
  font-size: 0.88em;
  color: var(--text-1);
  word-break: break-all;
}

.article-body video {
  display: block;
  max-width: 100%;
  margin: 16px 0;
  border-radius: 8px;
  box-shadow: 4px 6px 6px rgba(0, 0, 0, .28);
}
[data-theme="dark"] .article-body video {
  box-shadow: 4px 6px 6px rgba(255, 255, 255, .5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .article-body video {
    box-shadow: 4px 6px 6px rgba(255, 255, 255, .5);
  }
}
.article-body h2,
.article-body h3,
.article-body h4,
.article-body [name],
.wn-build-heading { scroll-margin-top: 90px; }

.article-body img.inlineIcon {
  height: 1em;
  width: auto;
  vertical-align: -0.15em;
  margin-left: 3px;
  margin-right: 3px;
  display: inline;
}

/* ── Screenshots and images ── */
img.screenshot {
  display: block;
  margin: 16px 0 16px 20px;
  max-width: 95%;
  border-radius: 8px;
  box-shadow: 4px 6px 6px rgba(0, 0, 0, .28);
}
[data-theme="dark"] img.screenshot {
  box-shadow: 4px 6px 6px rgba(255, 255, 255, .5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) img.screenshot {
    box-shadow: 4px 6px 6px rgba(255, 255, 255, .5);
  }
}
.article-body img.screenshotNoShadow {
  display: block;
  margin: 16px 0 16px 20px;
  max-width: 95%;
  border-radius: 8px;
}

/* ── List variants ── */
.article-body ol.numbers                     { list-style-type: decimal; }
.article-body ol.numbers > li > ol           { list-style-type: lower-alpha; }
.article-body ol.numbers > li > ol > li > ol { list-style-type: lower-roman; }

.article-body ul.bullets                     { list-style-type: disc; }
.article-body ul.bullets > li > ul           { list-style-type: circle; }
.article-body ul.bullets > li > ul > li > ul { list-style-type: square; }

.article-body ul.checklist              { list-style: none; padding-left: 0; }
.article-body ul.checklist > li         { padding-left: 1.6em; position: relative; }
.article-body ul.checklist > li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* ── Embedded video ── */
.portal-video {
  margin: 20px 0;
}
.portal-video-wrap {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-3);
}
.portal-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 8px;
}
.portal-video figcaption {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-2);
  text-align: center;
  font-style: italic;
}
.portal-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin: 20px 0;
}
.portal-video-grid .portal-video {
  margin: 0;
}

/* ── Image zoom ── */
.img-zoom-wrap {
  display: inline-block;
  position: relative;
  cursor: zoom-in;
}
.img-zoom-wrap::after {
  content: "zoom_in";
  font-family: "Material Icons";
  font-size: 16px;
  line-height: 1;
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  border-radius: 5px;
  padding: 3px 4px;
  pointer-events: none;
  opacity: 1;
  transition: background .15s;
}
.img-zoom-wrap:hover::after { background: rgba(0, 0, 0, .7); }

#imgZoomDialog {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--backdrop-bg);
  backdrop-filter: blur(4px);
  cursor: zoom-out;
}
#imgZoomDialog[hidden] { display: none; }
#imgZoomDialog img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  cursor: zoom-out;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .5);
}

/* ============================================================
   FLOW DIAGRAM (workflow box/arrow prototype)
   ============================================================ */
.flow-diagram {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 8px 0 0;
  flex-wrap: wrap;
}

.flow-step {
  flex: 1;
  min-width: 120px;
  max-width: 200px;
  background: var(--surface-4);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  position: relative;
}

.flow-step-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--accent);
  flex: 0 0 auto;
}
.flow-step-icon .material-icons { font-size: 20px !important; line-height: 1 !important; }

.flow-step-num {
  position: absolute;
  top: 8px;
  right: 10px;
  font: 700 11px "APBold";
  color: var(--text-3);
  opacity: 0.6;
}

.flow-step-label {
  font: 700 13px "APBold";
  color: var(--text-1);
  line-height: 1.3;
}

.flow-step-desc {
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.5;
}

.flow-arrow {
  display: flex;
  align-items: center;
  padding: 0 4px;
  color: var(--connector-color);
  flex: 0 0 auto;
  align-self: center;
}
.flow-arrow .material-icons { font-size: 20px !important; line-height: 1 !important; }

.workflow-block {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-4);
  padding: 24px 28px;
}
.workflow-block--amber  { background: linear-gradient(135deg, var(--status-upgrade-bg) 0%, var(--surface-4) 60%); }
.workflow-block--blue   { background: linear-gradient(135deg, var(--status-recommended-bg) 0%, var(--surface-4) 60%); }
.workflow-block--violet { background: linear-gradient(135deg, var(--insight-bg) 0%, var(--surface-4) 60%); }

.workflow-title {
  font: 700 14px "APBold";
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin: 0 0 16px;
}

/* ── What's New hero schematic animation ── */
.wn-hero-schematics {
  position: relative;
  width: 100%;
}
.wn-hero-schematic {
  position: absolute;
  top: 0; left: 0; right: 0;
  opacity: 0;
  animation: wn-schematic-cycle 9s infinite;
}
.wn-hero-schematic:nth-child(1) { animation-delay: 0s;  position: relative; opacity: 1; }
.wn-hero-schematic:nth-child(2) { animation-delay: 2.25s; }
.wn-hero-schematic:nth-child(3) { animation-delay: 4.5s; }
.wn-hero-schematic:nth-child(4) { animation-delay: 6.75s; }
@keyframes wn-schematic-cycle {
  0%   { opacity: 0; }
  6%   { opacity: 1; }
  25%  { opacity: 1; }
  31%  { opacity: 0; }
  100% { opacity: 0; }
}

/* ── WHAT'S NEW ─────────────────────────────────────────────── */

.wn-highlights { margin-bottom: 40px; }

.wn-highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.journey-card.wn-top { border-color: var(--accent); }

.wn-highlight-img {
  width: 100%;
  max-height: 260px;
  overflow: hidden;
  background: var(--surface-3);
  margin: -24px -24px 16px;
  width: calc(100% + 48px);
}
.wn-highlight-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.wn-tag-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.wn-filter-row {
  padding: 8px 0;
  border-top: 1px solid var(--border);
}

.wn-filter-row--main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Filters live in a collapsible section (reuses details.collapsible) */
details.collapsible.wn-filters { margin: 12px 0 28px; }
details.collapsible.wn-filters summary { padding: 9px 14px; font-size: 13px; }
.wn-filters .collapsible-body { padding: 0 14px 6px; }
.wn-filters .wn-filter-row:first-child { border-top: none; }
.wn-filters-icon { font-size: 18px !important; line-height: 1 !important; color: var(--text-3); margin-right: -2px; }
.wn-filters-active { font-weight: 400; color: var(--accent); }
.wn-filters-active.none { color: var(--text-3); }
.wn-filters-clear {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.wn-filters-clear:hover { background: var(--surface-4); }
.wn-filters-clear[aria-disabled="true"] { color: var(--text-3); opacity: .55; cursor: default; }
.wn-filters-clear[aria-disabled="true"]:hover { background: transparent; }

.wn-filter-divider {
  border-left: 1px solid var(--border);
  padding-left: 24px;
  margin-left: 16px;
}

.wn-filter-end {
  margin-left: auto;
  border-left: 1px solid var(--border);
  padding-left: 24px;
}

.wn-tag-mode-toggle {
  display: flex;
  background: var(--mode-switch-bg);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}
.wn-tag-mode {
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  cursor: pointer;
}
.wn-tag-mode.active { background: var(--surface-4); color: var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,.08); }

.wn-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wn-items-header {
  display: grid;
  grid-template-columns: 1fr 38px 20px 0;
  gap: 14px;
  padding: 0 0 6px;
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
  text-align: center;
}
.wn-items-header > div:first-child { text-align: left; }
.wn-items-header > div:not(:first-child) { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wn-header-item { display: flex; align-items: center; gap: 3px; }
.wn-items-header .material-icons { font-size: 12px !important; }

.wn-item[hidden] { display: none; }

.wn-items-header,
.wn-item { grid-template-columns: 1fr 38px 20px 0; gap: 14px; }
.wn-id-hidden-cell { overflow: hidden; max-width: 0; text-align: center; }
.wn-id-visible .wn-id-hidden-cell { display: block; max-width: none; overflow: visible; text-align: center; }

.wn-id-visible .wn-items-header,
.wn-id-visible .wn-item { grid-template-columns: 1fr 38px 20px auto; }
.wn-id-visible .wn-items-header { padding-right: 40px; }

.wn-id-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.wn-id-toggle:hover { color: var(--text-1); }
.wn-item {
  display: grid;
  grid-template-columns: 1fr 38px 20px 0;
  align-items: start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.wn-item:last-child { border-bottom: none; }

.wn-item-left { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.wn-item .wn-area-pill { display: flex; justify-content: center; width: 100%; }

.wn-component-pill,
.wn-item-date {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 13px;
  font-weight: 700;
  padding: 0;
  white-space: nowrap;
  color: var(--text-3);
  background: none;
  border: none;
}
.wn-id-pill {
  font-size: 11px;
  color: var(--text-3);
}
.wn-area-pill { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 700; padding: 0; white-space: nowrap; color: var(--text-3); background: none; border: none; justify-content: center; }
.wn-area-icon { font-size: 16px !important; line-height: 1 !important; }
.wn-feature .wn-area-icon  { color: var(--blue); }
/* The tick glyph is a thin line; a text stroke thickens it to match the
   heavier component icons. Adjust the width to taste. */
.wn-fix .wn-area-icon      { color: var(--progress-fill); -webkit-text-stroke: 1px currentColor; }
/* Component icons (client / server / mobile) share one theme-aware colour */
.wn-client .wn-area-icon,
.wn-server .wn-area-icon,
.wn-mobile .wn-area-icon   { color: var(--text-3); }

.wn-item-body { display: flex; flex-direction: column; gap: 4px; }
.wn-item-heading { display: flex; flex-wrap: wrap; gap: 4px; }
.wn-tag-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 2px 7px;
  color: var(--text-2);
}

.wn-item-body { display: flex; flex-direction: column; gap: 6px; }
.wn-item-heading { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.wn-item-desc { font-size: 14px; color: var(--text-1); line-height: 1.65; }
.wn-item-desc p { margin: 0 0 8px; }
.wn-item-desc p:last-child { margin-bottom: 0; }
.wn-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 10px;
  font-weight: 700;
  border-radius: 8px;
  padding: 0 5px;
  min-width: 18px;
  height: 16px;
  margin-left: 4px;
}

.wn-filter-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-3);
  white-space: nowrap;
  margin-right: 6px;
}

.wn-upcoming-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  background: var(--status-optional-bg);
  color: var(--status-optional-color);
  border-radius: 99px;
  padding: 2px 8px;
  vertical-align: middle;
}

.wn-released-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  background: var(--status-upgrade-bg);
  color: var(--status-upgrade-color);
  border-radius: 99px;
  padding: 2px 8px;
  vertical-align: middle;
}

.wn-ongoing-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  background: var(--status-recommended-bg);
  color: var(--status-recommended-color);
  border-radius: 99px;
  padding: 2px 8px;
  vertical-align: middle;
}

.wn-result-count { font-size: 11px; color: var(--text-3); margin: 8px 0 4px; }
.wn-empty { color: var(--text-2); font-size: 13px; padding: 20px 0; }

.wn-build-group { margin-bottom: 8px; }
.wn-build-heading {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-3);
  padding: 18px 0 6px;
  border-top: 1px solid var(--border);
  margin: 4px 0 0;
}
.article-layout > .wn-changelog { min-width: 0; }
.wn-build-group:first-child .wn-build-heading,
.wn-items-header + .wn-build-group .wn-build-heading { border-top: none; padding-top: 4px; }

/* Column legend row (Client / Server / Mobile, Feature / Fix, ID) is hidden
   to save vertical space; each icon in the rows has a title tooltip. Remove
   this rule to bring it back. */
.wn-items-header { display: none; }
.wn-build-group .wn-item { padding-left: 16px; }
