/* CarGrader Redesign — 2025-09-10 */
@font-face{
  font-family:'Fredoka';
  src:url('../fonts/Fredoka-SemiBold.ttf') format('truetype');
  font-weight:600; font-style:normal; font-display:swap;
}
@font-face{
  font-family:'Fredoka';
  src:url('../fonts/Fredoka-Bold.ttf') format('truetype');
  font-weight:700; font-style:normal; font-display:swap;
}
@font-face{
  font-family:'Open Sans';
  src:url('../fonts/OpenSans-Regular.ttf') format('truetype');
  font-weight:400; font-style:normal; font-display:swap;
}
@font-face{
  font-family:'Open Sans';
  src:url('../fonts/OpenSans-SemiBold.ttf') format('truetype');
  font-weight:600; font-style:normal; font-display:swap;
}

:root{
  --bg: #0f0b17;
  --surface: #171228;
  --text: #f5f8ff;
  --muted: #c9c7d9;
  --primary: #3b1e6d;
  --primary-600: #522e93;
  --accent: #efc362;
  --accent-600: #d7ae52;
  --ring: rgba(239,195,98,.25);
  --border: #2a2046;
  --gap: 16px;
  --radius: 16px;
}

/* ===== Full-bleed Hero ===== */
.hero{
  position:relative;
  width:100vw;
  height:520px;
  left:50%;
  right:50%;
  margin-left:-50vw;
  margin-right:-50vw;
  background:url('../img/banner.png') center/cover no-repeat;
  border-bottom:1px solid var(--border);
  box-shadow: 0 12px 36px rgba(0,0,0,.45);
}
@media (min-width: 1200px){
  .hero{ height:600px; }
}

.hero__overlay{
  pointer-events: none;
  position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.45) 65%, rgba(0,0,0,.55) 100%);
}

.hero__inner{
  position:relative;
  height:100%;
  max-width:1100px;
  margin:0 auto;
  padding:24px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:14px;
}

/* Big centered "CarGrader" at the top */
.hero__brand{
  margin:24px 0 0 0;
  text-align:center;
  font-family:'Fredoka', sans-serif;
  font-weight:700;
  font-size:120px;
  letter-spacing:1px;
  color:#fff;
  text-shadow: 0 6px 24px rgba(0,0,0,.5);
}
@media (max-width: 800px){
  .hero__brand{ font-size:72px; }
}
@media (max-width: 500px){
  .hero__brand{ font-size:48px; }
}

/* Purple pill button just below the title */
.hero__auth{
  background:var(--primary-600);
  border:1px solid var(--primary-600);
  color:#fff;
  padding:8px 18px;
  font-weight:700;
  font-size:18px;
  border-radius:999px;
  box-shadow:0 6px 16px rgba(0,0,0,.28);
  cursor:pointer;

  width:auto;            /* shrink-wrap to text */
  display:inline-block;  /* no full-width flex growth */
}
.hero__auth:hover{
  background:var(--primary);
  border-color:var(--primary);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; 
  background:#000; /* was linear-gradient(...) */
  color:var(--text);
  font-family:'Open Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.container{
  max-width:1100px; margin:0 auto; padding:16px;
}

.panel{
  background: transparent; 
  border: 2px solid var(--primary-600); /* thin purple outline */
  border-radius: var(--radius);
  padding:18px;
  box-shadow: none;  /* remove heavy shadow */
}
.grid{ display:grid; grid-template-columns: 1fr; gap: var(--gap); }
@media (min-width: 980px){
  .grid-2{ grid-template-columns: 1fr 1fr; }
}

.controls{
  display:grid;
  grid-template-columns: 1fr;     /* stack vertically */
  gap: 18px;
  max-width: 560px;               /* comfortable width like your mock */
  margin: 24px auto 0;            /* center the whole block */
}
label{ font-weight:600; font-size:14px; color:var(--muted); display:block; margin:0 0 6px; }
select, button, input{
  width:100%; padding:12px 14px; border-radius:12px; background:#0e0a18; color:var(--text);
  border:1px solid var(--border); outline:none; font-size:16px;
}
select:focus, input:focus{ box-shadow:0 0 0 6px var(--ring); border-color:var(--accent); }
.primary{
  background:var(--primary-600); border-color:var(--primary-600); font-weight:700; cursor:pointer;
}
.primary:hover{ background:var(--primary); }
.primary:disabled{ opacity:.5; cursor:not-allowed; }

.scorecard{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
}
.kpi{
  flex:1; text-align:center; padding:16px; border-radius:12px; background:#0f0b1a; border:1px solid var(--border);
}
.kpi .label{ color:var(--muted); font-size:14px; margin-bottom:4px; }
.kpi .value{ font-size:40px; font-weight:700; font-family:'Fredoka', sans-serif; }

