/* UNSCRW — Estimator Modern theme + Classic View density toggle.
   Executive View (default) = Modern: airy, surfaces the financial wins.
   Classic View (.classic) = mimics CCC ONE density for zero-friction
   regional-team onboarding. Same data, presentation-density switch. */

:root {
  --u-ink:        #1A1A1A;
  --u-steel:      #185FA5;   /* primary steel blue */
  --u-steel-600:  #0C447C;
  --u-steel-050:  #E6F1FB;
  --u-line:       #D3D1C7;
  --u-line-soft:  #ECEAE3;
  --u-paper:      #F7F7F4;
  --u-white:      #FFFFFF;
  --u-slate:      #5F5E5A;
  --u-green:      #0F6E56;
  --u-green-050:  #E1F5EE;
  --u-amber-050:  #FAEEDA;
  --u-amber-700:  #854F0B;

  --u-radius:     10px;
  --u-pad:        16px;
  --u-row:        1;         /* density multiplier, overridden by Classic */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--u-ink);
  background: var(--u-paper);
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--u-steel); text-decoration: none; }

/* ---- Top bar --------------------------------------------------------- */
.u-topbar {
  background: var(--u-steel);
  color: var(--u-white);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 22px;
}
.u-brand { display: flex; align-items: center; gap: 9px; font-weight: 700;
  font-family: 'Space Grotesk', 'Inter', sans-serif; letter-spacing: .5px; font-size: 18px; }
.u-screw {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--u-white); position: relative; display: inline-block;
}
.u-screw::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 11px; height: 2px; background: var(--u-white);
  transform: translate(-50%, -50%) rotate(45deg);
}
.u-nav { display: flex; gap: 6px; margin-left: 8px; }
.u-nav a {
  color: #CFE2F6; padding: 6px 12px; border-radius: 6px; font-size: 14px;
}
.u-nav a.active { color: var(--u-white); background: rgba(255,255,255,.14); }
.u-topbar .u-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }

/* ---- View toggle ----------------------------------------------------- */
.u-toggle {
  display: inline-flex; background: rgba(255,255,255,.15);
  border-radius: 999px; padding: 3px; font-size: 13px;
}
.u-toggle button {
  border: 0; background: transparent; color: #CFE2F6; cursor: pointer;
  padding: 5px 12px; border-radius: 999px; font: inherit;
}
.u-toggle button.on { background: var(--u-white); color: var(--u-steel-600); font-weight: 500; }

/* ---- Layout ---------------------------------------------------------- */
.u-wrap { max-width: 980px; margin: 26px auto; padding: 0 22px; }
.u-h1 { font-family: 'Space Grotesk','Inter',sans-serif; font-weight: 700;
  font-size: 24px; margin: 0 0 4px; }
.u-sub { color: var(--u-slate); margin: 0 0 22px; }

.u-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 16px; }
.u-card {
  background: var(--u-white); border: 1px solid var(--u-line);
  border-radius: var(--u-radius); padding: 20px;
}
.u-card h3 { margin: 0 0 4px; font-size: 17px; }
.u-tag { display: inline-block; font-size: 12px; color: var(--u-steel-600);
  background: var(--u-steel-050); padding: 2px 9px; border-radius: 6px; margin-bottom: 10px; }
.u-price { color: var(--u-slate); font-size: 13px; }
.u-btn {
  display: inline-block; margin-top: 14px; background: var(--u-steel); color: #fff;
  padding: 9px 16px; border-radius: 8px; font-size: 14px; border: 0; cursor: pointer;
}
.u-btn.ghost { background: transparent; color: var(--u-steel); border: 1px solid var(--u-line); }

/* ---- Metric row ------------------------------------------------------ */
.u-metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr));
  gap: 12px; margin: 0 0 22px; }
.u-metric { background: var(--u-white); border: 1px solid var(--u-line);
  border-radius: var(--u-radius); padding: 14px 16px; }
.u-metric .k { font-size: 13px; color: var(--u-slate); }
.u-metric .v { font-size: 26px; font-weight: 500; }

