/* Netskope AI Hub
   Brand tokens, fonts and the cover treatment come from the Netskope Brand
   Guidelines 2025 design system (the same tokens the report and proposal
   builders use). Fonts are served from this container, so the page still makes
   no external request. */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/inter-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Lora'; font-style: italic; font-weight: 400; font-display: swap; src: url('/assets/fonts/lora-latin-400-italic.woff2') format('woff2'); }

:root {
  color-scheme: light;

  /* Brand palette, verbatim from the guidelines */
  --deep-blue: #081A59;
  --netskope-blue: #00A9CE;
  --light-blue: #D9FAFF;
  --teal: #008095;
  --lightning-green: #AFF198;
  --brand-orange: #FF8200;
  --brand-pink: #E5326E;
  --dark-gray: #2A2B2D;
  --gray: #53565A;
  --medium-gray: #8C8F93;
  --light-gray: #C8C9C7;
  --off-white: #F5F6F8;

  /* Light theme */
  --bg: var(--off-white);
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --surface-3: #e2e7ee;
  --border: #dadfe7;
  --border-strong: #b9c2cf;

  --text: var(--deep-blue);
  --text-2: var(--gray);
  --text-3: var(--medium-gray);

  /* Deep blue carries actions, Netskope blue and teal carry emphasis */
  --brand: var(--deep-blue);
  --brand-hover: #0B2C66;
  --accent: var(--teal);
  --accent-text: #ffffff;
  --accent-soft: var(--light-blue);
  --accent-border: #9BDDEC;

  --good: #2EA86B;
  --good-soft: #E7F6EE;
  --warn: #E08600;
  --warn-soft: #FCF1E0;
  --bad: #D63B6A;
  --bad-soft: #FBE7EE;
  --star: #E08600;
  --status-good-text: #10151C;
  --status-warn-text: #10151C;
  --status-bad-text: #FFFFFF;
  --status-bad-bg: #C72E5C;
  --text-small: 12px;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --shadow: 0 1px 2px rgba(8, 26, 89, 0.06), 0 8px 24px rgba(8, 26, 89, 0.07);
  --shadow-lg: 0 12px 40px rgba(8, 26, 89, 0.22);

  --logo-filter: none;
  --gutter: 16px;
  --header-h: 60px;
  --max: 1280px;
}

/* Dark theme built on the cover gradient blues, so it stays on brand */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;

    --bg: #050F2E;
    --surface: #0A1A4A;
    --surface-2: #10245C;
    --surface-3: #17306F;
    --border: #1E3B7A;
    --border-strong: #2C5196;

    --text: #EAF6FB;
    --text-2: #B7CBE4;
    --text-3: #93A9C7;

    --brand: var(--netskope-blue);
    --brand-hover: #2FBFDD;
    --accent: #5CD3EA;
    --accent-text: #061343;
    --accent-soft: #0C2F55;
    --accent-border: #185B7E;

    --good: #7FDCA9;
    --good-soft: #102C21;
    --warn: #E9AF5B;
    --warn-soft: #2C2413;
    --bad: #F1809F;
    --bad-soft: #2E1620;
    --star: #FFA22E;
    --status-bad-text: #10151C;
    --status-bad-bg: var(--bad);

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);

    --logo-filter: brightness(0) invert(1);
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;

  --bg: #050F2E;
  --surface: #0A1A4A;
  --surface-2: #10245C;
  --surface-3: #17306F;
  --border: #1E3B7A;
  --border-strong: #2C5196;

  --text: #EAF6FB;
  --text-2: #B7CBE4;
  --text-3: #93A9C7;

  --brand: var(--netskope-blue);
  --brand-hover: #2FBFDD;
  --accent: #5CD3EA;
  --accent-text: #061343;
  --accent-soft: #0C2F55;
  --accent-border: #185B7E;

  --good: #7FDCA9;
  --good-soft: #102C21;
  --warn: #E9AF5B;
  --warn-soft: #2C2413;
  --bad: #F1809F;
  --bad-soft: #2E1620;
  --star: #FFA22E;
  --status-bad-text: #10151C;
  --status-bad-bg: var(--bad);

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);

  --logo-filter: brightness(0) invert(1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  overflow-wrap: break-word;
}

