/* ==========================================================================
   PRIME CIRCUIT REPAIR CENTRE LIMITED
   Design system: ENGINEERING SPEC-SHEET
   Sharp corners, hairline rules, tabular numerals, mono part/service codes.
   Palette: graphite #2B3038, navy #14243B, safety amber #F2A900,
            circuit teal #1F8A80 (repair / restore), off-white #F5F6F7.
   Type: IBM Plex Sans + IBM Plex Mono.
   ========================================================================== */
:root {
  --graphite: #2B3038;
  --navy: #14243B;
  --navy-2: #1B3050;
  --amber: #F2A900;
  --amber-d: #B97E00;
  --teal: #1F8A80;
  --teal-d: #17695F;
  --teal-050: #E6F3F1;
  --bg: #F5F6F7;
  --white: #FFFFFF;
  --ink: #14243B;
  --body: #3A424D;
  --muted: #5B6572;
  --line: #CDD2D8;
  --line-strong: #98A1AC;
  --on-dark: #D5DBE3;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, Consolas, "Courier New", monospace;
  --wrap: 1180px;
  --gutter: clamp(16px, 4.5vw, 40px);
  --band-y: clamp(52px, 7vw, 92px);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--body);
  font-family: var(--sans); font-size: 16.5px; line-height: 1.62;
  font-variant-numeric: tabular-nums; overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--teal-d); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.16; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); font-weight: 700; }
