/* spec.css: components for the spec case studies.
   Loads after styles.css and only adds new classes. Mobile-up. */

.spec-note{background:var(--mint-pale);border-radius:8px;padding:1rem;font-size:var(--step--1);max-width:44rem}
.spec-note p{margin:0;max-width:none}
.gap ul{margin:.5rem 0 0;padding-left:1.1rem}.gap li{max-width:none}

.stages{list-style:none;counter-reset:st;padding:0;margin:var(--space-m) 0 0;display:grid;gap:.5rem}
.stages li{counter-increment:st;background:var(--surface);border-radius:8px;padding:.75rem 1rem;font-weight:700;font-size:var(--step--1);max-width:none;display:flex;gap:.75rem;align-items:baseline}
.stages li::before{content:counter(st);color:var(--accent);font-weight:800}
.stages span{font-weight:400;color:var(--ink-soft)}

.scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;margin-block:var(--space-m)}
.grid-table{border-collapse:collapse;width:100%;min-width:34rem;font-size:var(--step--1);background:var(--surface);border-radius:8px}
.grid-table th,.grid-table td{text-align:left;padding:.7rem .75rem;border-bottom:1px solid var(--rule);vertical-align:top}
.grid-table thead th{color:var(--ink-soft);font-weight:600}
.grid-table td.num,.grid-table th.num{text-align:right;font-feature-settings:"tnum" 1}
.grid-table tr.top td{font-weight:700}
.grid-table tr:last-child td{border-bottom:0}

.findings{display:grid;gap:var(--space-s);list-style:none;padding:0;margin:var(--space-m) 0}
.findings li{background:var(--surface);border-radius:8px;padding:1rem;max-width:none}
.findings h3{font-size:var(--step-0);margin-bottom:.35rem}
.findings p{font-size:var(--step--1);color:var(--ink-soft);margin:0;max-width:none}

.tests{display:grid;gap:var(--space-s);margin-block:var(--space-m)}
.test{background:var(--surface);border-radius:10px;padding:1.1rem}
.test h3{font-size:var(--step-0);margin-bottom:.4rem}
.test p{font-size:var(--step--1);max-width:none}
.arms{list-style:none;padding:0;margin:.75rem 0;display:grid;gap:.4rem}
.arms li{font-size:var(--step--1);padding:.55rem .75rem;border-radius:6px;background:var(--bg);max-width:none}
.arms b{display:inline-block;min-width:5.5rem}
.test dl{margin:0;display:grid;gap:.3rem;font-size:var(--step--1)}
.test dt{color:var(--ink-soft);font-weight:600}.test dd{margin:0 0 .4rem}

