/* ZIPDecor — one hand-written, mobile-first stylesheet. Tokens sampled from the Figma (design/figma/). */

/* Lato, self-hosted (latin subset from Google Fonts; SIL OFL 1.1, public/fonts/OFL.txt). 400 is preloaded in the layout. */
@font-face { font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/lato-400.woff2) format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/lato-700.woff2) format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 900; font-display: swap; src: url(/fonts/lato-900.woff2) format("woff2"); }

:root {
  --ink: #0f0f0f;
  --text: #4a4a4a;
  --muted: #9ca5a2; /* footer small print; too light for text on white (2.4:1), so light-background eyebrows use --primary */
  --subtle: #666666; /* small secondary text on light backgrounds ("made by", family strip, portal meta) */
  --primary: #2d4d4c; /* text, links, borders, focus rings (unchanged); fills use --dark */
  --primary-hover: #20453e;
  /* Section and panel backgrounds use only these three (2026-10-29): */
  --dark: #203a38; /* dark bands, footer, primary buttons and other dark fills */
  --dark-hover: #1a2f2d;
  --light: #f8f8f8; /* light bands, panels, selected cards, summary panels */
  --bg: #ffffff;
  --line: #d9d9d6;
  /* "Subtle" style (2026-10-29): 4px corners on buttons, fields, cards, panels and photos; cards are border-only (no shadows). */
  --radius: 4px;
  --border: #dcdfde;
  --card-pad: 20px; /* 24px from 720px */
  --header-h: 72px; /* phone/tablet sticky header; anchors clear it via scroll-margin-top */
  --danger: #b42318;
  --max: 1200px;
  --gutter: 1rem;
  --font: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0 0 .5em; color: var(--ink); font-weight: 700; line-height: 1.15; letter-spacing: -.01em; }
h1, h2, h3, legend { text-wrap: balance; }
p, li { text-wrap: pretty; }
.br-lg { display: inline; } /* hero H1 line break: a space on phone and tablet, a break from 1000px */
h1 { font-size: clamp(2.25rem, 7vw, 4rem); line-height: 1.08; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
[id], section, h2, h3 { scroll-margin-top: 2rem; }
@media (max-width: 999px) { [id], section, h2, h3 { scroll-margin-top: calc(var(--header-h) + 1rem); } }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 44rem; }
.skip { position: absolute; left: -999px; top: .5rem; z-index: 20; background: var(--bg); padding: .5rem 1rem; }
.skip:focus { left: .5rem; }

/* ---------- Buttons & links (4px corners, uppercase, letter-spaced; hover darkens or inverts, press nudges 1px, no shadow) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 50px; padding: .75rem 2rem; border: 1px solid var(--dark); border-radius: var(--radius);
  background: var(--dark); color: #fff; font: 400 .9375rem/1.2 var(--font); letter-spacing: .05em; text-transform: uppercase;
  text-align: center; text-decoration: none; cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:hover { background: var(--dark-hover); border-color: var(--dark-hover); color: #fff; }
.btn:active, .trade-form button[type="submit"]:active, .main-narrow button[type="submit"]:active { transform: translateY(1px); }
.btn:focus-visible { outline-offset: 3px; }
.btn-outline { background: var(--bg); border-color: var(--dark); color: var(--dark); }
.btn-outline:hover { background: var(--dark); border-color: var(--dark); color: #fff; }
.btn-light { background: var(--bg); border-color: #fff; color: var(--dark); }
.btn-light:hover { background: transparent; border-color: #fff; color: #fff; } /* on the dark bands: inverts to outlined white */
.btn-sm { min-height: 40px; padding: .5rem 1.1rem; font-size: .875rem; }
.arrow-link, .text-link, .card-link { color: var(--primary); font-weight: 400; text-decoration: none; }
.arrow-link:hover, .text-link:hover, .card-link:hover { text-decoration: underline; }
/* Links inside running text are underlined: their colour alone is too close to the body text (WCAG 1.4.1, link-in-text-block). */
.text-link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.text-link:hover { text-decoration-thickness: 2px; }
.arrow-link, .link-arrow { display: inline-block; padding-block: .6rem; } /* 44px tap target */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 2rem; }
.actions-center { justify-content: center; }
.linkish { all: unset; cursor: pointer; }
.linkish:hover, .linkish:focus-visible { text-decoration: underline; }
.linkish:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; } /* all: unset drops the global focus ring */

/* ---------- Header (99px, bottom border) */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); } /* desktop: relative (1000px block) */
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.wordmark { display: inline-flex; align-items: center; flex-shrink: 0; min-height: 44px; color: var(--ink); text-decoration: none; }
.wordmark img { display: block; height: 40px; width: auto; }
.wordmark:hover { color: var(--ink); }
.site-nav, .header-actions .account-link, .header-actions .logout-form { display: none; }
.site-nav a { color: var(--ink); font-size: .9375rem; text-decoration: none; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--primary); text-decoration: underline; text-decoration-thickness: 1px; }
.header-actions { display: none; align-items: center; gap: 1.25rem; } /* phone/tablet: START A QUOTE lives in the menu panel */
.header-actions .btn { min-height: 44px; padding-inline: .875rem; font-size: .8125rem; white-space: nowrap; }
.account-link, .logout-form .linkish { color: var(--text); font-size: .875rem; text-decoration: none; white-space: nowrap; }
.account-link:hover { color: var(--primary); text-decoration: underline; }
.logout-form { margin: 0; }
.header-contact { margin: 0; color: var(--text); font-size: .9375rem; }
.header-contact a { display: inline-block; padding-block: .75rem; }

/* Mobile menu (below 1000px): a <details> whose panel slides down under the sticky header. public/menu.js adds
   Escape, tap-outside, focus handling and the scroll lock; with JS off the <details> still opens and closes. */
.mobile-menu { margin-left: auto; }
.menu-button { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; border-radius: var(--radius); color: var(--dark); cursor: pointer; list-style: none; }
.menu-button::-webkit-details-marker { display: none; }
.menu-button svg { display: block; }
.menu-button .icon-close, .mobile-menu[open] .menu-button .icon-open { display: none; }
.mobile-menu[open] .menu-button .icon-close { display: block; }
.menu-panel {
  position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
  padding: .5rem var(--gutter) 1.5rem; background: var(--bg); border-bottom: 1px solid var(--line);
  transition: transform .2s ease, opacity .2s ease;
}
@starting-style { .mobile-menu[open] .menu-panel { transform: translateY(-8px); opacity: 0; } }
.menu-panel nav { display: grid; margin-bottom: 1.25rem; }
.menu-panel nav a {
  display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 .25rem 0 1rem;
  border-bottom: 1px solid var(--line); border-left: 3px solid transparent; color: var(--ink); font-size: 1.0625rem; text-decoration: none;
}
.menu-panel nav a::after { content: "›"; color: var(--primary); font-size: 1.5rem; line-height: 1; }
.menu-panel nav a:hover { color: var(--primary); }
.menu-panel nav a[aria-current="page"] { border-left-color: var(--dark); color: var(--primary); font-weight: 700; }
.menu-panel .btn { width: 100%; }
.menu-staff { display: flex; align-items: center; gap: 1.5rem; margin-top: 1rem; }
.menu-staff .account-link, .menu-staff .linkish { display: inline-block; padding-block: .75rem; font-size: 1rem; }
body.menu-open { overflow: hidden; } /* on body, not html: body overflow then goes to the viewport and the sticky header keeps working */
/* Narrow phones: the logo shrinks so the slim /quote header (logo + email) fits on one row. */
@media (max-width: 399px) {
  .header-inner { gap: .5rem; }
  .wordmark img { height: 30px; }
}
/* Quote slim header under 360px: drop "Questions?" so the email stays on one line beside the logo. */
@media (max-width: 359px) { .header-contact { font-size: 0; } .header-contact a { font-size: .875rem; } }

