/* Field Kit: the shop's design language. One file of tokens and components, used by the guide and every mock-up.
   The company is Near Field Supply. */

:root {
  /* ground */
  --canvas: #e8e1cf;        /* the page */
  --canvas-light: #f2eddd;  /* cards, tags, raised surfaces */
  --canvas-dark: #d2c9b0;   /* wells: the ground behind a product picture */
  --rule: #b9b095;          /* hairlines on canvas */
  /* ink */
  --ink: #20231c;           /* text */
  --ink-2: #4a4d40;         /* secondary text, captions */
  /* structure */
  --olive: #46553a;         /* mast, labels, section rules, stitching */
  --olive-dark: #2f3a27;    /* footer */
  --olive-pale: #9aa888;    /* text on dark grounds, comments in code */
  --night: #1d2019;         /* code blocks, the app's frame, the night kit's page */
  /* signal: action and live status only */
  --signal: #cc4410;        /* buttons, stamps, "in stock" */
  --signal-ink: #a83608;    /* small orange text on canvas */
  --on-signal: #ffffff;
  /* categories: a thread color on tags and cards, never a background */
  --cat-instruments: #2f5d7c;
  --cat-power: #8a2f2a;
  --cat-light: #a8780c;
  --cat-sensing: #5b4a82;

  --f-display: "Archivo Narrow", "Arial Narrow", "Helvetica Neue", sans-serif;
  --f-text: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-label: "Courier Prime", "Courier New", ui-monospace, monospace;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s6: 24px; --s8: 32px; --s12: 48px; --s16: 64px; --s24: 96px;
  --page: 1180px; --measure: 66ch; --radius: 3px;
}

* { box-sizing: border-box; }
html { background: var(--canvas); }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--f-text); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-color: var(--signal); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2.5px solid var(--signal); outline-offset: 3px; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
.wrap { max-width: var(--page); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

/* ---------- type ---------- */
.display { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; line-height: .98; }
.d1 { font-size: clamp(2.6rem, 6.2vw, 4.6rem); }
.d2 { font-size: clamp(2rem, 4vw, 3rem); }
.d3 { font-size: 1.65rem; line-height: 1.02; }
.d4 { font-size: 1.25rem; line-height: 1.05; letter-spacing: .03em; }
.label { font-family: var(--f-label); font-weight: 700; font-size: .84rem; line-height: 1.3; color: var(--olive); }
.lede { font-size: 1.2rem; line-height: 1.45; max-width: 44ch; }
.muted { color: var(--ink-2); }
.small { font-size: .88rem; }

/* ---------- mast and footer ---------- */
.mast { background: var(--olive); color: var(--canvas-light); }
.mast .wrap { display: flex; align-items: center; gap: var(--s6); min-height: 60px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 700; font-size: 1.4rem; letter-spacing: .12em; text-transform: uppercase; color: inherit; text-decoration: none; white-space: nowrap; }
.wordmark svg { width: 26px; height: 18px; flex: none; }
.mast nav { display: flex; gap: var(--s6); flex: 1; font-family: var(--f-label); font-size: .92rem; }
.mast nav a { color: inherit; text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.mast nav a:hover, .mast nav a[aria-current] { border-bottom-color: var(--canvas-light); }
.mast .cart { margin-left: auto; font-family: var(--f-label); font-weight: 700; font-size: .88rem; background: var(--signal); color: var(--on-signal); padding: 5px 12px; border-radius: var(--radius); text-decoration: none; white-space: nowrap; }
.crumbs { font-family: var(--f-label); font-size: .84rem; color: var(--ink-2); padding-top: var(--s4); }
.crumbs a { color: inherit; }

.foot { background: var(--olive-dark); color: var(--canvas-light); margin-top: var(--s24); padding: var(--s12) 0 var(--s16); font-size: .92rem; }
.foot .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--s8); }
.foot h4 { font-family: var(--f-label); font-size: .84rem; color: var(--olive-pale); margin-bottom: var(--s2); }
.foot a { color: inherit; text-decoration-color: var(--olive-pale); display: block; padding: 3px 0; }
.foot a.wordmark { display: inline-flex; }
.foot .fine { margin-top: var(--s8); padding-top: var(--s4); border-top: 1px solid rgba(242, 237, 221, .25); color: var(--olive-pale); font-size: .82rem; }

