/* Platform-owned presets. Merchant content never injects CSS or markup. */
/* Three authored structures; the platform sections keep a fixed reading order. */
.brand-custom :is(h1,h2,h3,p,a,dt,dd) { overflow-wrap: anywhere; }
.brand-custom .page-title { max-width: 18ch; font-size: clamp(34px,4vw,60px); letter-spacing: -.04em; text-wrap: balance; }
.brand-custom .brand-masthead { border-radius: 16px; padding: clamp(24px,4vw,56px); }
.brand-custom .brand-mast-copy > .btn { margin-top: 24px; }
.brand-custom .brand-banner { aspect-ratio: 4 / 3; }
.brand-identity-initial { display: grid; place-items: center; width: 80px; height: 80px; margin-bottom: 20px; border-radius: 14px; background: var(--tud-color-bg-surface); font-size: 40px; font-weight: 800; }
.brand-cover { position: relative; padding-bottom: 0; }
.brand-cover > :is(.brand-banner,.brand-mast-panel) { width: 100%; max-width: none; height: 420px; aspect-ratio: auto; border-radius: 16px 16px 0 0; }
.brand-cover > .brand-mast-panel img { height: 85%; object-fit: contain; }
.brand-cover-caption { position: relative; margin-top: -80px; padding: 0 clamp(24px,4vw,56px) 36px; background: var(--brand-tone); border-radius: 0 0 16px 16px; }
.brand-cover-identity { display: flex; align-items: flex-end; gap: 16px; transform: translateY(-28px); font-size: 18px; font-weight: 700; }
.brand-cover-identity :is(.brand-identity-logo,.brand-identity-initial) { width: 96px; height: 96px; margin: 0; flex-shrink: 0; }
.brand-cover-caption .page-title { max-width: 24ch; }
.brand-cover-caption .lede { max-width: 60ch; }
.brand-cover-caption > .btn { margin-top: 24px; }
.brand-compact-header { display: grid; grid-template-columns: 64px minmax(0,1fr) auto; gap: 24px; align-items: center; padding-block: 24px; border-block: 1px solid var(--tud-color-border-strong); }
.brand-custom .brand-compact-header :is(.brand-identity-logo,.brand-identity-initial) { width: 64px; height: 64px; margin: 0; }
.brand-compact-header .brand-chips { margin-top: 12px; }
.brand-compact-header .brand-external-links { padding: 0; gap: 16px; }
.brand-layout-compact .brand-compact-header .page-title { font-size: clamp(28px,3vw,40px); }
.brand-compact-story { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 48px; align-items: start; }
.brand-compact-story .brand-section-title { margin: 0; }
.brand-compact-story .lede { grid-column: 1; margin: 0; }
.brand-compact-story > :is(.brand-banner,.brand-mast-panel) { grid-column: 2; grid-row: 1 / span 2; max-width: 100%; height: 260px; }
.brand-highlights { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 32px; margin-top: 24px; padding-block: 24px; border-block: 1px solid var(--tud-color-border-strong); }
.brand-highlights dt { font-size: 21px; font-weight: 700; }
.brand-highlights dd { margin: 12px 0 0; color: var(--tud-color-text-secondary); line-height: 1.6; }
.brand-gallery { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 16px; scroll-snap-type: x proximity; }
.brand-gallery figure { flex: 0 0 calc((100% - 40px) / 3); margin: 0; scroll-snap-align: start; }
.brand-gallery img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--brand-tone); }
.brand-preview-empty { padding: 32px; border: 1px dashed var(--tud-color-border-strong); }
@media (max-width: 800px) {
  .brand-compact-header { grid-template-columns: 64px minmax(0,1fr); gap: 16px; }
  .brand-compact-header .brand-external-links { grid-column: 1 / -1; }
  .brand-cover > :is(.brand-banner,.brand-mast-panel) { height: 320px; }
  .brand-gallery figure { flex-basis: 70%; }
}
@media (max-width: 600px) {
  .brand-cover > :is(.brand-banner,.brand-mast-panel) { height: 260px; }
  .brand-cover-caption { margin-top: -24px; padding: 0 24px 28px; }
  .brand-cover-identity :is(.brand-identity-logo,.brand-identity-initial) { width: 72px; height: 72px; }
  .brand-compact-story { grid-template-columns: 1fr; }
  .brand-compact-story > :is(.brand-banner,.brand-mast-panel) { grid-column: 1; grid-row: auto; height: 220px; }
  .brand-highlights { grid-template-columns: 1fr; gap: 24px; }
}
.brand-custom { --brand-tone: var(--tud-color-deal-panel-1); }
.brand-custom[data-brand-palette="peach"] { --brand-tone: var(--tud-color-deal-panel-1); }
.brand-custom[data-brand-palette="pink"] { --brand-tone: var(--tud-color-deal-panel-3); }
.brand-custom[data-brand-palette="mint"] { --brand-tone: var(--tud-color-deal-panel-2); }
.brand-custom[data-brand-palette="blue"] { --brand-tone: var(--tud-color-deal-panel-5); }
.brand-custom[data-brand-palette="yellow"] { --brand-tone: var(--tud-color-deal-panel-0); }
.brand-custom[data-brand-palette="lime"] { --brand-tone: var(--tud-color-deal-panel-4); }
.brand-custom .brand-masthead { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; padding: 32px; border-radius: 24px; background: var(--brand-tone); }
.brand-custom .brand-mast-copy { min-width: 0; }
.brand-custom .brand-mast-panel { width: 100%; max-width: 340px; aspect-ratio: 1; height: auto; justify-self: center; }
.brand-banner { min-width: 0; overflow: hidden; border-radius: 16px; aspect-ratio: 8 / 5; background: var(--tud-color-bg-sunken); }
.brand-banner > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-custom .brand-identity-logo { display: block; width: 80px; height: 80px; padding: 8px; object-fit: contain; background: var(--tud-color-bg-surface); border-radius: 14px; margin-bottom: 20px; }
.brand-external-links { display: flex; flex-wrap: wrap; gap: 24px; padding-top: 16px; }
.brand-external-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.brand-layout-spotlight .brand-masthead { grid-template-columns: 1fr; gap: 28px; }
.brand-layout-spotlight .brand-banner, .brand-layout-spotlight .brand-mast-panel { order: -1; max-width: none; aspect-ratio: 3 / 1; }
.brand-layout-spotlight .brand-mast-copy { max-width: 760px; }
.brand-layout-compact .brand-masthead { grid-template-columns: 1fr 180px; gap: 24px; padding: 24px; }
.brand-layout-compact .brand-banner { aspect-ratio: 1; }
.brand-layout-compact .page-title { font-size: clamp(30px, 3.2vw, 44px); }
.brand-layout-compact .brand-mast-detail { display: none; }
.brand-layout-compact .brand-identity-logo { width: 56px; height: 56px; margin-bottom: 12px; }
.deal-panel > img.brand-offer-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.brand-about p { white-space: pre-line; overflow-wrap: anywhere; }
.brand-custom .brand-mast-panel { display: grid; grid-template-rows: minmax(0,1fr); }
.brand-custom .brand-mast-panel > .theme-art { min-height: 0; }
.brand-custom .brand-tiles { grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); }
.brand-custom .brand-banner, .brand-custom .brand-gallery img, .brand-custom .brand-identity-logo { background: var(--tud-color-ramp-neutral-50); }
.brand-custom .brand-banner > img, .brand-custom .brand-gallery img { object-fit: contain; }
.brand-cover > .brand-banner > img { height: calc(100% - 80px); }
@media (max-width: 600px) {
  .brand-cover > .brand-banner > img { height: calc(100% - 24px); }
  .brand-custom .brand-masthead { grid-template-columns: 1fr; padding: 22px; gap: 24px; }
  .brand-custom .brand-mast-panel { max-width: 240px; }
  .brand-layout-spotlight .brand-banner { aspect-ratio: 8 / 5; }
  .brand-layout-spotlight .brand-mast-panel { max-width: none; aspect-ratio: 8 / 5; }
  .brand-layout-compact .brand-masthead { grid-template-columns: minmax(0, 1fr) 76px; gap: 12px; padding: 18px; }
  .brand-layout-compact .page-title { font-size: 28px; }
  .brand-layout-compact .brand-mast-copy .lede { font-size: 16px; }
  .brand-layout-compact .brand-chips { grid-column: 1 / -1; }
}
