/* Live interface demos: the stages and samples used on /resources/why-design-matters/ and /website-design/.
   The effects come from fx-kit (src/static/assets/fx-kit.*). These rules only dress the samples.
   Light by default. The Why design matters page switches the --dd-* tokens for dark appearance;
   the Website Design page stays light, like the rest of its colour field.
   Page stylesheets load before editorial.css and brand.css, so selectors carry .dd to win. */

.dd{--dd-stage:#fff;--dd-ink:#171816;--dd-muted:#5f5b5d;--dd-line:rgb(23 24 22 / .14);--dd-soft:#f1eeea;--dd-accent:#622338;
  /* Words waiting to light up stay above AA contrast, so the effect never costs legibility. */
  --fx-faint:.62}

/* ---- the stage ---- */
.dd .dd-stage{position:relative;display:grid;place-items:center;align-content:center;gap:18px;min-height:300px;padding:48px 32px;box-sizing:border-box;border:1px solid var(--dd-line);border-radius:20px;background:var(--dd-stage);color:var(--dd-ink);overflow:hidden;isolation:isolate;text-align:left}
.dd .dd-stage :is(p,h4){margin:0;max-width:none;color:inherit}
.dd .dd-replay{position:absolute;top:12px;right:12px;z-index:3;display:inline-flex;align-items:center;gap:6px;min-height:34px;margin:0;padding:6px 14px;border:1px solid var(--dd-line);border-radius:100px;background:var(--dd-stage);color:var(--dd-ink);font:500 12px/1 Inter,Arial,sans-serif;letter-spacing:0;box-shadow:none;cursor:pointer;transition:border-color .2s}
.dd .dd-replay:hover{border-color:currentColor;background:var(--dd-stage);color:var(--dd-ink)}
.dd .dd-replay[hidden]{display:none}
.dd .dd-stage .dd-caption{font:400 13px/1.5 Inter,Arial,sans-serif;color:var(--dd-muted);text-align:center;max-width:44ch;justify-self:center}
.dd .dd-caption a{color:inherit;text-decoration:underline;text-underline-offset:3px}
.dd .dd-hover-only{display:none}
@media (hover:hover) and (pointer:fine){.dd .dd-hover-only{display:block}.dd .dd-touch-only{display:none}}

/* ---- masked headline ---- */
.dd .dd-stage .dd-mask{justify-self:start;font:500 clamp(40px,4.4vw,64px)/1.02 Aventa,Arial,sans-serif;letter-spacing:-.055em;text-wrap:wrap}

