/* Protogears — a parts catalog drawn by its own gear engine.
   Drafting-gray page, white sheets, black line drawings, catalog-blue links. Barlow (body) + Barlow Semi Condensed (headings, tables). */
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url(fonts/barlow-400.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url(fonts/barlow-500.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url(fonts/barlow-600.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url(fonts/barlow-700.woff2) format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 400; font-display: swap; src: url(fonts/barlow-sc-400.woff2) format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 500; font-display: swap; src: url(fonts/barlow-sc-500.woff2) format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-display: swap; src: url(fonts/barlow-sc-600.woff2) format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 700; font-display: swap; src: url(fonts/barlow-sc-700.woff2) format("woff2"); }

:root {
  --paper: #e8eae9;        /* drafting gray page */
  --panel: #ffffff;        /* sheets */
  --field: #f6f7f7;        /* input wells */
  --ink: #20272d;
  --muted: #5d676e;
  --line: #c4c9ca;
  --line-soft: #dfe2e2;
  --link: #0a58c2;
  --accent: #174a94;       /* buttons, selected state */
  --accent-ink: #ffffff;
  --accent-tint: #e6edf8;
  --mark: #fff0b3;         /* highlighter for key values */
  --good: #1f7240;
  --warn: #9a5800;
  --bad: #b0281f;
  --construct: #8b969d;
  --font-display: "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif;
  --font-body: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif;   /* numbers: tabular figures, not monospace */
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 400 15.5px/1.5 var(--font-body); -webkit-text-size-adjust: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.num, td.v, .v { font-variant-numeric: tabular-nums lining-nums; }

/* header: a thin white strip, like the top of a catalog page */
.site-header { background: var(--panel); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 10px 28px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { display: block; height: 36px; width: auto; }
/* the logo at the top of printed paperwork (packing slips, QA sheets, procedures) */
.print-brand { display: none; }
@media print { .print-brand { display: block; height: 34px; width: auto; margin: 0 0 16px; } }
.site-nav { display: flex; gap: 4px 20px; flex-wrap: wrap; flex: 1; }
.site-nav a { color: var(--ink); font: 500 15.5px var(--font-body); padding: 3px 0; }
.site-nav a[aria-current="page"] { color: var(--link); box-shadow: inset 0 -2px 0 var(--link); }
.site-nav a:hover { color: var(--link); text-decoration: none; }
.header-note { font-size: 13.5px; color: var(--muted); }
.header-tools { display: flex; gap: 16px; font: 500 15.5px var(--font-body); }
.header-tools a { color: var(--ink); }
.header-tools a[aria-current="page"] { color: var(--link); box-shadow: inset 0 -2px 0 var(--link); }
@media (max-width: 640px) { .site-header .wrap { gap: 6px 18px; } .header-tools { margin-left: auto; } .site-nav { flex-basis: 100%; order: 3; gap: 2px 16px; } .site-nav a { font-size: 15px; } .header-note { display: none; } }

.wrap { max-width: 1220px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; text-wrap: balance; }
h1 { font-weight: 600; font-size: clamp(28px, 3.6vw, 38px); line-height: 1.08; letter-spacing: -.01em; }
h2 { font-weight: 600; font-size: 24px; line-height: 1.15; }
h3 { font-weight: 600; font-size: 19px; line-height: 1.2; }
p { margin: 0; }
.lede { font-size: 17px; color: var(--muted); max-width: 66ch; }

/* sheets: white panels with a plain rule, small radius */
.panel, .sheet { background: var(--panel); border: 1px solid var(--line); border-radius: 3px; }
.sheet { padding: 22px 24px; }

.btn { display: inline-block; font: 600 15px var(--font-body); border-radius: 3px; padding: 8px 16px; cursor: pointer; border: 1px solid var(--accent); background: var(--panel); color: var(--accent); }
.btn:hover { text-decoration: none; background: var(--accent-tint); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #123c7a; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.chip { font: 500 12.5px var(--font-body); padding: 1px 7px; border-radius: 2px; border: 1px solid currentColor; display: inline-block; }
.chip.ok { color: var(--good); } .chip.warn { color: var(--warn); } .chip.bad { color: var(--bad); } .chip.info { color: var(--accent); }
mark { background: var(--mark); color: inherit; padding: 0 2px; }

/* catalog tables */
table.spec { border-collapse: collapse; width: 100%; font: 15px/1.35 var(--font-display); }
table.spec th, table.spec td { padding: 6px 10px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
table.spec thead th { font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); background: #f3f4f4; }
table.spec td.r, table.spec th.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.spec tbody tr:nth-child(even) td { background: #fafbfb; }

/* long-form text (Learn, FAQ, policies) */
.prose { max-width: 70ch; display: grid; gap: 14px; line-height: 1.6; }
.prose h2 { margin-top: 22px; }
.prose h3 { margin-top: 10px; }
.prose ul, .prose ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.prose figure { margin: 8px 0; display: grid; gap: 6px; }
.prose figure svg { width: 100%; height: auto; background: var(--panel); border: 1px solid var(--line-soft); }
.prose figcaption { font-size: 14px; color: var(--muted); }
.prose figcaption b { color: var(--ink); font-weight: 600; }
.prose .eq { font: 500 17px var(--font-display); padding: 6px 12px; background: #f4f5f5; border-left: 3px solid var(--line); justify-self: start; font-variant-numeric: tabular-nums; }
.prose table.spec { font-size: 14.5px; }
.prose .try { border: 1px solid var(--line); background: #f7f8f8; padding: 10px 14px; border-radius: 3px; }

.site-footer { border-top: 1px solid var(--line); background: var(--panel); margin-top: 48px; padding: 20px 0 28px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px 28px; }
.site-footer h4 { font: 600 15px var(--font-display); color: var(--ink); margin-bottom: 4px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.site-footer a { color: var(--muted); }
.site-footer address { font-style: normal; line-height: 1.45; }
.site-footer a:hover { color: var(--link); }

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

/* engine-drawn line drawings */
svg.drw { display: block; max-width: 100%; height: auto; }
.drw .ln { fill: none; stroke: var(--ink); stroke-width: 1.15; stroke-linejoin: round; }
.drw .ln.thin { stroke-width: .7; }
.drw .cl { fill: none; stroke: var(--construct); stroke-width: .7; stroke-dasharray: 9 2.5 1.5 2.5; }
.drw .hid { fill: none; stroke: var(--ink); stroke-width: .7; stroke-dasharray: 3.5 2.5; }
.drw .ldr { fill: none; stroke: var(--muted); stroke-width: .7; }
.drw .dim { fill: none; stroke: var(--link); stroke-width: .8; }
.drw .loa { fill: none; stroke: var(--warn); stroke-width: 2; }
.drw .hl { fill: var(--mark); stroke: none; }
.drw .dot { fill: var(--muted); }
.drw .lbl { font: 500 13.5px var(--font-display); fill: var(--ink); }
.drw .lbl.s { font-size: 12px; fill: var(--muted); }
.drw .hatch { fill: none; stroke: var(--ink); stroke-width: .45; }
.drw .powder { fill: #eee4cf; stroke: none; }
.drw .sint { fill: #fff; stroke: var(--ink); stroke-width: 1.15; stroke-linejoin: round; }
.drw .fuse { fill: #f4b26a; stroke: #b5621a; stroke-width: .9; }
.drw .metal { fill: #cfd5da; stroke: var(--ink); stroke-width: 1.15; stroke-linejoin: round; }
.drw .heat { fill: #f7d9c4; stroke: #b5621a; stroke-width: .9; }
.drw .beam { fill: none; stroke: #c4301c; stroke-width: 1.8; }
.drw .glass { fill: #dcebf6; stroke: var(--ink); stroke-width: .9; }
.drw .mirror { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; }
.drw .arr.heatarr { stroke: #b5621a; } .drw .arr.heatarr.head { fill: #b5621a; stroke: none; }
.drw .arr { fill: none; stroke: var(--link); stroke-width: 1.3; }
.drw .arr.head { fill: var(--link); stroke: none; }
.drw .callout { fill: #fff; stroke: var(--ink); stroke-width: .9; }
.drw .num { font: 600 12.5px var(--font-display); fill: var(--ink); }
.drw .grain { fill: #fff; stroke: var(--ink); stroke-width: .8; }
.drw .grainO { fill: none; stroke: var(--ink); stroke-width: 2.2; }
.drw .grainI { fill: #fff; stroke: none; }
.key { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 40px; margin: 10px 0 0; padding-left: 22px; font-size: 15px; }
.key li { margin: 0; }
@media (max-width: 640px) { .key { grid-template-columns: 1fr; } }
.prose .drw .lbl { font-size: 16px; }

/* sign-in dialog */
dialog.auth { border: 1px solid var(--ink); border-radius: 3px; padding: 0; width: min(400px, calc(100vw - 32px)); box-shadow: 4px 4px 0 rgba(32,39,45,.15); color: var(--ink); }
dialog.auth::backdrop { background: rgba(32,39,45,.35); }
dialog.auth form { display: grid; gap: 12px; padding: 18px 20px 20px; }
dialog.auth .auth-head { display: flex; justify-content: space-between; align-items: baseline; }
dialog.auth .ix { border: 0; background: none; font-size: 24px; line-height: 1; cursor: pointer; color: var(--muted); }
dialog.auth label { display: grid; gap: 3px; font-size: 14px; color: var(--muted); }
dialog.auth input { font: 16px var(--font-body); color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 2px; padding: 7px 9px; }
dialog.auth .hint { font-size: 12.5px; }
dialog.auth .auth-msg { font-size: 14px; color: var(--muted); min-height: 1.2em; margin: 0; }
dialog.auth .auth-msg.err { color: var(--bad); }
dialog.auth .auth-foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
dialog.auth .linkbtn { border: 0; background: none; color: var(--link); font: inherit; padding: 0; cursor: pointer; }
dialog.auth .linkbtn:hover { text-decoration: underline; }

/* part types in beta testing are shown only to beta testers (pg.js sets html.pg-beta) */
html:not(.pg-beta) .beta-only { display: none !important; }