/* ---------- sections ---------- */
.sec { padding: var(--s16) 0 0; }
.sec-head { display: flex; align-items: baseline; gap: var(--s4); border-top: 2px solid var(--olive); padding-top: var(--s3); margin-bottom: var(--s8); }
.sec-head .n { font-family: var(--f-label); font-weight: 700; color: var(--olive); font-size: .92rem; }
.sec-head h2 { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; font-size: 1.9rem; line-height: 1; letter-spacing: .02em; }
.sec-head .aside { margin-left: auto; font-style: italic; color: var(--ink-2); font-size: .88rem; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); align-items: start; }
.prose p + p { margin-top: var(--s3); }
.prose { max-width: var(--measure); }

/* ---------- tag: what a thing is, as on a luggage tag ---------- */
.tag { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-label); font-weight: 700; font-size: .8rem; line-height: 1; color: var(--ink); background: var(--canvas-light); border: 1.5px solid var(--ink); border-radius: 999px var(--radius) var(--radius) 999px; padding: 6px 10px 5px 8px; white-space: nowrap; }
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--canvas); flex: none; }
.tag i { font-style: normal; padding-left: 8px; border-left: 3px solid var(--olive); }
.tag.instruments i { border-left-color: var(--cat-instruments); }
.tag.power i { border-left-color: var(--cat-power); }
.tag.light i { border-left-color: var(--cat-light); }
.tag.sensing i { border-left-color: var(--cat-sensing); }

/* ---------- buttons and links ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .12em; line-height: 1; padding: 14px 20px 13px; border-radius: var(--radius); border: 2px solid var(--signal); background: var(--signal); color: var(--on-signal); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--signal-ink); border-color: var(--signal-ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--canvas-light); }
.btn.off { background: transparent; border: 2px dashed var(--ink-2); color: var(--ink-2); cursor: default; }
.btn.off:hover { background: transparent; border-color: var(--ink-2); }
.btn .p { font-family: var(--f-label); letter-spacing: 0; font-size: 1rem; padding-left: 10px; border-left: 1.5px solid rgba(255, 255, 255, .55); }
.go { font-family: var(--f-label); font-weight: 700; font-size: .92rem; color: var(--ink); white-space: nowrap; }
.go::after { content: " \2192"; }

/* ---------- the number and its condition ---------- */
.fig { font-family: var(--f-text); font-weight: 800; font-size: 1.5rem; line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
.fig.big { font-family: var(--f-display); font-weight: 700; font-size: 2.5rem; line-height: 1; }
.fig small { font-size: .55em; font-weight: 700; margin-left: 3px; }
.cond { font-style: italic; color: var(--ink-2); font-size: .9rem; line-height: 1.35; margin-top: 3px; }
.mark { display: inline-block; font-family: var(--f-label); font-weight: 700; font-style: normal; font-size: .7rem; line-height: 1; color: var(--olive); border: 1.5px solid var(--olive); border-radius: var(--radius); padding: 3px 5px 2px; vertical-align: 2px; white-space: nowrap; text-transform: uppercase; }

/* ---------- status ---------- */
.status { font-family: var(--f-label); font-weight: 700; font-size: .82rem; text-transform: uppercase; white-space: nowrap; }
.status::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.status.in { color: var(--signal-ink); } .status.in::before { background: var(--signal); }
.status.soon { color: var(--olive); } .status.soon::before { border: 2px solid var(--olive); width: 5px; height: 5px; }
.status.out { color: var(--ink-2); } .status.out::before { background: var(--ink-2); border-radius: 0; height: 2px; vertical-align: 4px; }

/* ---------- stamp: a real test and its date, or nothing ---------- */
.stamp { display: inline-block; transform: rotate(-8deg); border: 2.5px solid var(--signal); color: var(--signal); border-radius: 6px; padding: 6px 14px 5px; font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .14em; line-height: 1.05; text-align: center; background: transparent; }
.stamp small { display: block; font-family: var(--f-label); font-size: .68rem; letter-spacing: .04em; margin-top: 2px; }
.stamp.olive { border-color: var(--olive); color: var(--olive); }

/* ---------- kit card ---------- */
.kits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
.kits.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kit { display: flex; flex-direction: column; background: var(--canvas-light); border: 1.5px dashed var(--olive); border-radius: var(--radius); padding: var(--s3); color: inherit; text-decoration: none; }
.kit:hover { border-style: solid; }
.kit .well { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--canvas-dark); border-radius: 2px; margin-bottom: var(--s3); overflow: hidden; }
.kit .well img { width: 90%; height: 90%; object-fit: contain; }
.kit .well .ph { font-family: var(--f-label); font-size: .78rem; text-align: center; color: var(--ink-2); border: 1.5px dashed var(--ink-2); border-radius: var(--radius); padding: 22px 14px; }
.kit .tag { align-self: flex-start; }
.kit h3 { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; font-size: 1.45rem; line-height: 1.02; letter-spacing: .03em; margin: 10px 0 2px; }
.kit .what { font-size: .92rem; color: var(--ink-2); line-height: 1.4; }
.kit .fig { margin-top: 10px; font-size: 1.2rem; }
.kit .row { display: flex; justify-content: space-between; align-items: baseline; margin-top: auto; padding-top: 12px; }
.kit .cond { margin-bottom: 12px; }
.price { font-family: var(--f-label); font-weight: 700; font-size: 1.15rem; }
.price s { font-weight: 400; font-size: .72em; color: var(--ink-2); margin-left: 4px; }
.launch { font-size: .92rem; color: var(--ink-2); margin: -4px 0 var(--s3); }
.ships { font-size: .88rem; color: var(--ink-2); margin: calc(-1 * var(--s3)) 0 var(--s6); max-width: 46ch; }