h1, h2, h3, h4 { line-height: 1.25; margin: 0; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: 28px; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
p { margin: 0 0 12px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

button, input, select, textarea { font: inherit; color: inherit; }

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--surface);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.skip:focus { left: 8px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* The page fills the window, so the footer sits at the bottom even when a view
   is short. */
body.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body.app > main { flex: 1 0 auto; width: 100%; }

/* ------------------------------------------------------------------ header */

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-in {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--header-h);
  max-width: var(--max);
  margin: 0 auto;
  padding: 8px var(--gutter);
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  color: var(--text);
  font-size: 16px;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-logo {
  height: 20px; width: auto; display: block;
  filter: var(--logo-filter);
}
.brand-sep {
  width: 1px; height: 20px;
  background: var(--border-strong);
}
.brand-name { font-weight: 650; letter-spacing: -0.01em; }
.header-search { flex: 1 1 260px; min-width: 180px; max-width: 520px; }
.header-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }

.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 12px;
  height: 38px;
}
.search:focus-within { border-color: var(--accent); background: var(--surface); }
.search input {
  border: 0; background: transparent; outline: 0;
  width: 100%; height: 100%;
}
.search kbd {
  font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  border: 1px solid var(--border-strong);
  border-radius: 4px; padding: 3px 5px; color: var(--text-3);
}

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 550; font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms ease, border-color 120ms ease, transform 80ms ease;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-primary {
  background: var(--brand); border-color: var(--brand); color: var(--accent-text);
}
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-ghost[aria-current='page'] { background: var(--accent-soft); color: var(--accent); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--border)); }
.btn-danger:hover { background: var(--bad-soft); }
.btn-icon { width: 36px; padding: 0; }
.btn-block { width: 100%; }

.select {
  height: 36px; padding: 0 10px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer;
}

/* ------------------------------------------------------------------ layout */

.section { padding-block: 8px 26px; }
.section-head h2 { letter-spacing: -0.015em; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px 12px; margin-bottom: 12px; flex-wrap: wrap;
}
.section-head p { color: var(--text-3); font-size: 13px; margin: 0; }

.browse { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; padding-block: 20px 40px; }
.browse-controls, .filters-head, .filters-apply { display: none; }
.filter-rating { width: 100%; }
.filters-col { position: sticky; top: calc(var(--header-h) + 12px); align-self: start; max-height: calc(100vh - var(--header-h) - 24px); overflow-y: auto; }
.results-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.results-bar .count { color: var(--text-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.results-bar .spacer { flex: 1; }

.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
}

/* ------------------------------------------------------------------ cards */

.card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  transition: border-color 120ms ease, transform 120ms ease;
}
.card:hover { border-color: var(--netskope-blue); transform: translateY(-1px); }
.card-top { display: flex; gap: 11px; align-items: flex-start; }
.icon-tile {
  flex: none;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  font-size: 20px; line-height: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.card h3 { font-size: 15.5px; }
.card h3 a { color: var(--text); }
.card .tagline { color: var(--text-2); font-size: 13.5px; margin: 0; }
.card .byline { color: var(--text-3); font-size: 12.5px; }
.card-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px; color: var(--text-2);
  white-space: nowrap;
}
a.chip:hover { border-color: var(--accent-border); color: var(--accent); text-decoration: none; }
.chip-type { background: var(--accent-soft); border-color: var(--accent-border); color: var(--teal); font-weight: 600; }
:root[data-theme='dark'] .chip-type { color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .chip-type { color: var(--accent); } }
.chip-new { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 35%, var(--border)); color: var(--good); font-weight: 600; }
.chip-featured { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, var(--border)); color: var(--warn); font-weight: 600; }
.chip-demo { background: transparent; border-style: dashed; color: var(--text-3); }
.chip-bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, var(--border)); color: var(--bad); }
.chip-muted { opacity: 0.8; }

