/* ============================================================
   Cisco Study Hub — stylesheet
   Deliberately small and dependency-free: one file, no frameworks.
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f4f7fa;
  --bg-sunk: #eef3f7;
  --ink: #0d1b2a;
  --ink-2: #2b3c4d;
  --muted: #64788c;
  --faint: #93a4b5;
  --line: #e3eaef;
  --line-2: #d3dee7;

  --brand: #005587;
  --brand-2: #0077b6;
  --accent: #00bceb;
  --accent-soft: #e6f8fe;

  --ok: #0b7a54;
  --ok-soft: #e7f6f0;
  --note-soft: #eef5ff;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(13, 27, 42, .05), 0 10px 30px -18px rgba(13, 27, 42, .35);
  --shadow-lg: 0 2px 6px rgba(13, 27, 42, .06), 0 24px 60px -24px rgba(13, 27, 42, .4);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;

  --header-h: 62px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { width: min(1180px, 100% - 44px); margin-inline: auto; }
.wrap-narrow { width: min(860px, 100% - 44px); margin-inline: auto; }

/* ---------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  height: 100%;
  display: flex; align-items: center; gap: 20px;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); font-weight: 700; letter-spacing: -.02em;
  font-size: 15.5px; white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: linear-gradient(140deg, var(--brand) 0%, var(--brand-2) 60%, var(--accent) 130%);
  display: grid; place-items: center;
  box-shadow: 0 3px 10px -3px rgba(0, 85, 135, .6);
}
.brand-mark svg { display: block; }
.brand span.sub { color: var(--muted); font-weight: 500; }

.nav { display: flex; gap: 4px; margin-left: 6px; }
.nav a {
  color: var(--ink-2); font-size: 14px; font-weight: 500;
  padding: 7px 11px; border-radius: 8px;
}
.nav a:hover { background: var(--bg-sunk); text-decoration: none; color: var(--ink); }

.header-spacer { flex: 1; }

/* ---------------------------------------------------------- search */
.search { position: relative; flex: 0 1 340px; min-width: 180px; }
.search input {
  width: 100%; font: inherit; font-size: 14px;
  padding: 9px 12px 9px 34px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--bg-soft); color: var(--ink);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--faint); }
.search input:focus {
  outline: none; background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 188, 235, .16);
}
.search .icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--faint); pointer-events: none; display: flex;
}
.search kbd {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 10.5px; color: var(--faint);
  background: #fff; border: 1px solid var(--line-2);
  border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px;
  pointer-events: none;
}
.search input:focus + .icon + kbd, .search input:not(:placeholder-shown) ~ kbd { display: none; }