/* ---- Estimate table -------------------------------------------------- */
.u-table { width: 100%; border-collapse: collapse; background: var(--u-white);
  border: 1px solid var(--u-line); border-radius: var(--u-radius); overflow: hidden; font-size: 14px; }
.u-table th { text-align: left; background: var(--u-line-soft); color: var(--u-slate);
  font-weight: 500; padding: 11px 14px; }
.u-table td { padding: 12px 14px; border-top: 1px solid var(--u-line-soft); }

.u-panel-title { font-size: 13px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--u-slate); margin: 26px 0 10px; }

/* =====================================================================
   CLASSIC VIEW — CCC ONE-style density. Tighter rows, banded tables,
   squarer corners, smaller type. Deliberately utilitarian.
   ===================================================================== */
body.classic { font-size: 13px; background: #EDEBE4; }
body.classic .u-wrap { max-width: 1120px; margin: 14px auto; }
body.classic .u-h1 { font-size: 19px; }
body.classic .u-sub { margin-bottom: 12px; }
body.classic .u-card,
body.classic .u-metric,
body.classic .u-table { border-radius: 3px; }
body.classic .u-card { padding: 12px 14px; }
body.classic .u-metric { padding: 8px 12px; }
body.classic .u-metric .v { font-size: 20px; }
body.classic .u-cards,
body.classic .u-metrics { gap: 8px; }
body.classic .u-table th { padding: 6px 10px; }
body.classic .u-table td { padding: 6px 10px; }
body.classic .u-table tbody tr:nth-child(even) td,
body.classic .u-table tr:nth-child(even) td { background: #F4F2EC; }
body.classic .u-btn { border-radius: 3px; padding: 6px 12px; }
body.classic .u-topbar { padding: 7px 16px; }

/* ---- Executive vs Classic layout fork (genuine, not just density) ---- */
.classic-only { display: none; }
body.classic .exec-only { display: none; }
body.classic .classic-only { display: block; }

/* form grid */
.u-form { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr));
  gap: 12px; align-items: end; }
.u-field label { display: block; font-size: 13px; color: var(--u-slate); margin-bottom: 5px; }
.u-field input, .u-field select {
  width: 100%; padding: 9px 10px; border: 1px solid var(--u-line);
  border-radius: 8px; font: inherit; background: #fff; }
body.classic .u-field input, body.classic .u-field select { border-radius: 3px; padding: 6px 8px; }

/* result banners */
.u-banner { border-radius: var(--u-radius); padding: 14px 16px; margin: 4px 0 18px; font-size: 15px; }
.u-banner.win { background: var(--u-green-050); color: var(--u-green); border: 1px solid #5DCAA5; }
.u-banner.warn { background: var(--u-amber-050); color: var(--u-amber-700); border: 1px solid #FAC775; }
.u-banner.flat { background: #EFEEE8; color: var(--u-slate); border: 1px solid var(--u-line); }
body.classic .u-banner { border-radius: 3px; }

/* before/after compare cards */
.u-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.u-side { border: 1px solid var(--u-line); border-radius: var(--u-radius); padding: 14px 16px; background: #fff; }
.u-side h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--u-slate); }
.u-pill { display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.u-pill.total { background: #FCEBEB; color: #A32D2D; }
.u-pill.ok { background: var(--u-green-050); color: var(--u-green); }
.u-bar { height: 8px; background: var(--u-line-soft); border-radius: 999px; overflow: hidden; margin: 8px 0; }
.u-bar span { display: block; height: 100%; }

/* ---- value tease (preview before paid unlock) ---- */
.u-tease { border: 2px solid var(--u-steel); border-radius: 12px; padding: 20px 22px;
  background: var(--u-steel-050); margin: 4px 0 18px; }
body.classic .u-tease { border-radius: 3px; padding: 14px 16px; }
.u-tease .eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--u-steel-600); }
.u-tease h3 { margin: 6px 0 8px; font-size: 20px; }
.u-lock-note { font-size: 12px; color: var(--u-slate); margin-top: 10px; }
.report-body.teased { filter: blur(6px); pointer-events: none; user-select: none; opacity: .9; }
