/* ==========================================================================
   Tidesy Manual Stylesheet
   Matches the device web page design system (setup wizard + admin panel)
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
  --accent: #0077cc;
  --accent-dk: #005fa3;
  --bg: #f0f4f8;
  --card: #ffffff;
  --border: #d0d7e0;
  --fg: #1a2332;
  --fg2: #6b7a8d;
  --red: #c0392b;
  --red-dk: #922b21;
  --grn: #27ae60;
  --grn-dk: #1d8348;
  --blu: #0077cc;
  --blu-dk: #005fa3;
  --org: #e67e22;
  --org-dk: #ca6f1e;
  --radius: 10px;
  --ok: #155724;
  --ok-bg: #d4edda;
  --fail: #721c24;
  --fail-bg: #f8d7da;
  --warn: #856404;
  --warn-bg: #fff3cd;
  --nav-height: 56px;
  --gradient: linear-gradient(135deg, #2a3f5f, #1e5f3a);
  --gradient-dk: linear-gradient(135deg, #1a2d45, #0f3d2e);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  margin: 0;
  padding: 0;
  font-size: 16px;
  line-height: 1.65;
}

/* ---------- Nav Bar ---------- */
.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--gradient);
  color: #fff;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.nav-brand {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-menu a {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: background 0.15s;
  white-space: nowrap;
}

.nav-menu a:hover {
  background: rgba(255, 255, 255, 0.28);
}

.nav-hamburger {
  display: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Main Container ---------- */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 16px) 16px 40px;
}

/* ---------- Section Cards ---------- */
.section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
  padding: 24px 28px;
  margin-bottom: 20px;
}

/* ---------- Section Headers ---------- */
.section-header {
  background: var(--gradient);
  color: #fff;
  padding: 14px 20px;
  border-radius: 8px;
  margin: 32px 0 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.section-header h2 {
  margin: 0;
  font-size: 1.3em;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #fff;
}

.section-header p {
  margin: 4px 0 0;
  font-size: 0.85em;
  opacity: 0.8;
}

.section-header-green {
  background: linear-gradient(135deg, #1e5f3a, #2a3f5f);
}

/* Part headers (Quick Setup, Detailed Manual) */
.part-header {
  background: var(--gradient-dk);
  color: #fff;
  padding: 20px 24px;
  border-radius: 10px;
  margin: 40px 0 20px;
  text-align: center;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 18px;
}

.part-header-logo {
  height: 56px;
  width: auto;
  flex-shrink: 0;
  border-radius: 8px;
}

.part-header h1 {
  margin: 0;
  font-size: 1.6em;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  text-align: left;
}

.part-header p {
  margin: 6px 0 0;
  font-size: 0.9em;
  opacity: 0.8;
  text-align: left;
}

/* ---------- Typography ---------- */
h1 { font-size: 1.6em; color: var(--fg); margin: 0 0 12px; }
h2 { font-size: 1.35em; color: var(--fg); margin: 24px 0 12px; }
h3 { font-size: 1.15em; color: var(--fg); margin: 20px 0 10px; }
h4 { font-size: 1.0em; color: var(--fg2); margin: 16px 0 8px; font-weight: 700; }
p { margin: 8px 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dk); text-decoration: underline; }

/* ---------- Disclaimer Banner ---------- */
.disclaimer-banner {
  background: #b71c1c;
  color: #fff;
  text-align: center;
  font-size: 0.88em;
  padding: 14px 20px;
  line-height: 1.6;
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  margin-bottom: 20px;
}

.disclaimer-banner strong {
  display: block;
  font-size: 1.1em;
  margin-bottom: 4px;
}

/* Warning / info banner (amber) */
.warning-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fffbea;
  border-left: 5px solid #f0a500;
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.65;
  color: #4a3500;
  margin-bottom: 16px;
}