.results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  overflow: hidden; max-height: 66vh; overflow-y: auto;
  display: none; z-index: 80;
}
.results.open { display: block; }
.results .meta {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--faint); padding: 10px 14px 6px; font-weight: 600;
}
.results a {
  display: block; padding: 9px 14px; color: var(--ink);
  border-left: 3px solid transparent; font-size: 14px;
}
.results a:hover, .results a.active {
  background: var(--accent-soft); text-decoration: none;
  border-left-color: var(--accent);
}
.results a .t { display: block; font-weight: 600; line-height: 1.4; }
.results a .c {
  display: block; color: var(--muted); font-size: 12px; margin-top: 2px;
}
.results a mark { background: #fff2ac; color: inherit; border-radius: 3px; padding: 0 1px; }
.results .empty { padding: 16px 14px; color: var(--muted); font-size: 14px; }
.results .hint { padding: 10px 14px; color: var(--faint); font-size: 12px; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------- hero */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 460px at 12% -18%, rgba(0, 188, 235, .30), transparent 60%),
    radial-gradient(900px 420px at 88% 8%, rgba(0, 119, 182, .34), transparent 62%),
    linear-gradient(160deg, #00131f 0%, #003352 48%, #005587 100%);
  color: #eaf6fc;
  padding: 62px 0 66px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(800px 420px at 50% 40%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(800px 420px at 50% 40%, #000 30%, transparent 78%);
}
.hero .wrap { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); background: rgba(0, 188, 235, .12);
  border: 1px solid rgba(0, 188, 235, .3);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 20px;
}
.hero h1 {
  margin: 0 0 14px; font-size: clamp(30px, 4.6vw, 46px);
  line-height: 1.12; letter-spacing: -.03em; font-weight: 750;
  max-width: 17ch; color: #fff;
}
.hero p.lede {
  margin: 0 0 30px; font-size: clamp(15px, 1.7vw, 18px);
  color: rgba(226, 242, 250, .82); max-width: 62ch; line-height: 1.6;
}

.stats { display: flex; flex-wrap: wrap; gap: 34px; margin-top: 34px; }
.stat .n {
  font-size: clamp(24px, 3vw, 32px); font-weight: 750; color: #fff;
  letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums;
}
.stat .l {
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  color: rgba(190, 222, 238, .7); margin-top: 5px; font-weight: 600;
}

/* hero search */
.hero-search { position: relative; max-width: 560px; }
.hero-search input {
  width: 100%; font: inherit; font-size: 16px;
  padding: 15px 18px 15px 48px;
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 12px;
  background: rgba(255, 255, 255, .1); color: #fff;
  backdrop-filter: blur(6px);
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.hero-search input::placeholder { color: rgba(214, 236, 247, .6); }
.hero-search input:focus {
  outline: none; background: rgba(255, 255, 255, .17);
  border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0, 188, 235, .22);
}
.hero-search .icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: rgba(214, 236, 247, .75); display: flex; pointer-events: none;
}
.hero-search .results { color: var(--ink); }

/* ---------------------------------------------------------- sections */
.section { padding: 46px 0 10px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}
.section-head h2 {
  margin: 0; font-size: 21px; letter-spacing: -.02em; font-weight: 700;
}
.section-head .sub { color: var(--muted); font-size: 14px; }

/* ---------------------------------------------------------- cards */
.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
}
.card {
  position: relative; display: block;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
  color: var(--ink); overflow: hidden;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--c, var(--accent)); opacity: .85;
}
.card:hover {
  text-decoration: none; transform: translateY(-3px);
  box-shadow: var(--shadow); border-color: var(--line-2);
}
.card .top { display: flex; align-items: center; gap: 11px; margin-bottom: 9px; }
.card .badge {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 750; color: #fff; letter-spacing: -.02em;
  background: var(--c, var(--brand));
}
.card h3 { margin: 0; font-size: 15.5px; font-weight: 680; letter-spacing: -.01em; }
.card .count {
  margin-left: auto; font-size: 12px; font-weight: 650; color: var(--muted);
  background: var(--bg-sunk); padding: 3px 9px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.card p { margin: 0 0 4px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.card .go {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 12px; font-size: 13px; font-weight: 650; color: var(--brand-2);
}
.card:hover .go { gap: 9px; }
.card .go svg { transition: transform .16s; }

/* ---------------------------------------------------------- lists */
.list { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 17px; background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--ink); transition: border-color .14s, background .14s, transform .14s;
}
.row:hover {
  text-decoration: none; background: var(--accent-soft);
  border-color: rgba(0, 188, 235, .45); transform: translateX(2px);
}
.row .idx {
  font-family: var(--mono); font-size: 12px; color: var(--faint);
  min-width: 30px; font-variant-numeric: tabular-nums;
}
.row .t { font-size: 14.5px; font-weight: 560; line-height: 1.45; flex: 1; }
.row .arrow { color: var(--faint); flex: none; display: flex; }
.row:hover .arrow { color: var(--accent); }

/* ---------------------------------------------------------- article */
.crumbs {
  font-size: 13px; color: var(--muted); padding: 22px 0 0;
  display: flex; gap: 7px; align-items: center; flex-wrap: wrap;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand-2); }
.crumbs .sep { color: var(--line-2); }

