/* R2: compact theme-synchronized workspace, curated gallery and rebuilt Signature shell. */
html:root body.freight-ui-r1.freight-ui-r2 #mainView.hidden {display:none!important;}
html:root[data-theme="alabaster_minimal"] {
 --bg:#f3f5f8;--bg-soft:#f8fafc;--panel:#fff;--panel-2:#fff;--panel-muted:#edf1f6;--text:#1c3045;--muted:#627286;--faint:#8492a2;--border:#d5dde7;--border-strong:#a6b8ca;--accent:#294968;--accent-2:#7194b3;--accent-soft:#e6edf5;--accent-ink:#294968;--signature:#294968;--signature-soft:#e6edf5;--topbar-tint:#fff;
}
html:root[data-theme="champagne_luxe"] {
 --bg:#f5efe4;--bg-soft:#fbf7ef;--panel:#fffdf7;--panel-2:#fffdf7;--panel-muted:#f0e8d9;--text:#372c20;--muted:#7b6a56;--faint:#978573;--border:#dacdb8;--border-strong:#baa586;--accent:#87602d;--accent-2:#b88e53;--accent-soft:#f1e5cf;--accent-ink:#725022;--signature:#87602d;--topbar-tint:#fffdf7;
}
html:root[data-theme="lumen_glass"] {
 --bg:#eaf4fc;--bg-soft:#f4faff;--panel:#f8fcff;--panel-2:#fff;--panel-muted:#e3eff9;--text:#19374e;--muted:#526f86;--faint:#7895a9;--border:#c2d9eb;--border-strong:#86b0d0;--accent:#246baf;--accent-2:#37a0b8;--accent-soft:#dceefb;--accent-ink:#1b568c;--signature:#246baf;--topbar-tint:#f8fcff;
}
html:root[data-theme="stealth_titanium"] {
 --bg:#171c22;--bg-soft:#1c232b;--panel:#222a33;--panel-2:#29333e;--panel-muted:#2c3743;--text:#edf3f8;--muted:#aebdcb;--faint:#8192a3;--border:#414e5c;--border-strong:#64768a;--accent:#a6c6de;--accent-2:#83a5bd;--accent-soft:#344858;--accent-ink:#d6e9f6;--signature:#a6c6de;--topbar-tint:#222a33;--danger:#ff9b9b;--danger-soft:#4a2c34;--success:#8bd6b7;--success-soft:#203e37;
}
html:root[data-theme="bordeaux_luxe"] {
 --bg:#211626;--bg-soft:#291d2e;--panel:#312037;--panel-2:#3b2a42;--panel-muted:#412c48;--text:#f6eef5;--muted:#c6afc5;--faint:#a58ba5;--border:#59415f;--border-strong:#89658a;--accent:#e4aec7;--accent-2:#b59bdf;--accent-soft:#503248;--accent-ink:#f7d3e4;--signature:#e4aec7;--topbar-tint:#312037;--danger:#ffacb4;--danger-soft:#4d2c3f;--success:#a3d8bf;--success-soft:#2d453e;
}
html:root[data-theme="stripe_emerald"] {
 --bg:#e8f4ee;--bg-soft:#f3fbf7;--panel:#fbfffc;--panel-2:#fff;--panel-muted:#dceee5;--text:#163a31;--muted:#55796c;--faint:#7a9b8e;--border:#bddbcd;--border-strong:#8ab5a3;--accent:#087363;--accent-2:#42a995;--accent-soft:#d0ece1;--accent-ink:#075e51;--signature:#087363;--topbar-tint:#fbfffc;
}
html:root[data-theme="champagne_luxe"] body.freight-ui-r2 #mainView :is(.page-heading h1,.table-title-block h2) {font-family:Georgia,'Times New Roman',serif!important;font-weight:500!important;letter-spacing:-.4px!important;}
html:root[data-theme="alabaster_minimal"] body.freight-ui-r2 #mainView :is(.panel,.summary-metric,.page-heading) {border-radius:5px!important;box-shadow:none!important;}
html:root[data-theme="alabaster_minimal"] body.freight-ui-r2 #mainView #page-calculator>.page-heading {border-top:2px solid var(--accent)!important;border-left-width:1px!important;}
html:root[data-theme="lumen_glass"] body.freight-ui-r2 #mainView .main-content {background:radial-gradient(ellipse at 20% 10%,#b4deef66,transparent 50%),linear-gradient(130deg,#edf7fc,#e4edf9)!important;}
html:root[data-theme="lumen_glass"] body.freight-ui-r2 #mainView #page-calculator :is(.panel,.summary-metric) {box-shadow:0 6px 19px #467a9e13,inset 0 1px 0 #fff!important;border-color:#b6d4e8!important;}
html:root[data-theme="stealth_titanium"] body.freight-ui-r2 #mainView .main-content {background-image:linear-gradient(#a6c6de06 1px,transparent 1px),linear-gradient(90deg,#a6c6de06 1px,transparent 1px)!important;background-size:24px 24px!important;}
html:root[data-theme="stealth_titanium"] body.freight-ui-r2 #mainView :is(.panel,.page-heading,.summary-metric) {border-radius:5px!important;box-shadow:none!important;}
html:root[data-theme="bordeaux_luxe"] body.freight-ui-r2 #mainView :is(.panel,.page-heading,.summary-metric) {border-radius:17px!important;box-shadow:0 5px 17px #11071325!important;}
html:root[data-theme="stripe_emerald"] body.freight-ui-r2 #mainView #page-calculator :is(.panel,.summary-metric) {border-radius:15px!important;box-shadow:none!important;border-color:#bddbcd!important;}
html:root body.freight-ui-r2 #mainView .topbar {box-shadow:none!important;min-height:88px!important;gap:8px 20px!important;padding:12px 22px 8px!important;}
html:root body.freight-ui-r2 #mainView #topNav .nav-tab {border-radius:7px!important;min-height:32px!important;font-weight:600!important;box-shadow:none!important;}
html:root body.freight-ui-r2 #mainView #topNav .nav-tab::before,
html:root body.freight-ui-r2 #mainView #topNav .nav-tab::after {display:none!important;}
html:root body.freight-ui-r2 #mainView #topNav .nav-tab.active {background:var(--accent-soft)!important;color:var(--text)!important;box-shadow:none!important;}
html:root body.freight-ui-r2 #mainView .main-content {padding:18px 22px 48px!important;}
html:root body.freight-ui-r2 #mainView #page-calculator>.page-heading {
  display:grid!important;grid-template-columns:minmax(200px,1fr) auto auto!important;
  background:linear-gradient(110deg,color-mix(in srgb,var(--accent) 6%,var(--panel)),var(--panel) 72%)!important;
  color:var(--text)!important;border:1px solid var(--border)!important;border-left:4px solid var(--accent)!important;
  border-radius:12px!important;box-shadow:none!important;min-height:82px!important;
  padding:14px 18px!important;margin:0 0 16px!important;gap:14px!important;overflow:visible!important;
}
html:root body.freight-ui-r2 #mainView #page-calculator>.page-heading::before,
html:root body.freight-ui-r2 #mainView #page-calculator>.page-heading::after {display:none!important;}
html:root body.freight-ui-r2 #mainView #page-calculator>.page-heading h1 {font-size:calc(25px * var(--user-heading-scale,1))!important;color:var(--text)!important;line-height:1.2!important;letter-spacing:-.7px!important;margin:5px 0 0!important;font-weight:700!important;text-shadow:none!important;}
html:root body.freight-ui-r2 #mainView #page-calculator>.page-heading .eyebrow {color:var(--muted)!important;font-size:8px!important;letter-spacing:1.6px!important;}
html:root body.freight-ui-r2 #mainView #page-calculator .v600-workspace-pills {display:none!important;}
html:root body.freight-ui-r2 #mainView #page-calculator .heading-actions .button {background:var(--panel)!important;color:var(--text)!important;border:1px solid var(--border)!important;font-size:11px!important;padding:8px 10px!important;min-height:34px!important;box-shadow:none!important;}
html:root body.freight-ui-r2 #mainView #page-calculator .heading-actions .button::before,
html:root body.freight-ui-r2 #mainView #page-calculator .heading-actions .button::after {display:none!important;}
html:root body.freight-ui-r2 #mainView #page-calculator .heading-actions .action-paste {background:var(--accent)!important;color:var(--freight-primary-ink,#fff)!important;border-color:var(--accent)!important;box-shadow:0 3px 9px color-mix(in srgb,var(--accent) 16%,transparent)!important;}
html:root body.freight-ui-r2 #mainView #page-calculator .heading-actions .action-clear {color:var(--danger)!important;}
html:root body.freight-ui-r2 #mainView .freight-layout-quick {display:flex!important;gap:3px;border:1px solid var(--border);padding:3px;background:var(--panel-muted);border-radius:8px;align-self:center;min-width:0;}
html:root body.freight-ui-r2 #mainView #page-calculator .freight-layout-quick button {border:0!important;border-radius:5px!important;background:transparent!important;padding:7px 9px!important;font-size:10px!important;color:var(--muted)!important;font-weight:600!important;cursor:pointer;min-height:30px!important;box-shadow:none!important;}
html:root body.freight-ui-r2 #mainView #page-calculator .freight-layout-quick button[aria-pressed="true"] {background:var(--accent)!important;color:var(--freight-primary-ink,#fff)!important;box-shadow:0 1px 4px color-mix(in srgb,var(--text) 10%,transparent)!important;}
html:root body.freight-ui-r2 #mainView #page-calculator .summary-metric {border-radius:10px!important;box-shadow:0 3px 10px color-mix(in srgb,var(--text) 4%,transparent)!important;}
html:root body.freight-ui-r2 #mainView #page-calculator .summary-metric>strong {font-variant-numeric:tabular-nums!important;}
html:root body.freight-ui-r2 #mainView #page-calculator .calculator-command-bar {border-radius:10px!important;box-shadow:none!important;padding:12px 14px!important;}
html:root body.freight-ui-r2 #mainView #page-calculator .v72002-rate-context {background:var(--panel-muted)!important;border:1px solid var(--border)!important;border-radius:7px!important;box-shadow:none!important;padding:7px 9px!important;}
html:root body.freight-ui-r2 #mainView #page-calculator .v72002-rate-context {display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:6px!important;min-width:0!important;}
html:root body.freight-ui-r2 #mainView #page-calculator #specialEquation {white-space:normal!important;overflow:visible!important;text-overflow:clip!important;flex:1 1 170px!important;font-size:10px!important;}
html:root body.freight-ui-r2 #mainView #page-calculator #specialRateDeviationAlert:not(.hidden) {flex-basis:100%!important;}
/* Success is already communicated by the live health bar, toast and main Undo action. Warnings stay visible. */
html:root body.freight-ui-r2 #mainView #page-calculator .paste-import-summary.success {display:none!important;}
html:root body.freight-ui-r2 #mainView #page-calculator .special-rate-input {border-radius:7px!important;background:var(--panel)!important;border:1px solid var(--border-strong)!important;box-shadow:none!important;}
html:root body.freight-ui-r2 #mainView #page-calculator .paste-ready-badge {background:var(--success-soft)!important;color:var(--success)!important;border:1px solid color-mix(in srgb,var(--success) 30%,var(--border))!important;box-shadow:none!important;border-radius:7px!important;}
html:root body.freight-ui-r2 #mainView #page-calculator #freightWorkGrid {display:flex!important;flex-direction:column!important;gap:16px!important;}
html:root body.freight-ui-r2 #mainView #page-calculator #vehicleLoadWidget {order:-1!important;position:relative!important;top:auto!important;padding:14px 16px!important;border-top:2px solid var(--accent)!important;box-shadow:none!important;border-radius:11px!important;}
html:root body.freight-ui-r2 #mainView #page-calculator #vehicleLoadWidget .vehicle-load-head {display:flex!important;flex-direction:row!important;align-items:center!important;gap:16px!important;flex-wrap:wrap!important;}
html:root body.freight-ui-r2 #mainView #page-calculator #vehicleLoadWidget .vehicle-selector-group {flex:1 1 310px!important;min-width:0!important;}
html:root body.freight-ui-r2 #mainView #page-calculator #vehicleLoadWidget .vehicle-meter-stats {display:flex!important;gap:18px!important;flex-wrap:wrap!important;align-items:center!important;width:auto!important;}
html:root body.freight-ui-r2 #mainView #page-calculator #vehicleLoadWidget .vehicle-capacity-hint {width:auto!important;}
html:root body.freight-ui-r2 #mainView #page-calculator #vehicleLoadWidget .meter-stat {align-items:flex-start!important;text-align:left!important;min-width:0!important;}
html:root body.freight-ui-r2 #mainView #page-calculator #vehicleLoadWidget .meter-stat>strong {font-size:20px!important;}
html:root body.freight-ui-r2 #mainView #page-calculator #vehicleLoadWidget .vehicle-btn-group {display:flex!important;flex-direction:row!important;gap:7px!important;flex-wrap:wrap!important;}
html:root body.freight-ui-r2 #mainView #page-calculator #vehicleLoadWidget .vehicle-gauge-track-wrap {margin-top:12px!important;}
html:root body.freight-ui-r2 #mainView #page-calculator #vehicleLoadWidget .vehicle-gauge-labels {gap:8px!important;flex-wrap:wrap!important;}
html:root body.freight-ui-r2 #mainView #page-calculator #calculatorTablePanel {box-shadow:0 4px 14px color-mix(in srgb,var(--text) 4%,transparent)!important;border-radius:11px!important;}
html:root body.freight-ui-r2 #mainView #page-calculator #calculatorTablePanel .panel-header {padding:14px 16px!important;}
html:root body.freight-ui-r2 #mainView #page-calculator #calculatorTablePanel h2 {font-family:var(--user-font,var(--font))!important;font-size:18px!important;font-weight:650!important;}
html:root body.freight-ui-r2 #mainView #page-calculator .calculator-table th {font-size:max(10px,calc(var(--user-table-size,12px) - 1px))!important;letter-spacing:.02em!important;font-weight:650!important;}
html:root body.freight-ui-r2 #mainView #page-calculator .calculator-table td {font-size:var(--user-table-size,12px)!important;}
html:root body.freight-ui-r2 #mainView .freight-navigation {display:flex;flex-direction:column;background:var(--panel);border-right:1px solid var(--border);padding:24px 12px 16px;min-height:0;}
html:root body.freight-ui-r2 #mainView .freight-rail-label {font-size:9px;letter-spacing:1.8px;color:var(--muted);padding:0 10px;margin-bottom:13px;font-weight:650;}
html:root body.freight-ui-r2 #mainView .freight-rail-foot {margin-top:auto;padding:18px 10px 4px;border-top:1px solid var(--border);font-size:9px;font-weight:650;letter-spacing:1px;color:var(--accent-ink);}
html:root body.freight-ui-r2 #mainView .freight-rail-foot span {display:block;font-size:10px;font-weight:400;letter-spacing:0;color:var(--muted);margin-top:5px;}
@media(min-width:1001px) {
 html:root body.freight-ui-r2[data-workspace-layout="signature"] #mainView {display:grid!important;grid-template-columns:174px minmax(0,1fr)!important;grid-template-rows:auto auto minmax(0,1fr) auto!important;grid-template-areas:"header header" "banner banner" "nav main" "footer footer"!important;height:100dvh!important;overflow:hidden!important;}
 html:root body.freight-ui-r2[data-workspace-layout="signature"] #mainView .topbar {grid-area:header!important;grid-template-columns:minmax(230px,1fr) auto!important;grid-template-rows:auto!important;min-height:78px!important;border-bottom:1px solid var(--border)!important;padding:13px 22px!important;}
 html:root body.freight-ui-r2[data-workspace-layout="signature"] #mainView .main-content {grid-area:main!important;width:100%!important;height:auto!important;max-height:none!important;max-width:none!important;min-width:0!important;min-height:0!important;overflow:auto!important;margin:0!important;}
 html:root body.freight-ui-r2[data-workspace-layout="signature"] #mainView #freightNavigation {grid-area:nav!important;}
 html:root body.freight-ui-r2[data-workspace-layout="signature"] #mainView #integrationBanner {grid-area:banner!important;}
 html:root body.freight-ui-r2[data-workspace-layout="signature"] #mainView>.app-signature {grid-area:footer!important;position:static!important;width:100%!important;}
 html:root body.freight-ui-r2[data-workspace-layout="signature"] #mainView #freightNavigation #topNav {display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;align-items:stretch!important;width:100%!important;height:auto!important;max-height:none!important;gap:6px!important;margin:0!important;}
 html:root body.freight-ui-r2[data-workspace-layout="signature"] #mainView #freightNavigation .nav-tab:not(.hidden) {display:flex!important;align-items:center!important;gap:9px!important;width:100%!important;text-align:left!important;padding:12px 10px!important;font-size:11px!important;white-space:normal!important;}
 html:root body.freight-ui-r2[data-workspace-layout="signature"] #mainView #freightNavigation .nav-tab.active {background:var(--accent-soft)!important;color:var(--text)!important;border-left:3px solid var(--accent)!important;}
 html:root body.freight-ui-r2[data-workspace-layout="signature"] #mainView #page-calculator>.page-heading {grid-template-columns:minmax(190px,1fr) auto auto!important;}
 html:root body.freight-ui-r2[data-workspace-layout="signature"] #mainView #page-calculator .heading-actions {grid-column:auto!important;justify-content:flex-end!important;max-width:540px!important;}
 html:root body.freight-ui-r2[data-workspace-layout="signature"] #mainView #page-calculator #vehicleLoadWidget .vehicle-capacity-hint {display:none!important;}
}
/* Theme gallery: actual palettes shown as small workspace compositions. */
html:root body.freight-ui-r2 .toast-stack {top:auto!important;bottom:48px!important;right:18px!important;max-width:min(380px,calc(100vw - 24px))!important;}
html:root body.freight-ui-r2 #themeModal .v480-theme-grid {gap:16px!important;}
html:root body.freight-ui-r2 #themeModal .theme-option {display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:0!important;padding:0!important;border-radius:12px!important;overflow:hidden!important;box-shadow:none!important;border:1px solid var(--border)!important;}
html:root body.freight-ui-r2 #themeModal .theme-option.selected {border:2px solid var(--accent)!important;box-shadow:0 0 0 3px var(--accent-soft)!important;}
html:root body.freight-ui-r2 #themeModal .v480-theme-visual {width:100%!important;min-width:0!important;max-width:none!important;height:110px!important;border-radius:0!important;border-bottom:1px solid var(--border)!important;}
html:root body.freight-ui-r2 #themeModal .theme-option-copy {padding:12px!important;}
html:root body.freight-ui-r2 #themeModal .v480-swatch-art {position:relative!important;display:block!important;width:100%!important;height:110px!important;overflow:hidden!important;}
html:root body.freight-ui-r2 #themeModal .v480-swatch-art i {position:absolute!important;border-radius:0!important;transform:none!important;filter:none!important;box-shadow:none!important;}
html:root body.freight-ui-r2 #themeModal .v480-swatch-art i:nth-child(1) {inset:0!important;width:100%!important;height:100%!important;opacity:1!important;}
html:root body.freight-ui-r2 #themeModal .v480-swatch-art i:nth-child(2) {left:16%!important;top:15%!important;width:78%!important;height:76%!important;border-radius:5px!important;opacity:1!important;box-shadow:0 4px 14px #0002!important;}
html:root body.freight-ui-r2 #themeModal .v480-swatch-art i:nth-child(3) {left:22%!important;top:23%!important;width:22%!important;height:9px!important;border-radius:2px!important;opacity:1!important;box-shadow:0 17px 0 -2px currentColor,35px 17px 0 -2px currentColor,70px 17px 0 -2px currentColor!important;}
html:root body.freight-ui-r2 #themeModal .v480-swatch-art::after {content:'';position:absolute;left:22%;right:12%;top:66%;height:1px;background:#80808050;box-shadow:0 10px 0 #80808035,0 20px 0 #80808025;}
html:root body.freight-ui-r2 #themeModal .theme-option-copy>strong {font-size:14px!important;}
html:root body.freight-ui-r2 #themeModal .theme-option-copy>small {font-size:11px!important;line-height:1.5!important;}
html:root body.freight-ui-r2 #themeModal .v480-theme-tags em:last-child {display:none!important;}
/* A few intentionally different material treatments, not repeated color variants. */
html:root[data-theme="neo_brutalist"] body.freight-ui-r2 #mainView :is(.summary-metric,.panel,.page-heading,.button) {border-radius:2px!important;border-color:var(--text)!important;}
html:root[data-theme="neo_brutalist"] body.freight-ui-r2 #mainView #page-calculator .summary-metric {box-shadow:3px 3px 0 var(--text)!important;}
html:root[data-theme="sandstone_minimal"] body.freight-ui-r2 #mainView #page-calculator>.page-heading {background:var(--panel)!important;border-left-color:var(--accent)!important;}
html:root[data-theme="fathima_gold"] body.freight-ui-r2 #mainView #page-calculator>.page-heading {border-top:1px solid color-mix(in srgb,var(--accent) 50%,var(--border))!important;}
html:root[data-theme="high_contrast_oled"] body.freight-ui-r2 #mainView :is(.panel,.summary-metric,.page-heading,.button) {box-shadow:none!important;border-width:2px!important;}
@media(max-width:1200px) {
 html:root body.freight-ui-r2 #mainView #page-calculator>.page-heading {grid-template-columns:minmax(180px,1fr) auto!important;}
 html:root body.freight-ui-r2 #mainView #page-calculator .heading-actions {grid-column:1/-1!important;justify-content:flex-start!important;}
}
@media(max-width:1100px) {
 html:root body.freight-ui-r2 #mainView #page-calculator>.sticky-summary-shell .summary-strip {grid-template-columns:repeat(3,minmax(0,1fr))!important;}
}
@media(max-width:1000px) {
 html:root body.freight-ui-r2 #mainView #freightNavigation {padding:6px 16px!important;border-right:0!important;border-bottom:1px solid var(--border)!important;}
 html:root body.freight-ui-r2 #mainView #freightNavigation :is(.freight-rail-label,.freight-rail-foot){display:none!important;}
 html:root body.freight-ui-r2 #mainView #freightNavigation #topNav {flex-direction:row!important;flex-wrap:wrap!important;}
}
@media(max-width:760px) {
 html:root body.freight-ui-r2 #mainView #freightNavigation {display:none!important;}
 html:root body.freight-ui-r2 #mainView .topbar {padding:10px 12px!important;min-height:66px!important;}
 html:root body.freight-ui-r2 #mainView .main-content {padding:12px 10px 48px!important;}
 html:root body.freight-ui-r2 #mainView #page-calculator>.page-heading {padding:13px 12px!important;gap:12px!important;grid-template-columns:1fr!important;}
 html:root body.freight-ui-r2 #mainView #page-calculator>.page-heading h1 {font-size:25px!important;}
 html:root body.freight-ui-r2 #mainView .freight-layout-quick {justify-self:start!important;}
 html:root body.freight-ui-r2 #mainView #page-calculator .heading-actions {width:100%!important;}
 html:root body.freight-ui-r2 #mainView #page-calculator #vehicleLoadWidget .vehicle-selector-group {flex-basis:100%!important;}
 html:root body.freight-ui-r2 #mainView #page-calculator #vehicleLoadWidget .vehicle-meter-stats {width:100%!important;gap:13px!important;}
}
@media(max-width:470px) {
 html:root body.freight-ui-r2 #mainView #page-calculator>.sticky-summary-shell .summary-strip {grid-template-columns:repeat(2,minmax(0,1fr))!important;}
 html:root body.freight-ui-r2 #mainView #page-calculator .summary-metric>strong {font-size:min(var(--summary-value-size),30px)!important;}
}