h2 { font-size: clamp(1.55rem, 2.9vw, 2.15rem); }
h3 { font-size: 1.14rem; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--amber); color: var(--navy); padding: 10px 16px; z-index: 200; font-weight: 700; }
.skip-link:focus { left: 8px; top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Tier 1: utility bar ---------- */
.util-bar { background: var(--graphite); color: var(--on-dark); font-family: var(--mono); font-size: 12.5px; letter-spacing: .02em; }
.util-inner { max-width: var(--wrap); margin: 0 auto; padding: 8px var(--gutter); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.util-bar a { color: #fff; text-decoration: none; }
.util-bar a:hover { color: var(--amber); }
.util-spacer { flex: 1 1 auto; }
.util-ocn { color: var(--on-dark); }
.util-quote { background: var(--amber); color: var(--navy) !important; font-weight: 600; padding: 3px 12px; }
.util-quote:hover { background: #fff; color: var(--navy) !important; }

/* ---------- Tier 2: masthead / nav ---------- */
.masthead { background: var(--white); border-bottom: 1px solid var(--line-strong); position: sticky; top: 0; z-index: 100; }
.masthead::after { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--navy) 0 66%, var(--amber) 66% 100%); }
.masthead-inner { max-width: var(--wrap); margin: 0 auto; padding: 10px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: block; line-height: 0; }
.brand svg { width: 232px; height: auto; }
.spec-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0; }
.spec-nav a { display: flex; align-items: baseline; gap: 7px; padding: 12px 14px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; border-left: 1px solid var(--line); }
.spec-nav li:last-child a { border-right: 1px solid var(--line); }
.spec-nav a .n { font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 500; }
.spec-nav a:hover { background: var(--bg); box-shadow: inset 0 -3px 0 var(--amber); }
.spec-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--teal); background: var(--teal-050); }
.nav-toggle { display: none; background: var(--navy); color: #fff; border: 0; padding: 10px 14px; font-family: var(--mono); font-size: 13px; letter-spacing: .06em; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { background: var(--navy); color: var(--on-dark); position: relative; overflow: hidden; border-bottom: 4px solid var(--amber); }
.hero::before { content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px; }
.hero-inner { position: relative; max-width: var(--wrap); margin: 0 auto; padding: clamp(36px, 6vw, 72px) var(--gutter) clamp(40px, 6vw, 76px); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.docref { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--amber); border: 1px solid rgba(255,255,255,.28); display: inline-flex; flex-wrap: wrap; gap: 0; margin-bottom: 22px; }
.docref span { padding: 5px 10px; border-right: 1px solid rgba(255,255,255,.28); }
.docref span:last-child { border-right: 0; color: #fff; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero .lede { font-size: 1.14rem; max-width: 56ch; color: #E3E8EE; }
.hero-tags { font-family: var(--mono); font-size: 13px; color: var(--on-dark); display: flex; flex-wrap: wrap; gap: 8px 0; margin: 22px 0 28px; padding: 0; list-style: none; }
.hero-tags li { padding: 0 14px 0 0; margin-right: 14px; border-right: 1px solid rgba(255,255,255,.3); }
.hero-tags li:last-child { border-right: 0; }
.hero-art { border: 1px solid rgba(255,255,255,.3); background: rgba(10,22,40,.55); padding: 10px; }
.hero-art figcaption { font-family: var(--mono); font-size: 11.5px; letter-spacing: .05em; color: var(--on-dark); padding: 8px 4px 0; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; font-family: var(--sans); font-weight: 700; font-size: 15px; letter-spacing: .01em; padding: 13px 22px; text-decoration: none; border: 2px solid transparent; cursor: pointer; line-height: 1.2; }
.btn-primary { background: var(--amber); color: var(--navy); border-color: var(--amber); }
.btn-primary:hover { background: #fff; border-color: #fff; color: var(--navy); }
.btn-ghost { color: #fff; border-color: rgba(255,255,255,.6); }
.btn-ghost:hover { background: #fff; color: var(--navy); }
.btn-dark { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-dark:hover { background: var(--teal-d); border-color: var(--teal-d); color: #fff; }

/* page header (interior) */
.page-head { background: var(--navy); color: var(--on-dark); position: relative; overflow: hidden; border-bottom: 4px solid var(--amber); }
.page-head::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 48px 48px; }
.page-head .wrap { position: relative; padding-top: clamp(30px, 5vw, 56px); padding-bottom: clamp(30px, 5vw, 56px); }
.page-head h1 { color: #fff; margin-bottom: .3em; }
.page-head p { max-width: 70ch; margin: 0; font-size: 1.08rem; color: #E3E8EE; }
.crumbs { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--amber); margin-bottom: 14px; }
.crumbs a { color: #fff; }

/* ---------- Sections ---------- */
.band { padding: var(--band-y) 0; }
.band-alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-dark { background: var(--graphite); color: var(--on-dark); }
.band-dark h2, .band-dark h3 { color: #fff; }
.sec-head { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; align-items: baseline; margin-bottom: 34px; border-top: 2px solid var(--navy); padding-top: 14px; }
.band-dark .sec-head { border-top-color: var(--amber); }
.sec-no { font-family: var(--mono); font-size: 13px; letter-spacing: .08em; color: var(--teal-d); font-weight: 600; grid-row: 1 / span 2; padding-top: .55em; }
.band-dark .sec-no { color: var(--amber); }
.sec-head h2 { margin: 0; }
.sec-head p { margin: 0; max-width: 68ch; color: var(--muted); grid-column: 2; }
.band-dark .sec-head p { color: var(--on-dark); }

/* ---------- Capabilities matrix ---------- */
.matrix-scroll { overflow-x: auto; border: 1px solid var(--line-strong); background: var(--white); }
table.matrix { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 760px; }
.matrix caption { text-align: left; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 14px; background: var(--bg); border-bottom: 1px solid var(--line-strong); caption-side: top; }
.matrix th, .matrix td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.matrix th:last-child, .matrix td:last-child { border-right: 0; }
.matrix thead th { background: var(--navy); color: #fff; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; border-right-color: rgba(255,255,255,.2); white-space: nowrap; }
.matrix tbody tr:nth-child(even) { background: #FAFBFB; }
.matrix tbody tr:hover { background: var(--teal-050); }
.matrix td.code, .matrix th[scope="row"].code { font-family: var(--mono); font-weight: 600; color: var(--teal-d); white-space: nowrap; font-size: 13.5px; }
.matrix th[scope="row"] { color: var(--ink); font-weight: 600; background: transparent; }
.matrix .y { font-family: var(--mono); font-weight: 600; color: var(--teal-d); text-align: center; }
.matrix .dash { color: var(--line-strong); text-align: center; }
.matrix td.ctr, .matrix th.ctr { text-align: center; }
.matrix-note { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 10px; }

/* ---------- Datasheet cards ---------- */
.ds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 20px; }
.ds { background: var(--white); border: 1px solid var(--line-strong); display: flex; flex-direction: column; position: relative; }
.ds::before { content: ""; position: absolute; left: -1px; top: -1px; width: 56px; height: 4px; background: var(--amber); }
.ds-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--muted); }
.ds-code { color: var(--teal-d); font-weight: 600; font-size: 13px; }
.ds-body { padding: 14px 16px 6px; flex: 1; }
.ds-body h3 { margin-bottom: .4em; }
.ds-body p { font-size: 15px; color: var(--body); }
.ds dl { margin: 0; border-top: 1px solid var(--line); }
.ds dl div { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.ds dl div:last-child { border-bottom: 0; }
.ds dt { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.ds dd { margin: 0; color: var(--ink); }
.ds-foot { padding: 10px 16px; background: var(--bg); border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--muted); }
.ds-foot b { color: var(--teal-d); font-weight: 600; }

/* ---------- Stepper ---------- */
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line-strong); background: var(--white); counter-reset: s; }
.stepper li { position: relative; padding: 18px 14px 18px; border-right: 1px solid var(--line); }
.stepper li:last-child { border-right: 0; }
.stepper li::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--navy); }
.stepper li:nth-child(4)::after, .stepper li:nth-child(5)::after { background: var(--teal); }
.stepper li:last-child::after { background: var(--amber); }
.step-n { font-family: var(--mono); font-size: 26px; font-weight: 500; color: var(--navy); display: block; line-height: 1; margin-bottom: 8px; }
.stepper h3 { font-size: 1rem; margin-bottom: .35em; }
.stepper p { font-size: 13.5px; line-height: 1.5; margin: 0; color: var(--body); }
.step-code { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .06em; display: block; margin-top: 10px; }
.stepper.on-dark { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.3); }
.stepper.on-dark li { border-right-color: rgba(255,255,255,.2); }
.stepper.on-dark .step-n { color: var(--amber); }
.stepper.on-dark h3 { color: #fff; }
.stepper.on-dark p, .stepper.on-dark .step-code { color: var(--on-dark); }

/* ---------- Sector tags ---------- */
.tag-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line-strong); background: var(--white); }
.tag-grid li { border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; }
.tag-grid .t-code { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; color: var(--teal-d); font-weight: 600; }
.tag-grid .t-name { font-weight: 600; color: var(--ink); }
.band-dark .tag-grid { background: transparent; border-color: rgba(255,255,255,.3); }
.band-dark .tag-grid li { border-color: rgba(255,255,255,.3); }
.band-dark .tag-grid .t-name { color: #fff; }
.band-dark .tag-grid .t-code { color: var(--amber); }

/* ---------- Generic layouts ---------- */
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.panel { background: var(--white); border: 1px solid var(--line-strong); padding: 22px 22px 8px; position: relative; }
.panel::before { content: ""; position: absolute; left: -1px; top: -1px; width: 48px; height: 4px; background: var(--teal); }
.panel .label { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-d); margin-bottom: 10px; display: block; font-weight: 600; }
.panel.navy { background: var(--navy); border-color: var(--navy); color: var(--on-dark); }
.panel.navy::before { background: var(--amber); }
.panel.navy h3, .panel.navy .label { color: #fff; }
.panel.navy .label { color: var(--amber); }
.panel.navy p { color: #E3E8EE; }
blockquote.spec-quote { margin: 0 0 1em; padding: 4px 0 4px 18px; border-left: 4px solid var(--amber); font-size: 1.12rem; color: var(--ink); font-weight: 500; }
.panel.navy blockquote.spec-quote { color: #fff; }

table.kv { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line-strong); font-size: 15px; }
.kv th, .kv td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.kv th { width: 36%; font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--bg); border-right: 1px solid var(--line); }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: 0; }
.kv td { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }

.principles { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.principles li { display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.principles .p-code { font-family: var(--mono); font-weight: 600; color: var(--teal-d); font-size: 13px; padding-top: 2px; }
.principles h3 { margin-bottom: .2em; font-size: 1.05rem; }
.principles p { margin: 0; font-size: 15px; }

.loop { display: flex; flex-wrap: wrap; gap: 0; list-style: none; padding: 0; margin: 0; font-family: var(--mono); font-size: 13px; border: 1px solid var(--line-strong); background: var(--white); }
.loop li { flex: 1 1 140px; padding: 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; }
.loop b { display: block; color: var(--teal-d); font-size: 11.5px; letter-spacing: .08em; margin-bottom: 4px; }
.loop span { color: var(--ink); font-family: var(--sans); font-weight: 600; font-size: 15px; }

.cta-strip { background: var(--navy); color: #fff; border-top: 4px solid var(--amber); padding: 40px 0; }
.cta-strip .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 30px; }
.cta-strip h2 { color: #fff; margin: 0 0 6px; }
.cta-strip p { margin: 0; color: var(--on-dark); max-width: 60ch; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); font-weight: 600; }
.field input, .field select, .field textarea { font: inherit; font-size: 16px; padding: 11px 12px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); border-radius: 0; width: 100%; }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--amber); outline-offset: 0; border-color: var(--navy); }
.form-status { font-family: var(--mono); font-size: 13px; margin-top: 12px; min-height: 1.4em; color: var(--teal-d); }
.form-status.is-error { color: #A12B1D; }
.req { color: #A12B1D; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--on-dark); border-top: 4px solid var(--amber); font-size: 15px; }
.foot-grid { max-width: var(--wrap); margin: 0 auto; padding: 48px var(--gutter) 32px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.site-footer h2 { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--amber); margin: 0 0 14px; font-weight: 600; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--amber); text-decoration: underline; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.foot-brand svg { width: 220px; height: auto; margin-bottom: 14px; }
.foot-brand p { max-width: 34ch; margin: 0; font-size: 14px; }
.legal-block { font-style: normal; line-height: 1.6; }
.foot-base { border-top: 1px solid rgba(255,255,255,.2); }
.foot-base-inner { max-width: var(--wrap); margin: 0 auto; padding: 18px var(--gutter); font-family: var(--mono); font-size: 12px; letter-spacing: .02em; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; color: var(--on-dark); }
.foot-base-inner span { overflow-wrap: anywhere; }

/* ---------- 404 ---------- */
.nf-code { font-family: var(--mono); font-size: clamp(4rem, 14vw, 9rem); font-weight: 500; color: var(--amber); line-height: 1; display: block; margin-bottom: 12px; }

/* ---------- Prose (legal pages) ---------- */
.prose { max-width: 78ch; }
.prose h2 { font-size: 1.35rem; margin-top: 1.8em; padding-top: .8em; border-top: 1px solid var(--line-strong); }
.prose h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.prose .sec-tag { font-family: var(--mono); color: var(--teal-d); font-size: .8em; margin-right: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .stepper { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stepper li { border-bottom: 1px solid var(--line); }
  .stepper.on-dark li { border-bottom-color: rgba(255,255,255,.2); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .spec-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 3px solid var(--navy); box-shadow: 0 14px 24px -14px rgba(20,36,59,.5); }
  .spec-nav.open { display: block; }
  .spec-nav ul { flex-direction: column; }
  .spec-nav a { border-left: 0 !important; border-right: 0 !important; border-top: 1px solid var(--line); padding: 14px var(--gutter); }
  .masthead-inner { position: relative; }
  .hero-inner, .two { grid-template-columns: 1fr; }
  .three { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .stepper { grid-template-columns: 1fr; }
  .stepper li { border-right: 0; display: grid; grid-template-columns: 52px 1fr; column-gap: 12px; }
  .stepper .step-n { grid-row: 1 / span 3; }
  .form-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .brand svg { width: 190px; }
  .util-hide-sm { display: none; }
  .sec-head { grid-template-columns: 1fr; }
  .sec-no { grid-row: auto; padding-top: 0; }
  .sec-head p { grid-column: 1; }
  .ds dl div { grid-template-columns: 84px 1fr; }
  .principles li { grid-template-columns: 52px 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
@media print { .util-bar, .nav-toggle, .cta-strip { display: none; } .masthead { position: static; } }