/* ---------- kit list: what is in the box ---------- */
.kitlist { border: 1.5px dashed var(--olive); border-radius: var(--radius); background: var(--canvas-light); padding: var(--s4); }
.kitlist h4 { font-family: var(--f-label); font-size: .84rem; color: var(--olive); margin-bottom: var(--s2); }
.kitlist ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .95rem; }
.kitlist li { display: grid; grid-template-columns: 22px 1fr; align-items: start; }
.kitlist li::before { content: "\2713"; font-weight: 800; color: var(--olive); border: 1.5px solid var(--olive); border-radius: 2px; width: 15px; height: 15px; display: grid; place-items: center; font-size: 11px; line-height: 1; margin-top: 4px; }
.kitlist li.no { color: var(--ink-2); }
.kitlist li.no::before { content: ""; border-style: dashed; }

/* ---------- spec rows ---------- */
.spec { width: 100%; border-collapse: collapse; font-size: .95rem; }
.spec th, .spec td { text-align: left; vertical-align: top; padding: 9px 12px 9px 0; border-bottom: 1px dotted var(--ink-2); }
.spec th { font-family: var(--f-label); font-weight: 700; font-size: .82rem; color: var(--olive); width: 32%; padding-top: 11px; }
.spec td { font-variant-numeric: lining-nums tabular-nums; }
.spec-h { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; font-size: 1.25rem; letter-spacing: .04em; margin-bottom: var(--s2); }

/* ---------- the key: find a kit by what you need, with leaders ---------- */
.key { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.key a { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; color: inherit; text-decoration: none; }
.key .k { font-family: var(--f-label); font-weight: 700; color: var(--olive); width: 2.2em; flex: none; }
.key .q { font-size: 1.08rem; }
.key .dots { flex: 1; border-bottom: 2px dotted var(--ink-2); transform: translateY(-4px); min-width: 24px; opacity: .6; }
.key .to { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--signal-ink); white-space: nowrap; }
.key .to::after { content: " \2192"; }
.key a:hover .q { text-decoration: underline; text-decoration-color: var(--signal); }

/* ---------- notice, code, downloads ---------- */
.notice { border-left: 4px solid var(--olive); background: var(--canvas-light); padding: var(--s3) var(--s4); font-size: .95rem; max-width: 80ch; }
.notice strong { font-family: var(--f-label); color: var(--olive); }
pre.code { margin: 0; background: var(--night); color: var(--canvas-light); font-family: var(--f-label); font-size: .88rem; line-height: 1.55; padding: var(--s4) 18px; border-radius: var(--radius); overflow-x: auto; }
pre.code .c { color: var(--olive-pale); }
code { font-family: var(--f-label); font-size: .95em; background: var(--canvas-light); border: 1px solid var(--rule); border-radius: 2px; padding: 0 4px; }
.files { display: grid; gap: 8px; }
.file { display: flex; align-items: center; gap: var(--s3); background: var(--canvas-light); border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 10px 14px; color: inherit; text-decoration: none; }
.file:hover { background: var(--ink); color: var(--canvas-light); }
.file .ext { font-family: var(--f-label); font-weight: 700; font-size: .78rem; border: 1.5px solid currentColor; border-radius: 2px; padding: 3px 5px 2px; }
.file .t { font-weight: 600; }
.file .m { margin-left: auto; font-family: var(--f-label); font-size: .8rem; opacity: .8; white-space: nowrap; }

