/* MORPH LAB — site stylesheet
   Palette from brief §11. Logo-block plum (#34243A) is sampled from the supplied LOGO PNG so the
   logo sits seamlessly on its blocks; elsewhere the brand plum #35283D is used.
   Type: Archivo (OFL, self-hosted) — wide widths for headings echo the wide LOGO wordmark. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-latin-wdth.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-latin-ext-wdth.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --plum: #35283D;
  --plum-logo: #34243A;
  --ivory: #F5F0E8;
  --clay: #B36F50;
  --clay-deep: #8C4E33;
  --mauve: #EDE6EB;
  --ink-2: #5A4C5F;
  --line: rgba(53, 40, 61, .2);
  --line-strong: rgba(53, 40, 61, .45);
  --on-plum: #F5F0E8;
  --on-plum-2: #D9CFD6;
  --danger: #9B2C2C;
  --ok: #2F5D45;

  --font: "Archivo", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --wide: 122%;
  --semi: 112%;

  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --sec: clamp(56px, 8vw, 112px);
  --radius: 2px;
  --header-h: 72px;
  --dock-h: 0px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--plum);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  font-stretch: 100%;
  padding-bottom: var(--dock-h);
  overflow-x: hidden;
}
:lang(zh) body, html:lang(zh-Hans) body { line-height: 1.75; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; font-stretch: var(--semi); line-height: 1.12; letter-spacing: -.005em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); font-stretch: var(--wide); letter-spacing: -.015em; line-height: 1.04; }
h2 { font-size: clamp(1.45rem, 2.4vw, 2rem); }
h3 { font-size: 1.15rem; }
html:lang(zh-Hans) h1, html:lang(zh-Hans) h2, html:lang(zh-Hans) h3 { letter-spacing: .02em; line-height: 1.3; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 820px; }
.muted { color: var(--ink-2); }
.note { color: var(--ink-2); font-size: .94rem; }
.note-box { border-left: 3px solid var(--clay); padding: .6em 1em; background: var(--mauve); }

/* Focus & skip */
:focus-visible { outline: 3px solid var(--clay-deep); outline-offset: 3px; }
.hero :focus-visible, .closing :focus-visible, .site-footer :focus-visible, .page-head-plum :focus-visible, .dock :focus-visible { outline-color: var(--ivory); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--plum); color: var(--ivory); padding: 10px 16px; text-decoration: none; }
.skip:focus { top: 12px; }
main:focus { outline: none; }

