/* Multi-page layout: shared menu, inner pages, product lists and the quote list.
   Loaded after style.css and uses its colour and type tokens. */
.top.static { position: sticky; top: 0; }
.nav { align-items: center; }
.nav > a[aria-current="page"] { opacity: 1; text-decoration: underline; text-underline-offset: 0.3em; }
.nav-item { position: relative; }
.nav > a, .nav-btn { white-space: nowrap; }
.nav-btn, .menu-btn, .plain-btn { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.nav-btn { opacity: 0.86; }
.nav-btn::after { content: ""; display: inline-block; width: 0.42em; height: 0.42em; margin-left: 0.5em; border-right: 2px solid; border-bottom: 2px solid; transform: translateY(-0.18em) rotate(45deg); }
.nav-item.open .nav-btn, .nav-btn:hover { opacity: 1; }
.menu-btn { display: none; margin-left: auto; padding: 0.5em 0.9em; border: 1px solid rgba(234, 223, 205, 0.5); border-radius: 3px; }
.panel { display: none; position: absolute; top: calc(100% + 1.1rem); left: -1.5rem; z-index: 60; padding: 1.5rem; background: #1d1614; border: 1px solid rgba(234, 223, 205, 0.16); border-radius: 4px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }
.nav-item.open .panel { display: grid; }
.panel-wide { grid-template-columns: repeat(5, minmax(9.5rem, 1fr)); gap: 0 2rem; }
.panel-list { grid-template-columns: repeat(2, minmax(12rem, 1fr)); gap: 0 2rem; }
.panel h3 { margin: 0 0 0.6rem; font-size: 0.82rem; font-weight: 500; opacity: 0.65; font-variation-settings: "wdth" 100; }
.panel a { display: block; padding: 0.45rem 0; text-decoration: none; font-weight: 600; }
.panel a span { display: block; font-size: 0.8rem; font-weight: 400; opacity: 0.65; }
.panel a:hover { color: var(--yellow); }
/* Machines menu: one row per machine, name and a short spec beside it */
.panel-machines { grid-template-columns: max-content minmax(16rem, max-content); gap: 0; min-width: 34rem; }
.panel .m-row { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; align-items: baseline; gap: 0 1.6rem; padding: 0.5rem 0; border-top: 1px solid rgba(234, 223, 205, 0.1); text-decoration: none; }
.panel .m-row:first-child { border-top: 0; }
.panel .m-row b { font-weight: 600; white-space: nowrap; }
.panel .m-row span { display: inline; font-size: 0.86rem; font-weight: 400; opacity: 0.7; }
.panel a.m-row:hover b, .panel a.m-row:focus-visible b { color: var(--yellow); }
.panel .m-row.soon { cursor: default; }
#qcount { display: inline-block; min-width: 1.5em; margin-left: 0.3em; padding: 0 0.35em; border-radius: 999px; background: #1b1307; color: var(--yellow); text-align: center; font-variant-numeric: tabular-nums; }

body.inner { background: var(--sand); color: var(--ink); }
body.inner .top, body.inner .foot { color: var(--sand); }
.page { max-width: 78rem; margin: 0 auto; padding: clamp(2.5rem, 7vh, 5rem) var(--pad) clamp(4rem, 10vh, 7rem); }
.page.narrow { max-width: 54rem; }
.page h1 { font-size: clamp(2.4rem, 5.5vw, 4.5rem); font-variation-settings: "wdth" 122; font-weight: 700; }
.page h1 + .lead { margin-top: 1.2rem; }
.page h2 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); }
.page h3 { font-size: 1.15rem; margin: 0; }
.group { margin-top: clamp(2.5rem, 6vh, 4.5rem); }
.group > h2 + p, .group > h2 + ul, .group > h2 + table, .group > h2 + .cards, .group > h2 + h3 { margin-top: 1rem; }
.group > h3 { margin-top: 2rem; }
.crumb { font-size: 0.9rem; opacity: 0.75; margin-bottom: 1.2rem; }
.draft { margin-top: 1.2rem; padding: 0.7rem 1rem; border-left: 4px solid var(--yellow); background: rgba(242, 178, 29, 0.18); font-size: 0.92rem; max-width: none; }
.kind { opacity: 0.8; }
.plain-btn { text-decoration: underline; text-underline-offset: 0.3em; }
button.btn { border: 0; cursor: pointer; font-family: inherit; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 1.2rem; }
.card { display: flex; flex-direction: column; background: #f4ecde; border: 1px solid rgba(42, 28, 24, 0.14); border-radius: 4px; overflow: hidden; }
.card > .thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 0; }
.card > div { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.card h3 a { text-decoration: none; font-size: 1.5rem; font-variation-settings: "wdth" 116; }
.card ul { margin: 0.8rem 0 1.2rem; padding-left: 1.1rem; font-size: 0.95rem; }
.card .actions { margin-top: auto; }

.thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 3px; flex: none; }
.thumb-empty { display: grid; place-items: center; padding: 0.3rem; background: rgba(42, 28, 24, 0.08); border: 1px dashed rgba(42, 28, 24, 0.3); font-size: 0.66rem; line-height: 1.2; text-align: center; opacity: 0.75; }
.rows { list-style: none; margin: 1.2rem 0 0; padding: 0; border-top: 1px solid rgba(42, 28, 24, 0.18); }
.rows li { display: flex; align-items: center; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid rgba(42, 28, 24, 0.18); }
.rows li > div { flex: 1; min-width: 0; }
.rows li span { display: block; font-size: 0.9rem; opacity: 0.75; }
.rows input[type="text"] { display: block; width: min(100%, 26rem); margin-top: 0.4rem; }
.group-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; }
.group-head p { margin-top: 0.4rem; }
.size { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 600; margin-top: 1.5rem; }
.group-head .size { margin-top: 0; }
.page select, .page input, .page textarea { font: inherit; color: inherit; padding: 0.55em 0.7em; background: #fbf6ec; border: 1px solid rgba(42, 28, 24, 0.35); border-radius: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.6rem; }
.chips a { padding: 0.4em 0.8em; border: 1px solid rgba(42, 28, 24, 0.3); border-radius: 999px; text-decoration: none; font-size: 0.92rem; }
.chips a:hover { background: var(--ink); color: var(--sand); }
section[id] { scroll-margin-top: 5.5rem; }
/* spare parts jump bar: sticks under the menu bar (its height is put in --hdr by site.js) */
.chips.jump { position: sticky; top: var(--hdr, 4.5rem); z-index: 40; margin: 1.6rem calc(-1 * var(--pad)) 1.2rem; padding: 0.7rem var(--pad); background: var(--sand); border-bottom: 1px solid rgba(42, 28, 24, 0.14); }
.parts > li[id], .picker[id] { scroll-margin-top: calc(var(--hdr, 4.5rem) + var(--jump, 4rem) + 1rem); }

.spec-table { width: 100%; max-width: 54rem; border-collapse: collapse; margin-top: 0.8rem; font-variant-numeric: tabular-nums; }
.spec-table th, .spec-table td { text-align: left; padding: 0.7rem 1rem 0.7rem 0; border-bottom: 1px solid rgba(42, 28, 24, 0.18); vertical-align: top; }
.spec-table tbody th { font-weight: 600; width: 38%; }
.spec-table thead th { font-size: 0.86rem; font-weight: 500; opacity: 0.75; }
.spec-table th span { display: block; font-size: 0.88rem; font-weight: 400; opacity: 0.75; }
.sizes { max-width: 30rem; }

.m-head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 2rem 3rem; align-items: center; }
.m-head img { border-radius: 3px; }
.m-nophoto { display: grid; place-items: center; min-height: 16rem; padding: 2rem; text-align: center; background: rgba(42, 28, 24, 0.07); border: 1px dashed rgba(42, 28, 24, 0.3); border-radius: 3px; }
.facts-list { margin: 1.2rem 0; padding-left: 1.1rem; }
.depthline { margin-top: 2.5rem; padding: 1rem 1.2rem; background: var(--ochre); border-radius: 3px; max-width: none; }