.article-head { padding: 16px 0 8px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.article-head h1 {
  margin: 0 0 14px; font-size: clamp(24px, 3.2vw, 33px);
  line-height: 1.22; letter-spacing: -.028em; font-weight: 730;
}
.meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 13px; color: var(--muted); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-sunk); color: var(--ink-2);
  padding: 4px 11px; border-radius: 999px; font-weight: 600; font-size: 12.5px;
}
.chip.accent { background: var(--accent-soft); color: #046b8c; }
.src-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 560; }

/* ---------------------------------------------------------- prose */
.prose { font-size: 16.5px; line-height: 1.74; color: var(--ink-2); }
.prose > *:first-child { margin-top: 0; }

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5 {
  color: var(--ink); letter-spacing: -.02em; font-weight: 700;
  line-height: 1.3; scroll-margin-top: calc(var(--header-h) + 18px);
}
.prose h1 { font-size: 1.6em; margin: 1.9em 0 .7em; }
.prose h2 { font-size: 1.34em; margin: 1.85em 0 .65em; padding-bottom: .35em; border-bottom: 1px solid var(--line); }
.prose h3 { font-size: 1.14em; margin: 1.6em 0 .55em; }
.prose h4 { font-size: 1.02em; margin: 1.4em 0 .5em; color: var(--ink-2); }
.prose h5, .prose h6 { font-size: .96em; margin: 1.3em 0 .45em; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

.prose p { margin: 0 0 1.05em; }
.prose strong { color: var(--ink); font-weight: 680; }
.prose em { color: var(--ink-2); }

.prose ul, .prose ol { margin: 0 0 1.15em; padding-left: 1.35em; }
.prose li { margin: .34em 0; }
.prose li::marker { color: var(--brand-2); font-weight: 650; }
.prose li > ul, .prose li > ol { margin: .3em 0 .5em; }

.prose blockquote {
  margin: 1.3em 0; padding: 2px 0 2px 18px;
  border-left: 3px solid var(--accent); color: var(--muted);
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

.prose code {
  font-family: var(--mono); font-size: .875em;
  background: var(--bg-sunk); padding: .16em .45em; border-radius: 5px;
  color: #b3261e; border: 1px solid var(--line);
}
.prose pre {
  background: #0d1b2a; color: #dbe7f0; padding: 16px 18px;
  border-radius: 11px; overflow-x: auto; margin: 1.3em 0;
  box-shadow: var(--shadow); position: relative;
}
.prose pre code {
  background: none; border: 0; color: inherit; padding: 0;
  font-size: 13.5px; line-height: 1.62; display: block; white-space: pre;
}
.prose pre::-webkit-scrollbar { height: 9px; }
.prose pre::-webkit-scrollbar-thumb { background: #2c4258; border-radius: 9px; }

/* tables */
.prose table {
  display: block; width: 100%; border-collapse: collapse;
  margin: 1.4em 0; font-size: 14.5px; overflow-x: auto;
  border: 1px solid var(--line); border-radius: 10px;
}
.prose thead th {
  background: var(--bg-soft); color: var(--ink);
  font-weight: 680; text-align: left; padding: 10px 14px;
  border-bottom: 2px solid var(--line-2); white-space: nowrap;
}
.prose tbody td { padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody tr:nth-child(even) { background: #fafcfd; }

/* images — inline topologies etc. */
.prose img, .prose a > img {
  display: block; max-width: 100%; height: auto;
  margin: 1.5em auto; border-radius: 10px;
  border: 1px solid var(--line-2); background: #fff;
  box-shadow: var(--shadow); cursor: zoom-in;
  transition: box-shadow .16s, transform .16s;
}
.prose a > img { margin: 1.5em auto; }
.prose img:hover { box-shadow: var(--shadow-lg); }
.prose p > img:only-child { margin-block: 1.6em; }
.prose figure { margin: 1.6em 0; text-align: center; }
.prose figcaption {
  font-size: 13px; color: var(--muted); margin-top: 9px;
  font-style: italic; text-align: center;
}

/* exam-answer callouts */
.prose p.is-answer {
  background: var(--ok-soft); border: 1px solid #bfe6d5;
  border-left: 3px solid var(--ok); border-radius: 9px;
  padding: 9px 14px; color: #0a5c3f; font-weight: 600;
}
.prose p.is-answer strong { color: #0a5c3f; }
.prose p.is-explain {
  background: var(--note-soft); border: 1px solid #cfe2fb;
  border-left: 3px solid var(--brand-2); border-radius: 9px;
  padding: 11px 15px; color: var(--ink-2);
}
.prose p.is-explain strong { color: var(--brand); }

/* article footer nav */
.article-foot {
  margin-top: 46px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; font-size: 14px; font-weight: 620;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink-2);
  transition: background .14s, border-color .14s, transform .14s;
}
.btn:hover { background: var(--bg-soft); border-color: var(--line-2); text-decoration: none; transform: translateY(-1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); border-color: var(--brand-2); }

/* ---------------------------------------------------------- page head */
.page-head {
  padding: 34px 0 24px; border-bottom: 1px solid var(--line); margin-bottom: 26px;
}
.page-head h1 {
  margin: 8px 0 8px; font-size: clamp(25px, 3.4vw, 34px);
  letter-spacing: -.03em; font-weight: 740; line-height: 1.18;
}
.page-head p { margin: 0; color: var(--muted); max-width: 68ch; font-size: 15.5px; }
.page-head .bar { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-top: 15px; }

.filter {
  position: relative; margin-top: 18px; max-width: 440px;
}
.filter input {
  width: 100%; font: inherit; font-size: 14.5px;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--bg-soft); color: var(--ink);
}
.filter input:focus {
  outline: none; background: #fff; border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 188, 235, .15);
}
.filter .icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--faint); display: flex; pointer-events: none;
}
.no-match { padding: 40px 0; text-align: center; color: var(--muted); display: none; }
.no-match.show { display: block; }

/* ---------------------------------------------------------- footer */
.site-footer {
  margin-top: 70px; padding: 30px 0;
  border-top: 1px solid var(--line); background: var(--bg-soft);
  font-size: 13.5px; color: var(--muted);
}
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--brand-2); }

