@font-face {
  font-family: 'Quiet Galine';
  src: url('/assets/quiet-signature-galine.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

.qs-only { display: none; }

:is(html[data-leather-theme="quiet"] body.variant-d, body.variant-d.d-company-home) {
  --display: 'Quiet Galine', Georgia, serif;
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  font-synthesis: none;
  line-height: 1.6;

  & :is(h1,h2,h3):not(.d-story-title) {
    font-family: var(--display);
    font-weight: 400;
    letter-spacing: -.025em;
    line-height: 1.18;
  }
}

body.d-company-home {
  & .d-home-copy h1 { color: #fffdf8; }
  & .d-partners-heading h2 { text-wrap: balance; }
}

/* Explicit specialization of the existing unlayered Direction D stylesheet.
   Every selector is gated: Original and all non-Leather routes retain their CSS. */
html[data-leather-theme="quiet"] body.variant-d {
  --qs-canvas: #eeede5;
  --qs-surface: #e7e6df;
  --qs-raised: #f7f7f3;
  --qs-text: #2d3230;
  --qs-muted: #636663;
  --qs-action: #5b493d;
  --qs-hover: #4c4239;
  --qs-rule: #cbcbc4;
  --qs-border: #6f726e;
  --qs-radius-card: 8px;
  --qs-radius-control: 3px;
  --paper: var(--qs-canvas);
  --paper-2: var(--qs-surface);
  --ink: var(--qs-text);
  --muted: var(--qs-muted);
  --accent: var(--qs-action);
  --line: var(--qs-rule);
  --forest: var(--qs-action);
  --header: var(--qs-canvas);
  background: var(--paper);
  color: var(--ink);
  accent-color: var(--accent);

  & ::selection { background: var(--accent); color: var(--paper); }
  & .qs-only { display: block; }
  & :is(h1,h2,h3):not(.d-story-title) {
    color: var(--ink);
    text-wrap: pretty;
  }
  & :is(h1,h2) em { font-style: normal; }
  & :is(a,button,input,select,textarea,summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
  & .button {
    min-height: 48px;
    padding: 12px 20px;
    border-radius: var(--qs-radius-control);
    font: 500 14px/1.4 'Hanken Grotesk', sans-serif;
    letter-spacing: .01em;
    transition: background-color 160ms, color 160ms, border-color 160ms;
  }
  & .button-dark { background: var(--accent); border-color: var(--accent); color: var(--paper); }
  & .button-dark:hover:not(:disabled) { background: var(--qs-hover); border-color: var(--qs-hover); }
  & :is(.text-link,.text-button) { color: var(--accent); font-weight: 500; }
  & .d-header { background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: none; }
  & .d-desktop-nav :is(a,summary) { color: var(--ink); font-weight: 500; letter-spacing: .065em; }
  & .d-language, & .d-language a[aria-current] { color: var(--ink); }
  & :is(.d-mega,.d-drawer-panel,.d-noscript-nav) { background: var(--qs-raised); color: var(--ink); border-color: var(--line); }
  & .d-mega-intro h2 { font-size: 32px; }
  & .d-mega-image { border-radius: var(--qs-radius-card); background: var(--paper-2); }
  & .d-drawer :is(a,summary) { color: var(--ink); border-color: var(--line); }

  /* Retain rivers, framed identity, video position and the full scroll story. */
  & :is(.d-leather-hero,.d-rivers) { background: var(--paper-2); }
  & .d-leather-hero .d-rivers:before { background: linear-gradient(var(--paper-2),transparent); }
  & .d-leather-hero .d-rivers:after { background: linear-gradient(transparent,var(--paper-2)); }
  & .d-leather-hero .d-hero-frame {
    background: var(--qs-raised);
    border: 1px solid var(--qs-border);
    border-radius: var(--qs-radius-card);
    outline: none;
    box-shadow: 0 8px 40px #2d323012;
    padding-inline: .7em;
  }
  & .d-leather-hero .d-hero-frame h1 { font: 400 1.06em/1.12 var(--display); letter-spacing: -.04em; }
  & .d-intro h2 { font-size: clamp(1.6rem,1.1rem + 1.6vw,2.5rem); line-height: 1.35; }
  & .d-intro-highlight { color: var(--accent); }
  & .video-frame { border-radius: var(--qs-radius-card); overflow: hidden; }
  & .d-section-title h2 { font-size: clamp(2rem,1.2rem + 2.3vw,3.25rem); }
  & .d-section-title>span { height: 1px; width: 64px; background: var(--qs-border); margin-top: 24px; }
  & :is(.industry-row,.industry-copy) { background: var(--paper-2); }
  & .industry-row { border-radius: var(--qs-radius-card); overflow: hidden; }
  & .industry-copy h3 { font-size: clamp(2rem,1.25rem + 2.4vw,3.5rem); }
  & .industry-copy>p:not(.eyebrow) { color: var(--muted); }
  & .design-section { background: var(--paper-2); }
  & .design-band { border-radius: var(--qs-radius-card); overflow: hidden; }
  & .design-copy { background: var(--ink); }
  & .design-copy h3 { color: var(--paper); font-size: clamp(2rem,1.25rem + 2.4vw,3.5rem); }
  & .design-copy :is(p:not(.eyebrow),.text-link,.design-tags) { color: var(--paper); }
  & :is(.product-image,.d-project-image,.d-news-image) { border-radius: var(--qs-radius-card); background: var(--paper-2); }
  & .product-card h3 { font-family: 'Hanken Grotesk',sans-serif; font-weight: 500; font-size: 16px; line-height: 1.4; letter-spacing: 0; margin-top: 16px; }
  & .product-card p { font-size: 13px; margin-top: 8px; }
  & .card-arrow { background: var(--qs-raised); color: var(--ink); border-radius: var(--qs-radius-control); }
  & .d-project-caption h3 { font: 500 16px/1.4 'Hanken Grotesk',sans-serif; letter-spacing: 0; }
  & .d-project-controls button { border-radius: var(--qs-radius-control); }
  & .d-news-copy :is(time,span) { color: var(--muted); }
  & .d-news-copy h3 { font-size: clamp(1.5rem,1.2rem + 1vw,2rem); }
  & .d-cta { background: var(--paper-2); }
  & .d-cta-workshop .d-cta-copy h2 { color: var(--paper); font-size: clamp(2.25rem,1.3rem + 3vw,4rem); }
  & .d-cta-workshop .d-cta-copy p { color: var(--paper); }
  & .d-cta-button { background: var(--paper); color: var(--ink); border: 1px solid var(--paper); }
  & .d-cta-button:hover { background: var(--qs-raised); color: var(--ink); }

  /* An editorial collection opening, practical filters, generous image grid. */
  & .qs-catalog-intro { padding-block: 80px 40px; border-bottom: 1px solid var(--line); }
  & .qs-kicker { margin-bottom: 24px; color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: .14em; }
  & .qs-catalog-intro h1 { font-size: clamp(3rem,2rem + 4vw,6rem); margin-bottom: 24px; }
  & .qs-catalog-intro>p:last-child { max-width: 56ch; color: var(--muted); }
  & .catalog-filters { width: min(100% - 80px,1152px); max-width: none; padding: 32px 0; }
  & .catalog-toolbar { margin-bottom: 24px; }
  & .catalog-toolbar strong { font-weight: 500; font-size: 14px; }
  & .catalog-filter-group { background: var(--qs-raised); border: 1px solid var(--qs-border); border-radius: var(--qs-radius-control); padding: 0 16px; }
  & .catalog-filter-group summary { min-height: 48px; padding-block: 12px; font-size: 14px; font-weight: 500; }
  & .catalog-choice { min-height: 48px; margin: 0; gap: 12px; cursor: pointer; }
  & .catalog-choice input { accent-color: var(--accent); width: 18px; height: 18px; }
  & .catalog-options { padding-top: 0; padding-bottom: 12px; }
  & :is(.catalog-toolbar button,.catalog-active button) { min-height: 48px; border-color: var(--qs-border); border-radius: var(--qs-radius-control); color: var(--accent); padding-inline: 16px; }
  & .catalog-active button { background: var(--paper-2); font-size: 13px; }
  & .catalog-filters+section { padding-top: 16px; }
  & .catalog-filters+section .product-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 48px 24px; }
  & .catalog-filters+section .product-image { aspect-ratio: 1; }
  & .catalog-filters+section .product-image img { object-fit: contain; padding: 12px; }

  /* Product pages: an image-led study with a quiet, readable specification column. */
  & .breadcrumbs { color: var(--muted); font-size: 12px; padding-block: 24px; }
  & .product-detail { align-items: start; gap: clamp(24px,5vw,80px); padding-block: 16px 64px; }
  & .detail-image { background: var(--paper-2); border-radius: var(--qs-radius-card); overflow: hidden; }
  & .detail-image img { aspect-ratio: 1; width: 100%; height: auto; object-fit: contain; }
  & .detail-copy { padding-top: 16px; position: sticky; top: 104px; }
  & .detail-copy h1 { font-size: clamp(2.25rem,1.5rem + 2vw,3.75rem); overflow-wrap: anywhere; }
  & .detail-desc { font: 400 16px/1.6 'Hanken Grotesk',sans-serif; color: var(--muted); margin-top: 24px; }
  & .detail-copy .eyebrow { display: block; font: 500 11px/1.6 'Hanken Grotesk',sans-serif; letter-spacing: .12em; color: var(--muted); margin-bottom: 20px; }
  & .qs-product-specs { margin-block: 0 24px; }
  & .qs-product-specs>div { display: grid; grid-template-columns: 100px 1fr; gap: 16px; padding-block: 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
  & .qs-product-specs dt { color: var(--muted); }
  & .qs-product-specs dd { margin: 0; }
  & .qs-product-note { margin-bottom: 24px; color: var(--muted); font-size: 14px; }
  & .detail-live { display: flex; margin-top: 20px; font-size: 13px; }
  & .catalog-gallery { gap: 24px; padding-block: 0 64px; }
  & .catalog-gallery :is(img,video) { background: var(--paper-2); border-radius: var(--qs-radius-card); }
  & .related { border-top: 1px solid var(--line); }
  & .related .section-head { text-align: start; }
  & .related .section-head-side { margin-inline: 0; }
  & .index-intro h1 { font-size: clamp(3rem,2rem + 3vw,5rem); }
  & .index-card-image { border-radius: var(--qs-radius-card); overflow: hidden; }
  & :is(.contact-dialog,.binder-quote) { background: var(--qs-raised); color: var(--ink); border: 1px solid var(--line); border-radius: var(--qs-radius-card); }
  & .dialog-content h2 { font-family: var(--display); font-weight: 400; }
  & .demo-form :is(input,textarea) { border: 1px solid var(--qs-border); border-radius: var(--qs-radius-control); background: var(--qs-raised); color: var(--ink); min-height: 48px; }
  & .binder-quote :is(input,select,textarea) { accent-color: var(--accent); border-color: var(--qs-border); border-radius: var(--qs-radius-control); }
}

@media (max-width: 767px) {
  html[data-leather-theme="quiet"] body.variant-d {
    & .catalog-filters { width: calc(100% - 40px); padding-block: 24px; }
    & .catalog-filter-groups { grid-template-columns: 1fr 1fr; gap: 8px; }
    & .catalog-filter-group { padding-inline: 10px; }
    & .catalog-filters+section .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 32px 16px; }
    & .qs-catalog-intro { padding-block: 48px 32px; }
    & .product-detail { display: flex; gap: 24px; }
    & .detail-copy { position: static; }
    & .d-intro h2 { font-size: 1.6rem; }
    & .product-card h3 { font-size: 14px; }
  }
}
@media (prefers-reduced-motion: reduce) {
  html[data-leather-theme="quiet"] .button { transition: none; }
}