.stars { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.stars-glyphs { color: var(--star); letter-spacing: 1px; font-size: 14px; }
.stars-empty { color: var(--text-3); }
.stars-value { font-variant-numeric: tabular-nums; font-weight: 600; }
.stars-count { color: var(--text-3); font-size: 12.5px; }
.dl { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; color: var(--text-2); }

/* ------------------------------------------------------------------ filters */

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.panel + .panel { margin-top: 14px; }
.filter-group + .filter-group { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.filter-group h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); margin-bottom: 9px; }
.filter-list { display: flex; flex-direction: column; gap: 2px; }
.filter-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 7px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 13.5px;
}
.filter-row:hover { background: var(--surface-2); }
.filter-row input { accent-color: var(--accent); margin: 0; flex: none; }
.filter-row .n { margin-left: auto; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.filter-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-toggle {
  border: 1px solid var(--border); background: var(--surface-2);
  border-radius: 999px; padding: 4px 9px; font-size: 12.5px; cursor: pointer; color: var(--text-2);
}
.tag-toggle[aria-pressed='true'] { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent); font-weight: 600; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pill-x {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-soft); border: 1px solid var(--accent-border); color: var(--accent);
  border-radius: 999px; padding: 3px 6px 3px 10px; font-size: 12.5px; cursor: pointer;
}
.filters-toggle { display: none; }

/* ------------------------------------------------------------------ detail */

.detail { padding-block: 20px 48px; max-width: 1080px; }
.detail-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.detail-head .icon-tile { width: 58px; height: 58px; font-size: 28px; border-radius: 14px; }
.detail-head h1 { font-size: clamp(22px, 3vw, 30px); }
.detail-head .tagline { color: var(--text-2); font-size: 16px; margin: 6px 0 0; max-width: 70ch; }
.detail-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0; }
.detail-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }

.prose { color: var(--text); }
.prose h2 { font-size: 19px; margin: 26px 0 10px; }
.prose h3 { font-size: 16px; margin: 20px 0 8px; }
.prose h4 { font-size: 14.5px; margin: 16px 0 6px; color: var(--text-2); }
.prose ul, .prose ol { margin: 0 0 12px; padding-left: 22px; }
.prose li { margin-bottom: 5px; }
.prose code {
  font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 5px; padding: 1px 5px;
}
.prose pre {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px; overflow-x: auto; margin: 0 0 14px;
}
.prose pre code { background: none; border: 0; padding: 0; font-size: 12.5px; }
.prose blockquote {
  margin: 0 0 14px; padding: 10px 14px;
  border-left: 3px solid var(--accent-border); background: var(--surface-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-2);
}
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 22px 0; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.table-wrap { overflow-x: auto; margin: 0 0 14px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.prose th, .prose td { border: 1px solid var(--border); padding: 7px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); font-weight: 600; }

.meta-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; font-size: 13.5px; }
.meta-list div { display: flex; justify-content: space-between; gap: 12px; }
.meta-list dt, .meta-list .k { color: var(--text-3); }
.meta-list .v { text-align: right; font-weight: 550; }

.rating-block { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.rating-big { display: flex; align-items: baseline; gap: 10px; }
.rating-big .num { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.hist { display: grid; gap: 5px; }
.hist-row { display: grid; grid-template-columns: 34px 1fr 30px; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); }
.bar { height: 7px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--star); border-radius: 999px; }

.rate-stars { display: inline-flex; gap: 2px; }
.rate-stars button {
  background: none; border: 0; cursor: pointer; padding: 2px;
  font-size: 26px; line-height: 1; color: var(--text-3);
}
.rate-stars button[data-on='true'] { color: var(--star); }
.rate-stars button:hover { transform: scale(1.08); }