/* ---- words light up, still highlights, rotating line, link feedback ---- */
.dd .dd-stage :is(.dd-highlight,.dd-marker,.dd-rotate-line,.dd-link-feedback){font-family:Aventa,Arial,sans-serif;font-weight:500;letter-spacing:-.035em}
.dd .dd-stage .dd-highlight{font-size:clamp(22px,2.1vw,30px);line-height:1.3;max-width:24ch}
.dd .dd-stage .dd-marker{font-size:clamp(24px,2.3vw,32px);line-height:1.35;max-width:21ch}
.dd .dd-marker mark{color:inherit;background:color-mix(in srgb,var(--dd-accent) 14%,transparent);padding:0 .08em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.dd .dd-stage .dd-rotate-line{font-size:clamp(28px,2.8vw,40px);line-height:1.2;max-width:none}
.dd .dd-rotate{color:var(--dd-accent)}
.dd .dd-rotate:not(.fx-on)>*+*::before{content:" / ";color:var(--dd-ink)}
.dd .dd-stage .dd-link-feedback{font-size:clamp(24px,2.3vw,32px);line-height:1.45;max-width:24ch}
.dd .dd-link-feedback a{color:inherit;text-decoration-line:underline;text-decoration-thickness:1px;text-underline-offset:.2em}
.dd .dd-link-feedback a:is(:hover,:focus-visible){color:var(--dd-accent)}

/* ---- before and after ----
   At rest the handle sits halfway, so each panel keeps its story in the half that shows:
   the crowded page on the left, the designed one on the right. Dragging reveals the rest. */
.dd .dd-compare{width:100%;max-width:560px;border-radius:14px;overflow:hidden;box-shadow:0 22px 44px -28px rgb(23 24 22 / .55)}
.dd .dd-compare:not(.fx-on){display:grid;gap:10px;overflow:visible;box-shadow:none}
.dd .dd-page{position:relative;display:flex;height:270px;box-sizing:border-box;overflow:hidden;line-height:1.3}
/* The kit sets display:block on the first panel, which suits images. These panels are layouts. */
.dd .dd-compare.fx-on>.dd-page-before,.dd .dd-page-before{display:flex}
.dd .dd-page-before{align-items:stretch;background:#f4f4f2;color:#1b1b1b;font-family:"Times New Roman",Times,serif;text-align:center}
.dd .dd-b-col{display:flex;flex:0 0 50%;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:40px 14px 18px;box-sizing:border-box}
.dd .dd-b-side{border-left:3px double #8a1c1c;background:#fffbe6}
.dd .dd-b-title{font-size:19px;font-weight:700;letter-spacing:.02em;line-height:1.15;color:#1a3a8a}
.dd .dd-b-stars{font-size:12px;color:#8a1c1c}
.dd .dd-b-body{font-size:12.5px;max-width:30ch}
.dd .dd-b-link{font:700 13px Arial,sans-serif;color:#0000cc;text-decoration:underline}
.dd .dd-b-offer{padding:6px 10px;border:2px dashed #8a1c1c;font:700 16px Arial,sans-serif;color:#8a1c1c}
.dd .dd-page-after{align-items:stretch;background:#f1eeea;color:#171816;font-family:Inter,Arial,sans-serif}
.dd .dd-a-art{position:relative;flex:0 0 50%}
.dd .dd-a-art i{position:absolute;border-radius:50%}
.dd .dd-a-art i:nth-child(1){width:64%;aspect-ratio:1;left:10%;top:12%;background:#e9dce0}
.dd .dd-a-art i:nth-child(2){width:52%;aspect-ratio:1;left:34%;bottom:6%;background:#e5ec81}
.dd .dd-a-art i:nth-child(3){width:20%;aspect-ratio:1;left:30%;top:38%;background:#622338}
.dd .dd-a-copy{display:flex;flex:0 0 50%;flex-direction:column;align-items:flex-start;justify-content:center;gap:10px;min-width:0;padding:30px 18px 18px 24px;box-sizing:border-box}
.dd .dd-a-label{font-size:11px;font-weight:500;letter-spacing:.06em;text-transform:uppercase;color:#5f5b5d}
.dd .dd-a-title{font:500 clamp(22px,2.3vw,30px)/1.02 Aventa,Arial,sans-serif;letter-spacing:-.05em}
.dd .dd-a-body{font-size:13px;color:#3c3a3b}
.dd .dd-a-button{margin-top:6px;padding:9px 15px;border-radius:100px;background:#622338;color:#fff;font-size:12px;font-weight:500}
.dd .dd-chip{position:absolute;top:12px;left:12px;padding:4px 10px;border-radius:100px;background:#171816;color:#fff;font:500 11px/1.4 Inter,Arial,sans-serif;letter-spacing:.02em;text-transform:none}
.dd .dd-chip-after{left:auto;right:12px;background:#622338}
/* The handle's focus ring sits on the light page samples, so it is drawn in ink. */
.dd .dd-compare:has(.fx-cmp-range:focus-visible) .fx-cmp-handle::after{outline-color:#171816}
@media (max-width:540px){
  .dd .dd-page{height:250px}
  .dd .dd-b-col{padding:38px 8px 12px}
  .dd .dd-b-title{font-size:15px}
  .dd .dd-b-body{font-size:11px}
  .dd .dd-b-offer{font-size:13px}
  .dd .dd-a-copy{padding:34px 10px 12px 14px}
  .dd .dd-a-title{font-size:20px}
  .dd .dd-a-body{font-size:12px}
  .dd .dd-a-button{padding:8px 11px;font-size:11px}
}

/* ---- numbers ---- */
.dd .dd-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:28px;width:100%;max-width:480px}
.dd .dd-stage .dd-stat{display:flex;flex-direction:column;align-items:flex-start;gap:10px}
.dd .dd-odo{font:500 clamp(46px,5vw,72px)/1.15 Aventa,Arial,sans-serif;letter-spacing:-.05em;color:var(--dd-ink)}
/* A space inside the rolling number would otherwise collapse to nothing. */
.dd .dd-odo.fx-on>span:not(.fx-odo-col){white-space:pre}
.dd .dd-stat-label{font:400 14px/1.45 Inter,Arial,sans-serif;color:var(--dd-muted);max-width:22ch}

/* ---- names strip ---- */
.dd .dd-stage-marquee{padding-inline:0}
.dd .dd-marquee{width:100%}
.dd .dd-marquee.fx-on{-webkit-mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent);mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent)}
.dd .dd-marquee-track{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:18px 40px;margin:0;padding:0 28px;list-style:none}
.dd .dd-marquee.fx-on .dd-marquee-track{flex-wrap:nowrap;justify-content:flex-start;gap:60px;padding:0 60px 0 0}
.dd .dd-marquee-track li{display:inline-flex;align-items:center;gap:12px;margin:0;font:500 clamp(22px,2.2vw,28px)/1 Aventa,Arial,sans-serif;letter-spacing:-.03em;color:var(--dd-ink);white-space:nowrap}
.dd .dd-marquee-track svg{flex:none;width:1.15em;height:1.15em}

/* ---- tabs ---- */
.dd .dd-stage-tabs{place-items:center stretch}
.dd .dd-tabs{width:100%;max-width:520px;justify-self:center}
.dd .dd-tablist{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.dd .dd-tablist [role="tab"]{appearance:none;display:block;min-height:46px;margin:0;padding:12px 0 14px;border:0;border-radius:0;background:none;box-shadow:none;color:var(--dd-ink);font:500 15px/1.3 Inter,Arial,sans-serif;text-align:left;opacity:.72;transition:opacity .2s}
.dd .dd-tablist [role="tab"]:is([aria-selected="true"],:hover){opacity:1;background:none;color:var(--dd-ink)}
.dd .dd-tablist [role="tab"][aria-selected="true"]{box-shadow:inset 0 -2px var(--dd-accent)}
.dd .dd-tabpanels{display:grid;margin-top:26px}
/* Panels share one cell, so switching never changes the height of the stage. */
.dd .dd-tabpanels>[role="tabpanel"]{grid-area:1/1}
.dd .dd-tabpanels>[role="tabpanel"][hidden]{display:block;visibility:hidden}
html[data-theme] .dd .dd-tabs:not(.is-playing):not(.is-paused) [role="tabpanel"]~[role="tabpanel"]{visibility:hidden}
html:not([data-theme]) .dd .dd-tablist{display:none}
html:not([data-theme]) .dd .dd-tabpanels{gap:20px;margin-top:0}
html:not([data-theme]) .dd .dd-tabpanels>[role="tabpanel"]{grid-area:auto}
.dd .dd-stage .dd-tab-title{margin:0 0 10px;font:500 clamp(26px,2.4vw,32px)/1.05 Aventa,Arial,sans-serif;letter-spacing:-.045em}
.dd .dd-stage .dd-tabpanel p:not(.dd-tab-title){font:400 15px/1.55 Inter,Arial,sans-serif;color:var(--dd-muted);max-width:40ch}

/* ---- steps ---- */
.dd .dd-stage-steps{place-items:center}
.dd .dd-steps{--fx-steps-pad:2.3rem;--fx-steps-x:.55rem;display:grid;gap:18px;margin:0;font:500 clamp(19px,1.8vw,23px)/1.2 Aventa,Arial,sans-serif;letter-spacing:-.03em}
.dd .dd-steps>li{margin:0;color:var(--dd-ink);font:inherit;transition:opacity .3s}
.dd .dd-steps li strong{font-weight:500}
.dd .dd-steps.fx-on>li:not(.is-on){opacity:.72}

/* ---- hover that follows the pointer ---- */
.dd .dd-stage-list{place-items:center stretch}
.dd .dd-dirlist{width:100%;max-width:480px;justify-self:center;margin:0;padding:0;list-style:none;border-top:1px solid var(--dd-line)}
.dd .dd-dirlist>li{margin:0;border-bottom:1px solid var(--dd-line)}
/* The kit parks each fill just below its row. Hide it there, so it never sits behind the next row. */
.dd .dd-dirlist>li>.fx-fill{opacity:0;transition:transform .35s var(--fx-ease),opacity 0s .35s}
.dd .dd-dirlist>li.is-active>.fx-fill{opacity:1;transition:transform .35s var(--fx-ease),opacity 0s}
.dd .dd-dirlist a{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 14px;color:inherit;text-decoration:none;font:500 clamp(20px,1.9vw,25px)/1.15 Aventa,Arial,sans-serif;letter-spacing:-.035em;outline-offset:-4px}

/* ---- magnetic button ---- */
.dd .dd-stage-magnetic{align-content:center}
/* The site's button transition would otherwise drop the kit's spring. */
.editorial .dd .dd-magnetic{min-height:56px;padding:16px 28px;font-size:15px;transition:transform .5s cubic-bezier(.2,.9,.3,1.3),background .2s,border-color .2s,color .2s}

/* ---- tilt ---- */
.dd .dd-tilts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;width:100%;max-width:420px}
.dd .dd-tilt{position:relative;display:flex;flex-direction:column;justify-content:space-between;aspect-ratio:4/5;padding:20px;box-sizing:border-box;border-radius:16px;overflow:hidden;color:#171816;box-shadow:0 22px 40px -26px rgb(23 24 22 / .6)}
.dd .dd-tilt-a{background:linear-gradient(150deg,#e9dce0,#f2c8ac)}
.dd .dd-tilt-b{background:linear-gradient(150deg,#e5ec81,#c7def0)}
.dd .dd-tilt span{font:500 13px/1.3 Inter,Arial,sans-serif}
.dd .dd-tilt strong{font:500 clamp(22px,2.2vw,28px)/1.05 Aventa,Arial,sans-serif;letter-spacing:-.045em}
.dd .dd-tilt::after{content:"";position:absolute;inset:0;background:radial-gradient(circle at var(--fx-gx,50%) var(--fx-gy,50%),rgb(255 255 255 / .55),transparent 55%);opacity:0;transition:opacity .3s;pointer-events:none}
.dd .dd-tilt.is-tilting::after{opacity:1}

/* ---- frosted glass: the scene is artwork and keeps its colours in dark appearance ---- */
.dd .dd-stage-glass{background:#f1eeea;color:#171816}
.dd .dd-glass-scene{position:absolute;inset:0;z-index:-1}
.dd .dd-glass-scene i{position:absolute;aspect-ratio:1;border-radius:50%}
.dd .dd-glass-scene i:nth-child(1){width:40%;left:-12%;top:-30%;background:#622338}
.dd .dd-glass-scene i:nth-child(2){width:36%;right:6%;top:6%;background:#e5ec81}
.dd .dd-glass-scene i:nth-child(3){width:44%;right:18%;bottom:-26%;background:#f2c8ac}
.dd .dd-glass-scene i:nth-child(4){width:30%;left:18%;bottom:-10%;background:#c7def0}
/* A firmer tint than the kit's default keeps the words above AA wherever the colours sit. */
.dd .dd-glass.fx-glass{display:grid;gap:6px;min-width:min(280px,82%);padding:22px 26px;box-sizing:border-box;border-radius:18px;background:color-mix(in srgb,#fff 52%,transparent);color:#171816}
.dd .dd-glass span{font:500 12px/1.4 Inter,Arial,sans-serif;color:#2c2729}
.dd .dd-glass strong{font:500 clamp(26px,2.6vw,32px)/1.05 Aventa,Arial,sans-serif;letter-spacing:-.045em}
.dd .dd-glass .dd-glass-cta{margin-top:8px;font-size:13px;color:#171816}

/* ---- decoding text ---- */
.dd .dd-app{display:grid;gap:14px;width:100%;max-width:400px;padding:24px;box-sizing:border-box;border:1px solid var(--dd-line);border-radius:16px;background:var(--dd-soft)}
.dd .dd-app-label{font:500 12px/1.4 Inter,Arial,sans-serif;color:var(--dd-muted)}
.dd .dd-stage .dd-scramble{font:500 clamp(20px,2.1vw,27px)/1.25 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:-.02em;white-space:nowrap}
.dd .dd-app-lines{display:grid;gap:8px}
.dd .dd-app-lines i{display:block;height:8px;border-radius:8px;background:var(--dd-line)}
.dd .dd-app-lines i:nth-child(2){width:84%}
.dd .dd-app-lines i:nth-child(3){width:58%}

/* ---- fanned cards ---- */
.dd .dd-stage-fan{min-height:360px}
.dd .dd-fan{width:100%;max-width:720px}
.dd .dd-fan.fx-on{height:240px}
.dd .dd-fan:not(.fx-on){display:flex;flex-wrap:wrap;justify-content:center;gap:12px}
/* Each label runs up the left edge like a spine, the strip the fan always leaves showing. */
.dd .dd-fancard{display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;width:150px;height:200px;padding:14px 12px;box-sizing:border-box;border-radius:14px;color:#171816;box-shadow:0 18px 36px -22px rgb(23 24 22 / .6);font:500 17px/1 Aventa,Arial,sans-serif;letter-spacing:-.035em}
.dd .dd-fancard::before{content:"";width:20px;height:20px;border-radius:50%;border:1.5px solid currentColor;opacity:.7}
.dd .dd-fancard span{writing-mode:vertical-rl;transform:rotate(180deg);white-space:nowrap}
.dd .dd-fancard:focus-visible{outline:3px solid var(--dd-ink);outline-offset:3px}
.dd .dd-fc-1{background:#622338;color:#fff}
.dd .dd-fc-2{background:#e9dce0}
.dd .dd-fc-3{background:#e5ec81}
.dd .dd-fc-4{background:#f2c8ac}
.dd .dd-fc-5{background:#c7def0}
@media (max-width:540px){.dd .dd-fancard{width:120px;height:164px;font-size:15px}.dd .dd-fan.fx-on{height:200px}.dd .dd-stage-fan{min-height:300px}}

@media (max-width:540px){
  .dd .dd-stage{min-height:260px;padding:44px 20px 28px;border-radius:16px}
  .dd .dd-stats{gap:20px}
}
