/* design: v2 */
/* Board B, "The part in the vise" (design/home-v2-B.png, James's pick, 2 Dec 2026). A toolroom: Blender renders of a
   machined bracket in a vise on deep green, a light steel-grey reading surface, ruled tables with green heads, Russo One
   for headings and Overpass for text. Orange only on the one button and on key figures. The board is a light page, so
   the site keeps its light surfaces in dark mode too (color-scheme: light, no dark overrides): every colour pair below
   is checked on these surfaces only. */
@font-face { font-family: "Russo One"; src: url("/fonts/russo-one.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Overpass"; src: url("/fonts/overpass.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --brand: #1c5a0c;        /* toolroom green: header, table heads, page marks (the board's #1B5E3C is taken nearby) */
  --brand-deep: #133d08;   /* the footer and the hero's shadows */
  --bg: #e1e4e6;           /* light steel grey, the reading surface */
  --text: #1e2327;         /* the board's near-black ink */
  --muted: #4c565e;        /* the board's #6E7882, darkened to read on the grey */
  --line: #c7ced3;         /* the board's steel grey: rules */
  --card: #f6f7f7;         /* table rows and panels */
  --link: #194f0b;
  --orange: #e76f00;       /* the one button */
  --orange-ink: #b95300;   /* orange figures in text: 4.9:1 on the rows, 3.8:1 on the grey at heading size */
  --cream: #f1ecdc;        /* headings on the green */
  --head-font: "Russo One", "Arial Black", system-ui, sans-serif;
  --text-font: "Overpass", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --good: #1f5d2a;
  --warn: #8a4b00;
  --bad: #9b1c1c;
  color-scheme: light;
}
body { background: var(--bg); color: var(--text); font-family: var(--text-font); font-size: 17px; line-height: 1.6; }
h1, h2, h3, .verdict, .wordmark { font-family: var(--head-font); font-weight: 400; letter-spacing: 0; }
h1 { font-size: clamp(2rem, 4.4vw, 2.75rem); line-height: 1.08; }
h2 { font-size: 1.5rem; line-height: 1.2; margin: 1.6em 0 0.5em; }
h3 { font-size: 1.12rem; line-height: 1.25; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
q { font-style: normal; }
strong { font-weight: 750; }
.note { color: var(--muted); font-size: 0.85rem; }
p.warn { color: var(--warn); }

.wide { max-width: 1380px; margin: 0 auto; padding: 0 28px; }

/* ---------------------------------------------------------------- header and footer */
.site-header { background: var(--brand); border-bottom: 0; }
.site-header .wrap, .site-footer .wrap { max-width: 1380px; padding: 0 28px; }
.header-row { padding-top: 12px; padding-bottom: 12px; }
.brand .wordmark { font-size: 1.55rem; line-height: 1.1; color: var(--cream); }
.site-header .brand { color: var(--cream); }
.main-nav { gap: 4px 34px; font-size: 1rem; }
.main-nav a { color: #ffffff; padding: 8px 0 6px; border-bottom: 3px solid transparent; }
.main-nav a:hover { color: #ffffff; text-decoration: none; border-bottom-color: rgba(255, 255, 255, 0.5); }
.main-nav a[aria-current="page"] { color: #ffffff; text-decoration: none; border-bottom-color: var(--orange); }
.site-header .menu-btn { color: #ffffff; border-color: rgba(255, 255, 255, 0.6); }
.has-menu.menu-open .main-nav a { border-top-color: rgba(255, 255, 255, 0.25); border-bottom: 0; }
@media (max-width: 760px) {
  .brand .wordmark { font-size: 1.3rem; }
  .header-row { flex-wrap: nowrap; }
}

.site-footer { background: var(--brand-deep); color: #dfe7dc; border-top: 0; margin-top: 56px; }
.site-footer a { color: #f1ecdc; }
.site-footer .brand .wordmark, .footer-brand .brand { color: var(--cream); }
.footer-col h2 { font-family: var(--head-font); font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 1rem; color: var(--cream); }
.footer-legal::before { border-top-color: rgba(255, 255, 255, 0.2); }
.footer-publisher { font-family: var(--head-font); font-size: 0.95rem; color: var(--cream); }

/* ---------------------------------------------------------------- the home: render hero, tool panel */
.hero { position: relative; background: #16261a; color: #ffffff; overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 42% 50%; }
/* a soft fall of the green over the left, where the words sit, so they read on the render */
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(90deg, rgba(22, 38, 26, 1) 0%, rgba(22, 38, 26, 0.94) 22%, rgba(22, 38, 26, 0.6) 33%, rgba(22, 38, 26, 0) 44%),
    linear-gradient(0deg, rgba(22, 38, 26, 0.5) 0%, rgba(22, 38, 26, 0) 35%); }
/* on a wide screen the render starts a little way in, so the part in the vise sits between the words and the panel */
@media (min-width: 901px) { .hero-img { left: 8%; width: 92%; object-position: 0% 50%; } }
@media (min-width: 901px) and (max-width: 1250px) { .hero-img { left: 0; width: 100%; object-position: 30% 50%; } }
.hero-in { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) 384px; gap: 40px; align-items: start; min-height: 520px; padding-top: 44px; padding-bottom: 40px; }
.hero h1 { color: var(--cream); font-size: clamp(2.2rem, 4.3vw, 3.9rem); line-height: 1.08; margin: 0 0 22px; max-width: 11em; text-shadow: 0 2px 18px rgba(10, 20, 12, 0.55); }
.hero-lede { font-size: 1.22rem; line-height: 1.5; color: #eef2ec; max-width: 27rem; margin: 0; text-shadow: 0 1px 10px rgba(10, 20, 12, 0.7); }
.hero-text { padding-top: 6px; }

.tool-form { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 18px 20px; }
.hero-panel { box-shadow: 0 18px 40px rgba(6, 14, 8, 0.45); border: 0; padding: 20px 22px 22px; }
.tool-form p { margin: 0 0 12px; }
.tool-form fieldset { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
.tool-form legend, .tool-form .field-row > label, .tool-form p > label[for="s-mat"], .tool-form p > label[for="s-d"], .tool-form p > label[for="s-fl"], .tool-form p > label[for="s-machine"] { font-weight: 750; font-size: 0.95rem; padding: 0; margin-bottom: 4px; display: block; }
.tool-form .hint { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.tool-form .field-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; }
.tool-form .field-row select { width: 100%; }
.tool-form .field-row > label { margin: 0; }
.tool-form select, .tool-form input[type="number"] {
  font: inherit; font-size: 1rem; color: var(--text); background: #ffffff; border: 1px solid #9aa4ab; border-radius: 3px; padding: 5px 8px; max-width: 100%;
}
.tool-form select:focus, .tool-form input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.tool-form .xyz { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.tool-form .xyz label { font-weight: 750; }
.tool-form .xyz input { width: 3.9rem; }
.tool-form .xyz select { padding: 5px 4px; }
.tool-form .unit-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tool-form label.check { display: flex; gap: 10px; align-items: center; margin: 3px 0; font-size: 0.97rem; }
.tool-form input[type="checkbox"], .tool-form input[type="radio"] { width: 17px; height: 17px; accent-color: var(--brand); margin: 0; }
.tool-form .market label { display: inline-flex; gap: 8px; align-items: center; margin-right: 26px; }
.tool-form .go { margin: 16px 0 0; }
.tool-form button {
  width: 100%; font-family: var(--head-font); font-size: 1.5rem; line-height: 1.2; color: #ffffff; background: var(--orange);
  border: 0; border-radius: 5px; padding: 11px 14px; cursor: pointer; box-shadow: 0 2px 0 #a74f00;
}
.tool-form button:hover { background: #d46400; }
.tool-form button:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }

/* ---------------------------------------------------------------- the home below the hero */
.home-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); gap: 0 40px; padding-top: 30px; }
.cut-col { border-left: 1px solid var(--line); padding-left: 38px; }
.cut-col h2:first-child { margin-top: 0.15em; }
.home-more { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 0 40px; margin-top: 18px; border-top: 1px solid var(--line); }
.home-more .facts { padding-left: 0; list-style: none; }
.facts li, .maker-says li { margin-bottom: 0.55rem; }
.facts li { position: relative; padding-left: 22px; }
.facts li::before, .maker-says li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 10px; height: 10px; background: var(--orange); }
.maker-quote { margin: 14px 0 6px; background: #d4d9dc; border-radius: 3px; padding: 12px 16px 12px 52px; position: relative; font-weight: 600; }
.maker-quote::before { content: "\201C"; position: absolute; left: 14px; top: 2px; font-family: var(--head-font); font-size: 2.8rem; line-height: 1; color: var(--orange-ink); }
.maker-quote p { margin: 0; }
.fig { color: var(--orange-ink); font-weight: 800; }
.arrow-link { font-weight: 750; color: var(--orange-ink); }
.arrow-link::after { content: " \2192"; }

/* ---------------------------------------------------------------- the answer: a ranked list */
.tool-result { min-width: 0; }
.fit-answer { container-type: inline-size; }
.answer .verdict { font-size: 1.62rem; line-height: 1.22; margin: 0 0 14px; color: var(--text); }
.answer .verdict .count { color: var(--orange-ink); }
.rank-head, .machines > li.machine {
  display: grid; grid-template-columns: 22px minmax(0, 1.3fr) minmax(0, 1.45fr) minmax(0, 0.8fr) minmax(0, 0.72fr) minmax(0, 0.72fr); gap: 10px; align-items: start;
}
.rank-head { background: var(--brand); color: #ffffff; font-weight: 750; font-size: 0.85rem; padding: 8px 12px; border-radius: 3px 3px 0 0; }
ol.machines { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-top: 0; background: var(--card); }
.machines > li.machine { padding: 12px; border-top: 1px solid var(--line); margin: 0; }
.machines > li.machine:first-child { border-top: 0; }
.machine .rank { font-family: var(--head-font); font-size: 1.25rem; line-height: 1.3; }
.machine .m-name { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 9px; align-items: start; }
.machine .vise { width: 72px; height: 48px; object-fit: cover; border-radius: 3px; display: block; }
.machine h3 { margin: 0; font-size: 1rem; line-height: 1.25; }
.machine h3 a { color: var(--text); text-decoration: none; }
.machine h3 a:hover { text-decoration: underline; }
.machine .tag { display: block; font-family: var(--text-font); font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.machine p { margin: 0; font-size: 0.9rem; line-height: 1.45; }
.machine .m-words q::before, .machine .m-words q::after { color: var(--muted); }
.machine .needs { margin: 6px 0 0; padding-left: 1.1em; font-size: 0.86rem; }
.machine .m-travel p { font-size: 0.86rem; }
.machine .lbl { display: none; }
.machine .m-price { font-size: 0.95rem; line-height: 1.3; }
.machine .m-price a { font-family: var(--head-font); font-size: 1.05rem; color: var(--text); text-decoration-color: var(--line); }
.machine .m-price.chosen a { color: var(--orange-ink); }
.machine .m-price .note { display: block; font-size: 0.72rem; line-height: 1.28; margin-top: 2px; }
.answer .small { color: var(--muted); font-size: 0.86rem; margin-top: 12px; }
.answer .ok { color: var(--good); }
.answer .warn { color: var(--warn); }
.answer .no { color: var(--bad); }
.st-named { color: var(--good); }
.st-limited, .st-general { color: var(--warn); }
.st-not-recommended { color: var(--bad); }
.st-not-named, .st-unverified { color: var(--muted); }
.answer .st { font-weight: 700; }

/* narrow: each machine becomes a card */
@container (max-width: 600px) {
  .rank-head { display: none; }
  ol.machines { border-top: 1px solid var(--line); border-radius: 3px; }
  .machines > li.machine { grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; }
  .machine .rank { grid-row: 1; }
  .machine .m-name { grid-column: 2 / -1; grid-template-columns: 96px 1fr; }
  .machine .vise { width: 96px; height: 64px; }
  .machine .m-words, .machine .m-travel { grid-column: 2 / -1; }
  .machine .m-us { grid-column: 2; }
  .machine .m-uk { grid-column: 3; }
  .machine .lbl { display: block; font-size: 0.75rem; font-weight: 750; color: var(--muted); }
}

/* ---------------------------------------------------------------- share */
.share-row { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: 18px 0; }
.share-button {
  display: inline-flex; align-items: center; gap: 10px; font: inherit; font-weight: 750; font-size: 1.02rem; color: var(--text);
  background: transparent; border: 2px solid var(--text); border-radius: 5px; padding: 8px 18px 7px; cursor: pointer;
}
.share-button::before {
  content: ""; width: 18px; height: 18px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cpath d='M8.6 13.5l6.8 4M15.4 6.5l-6.8 4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cpath d='M8.6 13.5l6.8 4M15.4 6.5l-6.8 4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.share-button:hover { background: rgba(30, 35, 39, 0.06); }
.share-plain { font-size: 0.95rem; }
.share-note { color: var(--good); }
.share-link { width: 100%; max-width: 32rem; padding: 0.35rem; }

/* ---------------------------------------------------------------- tables, as on the board's phone page */
.table-wrap { overflow-x: auto; margin: 14px 0; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; background: var(--card); border: 1px solid var(--line); }
caption { text-align: left; color: var(--muted); font-size: 0.85rem; padding-bottom: 6px; caption-side: bottom; padding-top: 6px; }
th, td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
thead th { background: var(--brand); color: #ffffff; font-weight: 750; font-size: 0.86rem; border-color: #194f0b; vertical-align: bottom; }
tbody th { background: transparent; font-weight: 750; }
tbody th a { color: var(--text); }
td.price a, .prices td a { font-family: var(--head-font); font-size: 1.05rem; color: var(--orange-ink); }
table.spec th, table.spec td { padding: 6px 12px; }
table.spec tbody th { background: #e9ecee; width: 34%; }
table.metals td { text-align: center; font-size: 0.8rem; line-height: 1.25; padding: 6px 4px; }
table.metals tbody th { font-size: 0.84rem; padding: 6px 8px; min-width: 7.5em; }
table.metals .metal-head { text-align: center; vertical-align: bottom; padding: 8px 6px 6px; line-height: 1.15; }
table.metals .metal-head img { display: block; width: 28px; height: auto; margin: 0 auto 4px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35)); }
table.metals .metal-head span { display: block; font-size: 0.76rem; }
table.feeds th, table.feeds td { white-space: nowrap; }
.answer .feeds { margin: 12px 0; }
.answer .feeds caption { caption-side: top; text-align: left; font-weight: 700; color: var(--text); padding: 0 0 6px; }

/* ---------------------------------------------------------------- inner pages: the board's phone page, wider */
.article-wrap { max-width: 1180px; padding-top: 28px; }
.crumbs { color: var(--muted); }
.crumbs a { color: var(--muted); }
.page-head { position: relative; padding-bottom: 18px; margin-bottom: 26px; border-bottom: 3px solid var(--brand); }
.page-head h1 { margin: 0.05em 0 0.25em; color: var(--text); }
.page-head .lede { font-size: 1.2rem; line-height: 1.5; max-width: 40rem; }
.page-head .byline { margin: 0; }
.page-head.has-art { align-items: flex-end; }
.page-head-art { width: clamp(110px, 20vw, 230px); align-self: center; }
.page-head-art img { filter: drop-shadow(0 8px 10px rgba(20, 30, 22, 0.22)); }
.page-materials-6061-aluminum .page-head-art, .page-materials-360-brass .page-head-art, .page-materials-mild-steel .page-head-art,
.page-materials-stainless-steel .page-head-art { width: clamp(80px, 12vw, 120px); }
.page-workholding-on-a-small-mill .page-head-art img { border-radius: 4px; filter: none; box-shadow: 0 6px 16px rgba(20, 30, 22, 0.25); }
@media (max-width: 560px) {
  .page-head.has-art { flex-direction: row-reverse; align-items: flex-start; }
  .page-head-art { width: 84px; margin-top: 6px; }
  .page-head .lede { font-size: 1.08rem; }
}
.page-body h2 { padding-top: 4px; }
.page-body > ul:not(.maker-says) li::marker { color: var(--orange-ink); }
ul.maker-says { list-style: none; padding-left: 0; }
.maker-says li { position: relative; padding-left: 22px; }
.toc { background: var(--card); border-color: var(--line); border-radius: 4px; }
.toc-title { font-family: var(--head-font); font-weight: 400; }
.callout { border-radius: 4px; }
blockquote { margin: 1em 0; }

/* the tool pages and the answers get the full width for the form and the ranked answer */
.page-feeds-and-speeds .page-body, body[class*="page-answer-"] .page-body { max-width: none; }
.tool { display: grid; gap: 22px; margin: 8px 0 24px; background: transparent; border: 0; padding: 0; }
@media (min-width: 960px) {
  .tool { grid-template-columns: 330px minmax(0, 1fr); align-items: start; }
  .tool .share-row, .tool script { grid-column: 1 / -1; }
}
.tool .tool-result { background: transparent; border: 0; padding: 0; }
.tool .tool-form label { font-weight: 400; }
.feeds-answer > p { font-size: 0.95rem; }

/* the 404: the chip curl beneath the words */
.article-wrap > .page:not(:has(.page-head))::after {
  content: ""; display: block; width: 200px; height: 187px; margin-top: 18px; background: url("/img/spot-chip.webp") no-repeat left center / contain;
}

/* ---------------------------------------------------------------- phones and tablets */
@media (max-width: 1100px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .cut-col { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); margin-top: 18px; }
  .cut-col h2:first-child { margin-top: 1em; }
  .home-more { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .hero { background: #172a1b; }
  .hero::before { display: none; }
  .hero-img { position: relative; height: 230px; object-position: 46% 55%; }
  .hero-in { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 18px; padding-top: 20px; padding-bottom: 24px; }
  .hero h1 { font-size: 2.15rem; margin-bottom: 12px; }
  .hero-lede { font-size: 1.08rem; }
  .hero-panel { box-shadow: none; }
}
@media (max-width: 600px) {
  .wide { padding-left: 16px; padding-right: 16px; }
  .site-header .wrap, .site-footer .wrap { padding: 0 16px; }
  h2 { font-size: 1.35rem; }
  .answer .verdict { font-size: 1.32rem; }
  .tool-form .market label { margin-right: 18px; }
}
