/* Equipment Age. Swiss/International style, like a printed rating plate or a spec sheet.
   Light only. Black on white, greys, square corners, black rules, Helvetica set large.
   Colour has one meaning each: red #e30613 = the decoded field / past typical life; yellow #ffc400 = warning only.
   No dark panels, no green, no pills or badges, no uppercase letter-spaced labels, no shadows, no rounded cards. */
:root {
  --bg: #ffffff; --ink: #000000; --ink-2: #222222; --muted: #666666; --line: #dddddd; --line-2: #bbbbbb; --wash: #f3f3f3;
  --red: #e30613; --warn: #ffc400;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--warn); outline-offset: 2px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
code, .mono { font-family: var(--mono); }
code { font-size: .9em; background: var(--wash); padding: 1px 4px; }
[hidden] { display: none !important; }

/* header */
.top { border-bottom: 2px solid var(--ink); background: #fff; }
.top-in { display: flex; align-items: center; gap: 24px; min-height: 58px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 21px; letter-spacing: -.02em; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.brand::before { content: ""; width: 14px; height: 14px; background: var(--red); }
.brand:hover { color: var(--ink); }
.topnav { margin-left: auto; display: flex; gap: 0; flex-wrap: wrap; }
.topnav a { padding: 8px 12px; text-decoration: none; font-size: 16px; }
.topnav a:hover, .topnav a[aria-current] { background: var(--ink); color: #fff; }
@media (max-width: 760px) {
  .top-in { gap: 4px; padding: 8px 16px; }
  .topnav { margin-left: -12px; width: calc(100% + 24px); }
  .topnav a { font-size: 15px; padding: 6px 12px; }
}

/* type */
h1 { font-size: clamp(34px, 5.2vw, 60px); line-height: 1.02; letter-spacing: -.035em; font-weight: 700; margin: 0; }
h2 { font-size: 28px; line-height: 1.15; letter-spacing: -.02em; font-weight: 700; margin: 0 0 12px; }
h3 { font-size: 19px; margin: 24px 0 6px; font-weight: 700; }
p { margin: 0 0 14px; }
.lede { color: var(--ink-2); margin: 12px 0 0; font-size: 20px; line-height: 1.45; max-width: 58ch; }
.crumbs { font-size: 15px; color: var(--muted); padding: 18px 0 0; }
.crumbs a { color: var(--muted); }
.page-top { padding: 28px 0 8px; }
.section { border-top: 2px solid var(--ink); margin-top: 48px; padding-top: 18px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 48px; }
@media (max-width: 820px) { .cols { grid-template-columns: minmax(0, 1fr); } }
.prose { max-width: 70ch; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 14px; }
.prose li { margin: 4px 0; }

/* the decoder */
.tool { border-top: 6px solid var(--ink); border-bottom: 2px solid var(--ink); padding: 18px 0 22px; margin-top: 22px; }
.form { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
@media (max-width: 760px) { .form { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: 6px; }
.field > span { font-size: 15px; color: var(--ink-2); font-weight: 700; }
.inp, .sel { appearance: none; background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 0; font: 20px/1.2 var(--sans); padding: 11px 12px; min-height: 52px; width: 100%; }
.inp { font-family: var(--mono); letter-spacing: .06em; }
.sel { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23000' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 12px center; padding-right: 36px; font-size: 18px; }
.fixed-brand { font: 700 20px/1.2 var(--sans); border: 2px solid var(--ink); padding: 13px 12px; min-height: 52px; }
.btn { appearance: none; border: 2px solid var(--ink); background: var(--ink); color: #fff; font: 700 18px/1 var(--sans); padding: 14px 22px; min-height: 52px; cursor: pointer; border-radius: 0; text-decoration: none; display: inline-flex; align-items: center; }
.btn:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn-line { background: #fff; color: var(--ink); font-size: 16px; min-height: 42px; padding: 9px 14px; }
.btn-line:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.hint { font-size: 15px; color: var(--muted); margin: 10px 0 0; }
.hint a { color: var(--muted); }

.result { margin-top: 22px; }
.res-head { border-bottom: 1px solid var(--ink); padding-bottom: 16px; }
.res-date { font: 700 clamp(40px, 6vw, 72px)/1 var(--sans); letter-spacing: -.04em; color: var(--red); }
.res-age { font: 700 24px/1.2 var(--sans); margin-top: 8px; }
.res-conf { font-size: 16px; color: var(--ink-2); margin-top: 6px; }
.res-conf strong { color: var(--ink); }
.res-nomatch .res-date { color: var(--ink); font-size: clamp(30px, 4vw, 44px); }

/* serial breakdown: the serial set large in monospace, decoded parts underlined in red with labels under them */
.breakdown { margin: 18px 0 4px; overflow-x: auto; }
.bd-row { display: inline-flex; border-top: 2px solid var(--ink); }
.bd-cell { display: grid; grid-template-rows: auto auto; }
.bd-cell .ch { font: 700 32px/1.2 var(--mono); padding: 6px 3px 4px; text-align: left; border-bottom: 4px solid transparent; white-space: pre; }
.bd-cell.hit { margin: 0 4px; }
.bd-cell.hit .ch { border-bottom-color: var(--red); }
.bd-cell .lab { font-size: 13px; color: var(--ink-2); padding: 4px 6px 0 2px; white-space: nowrap; }
@media (max-width: 560px) { .bd-cell .ch { font-size: 24px; } }

.cands { width: 100%; border-collapse: collapse; margin: 16px 0 0; font-size: 17px; }
.cands th { font-size: 14px; color: var(--muted); font-weight: 400; }
.cands .likely td { font-weight: 700; }
.cands .likely td:first-child::before { content: ""; display: inline-block; width: 10px; height: 10px; background: var(--red); margin-right: 8px; }

/* typical life: a hairline scale with the unit marked */
.life { margin: 24px 0 0; }
.life-h { font-weight: 700; margin: 0 0 6px; }
.life-scale { position: relative; height: 46px; border-bottom: 2px solid var(--ink); }
.life-band { position: absolute; bottom: 0; height: 14px; background: var(--wash); border-left: 1px solid var(--ink); border-right: 1px solid var(--ink); }
.life-mark { position: absolute; bottom: 0; width: 4px; height: 40px; background: var(--red); transform: translateX(-2px); }
.life-ticks { position: relative; height: 22px; font-size: 13px; color: var(--muted); }
.life-ticks span { position: absolute; transform: translateX(-50%); top: 4px; }
.life-text { margin: 6px 0 0; }
.flag { border-left: 6px solid var(--warn); padding: 6px 12px; margin: 14px 0 0; }
.flag-past { border-left-color: var(--red); }
.res-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* brand lists */
.blist { list-style: none; margin: 0; padding: 0; columns: 3 220px; column-gap: 32px; }
.blist li { break-inside: avoid; border-bottom: 1px solid var(--line); }
.blist a { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; text-decoration: none; font-size: 18px; }
.blist .ex { font-family: var(--mono); font-size: 14px; color: var(--muted); align-self: center; }
.catgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
@media (max-width: 900px) { .catgrid { grid-template-columns: minmax(0, 1fr); } }
.cat h2 { border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin: 28px 0 0; }
.cat h2 a { text-decoration: none; }
.cat .blist { columns: 1; }

/* tables */
.tbl { overflow-x: auto; margin: 12px 0 18px; }
table { border-collapse: collapse; width: 100%; font-size: 16px; }
th { text-align: left; border-bottom: 2px solid var(--ink); padding: 7px 14px 7px 0; font-weight: 700; }
td { border-bottom: 1px solid var(--line); padding: 7px 14px 7px 0; vertical-align: top; }
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 18px; border-top: 2px solid var(--ink); margin: 8px 0 18px; }
.codes div { display: flex; gap: 10px; border-bottom: 1px solid var(--line); padding: 6px 0; font-size: 15px; }
.codes b { font-family: var(--mono); font-size: 17px; min-width: 1.6ch; }

/* format blocks on brand pages */
.fmt { border-top: 1px solid var(--ink); padding-top: 12px; margin-top: 22px; }
.fmt h3 { margin-top: 0; }
.conf-medium, .conf-low { border-left: 6px solid var(--warn); padding-left: 8px; }
.src { font-size: 15px; padding-left: 20px; }
.src li { margin: 4px 0; }

/* diagrams */
.diagram { border: 2px solid var(--ink); padding: 12px; background: #fff; margin: 10px 0 8px; }
.diagram svg { display: block; width: 100%; height: auto; max-height: 340px; }
.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px 32px; }
.dgrid figure { margin: 0; }
.dgrid-sm { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.dgrid-sm .diagram { padding: 6px; }
figcaption { font-size: 15px; color: var(--ink-2); }

/* faq */
.faq details { border-bottom: 1px solid var(--ink); }
.faq summary { cursor: pointer; list-style: none; padding: 14px 28px 14px 0; font-weight: 700; font-size: 18px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 24px; font-weight: 400; }
.faq details[open] summary::after { content: "\2212"; }
.faq .a { padding: 0 0 14px; max-width: 70ch; }

/* footer */
.foot { border-top: 6px solid var(--ink); margin-top: 72px; padding: 24px 0 40px; font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot h2 { font-size: 16px; margin: 0 0 6px; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin: 3px 0; }
.foot .legal { margin-top: 24px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.foot .legal a { color: var(--muted); }