/* ---------- Sections */
.section { padding-block: 3.5rem; }
.section-light, .section-alt { background: var(--light); }
.section-flush-top { padding-top: 0; }
/* Full content width, so a heading that fits stays on one line; text-wrap: balance evens out the ones that wrap. */
.section-head { max-width: none; margin-bottom: 2.5rem; }
.section-head h2 { margin: 0; }
.eyebrow { margin: 0 0 1rem; color: var(--primary); font-size: .8125rem; font-weight: 400; letter-spacing: .12em; }
.lead { font-size: 1.125rem; line-height: 1.6; }

/* Hero: copy left, image flush right (to header and next band). */
.hero { padding-block: 3rem; }
.hero-split { padding-bottom: 0; }
.hero-inner { display: grid; gap: 2rem; }
.hero-copy { align-self: center; max-width: 36rem; }
.hero .lead { max-width: 33rem; }
.hero-img { width: 100%; aspect-ratio: 600 / 640; object-fit: cover; }

/* Stats strip */
.stats { background: var(--light); padding-block: 2.5rem; }
.stats-inner { display: grid; gap: 1.5rem; margin-block: 0; }
.stats dt { color: var(--ink); font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
.stats dd { margin: .25rem 0 0; font-size: .9375rem; }

/* Cards */
.card-grid { display: grid; gap: 2rem; }
/* Every card: 1px border, 4px corners, no shadow. #f8f8f8 on white sections, white on #f8f8f8 sections.
   Images in cards sit flush at the top; the card's overflow clips them to its top corners. */
:is(.card, .spec, .swatch, .project, .contact-card, .benefit, .quote-summary) {
  padding: var(--card-pad); border: 1px solid var(--border); border-radius: var(--radius); background: var(--light); overflow: hidden;
}
:is(.section-light, .section-alt) :is(.card, .spec, .swatch, .project, .contact-card, .benefit) { background: var(--bg); }
/* Link cards: the border darkens on hover (no lift, scale or shadow). */
:is(a.card, .line-card, .project, .contact-card:has(a)) { transition: border-color .15s ease; }
/* Only cards that are links get the hover border; project tiles are not links, so they stay still. */
:is(a.card, .line-card, a.project, .contact-card:has(a)):hover { border-color: var(--dark); }
/* A whole card that is one link (404 page): plain text, the arrow line carries the link look. */
a.card { display: flex; flex-direction: column; color: var(--text); text-decoration: none; }
a.card h3 { color: var(--ink); }
a.card p { margin: 0 0 1rem; }
a.card .arrow-link { margin-top: auto; }
a.card:hover .arrow-link { text-decoration: underline; }
/* Flush top image: pulled out over the card padding. */
:is(.card-img, .swatch-chip, .project img) { width: calc(100% + 2 * var(--card-pad)); max-width: none; margin: calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)) var(--card-pad); }
.card-img { aspect-ratio: 378 / 300; object-fit: cover; }
/* Photos outside cards: their own 4px corners. */
:is(.hero-img, .split-img, .banner, .photo, .com-diagram) { border-radius: var(--radius); }
.card h3 { margin-bottom: .35rem; font-size: 1.375rem; }
.card-sub { margin-bottom: .75rem; color: var(--subtle); font-size: .875rem; letter-spacing: .02em; }
.line-card p { max-width: 21rem; }
.card-body { padding: 1.5rem; }

