/* ---------------------------------------------------------------
   Craft floor.

   Everything below is byte-identical in every page that gets it
   right, so it ships here rather than being re-typed from the
   rules each time. Replace the :root values with the page's own
   palette; do not delete the rules that consume them.
   --------------------------------------------------------------- */

:root {
  /* ISP technician's clipboard palette */
  --ink: #2C2C2C;              /* Charcoal ink for body text and diagrams */
  --ink-muted: #4A5568;        /* Steel blue for headers and technical labels */
  --bg: #FFFFFF;               /* White uncoated paper clipboard ground */
  --surface: #F9FAFB;          /* Subtle off-white for diagrams */
  --rule: #D1D5DB;             /* Hairline rules dividing sections */
  --accent: #C55000;           /* Safety orange for checkboxes and warnings */
  --accent-ink: #FFFFFF;       /* White text on orange */
  --signal-green: #10B981;     /* WiFi signal strength indicator */
  --signal-green-light: #86EFAC; /* Faded signal edges */
  --warning-bg: #FFF7ED;       /* Light orange fill for callouts */
  --info-bg: #EFF6FF;          /* Light blue for info callouts */

  --measure: 65ch;

  scrollbar-color: var(--rule) transparent;
  caret-color: var(--accent);
  color-scheme: light dark;
}

/* The same seven properties, for readers whose OS is set to dark.
   Replace these alongside the light ones — a page that restyles
   :root and leaves this block holding the placeholder greys has a
   dark mode that belongs to a different design.

   Darken by desaturating and lifting, not by inverting: --bg wants a
   near-black carrying a little of the accent's hue, --ink a soft
   off-white rather than #fff, and --accent usually needs lightening
   to stay legible, since a colour tuned against white rarely clears
   4.5:1 against black. */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #E5E7EB;
    --ink-muted: #9CA3AF;
    --bg: #1F2937;
    --surface: #111827;
    --rule: #374151;
    --accent: #FF8C3A;
    --accent-ink: #111827;
    --signal-green: #34D399;
    --signal-green-light: #6EE7B7;
    --warning-bg: #3F2818;
    --info-bg: #1E3A5F;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Prevent any overflowing element from widening the document past the
   viewport. Without this a single oversized heading or image at a
   narrow viewport stretches the scroll width, which makes every
   paragraph on the page measure as flush to the viewport edge. */
html {
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

/* Load Inter font from local files (would be self-hosted in production) */
@supports (font-variation-settings: normal) {
  body {
    font-family: 'Inter var', 'Inter', system-ui, sans-serif;
  }
}

p {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

/* The surfaces you did not draw, which otherwise ship with browser
   defaults belonging to no design system. */
::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

/* Put on any cell holding a figure, so columns of numbers line up. */
.num {
  font-variant-numeric: tabular-nums;
}

/* 44px is the smallest reliably tappable target. Anything the reader
   presses needs it; a link inside a paragraph does not, which is why
   this is not on `a`. */
button,
[role="button"],
summary,
input[type="checkbox"],
input[type="radio"] {
  min-height: 44px;
}

button {
  min-width: 44px;
}

/* A document is one column, so the only thing that reliably breaks it
   is content that cannot shrink: a wide table, a long URL, a code
   block. These make the narrow viewport survivable without needing a
   layout per breakpoint. */
img,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

pre {
  overflow-x: auto;
}

table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
}

@media (max-width: 480px) {
  body {
    /* Thumbs cover the edges; text should not start underneath them. */
    padding-inline: 1rem;
  }
}

/* Motion only for readers who have not asked the OS to stop it. */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .checkbox {
    border-color: #000 !important;
  }

  .callout {
    border-color: #666 !important;
    background: #f5f5f5 !important;
  }
}

/* Page structure */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

@media (max-width: 768px) {
  main {
    padding: 2rem 1.25rem;
  }
}

/* Guide header */
.guide-header {
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.guide-header h1 {
  margin: 0 0 0.5rem 0;
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.guide-header .subtitle {
  margin: 0;
  font-size: 1rem;
  color: var(--ink-muted);
  font-weight: 400;
}

@media (max-width: 768px) {
  .guide-header h1 {
    font-size: 1.5rem;
  }

  .guide-header .subtitle {
    font-size: 0.9375rem;
  }
}

/* Task sections */
.task-section {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}

.task-section:last-of-type {
  border-bottom: none;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .task-section {
    grid-template-columns: 20px 1fr;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
  }
}

/* Checkbox */
.checkbox {
  width: 18px;
  height: 18px;
  margin-top: 0.25rem;
  border: 2px solid var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .checkbox {
    width: 16px;
    height: 16px;
  }
}

/* Task content */
.task-content {
  min-width: 0;
}

.task-content h2 {
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink);
}

.task-content h3 {
  margin: 1.5rem 0 0.75rem 0;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--ink);
}