/* ---------- labelled diagram ---------- */
.dg-scroll { overflow-x: auto; }
.dg { display: block; width: 100%; min-width: 940px; height: auto; }
.dg-l { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.dg-p { fill: var(--signal); stroke: var(--canvas); stroke-width: 2.5; }
.dg-t { font-family: var(--f-display); font-weight: 700; font-size: 27px; fill: var(--ink); text-transform: uppercase; letter-spacing: .03em; }
.dg-s { font-family: var(--f-text); font-size: 19px; fill: var(--ink-2); }
/* The phone version: numbered markers on the picture, and the labels as a key under it. */
.dg-phone { display: none; }
.dg-phone svg { display: block; width: 100%; max-width: 600px; height: auto; overflow: visible; }
.dgm-c { fill: var(--canvas-light); stroke: var(--ink); }
.dgm-n { font-family: var(--f-label); font-weight: 700; fill: var(--ink); }
.dg-key { list-style: none; margin: var(--s4) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s6); border-top: 1.5px solid var(--ink); }
.dg-key li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px dotted var(--ink-2); }
.dg-key .k { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--canvas-light); font-family: var(--f-label); font-weight: 700; font-size: .78rem; line-height: 1; display: grid; place-items: center; }
.dg-key b { display: block; font-family: var(--f-display); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; font-size: 1.08rem; line-height: 1.2; }
.dg-key .s { display: block; font-size: .9rem; line-height: 1.4; color: var(--ink-2); }
figure { margin: 0; }
figcaption { font-style: italic; color: var(--ink-2); font-size: .88rem; margin-top: var(--s2); }

/* ---------- band of three ---------- */
.band { background: var(--olive); color: var(--canvas-light); }
.band .wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s8); padding-top: var(--s6); padding-bottom: var(--s6); }
.band h3 { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 1.15rem; }
.band p { font-size: .92rem; color: #dfe6d4; margin-top: 4px; }

/* ---------- note cards: the way to the field guide ---------- */
.notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.note { border-top: 1.5px solid var(--ink); padding-top: var(--s3); color: inherit; text-decoration: none; display: block; }
.note .label { display: block; margin-bottom: 4px; }
.note h3 { font-family: var(--f-text); font-weight: 800; font-size: 1.15rem; line-height: 1.25; }
.note p { color: var(--ink-2); font-size: .92rem; margin-top: 4px; }

/* ---------- night kit: the dark variant ---------- */
.night { --canvas: #1d2019; --canvas-light: #272b21; --canvas-dark: #14160f; --rule: #3b4132; --ink: #ece6d4; --ink-2: #b9b6a3; --olive: #a9b894; --signal: #f0703a; --signal-ink: #f58c5e; --on-signal: #1d2019; background: var(--canvas); color: var(--ink); }

@media (max-width: 900px) {
  .two, .foot .cols, .band .wrap { grid-template-columns: 1fr; }
  .kits, .kits.three, .notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mast nav { display: none; }
  .dg-scroll { display: none; } .dg-phone { display: block; }
  /* Room for a thumb: links and buttons at least 40 px tall. */
  .mast .cart { padding: 10px 14px; }
  .crumbs { padding-top: 4px; margin-bottom: -12px; } .crumbs a { display: inline-block; padding: 12px 0; }
  .foot a { padding: 9px 0; }
}
@media (max-width: 560px) {
  .kits, .kits.three, .notes { grid-template-columns: 1fr; }
  .sec-head { flex-wrap: wrap; gap: 6px var(--s3); margin-bottom: var(--s6); }
  .sec-head h2 { flex: 1; min-width: 0; font-size: 1.7rem; }
  .sec-head .aside { margin-left: 0; width: 100%; }
  .dg-key { grid-template-columns: 1fr; }
  .file { flex-wrap: wrap; gap: 4px var(--s3); } .file .t { flex: 1; min-width: 0; } .file .m { flex-basis: 100%; margin-left: 0; }
}
@media (max-width: 360px) {
  .mast .wrap { gap: var(--s3); }
  .wordmark { font-size: 1.05rem; letter-spacing: .08em; gap: 8px; }
  .mast .cart { padding: 10px; font-size: .8rem; }
}