.reviews { display: grid; gap: 12px; }
.review { border-top: 1px solid var(--border); padding-top: 12px; }
.review-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); }
.review-head b { color: var(--text); font-weight: 600; }
.review p { margin: 6px 0 0; font-size: 14px; }

.entries { max-height: 220px; overflow: auto; font: 12.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text-2); }
.entries div { display: flex; justify-content: space-between; gap: 12px; }

.shots { display: flex; gap: 10px; flex-wrap: wrap; }
.shots img {
  max-width: 100%; width: 260px; height: auto;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2);
}

/* ------------------------------------------------------------------ modal */

.backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(8, 12, 18, 0.55);
  display: grid; place-items: center;
  padding: var(--gutter);
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: min(640px, 100%);
  max-height: min(86vh, 760px);
  display: flex; flex-direction: column;
}
.modal-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--border);
}
.modal-head h2 { font-size: 18px; }
.modal-head p { color: var(--text-2); font-size: 13.5px; margin: 4px 0 0; }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.modal-foot { padding: 12px 18px 16px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 0 0 16px; flex-wrap: wrap; }
.tab {
  background: none; border: 0; border-bottom: 2px solid transparent;
  padding: 9px 11px; cursor: pointer; color: var(--text-2); font-size: 13.5px; font-weight: 550;
}
.tab[aria-selected='true'] { color: var(--accent); border-bottom-color: var(--accent); }

.step { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; margin-bottom: 18px; }
.step-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); font-weight: 700; }
.step h4 { font-size: 14.5px; }
.step p { font-size: 13.5px; color: var(--text-2); margin: 0; }

.cmd { display: flex; gap: 8px; align-items: stretch; min-width: 0; }
.cmd .btn { flex: 0 0 auto; }
.cmd code {
  flex: 1 1 0; min-width: 0;
  font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 9px 11px; overflow-x: auto; white-space: pre; display: block;
}

/* ------------------------------------------------------------------ forms */

.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; max-width: 720px; }
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.field > label { font-size: 13.5px; font-weight: 600; }
.field .hint { font-size: 12.5px; color: var(--text-3); }
.field .err { font-size: 12.5px; color: var(--bad); }
.input, .textarea {
  width: 100%;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 9px 11px;
}
.input:focus, .textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.textarea { min-height: 200px; resize: vertical; font-family: inherit; line-height: 1.55; }
.field-invalid .input, .field-invalid .textarea { border-color: var(--bad); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border); background: var(--surface-2);
  border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 13px;
}
.check input { accent-color: var(--accent); margin: 0; }
.check:has(input:checked) { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent); }

.type-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.type-card {
  text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; display: grid; gap: 6px;
}
.type-card:hover { border-color: var(--border-strong); }
.type-card[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); }
.type-card b { font-size: 14.5px; }
.type-card span { font-size: 13px; color: var(--text-2); }

.checklist { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.checklist li { display: flex; gap: 9px; font-size: 13.5px; color: var(--text-2); }
.checklist li::before { content: '✓'; color: var(--good); font-weight: 700; flex: none; }

.drop {
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
  padding: 18px; text-align: center; background: var(--surface-2);
  display: grid; gap: 8px; place-items: center;
}
.file-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 11px; font-size: 13.5px;
}
.file-row .name { font-weight: 600; }
.file-row .size { color: var(--text-3); }
.file-row button { margin-left: auto; }

/* ------------------------------------------------------------------ misc */

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid var(--border); background: var(--surface-2);
  border-radius: var(--radius); padding: 12px 14px; font-size: 13.5px; color: var(--text-2);
}
.notice-good { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 30%, var(--border)); color: var(--text); }
.notice-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, var(--border)); color: var(--text); }
.notice-bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, var(--border)); color: var(--text); }
.notice b { color: var(--text); }