.task-content h2:first-child {
  margin-top: -0.125rem;
}

@media (max-width: 768px) {
  .task-content h2 {
    font-size: 1.125rem;
  }

  .task-content h3 {
    font-size: 1rem;
    margin-top: 1.25rem;
  }
}

/* Instructions */
.instruction {
  font-size: 1rem;
  line-height: 1.6;
  max-width: var(--measure);
}

.instruction p {
  margin: 0 0 1rem 0;
}

.instruction p:last-child {
  margin-bottom: 0;
}

.instruction ul,
.instruction ol {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.instruction li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.instruction li:last-child {
  margin-bottom: 0;
}

/* Technical text (monospace) */
.technical,
code {
  font-family: 'Roboto Mono', 'SF Mono', Monaco, 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--ink);
  background: var(--surface);
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
}

strong.technical {
  font-weight: 500;
}

/* Diagrams */
.diagram {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--surface);
  border-radius: 4px;
}

.diagram svg {
  display: block;
  width: 100%;
  height: auto;
}

.diagram figcaption {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--ink-muted);
  text-align: center;
  font-style: italic;
}

@media (max-width: 768px) {
  .diagram {
    margin: 1.25rem -0.5rem;
    padding: 1rem;
  }
}

/* SVG text styles */
.diagram-label {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  fill: var(--ink-muted);
}

.diagram-label-center {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  fill: var(--ink);
  text-anchor: middle;
}

.channel-number {
  font-family: 'Roboto Mono', monospace;
  font-size: 18px;
  font-weight: 500;
  fill: var(--ink);
  text-anchor: middle;
}

.channel-status {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  fill: var(--ink-muted);
  text-anchor: middle;
}

/* Callouts */
.callout {
  margin: 1.5rem 0;
  padding: 1rem 1rem 1rem 1.25rem;
  border-left: 1px solid;
  border-radius: 4px;
  max-width: var(--measure);
}

.callout.warning {
  background: var(--warning-bg);
  border-color: var(--accent);
}

.callout.info {
  background: var(--info-bg);
  border-color: var(--ink-muted);
}

.callout strong {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--ink);
}

.callout.warning strong {
  color: var(--accent);
}

.callout ul,
.callout ol {
  margin: 0.5rem 0 0 0;
  padding-left: 1.5rem;
}

.callout li {
  margin-bottom: 0.375rem;
  line-height: 1.5;
}

.callout li:last-child {
  margin-bottom: 0;
}

.callout p {
  margin: 0.5rem 0 0 0;
}

.callout p:first-of-type {
  margin-top: 0;
}

@media (max-width: 768px) {
  .callout {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    padding: 0.875rem 1rem;
  }
}

/* Checklists */
.checklist {
  margin: 1.5rem 0 0 0;
  padding: 1rem;
  background: var(--surface);
  border-radius: 4px;
  border: 1px solid var(--rule);
  max-width: var(--measure);
}

.checklist p {
  margin: 0 0 0.5rem 0;
  font-weight: 500;
}

.checklist ul {
  margin: 0;
  padding-left: 1.5rem;
  list-style: none;
}

.checklist li {
  position: relative;
  margin-bottom: 0.375rem;
  padding-left: 0.25rem;
  line-height: 1.5;
}

.checklist li:last-child {
  margin-bottom: 0;
}

.checklist li::before {
  content: '□';
  position: absolute;
  left: -1.25rem;
  color: var(--accent);
  font-weight: 500;
}

@media (max-width: 768px) {
  .checklist {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
  }
}

/* Footer */
.guide-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-muted);
}

.guide-footer p {
  margin: 0 0 0.75rem 0;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.guide-footer p:last-child {
  margin-bottom: 0;
}

.completion-note {
  font-weight: 500;
  color: var(--accent);
}
@media (max-width: 480px) {
  /* --impeccable-mobile-pad */
  body { padding-inline: max(1rem, 16px); }
  .container, [class*="container"], section, header, footer, nav, main, article {
    padding-inline: max(1rem, 16px);
  }
}
/* --impeccable-measure */
p, li, dt, dd, blockquote, figcaption, td, th { max-width: var(--measure); }