/* Preview bar */
.preview-bar { background: #F1D9A8; color: #3B2A10; font-size: .85rem; padding: 6px var(--gutter); text-align: center; }
.preview-env { font-weight: 600; margin-left: .5em; }
.config-hint { display: inline-block; font-size: .82rem; color: #6B4A10; background: #FBEFD5; border: 1px dashed #C9A15A; padding: 2px 8px; line-height: 1.45; }
.config-hint-block { display: block; margin: 16px 0 0; }
.site-footer .config-hint, .contact-dl .config-hint { color: #6B4A10; }
.badge-draft { display: inline-block; font-size: .78rem; font-weight: 600; color: #6B4A10; background: #FBEFD5; border: 1px solid #E3C27E; padding: 1px 8px; line-height: 1.6; }
.badge-block { display: block; margin: 0 0 14px; font-weight: 500; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 12px 24px; border-radius: var(--radius);
  font: inherit; font-weight: 600; font-stretch: var(--semi); font-size: 1rem; line-height: 1.2;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-sm { min-height: 44px; padding: 9px 18px; font-size: .95rem; }
.btn-block { display: flex; width: 100%; }
.btn-solid { background: var(--plum); color: var(--ivory); }
.btn-solid:hover { background: #4A3954; }
.btn-outline { border-color: var(--plum); color: var(--plum); background: transparent; }
.btn-outline:hover { background: var(--mauve); }
.btn-light { background: var(--ivory); color: var(--plum); }
.btn-light:hover { background: #fff; }
.btn-ghost-light { border-color: rgba(245, 240, 232, .7); color: var(--ivory); background: transparent; }
.btn-ghost-light:hover { border-color: var(--ivory); background: rgba(245, 240, 232, .08); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link { color: var(--plum); font-weight: 600; text-decoration: underline; text-decoration-color: var(--clay); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.link:hover { text-decoration-color: var(--plum); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(245, 240, 232, .96); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.2) blur(6px); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand-tile { background: var(--plum-logo); width: 52px; height: 52px; display: grid; place-items: center; }
.brand-tile img { width: 40px; height: auto; }
.brand-word { font-weight: 700; font-stretch: var(--wide); font-size: 1.05rem; letter-spacing: .08em; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { list-style: none; display: flex; gap: 26px; }
.site-nav ul a { text-decoration: none; font-weight: 500; font-size: .98rem; padding: 10px 0; display: inline-block; border-bottom: 2px solid transparent; }
.site-nav ul a:hover { border-bottom-color: var(--line-strong); }
.site-nav ul a[aria-current="page"] { border-bottom-color: var(--clay); }
.nav-actions { display: flex; align-items: center; gap: 18px; }
.lang-switch { font-weight: 600; text-decoration: none; min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; }
.lang-switch:hover { text-decoration: underline; }
.nav-toggle { display: none; }

@media (max-width: 1023px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px; min-width: 44px; padding: 0 4px;
    background: none; border: 0; color: var(--plum); font: inherit; font-weight: 600; cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 22px; height: 2px; background: currentColor; position: relative; content: ""; transition: transform .2s ease; }
  .nav-toggle-bars::before { position: absolute; top: -7px; }
  .nav-toggle-bars::after { position: absolute; top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ivory); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 24px; max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .js .site-nav[data-open="true"] { display: flex; }
  .no-js .site-nav { display: flex; position: static; padding: 0 0 16px; }
  .no-js .header-inner { flex-wrap: wrap; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .site-nav ul a[aria-current="page"] { border-bottom-color: var(--line); box-shadow: inset 3px 0 0 var(--clay); padding-left: 12px; }
  .nav-actions { justify-content: space-between; padding-top: 16px; }
}
@media (max-width: 420px) { .brand-word { font-size: .95rem; letter-spacing: .05em; } .nav-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; } }

/* Hero — the purple brand block */
.hero { background: var(--plum-logo); color: var(--on-plum); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: center; gap: clamp(32px, 6vw, 96px); padding-top: clamp(56px, 9vw, 128px); padding-bottom: clamp(56px, 9vw, 128px); }
.display { font-size: clamp(2.5rem, 6.4vw, 5.4rem); font-stretch: 125%; font-weight: 600; line-height: .98; letter-spacing: -.02em; max-width: 12ch; }
html:lang(zh-Hans) .display { font-size: clamp(2.1rem, 5vw, 4rem); line-height: 1.2; max-width: 14em; letter-spacing: .03em; }
.hero-lede { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--on-plum-2); max-width: 46ch; margin: 28px 0 36px; }
.hero-mark { display: flex; flex-direction: column; align-items: center; gap: 4px; border-left: 1px solid rgba(245, 240, 232, .18); padding-left: clamp(24px, 4vw, 64px); }
.hero-mark img { width: 100%; max-width: 380px; }
.hero-descriptor { color: var(--on-plum-2); font-size: .9rem; text-align: center; margin: 0; max-width: 30ch; }
@media (max-width: 767px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-mark { order: -1; border-left: 0; padding-left: 0; align-items: flex-start; }
  .hero-mark img { max-width: 220px; margin-left: -18px; }
  .hero-descriptor { text-align: left; }
}

/* Sections */
.section { padding: var(--sec) 0; }
.section-tight { padding: clamp(32px, 5vw, 64px) 0 var(--sec); }
.section-tint { background: var(--mauve); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 48px; align-items: end; margin-bottom: 40px; }
.section-head p { margin: 0; color: var(--ink-2); max-width: 52ch; }
.section-title { margin-bottom: 36px; }
.section-more { margin: 40px 0 0; }
@media (max-width: 767px) { .section-head { grid-template-columns: 1fr; } }

/* Page head */
.page-head { padding: clamp(28px, 4vw, 48px) 0 clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--line); }
.page-head h1 { max-width: 20ch; }
html:lang(zh-Hans) .page-head h1 { max-width: 22em; }
.page-head .lede { margin: 20px 0 0; }
.page-head-plum { background: var(--plum-logo); color: var(--on-plum); border-bottom: 0; padding-bottom: clamp(48px, 7vw, 88px); }
.page-head-plum .lede { color: var(--on-plum-2); margin-bottom: 32px; }
.page-head-plum .crumbs a, .page-head-plum .crumbs { color: var(--on-plum-2); }
.lede { font-size: clamp(1.08rem, 1.4vw, 1.22rem); color: var(--ink-2); max-width: 60ch; }
.lede-sm { color: var(--ink-2); max-width: 60ch; margin-bottom: 32px; }
.kicker { margin: 0 0 10px; font-weight: 600; }
.kicker a { color: var(--ink-2); text-decoration: none; }
.kicker a:hover { text-decoration: underline; }

.crumbs { margin-bottom: 20px; font-size: .9rem; color: var(--ink-2); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 0; }
.crumbs li + li::before { content: "/"; margin: 0 10px; opacity: .6; }
.crumbs a { color: var(--ink-2); }

/* Media — the "aperture" (the slot inside the ML mark) marks where real photography will go */
.media { margin: 0; position: relative; background: var(--mauve); }
.media img, .media video { width: 100%; height: 100%; object-fit: cover; }
.media-card { aspect-ratio: 4 / 3; }
.media-detail { aspect-ratio: 3 / 2; margin-bottom: 24px; }
.media-wide { aspect-ratio: 16 / 9; margin: 40px 0; }
.media figcaption { font-size: .9rem; color: var(--ink-2); padding-top: 10px; background: var(--ivory); }
.media-warn { position: absolute; left: 8px; top: 8px; margin: 0; font-size: .78rem; background: #FBEFD5; color: #6B4A10; padding: 2px 8px; }
.media-empty { display: grid; place-items: center; gap: 14px; text-align: center; padding: 24px; grid-template-rows: 1fr auto; }
.section-tint .media-empty { background: #E3D9E0; }
.aperture { display: block; width: 18%; min-width: 34px; max-width: 72px; aspect-ratio: 1 / 2.1; border: 2px solid var(--plum); background: var(--ivory); align-self: end; }
.media-empty-text { color: var(--ink-2); font-size: .95rem; font-weight: 600; align-self: start; }
.media-empty-text small { font-weight: 400; font-size: .85rem; }
.aperture-lg { width: 64px; margin-bottom: 32px; }

/* Product grid (no cards: image + text on the page) */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 48px 32px; }
.pitem { position: relative; min-width: 0; }
.pitem-link { text-decoration: none; display: block; }
.pitem-link .media { margin-bottom: 18px; }
.pitem-cat { display: block; font-size: .88rem; color: var(--ink-2); margin-bottom: 4px; }
.pitem-name { font-size: 1.3rem; font-stretch: var(--wide); }
.pitem-link:hover .pitem-name { text-decoration: underline; text-decoration-color: var(--clay); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.pitem-text { margin: 10px 0 0; color: var(--ink-2); font-size: .98rem; }
.pitem .badge-draft { margin-top: 12px; }

/* Index list (craft) — a reference index, not an image gallery */
.index-list { list-style: none; border-top: 1px solid var(--line-strong); }
.index-list li { border-bottom: 1px solid var(--line); }
.index-list a { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr) auto; gap: 8px 40px; padding: 26px 0; text-decoration: none; align-items: baseline; }
.index-name { font-size: 1.3rem; font-weight: 600; font-stretch: var(--wide); line-height: 1.2; }
.index-text { color: var(--ink-2); }
.index-sub { display: block; margin-top: 8px; font-size: .88rem; }
.index-list a:hover .index-name { text-decoration: underline; text-decoration-color: var(--clay); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.index-list-lg a { padding: 34px 0; }
@media (max-width: 767px) { .index-list a { grid-template-columns: 1fr; } }

/* Local support */
.local { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px 80px; }
.local-intro p { color: var(--ink-2); max-width: 46ch; margin-top: 20px; }
.local-list { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line-strong); }
.local-list > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 8px 32px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.local-list dt { font-weight: 600; font-stretch: var(--semi); font-size: 1.1rem; }
.local-list dd { margin: 0; color: var(--ink-2); }
@media (max-width: 900px) { .local { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .local-list > div { grid-template-columns: 1fr; } }

/* Steps — a real sequence, so it is numbered */
.steps { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; counter-reset: none; }
.steps-8 { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 36px; }
.steps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps li { position: relative; padding: 0 20px 0 0; }
.steps li::before { content: ""; position: absolute; left: 0; right: 0; top: 19px; height: 2px; background: var(--line-strong); }
.steps li:last-child::before { right: auto; width: 40px; }
.step-n { position: relative; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; background: var(--plum); color: var(--ivory); font-weight: 700; font-stretch: var(--wide); margin-bottom: 18px; }
.step-t { display: block; font-weight: 600; font-stretch: var(--semi); line-height: 1.35; max-width: 18ch; }
html:lang(zh-Hans) .step-t { max-width: 9em; }
@media (max-width: 900px) {
  .steps, .steps-8, .steps-4 { grid-template-columns: 1fr; row-gap: 0; }
  .steps li { display: grid; grid-template-columns: 40px 1fr; gap: 18px; align-items: center; padding: 0 0 22px; }
  .steps li::before { left: 19px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .steps li:last-child::before { display: none; }
  .step-n { margin: 0; }
  .step-t { max-width: none; }
  html:lang(zh-Hans) .step-t { max-width: none; }
}

/* Closing block */
.closing { background: var(--plum-logo); color: var(--on-plum); padding: clamp(64px, 9vw, 128px) 0; }
.closing h2 { font-size: clamp(1.9rem, 4vw, 3.2rem); font-stretch: var(--wide); max-width: 20ch; }
html:lang(zh-Hans) .closing h2 { max-width: 18em; font-size: clamp(1.6rem, 3.2vw, 2.6rem); }
.closing p { color: var(--on-plum-2); margin: 20px 0 32px; max-width: 52ch; }

/* Footer */
.site-footer { background: var(--plum); color: var(--on-plum); padding: 64px 0 24px; border-top: 1px solid rgba(245, 240, 232, .12); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2fr)); gap: 40px; }
.footer-brand img { width: 180px; margin: -24px 0 4px -20px; }
.footer-brand p { color: var(--on-plum-2); font-size: .95rem; max-width: 42ch; }
.footer-slogan { font-weight: 600; color: var(--on-plum) !important; }
.footer-col h2 { font-size: 1rem; font-stretch: var(--semi); margin-bottom: 14px; }
.footer-col ul { list-style: none; display: grid; gap: 4px; }
.footer-col a { color: var(--on-plum-2); text-decoration: none; display: inline-block; padding: 6px 0; min-height: 32px; }
.footer-col a:hover { color: var(--ivory); text-decoration: underline; }
.footer-contact li { color: var(--on-plum-2); font-size: .95rem; padding: 6px 0; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 48px; padding-top: 20px; border-top: 1px solid rgba(245, 240, 232, .15); font-size: .85rem; color: var(--on-plum-2); }
.footer-base p { margin: 0; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* Mobile consult dock — page gets matching bottom padding so it never covers content */
.dock { display: none; }
@media (max-width: 767px) {
  :root { --dock-h: 72px; }
  .dock { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); background: rgba(245, 240, 232, .97); border-top: 1px solid var(--line); }
  .dock .btn { width: 100%; }
  html[data-page="contact"] { --dock-h: 0px; }
}

/* Filters */
.filters { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 24px; align-items: end; padding-bottom: 28px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.filters .chips { grid-column: 1 / -1; }
.field-search { grid-column: 1; }
.field-select { grid-column: 1; max-width: 320px; }
.filters-actions { display: flex; align-items: center; gap: 18px; grid-column: 2; grid-row: 1; }
.chips { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { font-weight: 600; font-size: .95rem; margin-bottom: 8px; padding: 0; width: 100%; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1.5px solid var(--line-strong); border-radius: 999px; font-size: .95rem; cursor: pointer; }
.chip input:checked + span { background: var(--plum); color: var(--ivory); border-color: var(--plum); }
.chip input:focus-visible + span { outline: 3px solid var(--clay-deep); outline-offset: 2px; }
.result-count { color: var(--ink-2); margin: 0 0 32px; font-size: .95rem; }
@media (max-width: 600px) { .filters { grid-template-columns: 1fr; } .filters-actions { grid-column: 1; grid-row: auto; } }
.js .filters-actions .btn[data-autohide] { display: none; }

.empty { padding: 56px 0; max-width: 620px; }
.empty h2 { margin-bottom: 12px; }
.empty p { color: var(--ink-2); margin-bottom: 24px; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field legend, .check span { font-weight: 600; font-size: .98rem; }
.req, .opt { font-weight: 400; font-size: .85rem; color: var(--ink-2); margin-left: 6px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="search"], select, textarea {
  font: inherit; font-size: 1rem; color: var(--plum); background: #FFFDF9;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius);
  min-height: 48px; padding: 10px 14px; width: 100%;
}
textarea { min-height: 160px; resize: vertical; line-height: 1.55; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--plum) 50%), linear-gradient(135deg, var(--plum) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--clay-deep); outline-offset: 1px; border-color: var(--plum); }
[aria-invalid="true"] { border-color: var(--danger) !important; border-width: 2px !important; }
.fhint { margin: 0; font-size: .88rem; color: var(--ink-2); }
.ferr { margin: 0; font-size: .9rem; color: var(--danger); font-weight: 600; }
.ferr::before { content: "! "; }
.ferr[hidden] { display: none; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 24px; }
.field-full { grid-column: 1 / -1; }
@media (max-width: 640px) { .fgrid { grid-template-columns: 1fr; } }
fieldset.field { border: 0; padding: 0; margin: 0; }
.radios { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; }
.radios legend { margin-bottom: 10px; padding: 0; }
.radio { position: relative; }
.radio input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.radio span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; font-weight: 500; }
.radio input:checked + span { background: var(--plum); color: var(--ivory); border-color: var(--plum); }
.radio input:checked + span::before { content: "✓ "; margin-right: 4px; }
.radio input:focus-visible + span { outline: 3px solid var(--clay-deep); outline-offset: 2px; }
.radios .ferr { width: 100%; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; padding: 8px 0; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--plum); }
.check span { font-weight: 400; }
.check a { color: var(--plum); font-weight: 600; text-decoration-color: var(--clay); text-underline-offset: 3px; }
.checks { margin: 28px 0; }
.more { margin-top: 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.more summary { cursor: pointer; padding: 16px 0; font-weight: 600; min-height: 44px; }
.more[open] { padding-bottom: 24px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-alert { border-left: 4px solid var(--danger); background: #F7E4E2; color: #5E1A1A; padding: 14px 18px; margin-bottom: 28px; font-weight: 500; }
.form-alert[hidden] { display: none; }
.form-success { border-left: 4px solid var(--ok); background: #E4EEE7; padding: 28px; }
.form-success h2 { margin-bottom: 10px; }
.form-success .ref { font-weight: 700; font-stretch: var(--semi); font-size: 1.1rem; }
.form-success:focus { outline: 3px solid var(--ok); outline-offset: 3px; }
.btn-submit { min-width: 200px; }
.counter { margin-left: 6px; }
.context { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 18px; background: var(--mauve); margin-bottom: 28px; }
.context-label { font-weight: 600; }
.context-item { display: inline-flex; align-items: center; gap: 10px; background: var(--ivory); border: 1px solid var(--line-strong); padding: 4px 6px 4px 12px; }
.context-remove { font-size: .85rem; color: var(--plum); padding: 8px; min-height: 36px; display: inline-flex; align-items: center; }

.contact-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 48px 72px; align-items: start; }
.contact-aside { border-top: 3px solid var(--plum); padding-top: 20px; position: sticky; top: calc(var(--header-h) + 24px); }
.contact-aside h2 { font-size: 1.2rem; margin-bottom: 16px; }
.contact-dl { margin: 0 0 16px; display: grid; gap: 14px; }
.contact-dl dt { font-size: .88rem; color: var(--ink-2); }
.contact-dl dd { margin: 0; font-weight: 500; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } .contact-aside { position: static; } }

/* Detail pages */
.detail-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 3fr); gap: 48px 72px; padding-top: 48px; padding-bottom: 24px; }
.detail-block { padding-bottom: 44px; margin-bottom: 44px; border-bottom: 1px solid var(--line); }
.detail-block:last-child { border-bottom: 0; }
.detail-block h2 { margin-bottom: 20px; font-size: clamp(1.3rem, 2vw, 1.6rem); }
.detail-block h3 { margin: 28px 0 10px; }
.detail-summary { font-size: 1.12rem; max-width: 62ch; }
.detail-aside { position: relative; }
.aside-box { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 12px; padding-top: 18px; border-top: 3px solid var(--plum); }
.aside-ref { font-size: .9rem; color: var(--ink-2); margin: 0; }
.detail-cta { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } .detail-aside { order: -1; } .aside-box { position: static; } }

.ticks, .plain, .link-list { list-style: none; display: grid; gap: 10px; }
.ticks li { padding-left: 28px; position: relative; max-width: 62ch; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 6px; border-left: 2px solid var(--clay-deep); border-bottom: 2px solid var(--clay-deep); transform: rotate(-45deg); }
.plain li { padding-left: 20px; position: relative; max-width: 62ch; }
.plain li::before { content: ""; position: absolute; left: 0; top: .7em; width: 8px; height: 2px; background: var(--plum); }
.link-list { gap: 6px; }

/* Spec list: a vertical definition list at all widths, so nothing overflows on mobile */
.specs { margin: 0 0 16px; border-top: 1px solid var(--line-strong); }
.specs > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 4px 24px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.specs dt { font-weight: 600; }
.specs dd { margin: 0; }
.specs dd.muted { font-style: italic; }
@media (max-width: 480px) { .specs > div { grid-template-columns: 1fr; } }
.proc { padding-left: 1.4em; display: grid; gap: 8px; }

.facts { display: flex; flex-wrap: wrap; gap: 16px 40px; margin: 24px 0 0; }
.facts dt { font-size: .88rem; color: var(--ink-2); }
.facts dd { margin: 0; font-weight: 600; }

/* Services */
.modules { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 64px; border-top: 1px solid var(--line-strong); }
.module { padding: 28px 0; border-bottom: 1px solid var(--line); }
.module dt { font-size: 1.25rem; font-weight: 600; font-stretch: var(--semi); margin-bottom: 10px; }
.module dd { margin: 0; color: var(--ink-2); max-width: 54ch; }
@media (max-width: 800px) { .modules { grid-template-columns: 1fr; } }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px 80px; }
.two-col h2 { margin-bottom: 24px; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }
.tags-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.tags-list li { border: 1.5px solid var(--line-strong); padding: 6px 14px; }
.scope p { max-width: 58ch; }
.roles h3 { font-size: 1.2rem; margin-bottom: 16px; padding-top: 16px; border-top: 3px solid var(--plum); }
.rules { gap: 16px; }

.audience { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.audience li { border-top: 3px solid var(--plum); padding-top: 18px; color: var(--ink-2); }
@media (max-width: 800px) { .audience { grid-template-columns: 1fr; } }

.prose h2 { margin: 40px 0 14px; font-size: 1.4rem; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { max-width: 66ch; }

.notfound { padding: clamp(64px, 12vw, 160px) 0; }
.notfound .lede { margin: 16px 0 32px; }

/* Ops page uses its own stylesheet (ops.css). */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