.empty { text-align: center; padding: 56px 20px; color: var(--text-2); }
.empty h3 { margin-bottom: 8px; color: var(--text); }

.skeleton {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px; display: grid; gap: 10px;
}
.sk { background: var(--surface-3); border-radius: 6px; height: 12px; animation: pulse 1.4s ease-in-out infinite; }
.sk.t { height: 17px; width: 62%; }
.sk.b { height: 36px; width: 100%; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

.toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 80; display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); }
.toast {
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 11px 13px; font-size: 13.5px;
  display: flex; gap: 10px; align-items: flex-start;
  animation: rise 160ms ease;
}
.toast-good { border-color: color-mix(in srgb, var(--good) 45%, var(--border)); }
.toast-bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--border)); }
.toast button { margin-left: auto; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.footer {
  border-top: 1px solid var(--border);
  margin-top: 30px; padding: 22px 0 34px;
  color: var(--text-3); font-size: 13px;
}
.footer-in { display: flex; gap: 14px 22px; flex-wrap: wrap; align-items: center; }
.footer .spacer { flex: 1; }

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* admin */
.queue-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ small screens */

@media (max-width: 1000px) {
  .detail-cols { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .browse { grid-template-columns: minmax(0, 1fr); }
  .browse-controls { display: flex; }
  .filters-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
  .filters-apply { display: inline-flex; width: 100%; justify-content: center; margin-top: 16px; }
  .filters-col { position: static; max-height: none; display: none; }
  .filters-col.open { display: block; }
  .filters-toggle { display: inline-flex; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; }
  .header-nav { flex-wrap: wrap; justify-content: flex-end; row-gap: 2px; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .row2 { grid-template-columns: minmax(0, 1fr); }
  .modal { max-height: 92vh; }
  .detail-actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

.muted { color: var(--text-3); font-size: 13px; }

/* Sign-in result pages rendered by the server (authpages.mjs). */
.auth-page { max-width: 560px; padding-block: 72px 48px; }
.auth-page .tagline { margin: 12px 0 24px; }
.auth-page .brand-logo { display: block; margin-bottom: 28px; }

/* ------------------------------------------------------------ admin role */

.header-nav .header-admin {
  height: 32px; padding: 0 12px; border-radius: 999px; font-weight: 600;
  border-color: var(--accent-border); color: var(--accent); background: var(--accent-soft);
}
.header-nav .header-admin[aria-current='page'] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }

.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.store-card .admin-actions { padding-top: 10px; border-top: 1px dashed var(--border); }
.store-card .admin-actions .btn { flex: 1; justify-content: center; }
.spotlight .admin-actions { position: absolute; top: 12px; right: 12px; z-index: 2; }
.spotlight .admin-actions .btn { background: var(--surface); }
.detail-actions .admin-actions { margin-left: auto; gap: 10px; }

.narrow { max-width: 560px; }

/* The head of a review and a list of facts: the detail page, the wizard and My space. */
.review-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.review-head h3 { font-size: 14px; color: var(--text-2); font-weight: 600; }
.meta-list .v { overflow-wrap: anywhere; }

@media (max-width: 640px) {
  .detail-actions .admin-actions { margin-left: 0; width: 100%; }
  .detail-actions .admin-actions .btn { flex: 1; }
}

.local-login { max-width: 380px; margin-top: 8px; }
.local-login-foot { margin-top: 28px; font-size: 13px; }
.local-login .err { font-size: 13px; color: var(--bad); }
.local-login .err:empty { display: none; }

/* ------------------------------------------------------------ account */

/* The header's link to My space: initials and "My space" in one pill. */
.control-logout { --control-mask: url("/assets/ui-icons/logout.svg"); }
.user-button {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px 0 3px; border: 1px solid var(--border); border-radius: 999px;
  background: transparent; color: var(--text); font-size: 13.5px; font-weight: 600; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.user-button:hover { background: var(--surface-2); text-decoration: none; }
.user-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.user-button[aria-current='page'] { border-color: var(--accent-border); background: var(--accent-soft); color: var(--accent); }
.avatar {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: var(--accent-text);
  font-size: 12px; font-weight: 700; letter-spacing: .02em; line-height: 1; user-select: none;
  flex: none;
}

/* Who is signed in and how, and signing out: at the foot of My space. */
.user-email { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-role {
  justify-self: start; margin-top: 3px; padding: 2px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--text-2);
}
.user-role-admin, .user-role-local { background: var(--accent-soft); color: var(--accent); }
.me-account { display: grid; gap: 10px; }
.user-via { margin: 0; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-3); }
.user-signout { justify-content: center; gap: 8px; height: 38px; font-weight: 600; }
.user-signout .control-icon { width: 17px; height: 17px; }
.user-signout:hover { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--border)); background: var(--bad-soft); }

/* On a phone only the initials show; the label stays for screen readers. */
@media (max-width: 640px) {
  .user-button { width: 34px; height: 34px; padding: 0; justify-content: center; border-color: transparent; }
  .user-button-label { display: none; }
  .avatar { width: 28px; height: 28px; font-size: 11px; }
}

/* ------------------------------------------------------------ icon picker */

.icon-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px;
  max-height: 272px; overflow-y: auto; padding: 10px; margin-top: 2px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2);
}
.icon-choice {
  display: grid; place-items: center; aspect-ratio: 1; padding: 4px; cursor: pointer;
  border: 2px solid transparent; border-radius: 14px; background: transparent;
  transition: border-color .12s, transform .12s;
}
.icon-choice img { width: 100%; max-width: 44px; height: auto; display: block; }
.icon-choice:hover { transform: translateY(-1px); border-color: var(--accent-border); }
.icon-choice:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.icon-choice[aria-checked='true'] { border-color: var(--accent); background: var(--accent-soft); }
.logo-emoji { display: grid; place-items: center; background: #D9FAFF; }
.logo-emoji span { font-size: 34px; line-height: 1; }
.spotlight-product .logo-emoji span { font-size: 24px; }
.related-product .logo-emoji span { font-size: 17px; }
.detail-head .logo-emoji span { font-size: 44px; }

/* Rating an entry, on its page. */
.rate-remove { justify-self: start; }
.rate-stars button { cursor: pointer; }

/* ------------------------------------------------------------ author page */

.browse-author { padding-block: 22px 48px; display: grid; gap: 22px; }
.browse-author .back { font-size: 14px; }
.author-head { display: flex; align-items: center; gap: 18px; }
.author-head h1 { font-size: 30px; line-height: 1.15; }
.author-head .tagline { margin-top: 4px; }
.avatar-xl { width: 72px; height: 72px; font-size: 24px; box-shadow: none; flex: none; }
@media (max-width: 640px) { .avatar-xl { width: 56px; height: 56px; font-size: 19px; } .author-head h1 { font-size: 24px; } }

/* Browse: results a page at a time */
.show-more-bar { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 28px 0 8px; }
.show-more-status { margin: 0; }
.mine-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Help page */
.help-intro { max-width: 72ch; margin: 8px 0 24px; color: var(--text-2); }
.help-section { margin-bottom: 26px; max-width: 80ch; }
.help-section h2 { font-size: 17px; margin-bottom: 8px; }
.help-q { border: 1px solid var(--border); border-radius: 10px; padding: 0 14px; margin-bottom: 8px; background: var(--surface); }
.help-q summary { cursor: pointer; padding: 12px 0; font-weight: 600; }
.help-q p { margin: 0 0 14px; color: var(--text-2); line-height: 1.55; }
.help-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

/* Disclaimer: a round orange "!" button in the header.
   Navy on the brand orange keeps the mark readable (contrast above 7:1). */
.header-nav .header-disclaimer {
  display: inline-grid; place-items: center; flex: none;
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--brand-orange); color: #0A1A4A; font: 800 17px/1 inherit;
}
.header-nav .header-disclaimer:hover { filter: brightness(1.06); }
.header-nav .header-disclaimer:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
/* Every 15 seconds it blinks for 5 (one soft blink a second, with an orange
   halo), then stays still for 10. Off for people who ask for less motion. */
