/* Millstone Axle Co — engineering datasheet */

:root {
  color-scheme: light;
  --paper: #eef2f5;
  --sheet: #ffffff;
  --ink: #1c2a36;
  --muted: #4a5866;
  --blue: #24527a;
  --orange: #b44a12;
  --line: #c3ccd5;
  --line-strong: #8794a1;
  --control: #6a7785;
  --tint: #f5f8fa;
  --alert: #a12a22;
  --alert-wash: #fbecea;
  --focus: #1c2a36;

  --light: "Segoe UI Light", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --body: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: Consolas, "Lucida Console", ui-monospace, Menlo, monospace;
  --gutter: clamp(0.75rem, 3vw, 2rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 1rem; line-height: 1.6; font-variant-numeric: tabular-nums; }
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--light); font-weight: 300; line-height: 1.12; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 1.5rem + 3vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); display: flex; gap: 0.9rem; align-items: baseline; }
h3 { font-size: 1.4rem; display: flex; gap: 0.75rem; align-items: baseline; }
.num { font-family: var(--mono); font-size: 0.9rem; color: var(--orange); letter-spacing: 0.04em; flex: none; }
p, ul, ol, dl { margin: 0 0 1em; }
a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.label { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

.frame { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 20; background: var(--ink); color: #fff; padding: 0.6rem 1rem; text-decoration: none; }
.skip-link:focus { top: 1rem; color: #fff; }

/* Header */
.site-header .frame { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 2rem; padding-top: 1rem; padding-bottom: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--ink); text-decoration: none; font-family: var(--light); font-size: 1.45rem; }
.brand svg { width: 2rem; height: 2rem; }
.brand .label { margin-left: 0.25rem; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1.3rem; font-family: var(--mono); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.site-nav a { color: var(--ink); text-decoration: none; display: inline-block; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--line-strong); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--orange); }

/* Sheet */
.sheet { background: var(--sheet); border: 1px solid var(--line-strong); }
.block { padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1rem, 4vw, 2.75rem); border-bottom: 1px solid var(--line); }
.block:last-child { border-bottom: 0; }
.block .intro { color: var(--muted); max-width: 46rem; }
.lead { font-size: 1.15rem; max-width: 42rem; }

