/* DESIGN-DIRECTION-05B: presentation opt-in only. Engines and outputs retain ownership. */
html[data-tgl-design="04"] body[data-tgl-calculators] {
  --tgl-workspace-bg:var(--dd-top);--tgl-workspace-surface:var(--dd-surface);--tgl-workspace-deep:var(--dd-deep);
  --tgl-workspace-muted:var(--dd-muted);--tgl-workspace-line:var(--dd-line);--tgl-workspace-edge:var(--dd-line);--tgl-workspace-steel:var(--dd-raised);
  --tool-blue:#24394f;--tool-teal:#29484e;--tool-lavender:#343f56;--tool-inner:#172b3d;
}
html[data-tgl-design="04"][data-tgl-theme="light"] body[data-tgl-calculators] {--tool-blue:#bccbdd;--tool-teal:#b5d2cc;--tool-lavender:#cbc9df;--tool-inner:#eff4f9}
html[data-tgl-design="04"] body[data-tgl-calculators]>header,
html[data-tgl-design="04"] body[data-tgl-calculators]>.tgl-primary-nav {background:#101322!important;color:#f5f7fb;--tgl-workspace-deep:#101322;--tgl-workspace-muted:#d4dfeb}
html[data-tgl-design="04"] body[data-tgl-calculators]>header a,
html[data-tgl-design="04"] body[data-tgl-calculators]>.tgl-primary-nav a {color:#f5f7fb!important}
html[data-tgl-design="04"] body[data-tgl-calculators] main {color:var(--dd-ink)}
html[data-tgl-design="04"] body[data-tgl-calculators] main :is(h1,h2,h3,h4,label,legend,summary,strong,b,th,td,a) {color:var(--dd-ink)}
html[data-tgl-design="04"] body[data-tgl-calculators] main :is(p,small,.note,.hint,.muted,.intro,.eyebrow) {color:var(--dd-muted)}
html[data-tgl-design="04"] body[data-tgl-calculators] main a:is(:hover,:visited,:focus-visible) {color:var(--dd-ink);text-decoration-color:currentColor}
html[data-tgl-design="04"] body[data-tgl-calculators] main :is(.panel,.card,.warning,.tgl-sync-conflict) {background:var(--dd-surface);border-color:var(--dd-line)}
html[data-tgl-design="04"] body[data-tgl-calculators] main :is(input:not([type=checkbox]):not([type=radio]),select,textarea) {background:var(--dd-field)!important;color:var(--dd-ink)!important;border-color:var(--dd-line)!important;min-width:0;max-width:100%;color-scheme:inherit}
html[data-tgl-design="04"] body[data-tgl-calculators] main :is(input,textarea)::placeholder {color:var(--dd-muted);opacity:1}
html[data-tgl-design="04"] body[data-tgl-calculators] main :is(button,.button,.tgl-action) {color:var(--dd-ink)!important;background:var(--dd-raised);border-color:var(--dd-line)}
html[data-tgl-design="04"] body[data-tgl-calculators] main :is(button,.button,.tgl-action):hover {color:var(--dd-ink)!important;background:var(--dd-deep)}
html[data-tgl-design="04"] body[data-tgl-calculators] main :is(.tgl-action--prominent,#submit,#download,#generateHighlights) {background:var(--dd-pink)!important;color:#fff!important;border-color:transparent}
html[data-tgl-design="04"] body[data-tgl-calculators] main :is(.tgl-action--prominent,#submit,#download,#generateHighlights):hover {background:#c9006e!important;color:#fff!important}
html[data-tgl-design="04"] body[data-tgl-calculators] main :is(button[aria-pressed=true],[role=tab][aria-selected=true]) {background:var(--dd-deep);color:var(--dd-ink)!important;box-shadow:inset 0 -3px var(--dd-pink);border-color:var(--dd-pink)}
html[data-tgl-design="04"] body[data-tgl-calculators] main :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible {outline:3px solid var(--dd-focus)!important;outline-offset:3px;box-shadow:0 0 0 6px var(--dd-pink)!important}
html[data-tgl-design="04"] body[data-tgl-calculators] main :is(.stat,.facts>div,.metrics>span,.kit-history-record,.kit-history-entry,.practical) {background:var(--tool-inner);border-color:var(--dd-line)}
html[data-tgl-design="04"] body[data-tgl-calculators] main :is(.stat span,.facts span,.metrics>span) {color:var(--dd-ink)}
html[data-tgl-design="04"] body[data-tgl-calculators] main .kit li:before {color:var(--dd-ink)}
html[data-tgl-design="04"] body[data-tgl-calculators] #ride-form .chips button,
html[data-tgl-design="04"] body[data-tgl-calculators] #feedback button {color:var(--dd-ink)!important}
/* The Fuel Planner's below / around / above meanings are preserved in both themes. */
html[data-tgl-design="04"] body[data-tgl-calculators] .builder-comparison .fuel-status strong {color:inherit}
html[data-tgl-design="04"][data-tgl-theme="light"] body[data-tgl-calculators] .builder-comparison {background:#e5eaf3;border-color:#a3b3c3}
html[data-tgl-design="04"][data-tgl-theme="light"] body[data-tgl-calculators] .builder-comparison:has([data-state=below]) {background:#f7edd6;border-color:#9b8049}
html[data-tgl-design="04"][data-tgl-theme="light"] body[data-tgl-calculators] .builder-comparison:has([data-state=around]) {background:#deeee6;border-color:#608875}
html[data-tgl-design="04"][data-tgl-theme="light"] body[data-tgl-calculators] .builder-comparison:has([data-state=above]) {background:#f5e1e8;border-color:#a07184}
html[data-tgl-design="04"][data-tgl-theme="light"] body[data-tgl-calculators] .fuel-status[data-state=below] {color:#684600}
html[data-tgl-design="04"][data-tgl-theme="light"] body[data-tgl-calculators] .fuel-status[data-state=around] {color:#19513e}
html[data-tgl-design="04"][data-tgl-theme="light"] body[data-tgl-calculators] .fuel-status[data-state=above] {color:#82334c}
html[data-tgl-design="04"][data-tgl-theme="light"] body[data-tgl-calculators] .fuel-status:is([data-state=empty],[data-state=unavailable]) {color:var(--dd-muted)}
html[data-tgl-design="04"][data-tgl-theme="light"] body[data-tgl-calculators] :is([role=alert],.error,.field-error) {color:#8c2340}
@media(min-width:821px) {
  html[data-tgl-design="04"] body[data-tgl-calculators]>main {max-width:1320px!important;padding:44px 56px 36px;margin-inline:auto}
  html[data-tgl-design="04"] body[data-tgl-calculators] main h1 {font-size:clamp(44px,4.5vw,64px);line-height:1.06;letter-spacing:-.05em;margin:10px 0 20px}
  html[data-tgl-design="04"] body[data-tgl-calculators] main h2 {font-size:26px;line-height:1.2}
  html[data-tgl-design="04"] body[data-tgl-calculators] main :is(.panel,.card) {padding:24px;border-radius:20px;background:var(--tool-blue);border-color:var(--dd-line)}
  html[data-tgl-design="04"] body[data-tgl-calculators] main :is(.result,.summary,#your-results,#kit-history) {background:var(--tool-teal)}
  html[data-tgl-design="04"] body[data-tgl-calculators] main :is(.fuel-builder,#find-a-gear,.highlights) {background:var(--tool-lavender)}
  html[data-tgl-design="04"] body[data-tgl-calculators] main .layout {gap:24px;align-items:start}
  html[data-tgl-design="04"] body[data-tgl-calculators].tgl-weather-planner-workspace .layout {grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);background:none;border:0;overflow:visible;border-radius:0}
  html[data-tgl-design="04"] body[data-tgl-calculators] .layout>#ride-form {padding:24px;border:1px solid var(--dd-line);border-radius:20px;background:var(--tool-blue)}
  html[data-tgl-design="04"] body[data-tgl-calculators] .layout>#result {padding:24px;border:1px solid var(--dd-line);border-top:3px solid var(--dd-pink);border-radius:20px;background:var(--tool-teal)}
  html[data-tgl-design="04"] body[data-tgl-calculators] main .kit li {background:var(--tool-inner);border-radius:12px;padding:12px 14px 12px 36px}
  html[data-tgl-design="04"] body[data-tgl-calculators] main .kit li:before {left:13px;top:12px}
  html[data-tgl-design="04"] body[data-tgl-calculators] main :is(.tgl-about,.related) {background:var(--dd-surface);border-radius:16px;padding:22px;margin-top:24px}
  html[data-tgl-design="04"] body[data-tgl-calculators] main .metrics>span {border-radius:12px;padding:12px}
}
@media(min-width:821px) and (max-width:1150px) {html[data-tgl-design="04"] body[data-tgl-calculators]>main {padding-inline:32px}}
/* Numeric result cells also use the legacy name 'primary'; they are not actions. */
html[data-tgl-design="04"] body[data-tgl-calculators] main .stat.primary {background:var(--tool-inner)!important;color:var(--dd-ink)!important}
html[data-tgl-design="04"] body[data-tgl-calculators] main :is(#during-rate,#during-total) {color:var(--dd-ink)}
html[data-tgl-design="04"] body[data-tgl-calculators] main :is(#intensity-hint,#weight-adjust-hint,#weight-example,#weight-hint,#builder-message,#general-secondary,#general-result-heading,.catalogue-hint,.planner-duration-detail>summary>span,#riding-preferences-summary) {color:var(--dd-muted)}
@media(min-width:821px) {
  html[data-tgl-design="04"] body[data-tgl-calculators] main .stat.primary {display:block;min-height:0;width:auto;padding:16px;border:1px solid var(--dd-line);border-radius:12px;box-shadow:none;text-align:left;font-weight:inherit}
}
html[data-tgl-design="04"] body[data-tgl-calculators] main :is(#intensity-hint,#weight-adjust-hint,#weight-example,#weight-hint,#builder-message,.catalogue-hint) {color:var(--dd-muted)!important}
html[data-tgl-design="04"] body[data-tgl-calculators] main :is(#track-distances button,button[data-pace]) {color:var(--dd-ink)!important}
html[data-tgl-design="04"] body[data-tgl-calculators] main #items .item-field-label {color:var(--dd-muted)!important}
@media(min-width:821px) {
  html[data-tgl-design="04"] body[data-tgl-calculators].tgl-weather-planner-workspace .layout:has(>#result[hidden]) {grid-template-columns:minmax(0,760px);justify-content:center}
}
html[data-tgl-design="04"] body[data-tgl-calculators] #save-kit[data-state=saved] {background:#263d37;color:#e5fff4!important;border-color:#82bfa8}
html[data-tgl-design="04"][data-tgl-theme="light"] body[data-tgl-calculators] #save-kit[data-state=saved] {background:#deeee6;color:#19513e!important;border-color:#608875}
html[data-tgl-design="04"] body[data-tgl-calculators] #save-kit[data-state=loading] {background:var(--dd-pink);color:#fff!important}
@media(min-width:821px) {
  html[data-tgl-design="04"] body[data-tgl-calculators].tgl-weather-planner-workspace .layout {grid-template-areas:"inputs result" "history result";grid-template-rows:auto 1fr}
  html[data-tgl-design="04"] body[data-tgl-calculators] .layout>#ride-form {grid-area:inputs}
  html[data-tgl-design="04"] body[data-tgl-calculators] .layout>#result {grid-area:result}
  html[data-tgl-design="04"] body[data-tgl-calculators] .layout>#kit-history {grid-area:history;margin-top:0}
  html[data-tgl-design="04"] body[data-tgl-calculators].tgl-weather-planner-workspace .layout:has(>#result[hidden]) {grid-template-areas:"inputs" "history";grid-template-rows:auto auto}
}
@media(max-width:760px) {
  html[data-tgl-design="04"] body[data-tgl-calculators] .layout>#kit-history {margin-top:2px}
}