.header-nav .header-disclaimer { animation: notice-blink 15s ease-in-out infinite; }
@keyframes notice-blink {
  0%, 6.667%, 13.333%, 20%, 26.667%, 33.333%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 130, 0, 0); }
  3.333%, 10%, 16.667%, 23.333%, 30% { opacity: .3; box-shadow: 0 0 0 6px rgba(255, 130, 0, .3); }
}
@media (prefers-reduced-motion: reduce) { .header-nav .header-disclaimer { animation: none; } }

/* The notice itself: no dividers, one soft orange mark, generous spacing. */
.modal.disclaimer-modal { width: min(560px, 100%); padding: 26px 28px 22px; gap: 0; }
.disclaimer-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.disclaimer-head h2 { font-size: 20px; line-height: 1.25; }
.disclaimer-mark {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--warn-soft); color: var(--brand-orange); font-size: 18px; font-weight: 800;
}
.disclaimer-body { max-height: min(60vh, 480px); overflow-y: auto; color: var(--text-2); font-size: 15px; line-height: 1.6; }
.disclaimer-body strong { color: var(--text); }
.disclaimer-foot { display: flex; justify-content: flex-end; margin-top: 20px; }

/* ---------------------------------------------------------------- medals */

/* The metal colours are fixed (a medal looks the same in either theme); the
   medal's name is written in the text colour next to it. */
