/* LABZ RC — Tuning Lab shared styles */
:root {
  --bg: #0b0c10; --bg2: #14171c; --card: #1a1d24; --line: #272b34;
  --ink: #efe8d8; --mid: #b9b4a6; --faint: #8b8f98;
  --accent: #1E88E5; --gold: #f2b705; --good: #5fc77a; --warn: #e8704a;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: 'Nunito', sans-serif; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--gold); } a:hover { color: #ffd23f; }

.tl-header { display: flex; align-items: center; gap: 16px; padding: 14px 24px; background: var(--bg2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.tl-header img { height: 28px; width: auto; display: block; }
.tl-header .title { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 13px; letter-spacing: .12em; color: var(--faint); text-transform: uppercase; }
.tl-header .spacer { flex: 1; }
.tl-header .back { font-family: 'Barlow Condensed', sans-serif; font-size: 13px; letter-spacing: .06em; color: var(--faint); text-decoration: none; }
.tl-header .back:hover { color: var(--ink); }

.tl-page { max-width: 1040px; margin: 0 auto; padding: 40px 20px 80px; }
.tl-eyebrow { font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; letter-spacing: .14em; font-size: 13px; color: var(--accent); }
h1 { font-family: 'Oswald', sans-serif; font-size: 2.3rem; line-height: 1.15; margin: 6px 0 12px; font-weight: 600; }
h2 { font-family: 'Oswald', sans-serif; font-size: 1.5rem; margin: 40px 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--accent); font-weight: 500; }
h3 { font-family: 'Barlow Condensed', sans-serif; font-size: 1.2rem; letter-spacing: .04em; text-transform: uppercase; margin: 22px 0 6px; color: var(--gold); }
p { margin: 0 0 12px; color: var(--mid); } p strong, li strong { color: var(--ink); }
.lead { font-size: 1.1rem; color: var(--ink); }
ul, ol { margin: 0 0 14px 22px; color: var(--mid); } li { margin-bottom: 6px; }
.meta { font-size: .85rem; color: var(--faint); margin-bottom: 20px; }

.callout { border-left: 4px solid var(--gold); background: var(--card); padding: 12px 16px; margin: 16px 0; border-radius: 0 6px 6px 0; }
.callout.warn { border-color: var(--warn); }
.callout p:last-child { margin-bottom: 0; }

.tbl-wrap { overflow-x: auto; margin: 12px 0 20px; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; min-width: 520px; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg2); font-family: 'Barlow Condensed', sans-serif; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; color: var(--faint); }
tr:last-child td { border-bottom: 0; } td { color: var(--mid); } td:first-child { color: var(--ink); font-weight: 600; }

.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0 20px; }
.vs > div { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.vs h4 { font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; letter-spacing: .08em; font-size: 1rem; margin-bottom: 6px; }
.vs .up h4 { color: #8fc1ff; } .vs .down h4 { color: #ffcf87; }
.vs ul { margin-bottom: 0; }
@media (max-width: 640px) { .vs { grid-template-columns: 1fr; } h1 { font-size: 1.8rem; } }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 18px; }
.chip { font-family: 'Barlow Condensed', sans-serif; letter-spacing: .06em; text-transform: uppercase; font-size: .85rem; border: 1px solid var(--accent); color: var(--accent); padding: 6px 14px; border-radius: 4px; text-decoration: none; background: transparent; cursor: pointer; }
.chip:hover, .chip.on { background: var(--accent); color: var(--bg); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin: 16px 0; }
.card { display: block; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 8px; padding: 16px; text-decoration: none; transition: transform .15s, border-color .15s; }
.card:hover { transform: translateY(-2px); border-color: var(--gold); }
.card .t { font-family: 'Oswald', sans-serif; font-size: 1.15rem; color: var(--ink); margin-bottom: 4px; }
.card .d { font-size: .9rem; color: var(--mid); }

.sw { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 8px; vertical-align: -2px; border: 1px solid rgba(255,255,255,.25); }

.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 50px; padding-top: 18px; border-top: 1px solid var(--line); font-family: 'Barlow Condensed', sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.tl-footer { text-align: center; color: var(--faint); font-size: 14px; margin-top: 50px; }
.tl-footer a { color: inherit; text-decoration: none; } .tl-footer a:hover { text-decoration: underline; }

/* Wizard */
.wiz { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin: 16px 0 28px; }
.wiz-step { margin-bottom: 14px; }
.wiz-step label { display: block; font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; letter-spacing: .1em; font-size: .85rem; color: var(--faint); margin-bottom: 6px; }
.wiz-out { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }

/* Diagram (to-scale buggy drawing) */
.diagram-wrap { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin: 10px 0 14px; }
.diagram-wrap svg { width: 100%; height: auto; display: block; }
.diagram-wrap .cap { fill: var(--faint); font: 600 13px 'Barlow Condensed', sans-serif; letter-spacing: .14em; text-anchor: middle; }
.diagram-wrap .end { fill: #5b606c; font: 600 12px 'Barlow Condensed', sans-serif; letter-spacing: .14em; text-anchor: middle; }
.diagram-wrap .tire { fill: #232730; stroke: #454b57; stroke-width: 2; }
.diagram-wrap .tire.ghost { fill: rgba(35,39,48,.35); }
.diagram-wrap .tread { stroke: #3a3f4b; stroke-width: 1.5; fill: none; }
.diagram-wrap .chassis { fill: #1d2128; stroke: #5a6170; stroke-width: 2; }
.diagram-wrap .part { fill: #262b35; stroke: #4b5260; stroke-width: 1.5; }
.diagram-wrap .arm { stroke: #7b8494; stroke-width: 3; }
.diagram-wrap .shaft2 { stroke: #3d434f; stroke-width: 3; }
.diagram-wrap .tower { stroke: #6a7282; stroke-width: 6; stroke-linecap: round; }
.diagram-wrap .body-line { fill: rgba(120,130,150,.06); stroke: #4a505c; stroke-width: 1.5; stroke-dasharray: 6 5; }
.diagram-wrap .ground { stroke: #6a7282; stroke-width: 2; }
.diagram-wrap .shaft { stroke: #9aa3b2; stroke-width: 3; }
.diagram-wrap .body { stroke: #5f6776; stroke-width: 9; stroke-linecap: round; }
.diagram-wrap .spring { fill: none; stroke: #c3cad6; stroke-width: 2; }
.diagram-wrap .leader { stroke: #3d434f; stroke-width: 1; stroke-dasharray: 3 3; }
.hot { cursor: pointer; outline: none; }
.hot .ring { fill: none; stroke-width: 2; opacity: .35; transition: opacity .12s; }
.hot .dot { stroke: var(--bg); stroke-width: 2; transition: r .12s; }
.hot.f .dot { fill: #4fc3f7; } .hot.f .ring { stroke: #4fc3f7; }
.hot.r .dot { fill: #f2b705; } .hot.r .ring { stroke: #f2b705; }
.hot.c .dot { fill: #b388ff; } .hot.c .ring { stroke: #b388ff; }
.hot:hover .dot, .hot:focus .dot { r: 13; }
.hot:hover .ring, .hot:focus .ring { opacity: .9; }
.hot text { fill: var(--bg); font: 700 11px 'Barlow Condensed', sans-serif; pointer-events: none; text-anchor: middle; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 6px 0; }
.key { font-family: 'Barlow Condensed', sans-serif; letter-spacing: .06em; text-transform: uppercase; font-size: .85rem; }
.key::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; background: currentColor; }
.key.f { color: #4fc3f7; } .key.r { color: var(--gold); } .key.c { color: #b388ff; }
.chip-row .chip { white-space: nowrap; }

/* Pop-up tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 10px; border-bottom: 1px solid var(--line); }
.tab { font-family: 'Barlow Condensed', sans-serif; letter-spacing: .06em; text-transform: uppercase; font-size: .9rem; background: none; border: 0; border-bottom: 3px solid transparent; color: var(--faint); padding: 8px 12px; cursor: pointer; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); border-bottom-color: var(--gold); }
.tab.f.on { border-bottom-color: #4fc3f7; } .tab.c.on { border-bottom-color: #b388ff; }
.compare { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.compare .cmp > h4 { font-family: 'Oswald', sans-serif; font-size: 1.05rem; margin: 0 0 6px; }
.compare .cmp.f > h4 { color: #4fc3f7; } .compare .cmp.r > h4 { color: var(--gold); } .compare .cmp.c > h4 { color: #b388ff; }
.compare .vs { grid-template-columns: 1fr; margin: 0; }

.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: none; align-items: center; justify-content: center; z-index: 200; padding: 16px; }
.modal-bg.open { display: flex; }
.modal { background: var(--bg2); border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: 10px; max-width: 760px; width: 100%; max-height: 88vh; overflow: auto; padding: 22px; }
.modal h3 { margin-top: 0; font-size: 1.4rem; }
.modal .x { float: right; background: none; border: 0; color: var(--faint); font-size: 28px; cursor: pointer; line-height: 1; }
.modal .x:hover { color: var(--ink); }
