/* Shop Tools — styles for shop-tools.html and the machine guide pages.
   Everything is scoped under .shop-tools so it will not disturb the rest of hendy.org.
   Re-skin by editing the variables below. */

@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url("fonts/barlow-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Lora"; font-weight: 400; font-display: swap; src: url("fonts/lora-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Lora"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/lora-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Lora"; font-weight: 600; font-display: swap; src: url("fonts/lora-latin-600-normal.woff2") format("woff2"); }

.shop-tools {
  --enamel: #eef0ee;      /* machine-cabinet grey-white: page background */
  --panel: #ffffff;
  --ink: #1b1f23;
  --steel: #5c6670;       /* secondary text */
  --rule: #cfd4d2;
  --tag: #f6d21f;         /* the yellow tool tags on the carts */
  --tag-deep: #c9a800;
  --coolant: #0e6e78;     /* links, active states */
  --stop: #b3261e;        /* warnings only */
  --body: "Lora", Georgia, serif;
  --label: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  margin: 0;
  background: var(--enamel);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
}
.shop-tools *, .shop-tools *::before, .shop-tools *::after { box-sizing: border-box; }
.shop-tools a { color: var(--coolant); text-underline-offset: 3px; }
.shop-tools a:focus-visible, .shop-tools button:focus-visible, .shop-tools input:focus-visible {
  outline: 3px solid var(--coolant); outline-offset: 2px;
}
.st-wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Site header: placeholder. Replace with hendy.org's own header/nav. */
.st-sitenav { background: var(--ink); }
.st-sitenav .st-wrap { display: flex; gap: 28px; align-items: center; min-height: 56px; flex-wrap: wrap; }
.st-sitenav a { color: #fff; text-decoration: none; font-family: var(--label); font-weight: 500; font-size: 20px; letter-spacing: .02em; }
.st-sitenav a[aria-current="page"] { border-bottom: 3px solid var(--tag); }
.st-sitenav .st-home { font-weight: 700; margin-right: auto; }

/* Headings */
.shop-tools h1, .shop-tools h2, .shop-tools h3 { font-family: var(--label); line-height: 1.1; margin: 0; }
.shop-tools h1 { font-weight: 700; font-size: clamp(44px, 7vw, 76px); letter-spacing: -.005em; }
.shop-tools h2 { font-weight: 700; font-size: 40px; margin-bottom: 16px; }
.shop-tools h3 { font-weight: 600; font-size: 27px; margin: 40px 0 10px; }
.st-lede { font-size: 21px; max-width: 34em; margin: 14px 0 0; }

/* The yellow tag: the one signature element, borrowed from the tool carts */
.st-tag {
  display: inline-block; position: relative;
  background: var(--tag); color: var(--ink);
  font-family: var(--label); font-weight: 700; font-size: 26px; line-height: 1.1;
  padding: 10px 18px 10px 40px;
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 calc(100% - 14px), 0 14px);
}
.st-tag::before { /* punched hole */
  content: ""; position: absolute; left: 16px; top: 50%; width: 11px; height: 11px; margin-top: -5.5px;
  border-radius: 50%; background: var(--enamel); box-shadow: inset 0 1px 2px rgba(27,31,35,.45);
}

/* ---------- Tile page ---------- */
.st-hero { padding: 56px 0 8px; }
.st-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 36px 28px; padding: 40px 0 72px; list-style: none; margin: 0; }
.st-tile { position: relative; display: block; color: inherit; text-decoration: none; }
.st-tile-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: #d9dddb; border: 1px solid var(--rule); }
.st-tile-photo--none { display: grid; place-items: center; font-family: var(--label); font-size: 20px; color: var(--steel);
  background: repeating-linear-gradient(135deg, #e3e6e4 0 14px, #dadedb 14px 28px); }
.st-tile .st-tag { margin: -26px 0 0 -8px; transform: rotate(-1.5deg); transform-origin: left center; max-width: calc(100% - 8px); }
.st-tile-kind { margin: 10px 0 0; color: var(--steel); font-size: 16px; line-height: 1.45; }
.st-tile-status { margin: 6px 0 0; font-family: var(--label); font-weight: 600; font-size: 19px; }
a.st-tile .st-tile-status { color: var(--coolant); text-decoration: underline; text-underline-offset: 3px; }
a.st-tile:hover .st-tile-photo, a.st-tile:focus-visible .st-tile-photo { border-color: var(--ink); box-shadow: 0 0 0 3px var(--tag); }
.st-tile--soon .st-tile-photo { filter: grayscale(1) contrast(.9); opacity: .75; }
.st-tile--soon .st-tag { background: #dfe2e0; }
.st-tile--soon .st-tile-status { color: var(--steel); }

/* ---------- Guide page ---------- */
.st-crumbs { font-family: var(--label); font-size: 19px; padding: 22px 0 0; }
.st-guidehead { padding: 14px 0 30px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; }
.st-guidehead h1 { font-size: clamp(38px, 5.6vw, 62px); }
.st-download { display: inline-block; font-family: var(--label); font-weight: 600; font-size: 20px; white-space: nowrap;
  background: var(--ink); color: #fff !important; text-decoration: none; padding: 11px 18px; border-radius: 3px; }
.st-download:hover { background: var(--coolant); }
.st-download small { font-weight: 500; opacity: .8; font-size: 16px; }

/* Horizontal tabs */
.st-tabbar { position: sticky; top: 0; z-index: 5; background: var(--enamel); border-bottom: 2px solid var(--ink); }
.st-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; padding: 8px 0 0; margin: 0; }
.st-tabs button {
  flex: none; font-family: var(--label); font-weight: 600; font-size: 19px; line-height: 1;
  color: var(--ink); background: transparent; border: 0; border-radius: 3px 3px 0 0;
  padding: 11px 11px 12px; cursor: pointer;
}
.st-tabs button:hover { background: #dfe3e0; }
.st-tabs button[aria-selected="true"] { background: var(--tag); }

.st-panel { background: var(--panel); border: 1px solid var(--rule); border-top: 0; padding: 40px clamp(20px, 5vw, 56px) 56px; margin-bottom: 72px; }
.js .st-panel[hidden] { display: none; }
.st-panel + .st-panel { margin-top: -48px; }             /* no-JS: panels stack */
.js .st-panel + .st-panel { margin-top: 0; }
.st-panel > :where(p, ul, ol) { max-width: 40em; }
.st-panel p { margin: 0 0 16px; }
.st-panel ul, .st-panel ol { margin: 0 0 18px; padding-left: 1.4em; }
.st-panel li { margin-bottom: 7px; }
.st-panel ol > li::marker { font-family: var(--label); font-weight: 700; }
.st-pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--rule); max-width: none !important; }
.st-pager button { font-family: var(--label); font-weight: 600; font-size: 20px; color: var(--coolant); background: none; border: 0; padding: 6px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Key caps: these are physical keys on the control */
.shop-tools kbd {
  font-family: var(--label); font-weight: 600; font-size: .92em; letter-spacing: .02em; white-space: nowrap;
  background: #f3f4f3; border: 1px solid #aeb5b2; border-bottom-width: 3px; border-radius: 4px; padding: 0 6px 1px;
}
.shop-tools kbd.st-stop { background: var(--stop); border-color: #7d1a15; color: #fff; }
.shop-tools kbd.st-go { background: #2c7a3f; border-color: #1c5229; color: #fff; }

/* Tables */
.st-tablewrap { overflow-x: auto; margin: 0 0 22px; }
.shop-tools table { border-collapse: collapse; width: 100%; font-size: 16.5px; line-height: 1.45; }
.shop-tools th { font-family: var(--label); font-weight: 600; font-size: 19px; text-align: left; background: var(--enamel); border-bottom: 2px solid var(--ink); padding: 8px 12px; }
.shop-tools td { border-bottom: 1px solid var(--rule); padding: 9px 12px; vertical-align: top; }
.shop-tools td:first-child { font-weight: 600; }

/* Code */
.shop-tools pre { background: var(--ink); color: #e9ecea; font-family: var(--mono); font-size: 14.5px; line-height: 1.55; padding: 18px 20px; overflow-x: auto; border-left: 6px solid var(--tag); margin: 0 0 22px; }

/* Checklists */
.st-checklist { list-style: none; padding-left: 0 !important; }
.st-checklist label { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: start; cursor: pointer; }
.st-checklist input { width: 20px; height: 20px; margin: 5px 0 0; accent-color: var(--coolant); }

/* Quick cards */
.st-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 28px; }
.st-card { border: 2px solid var(--ink); padding: 0 22px 16px; background: #fff; }
.st-card h3 { margin: 0 -22px 16px; padding: 10px 22px; background: var(--tag); font-size: 25px; }
.st-card ol, .st-card ul, .st-card p { max-width: none; }

/* Keypad diagram */
.st-figure { margin: 8px 0 22px; }
.st-figure svg { display: block; width: 100%; height: auto; max-width: 860px; }
.st-figure figcaption { color: var(--steel); font-size: 15.5px; margin-top: 6px; }

.st-foot { color: var(--steel); font-size: 15.5px; padding: 0 0 48px; }

@media (max-width: 640px) {
  .shop-tools { font-size: 17px; }
  .st-guidehead { grid-template-columns: 1fr; }
  .st-tag { font-size: 23px; }
}
@media (prefers-reduced-motion: no-preference) {
  a.st-tile .st-tag { transition: transform .15s ease; }
  a.st-tile:hover .st-tag { transform: rotate(0deg); }
}
@media print {
  .st-sitenav, .st-tabbar, .st-download, .st-pager { display: none !important; }
  .shop-tools { background: #fff; font-size: 11pt; }
  .st-panel, .js .st-panel[hidden] { display: block !important; border: 0; padding: 0; margin: 0 0 24pt; }
  .st-card { break-inside: avoid; }
}
