/* Rewire Repairs — static front. A cutting-mat bench with a manila repair
   tag pinned to it; the tag is the ticket lookup. Barlow / Barlow Condensed
   (OFL, fonts/OFL-Barlow.txt). No inline styles anywhere (strict CSP). */

@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/barlow-latin-400-normal.woff2?v=1") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/barlow-vietnamese-400-normal.woff2?v=1") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/barlow-latin-600-normal.woff2?v=1") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/barlow-vietnamese-600-normal.woff2?v=1") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/barlow-condensed-latin-600-normal.woff2?v=1") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/barlow-condensed-vietnamese-600-normal.woff2?v=1") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/fonts/barlow-condensed-latin-700-normal.woff2?v=1") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/fonts/barlow-condensed-vietnamese-700-normal.woff2?v=1") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }

:root {
  --mat: #dbe4e6;         /* anti-static bench mat */
  --mat-line: #c6d2d5;    /* its cutting grid */
  --ink: #13202a;
  --ink-soft: #4b5b66;
  --tag: #efdaa3;         /* manila repair tag */
  --tag-ink: #2c2210;
  --tag-edge: #c9ad6a;
  --kapton: #8f520b;      /* amber tape: links, the pressed step */
  --probe: #b42318;       /* red probe: where the job is now */
  --paper: #f7f9f9;       /* the work order sheet */
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, sans-serif;
  --measure: 36rem;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --mat: #131c21; --mat-line: #1f2b31; --ink: #e2e9eb; --ink-soft: #9fb0b8;
    --tag: #3a311d; --tag-ink: #f3e6c3; --tag-edge: #5d4d2c;
    --kapton: #e3a24f; --probe: #f2675c; --paper: #1a252b;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; color: var(--ink); font: 400 1.0625rem/1.55 var(--body);
  background-color: var(--mat);
  background-image:
    linear-gradient(var(--mat-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--mat-line) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
}
a { color: var(--kapton); text-underline-offset: 0.18em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--kapton); outline-offset: 2px;
}
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.02; margin: 0 0 0.5em; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--mat); padding: 0.5rem 0.8rem; z-index: 2; }
.skip:focus { left: var(--gutter); }

/* ---- bar ---- */
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem;
  padding: 1rem var(--gutter); max-width: 76rem; margin: 0 auto; }
.mark { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--ink); text-decoration: none;
  font: 700 1.45rem/1 var(--display); }
.mark-tag { width: 1.3rem; height: 1.6rem; flex: none; }
.mark-tag path { fill: var(--tag); stroke: var(--tag-edge); stroke-width: 1.5; }
.mark-tag circle { fill: var(--mat); stroke: var(--tag-edge); stroke-width: 1.5; }
.bar-nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; font-weight: 600; }
.bar-nav a { color: var(--ink); text-decoration: none; padding: 0.2rem 0; border-bottom: 2px solid transparent; }
.bar-nav a:hover { border-bottom-color: var(--kapton); }
.bar-nav .bar-staff { color: var(--ink-soft); }

main { max-width: 76rem; margin: 0 auto; padding: 0 var(--gutter); }

/* ---- the bench: headline + the tag ---- */
.bench { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center; padding: clamp(1.5rem, 5vw, 4rem) 0 clamp(3rem, 7vw, 5.5rem); }
.bench h1 { font-size: clamp(2.6rem, 6.4vw, 5.1rem); max-width: 11ch; }
.lede { font-size: 1.15rem; max-width: var(--measure); color: var(--ink); }
.bench-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin-top: 1.5rem; }
.bench-or { color: var(--ink-soft); }
.btn { display: inline-block; background: var(--ink); color: var(--mat); text-decoration: none;
  font: 700 1.2rem/1 var(--display); padding: 0.85rem 1.4rem; border-radius: 3px; }
.btn:hover { background: var(--kapton); color: var(--mat); }

/* The repair tag: one element carries the page. A punched eyelet, a stub
   for the code, a perforation, the live track below. */
