/* KAPOCS Órarend 2027 – Felhasználói kézikönyv, webes változat.
   The same visual language as the program and the printed book: Inter,
   one teal accent, calm surfaces. Light and dark, phone to wide screen. */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/Inter-Regular.ttf"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("fonts/Inter-Medium.ttf"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("fonts/Inter-SemiBold.ttf"); }

:root {
  --bg: #ffffff;
  --surface: #f7f9fb;
  --surface-2: #f1f5f9;
  --line: #e4e9f0;
  --line-2: #d5dde7;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --teal: #0f766e;
  --teal-2: #14b8a6;
  --teal-soft: #e8f6f3;
  --teal-line: #b9e3dc;
  --blue: #2563eb;
  --blue-soft: #eef4ff;
  --amber: #b45309;
  --amber-line: #f59e0b;
  --amber-soft: #fff7eb;
  --violet: #6d28d9;
  --violet-soft: #f5f1ff;
  --navy: #1e293b;
  --key-bg: #ffffff;
  --shot-ring: #d6dee8;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.08);
  --mark: #fde68a;
  --topbar: 60px;
  --nav: 292px;
  --otp: 232px;
  --measure: 760px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0b1220;
  --surface: #0f172a;
  --surface-2: #131c2e;
  --line: #1f2a3d;
  --line-2: #2a3850;
  --ink: #e6edf5;
  --ink-2: #c3cedb;
  --muted: #8a9ab0;
  --teal: #2dd4bf;
  --teal-2: #2dd4bf;
  --teal-soft: rgba(45, 212, 191, 0.10);
  --teal-line: rgba(45, 212, 191, 0.35);
  --blue: #7aa7ff;
  --blue-soft: rgba(122, 167, 255, 0.10);
  --amber: #fbbf24;
  --amber-line: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.10);
  --violet: #b9a2ff;
  --violet-soft: rgba(185, 162, 255, 0.10);
  --navy: #cbd5e1;
  --key-bg: #131c2e;
  --shot-ring: #2a3850;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px rgba(0, 0, 0, 0.35);
  --mark: rgba(253, 224, 71, 0.35);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220;
    --surface: #0f172a;
    --surface-2: #131c2e;
    --line: #1f2a3d;
    --line-2: #2a3850;
    --ink: #e6edf5;
    --ink-2: #c3cedb;
    --muted: #8a9ab0;
    --teal: #2dd4bf;
    --teal-2: #2dd4bf;
    --teal-soft: rgba(45, 212, 191, 0.10);
    --teal-line: rgba(45, 212, 191, 0.35);
    --blue: #7aa7ff;
    --blue-soft: rgba(122, 167, 255, 0.10);
    --amber: #fbbf24;
    --amber-line: #f59e0b;
    --amber-soft: rgba(245, 158, 11, 0.10);
    --violet: #b9a2ff;
    --violet-soft: rgba(185, 162, 255, 0.10);
    --navy: #cbd5e1;
    --key-bg: #131c2e;
    --shot-ring: #2a3850;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px rgba(0, 0, 0, 0.35);
    --mark: rgba(253, 224, 71, 0.35);
    color-scheme: dark;
  }
}

/* -- base ------------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font: 400 16px/1.7 "Inter", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--teal-2); outline-offset: 2px; border-radius: 6px; }
strong { color: var(--ink); font-weight: 600; }
code {
  font: 500 0.88em/1 "Cascadia Mono", Consolas, monospace;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.12em 0.4em;
  overflow-wrap: anywhere;
}
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--teal); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 12px; }

/* -- top bar ---------------------------------------------------------------------- */

