/* Plastic Valve Tags — design system. Follows design/LOCK.md (Ada, "daylight gallery with pastel
   punctuation"). Role names --bg --ink --card --line --muted --accent --font-body --font-display
   --radius are read by the builder at /niche/; keep them. */
@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/dm-sans.woff2?v=89c7ce3aaf") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0a0b0c;
  --bg: #f9f9f9;
  --card: #ffffff;
  --paper: #ffffff;
  --ash: #d8d8d8;
  --line: rgba(10, 11, 12, 0.12);
  --line-strong: rgba(10, 11, 12, 0.22);
  --muted: rgba(10, 11, 12, 0.68);
  --faint: rgba(10, 11, 12, 0.5);
  --forest: #00543d;
  --periwinkle: #abcbf9;
  --periwinkle-hover: #98bdf6;
  --candy: #ffbbfc;
  --butter: #fce88b;
  --accent: #abcbf9;
  --accent-ink: #0a0b0c;
  --font-body: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: var(--font-body);
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 8px;
  --radius-nav: 32px;
  --radius-input: 4px;
  --wrap: 1200px;
  --gutter: 24px;
  --section: 80px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.56 var(--font-body); font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3, h4 { font-weight: 400; letter-spacing: normal; margin: 0 0 .5em; }
h1 { font-size: clamp(2.6rem, 6.2vw, 4.5rem); line-height: 1.0; }
h2 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.11; }
h3 { font-size: 1.5rem; line-height: 1.33; }
h4 { font-size: 1.25rem; line-height: 1.38; }
p { margin: 0 0 1em; }
strong, b { font-weight: 400; color: var(--ink); }
small { font-size: .875rem; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 999px; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------- announcement bar */
.announce { background: var(--ink); color: #fff; font-size: 14px; line-height: 1.43; }
.announce .wrap { display: flex; align-items: center; gap: 16px; min-height: 40px; max-width: none; padding: 0 48px; }
.announce .a-left { flex: 0 0 auto; color: rgba(255,255,255,.8); font-size: 12px; }
.announce .a-mid { flex: 1; text-align: center; }
.announce .a-mid a { text-decoration: none; }
.announce .pill-forest { flex: 0 0 auto; background: var(--forest); color: #fff; border-radius: 999px; padding: 6px 16px; text-decoration: none; border: 1px solid rgba(255,255,255,.18); font-size: 14px; }
.announce .pill-forest:hover { background: #006a4d; }

/* ------------------------------------------------------------- floating nav */
.site-header { position: relative; z-index: 40; }
.navbar {
  position: absolute; left: 48px; right: 48px; top: 56px;
  display: flex; align-items: center; gap: 8px;
  background: var(--paper); border-radius: var(--radius-nav); padding: 8px 8px 8px 24px; min-height: 56px;
  border: 1px solid var(--line);
}
.plain .navbar { position: relative; left: auto; right: auto; top: auto; margin: 16px 48px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 22px; line-height: 1; margin-right: 28px; white-space: nowrap; }
.brand svg { width: 26px; height: 26px; flex: none; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links > li { position: relative; }
.nav-links > li > a, .nav-links > li > button {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 999px;
  font: inherit; font-size: 15px; color: var(--ink); background: none; border: 0; cursor: pointer; text-decoration: none;
}
.nav-links > li > a:hover, .nav-links > li > button:hover, .nav-links > li.open > button { background: var(--bg); }
.nav-links .chev { width: 12px; height: 12px; transition: transform .2s; }
.nav-links li.open .chev { transform: rotate(180deg); }
.menu {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 300px; display: none;
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 8px; list-style: none; margin: 0;
}
.nav-links li.open .menu, .nav-links li:focus-within .menu { display: block; }
@media (hover: hover) { .nav-links li:hover .menu { display: block; } .nav-links li:hover .chev { transform: rotate(180deg); } .menu::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; } }
.menu a { display: block; padding: 10px 14px; border-radius: 8px; text-decoration: none; }
.menu a:hover { background: var(--bg); }
.menu a span { display: block; font-size: 14px; color: var(--muted); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px; color: var(--ink); text-decoration: none; }
.icon-btn:hover { background: var(--bg); }
.icon-btn svg { width: 20px; height: 20px; }
.nav-toggle { display: none; }

/* ------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 12px; border-radius: 999px; text-decoration: none;
  font: inherit; font-size: 16px; line-height: 1; cursor: pointer; border: 0; white-space: nowrap;
  background: var(--periwinkle); color: var(--ink); padding: 4px 4px 4px 20px; min-height: 48px;
  transition: background .2s;
}
.btn:hover { background: var(--periwinkle-hover); }
.btn .disc { width: 40px; height: 40px; border-radius: 999px; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; transition: transform .25s; }
.btn:hover .disc { transform: translateX(2px); }
.btn .disc svg { width: 18px; height: 18px; }
.btn-dark { background: var(--ink); color: #fff; padding: 12px 24px; min-height: 48px; }
.btn-dark:hover { background: #26282a; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); padding: 12px 22px; min-height: 48px; }
.btn-ghost:hover { background: var(--paper); }
.btn-sm { min-height: 40px; font-size: 15px; }
.btn-sm .disc { width: 32px; height: 32px; }
.arrow-disc { width: 48px; height: 48px; border-radius: 999px; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; }
.arrow-disc svg { width: 18px; height: 18px; }

/* ------------------------------------------------------------- hero */
.hero { position: relative; min-height: 860px; display: flex; align-items: center; overflow: hidden; color: #fff; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,11,12,.28), rgba(10,11,12,0) 60%); }
.hero-inner { width: 100%; max-width: 1440px; margin: 0 auto; padding: 190px 160px 120px; display: grid; grid-template-columns: 1fr 552px; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(3rem, 5.2vw, 4.5rem); line-height: 1.05; margin-bottom: 40px; max-width: 9.5em; }
.hero .lede { font-size: 18px; line-height: 1.56; color: rgba(255,255,255,.9); max-width: 26em; margin: 0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hero-actions .btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.hero-actions .btn-ghost:hover { background: rgba(255,255,255,.12); }

/* the floating product card (Ada's chat widget, as a live valve schedule) */
.live { position: relative; background: var(--paper); color: var(--ink); border-radius: var(--radius); border: 1px solid var(--bg); padding: 0; min-height: 318px; }
.live-top { display: flex; align-items: center; justify-content: space-between; padding: 20px 28px; }
.live-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; }
.live-brand svg { width: 24px; height: 24px; }
.dots { display: inline-flex; gap: 6px; align-items: center; }
.dots i { width: 6px; height: 6px; border-radius: 9px; display: block; background: var(--ink); }
.dots i:nth-child(1) { background: var(--forest); } .dots i:nth-child(2) { background: var(--candy); width: 8px; height: 8px; }
.dots i:nth-child(3) { background: var(--periwinkle); width: 8px; height: 8px; } .dots i:nth-child(4) { background: var(--butter); }
.live-body { background: var(--bg); margin: 0 0 0; padding: 22px 28px 64px; border-radius: 0 0 var(--radius) var(--radius); display: grid; grid-template-columns: 1fr 132px; gap: 20px; min-height: 236px; }
.live-label { font-size: 14px; color: var(--muted); margin: 0 0 4px; }
.live-line { font-size: 18px; line-height: 1.5; margin: 0; min-height: 3em; }
.live-line .caret { display: inline-block; width: 1px; height: 1.05em; background: var(--ink); vertical-align: -2px; margin-left: 1px; animation: blink 1s steps(1) infinite; }
.live-next { font-size: 15px; color: var(--muted); margin: 14px 0 0; line-height: 1.45; -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.42), rgba(0,0,0,.12)); mask-image: linear-gradient(180deg, rgba(0,0,0,.42), rgba(0,0,0,.12)); }
.live-tag { align-self: start; width: 132px; height: 132px; display: grid; place-items: center; }
.live-tag svg { width: 100%; height: 100%; transition: opacity .35s, transform .35s; }
.live-tag.swap svg { opacity: 0; transform: scale(.94); }
.live .btn { position: absolute; right: 48px; bottom: -22px; }
@keyframes blink { 50% { opacity: 0; } }

/* ------------------------------------------------------------- the strip under the hero */
.strip { background: var(--bg); padding: 40px 0; }
.strip ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.strip li { font-size: 22px; color: var(--muted); display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.strip li svg { width: 22px; height: 22px; opacity: .6; }

/* ------------------------------------------------------------- sections */
.band { padding: var(--section) 0; }
.band-white { background: var(--paper); }
.band-tight { padding: 48px 0; }
.intro { text-align: center; max-width: 760px; margin: 0 auto 48px; }
.intro h2 { margin-bottom: 24px; }
.intro p { font-size: 18px; color: var(--muted); max-width: 640px; margin: 0 auto; }
.prose { max-width: 760px; }
.prose p, .prose li { font-size: 17px; }
.prose h2 { font-size: 2rem; line-height: 1.25; margin-top: 56px; }
.prose h3 { margin-top: 32px; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .4em; }
.lead { font-size: 20px; line-height: 1.5; color: var(--muted); }
.answer { font-size: 20px; line-height: 1.5; border-left: 4px solid var(--periwinkle); padding: 4px 0 4px 20px; margin: 0 0 32px; }
.page-head { padding-top: 72px; padding-bottom: 40px; }
.page-head h1 { font-size: clamp(2.6rem, 5vw, 4rem); line-height: 1.05; max-width: 14em; }
.page-head .lead { max-width: 40em; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.crumbs a { text-decoration: none; } .crumbs a:hover { text-decoration: underline; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.two-top { align-items: start; }

/* stat cards: 4px left bar, one colour each */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { position: relative; background: var(--paper); border-radius: var(--radius); padding: 24px 24px 24px 28px; overflow: hidden; border: 1px solid var(--line); }
.band-white .stat { background: var(--bg); border-color: transparent; }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--forest); }
.stat:nth-child(2)::before { background: var(--candy); } .stat:nth-child(3)::before { background: var(--periwinkle); } .stat:nth-child(4)::before { background: var(--butter); }
.stat b { display: block; font-size: 48px; line-height: 1.11; margin-bottom: 12px; }
.stat span { display: block; font-size: 15px; line-height: 1.43; color: var(--muted); }

/* full-bleed image cards with a bottom scrim + arrow disc */
.icards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.icard { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; color: #fff; text-decoration: none; background: #1d1f21; }
.icard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.icard:hover img { transform: scale(1.03); }
.icard::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(10,11,12,.62)); }
.icard .ic-text { position: absolute; left: 24px; right: 88px; bottom: 24px; z-index: 1; }
.icard h3 { font-size: 32px; line-height: 1.25; margin: 0 0 8px; }
.icard p { margin: 0; font-size: 15px; color: rgba(255,255,255,.88); }
.icard .arrow-disc { position: absolute; right: 16px; bottom: 16px; z-index: 1; transition: transform .25s; }
.icard:hover .arrow-disc { transform: translateX(3px); }

/* product / shape cards (catalog) */
.pcards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pcard { display: flex; flex-direction: column; background: var(--paper); border-radius: var(--radius); border: 1px solid var(--line); text-decoration: none; overflow: hidden; transition: border-color .2s; }
.band-white .pcard { background: var(--bg); border-color: transparent; }
.pcard:hover { border-color: var(--line-strong); }
.pcard .pc-img { aspect-ratio: 1; background: var(--bg); overflow: hidden; }
.band-white .pcard .pc-img { background: var(--paper); }
.pcard .pc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.pcard:hover .pc-img img { transform: scale(1.04); }
.pcard .pc-body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcard h3 { font-size: 24px; margin: 0; }
.pcard .pc-meta { font-size: 15px; color: var(--muted); margin: 0; }
.pcard .pc-foot { margin-top: auto; padding-top: 14px; display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.pcard .pc-foot .arrow-disc { width: 36px; height: 36px; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 400; color: var(--muted); font-size: 14px; background: var(--bg); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sw { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 22px; border-radius: 4px; font-size: 12px; vertical-align: middle; margin-right: 8px; border: 1px solid rgba(10,11,12,.12); }

/* tag thumbnails from the engine */
.tagsvg svg { width: 100%; height: auto; }

/* chips / filters */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: 15px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; border: 1px solid rgba(10,11,12,.15); }

/* FAQ */
.faq { max-width: 860px; margin: 0 auto; padding: var(--section) var(--gutter); background: var(--paper); box-shadow: 0 0 0 100vmax var(--paper); clip-path: inset(0 -100vmax); }
.faq h2 { text-align: center; margin-bottom: 40px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 48px 22px 0; font-size: 20px; line-height: 1.38; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 12px; height: 12px; margin-top: -8px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details > div { padding: 0 48px 24px 0; color: var(--muted); font-size: 17px; }

/* CTA band */
.cta { text-align: center; padding: 96px var(--gutter); background: var(--bg); }
.cta h2 { max-width: 14em; margin: 0 auto 24px; }
.cta p { font-size: 18px; color: var(--muted); max-width: 36em; margin: 0 auto 32px; }
.cta .row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* steps */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 0; }
.steps li { counter-increment: s; padding: 20px 0 20px 56px; position: relative; border-top: 1px solid var(--line); font-size: 17px; }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 18px; width: 32px; height: 32px; border-radius: 99px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 15px; }
.steps li b { display: block; font-size: 20px; margin-bottom: 4px; }
.steps li span { color: var(--muted); }

/* a white panel used for mock UI / figures */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.band-white .panel { background: var(--bg); border-color: transparent; }
.figure img { border-radius: var(--radius); width: 100%; }
.figure figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
.note { font-size: 14px; color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; font-size: 15px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }

/* ------------------------------------------------------------- footer */
.site-footer { background: var(--bg); border-top: 1px solid var(--line); padding: 72px 0 40px; font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.foot-grid .foot-h { font-size: 15px; color: var(--muted); margin: 0 0 14px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot-grid a { text-decoration: none; } .foot-grid a:hover { text-decoration: underline; }
.foot-brand p { color: var(--muted); max-width: 22em; margin-top: 16px; }
.foot-small { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }

/* ------------------------------------------------------------- motion (scoped to .js so a failed script never hides content) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .live-line .caret { animation: none; }
  * { scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------- responsive */
@media (max-width: 1240px) {
  .hero-inner { padding: 150px 64px 96px; grid-template-columns: 1fr 480px; }
}
@media (max-width: 1100px) {
  .navbar { left: 24px; right: 24px; }
  .plain .navbar { margin: 16px 24px 0; }
  .announce .wrap { padding: 0 24px; }
  .announce .a-left { display: none; }
  .nav-links > li > a, .nav-links > li > button { padding: 10px 10px; }
  .brand { margin-right: 12px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .pcards { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; padding: 140px 48px 96px; }
  .live { max-width: 560px; }
}
@media (max-width: 860px) {
  .nav-toggle { display: grid; }
  .nav-links { display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 8px; }
  .navbar.open .nav-links { display: flex; }
  .menu { position: static; display: block; border: 0; padding: 0 0 0 12px; min-width: 0; }
  .nav-links .chev { display: none; }
  .nav-right .btn .label { display: none; }
  .nav-right .btn { padding: 4px; }
  .two { grid-template-columns: 1fr; gap: 32px; }
  .icards { grid-template-columns: 1fr; }
  .icard { aspect-ratio: 4 / 3.4; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .announce .a-mid { text-align: left; font-size: 13px; }
}
@media (max-width: 560px) {
  :root { --gutter: 20px; --section: 56px; }
  .navbar { left: 12px; right: 12px; padding-left: 16px; }
  .plain .navbar { margin: 12px 12px 0; }
  .announce .pill-forest { display: none; }
  .brand { font-size: 18px; margin-right: 4px; gap: 8px; }
  .brand svg { width: 22px; height: 22px; }
  .nav-right .icon-btn[href^="tel"] { display: none; }
  .nav-right { gap: 4px; }
  .hero-inner { padding-top: 150px; }
  .hero { min-height: 0; }
  .hero-inner { padding: 150px 20px 80px; }
  .hero h1 { font-size: 2.75rem; margin-bottom: 24px; }
  .live-body { grid-template-columns: 1fr 92px; padding: 18px 20px 60px; }
  .live-tag { width: 92px; height: 92px; }
  .live-top { padding: 16px 20px; }
  .live .btn { right: 20px; }
  .stats { grid-template-columns: 1fr; }
  .pcards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pcard .pc-body { padding: 14px; }
  .pcard h3 { font-size: 19px; }
  .strip li { font-size: 17px; }
  .faq summary { font-size: 18px; }
  .foot-grid { grid-template-columns: 1fr; }
  .stat b { font-size: 40px; }
}

/* ------------------------------------------------------------- print (valve chart) */
@media print {
  .announce, .site-header, .site-footer, .no-print, .faq, .cta { display: none !important; }
  body { background: #fff; }
}

/* ------------------------------------------------------------- catalog grid */
.cat-controls { display: grid; gap: 14px; justify-items: center; margin-bottom: 32px; }
.cat-controls .chips { justify-content: center; }
.spec-toggle { font-size: 15px; display: inline-flex; gap: 8px; align-items: center; color: var(--muted); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.cat-item { background: var(--bg); border-radius: var(--radius); padding: 24px 20px 20px; text-decoration: none; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; border: 1px solid transparent; transition: border-color .2s; }
.cat-item:hover { border-color: var(--line-strong); }
.cat-item[hidden] { display: none; }
.cat-item .tagsvg { height: 168px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; max-width: 100%; }
.cat-item b { font-size: 18px; }
.cat-item span { font-size: 14px; color: var(--muted); }
.cat-item em { font-style: normal; font-size: 12px; margin-top: 6px; padding: 3px 10px; border-radius: 99px; background: var(--paper); border: 1px solid var(--line); }
.size-strip { display: flex; align-items: flex-end; justify-content: center; gap: 28px; flex-wrap: wrap; margin: 40px 0 8px; }
.size-strip figure { margin: 0; text-align: center; font-size: 14px; color: var(--muted); }
.size-strip figcaption { margin-top: 10px; }
.tagsheet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 36px; }
.tagsheet .tagsvg { max-width: 132px; margin: 0 auto; width: 100%; }

/* ------------------------------------------------------------- studio (/builder/, /valve-tag-chart/) */
.page-head-tight { padding: 56px var(--gutter) 28px; }
.wrap-wide { max-width: 1440px; }
.studio { display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: start; }
.st-side { display: grid; gap: 16px; position: sticky; top: 16px; }
.st-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 14px; }
.st-h { font-size: 18px; line-height: 1.3; margin: 0; }
.st-h small { color: var(--muted); font-size: 13px; margin-left: 6px; }
.st-field { display: grid; gap: 6px; font-size: 14px; }
.st-field > span { color: var(--muted); font-size: 13px; }
.st-field .chips { gap: 6px; }
.st-field .chip { font-size: 14px; padding: 6px 12px; }
.st-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 10px; }
.st-row-btns { grid-template-columns: auto auto; justify-content: start; }
.studio input, .studio select, .studio textarea { font: inherit; font-size: 15px; color: var(--ink); background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius-input); padding: 8px 10px; width: 100%; min-width: 0; }
.studio textarea { font-family: var(--font-mono); font-size: 13px; resize: vertical; }
.studio input:focus, .studio select:focus, .studio textarea:focus { outline: 2px solid var(--periwinkle); outline-offset: 0; border-color: var(--ink); }
.studio .btn-dark, .studio .btn-ghost { min-height: 42px; padding: 10px 18px; font-size: 15px; justify-self: start; }
.st-sample { display: grid; justify-items: center; gap: 8px; padding-top: 6px; border-top: 1px solid var(--line); }
.st-sample .thumb { width: 120px; }
.st-sample .thumb.actual { width: auto; }
.st-main { min-width: 0; display: grid; gap: 16px; }
.st-bar { position: sticky; top: 0; z-index: 5; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 14px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.st-bar b { font-size: 20px; }
.st-total { font-size: 20px; margin-left: 10px; }
.st-bar .note { margin: 2px 0 0; }
.st-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.st-actions .chip { font-size: 14px; }
.st-actions .btn[disabled] { opacity: .45; cursor: not-allowed; }
.st-flash { background: var(--butter); border-radius: var(--radius); padding: 10px 16px; margin: 0; font-size: 15px; }
.st-sched { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.st-sched table { font-size: 14px; }
.st-sched td { padding: 8px 10px; vertical-align: middle; }
.st-sched th { padding: 10px; }
.st-sched input { padding: 6px 8px; font-size: 14px; }
.st-sched tr.bad td { background: #fff7f7; }
.st-sched .empty { padding: 48px 24px; text-align: center; color: var(--muted); margin: 0; }
.t-thumb { width: 92px; }
.thumb { width: 72px; }
.thumb svg { width: 100%; height: auto; }
.thumb.actual { width: auto; }
.thumb.actual svg { width: auto; }
.dot { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 99px; font-size: 11px; }
.row-warn { font-size: 12px; color: #9b1c1c; margin-top: 4px; max-width: 14em; line-height: 1.3; }
.x { width: 30px; height: 30px; border-radius: 99px; border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--muted); }
.x:hover { background: var(--bg); color: var(--ink); }
.chart-wrap { display: grid; gap: 8px; }
.chart { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; font-size: 13px; overflow-x: auto; }
.chart header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 4px; }
.chart h3 { margin: 0; font-size: 24px; text-transform: uppercase; letter-spacing: .04em; }
.chart header p { margin: 0; color: var(--muted); }
.chart th, .chart td { padding: 7px 8px; font-size: 13px; }
.chart th { background: none; color: var(--ink); border-bottom: 1px solid var(--ink); }
.chart footer { margin-top: 12px; font-size: 11px; color: var(--muted); }
.chip-tag { display: inline-block; min-width: 54px; text-align: center; padding: 3px 8px; border-radius: 99px; font-size: 12px; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) {
  .studio { grid-template-columns: 1fr; }
  .st-side { position: static; }
}
@media print {
  body.print-chart * { visibility: hidden; }
  body.print-chart .chart, body.print-chart .chart * { visibility: visible; }
  body.print-chart .chart { position: absolute; left: 0; top: 0; width: 100%; border: 0; padding: 0; }
  body.print-chart .chip-tag { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { size: letter landscape; margin: 12mm; }
}

@media (max-width: 560px), (pointer: coarse) {
  .foot-grid ul { gap: 4px; }
  .foot-grid a, .foot-small a, .crumbs a { display: inline-block; padding: 6px 0; }
  .note a, td a { display: inline-block; padding: 4px 0; }
}
@media (max-width: 860px) {
  .announce .a-mid { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .navbar { top: 52px; }
}
.muted { color: var(--muted); }
.two > * { min-width: 0; }
.brand { min-height: 40px; }
.spec-toggle input { width: 24px; height: 24px; margin: 0; }
.spec-toggle { padding: 6px 0; cursor: pointer; }
@media (max-width: 860px) {
  .announce .a-mid { min-width: 0; }
  .announce .a-mid a { display: block; padding: 11px 0; overflow: hidden; text-overflow: ellipsis; }
}
.plain .navbar { left: auto !important; right: auto !important; top: auto !important; }
.st-loading .st-sample::before { content: "Loading the tag engine…"; color: var(--muted); font-size: 14px; }

/* ------------------------------------------------------------- the builder: one screen, three panes */
.page-app .site-header.plain .navbar { margin-bottom: 0; }
.app {
  --gap: 12px;
  display: grid; grid-template-columns: 300px minmax(0, 1fr) 300px; grid-template-rows: auto minmax(0, 1fr);
  gap: var(--gap); height: calc(100dvh - var(--hdr, 112px) - 24px); min-height: 560px;
  max-width: 1680px; margin: 12px auto 12px; padding: 0 48px;
}
.app-bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 8px 8px 20px; min-height: 60px; }
.app-title h1 { font-size: 24px; line-height: 1.15; margin: 0; }
.app-title p { margin: 0; font-size: 13px; color: var(--muted); }
.app-sum { margin-left: auto; text-align: right; line-height: 1.25; }
.app-sum b { font-size: 17px; }
.app-sum .st-total { font-size: 17px; margin-left: 10px; }
.app-sum .note { margin: 2px 0 0; font-size: 12px; }
.app-actions { display: flex; gap: 8px; align-items: center; }
.app-actions .chip { font-size: 14px; padding: 8px 14px; }
.app-actions .btn[disabled] { opacity: .45; cursor: not-allowed; }
.app-tabs { display: none; }
.pane { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); min-height: 0; overflow: auto; }
.pane-style, .pane-preview { padding: 16px 16px 20px; display: grid; gap: 14px; align-content: start; }
.pane-h { font-size: 17px; margin: 0; display: flex; align-items: center; gap: 8px; }
.pane-h span { width: 22px; height: 22px; border-radius: 99px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 12px; }
.pane-h small { color: var(--muted); font-size: 12px; margin-left: 2px; }
.app .st-field { gap: 6px; }
.app .st-field > span { font-size: 12px; }
.app .chips { gap: 5px; }
.app .chip { font-size: 13px; padding: 5px 10px; }
.app select, .app input, .app textarea { font: inherit; font-size: 14px; color: var(--ink); background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius-input); padding: 6px 8px; width: 100%; min-width: 0; }
.app textarea { font-family: var(--font-mono); font-size: 12.5px; resize: none; }
.app input:focus, .app select:focus, .app textarea:focus { outline: 2px solid var(--periwinkle); outline-offset: 0; border-color: var(--ink); }
.st-pair2 { display: grid; grid-template-columns: auto 1fr; gap: 14px; }
.shapes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.shape { display: grid; justify-items: center; gap: 2px; padding: 8px 2px 6px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper); cursor: pointer; font: inherit; font-size: 11.5px; color: var(--ink); }
.shape svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.shape svg .h { fill: currentColor; stroke: none; }
.shape:hover { border-color: var(--ink); }
.shape[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.sw-btn { width: 34px; height: 34px; padding: 2px; border-radius: 99px; border: 2px solid transparent; background: none; cursor: pointer; }
.sw-btn i { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 99px; font-style: normal; font-size: 11px; border: 1px solid rgba(10,11,12,.15); }
.sw-btn[aria-pressed="true"] { border-color: var(--ink); }
.pane-valves { display: flex; flex-direction: column; }
.adder { padding: 12px 14px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.adder-tabs { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.adder-tabs [role="tab"] { font: inherit; font-size: 14px; padding: 6px 14px; border-radius: 99px; border: 0; background: none; cursor: pointer; color: var(--muted); }
.adder-tabs [role="tab"][aria-selected="true"] { background: var(--bg); color: var(--ink); }
.adder-link { margin-left: auto; font: inherit; font-size: 13px; border: 0; background: none; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 6px 4px; }
.adder-link + .adder-link { margin-left: 0; }
.adder-body { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.adder-body[hidden] { display: none; }
.adder-body label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); width: 74px; }
.adder-body label.w2 { width: auto; flex: 1 1 170px; }
.adder-body.paste textarea { flex: 1 1 260px; height: 64px; }
.app .btn-dark { min-height: 36px; padding: 8px 18px; font-size: 14px; }
.app .st-flash { margin: 10px 14px 0; font-size: 14px; padding: 8px 12px; }
.sched { flex: 1; min-height: 0; overflow: auto; }
.sched table { font-size: 13.5px; }
.sched thead th { position: sticky; top: 0; z-index: 1; padding: 8px; font-size: 12px; }
.sched td { padding: 5px 8px; vertical-align: middle; }
.sched input { padding: 5px 7px; font-size: 13.5px; }
.sched tr { cursor: pointer; }
.sched tr.sel td { background: #eef4fe; }
.sched tr.bad td { background: #fff6f6; }
.sched tr.bad.sel td { background: #fbeeee; }
.sched .thumb { width: 52px; }
.sched .thumb.actual { width: auto; }
.sched .empty { padding: 56px 24px; text-align: center; }
.sched .empty p { margin: 0 0 6px; }
.linkish { font: inherit; border: 0; background: none; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.big-tag { display: grid; gap: 12px; justify-items: center; }
.big-svg { width: 100%; max-width: 230px; }
.big-svg svg { width: 100%; height: auto; }
.big-svg.actual { width: auto; max-width: none; }
.big-svg.actual svg { width: auto; }
.big-tag .kv { width: 100%; font-size: 14px; gap: 5px 14px; }
.big-tag .kv small { color: var(--muted); }
.big-tag .row-warn { max-width: none; font-size: 13px; margin: 0; }
.spec { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 6px; }
.spec .note { margin: 0; font-size: 12px; }
.chart-dlg { width: min(1120px, 94vw); max-height: 90vh; border: 0; border-radius: 12px; padding: 0; color: var(--ink); }
.chart-dlg::backdrop { background: rgba(10, 11, 12, .45); }
.dlg-bar { position: sticky; top: 0; z-index: 2; background: var(--paper); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.dlg-bar b { font-size: 17px; margin-right: 6px; }
.dlg-bar label { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); }
.dlg-bar input { font: inherit; font-size: 13px; border: 1px solid var(--line-strong); border-radius: 4px; padding: 5px 7px; width: 9em; }
.dlg-bar .x { margin-left: auto; }
.chart-dlg .chart { border: 0; border-radius: 0; }
.below-app { margin-top: 8px; }

@media (max-width: 1340px) { .app { grid-template-columns: 280px minmax(0, 1fr) 260px; padding: 0 24px; } }
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); padding: 0 12px; min-height: 0; height: calc(100dvh - var(--hdr, 112px) - 22px); margin-top: 8px; }
  .app-bar { flex-wrap: wrap; gap: 8px 12px; padding: 8px 8px 8px 14px; }
  .app-title p { display: none; }
  .app-title h1 { font-size: 20px; }
  .app-sum { margin-left: auto; }
  .app-actions { width: 100%; justify-content: flex-end; }
  .app-tabs { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--paper); border: 1px solid var(--line); border-radius: 99px; padding: 4px; }
  .app-tabs button { font: inherit; font-size: 14px; border: 0; background: none; padding: 8px 4px; border-radius: 99px; cursor: pointer; color: var(--muted); }
  .app-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
  .app .pane { display: none; }
  .app[data-view="style"] .pane-style, .app[data-view="valves"] .pane-valves, .app[data-view="preview"] .pane-preview { display: grid; }
  .app[data-view="valves"] .pane-valves { display: flex; }
}
@media (max-width: 560px) {
  .app-actions #actual { display: none; }
  .adder-body label { width: 62px; }
  .sched td:nth-child(5), .sched th:nth-child(5) { display: none; }
}
@media print {
  body.print-chart .chart-dlg { position: absolute; inset: 0; width: auto; max-width: none; max-height: none; margin: 0; overflow: visible; }
  body.print-chart .dlg-bar { display: none; }
}
.page-app .announce { display: none; }
.page-app .plain .navbar { margin-top: 12px; }
.app .chips { align-items: flex-start; align-content: flex-start; }
.app .chip { padding: 5px 9px; }
@media (max-width: 560px) {
  .app-sum .note { display: none; }
  .app-bar { gap: 6px 10px; }
  .app-title h1 { font-size: 19px; }
  .app-actions { width: auto; margin-left: auto; }
  .app-actions .btn { min-height: 42px; }
}
.pane-style { gap: 11px; padding: 14px 14px 16px; }
.app .st-field > span { margin-bottom: -1px; }
.shape { padding: 6px 2px 5px; }
.shape svg { width: 26px; height: 26px; }
.sw-btn { width: 31px; height: 31px; }
@media (max-height: 800px) and (min-width: 901px) {
  .big-svg { max-width: 170px; }
  .pane-preview { gap: 10px; padding: 14px; }
  .app-title p { display: none; }
  .app-bar { min-height: 52px; padding-top: 6px; padding-bottom: 6px; }
}
.st-pair2 { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.sw-mini { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 99px; font-style: normal; font-size: 9px; vertical-align: -4px; border: 1px solid rgba(10,11,12,.15); margin: 0 2px; }
#st-pairs-label .linkish { font-size: 12px; }
.swatches[hidden] { display: none; }
@media (max-height: 760px) and (min-width: 901px) { .big-svg { max-width: 150px; } .big-tag .kv { font-size: 13px; } }
.app-title p, .app-sum .note, .spec .note, .big-tag .note { font-size: 14px; }
.spec-toggle input { width: 26px; height: 26px; }

/* builder polish (council R1) */
.adder-tabs .pane-h { margin-right: 10px; }
.row-warn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 7em; font-size: 12px; }
#spec-std[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
#spec-std[aria-pressed="true"]::before { content: "✓ "; }
.big-empty { padding: 40px 12px; text-align: center; color: var(--muted); font-size: 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius); width: 100%; }
.app-sum .linkish { font-size: inherit; }
@media (max-width: 600px) {
  .app .chip, .app-tabs button, .adder-tabs [role="tab"], .app .shape { min-height: 40px; }
  .sched thead { display: none; }
  .sched table, .sched tbody { display: block; }
  .sched tr { display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1fr) 54px 32px; grid-template-areas: "t n s q x" "t b l p x"; gap: 4px 6px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
  .sched td { display: block; padding: 0; border: 0; }
  .sched td:nth-child(1) { grid-area: t; } .sched td:nth-child(2) { grid-area: n; } .sched td:nth-child(3) { grid-area: s; }
  .sched td:nth-child(4) { grid-area: b; } .sched td:nth-child(5) { grid-area: l; display: block !important; } .sched td:nth-child(6) { grid-area: q; }
  .sched td:nth-child(7) { grid-area: p; align-self: center; text-align: right; } .sched td:nth-child(8) { grid-area: x; align-self: center; }
  .sched td input { width: 100% !important; }
  .sched .thumb { width: 48px; }
  .sched tr.sel { background: #eef4fe; } .sched tr.sel td { background: none; }
}

/* the drop-in checkout at /niche/ borrows this stylesheet: keep it in the lock (one weight, flat), and when the
   cart has tags, lead with the order instead of the single-tag editor (the builder lives at /custom-valve-tags/) */
.nb, .nb * { font-weight: 400 !important; }
.nb .nb-preview, .nb .nb-item.editing, .nb .nb-ship label:has(input:checked) { box-shadow: none !important; }
.nb .btn { border-radius: 999px; }
.nb-builder:has(.nb-item):not(:has(.nb-item.editing)) { display: block; max-width: 760px; margin: 0 auto; }
.nb-builder:has(.nb-item):not(:has(.nb-item.editing)) > .nb-form,
.nb-builder:has(.nb-item):not(:has(.nb-item.editing)) .nb-preview { display: none; }
.nb-builder:has(.nb-item):not(:has(.nb-item.editing)) .nb-side { display: block; position: static; }
.nb .link, .nb a:not(.btn) { color: var(--ink) !important; text-decoration-color: var(--line-strong); }
.nb-intro { max-width: 760px; margin-left: auto !important; margin-right: auto !important; }
.nb-builder:has(.nb-item) .nb-card > .nb-totals { position: sticky; bottom: 64px; z-index: 2; background: var(--paper); padding-top: 10px; }
.nb-builder:has(.nb-item) .nb-card > .nb-actions { position: sticky; bottom: 0; z-index: 2; background: var(--paper); padding: 10px 0 14px; margin: 0; }

.live-next2 { margin-top: 8px; -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.2), rgba(0,0,0,.05)); mask-image: linear-gradient(180deg, rgba(0,0,0,.2), rgba(0,0,0,.05)); }
.live-body { min-height: 220px; }
@media (max-height: 760px) and (min-width: 901px) { .spec .note { display: none; } .big-tag { gap: 8px; } }

@media (max-width: 560px) {
  .announce .a-mid { display: none; }
  .announce .a-left { display: block; flex: 1; font-size: 13px; text-align: center; color: #fff; }
}
@media (max-width: 900px) {
  .app .pane-h { display: none; }
  .adder-tabs .pane-h { display: none; }
  .pane-style { gap: 9px; padding: 12px; }
  .app .shapes .shape { padding: 5px 2px 4px; }
}
@media (max-width: 900px) and (max-height: 720px) {
  .big-svg { max-width: 132px; }
  .pane-preview { gap: 8px; padding: 10px 12px; }
  .big-tag { gap: 6px; }
  .big-tag .kv { font-size: 13px; gap: 3px 12px; }
  .big-tag > .note, .spec .note { display: none; }
  .pane-style { gap: 7px; padding: 10px 12px; }
  .app .shape svg { width: 22px; height: 22px; }
  .app .shape { font-size: 11px; padding: 4px 2px 3px; min-height: 0; }
  .app .chip { padding: 4px 9px; min-height: 34px; }
  .app select { padding: 4px 6px; }
  .app .st-field { gap: 4px; }
  .app-bar { padding-top: 6px; padding-bottom: 6px; }
}
@media (max-width: 900px) and (max-height: 720px) { .app .st-field > span small { display: none; } .app .st-field > span { font-size: 11px; } .pane-style { gap: 6px; } }

.merge-dlg { border: 0; border-radius: 12px; padding: 24px; max-width: 460px; color: var(--ink); }
.merge-dlg::backdrop { background: rgba(10, 11, 12, .45); }
.merge-dlg h2 { font-size: 22px; margin: 0 0 8px; }
.merge-dlg .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.merge-dlg .btn-dark, .merge-dlg .btn-ghost { min-height: 42px; padding: 10px 16px; font-size: 15px; }
.app-sum .note.warn { color: #9b1c1c; }
@media (max-width: 560px) {
  .app-sum .note.warn { display: block; font-size: 12px; max-width: 220px; margin-left: auto; }
  .app .chip, .app .shape, .adder-tabs [role="tab"], .adder-link, .app .btn-dark, .app-actions .chip { min-height: 40px !important; }
  .sched .x { width: 40px; height: 40px; }
  .sched tr { grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1fr) 54px 40px; }
}
@media (max-width: 560px) and (max-height: 720px) { #st-std-row > span { display: none; } .pane-style { gap: 5px; } .app-bar { gap: 4px 10px; } }

/* ---------------------------------------------------------- round 3 */
/* flash: a hairline note with Ada's accent bar instead of a filled yellow block */
.st-flash, .app .st-flash { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--butter); border-radius: var(--radius); color: var(--ink); }
/* Location keeps room on mid-size laptops */
.sched td input[data-k="loc"] { min-width: 9em; }
/* phone: fold the add form away once there are valves, so the list gets the screen */
.adder-toggle { display: none; }
@media (max-width: 900px) {
  .adder.has-rows:not(.open) .adder-tabs, .adder.has-rows:not(.open) .adder-body { display: none !important; }
  .adder.has-rows .adder-toggle { display: flex; align-items: baseline; gap: 8px; width: 100%; font: inherit; font-size: 15px; background: var(--bg); border: 1px dashed var(--line-strong); border-radius: 8px; padding: 10px 12px; cursor: pointer; color: var(--ink); min-height: 44px; }
  .adder-toggle span { font-size: 13px; color: var(--muted); }
  .adder.open .adder-toggle { display: none; }
}
@media (max-width: 600px) {
  .sched td[data-label]::before { content: attr(data-label); display: block; font-size: 10.5px; color: var(--muted); margin: 0 0 1px 2px; line-height: 1.2; }
  .sched td:nth-child(1)::before { content: none; }
}
/* phone nav CTA keeps a short label */
@media (max-width: 860px) {
  .nav-right .btn .label { display: inline; }
  .nav-right .btn { padding: 4px 4px 4px 14px; }
  .nav-right .btn .label { font-size: 0; }
  .nav-right .btn .label::after { content: "Build"; font-size: 15px; }
}
/* short laptops: keep the builder inside the screen */
@media (min-width: 901px) and (max-height: 680px) {
  .app { min-height: 0; }
  .pane-style { gap: 6px; padding: 10px 12px; }
  .app .shape svg { width: 20px; height: 20px; }
  .app .shape { padding: 3px 2px; font-size: 11px; }
  .app .chip { padding: 3px 8px; font-size: 12.5px; }
  .app .st-field > span { font-size: 11px; }
  .app .st-field > span small { display: none; }
  .app select { padding: 3px 6px; font-size: 13px; }
  .big-svg { max-width: 110px; }
  .big-tag .kv { font-size: 12.5px; gap: 2px 10px; }
  .pane-preview .note, .spec .note { display: none; }
  .app-bar { min-height: 46px; }
  .app-title h1 { font-size: 20px; }
  .adder { padding: 8px 12px; gap: 6px; }
}
/* checkout page: the back bar from /order-chrome/, legends inside their cards, readable phone rows */
.back-bar { margin: 10px 48px 0; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font-size: 15px; }
.back-bar a { text-decoration: none; padding: 6px 0; }
.back-bar a:hover { text-decoration: underline; }
.back-bar span { color: var(--muted); font-size: 14px; }
@media (max-width: 1100px) { .back-bar { margin: 10px 24px 0; } }
@media (max-width: 560px) { .back-bar { margin: 10px 14px 0; } .back-bar span { display: none; } }
.nb [data-edit] { display: none; }
.nb [data-do="back"] { font-size: 0 !important; }
.nb [data-do="back"]::after { content: "← Back to your order"; font-size: 15px; }
.nb fieldset.nb-card > legend { float: left; width: 100%; padding: 0; margin: 0 0 14px; }
.nb fieldset.nb-card > legend + * { clear: both; }
.nb-item .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 480px) {
  .nb-item { grid-template-columns: 56px minmax(0, 1fr) !important; }
  .nb-item .r { grid-column: 1 / -1; display: flex !important; justify-content: space-between; align-items: center; }
}
@media (min-width: 901px) and (max-height: 680px) { #st-std-row > span { display: none; } .pane-style { gap: 5px; } .app .chips { gap: 4px; } }
@media (max-width: 600px) { .sched td input[data-k="loc"] { min-width: 0; } }
/* the builder is the one place tags are made: with an empty cart, /niche/ shows the empty order and the way back */
.nb-builder:not(:has(.nb-item)) { display: block; max-width: 760px; margin: 0 auto; }
.nb-builder:not(:has(.nb-item)) > .nb-form, .nb-builder:not(:has(.nb-item)) .nb-preview { display: none; }
.nb-builder:not(:has(.nb-item)) .nb-side { display: block; position: static; }
/* round 3: phone row cards give Location two columns; disabled Check out reads as disabled */
@media (max-width: 600px) {
  .sched tr { grid-template-areas: "t n s q x" "t b l l p"; grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1fr) 54px 44px; }
  .sched td:nth-child(7) { font-size: 12.5px; }
}
.app-actions .btn[disabled] { opacity: 1; background: var(--ash); color: rgba(10,11,12,.55); }
.app-actions .btn[disabled] .disc { background: rgba(10,11,12,.35); }
.st-flash .linkish { margin-left: 4px; }
/* round 4 */
[hidden] { display: none !important; }
@media (max-width: 900px) {
  .sw-btn { width: 40px; height: 40px; padding: 5px; }
  .swatches { gap: 2px; }
  .adder-tabs { flex-wrap: nowrap; }
  .adder-tabs [role="tab"] { padding: 6px 10px; white-space: nowrap; }
  .adder-link { white-space: nowrap; padding: 6px 2px; font-size: 12.5px; }
  .big-svg { max-width: 200px; }
}
@media (max-width: 900px) and (max-height: 800px) { .big-svg { max-width: 170px; } }
@media (max-width: 560px) and (max-height: 720px) { .app .st-field > span { font-size: 10.5px; line-height: 1.1; } .app .st-field { gap: 2px; } .pane-style { gap: 4px; padding: 8px 10px; } .app .shape span { font-size: 10.5px; } }
@media (min-width: 901px) and (max-height: 680px) { .sw-btn { width: 28px; height: 28px; padding: 2px; } .swatches { gap: 3px; } .app .shapes { gap: 4px; } }
/* fallback color picker: a popover, so opening it never makes the Style pane scroll */
.pane-style { position: relative; }
#st-pairs-field { position: relative; }
.swatches.pop { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 6; background: var(--paper); border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px; }
@media (min-width: 901px) and (max-height: 680px) { .sw-btn { width: 24px; height: 24px; padding: 1px; } .swatches { gap: 1px; } }
.row-warn.info { color: var(--muted); }

/* preview always on: below 1100px it is a compact strip that stays above the Style / Valves tabs */
@media (max-width: 900px) {
  .app { grid-template-rows: auto auto auto minmax(0, 1fr); }
  .app-tabs { grid-template-columns: repeat(2, 1fr); }
  .app .pane-preview { display: grid !important; order: 0; grid-row: 2; padding: 8px 12px; gap: 6px; overflow: visible; }
  .app-tabs { grid-row: 3; }
  .app .pane-style, .app .pane-valves { grid-row: 4; }
  .pane-preview .pane-h, .pane-preview .spec .note, .pane-preview .big-tag > .note { display: none; }
  .pane-preview .big-tag { grid-template-columns: 72px minmax(0, 1fr); justify-items: start; align-items: center; gap: 4px 12px; }
  .pane-preview .big-svg, .pane-preview .big-svg.actual { width: 72px; max-width: 72px; grid-row: span 3; }
  .pane-preview .big-svg svg { width: 72px; }
  .pane-preview .big-tag .kv { font-size: 12.5px; gap: 0 10px; }
  .pane-preview .big-tag .kv dt:nth-of-type(n+4), .pane-preview .big-tag .kv dd:nth-of-type(n+4) { display: none; }
  .pane-preview .row-warn { max-width: none; }
  .pane-preview .spec { border: 0; padding: 0; display: block; }
  .pane-preview .spec .chip { min-height: 32px !important; font-size: 12.5px; padding: 4px 10px; }
  .app[data-view="style"] .pane-valves, .app[data-view="valves"] .pane-style { display: none !important; }
  .app[data-view="preview"] .pane-valves { display: flex !important; }
}

@media (max-width: 900px) {
  .pane-preview .big-tag .kv { display: none; }
  .pane-preview .mini { display: block !important; font-size: 13px; line-height: 1.35; margin: 0; }
  .pane-preview { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .pane-preview .spec { grid-column: 2; grid-row: 1; }
  .pane-preview .big-tag { grid-column: 1; grid-row: 1; grid-template-columns: 60px minmax(0, 1fr); }
  .pane-preview .big-svg, .pane-preview .big-svg.actual { width: 60px; max-width: 60px; grid-row: auto; }
  .pane-preview .big-svg svg { width: 60px; }
  .pane-preview .spec .chip { white-space: normal; text-align: center; max-width: 110px; line-height: 1.2; }
  .app-title h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .app-bar { flex-wrap: nowrap; }
  .app-sum { margin-left: 0; text-align: left; }
  .app-actions { width: auto; margin-left: auto; }
  #chart-open { padding: 6px 10px; }
}
.pane-preview .mini { display: none; }
@media (max-width: 560px) and (max-height: 720px) { .app .pane-preview { padding: 5px 10px; } .pane-preview .big-svg, .pane-preview .big-svg.actual, .pane-preview .big-svg svg { width: 50px; max-width: 50px; } .pane-preview .big-tag { grid-template-columns: 50px minmax(0, 1fr); } .pane-preview .mini { font-size: 12px; } .app { gap: 8px; } }
@media (max-width: 560px) { .app-sum b { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; } .app-sum .st-total { display: block; margin: 0; white-space: nowrap; } #chart-open { white-space: nowrap; font-size: 12.5px; padding: 6px 9px; } }
@media (max-width: 560px) and (max-height: 720px) { .sw-btn { width: 34px; height: 34px; padding: 3px; position: relative; } .sw-btn::after { content: ""; position: absolute; inset: -3px; } .swatches { gap: 4px; } }
@media (max-width: 560px) and (max-height: 720px) { .pane-style { gap: 3px; } }