.tag {
  --pc-ink: var(--tag-ink); --pc-muted: color-mix(in srgb, var(--tag-ink) 68%, var(--tag));
  --pc-line: var(--tag-edge); --pc-surface: color-mix(in srgb, var(--tag) 45%, #fff);
  --pc-accent: var(--probe); --pc-accent-ink: #fff; --pc-radius: 3px; --pc-gap: 0.9rem;
  position: relative; background: var(--tag); color: var(--tag-ink);
  clip-path: polygon(14% 0, 86% 0, 100% 7%, 100% 100%, 0 100%, 0 7%);
  padding: 3.6rem clamp(1.1rem, 3vw, 2rem) 1.6rem; transform: rotate(-1.6deg); min-height: 24rem;
}
@media (prefers-color-scheme: dark) {
  .tag { --pc-surface: color-mix(in srgb, var(--tag) 70%, #000); --pc-accent-ink: #1a0d0b; }
}
.tag::before { /* eyelet */
  content: ""; position: absolute; top: 1.1rem; left: 50%; width: 1.15rem; height: 1.15rem; margin-left: -0.575rem;
  border-radius: 50%; background: var(--mat); box-shadow: 0 0 0 4px var(--tag-edge);
}
.tag-stub { padding-bottom: 1.1rem; margin-bottom: 1.2rem;
  background-image: radial-gradient(circle, var(--tag-edge) 1.6px, transparent 1.8px);
  background-size: 11px 6px; background-repeat: repeat-x; background-position: bottom left; }
.tag-h { font-size: 2rem; margin-bottom: 0.2rem; }
.tag-note { font-size: 0.95rem; margin: 0; color: var(--pc-muted); }
.tag .pc-st-input { font-family: var(--display); font-weight: 700; font-size: 1.5rem; letter-spacing: 0.04em; }
.tag .pc-st-go { font: 700 1.2rem/1 var(--display); padding: 0.8rem 1.3rem; }
.tag .pc-st-code { font-family: var(--display); font-size: 1.35rem; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.tag .pc-st-step { font-weight: 600; }
.tag .pc-st-step[data-at="now"] { color: var(--probe); }
.tag .pc-st-link { color: var(--tag-ink); }

/* ---- the work order ---- */
.order { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start; padding-bottom: clamp(3rem, 7vw, 5rem); scroll-margin-top: 1rem; }
.order-sheet {
  --pc-ink: var(--ink); --pc-muted: var(--ink-soft); --pc-line: var(--mat-line); --pc-surface: var(--mat);
  --pc-accent: var(--ink); --pc-accent-ink: var(--mat); --pc-radius: 3px;
  background: var(--paper); padding: clamp(1.25rem, 3.5vw, 2.5rem); border-top: 6px solid var(--ink);
}
.order-sheet h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
.order-sheet > p { max-width: var(--measure); color: var(--ink-soft); }
.order-form .pc-rq-submit { font: 700 1.2rem/1 var(--display); padding: 0.9rem 1.5rem; }
.order-form .pc-rq-submit:hover { background: var(--kapton); }
.order-form .pc-rq-code { font-family: var(--display); font-size: 1.25rem; letter-spacing: 0.04em; }

.flow { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.flow li { counter-increment: step; position: relative; padding: 0 0 1.4rem 3rem; }
.flow li::before { content: counter(step); position: absolute; left: 0; top: -0.1rem; width: 2rem; height: 2rem;
  display: grid; place-items: center; font: 700 1.1rem/1 var(--display); color: var(--mat); background: var(--ink); border-radius: 50%; }
.flow li:not(:last-child)::after { content: ""; position: absolute; left: calc(1rem - 1px); top: 2.1rem; bottom: 0.2rem; width: 2px; background: var(--ink-soft); }
.flow h3 { font-size: 1.4rem; margin-bottom: 0.2rem; }
.flow p { margin: 0; color: var(--ink-soft); }

/* ---- prices ---- */
.prices { padding-bottom: clamp(3rem, 7vw, 5rem); scroll-margin-top: 1rem; }
.prices h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
.prices > p { color: var(--ink-soft); max-width: var(--measure); }
.price-table { width: 100%; max-width: 48rem; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.price-table th, .price-table td { text-align: left; padding: 0.7rem 0.9rem 0.7rem 0; border-bottom: 1px solid var(--mat-line); vertical-align: top; }
.price-table thead th { font: 600 0.95rem/1.2 var(--body); color: var(--ink-soft); border-bottom: 2px solid var(--ink); }
.price-table tbody th { font-weight: 600; }

/* ---- foot ---- */
.foot { max-width: 76rem; margin: 0 auto; padding: 2rem var(--gutter) 3rem; display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 1rem 3rem; border-top: 2px solid var(--ink); color: var(--ink-soft); }
.foot p { margin: 0 0 0.4rem; }
.foot-name { font: 700 1.3rem/1 var(--display); color: var(--ink); }
.foot-demo { max-width: 28rem; font-size: 0.95rem; }

@media (max-width: 860px) {
  .bench, .order { grid-template-columns: minmax(0, 1fr); }
  .tag { transform: none; min-height: 0; }
  .bench h1 { max-width: 14ch; }
}
@media (max-width: 480px) {
  .price-table th, .price-table td { padding-right: 0.5rem; font-size: 0.95rem; }
}