.box{
  border-radius: var(--radius);
  overflow: clip;
  background: transparent;
  border: 2px solid var(--primary-600); /* same purple outline as selects */
}
.box + .box{ margin-top: var(--gap); }
.box__header{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px; cursor:pointer; background:rgba(255,255,255,.02);
}
.box__title{ font-weight:700; letter-spacing:.2px; }
.box__toggle{
  width:32px; height:32px; display:grid; place-items:center; border-radius:8px;
  border:1px solid var(--border); background:#0e0a18; color:var(--text); font-size:18px; font-weight:700;
}
.box__content{ padding: 16px 18px 20px 18px; display:none; }
.box.open .box__content{ display:block; }
.box.open .box__toggle{ color:#fff; background:var(--primary-600); border-color:var(--primary-600); }

ul.simple{ margin:0; padding-left:18px; }
.err{ margin:8px 0 0 0; color:#ffb3b3; display:none; }

.badge{
  display:inline-block; padding:4px 8px; border-radius:999px; border:1px solid var(--border);
  color:var(--muted); font-size:12px;
}
/* Purple-outlined selects on black */
.controls select{
  width: 100%;
  background: transparent;            /* black background shows through */
  color: #fff;
  border: 2px solid var(--primary-600); /* solid purple outline */
  border-radius: 10px;
  padding: 12px 14px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* Focus glow in your purple family */
.controls select:focus{
  box-shadow: 0 0 0 3px rgba(82, 46, 147, 0.35);
  border-color: var(--primary-600);
}

/* Label above-left, slightly bolder */
.controls label{
  display:block;
  color:#fff;
  font-weight:700;
  font-size:16px;
  margin-bottom:6px;
}
/* === Dropdown list (the opened menu) ===
   Make options readable on a dark theme */
.controls select option{
  background:#000;   /* black dropdown panel */
  color:#fff;        /* white text */
}

/* Optional: purple highlight when hovering/selected (browser support varies) */
.controls select option:hover,
.controls select option:checked{
  background: var(--primary-600);
  color:#fff;
}
/* Dim placeholder options so they look like placeholders */
.controls select option[disabled],
.controls select option[value=""]{
  color: rgba(255,255,255,.7);
}

/* Keep disabled selects obviously disabled */
.controls select:disabled{
  border-color: var(--border);
  color: rgba(255,255,255,.7);
  cursor: not-allowed;
}
.btn-get{
  display:block;
  margin: 6px auto 0;              /* centers horizontally */
  background: var(--primary-600);
  border: 1px solid var(--primary-600);
  color:#fff;
  font-weight:800;
  font-size:18px;                  /* a bit larger */
  padding:12px 22px;               /* taller/wider */
  border-radius:999px;             /* pill */
  box-shadow:0 6px 16px rgba(0,0,0,.28);
  cursor:pointer;
  width: fit-content;              /* prevents the “super wide” button */
}
.btn-get:hover{
  background: var(--primary);
  border-color: var(--primary);
}
.btn-get:active{ transform: translateY(1px); }

/* Keep placeholder/disabled states readable */
.controls select:disabled{
  border-color: var(--border);
  color: rgba(255,255,255,.7);
  cursor: not-allowed;
}

/* If your first option is a placeholder, dim it */
.controls select option[disabled],
.controls select option[value=""]{
  color: rgba(255,255,255,.7);
}
/* === Results (Score area) === */
.results.hero-centered{
  max-width: 900px;
  margin: 48px auto 0;
  text-align: center;
}

.results__title{
  color:#fff;
  font-family:'Fredoka', sans-serif;
  font-weight:700;
  font-size: clamp(32px, 5vw, 56px); /* big, responsive */
  margin: 36px 0 12px 0;
  letter-spacing:.2px;
}

.results__label{
  color: var(--primary-600);
  font-weight:800;
  font-size: clamp(16px, 2vw, 24px); /* matches Canva “Score” / “Out of 100” size */
  margin: 8px 0;
}

.results__value{
  color:#fff;
  font-family:'Fredoka', sans-serif;
  font-weight:800;
  font-size: clamp(72px, 12vw, 160px); /* very large white number */
  line-height: 1.05;
  margin: 6px 0 6px 0;
  text-shadow: 0 4px 18px rgba(0,0,0,.35);
}

.results__certainty{
  display:inline-flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 12px;
}

.results__certainty-btn{
  background: none;
  border: none;
  padding: 0;
  color: var(--primary-600);  /* purple word */
  font-weight: 800;
  font-size: clamp(18px, 2vw, 28px);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.results__certainty-btn:hover{
  color: var(--primary);
}

.results__certainty-pct{
  color: #fff;
  font-weight: 800;
  font-size: clamp(18px, 2vw, 28px);
}

.results__blurb{
  margin: 14px auto 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
}
.no-data-message {
  color: var(--accent);          /* your yellow */
  font-weight: 700;
  font-size: 32px;               /* same size as YMM */
  text-align: center;
  margin-top: 16px;
}

/* === Trims table === */
.trims-table {
  margin-top: 8px;
}

/* === Trims table === */
.trims-table {
  margin-top: 8px;
}

.trims-table table {
  width: 100%;
  border-collapse: collapse;       /* collapse borders for header line */
  border-spacing: 0;              /* remove row gaps since we'll use borders */
}

.trims-table thead th {
  color: var(--primary-600);       /* purple column headers */
  font-weight: 800;
  font-size: 20px;
  text-align: left;
  padding: 0 8px 10px 8px;        /* extra bottom padding for spacing */
  border-bottom: 2px solid var(--primary-600); /* line under header */
}

.trims-table thead th:nth-child(2),
.trims-table thead th:nth-child(3) {
  text-align: center;              /* Count and % centered */
}

.trims-table tbody td {
  color: #fff;
  font-size: 22px;
  padding: 12px 8px;
  vertical-align: middle;
}

.trims-table tbody td.num {        /* numeric cells */
  text-align: center;
  white-space: nowrap;
}

.trims-table tbody tr + tr td {
  border-top: 12px solid transparent; /* space between rows without full border */
}

.history-canvas{
  width: 100%;
  display: block;
}
/* Footer */
.site-footer{
  max-width: 1100px;
  margin: 48px auto 100px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-links{
  display: flex;
  flex-direction: column; /* stack vertically */
  gap: 8px;
  align-items: center;
}

/* Reuse the Certainty button look; just tweak spacing */
.footer-btn{
  /* inherits purple underline etc. from .results__certainty-btn */
  font-size: 16px;
  padding: 2px 0;
}
.legal-title { 
  color: var(--accent);       /* yellow header */
  font-weight: 800; 
  font-size: 36px; 
  margin: 12px 0 18px 0; 
  text-align: left; 
}