.inquire { margin-top: clamp(2.5rem, 6vh, 4.5rem); padding: clamp(1.5rem, 4vw, 2.5rem); background: var(--shale); color: var(--sand); border-radius: 4px; }
.inquire h2 { font-size: clamp(1.4rem, 2.4vw, 2rem); }
.opts { margin: 1.4rem 0 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0.6rem 1.5rem; }
.opts legend { padding: 0; margin-bottom: 0.8rem; opacity: 0.8; }
.opts label { display: flex; gap: 0.6rem; align-items: flex-start; }
.opts input { margin-top: 0.3em; accent-color: var(--yellow); }
.inquire-wrap { padding: 0 var(--pad) clamp(3rem, 8vh, 6rem); background: var(--umber); }
.inquire-wrap .inquire { max-width: 78rem; margin: 0 auto; }

.exploded { margin-top: 1.4rem; padding: 1.2rem; background: #f4ecde; border: 1px solid rgba(42, 28, 24, 0.18); border-radius: 4px; }
.ex-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.ex-row { display: flex; align-items: center; gap: 2px; margin: 1.6rem 0 1rem; min-height: 6.5rem; transition: gap 0.5s ease; overflow-x: auto; }
.exploded.apart .ex-row { gap: 14px; }
.ex-part { flex: 1 1 0; min-width: 3.2rem; height: 3.6rem; padding: 0 0.2rem; border: 0; border-radius: 2px; cursor: pointer; font: inherit; font-size: 0.7rem; line-height: 1.15; color: #f4ecde; background: linear-gradient(#8b8f93, #54585c 55%, #3a3d40); transition: transform 0.5s ease; }
.ex-part.inner { height: 2.4rem; background: linear-gradient(#c9a96a, #9a7a3e 55%, #6f5628); }
.exploded.apart .ex-part.inner { transform: translateY(-1.6rem); }
.ex-part:hover { outline: 3px solid var(--yellow); outline-offset: 2px; }
.ex-slot { display: grid; place-items: center; width: min(100%, 22rem); min-height: 9rem; padding: 1rem; text-align: center; font-size: 0.9rem; background: rgba(42, 28, 24, 0.07); border: 1px dashed rgba(42, 28, 24, 0.35); border-radius: 3px; flex: none; }
.parts li.has-ex { align-items: flex-start; flex-wrap: wrap; }

.docs { margin: 1rem 0 0; padding-left: 1.1rem; }
.docs li { padding: 0.3rem 0; }
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 2.5rem 4rem; margin-top: 2.2rem; }
.contact address { font-style: normal; margin: 0.8rem 0 1rem; }
.page form label { display: block; margin-top: 1rem; font-weight: 600; }
.page form label input, .page form label textarea { display: block; width: 100%; margin-top: 0.3rem; font-weight: 400; }
.page form .btn { font-size: 1rem; margin-top: 1.4rem; }
.qlist input { width: 5rem; }
.qform { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; max-width: 54rem; margin-top: 2rem; }
.qform .full { grid-column: 1 / -1; }
.page form label.check { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; }
.page form label.check input { width: auto; margin-top: 0.3em; }
.range a { text-decoration: none; }
.range a:hover { text-decoration: underline; text-underline-offset: 0.3em; }

#toast { position: fixed; left: 50%; bottom: 1.5rem; z-index: 80; transform: translate(-50%, 150%); max-width: min(90vw, 32rem); padding: 0.8rem 1.2rem; border-radius: 4px; background: #1b1307; color: var(--sand); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); transition: transform 0.25s ease; }
#toast.show { transform: translate(-50%, 0); }

@media (max-width: 1180px) {
  .menu-btn { display: inline-block; }
  .top { gap: 0.8rem; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 0.5rem var(--pad) 1.5rem; max-height: calc(100vh - 4rem); overflow-y: auto; background: #1d1614; font-size: 1.05rem; }
  .nav.open { display: flex; }
  .nav > a, .nav-btn { display: block; width: 100%; padding: 0.9rem 0; text-align: left; border-bottom: 1px solid rgba(234, 223, 205, 0.14); opacity: 1; }
  .panel { position: static; padding: 0.4rem 0 1rem 1rem; border: 0; box-shadow: none; background: none; }
  .panel-wide, .panel-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem 1.5rem; }
  .m-head { grid-template-columns: minmax(0, 1fr); }
  .panel-machines { min-width: 0; grid-template-columns: minmax(0, 1fr); }
  .panel .m-row { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
  /* the jump bar becomes one row that scrolls sideways, so it never covers half a phone screen */
  .chips.jump { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .chips.jump::-webkit-scrollbar { display: none; }
  .chips.jump a { flex: none; white-space: nowrap; }
}
@media (max-width: 620px) {
  .panel-wide, .panel-list, .qform { grid-template-columns: minmax(0, 1fr); }
  .rows li { flex-wrap: wrap; }
  .thumb { width: 56px; height: 56px; }
  .spec-table tbody th { width: 45%; }
}

/* ---------- parts pictures: name on hover, click adds to the quote list ---------- */
.picker { margin: 2.2rem 0 2.6rem; }
.picker h2, .pick-rest { margin-bottom: 0.4rem; }
.pick-stage { position: relative; margin-top: 1rem; }      /* the picture is a cut-out: it sits on the page colour */
.pick-stage img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pick { position: absolute; padding: 0; border: 2px solid transparent; border-radius: 6px; background: transparent; cursor: pointer; font: inherit; }
.pick span {
  position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); z-index: 3;
  padding: 0.3em 0.65em; border-radius: 3px; white-space: nowrap; pointer-events: none;
  background: var(--yellow); color: #1b1307; font-size: 0.85rem; font-weight: 650; opacity: 0; transition: opacity 0.12s;
}
/* no frame round a part when the mouse is over it: only its name shows. A frame appears only for keyboard users, so they can see where they are */
.pick:hover { z-index: 2; }
.pick:focus-visible { border-color: #b97a00; outline: none; z-index: 2; }
.pick:hover span, .pick:focus-visible span { opacity: 1; }
.pick-sub { margin: 1.4rem 0 0; font-size: 1rem; }
.pick-list { list-style: none; margin: 0.5rem 0 0; padding-left: 0; columns: 3 14rem; column-gap: 2rem; font-size: 0.92rem; }
.pick-list li { padding: 0.12rem 0; break-inside: avoid; }
@media (max-width: 820px) { .pick span { font-size: 0.7rem; } }
.pick-asm { display: flex; align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem); margin: 1.2rem 0 0.6rem; }
.pick-asm img { display: block; flex: 0 1 26rem; min-width: 0; width: 26rem; max-width: 55%; height: auto; }
.pick-asm > div { flex: 1 1 14rem; }
.pick-asm h3 { margin: 0; font-size: 1.25rem; }
.pick-asm p { margin: 0.5rem 0 1.1rem; max-width: 34ch; }
@media (max-width: 700px) { .pick-asm { display: block; } .pick-asm img { width: 100%; max-width: none; margin-bottom: 1rem; } }
.pick-stage.tall { width: min(100%, 44rem); margin-left: auto; margin-right: auto; }


/* service page photo */
.svc-photo { margin: clamp(1.8rem, 4vh, 3rem) 0 0; }
.svc-photo img { width: 100%; border-radius: 3px; }
.svc-photo + .group, .svc-photo ~ .group, .svc-photo ~ .actions, .svc-photo ~ .note { max-width: 54rem; }

/* a silhouette where a machine has no photo yet */
.sil { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; padding: 6% 6% 0; background: rgba(42, 28, 24, 0.07); border-radius: 3px; overflow: hidden; color: var(--ink); }
.sil img, .sil svg { display: block; width: auto; max-width: 100%; height: 100%; min-height: 0; object-fit: contain; object-position: bottom; opacity: 0.5; align-self: end; }
.sil svg { width: 78%; height: auto; fill: currentColor; align-self: end; margin-bottom: 9%; }
.sil span { position: absolute; left: 0.8rem; top: 0.7rem; font-size: 0.78rem; opacity: 0.7; }
.sil.thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 0; }

/* catalogue download at the top of a machine page */
.cat { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.6rem; margin: 1.4rem 0 0; }
.cat .btn span, .cat .plain span { font-weight: 400; opacity: 0.75; }
.cat-none { display: block; font-size: 0.95rem; opacity: 0.85; }

/* a small drawing of the kind of part, until its photo is on the page */
.rows li .thumb-icon, .thumb-icon { --tile: #ddd0bb; opacity: 1; display: grid; place-items: center; background: var(--tile); color: var(--ink); }
.thumb-icon svg { width: 70%; height: 70%; opacity: 0.8; }
.thumb-icon .cf { fill: var(--tile); } .thumb-icon .cs { stroke: var(--tile); fill: none; }
/* the rotation head picture in the spare parts list */
.part-photo { width: min(100%, 30rem); height: auto; flex: none; }

/* phones: the quote button stays on one line so the menu bar keeps its height */
.top .btn-small { white-space: nowrap; }
@media (max-width: 620px) { .top { gap: 0.6rem; } .top .brand img { width: 128px; } .top .btn-small, .top .menu-btn { padding: 0.5em 0.75em; font-size: 0.88rem; } }
/* phones: the silhouette label sits clear of the mast, and the part note field takes the full row */
@media (max-width: 700px) { .sil span { left: auto; right: 0.8rem; } .rows.parts input[type="text"] { width: 100%; font-size: 0.9rem; } }

/* language switch at the end of the menu */
.lang { display: inline-flex; gap: 0.9rem; margin-left: 0.6rem; padding-left: 1.1rem; border-left: 1px solid rgba(234, 223, 205, 0.3); font-size: 0.9rem; }
.lang a { opacity: 0.7; text-decoration: none; }
.lang a[aria-current] { opacity: 1; text-decoration: underline; text-underline-offset: 0.35em; }
@media (max-width: 1180px) { .lang { margin: 0.6rem 0 0; padding: 0.9rem 0 0; border-left: 0; border-top: 1px solid rgba(234, 223, 205, 0.2); gap: 1.4rem; font-size: 1rem; } }

/* forms sent from the page: a field only robots fill in, and the line that reports a failed send */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-msg { margin-top: 1rem; font-weight: 600; }
.form-msg:empty { display: none; }
.page form button.btn:disabled { opacity: 0.6; cursor: progress; }

/* contact page: the factory on the map */
.map { margin-top: 1.4rem; aspect-ratio: 4 / 3; border: 1px solid rgba(42, 28, 24, 0.2); background: #ddd3c2; }
.map iframe { display: block; width: 100%; height: 100%; border: 0; }