.warning-banner strong { color: #b7420a; }

/* Success banner */
.success-banner {
  background: var(--ok-bg);
  color: var(--ok);
  border-left: 5px solid var(--grn);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 16px;
  font-weight: 600;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  text-align: center;
}

.btn:hover { text-decoration: none; }
.btn-blue { background: var(--blu); color: #fff; }
.btn-blue:hover { background: var(--blu-dk); color: #fff; }
.btn-green { background: var(--grn); color: #fff; }
.btn-green:hover { background: var(--grn-dk); color: #fff; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dk); color: #fff; }
.btn-orange { background: var(--org); color: #fff; }
.btn-orange:hover { background: var(--org-dk); color: #fff; }
.btn-gradient {
  background: var(--gradient);
  color: #fff;
}

/* ---------- Tables ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 14px;
}

th, td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}

th {
  background: #eef2f7;
  color: var(--fg);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

tr:nth-child(even) { background: #f8fafc; }
tr:hover { background: #eef2f7; }

/* Comparison table (model grid) */
.model-table th {
  background: var(--gradient);
  color: #fff;
  text-transform: none;
  font-size: 13px;
  letter-spacing: 0;
}

.model-table td { text-align: center; vertical-align: middle; }
.model-table td:first-child { text-align: left; font-weight: 600; }

/* ---------- Lists ---------- */
ul, ol {
  margin: 8px 0;
  padding-left: 24px;
}

li { margin-bottom: 4px; }

/* Checklist style */
.checklist {
  list-style: none;
  padding-left: 0;
}

.checklist li {
  padding: 6px 0 6px 28px;
  position: relative;
  border-bottom: 1px solid #eef2f7;
}

.checklist li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--grn);
  font-weight: 700;
  font-size: 1.1em;
}

.checklist li:last-child { border-bottom: none; }

/* ---------- Step Indicators ---------- */
.steps {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 20px auto;
  max-width: 500px;
}

.step {
  flex: 1;
  text-align: center;
  font-size: 0.75em;
  font-weight: 600;
  color: #aaa;
  position: relative;
}

.step::before {
  content: attr(data-n);
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ddd;
  color: #888;
  line-height: 32px;
  margin: 0 auto 6px;
  font-size: 1.1em;
}

.step.active::before { background: var(--accent); color: #fff; }
.step.active { color: var(--accent); }
.step.done::before { background: #2e7d32; color: #fff; content: "\2713"; }
.step.done { color: #2e7d32; }

.step + .step::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 50%;
  left: -50%;
  height: 2px;
  background: #ddd;
  z-index: -1;
}

.step.done + .step::after,
.step.active + .step::after { background: #2e7d32; }

/* ---------- Screenshot Placeholders ---------- */
.screenshot-placeholder {
  background: #f8fafc;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 16px 0;
}

.screenshot-placeholder pre {
  background: #1a2332;
  color: #e0e8f0;
  padding: 16px;
  border-radius: 8px;
  font-family: "SF Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  overflow-x: auto;
  margin: 0 0 12px;
  white-space: pre;
}

.callout-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.callout-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
  padding: 3px 0;
}

.callout-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------- Annotated Screenshots ---------- */
.screenshot-annotated {
  position: relative;
  display: inline-block;
  max-width: 100%;
  margin: 16px 0;
}
.screenshot-annotated img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.callout-pin {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
}

/* ---------- Phone Frame ---------- */
.phone-frame {
  display: inline-block;
  background: #1a1a1a;
  border-radius: 32px;
  padding: 12px 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  max-width: 280px;
}
.phone-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
}
.phone-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin: 16px 0;
}
.phone-gallery .phone-frame { max-width: 240px; }
.phone-gallery figcaption {
  text-align: center;
  font-size: 12px;
  color: var(--fg2);
  margin-top: 8px;
}

/* ---------- Device Badge Illustrations ---------- */
.badge-illustration {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  vertical-align: middle;
}
.badge-illustration.badge-dst { background: #cc0000; }
.badge-illustration.badge-scr { background: #006400; }
.badge-illustration.badge-alert-severe { background: #cc0000; }
.badge-illustration.badge-alert-minor { background: #8B6914; }
.badge-illustration.badge-countdown { background: #333; font-family: monospace; }

/* ---------- Model Badges ---------- */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  vertical-align: middle;
}

.badge-l { background: #2a3f5f; color: #fff; }
.badge-m { background: #1e5f3a; color: #fff; }
.badge-s { background: var(--accent); color: #fff; }
.badge-sp { background: var(--org); color: #fff; }
.badge-ink { background: #333; color: #fff; }
.badge-all { background: #eef2f7; color: var(--fg); border: 1px solid var(--border); }

/* ---------- Severity Colors ---------- */
.sev-extreme { color: #cc0000; }
.sev-severe { color: #ff8c00; }
.sev-moderate { color: #c9a200; }
.sev-minor { color: #a07850; }

.sev-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.sev-badge-extreme { background: #cc0000; }
.sev-badge-severe { background: #ff8c00; }
.sev-badge-moderate { background: #c9a200; color: #1a1200; }
.sev-badge-minor { background: #a07850; }

/* ---------- Alert Card (matches device web dashboard) ---------- */
.alert-card {
  margin: 14px 0;
  border-radius: 8px;
  overflow: hidden;
  border-left: 5px solid #888;
  background: var(--card);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.alert-card.sev-extreme-card { border-left-color: #cc0000; }
.alert-card.sev-severe-card { border-left-color: #ff8c00; }
.alert-card.sev-moderate-card { border-left-color: #c9a200; }
.alert-card.sev-minor-card { border-left-color: #a07850; }

.alert-event-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 700;
  gap: 8px;
  color: #fff;
}

.sev-extreme-card .alert-event-bar { background: #cc0000; }
.sev-severe-card .alert-event-bar { background: #ff8c00; }
.sev-moderate-card .alert-event-bar { background: #c9a200; color: #1a1200; }
.sev-minor-card .alert-event-bar { background: #a07850; }

.alert-event-name { flex: 1; min-width: 0; }

.alert-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 14px;
  padding: 10px 14px;
  font-size: 14px;
}

.alert-meta-lbl {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  color: #fff;
  background: #5a1a1a;
  padding: 2px 8px;
  border-radius: 3px;
  white-space: nowrap;
}

/* ---------- Code / Pre ---------- */
code {
  background: #eef2f7;
  color: #c0392b;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "SF Mono", "Fira Code", Consolas, monospace;
  font-size: 0.9em;
}

pre {
  background: #1a2332;
  color: #e0e8f0;
  padding: 16px;
  border-radius: 8px;
  font-family: "SF Mono", "Fira Code", Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  overflow-x: auto;
  position: relative;
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

/* ---------- Glossary ---------- */
.glossary-list {
  display: grid;
  gap: 0;
}

.glossary-term {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.glossary-term:last-child { border-bottom: none; }

.glossary-term dt {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.95em;
  margin-bottom: 2px;
}

.glossary-term dd {
  margin: 0;
  font-size: 0.9em;
  color: var(--fg2);
  line-height: 1.6;
}

/* ---------- Quick Reference Card ---------- */
.quick-ref-card {
  background: var(--gradient);
  color: #fff;
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 20px 0;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
}

.quick-ref-card h3 {
  color: #fff;
  margin-top: 0;
  font-size: 1.2em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding-bottom: 10px;
}

.quick-ref-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quick-ref-item {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 12px 14px;
}

.quick-ref-item strong {
  display: block;
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
  margin-bottom: 4px;
}

.quick-ref-item span {
  font-size: 0.95em;
  font-weight: 600;
}

.quick-ref-item code {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* ---------- Table of Contents Grid ---------- */
.toc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.toc-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--fg);
  transition: box-shadow 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toc-item:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 119, 204, 0.15);
  text-decoration: none;
  color: var(--fg);
}

.toc-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.toc-label {
  font-size: 14px;
  font-weight: 600;
}

/* ---------- Toggle (for illustrating device toggles) ---------- */
.tog-example {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.tog-track {
  width: 44px;
  height: 24px;
  background: var(--accent);
  border-radius: 24px;
  position: relative;
  flex-shrink: 0;
}

.tog-track::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 23px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.tog-track.off {
  background: #ccc;
}

.tog-track.off::before {
  left: 3px;
}

/* ---------- Search Box ---------- */
#search-box {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 999;
}

#searchInput {
  display: block;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  color: var(--fg);
  outline: none;
  transition: border-color 0.2s;
}

#searchInput:focus { border-color: var(--accent); }

/* ---------- Footer ---------- */
.manual-footer {
  background: var(--gradient-dk);
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  padding: 24px 20px;
  margin-top: 40px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.8;
}

.manual-footer strong {
  display: block;
  color: #fff;
  font-size: 15px;
  margin-bottom: 4px;
}

/* ---------- Misc Utilities ---------- */
.text-muted { color: var(--fg2); }
.text-accent { color: var(--accent); }
.text-red { color: var(--red); }
.text-green { color: var(--grn); }
.text-orange { color: var(--org); }
.text-center { text-align: center; }
.text-small { font-size: 0.85em; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.fw-bold { font-weight: 700; }

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

.inline-icon {
  display: inline-block;
  width: 20px;
  text-align: center;
  font-size: 1.1em;
}

/* Highlight for keyboard shortcuts / keys */
kbd {
  background: #eef2f7;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: "SF Mono", Consolas, monospace;
  font-size: 0.85em;
  box-shadow: 0 1px 0 var(--border);
}

/* Feature comparison icons */
.yes { color: var(--grn); font-weight: 700; }
.no { color: var(--red); font-weight: 700; }
.partial { color: var(--org); font-weight: 700; }

/* Tip / Note boxes */
.tip-box {
  background: #e8f4fd;
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  margin: 12px 0;
  font-size: 14px;
}

.tip-box strong { color: var(--accent); }

.note-box {
  background: var(--warn-bg);
  border-left: 4px solid var(--org);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  margin: 12px 0;
  font-size: 14px;
}

.note-box strong { color: var(--org-dk); }

/* ---------- Responsive ---------- */
@media (max-width: 699px) {
  .nav-bar { padding: 0 12px; }

  .nav-menu {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: #1a2d45;
    flex-direction: column;
    padding: 8px 12px;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .nav-menu.open { display: flex; }

  .nav-menu a {
    width: 100%;
    text-align: center;
    padding: 11px 12px;
    font-size: 14px;
  }

  .nav-hamburger { display: inline-block; }

  .container { padding-top: calc(var(--nav-height) + 8px); padding-left: 10px; padding-right: 10px; }

  .section { padding: 16px 14px; }
  .section-header { padding: 12px 14px; }
  .part-header { padding: 16px 18px; }
  .part-header h1 { font-size: 1.3em; }

  .toc-grid { grid-template-columns: 1fr; }
  .quick-ref-grid { grid-template-columns: 1fr; }

  table { font-size: 12px; }
  th, td { padding: 6px 8px; }

  .screenshot-placeholder pre { font-size: 11px; padding: 10px; }

  .model-table { display: block; overflow-x: auto; }
}

@media (min-width: 700px) and (max-width: 1023px) {
  .container { padding-left: 14px; padding-right: 14px; }
}

@media (min-width: 1024px) {
  .container { padding-left: 20px; padding-right: 20px; }
}

/* ---------- Print Styles ---------- */
@media print {
  .nav-bar,
  #search-box,
  .nav-hamburger { display: none !important; }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .container {
    max-width: 100%;
    padding-top: 0;
  }

  .section {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }

  .section-header,
  .part-header {
    background: #333 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .quick-ref-card {
    background: #333 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .screenshot-placeholder pre {
    background: #eee !important;
    color: #000 !important;
    border: 1px solid #ccc;
  }

  .disclaimer-banner {
    background: #eee !important;
    color: #000 !important;
    border: 2px solid #c00;
  }

  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #666; }

  .manual-footer {
    background: #eee !important;
    color: #333 !important;
  }
}

/* ---------- UI Mockups (replacing ASCII art) ---------- */
.ui-mockup {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0;
  max-width: 500px;
  font-size: 14px;
}
.ui-mockup .mockup-title {
  background: var(--gradient);
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px 8px 0 0;
  margin: -20px -20px 16px;
  font-weight: 700;
  text-align: center;
  font-size: 16px;
}
.ui-mockup .mock-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}
.ui-mockup .mock-label {
  font-weight: 600;
  min-width: 100px;
  font-size: 13px;
}
.ui-mockup .mock-input {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8fafc;
  font-size: 13px;
  color: var(--fg2);
}
.ui-mockup .mock-select {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8fafc;
  font-size: 13px;
  color: var(--fg);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%236b7a8d' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}
.ui-mockup .mock-btn {
  display: inline-block;
  padding: 8px 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  text-align: center;
  cursor: default;
}
.ui-mockup .mock-btn-green {
  background: var(--grn);
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 16px;
  text-align: center;
}
.ui-mockup .mock-success {
  color: var(--grn);
  font-size: 13px;
  margin: 6px 0;
}
.ui-mockup .mock-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 12px 0;
}
.ui-mockup .mock-section h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--fg);
}
.ui-mockup .mock-results {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin: 8px 0;
  overflow: hidden;
}
.ui-mockup .mock-results div {
  padding: 7px 12px;
  border-bottom: 1px solid #eee;
  font-size: 13px;
}
.ui-mockup .mock-results div:last-child { border-bottom: none; }
.ui-mockup .mock-results div.selected {
  background: #e8f4fd;
  font-weight: 600;
}
.ui-mockup .mock-banner {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  margin: 8px 0;
}
.ui-mockup .mock-banner-ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.ui-mockup .mock-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.ui-mockup .mock-toggle-track {
  display: inline-block;
  width: 36px;
  height: 20px;
  background: var(--grn);
  border-radius: 10px;
  position: relative;
}
.ui-mockup .mock-toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
}
.ui-mockup .mock-steps {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 0 0 16px;
}
.ui-mockup .mock-step {
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg2);
  border-bottom: 3px solid var(--border);
}
.ui-mockup .mock-step.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.ui-mockup .mock-step.done {
  color: var(--grn);
  border-bottom-color: var(--grn);
}
.ui-mockup .mock-station-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  font-size: 13px;
}
.ui-mockup .mock-station-slot .mock-input { max-width: 90px; text-align: center; }
.ui-mockup .mock-station-slot span { color: var(--fg2); }

/* Device back panel diagram */
.device-back {
  background: #2a3f5f;
  color: #e0e8f0;
  border-radius: 14px;
  padding: 20px 24px;
  margin: 16px 0;
  max-width: 480px;
  font-size: 14px;
}
.device-back .db-title {
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #8899aa;
  margin-bottom: 16px;
}
.device-back .db-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.device-back .db-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
}
.device-back .db-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}
.device-back .db-icon {
  font-size: 18px;
}

/* WiFi list mockup */
.wifi-mockup {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  max-width: 340px;
  margin: 16px 0;
  overflow: hidden;
  font-size: 14px;
}
.wifi-mockup .wm-header {
  padding: 12px 16px;
  font-weight: 700;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}
.wifi-mockup .wm-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid #f0f0f0;
}
.wifi-mockup .wm-item:last-child { border-bottom: none; }
.wifi-mockup .wm-item.wm-highlight {
  background: #e8f4fd;
  font-weight: 600;
}
.wifi-mockup .wm-signal { color: var(--fg2); font-size: 13px; }
.wifi-mockup .wm-note {
  padding: 10px 16px;
  background: #f0f8ff;
  font-size: 13px;
  color: var(--accent-dk);
  border-top: 1px solid var(--border);
}
