/* flat6s – home page dashboard ([flat6s_dashboard]).
   Builds on flat6s.css (tokens, figures, tables, hex map); only the dashboard's own pieces are here.
   Fuel colours: blue, orange, aqua, yellow, violet and grey, checked for colour-blind separation
   in light and dark. */

.f6 {
  --f-pet: #2a78d6; --f-die: #eb6834; --f-hyb: #1baf7a; --f-phev: #eda100; --f-bev: #6250d6; --f-oth: #a3a8b0;
}
.f6[data-scheme="dark"] {
  --f-pet: #3987e5; --f-die: #d95926; --f-hyb: #199e70; --f-phev: #c98500; --f-bev: #9085e9; --f-oth: #5c636c;
}
@media (prefers-color-scheme: dark) {
  .f6[data-scheme="auto"] {
    --f-pet: #3987e5; --f-die: #d95926; --f-hyb: #199e70; --f-phev: #c98500; --f-bev: #9085e9; --f-oth: #5c636c;
  }
}
.f6 .key.f-pet, .f6 .mix .f-pet { background: var(--f-pet); }
.f6 .key.f-die, .f6 .mix .f-die { background: var(--f-die); }
.f6 .key.f-hyb, .f6 .mix .f-hyb { background: var(--f-hyb); }
.f6 .key.f-phev, .f6 .mix .f-phev { background: var(--f-phev); }
.f6 .key.f-bev, .f6 .mix .f-bev { background: var(--f-bev); }
.f6 .key.f-oth, .f6 .mix .f-oth { background: var(--f-oth); }

.f6-dash .hero .lede { margin-bottom: 18px; }
.f6-dash .figs { margin: 22px 0 28px; }
.f6-dash .fig dd { overflow-wrap: normal; white-space: nowrap; }
.f6-dash .fig dd small { white-space: normal; }
@media (min-width: 901px) { .f6-dash .fig.lead dd { font-size: 30px; } }
.f6-dash .chart.short { height: 270px; }
.f6-dash .sec h3 { margin-top: 14px; }
.f6-dash .go-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 4px; }
.f6-dash .btn-go { padding: 10px 18px; }
.f6-dash .btn-line { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--ink); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.f6-dash .btn-line:hover { color: var(--ink); background: var(--surface); text-decoration: none; }
.f6-dash td a { color: var(--ink); font-weight: 600; text-decoration: none; }
.f6-dash td a:hover { color: var(--accent); text-decoration: underline; }

/* fuel mix strip */
.f6 .mix { display: flex; height: 22px; gap: 2px; margin: 4px 0 8px; }
.f6 .mix i { display: block; height: 100%; min-width: 2px; }
.f6 .mix i:first-child { border-radius: 4px 0 0 4px; }
.f6 .mix i:last-child { border-radius: 0 4px 4px 0; }

/* ranked lists with bars */
.f6 .rbars { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 7px; counter-reset: rb; }
.f6 .rbars li { display: grid; grid-template-columns: 1.6em minmax(0, 11.5em) 1fr auto; gap: 10px; align-items: center; counter-increment: rb; font-size: 14px; margin: 0; }
.f6 .rbars li::before { content: counter(rb); font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.f6 .rbars a { color: var(--ink); text-decoration: none; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.f6 .rbars a:hover { color: var(--accent); text-decoration: underline; }
.f6 .rbars .track { height: 12px; min-width: 0; }
.f6 .rbars .track i { display: block; height: 100%; background: var(--s-lic); border-radius: 0 3px 3px 0; min-width: 2px; }
.f6 .rbars .val { font-family: var(--f-mono); font-size: 13px; text-align: right; min-width: 6.5em; }

/* MOT best / worst */
.f6 .dash-mot { list-style: none; display: grid; gap: 8px; margin: 0; padding: 0; }
.f6 .dash-mot li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; align-items: baseline; font-size: 14px; margin: 0; }
.f6 .dash-mot li > span:first-child { min-width: 0; }
.f6 .dash-mot a { color: var(--ink); font-weight: 600; text-decoration: none; }
.f6 .dash-mot a:hover { color: var(--accent); text-decoration: underline; }
.f6 .dash-mot small { color: var(--muted); font-size: 12px; }
.f6 .dash-mot small.up { color: var(--up); } .f6 .dash-mot small.down { color: var(--down); }
.f6 .dash-mot .val { font-family: var(--f-mono); font-size: 13px; text-align: right; }
/* map with its legend underneath (it sits in a half-width column) */
.f6 .dash-hex { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 6px; }
.f6 .dash-hex .hexbox { max-width: 380px; }
.f6 .dash-hex .hexlegend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.f6 .dash-hex .note { margin-top: 8px; }

/* did you know + car of the week */
.f6 .facts-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 6px; }
.f6 .facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.f6 .facts li { padding: 14px 0; border-top: 1px solid var(--rule); font-size: 15px; color: var(--ink-2); margin: 0; }
.f6 .facts li strong { display: block; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.f6 .facts a { color: inherit; }
.f6 .cotw { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 18px 20px 20px; }
.f6 .cotw h3 { font-size: 26px; font-variation-settings: "wdth" 120; font-weight: 800; margin: 2px 0; line-height: 1.05; }
.f6 .cotw h3 span { display: block; font-size: 15px; font-weight: 600; color: var(--ink-2); font-variation-settings: "wdth" 100; }
.f6 .cotw p { color: var(--ink-2); font-size: 15px; margin: 8px 0 12px; }
.f6 .cotw .spark-lg { width: 100%; height: 70px; display: block; margin: 6px 0 2px; }
.f6 .cotw .axis { display: flex; justify-content: space-between; gap: 8px; font-family: var(--f-mono); font-size: 11px; color: var(--muted); }
.f6 .cotw dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; margin: 12px 0 0; border-top: 1px solid var(--rule); }
.f6 .cotw dl div { padding-top: 8px; min-width: 0; }
.f6 .cotw dt { font-size: 12px; color: var(--muted); }
.f6 .cotw dd { margin: 2px 0 0; font-family: var(--f-display); font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (max-width: 900px) {
  .f6 .facts-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .f6-dash .chart.short { height: 250px; }
  .f6 .rbars li { grid-template-columns: 1.4em minmax(0, 8.5em) 1fr auto; gap: 8px; }
  .f6 .rbars .val { min-width: 5em; }
  .f6 .facts { grid-template-columns: 1fr; }
}