.device-row{display:flex;gap:1.25rem;overflow-x:auto;padding:.5rem .25rem 1rem;margin-block:var(--space-m);scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
.device-wrap{flex:0 0 auto;width:250px;scroll-snap-align:start;margin:0}
.device-wrap figcaption{font-size:.875rem;color:var(--ink-soft);margin-top:.6rem}
.device-wrap figcaption b{color:var(--ink);display:block}
.device{border-radius:30px;padding:9px;background:#0b1114;box-shadow:0 18px 40px -22px rgba(14,43,48,.55)}
.screen{border-radius:22px;overflow:hidden;height:500px;position:relative;font-size:11px;line-height:1.35;display:flex;flex-direction:column}
.screen>.body{flex:1;overflow:hidden;padding:10px;display:grid;gap:8px;align-content:start}
.m-top{display:flex;justify-content:space-between;align-items:center;padding:9px 10px;font-weight:800;font-size:12px}
.m-h{font-weight:800;font-size:12px}
.m-sub{opacity:.7;font-size:10px}
.m-img{border-radius:8px;height:92px;display:flex;align-items:flex-end;padding:7px;font-weight:700}
.m-img.tall{height:130px}.m-img.short{height:54px}
.m-row{display:flex;gap:7px;align-items:center}
.m-thumb{flex:0 0 38px;height:38px;border-radius:6px}
.m-grow{flex:1;min-width:0}
.m-btn{border-radius:7px;padding:8px;text-align:center;font-weight:800}
.m-pill{display:inline-block;border-radius:99px;padding:3px 8px;font-weight:700;font-size:10px}
.m-card{border-radius:10px;padding:9px;display:grid;gap:7px}
.m-tiles{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.m-tiles .m-img{height:58px;font-size:10px}
.m-sticky{padding:8px 10px;display:flex;gap:8px;align-items:center;justify-content:space-between}
.m-meter{height:7px;border-radius:9px;overflow:hidden}.m-meter i{display:block;height:100%}
.m-new{outline:2px solid #BD243D;outline-offset:2px}
.stars{color:#f5b942;letter-spacing:1px}

.t-steam{background:#16202b;color:#dfe8ee}
.t-steam .m-top{background:#0f1720}
.t-steam .m-img{background:linear-gradient(135deg,#2c4a63,#17324a)}
.t-steam .m-img.b{background:linear-gradient(135deg,#5a3d6b,#2a2145)}
.t-steam .m-img.c{background:linear-gradient(135deg,#3f6b55,#1c3a33)}
.t-steam .m-thumb{background:#2c4a63}
.t-steam .m-card{background:#1e2c3a}
.t-steam .m-btn,.t-steam .m-pill.on{background:#7EDDC7;color:#0E2B30}
.t-steam .m-pill{background:#26384a}
.t-steam .m-sticky{background:#0f1720;border-top:1px solid #2c4a63}

.t-prime{background:#0d1620;color:#e9eef3}
.t-prime .m-top{background:#0a1118}
.t-prime .m-img{background:linear-gradient(160deg,#274a6b,#0d1620)}
.t-prime .m-thumb{background:#274a6b}
.t-prime .m-card{background:#172534}
.t-prime .m-btn{background:#fff;color:#0d1620}
.t-prime .m-btn.alt{background:#03A9CD;color:#04222b}
.t-prime .m-pill{background:#22364a}

.t-rejuv{background:#fbfaf6;color:#2b2a26}
.t-rejuv .m-top{border-bottom:1px solid #e4e0d5;letter-spacing:.12em;font-weight:700}
.t-rejuv .m-img{background:linear-gradient(160deg,#d9d2c2,#b9b09c);color:#2b2a26}
.t-rejuv .m-img.scene{background:linear-gradient(160deg,#c9d3c3,#8fa48f)}
.t-rejuv .m-thumb{background:#d9d2c2}
.t-rejuv .m-card{background:#f1eee5}
.t-rejuv .m-btn{background:#2b2a26;color:#fbfaf6}
.t-rejuv .m-btn.ghost{background:transparent;color:#2b2a26;border:1px solid #2b2a26}
.t-rejuv .m-pill{background:#e4e0d5}.t-rejuv .m-pill.on{background:#2b2a26;color:#fbfaf6}

.t-chorus{background:#F4FAEC;color:#0E2B30}
.t-chorus .m-top{background:#0E2B30;color:#CCFFE4}
.t-chorus .m-img{background:linear-gradient(140deg,#03A9CD,#7EDDC7);color:#0E2B30}
.t-chorus .m-img.b{background:linear-gradient(140deg,#BD243D,#f08a7a);color:#fff}
.t-chorus .m-thumb{background:#7EDDC7;border-radius:50%}
.t-chorus .m-card{background:#fff}
.t-chorus .m-btn{background:#BD243D;color:#fff}
.t-chorus .m-btn.alt{background:#0E2B30;color:#CCFFE4}
.t-chorus .m-pill{background:#CCFFE4}
.t-chorus .m-meter{background:#dfeedd}.t-chorus .m-meter i{background:#03A9CD}.t-chorus .m-meter.money i{background:#BD243D}

.loop{list-style:none;counter-reset:lp;padding:0;margin:var(--space-m) 0;display:grid;gap:.5rem}
.loop li{counter-increment:lp;background:var(--surface);border-radius:8px;padding:.8rem 1rem;max-width:none;font-size:var(--step--1);position:relative}
.loop li::before{content:counter(lp) ". ";font-weight:800;color:var(--accent)}
.loop li b{font-weight:700}
.loop li:last-child{background:var(--mint-pale)}

.team{display:grid;gap:var(--space-s);margin-block:var(--space-m);list-style:none;padding:0}
.team li{background:var(--surface);border-radius:10px;padding:1rem;max-width:none}
.team li.lead{background:var(--ink);color:var(--bg)}
.team li.lead p{color:var(--mint-pale)}
.team h3{font-size:var(--step-0);margin-bottom:.3rem}
.team p{font-size:var(--step--1);color:var(--ink-soft);margin:0;max-width:none}

.canvas{background:var(--surface);border-radius:10px;padding:1rem;margin-block:var(--space-m)}
.canvas svg{width:100%;height:auto;min-width:30rem;display:block}
.canvas text{font-family:inherit;font-size:11px;fill:var(--ink-soft)}
.canvas .axis{stroke:var(--rule);stroke-width:1}
.legend{list-style:none;padding:0;margin:.75rem 0 0;display:flex;flex-wrap:wrap;gap:.4rem 1rem;font-size:.875rem}
.legend li{display:flex;align-items:center;gap:.4rem}
.legend i{display:inline-block;width:22px;height:0;border-top:3px solid}
.legend i.dash{border-top-style:dashed}.legend i.dot{border-top-style:dotted}

.split{display:grid;gap:var(--space-m)}
.next{display:flex;flex-wrap:wrap;gap:.75rem;margin-top:var(--space-m)}

@media (min-width:48rem){
  .stages{grid-template-columns:repeat(5,1fr)}
  .stages li{flex-direction:column;gap:.15rem}
  .findings,.tests{grid-template-columns:1fr 1fr}
  .team{grid-template-columns:repeat(3,1fr)}
  .team li.lead{grid-column:1/-1}
  .split{grid-template-columns:1fr 1fr;align-items:start}
  .loop{grid-template-columns:repeat(3,1fr)}
}
@media (min-width:64rem){
  .device-row{overflow:visible;flex-wrap:wrap}
}