/* ---------------------------------------------------------- lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(4, 12, 20, .93);
  display: none; align-items: center; justify-content: center;
  padding: 26px; cursor: zoom-out;
  backdrop-filter: blur(5px);
}
.lightbox.open { display: flex; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox img {
  max-width: 100%; max-height: 100%;
  border-radius: 8px; background: #fff;
  box-shadow: 0 30px 90px -20px rgba(0, 0, 0, .8);
}
.lightbox .close {
  position: absolute; top: 18px; right: 22px;
  color: #fff; font-size: 26px; line-height: 1;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .12); border: 0; cursor: pointer;
}
.lightbox .close:hover { background: rgba(255, 255, 255, .24); }
.lightbox .cap {
  position: absolute; bottom: 18px; left: 0; right: 0; text-align: center;
  color: rgba(255, 255, 255, .75); font-size: 13px; padding: 0 60px;
}

/* ---------------------------------------------------------- misc */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 50;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--brand); color: #fff; border: 0; cursor: pointer;
  display: grid; place-items: center; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--brand-2); }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------------------------------------------------------- responsive */
@media (max-width: 860px) {
  .nav { display: none; }
  .search { flex: 1; min-width: 0; }
  .search kbd { display: none; }
  .hero { padding: 44px 0 48px; }
  .stats { gap: 24px; }
  .prose { font-size: 16px; }
  .prose table { font-size: 13.5px; }
  .wrap, .wrap-narrow { width: min(100% - 32px, 1180px); }
}
@media (max-width: 520px) {
  .brand span.txt { display: none; }
  .stats { gap: 18px 26px; }
  .stat .n { font-size: 22px; }
}

@media print {
  .site-header, .site-footer, .to-top, .article-foot, .filter, .lightbox { display: none !important; }
  .prose img { box-shadow: none; }
  body { font-size: 12pt; }
}