/* Split: copy + image */
.split { display: grid; gap: 2rem; align-items: start; }
.split-copy h2 { font-size: clamp(1.75rem, 3vw, 2.125rem); }
.split-copy .lead { font-size: 1.1875rem; }
.split-copy p { font-size: 1.0625rem; line-height: 1.65; }
.split-img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; } /* fills the column when stacked; 486px beside the copy (desktop) */
.bullets { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.bullets li { position: relative; margin-bottom: 1rem; padding-left: 1.1rem; font-size: 1.0625rem; line-height: 1.65; }
.bullets li::before { content: "•"; position: absolute; left: 0; color: var(--ink); }
.bullets strong { color: var(--ink); }

/* Numbered steps: 01, 02 … */
/* Process steps: highlighted cards with a numbered circle, joined by a connector line
   (vertical when stacked on phones, horizontal when they sit in one row on desktop). */
.steps { --step-gap: 2rem; --step-pad: 1.5rem; --step-dot: 40px;
  list-style: none; margin: 0; padding: 0; display: grid; gap: var(--step-gap); counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: var(--step-pad); background: var(--bg);
  border: 1px solid var(--border); border-top: 3px solid var(--dark); border-radius: var(--radius); }
.steps li::before { content: counter(step, decimal-leading-zero); display: grid; place-items: center;
  width: var(--step-dot); height: var(--step-dot); margin-bottom: 1rem; border-radius: 50%;
  background: var(--dark); color: #fff; font-size: .875rem; font-weight: 700; letter-spacing: .04em; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: calc(var(--step-pad) + var(--step-dot) / 2 - 1px);
  top: 100%; width: 2px; height: var(--step-gap); background: var(--dark); }
.steps h3 { margin-bottom: .6rem; }
.steps p { margin: 0; font-size: .9375rem; }

/* Dark green CTA band */
.cta-band { background: var(--dark); color: rgb(255 255 255 / 88%); padding-block: 3.5rem; }
.cta-inner { display: grid; gap: 1.5rem; align-items: center; }
.cta-band h2 { margin-bottom: .5rem; color: #fff; font-size: clamp(1.625rem, 3vw, 2rem); }
.cta-band p { max-width: 34rem; margin: 0; }
.cta-band .btn { justify-self: start; }
/* Links in running text on the dark fills: white and underlined (12.2:1 on #203a38); white focus ring. */
:is(.cta-band, .site-footer) p a { color: #fff; text-decoration: underline; }
:is(.cta-band, .site-footer) p a:hover { color: #fff; text-decoration-thickness: 2px; }
:is(.cta-band, .site-footer) :focus-visible { outline-color: #fff; }

/* Family strip */
.family { padding-block: 3.5rem; }
.family .eyebrow { color: var(--subtle); text-align: center; }
/* Brand cards: photo on top, dark accent bar, icon badge overlapping the photo edge. */
.family-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.family-card { display: flex; flex-direction: column; overflow: hidden; background: var(--bg); border: 1px solid var(--border); border-top: 3px solid var(--dark); border-radius: var(--radius); }
.family-img { display: block; width: 100%; aspect-ratio: 3 / 2; height: auto; object-fit: cover; }
.family-body { position: relative; display: flex; flex-direction: column; flex: 1; padding: 2.25rem 1.5rem 1.5rem; }
.family-icon { position: absolute; top: -24px; left: 1.5rem; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--dark); color: #fff; border: 3px solid var(--bg); }
.family-name { margin: 0; font-size: 1.375rem; letter-spacing: .02em; }
.family-tag { margin: .25rem 0 .75rem; color: var(--subtle); font-size: .8125rem; letter-spacing: .04em; }
.family-line { margin: 0 0 1.25rem; font-size: .9375rem; }
.family-card .arrow-link, .family-soon { margin-top: auto; }
.family-soon { color: var(--subtle); font-size: .875rem; }
@media (min-width: 720px) { .family-cards { grid-template-columns: repeat(3, 1fr); } }

/* FAQ: "STRAIGHT ANSWERS" (static) */
.faq-inner { display: grid; gap: 2rem; }
.faq h2 { font-size: clamp(1.75rem, 3vw, 2rem); }
.faq-list { display: grid; gap: 2.5rem; }
.faq-list h3 { margin-bottom: .75rem; font-size: 1.125rem; }
.faq-list p { margin: 0; font-size: 1.0625rem; line-height: 1.65; }

/* ---------- Footer */
.site-footer { background: var(--dark); color: #fff; padding-top: 4rem; font-size: .875rem; }
.site-footer a, .site-footer li span { color: #d5d5d5; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer h2 { margin-bottom: 1rem; color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .12em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.site-footer .wordmark img { height: 36px; }
.footer-brand p { margin-top: .75rem; }
.footer-social { list-style: none; display: flex; gap: .75rem; margin: 1.25rem 0 0; padding: 0; }
/* .site-footer-scoped so the footer's link-row rules (li a / li span padding, grey span) don't reach the icon button. */
.site-footer .footer-social a { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; padding: 0 1rem; color: #fff; text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .35); border-radius: var(--radius); font-size: .875rem; line-height: 1; }
.site-footer .footer-social a:hover { border-color: #fff; }
.site-footer .footer-social svg { flex: none; display: block; }
.site-footer .footer-social span { display: inline; padding: 0; color: inherit; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem 2rem; padding-bottom: 3rem; }
.footer-brand { grid-column: 1 / -1; }
.footer-bottom { padding-bottom: 2.5rem; color: var(--muted); font-size: .75rem; }
.footer-bottom p { margin: 0; }
.site-footer .legal-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-bottom: 1rem; font-size: .875rem; }
/* Phone and tablet: 44px tap targets on the footer lists (the padding replaces the list gap). */
@media (max-width: 999px) {
  .site-footer ul { gap: 0; }
  .site-footer .legal-links { gap: 0 1.5rem; }
  .site-footer li a, .site-footer li span { display: inline-block; padding-block: .7rem; }
}

/* ---------- <main> width (Layout `width` prop) */
.main-wide { max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding: 2.5rem var(--gutter) 4rem; }
.main-narrow { max-width: 28rem; margin-inline: auto; padding: 3rem var(--gutter) 4rem; min-height: 60vh; }

/* ---------- Forms (base: square inputs) */
label { display: grid; gap: .35rem; color: var(--ink); font-weight: 700; font-size: .95rem; }
input, select, textarea {
  width: 100%; min-height: 48px; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); color: var(--ink); font: 400 1rem/1.4 var(--font);
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgb(45 77 76 / 25%); outline-offset: 0; border-color: var(--primary); } /* ring, not a shadow */
button { font-family: var(--font); }
[role="alert"] { border-radius: var(--radius); padding: .75rem 1rem; border: 1px solid #f3c4bf; background: #fdf1f0; color: var(--danger); font-weight: 700; }

/* Panels, notices, admin tables and form buttons: 4px corners. */
:is(.trade-form, .main-narrow form, .card-form, .buyer-card, .manage-form, .msg, .empty, .notice, .main-narrow [role="status"], .legal-toc,
  .uploads-paused, .fields > .files-off, .dropzone, .table-scroll, .tabs a, .trade-form button[type="submit"], .main-narrow button[type="submit"]) { border-radius: var(--radius); }

/* ---------- Tablet and up */
@media (min-width: 720px) {
  :root { --gutter: 2rem; --card-pad: 24px; }
  .section { padding-block: 5rem; }
  .card-grid.cols-2, .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } /* 3 across from tablet: no lone third card */
  .stats-inner { grid-template-columns: repeat(3, auto); justify-content: space-between; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps li:not(:last-child)::after { display: none; } /* two columns: no single line to draw */
  .cta-inner { grid-template-columns: 1fr auto; gap: 2rem; }
  .cta-band { padding-block: 5rem; }
  .footer-grid { grid-template-columns: repeat(4, auto); justify-content: start; column-gap: 4.5rem; }
}

/* ---------- Desktop (1470px frame: 1200px content, 135px margins) */
@media (min-width: 1000px) {
  .site-header { position: relative; } /* sticky on phone/tablet only, so the desktop sticky panels need no offset */
  .header-inner { min-height: 98px; gap: 2.25rem; }
  .site-nav { display: flex; gap: 2.25rem; margin-left: auto; }
  .header-actions { display: flex; margin-left: 0; }
  .header-actions .account-link, .header-actions .logout-form { display: block; }
  .header-actions .btn { min-height: 50px; padding-inline: 2rem; font-size: .9375rem; }
  .mobile-menu { display: none; }
  .hero { padding-block: 5rem; }
  .hero-split { padding-block: 0; }
  .hero-split .hero-inner { grid-template-columns: 1fr 1fr; gap: 0; }
  .hero-split .hero-copy { padding-block: 3rem; padding-right: 3rem; }
  .card-grid.cols-3 { gap: 2rem; }
  .card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
  .stats { padding-block: 3.5rem; }
  .section { padding-block: 6rem; }
  .section-flush-top { padding-top: 0; }
  .split { grid-template-columns: 1fr 1fr; gap: 1.75rem; }
  .split-img { max-width: 486px; }
  .br-lg { display: block; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  /* One row: the line runs across the gap at the circle's centre. */
  .steps li:not(:last-child)::after { display: block; left: calc(100% + 1px); top: calc(var(--step-pad) + var(--step-dot) / 2 - 1px);
    width: calc(var(--step-gap) - 2px); height: 2px; }
  .steps:has(> li:nth-child(5)) { grid-template-columns: repeat(5, 1fr); }
  .family { padding-block: 4.5rem; }
  .faq-inner { grid-template-columns: 1fr 2fr; gap: 2rem; }
  .footer-grid { grid-template-columns: 1fr repeat(4, auto); }
  .footer-brand { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .menu-panel, .choice-box, :is(a.card, .line-card, .project, .contact-card) { transition: none; }
}

/* ---------- Trade forms */
.trade-form { display: grid; gap: 1rem; margin-top: 1.5rem; padding: 1.75rem; background: var(--bg); border: 1px solid var(--line); }
/* One shrinkable column, so the Turnstile widget (or a long select) can never push a form past its box. */
.trade-form, .rfq, .main-narrow form { grid-template-columns: minmax(0, 1fr); }
/* Turnstile: height reserved (65px flexible, 140px compact; Turnstile() in src/views/site.tsx picks the size), line-height 0 drops the 7px under its iframe. */
.cf-turnstile { max-width: 100%; min-height: 65px; overflow: hidden; line-height: 0; }
.cf-turnstile[data-size="compact"] { min-height: 140px; }
.trade-form label { color: var(--text); }
.trade-form small { color: var(--text); font-weight: 400; }
.trade-form textarea { resize: vertical; }
.trade-form button[type="submit"] { min-height: 50px; border: 0; background: var(--dark); color: #fff; font-size: .9375rem; letter-spacing: .05em; text-transform: uppercase; cursor: pointer; }
.trade-form button[type="submit"]:hover { background: var(--dark-hover); }
.field-error { padding: 0; border: 0; background: none; color: var(--danger); font-size: .875rem; font-weight: 700; }

/* ---------- Auth pages (Layout width="narrow"): title, then the form as a light panel with a full-width submit. */
.main-narrow { padding-block: 4rem 5rem; }
.main-narrow h1 { margin-bottom: .75rem; font-size: clamp(2rem, 6vw, 2.5rem); }
.main-narrow > p { font-size: .9375rem; }
.main-narrow form { display: grid; gap: 1.25rem; margin: 1.75rem 0; padding: 2rem 1.5rem; background: var(--light); border: 1px solid var(--line); }
.main-narrow button[type="submit"] {
  min-height: 52px; margin-top: .25rem; border: 0; background: var(--dark); color: #fff;
  font-size: .9375rem; letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
}
.main-narrow button[type="submit"]:hover { background: var(--dark-hover); }
.main-narrow [role="status"] { padding: .75rem 1rem; border: 1px solid var(--line); background: var(--light); color: var(--primary); font-weight: 700; }
/* Uppercase, letter-spaced field labels (as in the quote builder) on every admin and auth form. */
:is(.main-narrow form, .card-form, .manage-form) label { gap: .5rem; color: var(--ink); font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
:is(.main-narrow form, .card-form, .manage-form) label :is(input, select, textarea, small, .field-error) { letter-spacing: normal; text-transform: none; }
:is(.main-narrow form, .card-form) label :is(input, select, textarea) { font-size: 1rem; }
.main-narrow form label small, .card-form label small { color: var(--subtle); font-size: .8125rem; font-weight: 400; }

/* ---------- Admin: page head, tables, ticket thread */
.portal { padding-top: 1rem; }
.back-link { margin: 0 0 1.25rem; font-size: .875rem; }
.back-link a { color: var(--subtle); text-decoration: none; }
.back-link a:hover { color: var(--primary); text-decoration: underline; }
.portal-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.portal-head h1 { margin: 0; font-size: clamp(2rem, 5vw, 2.75rem); }
.portal-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.ticket-table.team-table td { vertical-align: middle; }
.row-actions { white-space: nowrap; }
.row-actions form { display: inline-block; margin: 0; }
.row-actions form + form { margin-left: .5rem; }
.portal-h2 { margin: 3.5rem 0 1rem; font-size: clamp(1.375rem, 3vw, 1.75rem); }
.empty { padding: 2.5rem 1.5rem; background: var(--light); color: var(--ink); text-align: center; }
.empty p { margin: 0; }

/* Tables: light header row, row hover; on narrow screens they scroll inside .table-scroll, never the page. */
.table-scroll { overflow-x: auto; margin-bottom: 1.5rem; border: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
.ticket-table { width: 100%; border-collapse: collapse; background: var(--bg); }
.table-scroll .ticket-table { min-width: 720px; }
.ticket-table th, .ticket-table td { padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: .9375rem; }
.ticket-table th { background: var(--light); color: var(--ink); font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.ticket-table tbody tr:last-child td { border-bottom: 0; }
.ticket-table tbody tr:hover { background: var(--light); }
.ticket-table td:first-child a { font-weight: 700; text-decoration: none; }
.ticket-table td:first-child a:hover { text-decoration: underline; }
.ticket-table small { color: var(--subtle); font-size: .8125rem; }
.ticket-table form { margin: 0; }

/* Status: small pill labels. */
.status { display: inline-block; padding: .2rem .7rem; border-radius: 999px; background: var(--light); color: var(--primary); font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.status-new { background: #fff4d6; color: #7a5600; }
.status-quoted { background: #e3eeec; }
.status-won { background: var(--dark); color: #fff; }
.status-lost { background: #eceeee; color: var(--subtle); }

/* Ticket thread: message cards; staff replies on the light panel; internal notes yellow-tinted with a label. */
.thread-head { margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.thread-head h1 { margin-bottom: .75rem; font-size: clamp(2rem, 5vw, 2.75rem); }
.ticket-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin: 0; color: var(--text); }
.messages { display: grid; gap: 1rem; margin: 0 0 2rem; }
.msg { padding: 1.25rem 1.5rem; background: var(--bg); border: 1px solid var(--line); }
.msg-staff { background: var(--light); }
.msg.note { background: #fff8e1; border: 1px solid #e8d08a; border-left: 4px solid #d9b44a; }
.msg header { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; margin-bottom: .6rem; }
.msg header strong { color: var(--ink); }
.msg time { margin-left: auto; color: var(--subtle); font-size: .8125rem; }
.msg .badge { padding: .1rem .55rem; background: #d9b44a; color: #3d2f00; font-size: .6875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.msg-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-files { margin: .75rem 0 0; padding-left: 1.25rem; font-size: .9375rem; }
.msg-files small { color: var(--subtle); }

/* Portal forms: light panel, white square fields. */
.card-form { display: grid; gap: 1.25rem; margin: 0 0 1.5rem; padding: 1.75rem 1.5rem; background: var(--light); border: 1px solid var(--line); }
.card-form > p { margin: 0; }
.card-form textarea { resize: vertical; }
.card-form .btn { justify-self: start; min-height: 52px; padding-inline: 2.25rem; border: 0; cursor: pointer; }
.card-form .check { display: flex; align-items: center; gap: .6rem; font-size: .9375rem; font-weight: 400; letter-spacing: normal; text-transform: none; }
.card-form .check input { width: 18px; height: 18px; min-height: 0; accent-color: var(--primary); }
.card-form input[type="file"] { padding: .7rem .9rem; background: var(--bg); font-size: .875rem; }
.notice { padding: .75rem 1rem; border: 1px solid var(--line); background: var(--light); color: var(--primary); font-weight: 700; }

/* Team portal: filter tabs, search, ticket sidebar (buyer + status/assignee). */
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.25rem; }
.tabs a { padding: .45rem .95rem; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: .8125rem; letter-spacing: .04em; text-decoration: none; white-space: nowrap; }
.tabs a:hover { border-color: var(--primary); color: var(--primary); }
.tabs a[aria-current="page"] { background: var(--dark); border-color: var(--dark); color: #fff; }
.search-form { display: flex; gap: .75rem; margin-bottom: 1.5rem; }
.search-form input { flex: 1; min-width: 0; }
.search-form .btn { flex: none; border: 0; }
.buyer-card, .manage-form { margin-bottom: 1rem; padding: 1.5rem; background: var(--light); border: 1px solid var(--line); overflow-wrap: anywhere; }
.buyer-card strong a { color: var(--ink); font-size: 1.125rem; }
.buyer-card small { color: var(--subtle); }
.manage-form { display: grid; gap: 1rem; }
.manage-form .btn { border: 0; cursor: pointer; }
.pager { display: flex; align-items: center; gap: 1.5rem; margin: 1.5rem 0; font-size: .9375rem; }
@media (min-width: 720px) {
  .card-form, .main-narrow form { padding: 2rem; }
  .manage-form { grid-template-columns: 1fr 1fr auto; align-items: end; }
}
@media (min-width: 1000px) {
  .ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 3rem; align-items: start; }
  .ticket-side { grid-column: 2; grid-row: 1; position: sticky; top: 2rem; }
  .ticket-main { grid-column: 1; grid-row: 1; min-width: 0; }
  .ticket-side .manage-form { grid-template-columns: 1fr; }
  .ticket-side .manage-form .btn { justify-self: start; }
}

/* Line pages */
.spec h3 { margin-bottom: .6rem; font-size: 1.125rem; }
.spec p { margin: 0; font-size: .9375rem; }
.card-box { display: block; color: inherit; text-decoration: none; }
.card-box h3 { color: var(--primary); }
.card-box p { margin: 0; font-size: .9375rem; }
.section-tight { padding-block: 2.5rem; }
.photo-row { display: grid; gap: 1.5rem; }
.photo { width: 100%; aspect-ratio: 384 / 320; object-fit: cover; }
.made-by { color: var(--subtle); font-size: .875rem; }
@media (min-width: 720px) { .photo-row { grid-template-columns: repeat(3, 1fr); } }
.prose { max-width: 50rem; } .prose + .card-grid, .card-grid + .prose { margin-top: 2rem; }
.twocol { display: grid; gap: 1.5rem; }
.twocol h2 { margin: 0; font-size: clamp(1.75rem, 3vw, 2.125rem); }
.twocol-body .lead { font-size: 1.1875rem; }
.twocol-body p, .process { font-size: 1.0625rem; line-height: 1.65; }
.process { list-style: none; margin: 0; padding: 0; counter-reset: p; }
.process li { counter-increment: p; margin-bottom: 1rem; }
.process li::before { content: counter(p) ".  "; font-weight: 700; color: var(--ink); white-space: pre; }
.process strong { color: var(--ink); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }
@media (min-width: 1000px) { .twocol { grid-template-columns: 35% 1fr; gap: 3rem; } .twocol-body { max-width: 37rem; } }

/* Trade pages */
.hero:not(.hero-split) .hero-copy { max-width: none; }
.hero-img-wide { aspect-ratio: 588 / 266; }
.banner { width: 100%; aspect-ratio: 3 / 1; object-fit: cover; }
@media (max-width: 719px) { .banner { aspect-ratio: 2 / 1; } }
.stats-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .stats-4 { grid-template-columns: repeat(4, auto); } }
.split-center { align-items: center; }
/* Home: stats as cards with an icon and a "learn more" link. */
.stat-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.stat-card { display: flex; flex-direction: column; padding: 1.5rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }
.stat-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 1rem; border-radius: 50%; background: var(--dark); color: #fff; }
.stat-value { margin: 0; color: var(--ink); font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.stat-label { margin: .4rem 0 1rem; font-size: .9375rem; }
.stat-card .arrow-link { margin-top: auto; }
@media (min-width: 720px) { .stat-cards { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; } }
@media (min-width: 1000px) { .stat-cards { grid-template-columns: repeat(4, 1fr); } }
.stats-note { margin: 1.25rem 0 0; color: var(--subtle); font-size: .8125rem; }
.split-flip .split-img { order: -1; }
.split-flip .split-copy { align-self: center; }
.eyebrow-quote { font-size: 1.5rem; font-weight: 700; line-height: 1.3; color: var(--ink); margin: 0 0 1rem; }
.prompt-band { padding-block: 2rem; }
.prompt-band p { margin: 0; font-size: 1.0625rem; }
.link-arrow { color: var(--ink); text-decoration: none; }
.link-arrow:hover { text-decoration: underline; color: var(--ink); }
.muted-copy { color: var(--subtle); font-size: .9375rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pills { display: flex; flex-wrap: wrap; gap: .75rem; margin: 2rem 0 1.5rem; }
.pill { min-height: 44px; padding: .45rem 1.1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink); font: inherit; font-size: .875rem; cursor: not-allowed; }
.pill[aria-pressed="true"] { background: var(--dark); border-color: var(--dark); color: #fff; cursor: default; }
/* Inert until filtering ships: dashed and muted, with the visible note below. */
.pill[aria-disabled="true"]:not([aria-pressed="true"]) { border-style: dashed; color: var(--subtle); }
.pills-note { margin: -.75rem 0 1.5rem; color: var(--subtle); font-size: .875rem; }
.swatch-grid { display: grid; gap: 1.5rem 1.5rem; grid-template-columns: repeat(2, 1fr); }
.swatch { margin: 0; }
.swatch-chip { aspect-ratio: 278 / 180; object-fit: cover; }
.swatch h3 { margin: 0 0 .15rem; font-size: 1rem; }
.swatch p { margin: 0; color: var(--subtle); font-size: .875rem; letter-spacing: .02em; }
.com-diagram { display: block; width: 100%; max-width: 486px; height: auto; background: var(--bg); }
.terms { display: grid; gap: .25rem 2rem; margin: 1.5rem 0 0; }
.terms dt { color: var(--ink); font-weight: 700; margin-top: 1rem; }
.terms dd { margin: 0; font-size: .9375rem; }
.terms-lead { margin: 0; color: var(--subtle); font-size: .9375rem; }
.project-grid { display: grid; gap: 2rem; margin-bottom: 2rem; }
.project img { aspect-ratio: 384 / 260; object-fit: cover; }
.project .eyebrow { margin: 0 0 .25rem; font-size: .75rem; }
.project h3 { margin: 0; font-size: 1rem; }
.contact-cards { display: grid; gap: 2rem; }

.contact-card .eyebrow { margin-bottom: .75rem; font-size: .8125rem; }
.contact-card h2, .contact-card h3 { margin: 0 0 .5rem; font-size: 1.375rem; }
.contact-card h3 a { display: inline-block; padding-block: .6rem; margin-block: -.6rem; } /* 44px tap target, same layout */
.contact-card p { margin: 0; font-size: .9375rem; }
.contact-card a { color: var(--ink); text-decoration: none; }
.contact-card a:hover { text-decoration: underline; }
.contact-card .trade-form { background: var(--bg); max-width: 40rem; padding: 1.25rem; }
@media (min-width: 720px) { .contact-card .trade-form { padding: 1.75rem; } }
/* Callback: intro left, form right from 1000px, so the form fills the card. */
@media (min-width: 1000px) {
  .callback-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 40rem); grid-template-rows: auto auto auto 1fr; column-gap: 3rem; }
  .callback-card .trade-form { grid-column: 2; grid-row: 1 / -1; margin-top: 0; }
}
.about-copy { max-width: 46rem; }
.about-copy p { font-size: 1.0625rem; line-height: 1.65; }
.about-copy h2:not(:first-child) { margin-top: 2.5rem; }
.about-topics .twocol + .twocol { margin-top: 3rem; padding-top: 3rem; border-top: 1px solid var(--border); }
@media (min-width: 720px) { .swatch-grid { grid-template-columns: repeat(4, 1fr); } .project-grid { grid-template-columns: repeat(3, 1fr); } .contact-cards { grid-template-columns: 1fr 1fr; } .contact-cards > :last-child:nth-child(odd) { grid-column: 1 / -1; } .terms { grid-template-columns: 17rem 1fr; } .terms dt { margin-top: 0; } .terms dd { margin-bottom: .5rem; } }
@media (min-width: 1000px) { .hero-split .hero-img-wide { margin-block: 3rem; } .contact-cards { grid-template-columns: repeat(3, 1fr); } .contact-cards > :last-child:nth-child(odd) { grid-column: auto; } }
.split-flip .split-img { aspect-ratio: 560 / 360; }
@media (min-width: 720px) and (max-width: 999px) {
  .split-img { aspect-ratio: 3 / 2; } /* stacked at full column width: 4:5 would be 880px tall */
  .split-copy, .twocol-body { max-width: 40rem; } /* L18: about 75 characters a line */
}
@media (min-width: 1000px) { .split-flip .split-img { max-width: 560px; } }
/* Desktop split (copy + photo side by side): the photo fills its whole column and stretches to the copy's height,
   so there is no white gap beside or under it. min-height keeps short sections from getting a thin strip. */
@media (min-width: 1000px) {
  .split:not(.split-flip):not(.split-center) { align-items: stretch; }
  .split:not(.split-flip):not(.split-center) .split-img { max-width: none; height: 100%; min-height: 440px; aspect-ratio: auto; }
  /* Centred split (About): a landscape photo that fills its column, so short copy isn't dwarfed by a tall portrait. */
  .split-center .split-img { max-width: none; aspect-ratio: 4 / 3; }
  /* Wide hero photo (About, Trade): match the copy's height, top and bottom, instead of a short strip with a gap under it.
     contain: size stops the photo's own height from growing the row. */
  .hero-split .hero-img-wide { align-self: stretch; height: auto; min-height: 320px; aspect-ratio: auto; margin-block: 3rem; contain: size; }
}
.terms-block { margin-top: 4rem; }
.callback-card { margin-top: 2rem; }

/* Trade Program (/trade) */
.benefit-grid { display: grid; gap: 2rem; }

.benefit h3 { margin-bottom: .75rem; font-size: 1.25rem; }
.benefit p { margin: 0; font-size: .9375rem; }
.benefits.section { padding-bottom: 0; }
.benefits + .section { padding-top: 4rem; }
.faq-stacked .faq-list { max-width: 46rem; gap: 1.75rem; margin-top: 2rem; }
.faq-stacked .faq-list h3 { margin-bottom: .4rem; font-size: 1.0625rem; }
.faq-stacked .faq-list p { font-size: .9375rem; }
.apply h2 { margin-bottom: 2rem; }
.apply-proof { color: var(--ink); font-weight: 700; font-size: .9375rem; }
.apply-note { max-width: 38rem; margin-bottom: 2.5rem; color: var(--subtle); font-size: .875rem; }
@media (min-width: 720px) { .benefit-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .benefit-grid { grid-template-columns: repeat(4, 1fr); } }

/* Quote builder (/quote) and the trade application: uppercase field labels, square inputs */
.quote-page { padding-top: 4rem; }
.quote-intro { max-width: 38rem; margin-bottom: 2.75rem; }
.quote-layout { display: grid; gap: 3rem; }
.rfq { display: grid; gap: 1.25rem; min-width: 0; }
.rfq label { gap: .5rem; color: var(--ink); font-size: .75rem; font-weight: 700; letter-spacing: .1em; }
.rfq small { color: var(--subtle); font-size: .75rem; font-weight: 400; letter-spacing: normal; }
.rfq textarea { resize: vertical; min-height: 106px; }
.rfq input[type="file"] { padding: .7rem .9rem; font-size: .8125rem; letter-spacing: normal; }
.rfq ::placeholder { color: #8a8a8a; }
.hint { margin: 0; color: var(--subtle); font-size: .875rem; }
/* /trade, uploads off: the notice is a full-width row under the fields, boxed like the /quote UploadsPaused notice. */
.fields > .files-off { grid-column: 1 / -1; padding: 1rem 1.25rem; border-left: 3px solid var(--dark); background: var(--light); color: var(--text); font-size: .9375rem; }
.rfq-submit { justify-self: start; min-height: 58px; padding-inline: 3rem; }
.rfq-step { min-width: 0; margin: 0 0 1.75rem; padding: 0; border: 0; display: grid; gap: 1.25rem; }
.rfq-step:last-of-type { margin-bottom: 0; }
.rfq-step legend { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; padding: 0; color: var(--ink); font-size: 1.625rem; font-weight: 700; line-height: 1.2; }
.step-n { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--dark); color: #fff; font-size: .875rem; }
.fields { display: grid; gap: 1.25rem 1.5rem; }
.fields-dims { grid-template-columns: repeat(2, 1fr); }
.choices { display: grid; gap: 1rem; }
.rfq .choice { display: block; position: relative; font-size: inherit; letter-spacing: normal; }
.choice input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; opacity: 0; }
.choice-box { display: grid; gap: .25rem; height: 100%; padding: 1.3rem 1.4rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); cursor: pointer; transition: border-color .15s ease; }
.choice-box:hover { border-color: var(--dark); }
.choice-title { color: var(--ink); font-size: 1.125rem; font-weight: 700; }
.choice-sub { color: var(--subtle); font-size: .875rem; font-weight: 400; }
.choice input:checked + .choice-box { border-color: var(--primary); outline: 1px solid var(--primary); outline-offset: -2px; background: var(--light); } /* 2px ring, no shadow */
.choice input:checked + .choice-box .choice-title { color: var(--primary); }
.choice input:focus-visible + .choice-box { outline: 3px solid var(--primary); outline-offset: 2px; }
.dropzone { justify-items: center; gap: .35rem; padding: 2.5rem 1.5rem; border: 1px dashed #6f6f6f; background: var(--light); text-align: center; cursor: pointer; }
.rfq .dropzone { font-size: inherit; letter-spacing: normal; }
.dropzone strong { color: var(--ink); font-size: 1rem; font-weight: 400; }
.dropzone span { color: var(--subtle); font-size: .8125rem; font-weight: 400; }
.rfq .dropzone input { width: auto; max-width: 100%; min-height: 0; margin-top: .75rem; padding: 0; border: 0; background: none; }
.dropzone:focus-within, .dropzone.is-over { border-color: var(--primary); background: var(--bg); }
.quote-summary { align-self: start; }
.quote-summary h2 { margin: 0 0 1.25rem; color: var(--ink); font-size: .8125rem; font-weight: 700; letter-spacing: .12em; }
.quote-summary dl { margin: 0 0 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.quote-summary dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; font-size: .875rem; }
.quote-summary dd { margin: 0; color: var(--ink); text-align: right; overflow-wrap: anywhere; }
.quote-summary p { font-size: .8125rem; }
.quote-summary-submit { display: none; } /* the panel stacks below 1000px; the form's own button stays */
/* Quote form grid: 1 column, 2 from 640px, the full 3 / 4 from 1000px (the trade form keeps the shared 720px rules). */
.quote-layout .fields-dims { grid-template-columns: minmax(0, 1fr); }
/* Uploads off: email-instead notice (quote step 4, thanks page). */
.uploads-paused { display: grid; justify-items: start; gap: .75rem; margin: 0 0 1.5rem; padding: 1.25rem 1.5rem; border-left: 3px solid var(--dark); background: var(--light); }
.uploads-paused h2 { margin: 0; color: var(--ink); font-size: 1.0625rem; font-weight: 700; line-height: 1.3; letter-spacing: normal; }
.uploads-paused p { margin: 0; color: var(--text); font-size: .9375rem; }
.uploads-paused .btn-outline { min-height: 44px; padding-inline: 1.25rem; border-color: var(--dark); color: var(--dark); font-size: .875rem; letter-spacing: .03em; text-transform: none; }
.dot-list { list-style: none; display: grid; gap: .4rem; margin: 0; padding: 0; color: var(--ink); font-size: .8125rem; }
.dot-list li::before { content: "•"; margin-right: .6rem; }
@media (min-width: 720px) {
  .fields-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fields-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* label text / input / hint line up across a row even when one label wraps */
  .fields { grid-template-rows: auto auto auto; }
  .fields > label { grid-row: span 3; grid-template-rows: subgrid; align-content: start; }
  .choices-2 { grid-template-columns: repeat(2, 1fr); }
  .choices-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 640px) {
  .quote-layout :is(.fields-3, .fields-4) { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto auto; }
  .quote-layout .fields > label { grid-row: span 3; grid-template-rows: subgrid; align-content: start; }
}
@media (min-width: 1000px) {
  .fields-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .quote-page { padding-top: 4.5rem; }
  .quote-layout { grid-template-columns: minmax(0, 760px) 376px; justify-content: space-between; align-items: start; }
  .quote-layout .fields-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quote-layout .fields-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .quote-summary { position: sticky; top: 1.5rem; }
  .quote-summary-submit { display: flex; width: 100%; margin-top: 1.75rem; }
}

/* ---------- Legal pages (LegalPage) */
.legal { max-width: 40rem; margin-inline: auto; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); }
.legal h2 { margin-top: 2.5rem; font-size: 1.375rem; }
.legal h3 { margin: 1.5rem 0 .5rem; font-size: 1.0625rem; }
.legal ul, .legal ol { margin: 0 0 1em; padding-left: 1.25rem; }
.legal li { margin-bottom: .4em; }
.legal-updated { color: var(--subtle); font-size: .875rem; }
.legal-toc { margin: 2rem 0; padding: 1.25rem 1.5rem; background: var(--light); }
.legal-toc h2 { margin: 0 0 .75rem; font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase; }
.legal-toc ol { margin: 0; }
.legal-toc li { margin: 0; }
.legal-toc a { display: inline-block; padding-block: .6rem; } /* 44px tap target */

/* Social proof: partner logos + press releases (home, /trade). */
.partner-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.partner-tile { display: grid; place-items: center; padding: 1rem 1.25rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }
.partner-tile img { display: block; width: 100%; max-width: 230px; height: auto; aspect-ratio: 5 / 2; object-fit: contain; }
@media (min-width: 720px) { .partner-grid { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; } }
.press-row { list-style: none; margin: 0; padding: 0 0 1rem; display: grid; grid-auto-flow: column; grid-auto-columns: 85%; gap: 1rem;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin; }
.press-row:focus-visible { outline: 2px solid var(--dark); outline-offset: 4px; }
.press-card { scroll-snap-align: start; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }
.press-card img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; }
.press-body { display: flex; flex-direction: column; flex: 1; padding: 1.25rem; }
.press-source { margin: 0 0 .4rem; color: var(--subtle); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.press-title { margin: 0 0 1rem; font-size: 1.0625rem; line-height: 1.35; }
.press-card .arrow-link { margin-top: auto; }
@media (min-width: 720px) { .press-row { grid-auto-columns: calc((100% - 2rem) / 2.4); gap: 1.5rem; } }
@media (min-width: 1000px) { .press-row { grid-auto-columns: calc((100% - 3rem) / 3.2); } }

/* Who we make for: icon strip under the hero (home + line pages) and the icon on /trade's segment cards. */
.industries { padding-block: 1.75rem; border-bottom: 1px solid var(--border); }
.industry-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 1.25rem; }
.industry-list li { display: flex; align-items: center; gap: .75rem; font-size: .875rem; line-height: 1.3; color: var(--ink); }
.industry-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 1px solid var(--ink); border-radius: var(--radius); color: var(--ink); background: var(--bg); }
.industry-card .industry-icon { margin-bottom: 1rem; }
@media (min-width: 720px) { .industry-list { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .industry-list { grid-template-columns: repeat(6, 1fr); gap: 1.25rem; } }
/* Press releases: prev/next arrows beside the heading (shown by public/press.js). */
.press-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 2.5rem; }
.press-head .section-head { margin-bottom: 0; }
.press-nav { display: flex; gap: .5rem; flex: none; }
.press-nav[hidden] { display: none; }
.press-nav button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--dark); border-radius: var(--radius); background: var(--dark); color: var(--bg); cursor: pointer; }
.press-nav button:hover:not(:disabled) { background: var(--dark-hover); }
.press-nav button:focus-visible { outline: 2px solid var(--dark); outline-offset: 2px; }
.press-nav button:disabled { background: var(--bg); color: var(--dark); opacity: .4; cursor: default; }

/* ---------- New-password fields (src/views/password.tsx, public/password.js): eye toggle inside each box, 3-step meter
   (red while weak), "Password strength" line, checklist with ticks, Suggest link. */
.pw-field { display: grid; gap: .5rem; }
.pw-input { position: relative; }
.pw-input input { width: 100%; padding-right: 3.25rem; font-size: 1rem; }
.pw-eye { position: absolute; top: 50%; right: .35rem; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: var(--radius); background: none; color: var(--subtle); cursor: pointer; transform: translateY(-50%); }
.pw-eye:hover { color: var(--ink); }
.pw-eye:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.pw-eye[hidden], .pw-meter[hidden], .pw-tools[hidden] { display: none; }
.pw-eye .eye-off { display: none; }
.pw-eye[aria-pressed="true"] .eye-off { display: inline; }
.pw-help, .pw-match { margin: -.5rem 0 0; color: var(--subtle); font-size: .875rem; }
.pw-meter { display: grid; gap: .6rem; margin-top: -.25rem; }
.pw-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.pw-bar span { height: 6px; border-radius: 999px; background: var(--line); }
.pw-bar[data-level="1"] span:first-child { background: var(--danger); }
.pw-bar[data-level="2"] span:nth-child(-n+2), .pw-bar[data-level="3"] span { background: var(--dark); }
.pw-meter p { margin: 0; font-size: .9375rem; }
.pw-label { color: var(--ink); font-weight: 700; }
.pw-label:empty, .pw-warning:empty, .pw-match:empty { display: none; }
.pw-warning { color: var(--danger); }
.pw-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: .75rem 1rem; margin: 0; padding: 1rem 1.25rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); list-style: none; }
.pw-checks li { display: flex; align-items: center; gap: .6rem; color: var(--text); font-size: .9375rem; }
.pw-checks svg { flex: none; }
.pw-checks circle { fill: none; stroke: var(--subtle); stroke-width: 1.5; }
.pw-checks path { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.pw-checks .met { color: var(--ink); }
.pw-checks .met circle { fill: var(--dark); stroke: var(--dark); }
.pw-checks .met path { opacity: 1; }
.pw-tools { margin: -.25rem 0 0; font-size: .9375rem; }
.pw-tools .linkish { color: var(--primary); font-weight: 700; text-decoration: underline; }
.pw-bad { color: var(--danger); }

/* ---------- Ticket management (src/routes/admin.tsx, src/views/portal.tsx): image thumbnails, one-click status, activity,
   inbox exports / bulk status, follow-up due marker, Team role picker. */
.msg-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; margin: .75rem 0 0; padding: 0; list-style: none; }
.msg-images li { display: grid; gap: .35rem; }
.msg-images a:has(img) { display: block; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--light); }
.msg-images img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.msg-images a:has(img):hover { border-color: var(--primary); }
.msg-images small { color: var(--subtle); font-size: .8125rem; overflow-wrap: anywhere; }
.manage-label { margin: 0; color: var(--ink); font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.ticket-side .status-form { grid-template-columns: 1fr; }
.status-buttons { display: flex; flex-wrap: wrap; gap: .4rem; }
.status-btn { min-height: 40px; padding: .4rem .85rem; border: 1px solid var(--dark); border-radius: var(--radius); background: var(--bg); color: var(--dark);
  font: 700 .8125rem/1 var(--font); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.status-btn:hover { background: var(--light); }
.status-btn[aria-pressed="true"] { background: var(--dark); color: #fff; }
.status-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.activity { margin-bottom: 1rem; }
.activity .portal-h2 { margin-top: 0; }
.activity-list { display: grid; gap: .75rem; margin: 0 0 .75rem; padding: 0; list-style: none; font-size: .875rem; }
.activity-list li { padding-left: .75rem; border-left: 2px solid var(--line); }
.activity-list time { color: var(--subtle); font-size: .8125rem; }
.delete-form { margin: 0 0 1rem; }
.export-form { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; margin: -.5rem 0 1.5rem; }
.export-form label { gap: .35rem; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.export-form input { min-height: 40px; padding: .4rem .6rem; font-size: .9375rem; }
.export-form small { flex-basis: 100%; color: var(--subtle); }
.bulk-bar { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; margin-bottom: .75rem; }
.bulk-bar label { display: flex; align-items: center; gap: .6rem; font-size: .875rem; font-weight: 400; }
.bulk-bar select { width: auto; min-height: 40px; padding: .35rem .6rem; }
.bulk-bar .btn { border: 0; cursor: pointer; }
.ticket-table input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--primary); }
.due { color: var(--danger); font-weight: 700; }
.role-form { display: flex; align-items: center; gap: .5rem; }
.role-form select { width: auto; min-height: 40px; padding: .35rem .6rem; }

/* ---------- Phones (under 720px): hero copy centred with both buttons on one row; the stat cards (1,500+ fabrics,
   4.9★ on Google ...) become a swipeable row that bleeds to the screen edges and snaps card by card. */
@media (max-width: 719.98px) {
  .hero-copy { margin-inline: auto; text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero .actions { flex-wrap: nowrap; justify-content: center; gap: .5rem; margin-top: 1.5rem; }
  .hero .actions .btn { flex: 0 1 auto; min-height: 44px; padding: .55rem .9rem; font-size: .75rem; letter-spacing: .04em; text-wrap: balance; }
  .stat-cards {
    grid-auto-flow: column; grid-auto-columns: min(80%, 20rem); gap: .75rem;
    margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) .25rem; scroll-padding-inline: var(--gutter);
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
  }
  .stat-cards::-webkit-scrollbar { display: none; }
  .stat-card { scroll-snap-align: start; }
  /* Dark CTA bands (Hotel and hospitality projects, ...): heading, copy and button centred like the hero. */
  .cta-inner { text-align: center; }
  .cta-band p { margin-inline: auto; }
  .cta-band .btn { justify-self: center; }
}

/* ---------- Entrance animations. CSS only, and only when the visitor hasn't asked for reduced motion.
   Hero: the copy rises in on load, one line after another (the heading only slides, never fades, so it still counts as
   painted at once for LCP; the hero image doesn't move). Below the hero: cards, photos and section headings fade up as
   they scroll into view, using scroll-driven animations. Browsers without animation-timeline (Firefox today) skip it
   and show everything as normal, so nothing is ever stuck hidden. Public pages only: none of these classes are in /admin. */
@keyframes zd-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes zd-slide { from { transform: translateY(14px); } to { transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > .eyebrow, .hero-copy > .lead, .hero-copy > .actions, .quote-page > .wrap > .quote-intro { animation: zd-rise .6s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-copy > h1, .quote-page > .wrap > h1 { animation: zd-slide .6s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-copy > h1 { animation-delay: .06s; }
  .hero-copy > .lead, .quote-page > .wrap > .quote-intro { animation-delay: .14s; }
  .hero-copy > .actions { animation-delay: .22s; }

  @supports (animation-timeline: view()) {
    /* Forms (quote builder, trade application) and the legal pages stay still: nothing moves while someone types or reads terms. */
    :is(.section-head, .section-heading, .split-copy, .twocol > h2, .twocol-body, .faq-inner > :not(.faq-list), .section .wrap > :is(h2, .lead:not(.quote-intro))),
    :is(.card, .line-card, .stat-card, .spec, .benefit, .contact-card, .family-card, .press-card, .partner-tile, .project, .swatch),
    :is(.split-img, .banner, .photo, .com-diagram, .industry-list > li, .steps > li, .faq-list > *, .stats-inner > div, .cta-inner),
    :is(.terms-block, .muted-copy, .wrap > .prose, .wrap > .actions, .pills) {
      animation: zd-rise linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 45%;
    }
  }
}

/* ---------- Careers (/careers, /careers/:slug; src/views/pages/careers.tsx) and the super admin's job form */
.job-list { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 720px) { .job-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; } }
.job-card h3 { margin-bottom: .4rem; }
.job-team { margin: 0 0 .5rem; color: var(--primary); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
a.card .job-facts, .job-facts { margin: 0 0 .75rem; color: var(--subtle); font-size: .875rem; }
.job-body { max-width: 46rem; }
.job-body h2 { margin: 2.5rem 0 .75rem; font-size: clamp(1.375rem, 2.5vw, 1.75rem); }
.job-body h3 { margin: 1.5rem 0 .5rem; font-size: 1.125rem; }
.job-body > :first-child { margin-top: 0; }
.job-body p { font-size: 1.0625rem; line-height: 1.7; }
.job-note { padding: 1rem 1.25rem; border-left: 3px solid var(--dark); background: var(--light); color: var(--ink); }
.apply-box h2 { margin-bottom: .75rem; }
.apply-box > div:first-child > p { font-size: 1.0625rem; }
.fields-2 { display: grid; gap: 1.25rem 1.5rem; }
@media (min-width: 720px) { .fields-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .job-form .fields-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.job-form .fields-3 { display: grid; gap: 1.25rem 1.5rem; }
.job-body-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .875rem; line-height: 1.55; }

/* Careers two-column layouts (wide screens): hero + "at a glance" card, role + sticky summary card, how-to-apply + email card. */
.side-card { padding: 1.5rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }
.side-label { margin: 0 0 .75rem; color: var(--primary); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.careers-hero-inner { display: grid; gap: 2rem; }
.glance { background: var(--light); }
.glance-num { margin: 0; color: var(--ink); font-size: 3.5rem; font-weight: 700; line-height: 1; }
.glance-caption { margin: .25rem 0 1.25rem; color: var(--text); }
.glance-teams { display: grid; gap: .5rem; margin: 0 0 1.25rem; padding: 1rem 0 0; border-top: 1px solid var(--line); list-style: none; }
.glance-teams li { display: flex; justify-content: space-between; gap: 1rem; color: var(--text); }
.glance-teams strong { color: var(--ink); }
.glance-facts { display: grid; gap: .75rem; margin: 0; }
.glance-facts div { display: grid; gap: .15rem; }
.glance-facts dt { color: var(--subtle); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.glance-facts dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.glance .glance-facts { padding-top: 1rem; border-top: 1px solid var(--line); }
.job-page { padding-block: 3rem 4rem; }
.job-layout { display: grid; gap: 2rem; grid-template-areas: "head" "aside" "main"; }
.job-head { grid-area: head; }
.job-head h1 { margin-bottom: 1rem; font-size: clamp(2rem, 4.5vw, 3.25rem); }
.job-head .lead { margin: 0; max-width: 46rem; }
.job-aside { grid-area: aside; display: grid; gap: 1rem; align-content: start; }
.job-main { grid-area: main; }
.job-summary .btn, .apply-card .btn { width: 100%; }
.job-summary .btn { margin-top: 1.25rem; }
.job-summary .hint { margin: .75rem 0 0; font-size: .8125rem; overflow-wrap: anywhere; }
.job-others { margin-top: 3rem; padding-top: 2.5rem; border-top: 1px solid var(--line); max-width: 46rem; }
.job-others h2 { margin-bottom: 1.25rem; font-size: clamp(1.375rem, 2.5vw, 1.75rem); }
.job-others ul { display: grid; gap: .75rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 720px) { .job-others ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.job-others li { display: grid; gap: .2rem; padding: 1rem 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); }
.job-others a { color: var(--ink); font-weight: 700; text-decoration: none; }
.job-others a:hover { text-decoration: underline; }
.job-others small { color: var(--subtle); font-size: .8125rem; }
.apply-box { display: grid; gap: 2rem; }
.apply-email { margin: 0 0 1rem; font-size: 1.125rem; font-weight: 700; overflow-wrap: anywhere; }
.apply-email a { color: var(--ink); }
@media (min-width: 1000px) {
  .careers-hero-inner, .apply-box { grid-template-columns: minmax(0, 1.5fr) minmax(18rem, 1fr); gap: 4rem; align-items: center; }
  .job-layout { grid-template-columns: minmax(0, 1fr) 20rem; grid-template-areas: "head aside" "main aside"; column-gap: 4rem; row-gap: 2.5rem; }
  .job-aside { position: sticky; top: 2rem; align-self: start; }
}
