/* PPM Kit site styles.
   Layout follows the Goodfellow template: utility bar, sticky header with mega menus,
   dark hero with an art card, a dark band, card grids, a CTA band and a dark footer.
   Palette and type are PPM Kit's: teal for actions, ink for text, amber only as the
   "sign here" accent (dark text on it, never amber text on white), amber soft behind
   [PLACEHOLDERS] set in IBM Plex Mono. */
:root {
  --teal: #0F766E;
  --teal-deep: #115E59;
  --teal-soft: #E2F3F0;
  --ink: #111827;
  --gray: #4B5563;
  --amber: #F59E0B;
  --amber-soft: #FEF3C7;
  --red: #B42318;
  --paper: #FFFFFF;
  --line: #D3E4E0;
  --line-soft: #E8F1EF;
  --on-dark: rgba(255, 255, 255, .80);
  --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: clamp(20px, 4.5vw, 96px);
  --maxw: 1320px;
  --radius: 10px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16.5px/1.6 var(--font); font-variant-numeric: lining-nums;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-deep); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 4.2vw, 3.4rem); font-weight: 600; line-height: 1.1; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.15rem); font-weight: 600; }
h3 { font-size: 1.22rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
code, kbd, .mono { font-family: var(--mono); font-size: .92em; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 300; border-radius: 6px; }
.skip:focus { top: 12px; color: #fff; }

/* Placeholders: IBM Plex Mono on amber soft */
.ph {
  font-family: var(--mono); font-size: .86em; font-weight: 500; color: var(--ink);
  background: var(--amber-soft); border-radius: 4px; padding: .08em .38em;
  box-decoration-break: clone; -webkit-box-decoration-break: clone; white-space: normal;
}

/* Sign-here flag: amber with dark text only */
.flag {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--amber); color: var(--ink); font: 600 12.5px/1 var(--font);
  letter-spacing: .06em; text-transform: uppercase;
  padding: 8px 14px 8px 20px;
  clip-path: polygon(0 50%, 12px 0, 100% 0, 100% 100%, 12px 100%);
}

/* Utility bar */
.utility { background: var(--ink); color: var(--on-dark); font-size: 13.5px; }
.utility .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 38px; }
.utility nav { display: flex; gap: 20px; }
.utility a { color: #fff; text-decoration: none; font-weight: 500; }
.utility a:hover { color: var(--teal-soft); text-decoration: underline; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 76px; position: relative; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand svg { width: 38px; height: 38px; display: block; }
.wordmark { font: 700 24px/1 var(--font); letter-spacing: -.02em; color: var(--ink); }
.wordmark span { color: var(--teal); margin-left: .14em; }
.primary { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.primary > ul { list-style: none; display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; }
.primary li { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px; font: 500 15px/1 var(--font); color: var(--ink);
  text-decoration: none; padding: 12px 12px; border: 0; background: none; cursor: pointer;
  border-bottom: 2px solid transparent;
}
.nav-link, .primary .btn { white-space: nowrap; }
.nav-link:hover { color: var(--teal); }
.nav-link.active { color: var(--teal); border-bottom-color: var(--teal); }
.chev { width: 10px; height: 10px; transition: transform .2s; }
.has-menu.open .chev { transform: rotate(180deg); }
.mega {
  display: none; position: absolute; top: calc(100% + 10px); left: -12px; z-index: 120;
  width: min(720px, 86vw); background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--teal);
  border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 22px 50px rgba(17, 24, 39, .16);
  padding: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 10px;
}
.mega::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.has-menu.open .mega { display: grid; }
.mega a { display: block; text-decoration: none; color: var(--ink); padding: 12px 14px; border-radius: 8px; }
.mega a:hover { background: var(--teal-soft); }
.m-kind { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--teal); }
.m-name { font-size: 17px; font-weight: 600; margin: 2px 0 4px; }
.m-desc { font-size: 13.5px; line-height: 1.5; color: var(--gray); }
.mega .m-all { grid-column: 1 / -1; border-top: 1px solid var(--line-soft); border-radius: 0; margin-top: 6px; padding-top: 14px; font-weight: 600; color: var(--teal); }
.menu-toggle { display: none; margin-left: auto; align-items: center; gap: 8px; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; font: 600 14.5px/1 var(--font); color: var(--ink); cursor: pointer; }
@media (min-width: 961px) {
  .has-menu:hover .mega, .has-menu:focus-within .mega { display: grid; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15.5px/1.2 var(--font); text-decoration: none; cursor: pointer;
  border-radius: 999px; padding: 13px 24px; border: 1.5px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn-primary:hover { background: var(--teal-deep); border-color: var(--teal-deep); color: #fff; }
.btn-outline { background: transparent; color: var(--teal); border-color: var(--teal); }
.btn-outline:hover { background: var(--teal-soft); color: var(--teal-deep); }
.btn-light { background: #fff; color: var(--teal-deep); border-color: #fff; }
.btn-light:hover { background: var(--teal-soft); border-color: var(--teal-soft); color: var(--teal-deep); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn-ghost:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .08); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.text-link { font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.text-link::after { content: " \2192"; }

/* Home hero */
.ft-hero { background: linear-gradient(120deg, var(--teal-deep) 0%, #0E3A3B 48%, var(--ink) 100%); color: #fff; overflow: hidden; }
.ft-hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 72px); align-items: center; padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(40px, 5vw, 72px); }
.ft-eyebrow { font-size: 13.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-soft); margin-bottom: 14px; }
.ft-hero h1 { color: #fff; font-size: clamp(2.6rem, 5vw, 4.1rem); font-weight: 700; letter-spacing: -.025em; margin-bottom: 16px; }
.ft-hero .one-liner { font-size: clamp(1.15rem, 1.6vw, 1.35rem); color: #fff; font-weight: 500; margin-bottom: 10px; }
.ft-hero p { color: var(--on-dark); font-size: 1.06rem; max-width: 600px; }
.ft-hero .btn-row { margin-top: 26px; }
.hero-fine { margin-top: 22px; font-size: 14px; color: rgba(255, 255, 255, .7); }

/* Art card: a template page with placeholders and a sign-here flag */
.ft-art-card { position: relative; padding: 18px 26px 18px 0; }
.paper {
  position: relative; background: #fff; color: var(--ink); border-radius: 0 56px 0 0;
  box-shadow: 0 26px 60px rgba(0, 0, 0, .38); padding: clamp(22px, 3vw, 38px) clamp(20px, 3vw, 40px) clamp(24px, 3vw, 34px);
  font-size: 14px; line-height: 1.55;
}
.paper::after { content: ""; position: absolute; inset: 10px -12px -12px 12px; background: rgba(226, 243, 240, .16); border-radius: 0 56px 0 0; z-index: -1; }
.paper-conf { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--gray); text-align: right; margin-bottom: 14px; }
.paper-kicker { font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: 8px; }
.paper-title { font-size: clamp(18px, 1.8vw, 22px); font-weight: 700; margin-bottom: 4px; line-height: 1.3; }
.paper-sub { font-size: 13px; color: var(--gray); margin-bottom: 16px; }
.paper-terms { margin: 0 0 16px; border-top: 1px solid var(--line); }
.paper-terms div { display: grid; grid-template-columns: 42% 58%; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.paper-terms dt { font-weight: 600; font-size: 13px; }
.paper-terms dd { margin: 0; font-size: 13px; }
.paper-lines { display: grid; gap: 7px; margin-bottom: 20px; }
.paper-lines i { display: block; height: 7px; background: var(--line-soft); border-radius: 4px; }
.paper-sign { display: flex; align-items: flex-end; gap: 0; position: relative; }
.sig-line { flex: 1; border-bottom: 1.5px solid var(--ink); height: 34px; position: relative; }
.sig-line span { position: absolute; left: 0; top: 40px; font-size: 11px; color: var(--gray); letter-spacing: .04em; }
.paper-sign .flag { margin-left: -6px; margin-right: -46px; transform: translateY(8px); box-shadow: 0 6px 14px rgba(0, 0, 0, .18); }
.paper-sign-gap { height: 20px; }

/* Dark band under the hero */
.ft-band { background: var(--ink); color: #fff; }
.ft-band-inner { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 72px); align-items: center; padding-top: clamp(40px, 5vw, 64px); padding-bottom: clamp(40px, 5vw, 64px); }
.ft-band-inner.one { grid-template-columns: minmax(0, 1fr); }
.ft-band h2 { color: #fff; font-size: clamp(1.45rem, 2.1vw, 1.9rem); }
.ft-band p { color: var(--on-dark); max-width: 640px; }
.kit-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 26px; }
.kit-list li { position: relative; padding-left: 30px; color: #fff; font-weight: 500; }
.kit-list li::before { content: ""; position: absolute; left: 0; top: .32em; width: 18px; height: 18px; border-radius: 50%; background: var(--teal); }
.kit-list li::after { content: ""; position: absolute; left: 6px; top: calc(.32em + 4px); width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pstats { display: grid; gap: 14px; }
.pstat { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius); padding: 20px 24px; display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.pstat b { font-size: clamp(2.2rem, 3.4vw, 3rem); line-height: 1; color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 2.2ch; }
.pstat span { color: var(--on-dark); font-size: 1rem; line-height: 1.45; }

/* Sections */
.section { padding: clamp(48px, 6vw, 84px) 0; }
.section.tight { padding: clamp(36px, 4vw, 56px) 0; }
.section.tint { background: var(--teal-soft); }
.section.dark { background: var(--ink); color: #fff; }
.section.dark h2, .section.dark h3 { color: #fff; }
.section.dark p { color: var(--on-dark); }
.section-head { max-width: 780px; margin-bottom: clamp(26px, 3vw, 40px); }
.section-head p { color: var(--gray); font-size: 1.08rem; }
.section.dark .section-head p { color: var(--on-dark); }
.kicker { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); margin-bottom: 10px; }
.section.dark .kicker { color: var(--teal-soft); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 72px); align-items: center; }

/* Family cards */
.family-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.fam-card { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--teal); border-radius: var(--radius); padding: 24px 22px; display: flex; flex-direction: column; }
.fam-card .t-kind { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); }
.fam-card h3 { margin: 6px 0 10px; font-size: 1.3rem; }
.fam-card p { color: var(--gray); font-size: 15px; }
.fam-card .btn { margin-top: auto; align-self: flex-start; }
.facts { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 7px; }
.facts li { position: relative; padding-left: 18px; font-size: 14.5px; }
.facts li::before { content: ""; position: absolute; left: 0; top: .72em; width: 9px; height: 2px; background: var(--teal); }
.section.dark .facts li::before { background: var(--teal-soft); }

/* Steps */
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.steps.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.steps li { counter-increment: s; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 20px; position: relative; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--teal-soft); color: var(--teal-deep); font-weight: 700; margin-bottom: 14px; }
.steps h3 { font-size: 1.08rem; margin-bottom: 6px; }
.steps p { color: var(--gray); font-size: 15px; margin: 0; }

/* Pricing */
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: stretch; }
.tier { background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 30px 28px 28px; display: flex; flex-direction: column; position: relative; }
.tier.featured { border: 2px solid var(--teal); box-shadow: 0 18px 40px rgba(15, 118, 110, .16); }
.tier .flag { position: absolute; top: 22px; right: -1px; }
.tier-name { font-size: 1.35rem; font-weight: 700; margin: 0 0 4px; color: var(--ink); }
.tier-pos { color: var(--ink); font-weight: 500; font-size: 15px; min-height: 3.2em; margin-bottom: 14px; }
.section.dark .tier p { color: var(--gray); }
.section.dark .tier .tier-pos { color: var(--ink); }
.section.dark .tier h3 { color: var(--ink); }
.price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.price b { font-size: 2.9rem; line-height: 1; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.price-note { font-size: 13.5px; color: var(--gray); margin-bottom: 18px; }
.tier .incl-head { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--teal); margin: 4px 0 10px; }
.checks { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 9px; }
.checks li { position: relative; padding-left: 28px; font-size: 15px; color: var(--ink); }
.checks li::before { content: ""; position: absolute; left: 0; top: .2em; width: 18px; height: 18px; border-radius: 50%; background: var(--teal-soft); }
.checks li::after { content: ""; position: absolute; left: 6px; top: calc(.2em + 4px); width: 5px; height: 9px; border: solid var(--teal); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tier-name a { color: inherit; text-decoration: none; }
.tier-name a:hover { color: var(--teal); text-decoration: underline; }
.tier-actions { margin-top: auto; display: grid; gap: 14px; }
.tier-actions .text-link { justify-self: start; font-size: 15px; }
.scope-note { margin-top: 28px; font-size: 14.5px; color: var(--on-dark); max-width: 920px; }
.section:not(.dark) .scope-note { color: var(--gray); }

.tier-callout { background: var(--teal-soft); color: var(--teal-deep); border-radius: 8px; padding: 10px 12px; font-size: 14.5px; font-weight: 600; line-height: 1.45; margin: 0 0 18px; }
.section.dark .tier .tier-callout { color: var(--teal-deep); }
.tier.featured .tier-pos { color: var(--ink); font-weight: 500; }
.section.dark .tier.featured .tier-pos { color: var(--ink); }

/* Launch kit highlight: before and after */
.ba { display: grid; gap: 16px; }
.ba-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; font-size: 15.5px; line-height: 1.85; }
.ba-card.done { border: 2px solid var(--teal); box-shadow: 0 14px 34px rgba(15, 118, 110, .14); }
.ba-label { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gray); margin-bottom: 8px; line-height: 1.3; }
.ba-card.done .ba-label { color: var(--teal); }
.ba-card .flag { margin-right: -23px; margin-left: auto; }
@media (min-width: 1081px) { .tier-pos { min-height: 4.7em; } }
.ba-card small { display: block; margin-top: 8px; font-size: 12.5px; color: var(--gray); line-height: 1.4; }
.filled { background: var(--teal-soft); color: var(--ink); font-weight: 600; border-radius: 4px; padding: .06em .36em; }
.launch-need { font-size: 15px; color: var(--gray); }

/* Sample preview */
.thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.thumbs.all { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.thumbs.samples { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.thumbs.samples .thumb { display: flex; flex-direction: column; }
.thumbs.samples .thumb img { flex: none; }
.thumbs.samples .thumb span { flex: 1; }
.thumb span b { display: block; color: var(--ink); font-size: 14px; font-weight: 600; }
.sample-fam + .sample-fam { margin-top: 40px; }
.sample-fam h2 { font-size: 1.35rem; margin: 0 0 14px; }
.link-btn { appearance: none; background: none; border: 0; padding: 0; margin-top: 8px; font: inherit; font-size: 14px; font-weight: 600; color: var(--teal); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.thumb { appearance: none; border: 1px solid var(--line); background: #fff; padding: 0; border-radius: 6px; overflow: hidden; cursor: zoom-in; box-shadow: 0 8px 22px rgba(17, 24, 39, .10); transition: transform .15s, box-shadow .15s; text-align: left; font: inherit; color: inherit; }
.thumb:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(17, 24, 39, .16); }
.thumb img { width: 100%; aspect-ratio: 8.5 / 11; object-fit: cover; }
.thumb span { display: block; padding: 8px 10px; font-size: 12.5px; color: var(--gray); border-top: 1px solid var(--line-soft); }

/* Template snippet */
.snippet { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 0 var(--radius) var(--radius) 0; padding: 26px 28px; font-size: 16px; line-height: 1.85; box-shadow: 0 12px 30px rgba(17, 24, 39, .07); }
.snippet h4 { font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--gray); margin-bottom: 10px; }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 900px; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 54px 18px 22px; font-weight: 600; font-size: 1.04rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 400; color: var(--teal); }
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding: 0 22px 18px; color: var(--ink); }
.faq .answer p:last-child { margin-bottom: 0; }
.faq-group + .faq-group { margin-top: 40px; }

/* CTA band */
.cta-band { background: var(--teal-deep); color: #fff; }
.cta-band .container { display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap; padding-top: clamp(40px, 5vw, 60px); padding-bottom: clamp(40px, 5vw, 60px); }
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { color: var(--teal-soft); margin: 0; max-width: 620px; }

/* Interior page hero */
.page-hero { background: var(--teal-soft); border-top: 6px solid var(--teal); }
.page-hero .container { padding-top: clamp(30px, 4vw, 52px); padding-bottom: clamp(30px, 4vw, 48px); }
.page-hero h1 { font-size: clamp(2.1rem, 3.6vw, 3.1rem); max-width: 900px; }
.page-hero .lead { font-size: 1.14rem; color: var(--ink); max-width: 820px; margin: 0; }
.page-hero .btn-row { margin-top: 24px; }
.crumbs { font-size: 13.5px; color: var(--gray); margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--teal); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span[aria-hidden] { color: var(--gray); }
.updated { font-size: 13.5px; color: var(--gray); margin-top: 14px; }

/* Articles */
.article { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(28px, 4vw, 64px); align-items: start; }
.prose { max-width: 74ch; font-size: 1.06rem; }
.prose h2 { font-size: clamp(1.4rem, 2vw, 1.7rem); margin: 1.8em 0 .55em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.15rem; margin: 1.5em 0 .45em; }
.prose li { margin-bottom: .4em; }
.prose ul li::marker { color: var(--teal); }
.prose ol li::marker { color: var(--teal); font-weight: 600; }
.callout { background: var(--teal-soft); border-left: 4px solid var(--teal); border-radius: 0 var(--radius) var(--radius) 0; padding: 18px 22px; margin: 1.4em 0; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout.note { background: var(--amber-soft); border-left-color: var(--amber); }
.callout strong:first-child { display: block; margin-bottom: 4px; }
.aside { position: sticky; top: 100px; display: grid; gap: 18px; }
.glance { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--teal); border-radius: var(--radius); padding: 22px; }
.glance h3 { font-size: 1.02rem; margin-bottom: 12px; }
.glance ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.glance li a { text-decoration: none; font-size: 15px; }
.glance li a:hover { text-decoration: underline; }
.glance p { font-size: 15px; color: var(--gray); }
.glance.cta { background: var(--ink); border-top-color: var(--amber); color: #fff; }
.glance.cta h3 { color: #fff; }
.glance.cta p { color: var(--on-dark); }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: 14.5px; }
dl.kv dt { color: var(--gray); }
dl.kv dd { margin: 0; font-weight: 600; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); margin: 1.2em 0 1.6em; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { background: var(--teal-soft); color: var(--ink); text-align: left; font-weight: 600; padding: 12px 14px; vertical-align: bottom; }
td { padding: 12px 14px; border-top: 1px solid var(--line-soft); vertical-align: top; }
td.c, th.c { text-align: center; }
.yes { color: var(--teal); font-weight: 700; }
.no { color: var(--gray); }

/* Catalog */
.filters { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: flex-start; margin-bottom: 18px; }
.filter-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-group > span { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--gray); margin-right: 4px; }
.chip { font: 500 14px/1 var(--font); border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 9px 14px; cursor: pointer; }
.chip:hover { border-color: var(--teal); color: var(--teal-deep); }
.chip[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.result-count { font-size: 14px; color: var(--gray); margin-bottom: 12px; }
.cat-table td { vertical-align: middle; }
.cat-table .t-name { font-weight: 600; color: var(--ink); }
.cat-table .t-desc { color: var(--gray); font-size: 14px; margin-top: 2px; }
.badge { display: inline-block; font: 600 12.5px/1 var(--font); padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.badge-teal { background: var(--teal-soft); color: var(--teal-deep); }
.badge-ink { background: var(--ink); color: #fff; }
.badge-amber { background: var(--amber); color: var(--ink); }
.cat-table tr[hidden] { display: none; }

/* Family page template list */
.tpl-list { display: grid; gap: 12px; }
.tpl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.tpl-row h3 { font-size: 1.08rem; margin: 0 0 4px; }
.tpl-row p { margin: 0; color: var(--gray); font-size: 14.5px; }
.tpl-ex { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

/* Forms */
.form-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(28px, 4vw, 64px); align-items: start; }
.form { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: clamp(22px, 3vw, 34px); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field.full { grid-column: 1 / -1; }
.field label { display: block; font-size: 14.5px; font-weight: 600; margin-bottom: 6px; }
.field .opt { font-weight: 400; color: var(--gray); }
.field input, .field select, .field textarea {
  width: 100%; font: 400 15.5px/1.4 var(--font); color: var(--ink); background: #fff;
  border: 1px solid #B9CFCA; border-radius: 8px; padding: 11px 13px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15, 118, 110, .2); }
.field [aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 3px rgba(180, 35, 24, .12); }
.field .err { display: none; color: var(--red); font-size: 13.5px; margin-top: 6px; font-weight: 500; }
.field.has-error .err { display: block; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--teal); flex: none; }
.form .actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.status { font-size: 15px; border-radius: 8px; padding: 14px 16px; margin-top: 18px; }
.status.ok { background: var(--teal-soft); color: var(--ink); }
.status.error { background: #FDECEA; color: var(--red); font-weight: 500; }

/* Footer */
.site-footer { background: var(--ink); color: var(--on-dark); font-size: 14.5px; }
.site-footer .container { padding-top: clamp(44px, 5vw, 64px); padding-bottom: 36px; }
.f-top { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(4, minmax(0, 1fr)); gap: 32px; }
.f-brand .wordmark { color: #fff; }
.f-brand p { margin: 14px 0; max-width: 300px; }
.f-top h4 { color: #fff; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.f-top ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.f-top a { color: var(--on-dark); text-decoration: none; }
.f-top a:hover { color: #fff; text-decoration: underline; }
.f-legal { border-top: 1px solid rgba(255, 255, 255, .14); margin-top: 40px; padding-top: 22px; font-size: 12.8px; line-height: 1.7; color: rgba(255, 255, 255, .66); }
.f-legal p { margin: 0 0 10px; max-width: 1080px; }
.f-legal a { color: #fff; }

/* Document viewer */
.doc-viewer { position: fixed; inset: 0; z-index: 400; background: rgba(17, 24, 39, .74); display: none; align-items: stretch; justify-content: center; padding: 16px; }
.doc-viewer.open { display: flex; }
.dv-panel { background: var(--paper); width: min(1100px, 100%); display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; border-top: 4px solid var(--teal); box-shadow: 0 24px 60px rgba(0, 0, 0, .4); min-height: 0; }
.dv-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.dv-title { font-weight: 600; }
.dv-title small { display: block; font-weight: 400; color: var(--gray); font-size: 13px; }
.dv-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dv-body { flex: 1; min-height: 0; overflow: auto; background: #DCE7E4; padding: 18px; display: grid; gap: 18px; justify-items: center; -webkit-overflow-scrolling: touch; }
.dv-body img { width: 100%; max-width: 860px; background: #fff; box-shadow: 0 6px 18px rgba(17, 24, 39, .18); }
body.dv-lock { overflow: hidden; }

/* Library index */
.lib-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.lib-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.lib-card h2 { font-size: 1.1rem; margin-bottom: 12px; }
.lib-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.lib-card a { font-weight: 600; text-decoration: none; }
.lib-card a:hover { text-decoration: underline; }
.lib-card li span { display: block; font-size: 14px; color: var(--gray); }

/* Glossary */
.gloss dt { font-weight: 700; margin-top: 1.2em; }
.gloss dd { margin: .3em 0 0; }

/* Preview-mode routing (artifact only) */
body[data-mode="preview"] main.route { display: none; }
body[data-mode="preview"] main.route.show { display: block; }

@media (max-width: 1180px) {
  .family-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .f-top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .f-brand { grid-column: 1 / -1; }
  .lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .article, .form-wrap { grid-template-columns: minmax(0, 1fr); }
  .aside { position: static; }
  .tiers { grid-template-columns: minmax(0, 1fr); max-width: 620px; }
}
@media (max-width: 960px) {
  .menu-toggle { display: inline-flex; }
  .primary { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 18px 40px rgba(17, 24, 39, .14); padding: 8px var(--gutter) 22px; flex-direction: column; align-items: stretch; gap: 14px; max-height: calc(100vh - 120px); overflow: auto; }
  .site-header.menu-open .primary { display: flex; }
  .primary > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-link { width: 100%; justify-content: space-between; padding: 15px 2px; border-bottom: 1px solid var(--line-soft); }
  .nav-link.active { border-bottom-color: var(--line-soft); }
  .mega { position: static; width: auto; box-shadow: none; border: 0; padding: 4px 0 10px; grid-template-columns: minmax(0, 1fr); }
  .mega::before { display: none; }
  .ft-hero-inner, .ft-band-inner, .split { grid-template-columns: minmax(0, 1fr); }
  .ft-art-card { order: 2; max-width: 560px; }
  .utility .container > span { display: none; }
  .utility .container { justify-content: flex-end; }
}
@media (max-width: 700px) {
  .family-grid, .steps, .steps.two, .lib-grid, .kit-list, .fields { grid-template-columns: minmax(0, 1fr); }
  .thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .f-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tpl-row { grid-template-columns: minmax(0, 1fr); }
  .tpl-ex { justify-content: flex-start; }
  .cat-table thead { display: none; }
  .cat-table, .cat-table tbody, .cat-table tr, .cat-table td { display: block; width: 100%; }
  .cat-table tr { border-top: 1px solid var(--line); padding: 12px 4px; }
  .cat-table tr:first-child { border-top: 0; }
  .cat-table td { border: 0; padding: 4px 12px; }
  .cat-table td[data-label]::before { content: attr(data-label) ": "; color: var(--gray); font-size: 13px; }
  .paper-sign .flag { margin-right: -30px; }
  .ft-art-card { padding-right: 18px; }
  .pstat { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}
@media (max-width: 420px) {
    .wordmark { font-size: 21px; }
  .brand svg { width: 34px; height: 34px; }
  .btn { padding: 12px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .utility, .site-header, .site-footer, .cta-band, .doc-viewer, .aside { display: none !important; }
  .page-hero { border: 0; background: none; }
}
@media (max-width: 560px) {
  .thumbs.samples { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 961px) and (max-width: 1180px) {
  .nav-link { padding: 12px 8px; font-size: 14.5px; }
  .primary { gap: 12px; }
}
.ft-band .band-save { margin: 22px 0 0; font-size: 15px; max-width: none; }
.ft-band .band-save a { color: #fff; font-weight: 600; white-space: nowrap; }