.medal { --metal: #9aa4b1; --metal-2: #c9d0d8; display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--text); white-space: nowrap; vertical-align: middle; }
.medal-bronze { --metal: #a86a33; --metal-2: #d9a06a; }
.medal-silver { --metal: #8c949e; --metal-2: #d3d8de; }
.medal-gold { --metal: #c38b12; --metal-2: #f2cd5c; }
.medal-platinum { --metal: #5f7f99; --metal-2: #cfe0ee; }
.medal-icon { width: 20px; height: 20px; flex: none; }
.medal-compact .medal-icon { width: 17px; height: 17px; }
.medal-ribbon { fill: var(--accent); }
.medal-ribbon-2 { fill: var(--teal, var(--accent)); opacity: .75; }
.medal-disc { fill: var(--metal-2); stroke: var(--metal); stroke-width: 1.4; }
.medal-ring { fill: none; stroke: var(--metal); stroke-width: 1; opacity: .7; }
.medal-none { color: var(--text-3); font-weight: 500; }
/* A special medal: the library icon on a soft round badge, next to the level medal. */
.medal-row { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; vertical-align: middle; }
.medal-special .medal-special-icon { border-radius: 50%; background: var(--accent-soft); box-shadow: 0 0 0 1.5px var(--accent-border); }
.medal-special.medal-compact { gap: 0; }
h1 .medal { font-size: 14px; margin-left: 10px; }
h1 .medal .medal-icon { width: 26px; height: 26px; }

/* ---------------------------------------------------------------- following */

.btn-follow.is-following { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent); }
.follow-wrap { display: inline-flex; align-items: center; gap: 10px; }
.follow-count { font-size: 13px; color: var(--text-3); }
.detail-byline { color: var(--text-3); margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.detail-byline .btn-follow { margin-left: 6px; }

.author-head { flex-wrap: wrap; }
.author-copy { flex: 1; min-width: 0; }
.author-copy h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.author-stats { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 12px; }
.author-stat { display: grid; gap: 1px; }
.author-stat b { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.author-stat span { font-size: 12.5px; color: var(--text-3); }

/* ---------------------------------------------------------------- unread news */

.user-dot { position: absolute; top: 1px; left: 25px; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--surface); }

/* ---------------------------------------------------------------- loading shapes */

/* Grey blocks in the shape of what is on its way, so a page paints at once and
   nothing jumps when the data arrives. */
.sk-stack { display: grid; gap: 10px; min-width: 0; }
.sk.sk-title { height: 22px; }
.sk.sk-icon { width: 64px; height: 64px; border-radius: 16px; flex: none; }
.sk.sk-avatar { width: 56px; height: 56px; border-radius: 50%; flex: none; }
.sk.sk-button { width: 150px; height: 38px; border-radius: 10px; }
.sk.sk-button-short { width: 110px; }
.sk.sk-media { height: 180px; margin-top: 10px; border-radius: var(--radius); }
.sk-prose { padding-top: 6px; }
.me-sk-card { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.me-sk-hero {
  display: flex; align-items: center; gap: 16px; padding: 24px 26px;
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface);
}
.me-sk-hero .sk-stack { flex: 1; }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }

/* When something behind the page is having a bad day: a friendly robot and
   a line saying it comes back by itself. Never the technical reason. */
.oops {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px;
  max-width: 520px; margin: 32px auto; padding: 36px 28px;
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface);
}
.oops-text { display: grid; gap: 6px; justify-items: center; }
.oops-title { margin: 0; font-size: 1.25rem; color: var(--text); }
.oops p { margin: 0; color: var(--text-2); }
.oops .oops-small { font-size: .85rem; color: var(--text-3); }
.oops .btn { margin-top: 8px; }
.oops-icon { width: 96px; height: 96px; overflow: visible; }
.oops-head, .oops-body { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 3; }
.oops-ear { fill: var(--accent); }
.oops-line { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; fill: none; }
.oops-bulb { fill: var(--brand-orange); }
.oops-eye, .oops-mouth { stroke: var(--text); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.oops-drop { fill: var(--netskope-blue); }
@media (prefers-reduced-motion: no-preference) {
  .oops-icon { animation: oops-wobble 3.2s ease-in-out infinite; transform-origin: 50% 90%; }
  .oops-bulb { animation: oops-blink 1.6s steps(2, jump-none) infinite; }
}
@keyframes oops-wobble { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes oops-blink { 0% { opacity: 1; } 100% { opacity: .25; } }
/* Inside a page that shows what it has: side by side, smaller. */
.oops-compact {
  flex-direction: row; text-align: left; max-width: none; margin: 18px 0 0; padding: 18px 20px; gap: 16px;
}
.oops-compact .oops-text { justify-items: start; gap: 2px; }
.oops-compact .oops-icon { width: 56px; height: 56px; flex: none; }
.oops-compact .oops-title { font-size: 1rem; }
.detail-panel-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin: 0 0 4px; }
/* Inside one section of a page: no frame of its own, a small robot. */
.oops-section {
  flex-direction: row; text-align: left; max-width: none; margin: 0; padding: 14px 4px; gap: 14px;
  border: 0; background: none;
}
.oops-section .oops-text { justify-items: start; gap: 2px; }
.oops-section .oops-icon { width: 44px; height: 44px; flex: none; }
.oops-section .oops-title { font-size: .95rem; }
.oops-section p { font-size: .9rem; }
/* A shelf or section of the home page without its entries. */
.oops-shelf {
  padding: 8px 18px; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--surface);
}

/* The line above a page that shows all it can. */
.db-banner { padding-top: 16px; }
.oops-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px;
  border: 1px solid var(--accent-border); border-radius: var(--radius); background: var(--accent-soft); color: var(--text);
}
.oops-banner > span:nth-child(2) { flex: 1 1 260px; }
.oops-banner-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand-orange); flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .oops-banner-dot { animation: oops-blink 1.6s steps(2, jump-none) infinite; }
}
.admin-body > .oops-banner { margin-bottom: 4px; }
.detail-missing { margin-top: 18px; }
