:root {
  --navy: #1A2E4A;
  --navy-soft: #2a3f5f;
  --blue: #2979FF;
  --blue-dark: #1e5fcc;
  --blue-soft: #E7F1FF;
  --bg: #F5F7FB;
  --card: #FFFFFF;
  --text: #1A2E4A;
  --text-muted: #5B6B82;
  --border: #E2E7EF;
  --tip-bg: #FFF8E6;
  --tip-border: #F5C842;
  --tip-label: #8B6914;
  --warn-bg: #FDECEC;
  --warn-border: #E05A5A;
  --warn-label: #A33333;
  --shadow: 0 2px 12px rgba(26, 46, 74, 0.06);
  --header-h: 60px;
}

* { box-sizing: border-box; }

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

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Header */
.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding-top: env(safe-area-inset-top);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo { height: 30px; width: auto; display: block; }

.brand-divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.25);
}

.brand-label {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang-switch {
  display: flex;
  gap: 2px;
  background: rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 3px;
  flex-shrink: 0;
}

.lang-btn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.75);
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  min-width: 32px;
}
.lang-btn:hover { color: #fff; }
.lang-btn.active { background: #fff; color: var(--navy); }

/* Layout */
.layout {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0 24px;
}

.page { min-width: 0; padding: 28px 0 0; }

/* Table of contents */
.toc { display: none; }

.toc-inner {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: 28px 0 24px;
}

.toc-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-left: 12px;
}

.toc-list { display: flex; flex-direction: column; gap: 1px; }

.toc-link {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--text-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: background 0.15s, color 0.15s;
}
.toc-link:hover { background: rgba(41,121,255,0.07); color: var(--navy); }
.toc-link.active {
  background: var(--blue-soft);
  color: var(--navy);
  font-weight: 600;
  border-left-color: var(--blue);
}
.toc-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
  flex-shrink: 0;
  min-width: 13px;
}

/* Hero */
.hero { margin-bottom: 26px; }

.hero-kicker {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
}

.hero-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 12px;
  letter-spacing: -0.4px;
  line-height: 1.2;
}

.hero-intro {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
  max-width: 62ch;
}

.hero-note {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 12px 0 0;
  padding-left: 12px;
  border-left: 2px solid var(--border);
  max-width: 62ch;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 13px;
  color: var(--text-muted);
}
.meta-chip strong { color: var(--navy); font-weight: 600; }

/* Sections */
.sections { display: flex; flex-direction: column; gap: 16px; }

.manual-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px 20px;
  box-shadow: var(--shadow);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

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

.section-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
  line-height: 1.3;
}

.section-body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
  max-width: 68ch;
}

.section-body a, .steps a, .section-bullets a, .field-desc a, .tip a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(41, 121, 255, 0.3);
}
.section-body a:hover { border-bottom-color: var(--blue); }

.section-body strong, .steps strong, .section-bullets strong, .tip strong {
  color: var(--navy);
  font-weight: 600;
}

/* Numbered steps */
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 34px;
  font-size: 15px;
  line-height: 1.6;
  max-width: 66ch;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 700;
}

/* Bullets */
.section-bullets {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.section-bullets li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  line-height: 1.55;
  max-width: 66ch;
}

.section-bullets li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 6px;
  height: 6px;
  background: var(--blue);
  border-radius: 50%;
}

/* Field reference list */
.fields {
  margin: 16px 0 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.field-row {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.field-row:last-child { border-bottom: none; }
.field-row:nth-child(odd) { background: #FBFCFE; }

.field-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}

.field-desc {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
}

/* Screenshot */
.shot {
  margin: 18px 0 0;
  padding: 0;
}

.shot a {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.shot a:hover {
  border-color: var(--blue);
  box-shadow: 0 2px 14px rgba(41, 121, 255, 0.18);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}

.shot figcaption {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

.shot figcaption strong { color: var(--navy); font-weight: 600; }

/* Sub-heading inside a section */
.sub-head {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin: 22px 0 9px;
}

/* Callouts */
.tip, .warn {
  margin-top: 16px;
  border-radius: 8px;
  padding: 12px 15px;
  font-size: 14.5px;
  line-height: 1.55;
  max-width: 68ch;
}

.tip { background: var(--tip-bg); border-left: 3px solid var(--tip-border); }
.warn { background: var(--warn-bg); border-left: 3px solid var(--warn-border); }

.tip-label, .warn-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  margin-bottom: 3px;
}
.tip-label { color: var(--tip-label); }
.warn-label { color: var(--warn-label); }

/* UI element reference, e.g. a button name */
.ui {
  display: inline-block;
  background: var(--blue-soft);
  color: var(--blue-dark);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 0.92em;
  font-weight: 600;
  white-space: nowrap;
}

/* Support + footer */
.support-card {
  background: var(--navy);
  color: #fff;
  border-radius: 14px;
  padding: 24px;
  margin-top: 28px;
  text-align: center;
}

.support-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.support-body { font-size: 14.5px; line-height: 1.55; color: rgba(255,255,255,0.85); }
.support-body a { color: #fff; font-weight: 600; }

.site-footer {
  padding: 20px 0 calc(24px + env(safe-area-inset-bottom));
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* Desktop */
@media (min-width: 900px) {
  .layout { grid-template-columns: 250px 1fr; gap: 36px; }
  .toc { display: block; }
  .hero-title { font-size: 34px; }
}

/* Small phones */
@media (max-width: 480px) {
  .header-inner { padding: 12px 16px; }
  .brand-divider, .brand-label { display: none; }
  .layout { padding: 0 16px; }
  .hero-title { font-size: 25px; }
  .manual-section { padding: 18px 17px; border-radius: 12px; }
  .section-num { width: 27px; height: 27px; font-size: 12px; }
  .section-title { font-size: 17px; }
  .field-row { grid-template-columns: 1fr; gap: 3px; }
}
