/* Inspired by Pantone 2026 Cloud Dancer and S/S 2026 Alexandrite; sRGB approximations for screen use. */
:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  color: #27383c;
  background: #f0eee9;
  --ink: #27383c;
  --muted: #596d70;
  --line: #deddd6;
  --accent: #00666c;
  --accent-strong: #00565b;
  --focus: #3aa8a0;
  --surface: #fffdfa;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% -10%, rgba(80, 164, 153, .12), transparent 34rem),
    radial-gradient(circle at 100% 20%, rgba(203, 185, 153, .13), transparent 36rem),
    #f0eee9;
}
button, input, select { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 5; background: #fff; padding: 10px; }
.skip:focus { left: 8px; }
.shell { width: min(100%, 1200px); padding: 0 28px; margin: auto; }
.site-header { min-height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(91, 117, 110, .22); }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark {
  width: 45px; height: 45px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(145deg, #073c42, #00666c); color: #f0eee9;
  box-shadow: 0 8px 17px rgba(4, 79, 79, .18); font-size: 13px; font-weight: 900; letter-spacing: -.04em;
}
.brand div { display: flex; flex-direction: column; gap: 2px; }
.brand strong { font-size: 18px; letter-spacing: -.02em; }
.brand div span, .edition { color: #596d70; font-size: 13px; }
.edition { font-weight: 600; letter-spacing: .01em; }
.intro { padding: 32px 0 25px; }
.intro h1 { margin: 0 0 9px; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.2; letter-spacing: -.04em; color: #27383c; }
.intro p { margin: 0; color: #5f7374; font-size: 15px; line-height: 1.6; }
.workbench { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(310px, .85fr); align-items: stretch; gap: 20px; }
.panel, .details { border: 1px solid var(--line); box-shadow: 0 12px 35px rgba(55, 69, 56, .07); }
.panel { background: var(--surface); border-radius: 20px; }
.inputs, .result, .compare { padding: 26px; }
.section-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 21px; }
.section-heading h2 { margin: 0; font-size: 19px; line-height: 1.3; letter-spacing: -.025em; }
.step { width: 31px; height: 31px; border-radius: 9px; display: inline-grid; place-items: center; flex: none; background: #dcece6; color: #00565b; font-size: 12px; font-weight: 800; }
.heading-actions { justify-content: space-between; }
.heading-label { display: flex; align-items: center; gap: 11px; }
.text-button { padding: 7px 2px; border: 0; background: none; color: var(--accent-strong); cursor: pointer; font-size: 14px; font-weight: 700; }
.text-button:hover { text-decoration: underline; }
.text-button:focus-visible, .details summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 5px; }
.tire-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tire-card { min-width: 0; margin: 0; padding: 17px; border: 1px solid #e3dfd7; border-radius: 15px; background: linear-gradient(160deg, #f7f4ed, #fffdfa 75%); }
.tire-card#newCard { border-color: #c7ddd3; background: linear-gradient(160deg, #ebf5f0, #fffdfa 75%); }
.tire-card legend { float: left; width: 100%; padding: 0 0 12px; font-size: 16px; font-weight: 760; color: #675f53; }
.tire-card#newCard legend { color: #00666c; }
.tire-card label, .custom-field label, .override-field label { display: block; margin: 13px 0 7px; font-size: 14px; font-weight: 650; }
.tire-card select, .tire-card input:not([type="checkbox"]), .number-wrap input, .wheel-control input, .wheel-control select {
  width: 100%; height: 44px; padding: 0 12px; outline: none; border: 1px solid #d2d6ce; border-radius: 9px;
  color: var(--ink); background: #fff; transition: border-color .16s, box-shadow .16s;
}
.tire-card select:disabled { color: #758683; background: #f1f0eb; }
.tire-card select:focus, .tire-card input:focus, .number-wrap input:focus, .wheel-control input:focus, .wheel-control select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 102, 108, .18);
}
.custom-field label span, .override-field label span { color: #73827d; font-weight: 400; }
.tire-card .override-toggle { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: #3e6463; font-size: 13px; cursor: pointer; }
.override-toggle input, .other-change input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); flex: none; }
.diameter { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 16px; padding: 11px 12px; border-radius: 9px; background: #f0ece4; color: #66716d; font-size: 14px; }
#newCard .diameter { background: #e2f1ea; }
.diameter strong { color: #565f5c; font-size: 15px; font-variant-numeric: tabular-nums; }
#newCard .diameter strong { color: #00666c; }
.teeth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 21px; padding-top: 20px; border-top: 1px solid #e5e3dc; }
.teeth-row label { font-size: 15px; font-weight: 750; }
.teeth-row p { margin: 5px 0 0; color: #647674; font-size: 13px; }
.number-wrap { width: 126px; position: relative; flex: none; }
.number-wrap input { padding-right: 34px; font-weight: 700; }
.number-wrap span { position: absolute; top: 12px; right: 12px; color: #6e807c; font-size: 14px; pointer-events: none; }
.input-hint { margin: 16px 0 0; color: #617371; font-size: 13px; line-height: 1.6; }
.error { margin: 8px 0; color: #a52b3e; font-size: 13px; }
.result {
  position: relative; overflow: hidden; display: flex; flex-direction: column; color: #254746;
  border-color: #c5ded4; background: linear-gradient(150deg, #f8fbf7 0%, #eef7f1 58%, #e6f2eb 100%);
  box-shadow: 0 12px 35px rgba(25, 91, 80, .08);
}
.result::before { content: ""; position: absolute; right: -76px; top: -95px; width: 240px; height: 240px; border: 1px solid rgba(0, 102, 108, .13); border-radius: 50%; box-shadow: 0 0 0 38px rgba(0, 102, 108, .025), 0 0 0 79px rgba(0, 102, 108, .018); pointer-events: none; }
.result > * { position: relative; }
.result .section-heading h2 { color: #254746; }
.result .step { color: #00565b; background: #d8ede4; }
.empty { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; min-height: 290px; text-align: center; }
.empty-ring { width: 82px; height: 82px; margin-bottom: 22px; border: 8px dashed #a5d3c4; border-radius: 50%; }
.empty strong { font-size: 19px; }
.empty p { margin: 7px 0; color: #516b65; font-size: 14px; }
.answer { padding: 17px 0 22px; }
.eyebrow { color: #4d716c; font-size: 14px; }
.answer-value { display: flex; align-items: baseline; gap: 9px; margin-top: 5px; }
.answer-value strong { color: #00666c; font-size: clamp(72px, 9vw, 108px); font-weight: 770; letter-spacing: -.08em; line-height: 1.04; font-variant-numeric: tabular-nums; }
.answer-value span { color: #3e6c68; font-size: 20px; }
.answer p { margin: 13px 0 0; color: #285e5d; font-size: 14px; }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; padding: 20px 0; border-top: 1px solid #cbded4; }
.metrics div { display: flex; flex-direction: column; gap: 8px; }
.metrics span { color: #516b65; font-size: 13px; }
.metrics strong { font-size: 21px; font-variant-numeric: tabular-nums; }
.formula { padding: 13px 14px; border: 1px solid #d4e5dc; border-radius: 10px; background: rgba(255, 253, 250, .68); color: #45615c; font-size: 13px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.compare { margin-top: 20px; }
.compare .section-heading { align-items: flex-start; }
.compare .section-heading p { margin: 5px 0 0; color: #637672; font-size: 13px; line-height: 1.5; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
th { color: #5f716e; background: #f4f3ed; font-size: 13px; font-weight: 700; }
th, td { padding: 13px 16px; border-bottom: 1px solid #e7e6df; }
td { font-size: 15px; }
td:first-child { font-weight: 750; }
.best-row { background: #e7f3ec; }
.best-tag { display: inline-block; margin-left: 9px; padding: 3px 7px; border-radius: 6px; background: #cce8da; color: #00565b; font-size: 12px; }
.try-row { display: flex; align-items: center; gap: 18px; margin-top: 20px; }
.try-row label { font-size: 14px; font-weight: 700; }
.try-row output { color: #00565b; font-size: 14px; }
.details { margin-top: 18px; padding: 0 24px; border-radius: 16px; background: #fff; }
.details summary { padding: 18px 0; cursor: pointer; color: #2d4a49; font-size: 15px; font-weight: 700; list-style-position: inside; }
.details[open] summary { color: #00666c; }
.details-body { padding: 4px 0 15px; border-top: 1px solid #e7e6df; color: #596f6d; font-size: 14px; line-height: 1.75; }
.details-body p { margin: 12px 0; }
.wheel-compare .details-body > p { margin-bottom: 18px; }
.wheel-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 16px; }
.wheel-control { display: flex; flex-direction: column; min-width: 0; gap: 7px; }
.wheel-control label { color: #2d4a49; font-size: 14px; font-weight: 650; }
.other-change { display: flex; align-items: center; gap: 8px; min-height: 44px; color: #2d4a49; font-size: 14px; font-weight: 650; cursor: pointer; }
.wheel-result { margin-top: 18px; padding: 14px 16px; border-radius: 10px; color: #00565b; background: #e8f3ed; line-height: 1.6; font-variant-numeric: tabular-nums; }
.wheel-result.warning { color: #905027; background: #fff3e8; }
footer { padding: 28px 0 36px; color: #677b77; font-size: 12px; text-align: center; }
@media (max-width: 850px) {
  .workbench { grid-template-columns: 1fr; }
  .result { min-height: 260px; }
  .empty { min-height: 170px; }
  .answer-value strong { font-size: 78px; }
}
@media (max-width: 700px) { .wheel-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .shell { padding: 0 14px; }
  .site-header { min-height: 68px; }
  .edition { display: none; }
  .intro { padding: 25px 3px 20px; }
  .intro p { font-size: 14px; }
  .panel { border-radius: 16px; }
  .inputs, .result, .compare { padding: 19px; }
  .tire-grid, .wheel-controls { grid-template-columns: 1fr; }
  .tire-card { padding: 15px; }
  .tire-card select, .tire-card input:not([type="checkbox"]), .number-wrap input, .wheel-control input, .wheel-control select { font-size: 16px; }
  .diameter { padding: 10px 12px; }
  .try-row { flex-wrap: wrap; gap: 10px; }
  .try-row output { width: 100%; }
  .details { padding: 0 18px; }
  th, td { padding: 12px 8px; font-size: 13px; }
}
@media (prefers-reduced-motion: no-preference) {
  .panel { transition: box-shadow .2s ease; }
  .tire-card:focus-within { box-shadow: 0 6px 20px rgba(0, 102, 108, .12); }
}