.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar);
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); min-width: 0; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 7px; flex: none; }
.brand-name { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; }
.brand-tag {
  font-size: 12px; font-weight: 500; color: var(--teal);
  background: var(--teal-soft); border: 1px solid var(--teal-line);
  border-radius: 999px; padding: 1px 9px; white-space: nowrap;
}
.search-open {
  margin-left: auto;
  min-width: 0;
  display: flex; align-items: center; gap: 10px;
  width: min(420px, 40vw);
  height: 38px; padding: 0 10px 0 12px;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--surface); color: var(--muted);
  font: inherit; font-size: 14px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.search-open:hover { border-color: var(--teal-line); background: var(--bg); }
.search-open span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-open svg { width: 18px; height: 18px; }
kbd {
  font: 500 12px/1 "Inter", sans-serif;
  color: var(--ink-2);
  background: var(--key-bg);
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 3px 6px;
  white-space: nowrap;
}
.tools { display: flex; flex: none; gap: 4px; margin-left: 8px; }
.tool {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; min-width: 36px; padding: 0 8px;
  border: 0; border-radius: 9px; background: transparent;
  color: var(--ink-2); font: 500 13px/1 "Inter", sans-serif; cursor: pointer;
}
.tool:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.menu-toggle { display: none; }
.theme-toggle .sun {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.8px solid currentColor;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

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

.frame { display: grid; grid-template-columns: minmax(0, 1fr); }
.frame.with-nav { grid-template-columns: var(--nav) minmax(0, 1fr) var(--otp); }
.main { min-width: 0; padding: 40px 48px 64px; outline: none; }
.with-nav .main { max-width: calc(var(--measure) + 96px); width: 100%; justify-self: center; }

/* -- sidebar ---------------------------------------------------------------------------- */

.sidebar {
  position: sticky; top: var(--topbar);
  height: calc(100vh - var(--topbar));
  overflow-y: auto; overscroll-behavior: contain;
  padding: 20px 14px 40px 18px;
  border-right: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px; line-height: 1.4;
  scrollbar-width: thin;
}
.nav-home { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 8px; color: var(--ink-2); border-radius: 8px; font-weight: 500; }
.nav-home:hover { background: var(--surface-2); text-decoration: none; }
.nav-home svg { width: 18px; height: 18px; color: var(--teal); }
.nav-list, .nav-sec { list-style: none; margin: 0; padding: 0; }
.nav-part {
  margin: 18px 10px 6px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}
.nav-ch > a {
  display: flex; gap: 10px; align-items: baseline;
  padding: 6px 10px; border-radius: 8px;
  color: var(--ink-2);
}
.nav-ch > a:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.nav-no { flex: none; width: 20px; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.nav-ch.is-current > a { background: var(--teal-soft); color: var(--teal); font-weight: 600; }
.nav-ch.is-current .nav-no { color: var(--teal); }
.nav-sec { margin: 4px 0 8px 29px; border-left: 1px solid var(--line-2); }
.nav-sec a { display: block; padding: 4px 10px; color: var(--muted); font-size: 13.5px; margin-left: -1px; border-left: 2px solid transparent; }
.nav-sec a:hover { color: var(--ink); text-decoration: none; }
.nav-sec a.is-active { color: var(--teal); border-left-color: var(--teal); }

/* -- on this page -------------------------------------------------------------------------- */

.otp {
  position: sticky; top: var(--topbar);
  align-self: start;
  max-height: calc(100vh - var(--topbar));
  overflow-y: auto;
  padding: 40px 20px 40px 8px;
  font-size: 13px; line-height: 1.4;
}
.otp-title { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.otp ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.otp a { display: flex; gap: 8px; padding: 5px 12px; color: var(--muted); border-left: 2px solid transparent; margin-left: -1px; }
.otp a span { color: var(--muted); opacity: 0.6; font-variant-numeric: tabular-nums; min-width: 30px; }
.otp a:hover { color: var(--ink); text-decoration: none; }
.otp a.is-active { color: var(--teal); border-left-color: var(--teal); }
.otp a.is-active span { color: var(--teal); }

/* -- chapter opener --------------------------------------------------------------------------- */

.opener { margin-bottom: 36px; }
.part-label { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.ch-label { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal); margin-bottom: 8px; }
h1 { margin: 0 0 16px; color: var(--ink); font-size: clamp(30px, 4vw, 42px); line-height: 1.12; letter-spacing: -0.025em; font-weight: 600; }
.lead { margin: 0 0 24px; font-size: 19px; line-height: 1.6; color: var(--ink-2); }
.learn {
  border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 22px 12px; background: var(--surface);
}
.learn-title { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.learn ul { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 32px; }
.learn li { position: relative; padding-left: 18px; margin-bottom: 8px; break-inside: avoid; font-size: 15px; line-height: 1.45; }
.learn li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 7px; height: 7px; border-radius: 50%; background: var(--teal-2); }

/* -- body text ------------------------------------------------------------------------------- */

.body > :first-child { margin-top: 0; }
h2 {
  margin: 56px 0 16px; padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink); font-size: 26px; line-height: 1.25; letter-spacing: -0.015em; font-weight: 600;
}
h2 .sec-no { color: var(--teal); margin-right: 12px; font-variant-numeric: tabular-nums; }
h3 { margin: 34px 0 10px; color: var(--ink); font-size: 19px; line-height: 1.35; font-weight: 600; }
h2, h3 { scroll-margin-top: calc(var(--topbar) + 16px); }
.anchor { opacity: 0; margin-left: 8px; color: var(--muted); font-weight: 400; transition: opacity 0.15s; }
h2:hover .anchor, h3:hover .anchor { opacity: 1; }
p { margin: 0 0 16px; }
.body ul { padding-left: 22px; margin: 0 0 18px; }
.body ul li { margin-bottom: 6px; }
.body ul li::marker { color: var(--teal-2); }
.ui {
  color: var(--ink); font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px; padding: 0.04em 0.4em;
  white-space: nowrap;
}
.keys { white-space: nowrap; }
.plus { margin: 0 3px; color: var(--muted); font-size: 0.85em; }
.xref { font-weight: 500; }
.xref::after { content: " →"; }
.colophon { color: var(--muted); font-size: 14px; }

ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 20px; }
ol.steps > li { counter-increment: step; position: relative; padding-left: 42px; margin-bottom: 12px; min-height: 28px; }
ol.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--teal); color: #fff;
  font: 600 13px/28px "Inter", sans-serif; text-align: center;
}
:root[data-theme="dark"] ol.steps > li::before { color: #062925; }

ul.checklist { list-style: none; padding: 16px 20px 6px; margin: 0 0 22px; border: 1px solid var(--line); border-radius: 14px; }
ul.checklist li { position: relative; padding-left: 32px; margin-bottom: 10px; }
ul.checklist li::before { content: ""; position: absolute; left: 0; top: 0.25em; width: 18px; height: 18px; border: 2px solid var(--teal); border-radius: 5px; }
ul.checklist li.done::before { background: var(--teal) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='m3.5 8.4 3 3 6-6.6'/></svg>") center/80% no-repeat; }
ul.checklist li { cursor: pointer; user-select: none; }
ul.checklist li.done { color: var(--muted); }
ul.checklist li::marker { content: none; }

blockquote { margin: 0 0 20px; padding: 4px 0 4px 20px; border-left: 3px solid var(--teal-2); color: var(--ink-2); font-size: 17px; }

/* -- callouts ------------------------------------------------------------------------------------- */

.callout {
  margin: 24px 0 26px;
  padding: 16px 20px 4px;
  border-radius: 12px;
  border: 1px solid;
  border-left-width: 4px;
  font-size: 15px; line-height: 1.6;
}
.callout-title { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; font-weight: 600; font-size: 14.5px; }
.callout .icon { width: 20px; height: 20px; border-radius: 50%; flex: none; }
.callout.tip { background: var(--teal-soft); border-color: var(--teal-line); border-left-color: var(--teal); }
.callout.tip .callout-title { color: var(--teal); }
.callout.tip .icon { background: var(--teal) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='white' d='M8 2.5a3.6 3.6 0 0 0-2.2 6.4c.4.3.6.8.6 1.2v.4h3.2v-.4c0-.5.2-.9.6-1.2A3.6 3.6 0 0 0 8 2.5Zm-1.6 9.4h3.2v.8a.8.8 0 0 1-.8.8H7.2a.8.8 0 0 1-.8-.8Z'/></svg>") center/76% no-repeat; }
.callout.note { background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 25%, transparent); border-left-color: var(--blue); }
.callout.note .callout-title { color: var(--blue); }
.callout.note .icon { background: var(--blue) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='white' d='M7.2 7h1.6v5H7.2zM8 3.6a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z'/></svg>") center/76% no-repeat; }
.callout.warning { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber-line) 30%, transparent); border-left-color: var(--amber-line); }
.callout.warning .callout-title { color: var(--amber); }
.callout.warning .icon { background: var(--amber-line) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='white' d='M7.2 3.6h1.6v5.6H7.2zM8 10.4a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z'/></svg>") center/76% no-repeat; }
.callout.example { background: var(--violet-soft); border-color: color-mix(in srgb, var(--violet) 22%, transparent); border-left-color: var(--violet); }
.callout.example .callout-title { color: var(--violet); }
.callout.example .icon { background: var(--violet) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='white' d='M4 4h8v1.4H4zm0 3.3h8v1.4H4zm0 3.3h5.4V12H4z'/></svg>") center/76% no-repeat; }
.callout.key { background: var(--surface-2); border-color: var(--line-2); border-left-color: var(--navy); }
.callout.key .callout-title { color: var(--navy); }
.callout.key .icon { background: var(--navy) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='white' d='m8 2 1.8 3.8 4.2.5-3.1 2.9.8 4.1L8 11.3l-3.7 2 .8-4.1L2 6.3l4.2-.5Z'/></svg>") center/76% no-repeat; }
.callout ul { padding-left: 20px; }

/* -- figures --------------------------------------------------------------------------------------- */

figure.shot { margin: 28px 0 32px; }
figure.shot.half { width: min(100%, 520px); }
figure.shot .frame { position: relative; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--shot-ring), var(--shadow); }
figure.shot img { display: block; width: 100%; height: auto; border-radius: 12px; cursor: zoom-in; }
figcaption { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.fig-no { font-weight: 600; color: var(--teal); margin-right: 6px; }
.marker {
  position: absolute; transform: translate(-50%, -50%);
  width: 24px; height: 24px; border-radius: 50%;
  background: #0f766e; color: #fff;
  font: 600 12px/24px "Inter", sans-serif; text-align: center;
  box-shadow: 0 0 0 3px #fff, 0 2px 6px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.marker.after { transform: translate(0, -50%); }
.marker.inline { position: static; display: inline-block; transform: none; width: 21px; height: 21px; line-height: 21px; font-size: 11.5px; box-shadow: none; flex: none; vertical-align: 0.05em; }
.band { position: relative; height: 34px; }
.band .marker { top: 50%; }
.leader { position: absolute; width: 0; border-left: 2px solid #0f766e; transform: translateX(-50%); }
.dot { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #0f766e; box-shadow: 0 0 0 2px #fff; transform: translate(-50%, -50%); }
.hl { position: absolute; border: 3px solid rgba(20, 184, 166, 0.85); border-radius: 8px; }
ol.legend {
  list-style: none; margin: 14px 0 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 28px;
  font-size: 14px; line-height: 1.5;
}
ol.legend li { display: flex; gap: 10px; align-items: flex-start; }

/* -- tables --------------------------------------------------------------------------------------- */

.table-wrap { overflow-x: auto; margin: 18px 0 26px; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
th {
  text-align: left; font-weight: 600; font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--muted); background: var(--surface); padding: 11px 14px; border-bottom: 1px solid var(--line);
}
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 500; color: var(--ink); }
tbody tr:hover td { background: color-mix(in srgb, var(--surface) 70%, transparent); }

/* -- Q&A, columns, diagrams ------------------------------------------------------------------------- */

.qa { border: 1px solid var(--line); border-radius: 12px; margin: 0 0 12px; background: var(--bg); }
.qa .q { cursor: pointer; display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; font-weight: 600; color: var(--ink); }
.qa .q::before { content: "K"; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--teal-soft); color: var(--teal); font-size: 12px; line-height: 22px; text-align: center; }
.qa .q::after { content: ""; margin-left: auto; flex: none; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin-top: 5px; transition: transform 0.15s; }
.qa.open .q::after { transform: rotate(-135deg); margin-top: 9px; }
.qa .a { display: none; padding: 0 18px 4px 52px; font-size: 15px; }
.qa.open .a { display: block; }
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.diagram { margin: 24px 0; }
.diagram svg { width: 100%; height: auto; stroke: none; }

/* -- previous / next ----------------------------------------------------------------------------- */

.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 64px 0 24px; }
.pn {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px;
  color: var(--ink); font-weight: 600; font-size: 15px; line-height: 1.35;
  transition: border-color 0.15s, background 0.15s;
}
.pn:hover { border-color: var(--teal-line); background: var(--surface); text-decoration: none; }
.pn small { display: block; font-weight: 500; font-size: 12.5px; color: var(--muted); margin-bottom: 2px; }
.pn.next { justify-content: flex-end; text-align: right; }
.pn svg { flex: none; color: var(--teal); }
.foot { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }

/* -- start page ------------------------------------------------------------------------------------ */

.page-start .main { max-width: 1180px; width: 100%; margin: 0 auto; padding-top: 56px; }
.hero { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 48px; align-items: center; margin-bottom: 64px; }
.hero-kicker { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); margin-bottom: 12px; }
.hero h1 { font-size: clamp(38px, 5vw, 56px); margin-bottom: 18px; }
.hero-sub { font-size: 19px; line-height: 1.6; margin: 0 0 28px; color: var(--ink-2); }
.hero-search { width: 100%; height: 52px; margin: 0 0 16px; font-size: 16px; border-radius: 12px; background: var(--bg); box-shadow: var(--shadow); }
.hero-link { font-weight: 500; }
.hero-shot { margin: 0; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--shot-ring), var(--shadow); }
.hero-shot img { display: block; width: 100%; height: auto; cursor: zoom-in; }
.start h2, .parts h2 { border: 0; padding: 0; margin: 0 0 18px; font-size: 22px; }
.start-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 56px; }
.start-card { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.start-card:hover { border-color: var(--teal-line); box-shadow: var(--shadow); text-decoration: none; transform: translateY(-1px); }
.start-t { color: var(--ink); font-weight: 600; font-size: 16px; }
.start-d { color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.parts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.part-card { border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px 14px; background: var(--surface); }
.part-card h2 { font-size: 13px !important; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); margin: 0 0 8px !important; }
.part-card p { font-size: 14px; line-height: 1.55; color: var(--muted); margin: 0 0 12px; }
.part-card ol { list-style: none; margin: 0; padding: 0; }
.part-card li a { display: flex; gap: 10px; padding: 5px 0; color: var(--ink-2); font-size: 15px; line-height: 1.4; }
.part-card li a:hover { color: var(--teal); text-decoration: none; }
.pc-no { flex: none; width: 22px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* -- search ---------------------------------------------------------------------------------------- */

.search { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; background: rgba(15, 23, 42, 0.42); backdrop-filter: blur(3px); }
.search[hidden] { display: none; }
.search-box { width: min(720px, 100%); max-height: 76vh; display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35); overflow: hidden; }
.search-field { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.search-field svg { color: var(--teal); flex: none; }
.search-field input { flex: 1; min-width: 0; height: 60px; border: 0; outline: none; background: transparent; color: var(--ink); font: 400 18px/1 "Inter", sans-serif; }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-close { border: 1px solid var(--line-2); border-radius: 6px; background: transparent; color: var(--muted); font: 500 12px/1 "Inter", sans-serif; padding: 5px 7px; cursor: pointer; }
.search-results { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.search-results li a { display: block; padding: 11px 14px; border-radius: 10px; color: var(--ink-2); }
.search-results li a:hover { text-decoration: none; }
.search-results li.is-active a { background: var(--teal-soft); }
.sr-t { display: block; color: var(--ink); font-weight: 600; font-size: 15px; }
.sr-c { display: block; color: var(--teal); font-size: 12.5px; font-weight: 500; margin: 1px 0 4px; }
.sr-x { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.search-empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 15px; }
.search-foot { display: flex; gap: 18px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 12.5px; }
.search-foot kbd { margin-right: 3px; }

/* -- zoom ------------------------------------------------------------------------------------------- */

.zoom { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 28px; background: rgba(8, 12, 22, 0.88); cursor: zoom-out; }
.zoom[hidden] { display: none; }
.zoom img { max-width: 100%; max-height: calc(100vh - 110px); border-radius: 10px; background: #fff; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); }
.zoom-caption { color: #cbd5e1; font-size: 14px; max-width: 900px; text-align: center; }
.zoom-close { position: absolute; top: 16px; right: 16px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: #fff; cursor: pointer; display: grid; place-items: center; }
.zoom-close:hover { background: rgba(255, 255, 255, 0.22); }

/* -- responsive ----------------------------------------------------------------------------------------- */

@media (max-width: 1280px) {
  .frame.with-nav { grid-template-columns: var(--nav) minmax(0, 1fr); }
  .otp { display: none; }
}
@media (max-width: 980px) {
  .frame.with-nav { grid-template-columns: minmax(0, 1fr); }
  .menu-toggle { display: inline-flex; }
  .sidebar {
    position: fixed; z-index: 40; top: var(--topbar); left: 0; bottom: 0; height: auto;
    width: min(340px, 86vw);
    transform: translateX(-102%); transition: transform 0.22s ease, visibility 0.22s;
    visibility: hidden;
  }
  body.nav-open .sidebar { transform: none; visibility: visible; box-shadow: 20px 0 50px rgba(15, 23, 42, 0.2); }
  body.nav-open::after { content: ""; position: fixed; inset: var(--topbar) 0 0; z-index: 35; background: rgba(15, 23, 42, 0.35); }
  .main { padding: 28px 22px 48px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .start-grid, .parts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand-tag { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .topbar { padding: 0 12px; gap: 8px; }
  .brand-name { display: none; }
  .search-open { width: auto; flex: 1; }
  .search-open kbd { display: none; }
  .tools .tool span:not(.sun) { display: none; }
  .tool[data-print] { display: none; }
  .main { padding: 22px 16px 40px; }
  .lead { font-size: 17px; }
  .learn ul, .columns { columns: 1; grid-template-columns: minmax(0, 1fr); }
  ol.legend { grid-template-columns: minmax(0, 1fr); }
  .start-grid, .parts-grid { grid-template-columns: minmax(0, 1fr); }
  .prevnext { grid-template-columns: minmax(0, 1fr); }
  .marker { width: 20px; height: 20px; line-height: 20px; font-size: 11px; box-shadow: 0 0 0 2px #fff, 0 2px 4px rgba(0,0,0,.3); }
  h2 { font-size: 22px; }
  .search { padding-top: 12px; }
}

/* -- print ---------------------------------------------------------------------------------------------- */

@media print {
  .topbar, .sidebar, .otp, .prevnext, .search, .zoom, .skip { display: none !important; }
  .frame.with-nav { display: block; }
  .main { padding: 0; max-width: none; }
  body { font-size: 11pt; color: #000; background: #fff; }
  a { color: #000; }
  .qa .a { display: block !important; }
  figure.shot, .callout, table, .qa { break-inside: avoid; }
  h2 { break-after: avoid; }
}