/* Spec tables */
.spec { width: 100%; border-collapse: collapse; margin: 1.25rem 0 0; font-size: 0.97rem; }
.spec th, .spec td { text-align: left; vertical-align: top; padding: 0.6rem 0.8rem; border: 1px solid var(--line); }
.spec th { font-family: var(--mono); font-weight: 400; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--tint); width: 26%; }
.spec ul { margin: 0; padding-left: 1.1rem; }
.spec li { margin-bottom: 0.2rem; }
@media (max-width: 34rem) {
  .spec, .spec tbody, .spec tr, .spec th, .spec td { display: block; width: 100%; }
  .spec tr { border: 1px solid var(--line); border-bottom: 0; }
  .spec tr:last-child { border-bottom: 1px solid var(--line); }
  .spec th, .spec td { border: 0; }
  .spec th { padding-bottom: 0.2rem; }
}
.btn { display: inline-block; background: var(--ink); color: #fff; text-decoration: none; font-family: var(--mono); font-size: 0.92rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.75rem 1.2rem; border: 0; cursor: pointer; transition: background-color 0.15s ease; }
.btn:hover { background: var(--blue); color: #fff; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin-top: 1.5rem; }
.actions p { margin: 0; color: var(--muted); font-size: 0.95rem; max-width: 30rem; }

/* Services */
.svc { padding-top: 1.5rem; margin-top: 1.5rem; border-top: 1px dashed var(--line-strong); }
.svc:first-of-type { border-top: 0; margin-top: 0.5rem; padding-top: 0.5rem; }
.svc > p { max-width: 46rem; }
.formula { font-family: var(--mono); background: var(--tint); border-left: 3px solid var(--orange); padding: 0.6rem 0.9rem; font-size: 0.95rem; overflow-wrap: anywhere; }

/* Data path */
.path { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1.5rem; counter-reset: s; }
.path > li { counter-increment: s; position: relative; border: 1px solid var(--ink); background: var(--sheet); padding: 0.75rem 0.9rem; }
.path > li::before { content: counter(s, decimal-leading-zero); display: block; font-family: var(--mono); font-size: 0.8rem; color: var(--orange); margin-bottom: 0.15rem; }
.path > li + li::after { content: ""; position: absolute; left: 50%; top: -1.5rem; height: 1.5rem; border-left: 1.5px solid var(--ink); }
.path b { display: block; font-weight: 600; }
.path small { display: block; color: var(--muted); font-size: 0.92rem; line-height: 1.45; }
.path .scoped { border: 2px dashed var(--orange); background: #fff8f3; }
.path .scoped .tag { display: inline-block; margin-top: 0.4rem; font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--orange); }
@media (min-width: 64rem) {
  .path { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.25rem; }
  .path > li + li::after { left: -1.25rem; top: 50%; width: 1.25rem; height: 0; border-left: 0; border-top: 1.5px solid var(--ink); }
}
.path-note { font-size: 0.92rem; color: var(--muted); margin-top: 1rem; max-width: 50rem; }

/* OEE worked example */
.oee { display: grid; gap: 1.5rem 2.5rem; align-items: start; margin-top: 1rem; }
.oee-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.oee-table caption { text-align: left; padding-bottom: 0.5rem; }
.oee-table th, .oee-table td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--line); text-align: left; }
.oee-table td.v { font-family: var(--mono); text-align: right; white-space: nowrap; }
.oee-table tr.result th, .oee-table tr.result td { border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); font-weight: 600; }
.illus { display: inline-block; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--orange); border: 1px solid var(--orange); padding: 0 0.4rem; }
@media (min-width: 60rem) { .oee { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }

/* Resource */
.res { display: grid; gap: 1.5rem 2.5rem; align-items: center; }
.res-codes { font-family: var(--mono); font-size: 0.85rem; border: 1px solid var(--line-strong); }
.res-codes div { display: grid; grid-template-columns: 4.5rem 1fr; border-bottom: 1px solid var(--line); }
.res-codes div:last-child { border-bottom: 0; }
.res-codes span { padding: 0.35rem 0.6rem; }
.res-codes span:first-child { color: var(--orange); border-right: 1px solid var(--line); }
@media (min-width: 60rem) { .res { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }

/* Contact */
.contact-grid { display: grid; gap: 1.75rem 2.5rem; margin-top: 1rem; }
@media (min-width: 60rem) { .contact-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr); align-items: start; } }
.contact-grid > *, .oee > *, .res > * { min-width: 0; }
.notice { border-left: 3px solid var(--alert); background: var(--alert-wash); padding: 0.85rem 1rem; font-size: 0.97rem; }
.notice p { margin: 0; }
.notice strong { color: var(--alert); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.enquiry-form { border: 1px solid var(--line-strong); background: var(--tint); padding: 1.25rem clamp(1rem, 3vw, 1.75rem) 1.5rem; }
.form-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.25rem 1rem; margin-bottom: 1rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--line); }
.form-head h3 { margin: 0; }
.form-required-note { font-size: 0.88rem; color: var(--muted); margin: 0; }
.field-row { display: grid; gap: 0 1.25rem; }
@media (min-width: 42rem) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 0.3rem; }
.field .req { color: var(--alert); }
.field .optional { text-transform: none; letter-spacing: 0; color: var(--muted); }
.field-hint { font-size: 0.9rem; color: var(--muted); margin: -0.05rem 0 0.4rem; }
.field input, .field select, .field textarea { display: block; width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--control); border-radius: 0; padding: 0.6rem 0.75rem; min-height: 2.9rem; transition: border-color 0.15s ease; }
.field textarea { resize: vertical; min-height: 8.5rem; line-height: 1.5; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--ink); }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 2.4rem; cursor: pointer; }
.select-wrap::after { content: ""; position: absolute; right: 0.95rem; top: 50%; width: 0.45rem; height: 0.45rem; border-right: 2px solid var(--orange); border-bottom: 2px solid var(--orange); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.field [aria-invalid="true"] { border: 2px solid var(--alert); padding: calc(0.6rem - 1px) calc(0.75rem - 1px); background: #fffafa; }
.field-error { color: var(--alert); font-size: 0.9rem; font-weight: 600; margin: 0.35rem 0 0; }
.field-error::before { content: "Error: "; }
.field-count { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); text-align: right; margin: 0.25rem 0 0; }
.field-count.is-near { color: var(--alert); font-weight: 700; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.error-summary { border: 2px solid var(--alert); background: var(--alert-wash); padding: 0.85rem 1.05rem; margin-bottom: 1.25rem; }
.error-summary h4 { color: var(--alert); font-family: var(--body); font-weight: 600; font-size: 1rem; margin: 0 0 0.3rem; }
.error-summary ul { margin: 0; padding-left: 1.2rem; }
.error-summary a { color: var(--alert); font-weight: 600; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.25rem; }
.form-actions .btn:disabled { background: var(--line-strong); color: var(--ink); cursor: not-allowed; }
.form-privacy { font-size: 0.88rem; color: var(--muted); margin: 0; }
.form-status:empty { display: none; }
.form-status { margin-top: 1.1rem; padding: 0.75rem 1rem; border-left: 3px solid var(--line-strong); background: #fff; font-size: 0.97rem; }
.form-status:focus { outline: none; }
.form-status:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.form-status.is-success { border-left-color: var(--blue); background: #fff; color: var(--ink); }
.form-status.is-error { border-left-color: var(--alert); background: var(--alert-wash); color: var(--alert); }
.form-noscript { border-left: 3px solid var(--line-strong); padding: 0.75rem 1rem; margin-top: 1rem; }

/* Title-block footer */
.titleblock { margin: 1.5rem auto 2rem; }
.tb { display: grid; grid-template-columns: 1fr 1fr; border: 1.5px solid var(--ink); background: var(--sheet); }
.tb div { padding: 0.55rem 0.8rem; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.tb div:nth-child(2n) { border-right: 0; }
.tb .label { display: block; font-size: 0.7rem; }
.tb .val { display: block; font-size: 0.95rem; }
.tb .wide { grid-column: 1 / -1; border-right: 0; }
.tb .wide p { margin: 0; font-size: 0.88rem; color: var(--muted); }
.tb ul { list-style: none; padding: 0; margin: 0.3rem 0 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1.25rem; font-size: 0.9rem; }
.footer-legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 1.5rem; border-right: 0 !important; border-bottom: 0 !important; font-size: 0.9rem; }
.footer-legal p { margin: 0; }
.footer-legal a[aria-current="page"] { color: var(--ink); }
@media (min-width: 52rem) {
  .tb { grid-template-columns: 2fr 2fr 1fr 1fr; }
  .tb div { border-bottom: 1px solid var(--ink); }
  .tb div:nth-child(2n) { border-right: 1px solid var(--ink); }
  .tb div:nth-child(4) { border-right: 0; }
}
@media (max-width: 30rem) { .footer-legal { flex-direction: column; gap: 0.4rem; } }

/* Docs */
.doc-meta { color: var(--muted); font-size: 0.95rem; }
.doc-body { max-width: 44rem; }
.doc-body h2 { font-size: 1.45rem; margin-top: 2rem; }
.doc-body ul { padding-left: 1.2rem; }
.summary { background: var(--tint); border-left: 3px solid var(--blue); padding: 0.9rem 1.1rem; margin-bottom: 1.5rem; }
.summary p:last-child { margin-bottom: 0; }

/* Reason code template */
.rc-meta { list-style: none; padding: 0; margin: 1.1rem 0; display: grid; gap: 0.2rem 1.75rem; }
.rc-meta li { display: flex; gap: 0.6rem; align-items: flex-end; padding-top: 0.6rem; }
.rc-meta span { font-family: var(--mono); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
.rc-meta li::after { content: ""; flex: 1; border-bottom: 1px solid var(--ink); min-width: 3rem; }
@media (min-width: 44rem) { .rc-meta { grid-template-columns: repeat(3, 1fr); } }
.rc-warn { border-left: 3px solid var(--orange); background: var(--tint); padding: 0.65rem 1rem; font-size: 0.95rem; max-width: 60rem; }
.rules { padding-left: 1.3rem; max-width: 58rem; }
.rules li { margin-bottom: 0.35rem; }
.scroll { overflow-x: auto; }
.rc-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 48rem; }
.rc-table th, .rc-table td { border: 1px solid var(--line-strong); padding: 0.45rem 0.6rem; text-align: left; vertical-align: top; }
.rc-table thead th { background: var(--ink); color: #fff; font-family: var(--mono); font-weight: 400; font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; border-color: var(--ink); }
.rc-table td.code { font-family: var(--mono); white-space: nowrap; color: var(--orange); }
.rc-table tr.cat th { background: var(--tint); font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 400; }
.rc-table .blank td { height: 2.2rem; }
.rc-foot { margin-top: 1.75rem; padding-top: 0.8rem; border-top: 1px solid var(--line); font-size: 0.86rem; color: var(--muted); }
.print-hint { color: var(--muted); font-size: 0.95rem; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; color: #000; font-size: 9.5pt; line-height: 1.4; }
  .skip-link, .site-nav, .print-hint, .no-print, .titleblock { display: none !important; }
  .site-header .frame { padding: 0 0 2mm; border-bottom: 1.5px solid #000; }
  .frame { padding: 0; max-width: none; }
  .sheet { border: 0; }
  .block { padding: 4mm 0 0; border: 0; }
  a { color: #000; text-decoration: none; }
  h1 { font-size: 20pt; }
  .num, .rc-table td.code { color: #000; }
  .rc-warn { border-left-color: #000; background: none; }
  .scroll { overflow: visible; }
  .rc-table { min-width: 0; font-size: 8.5pt; }
  .rc-table thead th { background: #e6e6e6; color: #000; border-color: #555; }
  .rc-table th, .rc-table td { border-color: #555; padding: 1.3mm 1.8mm; }
  .rc-table tr.cat th { background: #f2f2f2; }
  .rc-table thead { display: table-header-group; }
  .rc-table tr { break-inside: avoid; }
  .rc-table .blank td { height: 7mm; }
  .rc-meta { grid-template-columns: repeat(3, 1fr); }
}
