/* Isolated presentation rules for style-preview.php; production components stay unchanged. */
.style-preview { padding-top: 8rem; padding-bottom: 4rem; }
.style-preview.container { padding-left: 15px; padding-right: 15px; }
.style-preview .preview-intro { max-width: 850px; margin-bottom: 2rem; }
.style-preview .preview-eyebrow { margin-bottom: .65rem; color: var(--bloodwood); font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.style-preview .preview-tools { display: flex; gap: .75rem; flex-wrap: wrap; }
.style-preview .preview-badge { display: inline-block; padding: .15rem .5rem; background: var(--sandstone-mist); border: 1px solid var(--bloodwood); border-radius: 4px; color: var(--bloodwood); font-size: .78rem; font-weight: 600; vertical-align: middle; }
.style-preview .preview-badge--alternative { background: var(--rich-black); border-color: var(--rich-black); color: var(--golden-saffron); }
.style-preview .preview-section { padding: 3.5rem 0; border-bottom: 1px solid rgba(149,23,22,.22); scroll-margin-top: 100px; }
.style-preview .preview-section-heading { max-width: 800px; margin-bottom: 2rem; }
.style-preview .preview-specimen { padding: 2rem; margin-bottom: 2rem; background: rgba(255,255,255,.35); border: 1px solid rgba(149,23,22,.2); border-radius: 12px; scroll-margin-top: 100px; }
.style-preview .preview-specimen:last-child { margin-bottom: 0; }
.style-preview .preview-label { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; color: var(--slate-shadow); font-size: .9rem; margin-bottom: 1.25rem; }
.style-preview .preview-full-text { max-width: 760px; margin-top: 2rem; }
.style-preview .preview-full-text h4 { margin: 2rem 0 1rem; }
.style-preview .byline-row { flex-wrap: wrap; }
.style-preview .preview-caption { margin-top: 1rem; color: var(--slate-shadow); font-size: .9rem; }
.style-preview code { overflow-wrap: anywhere; }
.style-preview .preview-disclosure { max-width: none; background: var(--sandstone-mist); border-radius: 8px; }
.style-preview .preview-disclosure > summary { display: block; position: relative; padding: 1.5rem; border-radius: 8px; background: var(--sandstone-mist); text-align: left; }
.style-preview .preview-disclosure > summary::before { display: none; }
.style-preview .preview-disclosure-title { display: block; margin-bottom: .75rem; font-family: 'Source Serif 4', serif; font-size: 1.75rem; font-weight: 600; line-height: 1.25; color: var(--bloodwood); }
.style-preview .preview-reading-meta { display: block; font-size: .9rem; font-weight: 400; color: var(--slate-shadow); margin-bottom: .75rem; }
.style-preview .preview-summary { display: block; font-weight: 400; line-height: 1.65; color: var(--slate-shadow); margin-bottom: 1rem; }
.style-preview .preview-disclosure-action { margin-top: 0; }
.style-preview .preview-disclosure .when-open { display: none; }
.style-preview .preview-disclosure[open] .when-closed { display: none; }
.style-preview .preview-disclosure[open] .when-open { display: inline; }
.style-preview .preview-disclosure[open] .preview-disclosure-action::after { transform: rotate(225deg); }
.style-preview .preview-disclosure > summary:hover .preview-disclosure-action,
.style-preview .preview-disclosure > summary:focus-visible .preview-disclosure-action {
  background-color: var(--golden-saffron);
  color: var(--rich-black);
}
.style-preview .preview-disclosure > summary:focus-visible .preview-disclosure-action {
  outline: 3px solid var(--bloodwood);
  outline-offset: 3px;
}
.style-preview .preview-disclosure-body { padding: 1.5rem; background: var(--ivory-dust); }
.style-preview .preview-swatches { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.style-preview .preview-swatch { background: rgba(255,255,255,.5); border-radius: 8px; overflow: hidden; }
.style-preview .preview-color { height: 105px; border-bottom: 1px solid rgba(0,0,0,.08); }
.style-preview .preview-swatch > div:last-child { padding: 1rem; }
.style-preview .preview-swatch p { margin-bottom: .5rem; }
.style-preview .preview-type { padding-bottom: 1rem; }
.style-preview .preview-type .preview-caption { display: block; margin-bottom: .65rem; }
.style-preview .preview-heading-one { font-family: 'Source Serif 4',serif; font-size: clamp(2.25rem,5vw,3rem); font-weight: 600; line-height: 1.25; color: var(--bloodwood); }
.style-preview .preview-action-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.25rem; }
.style-preview .preview-surface { scroll-margin-top: 100px; padding: 1.5rem; background: rgba(255,255,255,.4); border-radius: 8px; }
.style-preview .preview-surface .btn { white-space: normal; }
.style-preview .preview-button-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.style-preview .preview-button-row .btn { display: inline-flex; align-items: center; justify-content: center; margin: 0; min-height: 3.5rem; }
.style-preview .preview-status { margin-top: 1rem; padding: 1rem; background: var(--ivory-dust); border-left: 3px solid var(--bloodwood); }
.style-preview .preview-project-image { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.style-preview .preview-quote-stage { padding: 3.5rem 3rem 1rem; }
.style-preview .quote-styled-block { position: relative; inset: auto; margin: 0; width: 100%; max-width: 600px; z-index: auto; }
.style-preview .preview-topic-example { max-width: 500px; }
.style-preview .preview-navigation-stage { max-width: 420px; }
.style-preview .preview-form { max-width: 700px; }
.style-preview .preview-closing { border-bottom: 0; }
.style-preview #section-faq h3 { font-family: 'Source Sans 3',sans-serif; }
.style-preview :is(button,summary,a,input,select,textarea):focus-visible { outline: 3px solid var(--bloodwood); outline-offset: 4px; }
.style-preview [hidden] { display: none !important; }
@media screen and (max-width: 767.98px) {
  .style-preview { padding-top: 7rem; }
  .style-preview .preview-section { padding: 2.5rem 0; }
  .style-preview .preview-specimen { padding: 1.25rem; }
  .style-preview .preview-swatches { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; }
  .style-preview .preview-action-grid { grid-template-columns: 1fr; }
  .style-preview .preview-quote-stage { padding-left: 1.5rem; padding-right: 0; }
  .style-preview .case-highlights-card { padding: 1.25rem; }
  .style-preview .preview-tools { flex-direction: column; align-items: stretch; }
}
@media print {
  body { background: white; }
  body > header, .navbar, .skip-link, #read-progress, body > footer, .preview-jump, .preview-tools { display: none !important; }
  .style-preview { max-width: none; padding-top: 0; }
  .style-preview .preview-section { border: 0; }
  .style-preview .preview-swatch { break-inside: avoid; }
  .style-preview .preview-full-text { break-inside: auto; }
  .style-preview .read-more-btn { display: none !important; }
  .style-preview .preview-section, .style-preview .preview-specimen { background: white; }
  .style-preview .preview-color { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* Component-library workspace. All rules are local to this reference page. */
.style-preview.container { max-width: 1480px; padding-left: 2rem; padding-right: 2rem; }
.style-preview .preview-intro { display: grid; grid-template-columns: minmax(0,1fr) 230px; gap: 3rem; max-width: none; padding-bottom: 2rem; margin-bottom: 0; }
.style-preview .preview-intro h1 { max-width: 23ch; }
.style-preview .preview-intro .lead, .style-preview .preview-intro .preview-caption { max-width: 78ch; }
.style-preview .preview-tools { flex-direction: column; align-items: stretch; justify-content: flex-start; padding-top: 2rem; }
.style-preview .preview-tools .btn { white-space: normal; }
.style-preview .preview-edition { font-size: .85rem; color: var(--slate-shadow); text-align: center; }
.style-preview .preview-status-key { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0 .75rem; }
.style-preview .preview-status-chip { display: inline-flex; align-items: center; padding: .25rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.style-preview .preview-status-chip[data-status="approved"] { color: #184c30; background: #e0ede4; }
.style-preview .preview-status-chip[data-status="needs-refinement"] { color: #603d0a; background: #f8edcf; }
.style-preview .preview-status-chip[data-status="experimental"] { color: #741415; background: #f5e2e3; }
.style-preview .preview-workspace { display: grid; grid-template-columns: 286px minmax(0,1fr); gap: 2.5rem; align-items: start; border-top: 1px solid rgba(149,23,22,.22); }
.style-preview .preview-jump { position: sticky; top: 100px; margin-top: 1.5rem; padding: 0 0 1rem; border: 0; max-height: calc(100vh - 130px); overflow-y: auto; }
.style-preview .preview-nav-label { padding: .5rem .65rem; color: var(--slate-shadow); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.style-preview .preview-catalogue { min-width: 0; }
.style-preview .preview-section { padding: 2.5rem 0 3rem; }
.style-preview .preview-section > h2, .style-preview .preview-section-heading h2 { font-size: clamp(1.75rem,3vw,2.1rem); }
.style-preview .preview-specimen { border-color: rgba(149,23,22,.15); background: rgba(255,255,255,.25); padding: 1.5rem; }
.style-preview .preview-full-text { max-width: 68ch; }
.style-preview .preview-component-docs { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(149,23,22,.2); }
.style-preview .preview-docs-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.25rem; }
.style-preview .preview-docs-label { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--bloodwood); }
.style-preview .preview-approval-label { display: flex; gap: .6rem; align-items: center; margin: 0; font-size: .85rem; }
.style-preview .preview-approval-select { min-height: 40px; padding: .4rem .65rem; max-width: 185px; font-size: .9rem; border-width: 1px; }
.style-preview .preview-usage-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.5rem; }
.style-preview .preview-usage-grid h3 { font-family: 'Source Sans 3',sans-serif; font-size: 1rem; font-weight: 600; color: var(--rich-black); margin-bottom: .5rem; }
.style-preview .preview-usage-grid p { font-size: .95rem; line-height: 1.6; }
.style-preview details.preview-code { max-width: none; margin-top: 1rem; background: var(--rich-black); border-radius: 8px; }
.style-preview details.preview-code > summary { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem; background: var(--rich-black); color: var(--golden-saffron); font-size: .95rem; font-weight: 600; }
.style-preview details.preview-code > summary::before { display: none; }
.style-preview .preview-code-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; border-top: 1px solid rgba(255,255,255,.15); color: var(--ivory-dust); font-size: .85rem; }
.style-preview .preview-copy { border: 1px solid var(--golden-saffron); border-radius: 4px; color: var(--golden-saffron); background: transparent; padding: .4rem .7rem; font-size: .85rem; white-space: nowrap; cursor: pointer; }
.style-preview .preview-copy:hover { background: var(--golden-saffron); color: var(--rich-black); }
.style-preview .preview-code pre { margin: 0; padding: 1rem; max-height: 440px; overflow: auto; background: var(--rich-black); color: var(--ivory-dust); }
.style-preview .preview-code pre code { display: block !important; padding: 0; border: 0; background: transparent !important; color: var(--ivory-dust) !important; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: .85rem; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.style-preview .preview-code .preview-copy-status { color: var(--ivory-dust); font-size: .85rem; padding: 0 1rem .75rem; margin: 0; }
.style-preview .preview-code .preview-copy-status:empty { display: none; }
.style-preview .preview-state-board { margin: 2rem 0; padding: 1.5rem; border: 1px solid rgba(149,23,22,.2); border-radius: 8px; background: rgba(255,255,255,.35); }
.style-preview .preview-state-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.25rem; }
.style-preview .preview-state-grid > div { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; min-width: 0; }
.style-preview .preview-state-grid > div > span:first-child { font-size: .85rem; color: var(--slate-shadow); }
.style-preview .preview-state-grid .btn { margin: 0; width: 100%; white-space: normal; font-size: 1rem; padding: .75rem; min-height: 54px; }
.style-preview .preview-button-reference { display: inline-flex; align-items: center; justify-content: center; padding: .75rem; min-height: 54px; width: 100%; border-radius: 12px; color: var(--sandstone-mist); background: var(--bloodwood); font-size: 1rem; line-height: 1.5; }
.style-preview .preview-reference-hover { color: var(--rich-black); background: var(--golden-saffron); }
.style-preview .preview-reference-focus { outline: 3px solid var(--bloodwood); outline-offset: 3px; }
.style-preview .preview-reference-active { background: var(--rich-black); color: var(--golden-saffron); }
.style-preview .preview-loading-button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.style-preview .preview-spinner { flex: 0 0 auto; width: 1rem; height: 1rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: preview-spin .85s linear infinite; }
@keyframes preview-spin { to { transform: rotate(360deg); } }
.style-preview .preview-field-states { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.style-preview .preview-field-focus { box-shadow: 0 0 0 3px rgba(149,23,22,.16); outline: 2px solid var(--bloodwood); outline-offset: 2px; }
.style-preview .preview-field-states .form-group { min-width: 0; }
.style-preview .preview-field-states .valid-feedback, .style-preview .preview-field-states .invalid-feedback { font-size: .9rem; }
.style-preview .preview-spacing-scale { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1rem; margin: 1.5rem 0 2rem; }
.style-preview .preview-spacing-scale > div { min-height: 90px; padding: 1rem; border: 1px solid rgba(149,23,22,.18); border-radius: 6px; background: rgba(255,255,255,.3); }
.style-preview .preview-spacing-scale span:first-child { display: block; font-size: .85rem; margin-bottom: 1rem; }
.style-preview .preview-space-bar { display: block; height: 12px; background: var(--bloodwood); border-radius: 2px; }
.style-preview .preview-form fieldset { min-width: 0; }
.style-preview .preview-form label, .style-preview .preview-field-states label { display: block; margin-bottom: .5rem; font-size: .95rem; font-weight: 600; color: var(--rich-black); }
.style-preview .invalid-feedback { color: #8b1616; }
.style-preview .valid-feedback { color: #185331; }
@media screen and (max-width: 1199.98px) {
  .style-preview .preview-workspace { grid-template-columns: 240px minmax(0,1fr); gap: 1.5rem; }
  .style-preview .preview-state-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .style-preview .preview-swatches { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media screen and (max-width: 991.98px) {
  .style-preview .preview-intro { grid-template-columns: 1fr; gap: 1rem; }
  .style-preview .preview-tools { flex-direction: row; flex-wrap: wrap; padding-top: 0; }
  .style-preview .preview-edition { align-self: center; }
  .style-preview .preview-workspace { grid-template-columns: 1fr; gap: 0; }
  .style-preview .preview-jump { position: static; max-height: none; margin-top: 1rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(149,23,22,.2); }
  .style-preview .preview-nav-label { flex-basis: 100%; }
}
@media screen and (max-width: 575.98px) {
  .style-preview.container { padding-left: 1rem; padding-right: 1rem; }
  .style-preview .preview-intro { padding-bottom: 1rem; }
  .style-preview .preview-tools { flex-direction: column; }
  .style-preview .preview-usage-grid, .style-preview .preview-field-states, .style-preview .preview-state-grid { grid-template-columns: 1fr; }
  .style-preview .preview-swatches, .style-preview .preview-spacing-scale { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .style-preview .preview-docs-header { align-items: flex-start; flex-direction: column; }
  .style-preview .preview-approval-label { width: 100%; justify-content: space-between; }
  .style-preview .preview-code-toolbar { align-items: flex-start; }
  .style-preview .preview-specimen, .style-preview .preview-state-board { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .style-preview .preview-spinner { animation: none; } }
@media print {
  .style-preview.container {
    width: 100%;
    max-width: none;
    padding-inline: 0;
  }
  .style-preview .row { display: block; margin-inline: 0; }
  .style-preview .row > [class*="col-"] {
    max-width: none;
    padding-inline: 0;
  }
  .style-preview .preview-workspace, .style-preview .preview-intro { display: block; }
  .style-preview .preview-jump, .style-preview .preview-tools, .style-preview .preview-copy { display: none !important; }
  .style-preview .preview-code pre { max-height: none; }
  .style-preview .preview-section { break-before: auto; }
  .style-preview .preview-component-docs { break-inside: auto; }
}
.style-preview .preview-component-docs[data-status="approved"] .preview-approval-select { color: #184c30; background-color: #e0ede4; }
.style-preview .preview-component-docs[data-status="needs-refinement"] .preview-approval-select { color: #603d0a; background-color: #f8edcf; }
.style-preview .preview-component-docs[data-status="experimental"] .preview-approval-select { color: #741415; background-color: #f5e2e3; }

.style-preview .preview-tools .btn { margin-top: 0; min-height: 56px; display: inline-flex; align-items: center; justify-content: center; }
.style-preview .preview-loading-button:disabled { opacity: 1; cursor: progress; }

.style-preview .preview-brand { display: flex; align-items: center; flex-wrap: wrap; gap: 1.5rem; }
.style-preview .preview-brand img { object-fit: contain; }
.style-preview .preview-brand > div { flex: 1 1 18rem; }
.style-preview .preview-brand-notes { margin-top: 1.5rem; }
.style-preview .preview-field-inventory {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1rem;
  margin-block: 1rem;
}
.style-preview .preview-field-inventory label { display: block; font-weight: 600; }
.style-preview .preview-field-inventory fieldset { padding: .5rem 1rem; border: 2px solid var(--bloodwood); border-radius: 8px; min-width: 0; }
.style-preview .preview-field-inventory legend { width: auto; padding-inline: .25rem; font-size: 1rem; }
.style-preview .preview-field-inventory input { accent-color: var(--bloodwood); }
.style-preview .gt-field-native { width: 100%; min-height: 44px; }

.style-preview .preview-field-inventory fieldset label {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 34px;
}

.style-preview .preview-field-inventory fieldset input { margin: 0; flex: none; }
.style-preview .preview-field-inventory input[type="radio"]:checked::after {
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
}

.style-preview input[type="file"]::file-selector-button {
  background: var(--bloodwood);
  color: var(--ivory-dust);
  border: 0;
  border-radius: 5px;
  padding: .4rem .65rem;
  margin-inline-end: .6rem;
  font: inherit;
  cursor: pointer;
}
.style-preview input[type="file"]::file-selector-button:hover {
  background: var(--golden-saffron);
  color: var(--rich-black);
}



.style-preview .preview-topic-example {
  background: transparent;
  border: 1px solid var(--bloodwood);
  border-radius: 8px;
  padding: 0;
}
.style-preview .preview-topic-example details {
  background: transparent;
  border: 0;
  border-radius: 0;
  margin: 0;
}
.style-preview .preview-topic-example details + details { border-top: 1px solid var(--bloodwood); }
.style-preview .preview-topic-example summary { background: transparent; padding: .85rem 1rem; }
.style-preview .preview-topic-example details[open] { background: var(--peach-linen); }
.style-preview .preview-topic-example details[open] ul { margin: 0; padding: .25rem 1rem 1rem 2rem; }

.style-preview .preview-topic-example details { max-width: none; }
.style-preview .preview-topic-example summary { border: 0; text-align: start; }
.style-preview .preview-topic-example details[open] ul { background: transparent; border: 0; }

/* Keep the two highlight specimens and their captions aligned. */
.style-preview #highlights .row > .col-lg-6 {
  display: flex;
  flex-direction: column;
}
.style-preview #highlights .case-highlights,
.style-preview #highlights .case-highlights-card {
  flex: 1;
  margin: 0 0 1rem;
}

.style-preview #previewFaq .card,
.style-preview #previewFaq .card-header {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}
.style-preview #previewFaq .card-body {
  background: var(--peach-linen);
}

.preview-stepper { position: relative; }
.preview-stepper:has(.preview-stepper-buttons:not([hidden])) input { padding-inline-end: 3rem; appearance: textfield; }
.preview-stepper:has(.preview-stepper-buttons:not([hidden])) input::-webkit-inner-spin-button { appearance: none; }
.preview-stepper-buttons:not([hidden]) {
  position: absolute;
  inset: 4px 4px 4px auto;
  display: grid;
  width: 2.25rem;
}
.preview-stepper-buttons button {
  display: grid;
  place-items: center;
  border: 0;
  background: var(--peach-linen);
  color: var(--bloodwood);
  line-height: 1;
}
.preview-stepper-buttons button:first-child::after { transform: rotate(225deg); }
.preview-stepper-buttons button:hover,
.preview-stepper-buttons button:active { background: var(--golden-saffron); color: var(--rich-black); }

.style-preview #inventory-color {
  border: 2px solid var(--bloodwood);
  border-radius: 8px;
  padding: 4px;
  background: var(--peach-linen);
}

.style-preview #inventory-range {
  --priority-fill: var(--bloodwood);
  appearance: none;
  background: transparent;
  cursor: pointer;
}
.style-preview #inventory-range:active { --priority-fill: var(--golden-saffron); }
.style-preview #inventory-range::-webkit-slider-runnable-track {
  height: 10px;
  border: 2px solid var(--bloodwood);
  border-radius: 999px;
  background: linear-gradient(to right, var(--priority-fill) var(--priority-position, 50%), var(--peach-linen) var(--priority-position, 50%));
}
.style-preview #inventory-range::-moz-range-track {
  height: 6px;
  border: 2px solid var(--bloodwood);
  border-radius: 999px;
  background: linear-gradient(to right, var(--priority-fill) var(--priority-position, 50%), var(--peach-linen) var(--priority-position, 50%));
}
.style-preview #inventory-range::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border: 2px solid var(--bloodwood);
  border-radius: 50%;
  background: var(--priority-fill);
}
.style-preview #inventory-range::-moz-range-thumb {
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  border: 2px solid var(--bloodwood);
  border-radius: 50%;
  background: var(--priority-fill);
}

.style-preview #highlights .case-highlights {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.style-preview .preview-color-label {
  display: block;
  font-weight: 600;
  margin-bottom: .5rem;
}
.style-preview .preview-color-panel {
  grid-template-columns: minmax(0, 1fr);
  background: var(--peach-linen);
}
.style-preview .preview-color-panel label { margin: 0; }

.style-preview .insights-nav .insights-directory-link--reflections {
  border-width: 2px;
}

.style-preview .preview-topic-example { border-width: 2px; }
.style-preview .preview-topic-example > details { margin: 0 !important; }
.style-preview .preview-topic-example > details + details {
  border-top: 1px solid var(--bloodwood) !important;
}

.preview-print-masthead { display: none; }
.preview-brand-notes { max-width: 70ch; }
.preview-coordinate {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  padding: .6rem 0;
  border-block: 1px solid var(--bloodwood);
}

@media print {
  @page {
    @bottom-center {
      content: "Gyata Tabiri Style Guide  ·  gtabiri.com  ·  " counter(page);
      width: 100%;
      border-top: .35pt solid #aaa;
      color: #666;
      font: 400 8pt "Source Sans 3", sans-serif;
      vertical-align: top;
      padding-top: 3mm;
    }
  }
  @page :first {
    @bottom-center { content: none; border: 0; }
  }
  .preview-print-masthead {
    display: block;
    text-align: center;
    padding-top: 36mm;
    break-after: page;
  }
  .preview-print-masthead img {
    width: 84mm;
    max-width: 65%;
    height: auto;
    margin-bottom: 10mm;
  }
  .preview-print-name {
    font: 600 36pt/1.1 "Source Serif 4", Georgia, serif;
    color: var(--bloodwood);
    margin: 0 0 4mm;
    text-wrap: balance;
  }
  .preview-print-date { font-size: 11pt; }
  .style-preview .preview-catalogue > .preview-section[id] {
    break-before: page;
    border-top: .75pt solid var(--bloodwood);
    padding-top: 6mm;
  }
  .style-preview .preview-catalogue > #brand { break-before: auto; }
  .style-preview .preview-brand {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 8mm;
    padding-block: 4mm;
  }
  .style-preview .preview-brand img {
    width: 100%;
    max-width: 62mm;
    height: auto;
    justify-self: start;
  }
  .style-preview .preview-brand > div {
    border-left: .5pt solid #b9a89e;
    padding-left: 5mm;
  }
  .style-preview .preview-intro { display: none; }
  .style-preview #brand { border-top: 1px solid var(--bloodwood); }
  .style-preview .preview-brand-notes { max-width: none; }
  .style-preview #brand p { max-width: none; }
  .style-preview .preview-brand,
  .style-preview .preview-coordinate { break-inside: avoid; }
  .style-preview .preview-specimen { break-inside: auto; padding: 5mm; }
  .style-preview .preview-section { padding-block: 4mm; }
  .style-preview .preview-eyebrow { break-after: avoid; }
  .style-preview .preview-project-image { max-width: 100mm; }
  .style-preview .preview-code pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: 4mm; }
}

/* Use a second column only when the reading area can hold two readable measures. */
@media screen {
  .style-preview .preview-catalogue { container-type: inline-size; }

  @container (min-width: 62rem) {
    .style-preview .preview-full-text {
      max-width: none;
      column-count: 2;
      column-gap: 2.5rem;
    }

    .style-preview .preview-brand-notes h3,
    .style-preview .preview-full-text h4 { break-after: avoid; }
    .style-preview .preview-brand-notes p,
    .style-preview .preview-full-text p { orphans: 3; widows: 3; }
    .style-preview .preview-coordinate { break-inside: avoid; }
  }
}

/* Paper keeps the reference material; live demonstrations stay on the web. */
.preview-print-online { display: none; }
@media print {
  .style-preview .preview-interactive-demo { display: none !important; }
  .style-preview .preview-print-online {
    display: block;
    margin: 4mm 0 6mm;
    padding: 4mm 5mm;
    border-left: 2px solid var(--golden-saffron);
    background: transparent;
    color: var(--rich-black);
    break-inside: avoid;
    overflow-wrap: anywhere;
  }
  .style-preview .preview-print-online a { color: inherit; text-decoration: underline; }
  .style-preview .preview-print-online a::after { content: none !important; }
}

/* Editorial structure: meaningful groups, rather than automatic column fragments. */
.style-preview .preview-brand-column { min-width: 0; }
.style-preview .preview-brand-column > :first-child { margin-top: 0; }
.style-preview .preview-pattern-badge {
  display: inline-block;
  padding: .3rem .65rem;
  border-left: 3px solid var(--golden-saffron);
  border-radius: 3px;
  background: var(--slate-shadow);
  color: var(--peach-linen);
  font-weight: 600;
  white-space: nowrap;
}
@media print {
  .style-preview .preview-pattern-badge {
    background: transparent;
    color: var(--rich-black);
  }
}
.style-preview #sample-a > .case-highlights-card {
  width: min(100%, 46rem);
  margin-inline: 0;
  padding: 1.5rem;
}
.style-preview #sample-a .highlights-inner { max-width: none; margin: 0; }
.style-preview .preview-docs-label { color: var(--midnight-indigo); }
.style-preview .preview-implementation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 2rem;
  align-items: start;
}
.style-preview .preview-implementation-map {
  margin: 0;
  padding: 1.25rem;
  background: var(--sandstone-mist);
  border-left: 3px solid var(--lagoon-blue);
}
.style-preview .preview-implementation-map figcaption { font-weight: 600; color: var(--rich-black); margin-bottom: 1rem; }
.style-preview .preview-implementation-map ol { padding-left: 1.3rem; margin: 0; }
.style-preview .preview-implementation-map li { padding-left: .25rem; margin-bottom: .65rem; }
.style-preview .preview-implementation-map li:last-child { margin-bottom: 0; }
.style-preview .preview-implementation-map li span { display: block; font-size: .9rem; }
.style-preview .preview-implementation-layout .preview-usage-grid { grid-template-columns: 1fr; gap: .75rem; }
@media screen {
  @container (min-width: 62rem) {
    .style-preview .preview-brand-notes {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 2.5rem;
      max-width: none;
      column-count: auto;
    }
  }
}
@media (max-width: 767px) {
  .style-preview .preview-implementation-layout { grid-template-columns: 1fr; gap: 1.25rem; }
}
@media print {
  .style-preview .preview-full-text,
  .style-preview .preview-disclosure-body { max-width: none; width: 100%; column-count: auto; }
  .style-preview .preview-pattern-badge { border: .5pt solid #b9a89e; border-left: 2pt solid var(--golden-saffron); padding: 2mm 3mm; }
  .style-preview .preview-component-docs { margin-top: 6mm; }
  .style-preview .preview-docs-header { break-after: avoid; margin-bottom: 3mm; }
  .style-preview .preview-implementation-layout { display: grid; grid-template-columns: 1fr 1.3fr; gap: 6mm; break-inside: avoid; }
  .style-preview .preview-implementation-map { background: transparent; border: .5pt solid #b9a89e; border-left: 2pt solid var(--lagoon-blue); padding: 4mm; }
  .style-preview .preview-implementation-map figcaption { font-size: 10pt; }
  .style-preview .preview-implementation-map li span { font-size: 9pt; }
  .style-preview .preview-implementation-layout .preview-usage-grid { display: block; }
  .style-preview #sample-b .preview-disclosure-body,
  .style-preview #sample-c .preview-full-text { display: none !important; }
  .style-preview details.preview-code { background: transparent !important; border: .5pt solid #b9a89e !important; break-inside: auto; }
  .style-preview details.preview-code > summary { background: transparent !important; color: var(--rich-black) !important; padding: 3mm 4mm; break-after: avoid; }
  .style-preview .preview-code-toolbar { color: #4a4a4a; border-top: .5pt solid #b9a89e; padding: 2mm 4mm; break-after: avoid; }
  .style-preview .preview-code pre { background: transparent !important; color: #010b13 !important; margin: 0; orphans: 4; widows: 4; }
  .style-preview .preview-code pre code { color: #010b13 !important; font-size: 8.5pt; line-height: 1.45; }
  .style-preview .preview-code > summary::after { content: none !important; }
  .style-preview .preview-section h2,
  .style-preview .preview-section h3,
  .style-preview .preview-section h4 { break-after: avoid; }
}

@media print {
  .style-preview .preview-disclosure-action,
  .style-preview .preview-online-recipes,
  .style-preview .preview-sample-context,
  .style-preview #sample-a > .preview-caption { display: none !important; }
  .style-preview #sample-b,
  .style-preview #sample-c { break-inside: avoid; }
  .style-preview .preview-code pre { break-inside: auto; }
}

/* A range control has its own track; do not give focus a rectangular field skin. */
.style-preview #inventory-range:focus {
  background: transparent !important;
  box-shadow: none;
}
.style-preview #inventory-range:focus:not(:focus-visible) { outline: none; }

/* Identity applications use the same artwork, type and palette as the guide. */
.style-preview .identity-artwork-note {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--sandstone-mist);
  border-left: 3px solid var(--golden-saffron);
}
.style-preview .identity-artwork-note img { flex: none; }
.style-preview .identity-application { margin-top: 2.5rem; }
.style-preview .identity-application figure { margin: 0 0 1rem; }
.style-preview .identity-application figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.style-preview .identity-application figcaption {
  margin-top: .75rem;
  color: var(--slate-shadow);
}
.style-preview .identity-paper-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  margin: 1rem 0;
}
.style-preview .identity-letter-example,
.style-preview .identity-envelope-example {
  padding: 1.25rem;
  background: white;
  border: 1px solid var(--cloud-veil);
  color: var(--rich-black);
}
.style-preview .identity-letter-example { text-align: center; }
.style-preview .identity-letter-example > :is(strong, small) { display: block; }
.style-preview .identity-letter-example strong { color: var(--bloodwood); }
.style-preview .identity-letter-example p { text-align: left; margin: .85rem 0; }
.style-preview .identity-letter-example small:last-child {
  padding-top: .5rem;
  border-top: 1px solid var(--cloud-veil);
}
.style-preview .identity-envelope-example {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  min-height: 9rem;
  font-size: .85rem;
}
@media screen and (max-width: 575px) {
  .style-preview .identity-paper-pair { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  .style-preview .identity-artwork-note { background: transparent; break-inside: avoid; }
  .style-preview .identity-application { margin-top: 5mm; break-inside: avoid; }
  .style-preview .identity-application + .identity-application { break-before: page; }
  .style-preview .identity-application figure img { border-radius: 0; }
  .style-preview .identity-application figcaption { font-size: 10pt; }
  .style-preview .identity-paper-pair { break-inside: avoid; }
  .style-preview .identity-letter-example,
  .style-preview .identity-envelope-example { padding: 4mm; }
}

.style-preview .identity-logo-specimen {
  margin: 1rem 0 1.5rem;
  padding: 1rem;
  text-align: center;
  background: var(--sandstone-mist);
}
.style-preview .identity-logo-specimen figcaption { margin-top: .5rem; }
@media print {
  .style-preview .identity-logo-specimen {
    background: transparent;
    break-inside: avoid;
  }
}

.style-preview .preview-print-contents { display: none; }

.style-preview #logo-misuse { scroll-margin-top: 100px; }
@media print {
  .style-preview .preview-print-contents {
    display: block;
    break-after: page;
    padding-top: 6mm;
    border-top: .75pt solid var(--bloodwood);
  }
  .style-preview .preview-contents-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3mm 7mm;
  }
  .style-preview .preview-contents-grid h3 { font-size: 11pt; }
  .style-preview .preview-contents-grid ul { margin: 0; padding-left: 4mm; }
  .style-preview .preview-contents-grid li { font-size: 10pt; }
  .style-preview .preview-catalogue > #overview { break-before: auto; }
  .style-preview .preview-catalogue > #brand { break-before: page; }
}

.style-preview .identity-logo-specimen img { width: 50%; height: auto; }
.style-preview .identity-monochrome {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
  background: white;
  color: var(--rich-black);
}
.style-preview .identity-monochrome p { flex: 1 1 14rem; margin: 0; }
.style-preview .identity-usage-note {
  padding: 1rem;
  margin-block: 1.5rem;
  border-left: 3px solid var(--golden-saffron);
}
.style-preview #typography .preview-type {
  padding-block: .85rem;
  border-top: 1px solid rgba(149, 23, 22, .24);
  break-inside: avoid;
}
@media screen and (max-width: 767px) {
  .style-preview .identity-logo-specimen img { width: 100%; }
}
@media print {
  .style-preview .identity-monochrome,
  .style-preview .identity-usage-note { break-inside: avoid; }
}

.style-preview .identity-logo-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.style-preview .identity-logo-pair .identity-logo-specimen img { width: 100%; }
.style-preview .identity-logo-pair .identity-mark-specimen img { width: 58%; }
@media screen and (max-width: 767px) {
  .style-preview .identity-logo-pair { grid-template-columns: minmax(0, 1fr); }
}

.style-preview .preview-color-values { margin: .75rem 0 0; }
.style-preview .preview-color-values dt { font-size: .875rem; }
.style-preview .preview-color-values dd { margin: 0 0 .55rem; }
.style-preview .preview-color-values code { overflow-wrap: anywhere; }
.style-preview .preview-palette-explainer { margin-block: 2rem; }
@media print {
  .style-preview .preview-color-values dt,
  .style-preview .preview-color-values dd { font-size: 9pt; }
}

.style-preview #palette .preview-swatches {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.style-preview #palette .preview-color { height: 4.5rem; }
.style-preview .preview-color-values {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: .3rem .75rem;
}
.style-preview .preview-color-values dd { margin: 0; }
.style-preview .preview-color-values dt:nth-of-type(4),
.style-preview .preview-color-values dd:nth-of-type(4),
.style-preview .preview-color-values dt:nth-of-type(6),
.style-preview .preview-color-values dd:nth-of-type(6) {
  border-top: 1px solid var(--cloud-veil);
  padding-top: .45rem;
  margin-top: .2rem;
}
@media screen and (max-width: 767px) {
  .style-preview #palette .preview-swatches { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  .style-preview #palette .preview-swatches { gap: 4mm; }
  .style-preview #palette .preview-color { height: 10mm; }
  .style-preview #palette .preview-swatch > div:last-child { padding: 2.5mm; }
  .style-preview .preview-color-values { gap: 1mm 2mm; }
}

.style-preview .preview-swatch-pair { display: contents; }
@media print {
  .style-preview #palette .preview-swatches { display: block; }
  .style-preview .preview-swatch-pair {
    display: flex;
    gap: 4mm;
    margin-bottom: 4mm;
    break-inside: avoid;
  }
  .style-preview .preview-swatch-pair > .preview-swatch {
    flex: 1 1 0;
    min-width: 0;
  }
  .style-preview .preview-swatch-pair:nth-child(4) { break-before: page; }
}

.style-preview .preview-mark-scales {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-block: 1.5rem;
}
.style-preview .preview-mark-scales figure {
  display: grid;
  grid-template-rows: 1fr auto;
  flex: 1 0 calc(var(--specimen-width, 96px) + 1rem + 2px);
  min-width: 0;
  margin: 0;
  padding: .5rem;
  border: 1px solid var(--cloud-veil);
  border-radius: 6px;
  text-align: center;
  background: var(--sandstone-mist);
}
.style-preview .preview-mark-scales figure > div {
  display: grid;
  min-height: 96px;
  place-items: center;
  margin-bottom: .5rem;
}
.style-preview .preview-mark-scales figcaption {
  padding-top: .5rem;
  border-top: 1px solid var(--cloud-veil);
}
.style-preview .preview-voice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-block: 1.5rem;
}
.style-preview .preview-voice-example {
  padding: 1rem;
  border-top: 2px solid var(--golden-saffron);
  background: var(--sandstone-mist);
  break-inside: avoid;
}
.style-preview .preview-voice-example h3 { font-size: 1.2rem; }
.style-preview .preview-voice-example p:last-child { margin-bottom: 0; }
@media screen and (max-width: 767px) {
  .style-preview .preview-voice-grid { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  .style-preview .preview-mark-scales,
  .style-preview .preview-voice-grid { break-inside: avoid; }
  .style-preview .preview-mark-scales figure,
  .style-preview .preview-voice-example { background: transparent; }
}

@media screen {
  .style-preview .preview-intro {
    align-items: center;
    padding: clamp(1rem, 4vw, 3rem);
    margin-bottom: 1.5rem;
    background: var(--peach-linen);
    border-top: 3px solid var(--bloodwood);
    border-radius: 0 0 12px 12px;
  }
  .style-preview .preview-intro {
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.2fr);
    gap: clamp(1.5rem, 3vw, 3rem);
  }
  .style-preview .preview-intro .preview-tools {
    flex-direction: row;
    align-items: center;
    padding-top: .5rem;
  }
  .style-preview .preview-intro .preview-edition {
    margin: 1rem 0 0;
    text-align: start;
  }
  .style-preview .preview-intro-feature { margin: 0; }
  .style-preview .preview-intro-feature img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
  }
  .style-preview .preview-intro-feature figcaption {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .25rem 1rem;
    margin-top: .65rem;
    padding-top: .65rem;
    border-top: 1px solid var(--clay-rose);
    font-size: .9rem;
  }
  .style-preview #on-the-road { scroll-margin-top: 100px; }
}
@media screen and (max-width: 991px) {
  .style-preview .preview-intro { grid-template-columns: minmax(0, 1fr); }
}
.style-preview .identity-logo-pair .identity-logo-specimen {
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  align-items: center;
}
.style-preview .identity-logo-pair figcaption,
.style-preview .identity-application figcaption {
  align-self: start;
  width: 100%;
  padding-top: .65rem;
  border-top: 1px solid var(--cloud-veil);
}

@media (min-width: 768px) {
  .style-preview .identity-logo-pair .identity-logo-specimen {
    grid-row: span 2;
    grid-template-rows: subgrid;
    row-gap: .5rem;
  }
}

.style-preview .preview-reading-teaser { display: none; }
@media screen {
  .style-preview .preview-reading-teaser:has(+ button[aria-expanded="false"]:not([hidden])),
  .style-preview .preview-disclosure:not([open]) .preview-reading-teaser {
    display: block;
    margin: 1rem 0 .8rem;
    padding-top: .7rem;
    border-top: 1px solid var(--clay-rose);
    color: var(--slate-shadow);
  }
  .style-preview .preview-reading-teaser span {
    display: block;
    height: .7em;
    overflow: hidden;
    line-height: 1.05;
    white-space: nowrap;
    mask-image: linear-gradient(to bottom, #000 30%, transparent);
  }
}

@media print {
  .style-preview #sample-a .preview-full-text { margin-top: 4mm; }
  .style-preview #sample-a .preview-full-text h4 { margin: 4mm 0 2mm; }
}
