/* Scoped directory components. Shared brand, typography and hero remain in landing/contract-story.css. */
.document-directory [hidden] { display: none !important; }
.document-directory :is(a, button, input, summary):focus-visible { outline: 3px solid var(--cs-teal); outline-offset: 5px; }
.dd-hero { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 70px; padding-block: 72px; }
.dd-hero h1 { font-size: clamp(38px, 4.7vw, 62px); }
.dd-hero .cs-lead { max-width: 540px; }
.dd-archive { margin: 0; }
.dd-archive-window { display: block; overflow: hidden; aspect-ratio: 1.05; border-radius: 20px; background: var(--cs-paper); box-shadow: 0 20px 50px rgb(23 58 60 / .10); }
.dd-archive-window img { display: block; width: 100%; height: auto; transform: translateY(-10%); }
.dd-archive figcaption { margin: 18px 0 0; text-align: center; }
.dd-stats { display: flex; gap: 34px; margin: 38px 0 0; }
.dd-stats div { display: flex; flex-direction: column-reverse; gap: 6px; }
.dd-stats dt { color: var(--cs-muted); font-size: 12px; }
.dd-stats dd { margin: 0; font-size: 29px; font-weight: 600; letter-spacing: -.025em; }
.dd-explorer { padding-block: 80px 60px; scroll-margin-top: 95px; }
.dd-section-heading { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: end; margin-bottom: 34px; }
.dd-section-heading h2, .dd-faq > h2 { margin: 0; font-size: clamp(28px, 3.1vw, 40px); line-height: 1.16; font-weight: 600; }
.dd-section-heading .cs-kicker { margin-bottom: 12px; }
.dd-section-heading > p { margin: 0; max-width: 480px; font-size: 16px; line-height: 1.65; color: var(--cs-muted); }
.dd-controls { display: flex; align-items: end; gap: 14px; padding: 23px; border-radius: 14px; background: var(--surface-soft); }
.dd-controls label { display: block; margin-bottom: 9px; font-size: 13px; font-weight: 600; }
.dd-search { flex: 1; min-width: 0; }
.dd-controls :is(input, .dd-select-trigger) { width: 100%; min-height: 49px; border: 1px solid var(--line); border-radius: 8px; background: var(--cs-paper); color: var(--cs-ink); padding: 12px 14px; font: 400 16px/1.3 var(--sans); }
.dd-controls input::placeholder { color: var(--cs-muted); opacity: 1; }
.dd-category-filter { position: relative; width: 310px; }
.dd-select-trigger { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: start; cursor: pointer; }
.dd-selected, .dd-option-content { display: flex; align-items: center; gap: 11px; min-width: 0; }
.dd-select-chevron { flex-shrink: 0; color: var(--cs-muted); transition: transform .15s ease; }
.dd-select-trigger[aria-expanded="true"] .dd-select-chevron { transform: rotate(180deg); }
.dd-select-options { position: absolute; z-index: 12; inset-inline: 0; top: calc(100% + 8px); margin: 0; padding: 6px; overflow-y: auto; overscroll-behavior: contain; list-style: none; border: 1px solid var(--line); border-radius: 12px; background: var(--cs-paper); box-shadow: 0 12px 32px rgb(23 58 60 / .14); }
.dd-opens-up .dd-select-options { top: auto; bottom: calc(100% - 24px + 8px); }
.dd-select-options [role="option"] { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 10px 9px; border-radius: 7px; color: var(--cs-ink); font: 400 14px/1.4 var(--sans); cursor: pointer; }
.dd-select-options [role="option"]:hover, .dd-select-options .is-active { background: var(--surface-soft); }
.dd-select-check { flex-shrink: 0; color: var(--cs-teal); visibility: hidden; }
.dd-select-options [aria-selected="true"] .dd-select-check { visibility: visible; }
.dd-category-filter .dd-tone-all { background: var(--hero-wash); border: 1px solid var(--line); }
.dd-reset { min-height: 49px; padding: 12px; background: transparent; border: 0; color: var(--cs-teal); font: 600 13px/1.3 var(--sans); cursor: pointer; }
.dd-explorer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; padding: 16px 0 24px; font-size: 12px; color: var(--cs-muted); }
.dd-explorer-meta p { margin: 0; line-height: 1.8; }
.dd-explorer-meta a { color: var(--cs-teal); margin-inline-start: 8px; }
.dd-results { color: var(--cs-ink); font-weight: 600; }
.dd-categories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; column-gap: 52px; }
.dd-category { border-top: 1px solid var(--line); scroll-margin-top: 100px; }
.dd-category > summary { padding: 25px 0; cursor: pointer; }
.dd-summary-content { display: inline-flex; align-items: flex-start; gap: 18px; width: calc(100% - 24px); vertical-align: top; }
.dd-category > summary::marker { color: var(--cs-muted); font-size: 12px; }
.dd-swatch { display: grid; place-items: center; color: var(--doc-ink); width: 42px; height: 42px; flex: 0 0 42px; margin-top: 2px; border-radius: 13px; background: var(--doc-color); border: 1px solid color-mix(in srgb, var(--doc-ink) 20%, transparent); }
.dd-swatch svg { display: block; width: 24px; height: 24px; }
.dd-category-heading { display: flex; flex-direction: column; min-width: 0; gap: 7px; }
.dd-category-name { font-size: 22px; font-weight: 600; line-height: 1.25; letter-spacing: -.025em; }
.dd-category-meta { font-size: 12px; color: var(--cs-muted); line-height: 1.4; }
.dd-category-preview { font-size: 13px; line-height: 1.6; color: var(--cs-muted); margin-top: 4px; }
.dd-category[open] { grid-column: 1 / -1; }
.dd-category[open] > summary { padding-bottom: 8px; }
.dd-category[open] .dd-category-preview { display: none; }
.dd-category-body { padding: 0 0 28px 60px; }
.dd-category-body p { max-width: 70ch; margin: 0 0 18px; color: var(--cs-muted); font-size: 14px; line-height: 1.7; }
.dd-subtype-family { margin-block: 14px 22px; }
.dd-subtype-family + .dd-subtype-family { border-top: 1px solid var(--line); padding-top: 16px; }
.dd-family-heading { display: flex; align-items: center; gap: 8px; padding-bottom: 12px; }
.dd-family-base { width: 16px; height: 16px; border-radius: 50%; flex: 0 0 16px; background: var(--doc-color); border: 1px solid color-mix(in srgb, var(--doc-ink) 20%, transparent); }
.dd-family-heading h3 { margin: 0; font-size: 13px; font-weight: 600; scroll-margin-top: 110px; }
.dd-family-heading h3 small { color: var(--cs-muted); font-size: 12px; font-weight: 400; }
.dd-family-order { margin-inline-start: auto; color: var(--cs-muted); font-size: 11px; white-space: nowrap; }
.dd-subtypes { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px 20px; padding: 0; margin: 0; list-style: none; }
.dd-subtype-cover { display: grid; place-items: center; width: 36px; height: 46px; flex: 0 0 36px; border-radius: 7px; background: var(--doc-color); color: var(--doc-ink); border: 1px solid color-mix(in srgb, var(--doc-ink) 20%, transparent); }
.dd-subtype-cover svg { width: 20px; height: 20px; }
.dd-category-note { margin-top: 22px; }
.dd-category-note p { margin-bottom: 8px; font-size: 13px; }
.dd-category-note .cs-text-link { font-size: 13px; }
.dd-subtypes li { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 13px; line-height: 1.5; hyphens: auto; overflow-wrap: anywhere; scroll-margin-top: 110px; }
.dd-tone { width: 17px; height: 17px; border-radius: 50%; flex: 0 0 17px; background: var(--doc-color); border: 1px solid color-mix(in srgb, var(--doc-ink) 25%, transparent); }
.dd-count-note { font-size: 12px; line-height: 1.75; color: var(--cs-muted); margin-block: 24px 0; }
.dd-empty { padding: 35px 0; max-width: 550px; }
.dd-empty h3 { font-size: 22px; }
.dd-empty p { color: var(--cs-muted); line-height: 1.6; }
.dd-empty button { border: 0; cursor: pointer; }
.dd-color-band { background: var(--surface-soft); padding-block: 70px; scroll-margin-top: 80px; }
.dd-palette { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 26px 20px; margin: 40px 0; padding: 0; list-style: none; }
.dd-palette li { display: flex; align-items: center; gap: 10px; font-size: 12px; line-height: 1.4; }
.dd-palette-color { width: 32px; height: 46px; border-radius: 10px; background: var(--doc-color); flex: 0 0 32px; }
.dd-color-examples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 25px; padding-top: 25px; border-top: 1px solid var(--line); }
.dd-color-examples > div { display: flex; align-items: center; gap: 14px; }
.dd-color-examples p { margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.dd-color-examples p span { font-size: 12px; color: var(--cs-muted); }
.dd-color-note { max-width: 850px; color: var(--cs-muted); font-size: 13px; line-height: 1.75; margin-top: 30px; }
.dd-how { padding-block: 80px; scroll-margin-top: 75px; }
.dd-how-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px; margin-top: 45px; }
.dd-step { font-size: 12px; color: var(--cs-teal); }
.dd-how-grid h3 { font-size: 21px; font-weight: 600; line-height: 1.35; margin: 15px 0; }
.dd-how-grid p { color: var(--cs-muted); line-height: 1.7; font-size: 15px; }
.dd-faq { max-width: 850px; padding-bottom: 30px; }
.dd-faq > h2 { margin-bottom: 28px; }
.dd-faq details { padding-block: 20px; border-top: 1px solid var(--line); }
.dd-faq summary { cursor: pointer; font-size: 17px; line-height: 1.5; font-weight: 550; }
.dd-faq details p { max-width: 72ch; color: var(--cs-muted); font-size: 15px; line-height: 1.8; }
@media (max-width: 1000px) {
  .dd-hero { gap: 35px; }
  .dd-stats { gap: 22px; }
  .dd-palette { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dd-categories { column-gap: 32px; }
  .dd-category-body { padding-inline-start: 0; }
  .dd-category-name { font-size: 20px; }
}
@media (max-width: 700px) {
  .dd-hero { grid-template-columns: 1fr; padding-block: 38px 45px; gap: 35px; }
  .dd-hero h1 { font-size: clamp(34px, 8.7vw, 48px); }
  .dd-hero .cs-lead { font-size: 16px; }
  .dd-stats { gap: 24px; margin-top: 30px; }
  .dd-stats dt { font-size: 11px; }
  .dd-stats dd { font-size: 25px; }
  .dd-archive { max-width: 450px; width: 100%; justify-self: center; }
  .dd-explorer { padding-block: 50px 35px; }
  .dd-section-heading { grid-template-columns: 1fr; gap: 20px; }
  .dd-section-heading > p { font-size: 15px; }
  .dd-controls { padding: 17px; flex-wrap: wrap; gap: 14px; }
  .dd-search { flex: 1 1 100%; }
  .dd-category-filter { flex: 1 1 100%; min-width: 0; }
  .dd-reset { padding: 0 5px; min-height: 30px; margin-inline-start: auto; }
  .dd-explorer-meta { gap: 6px; }
  .dd-categories { grid-template-columns: 1fr; }
  .dd-category > summary { padding-block: 22px; }
  .dd-category-body { padding-inline-start: 0; }
  .dd-category-name { font-size: 21px; }
  .dd-subtypes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
  .dd-palette { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px; }
  .dd-color-examples, .dd-how-grid { grid-template-columns: 1fr; gap: 26px; }
  .dd-color-band { padding-block: 45px; }
  .dd-how { padding-block: 50px; }
  .dd-how-grid { margin-top: 30px; }
  .dd-how-grid h3 { margin-top: 8px; }
  .dd-faq > h2 { font-size: 30px; }
}
