@font-face {
  font-family: Inter;
  src: url("fonts/inter-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("fonts/inter-latin.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("fonts/inter-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Oswald;
  src: url("fonts/oswald-latin.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Oswald;
  src: url("fonts/oswald-latin.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bone: #FBF6F0;
  --bone-2: #F3EDE4;
  --ink: #0A244E;
  --navy: #0C1A36;
  --muted: #4A5A78;
  --line: rgba(10, 36, 78, 0.12);
  --dot: #D6D0C6;
  --orange: #FD6815;
  --orange-d: #E25A0C;
  --paper: #fffdf9;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16.5px;
  line-height: 1.55;
  background-image: radial-gradient(var(--dot) 1.1px, transparent 1.15px);
  background-size: 18px 18px;
}
a { color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }
.wrap { width: min(900px, calc(100% - 40px)); margin: 0 auto; }

header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(251, 246, 240, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 16px;
}
.logo {
  font-family: Oswald, sans-serif; font-weight: 600; font-size: 22px;
  letter-spacing: 0.16em; text-decoration: none; color: var(--ink);
}
.logo span { color: var(--orange); letter-spacing: 0.12em; font-weight: 500; font-size: 13px; margin-left: 8px; vertical-align: 2px; }
header nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
header nav a {
  text-decoration: none; font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink);
}
header nav a:hover { color: var(--orange); }

.hero { padding: 48px 0 12px; }
.kicker {
  margin: 0 0 10px; font-size: 12px; font-weight: 700;
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--orange);
}
h1 {
  font-family: Oswald, sans-serif; font-weight: 600;
  font-size: clamp(40px, 7vw, 68px); line-height: 0.95;
  letter-spacing: -0.02em; text-transform: uppercase; margin: 0 0 16px;
}
.lede { font-size: 18px; color: var(--muted); max-width: 38em; margin: 0 0 28px; }

.hero-grid {
  display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start;
}
@media (max-width: 700px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-live {
  margin: 0; background: var(--navy); border-radius: 12px; padding: 10px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}
.hero-live img { border-radius: 6px; width: 100%; }
.hero-live figcaption, figcaption {
  font-size: 12px; color: var(--muted); margin-top: 8px; letter-spacing: 0.04em;
}
.hero-live figcaption { color: #d8d2c8; text-align: center; }

.toc {
  background: var(--paper); border: 1px solid var(--line); padding: 22px 24px;
}
.toc h2 { margin: 0 0 12px; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc a { text-decoration: none; }
.toc a:hover { color: var(--orange); }

h2 {
  font-family: Oswald, sans-serif; font-weight: 600;
  font-size: 32px; letter-spacing: 0.04em; text-transform: uppercase;
  margin: 0 0 16px; padding-top: 8px;
}
h3 {
  font-family: Oswald, sans-serif; font-weight: 500;
  font-size: 18px; letter-spacing: 0.08em; text-transform: uppercase;
  margin: 28px 0 10px; color: var(--ink);
}
h3 .num { color: var(--orange); margin-right: 8px; }
section.chapter { padding: 40px 0 8px; border-top: 1px solid var(--line); }
section.chapter:first-of-type { border-top: 0; }

p { margin: 0 0 12px; }
ul, ol { margin: 0 0 16px; padding-left: 1.25em; }
li { margin: 0 0 6px; }
strong { font-weight: 700; }

.note, .warn, .placeholder {
  border-left: 3px solid var(--orange);
  background: var(--bone-2);
  padding: 12px 16px;
  margin: 16px 0 20px;
}
.warn { border-left-color: var(--ink); }
.placeholder {
  border-left-color: var(--muted);
  font-size: 15px;
}
.note p, .warn p, .placeholder p { margin: 0; }
code, .path {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: var(--bone-2);
  padding: 0 0.18em;
  border-radius: 2px;
  white-space: nowrap;
}
code.long { white-space: normal; word-break: break-all; }
pre {
  background: var(--navy); color: var(--bone);
  padding: 14px 16px; overflow-x: auto;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13.5px; line-height: 1.45; margin: 0 0 16px;
}
pre { white-space: pre-wrap; overflow: visible; }
pre code { background: none; color: inherit; padding: 0; white-space: inherit; }

.shot {
  margin: 16px 0 24px;
  background: var(--navy);
  border-radius: 12px;
  padding: 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), inset 0 0 0 3px rgba(0,0,0,0.28);
}
.shot img { width: 100%; border-radius: 6px; }
.shot figcaption { color: #c9c3b8; text-align: center; margin: 8px 0 0; }

.pair {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0 24px;
}
@media (max-width: 700px) { .pair { grid-template-columns: 1fr; } }

table.controls {
  width: 100%; border-collapse: collapse; margin: 0 0 18px;
  font-size: 14.5px;
}
table.controls th {
  text-align: left; font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--orange);
  padding: 10px 10px 8px; border-bottom: 1px solid var(--line);
}
table.controls td {
  vertical-align: top; padding: 7px 10px;
  border-bottom: 1px solid var(--line);
}
table.controls td:first-child {
  font-weight: 700; white-space: nowrap; width: 38%;
}
table.controls tr.sec td {
  border-bottom: 0; padding-top: 14px; color: var(--orange);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700;
}

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 14px 42px;
}
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 0;
  font-family: Oswald, sans-serif; font-weight: 600;
  color: var(--orange); letter-spacing: 0.04em;
}

footer.site {
  margin-top: 48px; padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}

/* Print / PDF */
@page {
  size: A4;
  margin: 16mm 16mm 18mm 16mm;
  background: #FBF6F0;
  @bottom-left {
    content: "KIOSK Pocket Studio  ·  Install manual  ·  v1.2";
    font-family: Inter, sans-serif;
    font-size: 8.5pt;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #4A5A78;
  }
  @bottom-right {
    content: counter(page);
    font-family: Inter, sans-serif;
    font-size: 9pt;
    color: #0A244E;
  }
}
@page :first {
  @bottom-left { content: none; }
  @bottom-right { content: none; }
}

@media print {
  body { background-image: none; font-size: 10.5pt; }
  header { display: none; }
  a { text-decoration: none; color: inherit; }
  .lede, p, li { orphans: 3; widows: 3; }
  h2, h3 { break-after: avoid; }
  .shot, .hero-live, pre, .note, .warn, .placeholder, .pair { break-inside: avoid; }
  .chapter { break-before: auto; }
  h2, h3 { break-before: auto; break-after: avoid; }
  #controls { break-before: page; }
  .hero { padding-top: 0; }
  footer.site .web-only { display: none; }
  table.controls { font-size: 9.5pt; }
  .shot { padding: 8px; margin: 10px 0 14px; }
  .pair { margin: 10px 0 14px; gap: 12px; }
  .hero-grid { grid-template-columns: 220px 1fr; gap: 20px; }
  .pair { break-inside: avoid; }
  footer.site { break-inside: avoid; }
}
