/* Pulse Monitor online manual - styled after www.pulsemonitor.net (Manrope, blue accent, white bar, dark footer). */
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --primary: #3072e0; --primary-dark: #123fb8; --link: #2f6fdd;
  --text: #4a4a4a; --heading: #2b2b2b; --muted: #6c7480; --line: #e4e8ef; --panel: #f5f7fb;
  --dark: #1c2230; --green: #4caf50; --orange: #fa8c16; --red: #f5222d;
  --radius: 14px; --header-h: 66px;
  --font: "Manrope", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); font-size: 1rem; line-height: 1.65; background: #fff; -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 1030; background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.header-row { display: flex; align-items: center; gap: 18px; height: var(--header-h); }
.brand img { display: block; height: 34px; width: auto; }
.header-title { color: var(--heading); font-weight: 700; padding-left: 18px; border-left: 1px solid var(--line); line-height: 1.2; }
.header-title:hover { color: var(--primary); }
.back-link { margin-left: auto; color: var(--primary); font-weight: 600; padding: 8px 16px; border: 1px solid #cfdcf6; border-radius: 999px; white-space: nowrap; }
.back-link:hover { background: #eef3fd; color: var(--primary-dark); }
@media (max-width: 640px) {
  .brand img { height: 28px; }
  .header-title { display: none; }
  .back-link { padding: 6px 12px; font-size: .9rem; }
}

/* ---------- page band ---------- */
.page-band { background: linear-gradient(120deg, #141a28 0%, #1f2a44 60%, #26365c 100%); color: #fff; padding: 44px 0 40px; position: relative; }
.page-band::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--green) 0 33.3%, var(--orange) 33.3% 66.6%, var(--red) 66.6%); }
.page-band h1 { margin: 0; font-size: clamp(1.9rem, 1.35rem + 2.3vw, 2.55rem); line-height: 1.15; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: #8fb3f5; margin-bottom: 8px; }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 44px; padding-top: 34px; padding-bottom: 40px; align-items: start; }
.sidebar { position: sticky; top: calc(var(--header-h) + 18px); max-height: calc(100vh - var(--header-h) - 36px); overflow: auto; padding-right: 4px; }
.side-toggle { display: none; }
.chapters { list-style: none; margin: 0; padding: 0; }
.nav-chapter { display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; border-radius: 10px; color: #3f4657; font-weight: 500; line-height: 1.35; }
.nav-chapter .num { flex: 0 0 24px; color: var(--muted); font-weight: 700; font-size: .9rem; text-align: right; }
.nav-chapter:hover { background: var(--panel); color: var(--primary); }
.nav-chapter.active { background: #eef3fd; color: var(--primary); font-weight: 700; }
.nav-chapter.active .num { color: var(--primary); }

.search { position: relative; margin-bottom: 14px; }
.search input { width: 100%; padding: 11px 14px 11px 40px; border: 1px solid #d5dbe6; border-radius: 12px; font: inherit; font-size: .95rem; color: var(--text); background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236c7480' stroke-width='2.2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M20 20l-3.5-3.5'/></svg>") no-repeat 13px center; }
.search input:focus { outline: 2px solid rgba(48,114,224,.35); border-color: var(--primary); }
.search-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 34px rgba(20,30,60,.16); z-index: 50; max-height: 70vh; overflow: auto; }
.search-results a { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--text); }
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover, .search-results a.sel { background: var(--panel); }
.search-results .r-title { font-weight: 700; color: var(--heading); font-size: .95rem; }
.search-results .r-page { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.search-results .r-snip { font-size: .85rem; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.search-results mark { background: #fff1b8; color: inherit; border-radius: 3px; padding: 0 1px; }
.search-results .r-none { padding: 14px; color: var(--muted); }

@media (max-width: 991px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-top: 18px; }
  .sidebar { position: static; max-height: none; overflow: visible; padding: 0; }
  .side-toggle { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font: inherit; font-weight: 700; color: var(--heading); cursor: pointer; }
  .side-toggle svg { transition: transform .2s; } .side-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .side-list { display: none; margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
  .side-list.open { display: block; }
}

/* ---------- content ---------- */
.content { min-width: 0; max-width: 860px; }
.page-toc { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 22px 14px; margin: 0 0 30px; }
.page-toc-title { font-weight: 700; color: var(--heading); text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; margin-bottom: 8px; }
.page-toc ol { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 28px; }
.page-toc li { break-inside: avoid; padding: 3px 0; line-height: 1.4; }
.page-toc .header-section-number { color: var(--muted); font-weight: 700; margin-right: 8px; }
@media (max-width: 700px) { .page-toc ol { columns: 1; } }

.manual-body h2, .manual-body h3, .manual-body h4 { color: var(--heading); font-weight: 700; letter-spacing: -.01em; line-height: 1.25; position: relative; }
.manual-body h2 { font-size: 1.45rem; margin: 2.2em 0 .7em; padding-top: .3em; }
.manual-body > section:first-child > h2:first-child, .manual-body > p:first-child { margin-top: 0; }
.manual-body h3 { font-size: 1.15rem; margin: 1.8em 0 .5em; }
.manual-body h4 { font-size: 1rem; margin: 1.4em 0 .4em; color: var(--muted); }
.header-section-number { margin-right: .5em; color: var(--muted); font-weight: 700; }
.anchor { margin-left: .4em; opacity: 0; font-weight: 400; color: var(--primary); }
h2:hover .anchor, h3:hover .anchor, h4:hover .anchor, .anchor:focus { opacity: 1; }
.manual-body p { margin: 0 0 1em; }
.manual-body ul, .manual-body ol { margin: 0 0 1em; padding-left: 1.5em; }
.manual-body li { margin-bottom: .35em; }
.manual-body strong { color: #2f2f2f; font-weight: 700; }
code { font-family: Consolas, "Cascadia Mono", monospace; font-size: .88em; background: #eef1f6; padding: .1em .4em; border-radius: 5px; color: #333; }
pre { background: #eef1f6; padding: 12px 16px; border-radius: 10px; overflow-x: auto; }
pre code { background: none; padding: 0; }
dt { font-weight: 700; color: var(--heading); margin-top: .8em; } dd { margin: 0 0 .4em 1.2em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
math { font-size: 1.1em; }

.table-wrap { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: .94rem; }
th { background: var(--dark); color: #fff; text-align: left; padding: 10px 14px; font-weight: 600; white-space: nowrap; }
td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
tbody tr:nth-child(even) td { background: #fafbfd; }

figure { margin: 1.6em 0; text-align: center; }
figure img { border-radius: 12px; cursor: zoom-in; }
figure img.screen { border: 1px solid var(--line); box-shadow: 0 6px 22px rgba(20,30,60,.10); }
figure.diagram img { cursor: default; }
figcaption { font-size: .86rem; color: var(--muted); margin-top: 8px; }

/* call-outs */
.tip, .note, .warning { margin: 1.3em 0; padding: 14px 18px 14px 20px; border-radius: 12px; border-left: 5px solid; }
.tip p:last-child, .note p:last-child, .warning p:last-child { margin-bottom: 0; }
.tip::before, .note::before, .warning::before { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 4px; }
.tip { background: #eef8ef; border-color: var(--green); } .tip::before { content: "Tip"; color: #2e7d32; }
.note { background: #eef3ff; border-color: var(--primary); } .note::before { content: "Note"; color: var(--primary); }
.warning { background: #fff4e6; border-color: var(--orange); } .warning::before { content: "Warning"; color: #c25e00; }
ul.task-list { list-style: none; padding-left: .2em; } ul.task-list input { margin-right: .6em; }

/* pager */
.pager { display: flex; justify-content: space-between; gap: 14px; margin-top: 3em; padding-top: 1.6em; border-top: 1px solid var(--line); }
.pager a { display: block; flex: 1 1 0; max-width: 48%; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; color: var(--heading); font-weight: 700; line-height: 1.35; }
.pager a:hover { border-color: var(--primary); color: var(--primary); }
.pager a span { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; margin-bottom: 3px; }
.pager-next { text-align: right; margin-left: auto; }
@media (max-width: 600px) { .pager { flex-direction: column; } .pager a { max-width: none; } }

/* landing */
.landing-lead { font-size: 1.15rem; color: var(--text); max-width: 720px; margin-top: 0; }
.landing-actions { margin: 0 0 26px; }
.btn-pdf { display: inline-block; padding: 11px 22px; border-radius: 999px; background: var(--primary); color: #fff; font-weight: 700; }
.btn-pdf:hover { background: var(--primary-dark); color: #fff; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card-chapter { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--text); transition: .15s; position: relative; }
.card-chapter:hover { border-color: var(--primary); box-shadow: 0 8px 24px rgba(48,114,224,.14); transform: translateY(-2px); color: var(--text); }
.card-num { font-weight: 800; color: var(--primary); font-size: .9rem; }
.card-title { font-weight: 700; color: var(--heading); font-size: 1.05rem; line-height: 1.3; }
.card-desc { font-size: .9rem; color: var(--muted); line-height: 1.45; }

/* footer */
.site-footer { background: var(--dark); color: rgba(255,255,255,.72); margin-top: 20px; }
.footer-row { display: flex; justify-content: space-between; gap: 30px; padding-top: 36px; padding-bottom: 26px; flex-wrap: wrap; }
.site-footer .footer-row img { display: block; height: 32px; width: auto; }
.footer-row p { margin: 10px 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: flex-start; }
.site-footer a { color: rgba(255,255,255,.82); } .site-footer a:hover { color: #fff; }
.copyright { border-top: 1px solid rgba(255,255,255,.12); padding: 16px 0; font-size: .88rem; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(10,14,24,.88); display: flex; align-items: center; justify-content: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; background: #fff; }
.lightbox button { position: absolute; top: 14px; right: 18px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }

@media print { .site-header, .sidebar, .site-footer, .pager { display: none; } .layout { display: block; } }
