@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  --bg: #f7f7f4;
  --surface: #ffffff;
  --surface-2: #f0f1ed;
  --ink: #171815;
  --muted: #6e7169;
  --line: #dfe1da;
  --accent: #f0642b;
  --accent-soft: #fff0e8;
  --accent-ink: #8c2e0d;
  --success: #2d7a4b;
  --shadow: 0 24px 70px rgba(31, 33, 27, 0.10);
  --radius-lg: 28px;
  --radius-md: 18px;
  --shell: 1120px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 0%, rgba(240, 100, 43, .07), transparent 28rem),
    var(--bg);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

a { color: inherit; }

.shell {
  width: min(calc(100% - 40px), var(--shell));
  margin-inline: auto;
}

.site-header {
  width: min(calc(100% - 40px), var(--shell));
  margin: 0 auto;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  letter-spacing: -.03em;
  font-size: 19px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: white;
}

.brand-mark svg { width: 21px; height: 21px; }
.brand-mark.small { width: 30px; height: 30px; border-radius: 9px; }
.brand-mark.small svg { width: 18px; height: 18px; }

.text-button, .footer-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
}

.text-button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e0a52e;
  box-shadow: 0 0 0 4px rgba(224, 165, 46, .12);
}

.status-dot.calibrated {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(45, 122, 75, .12);
}

.hero {
  padding: 92px 0 68px;
  text-align: center;
}

.eyebrow, .section-kicker {
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 17px auto 22px;
  max-width: 860px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(54px, 8vw, 104px);
  line-height: .93;
  letter-spacing: -.068em;
}

.hero h1 span { color: var(--accent); }

.hero-copy {
  max-width: 660px;
  margin: 0 auto;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.65;
  color: var(--muted);
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-button, .secondary-button, .small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.primary-button {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: white;
  padding: 14px 22px;
  box-shadow: 0 8px 22px rgba(23, 24, 21, .14);
}

.primary-button:hover, .secondary-button:hover, .small-button:hover { transform: translateY(-1px); }

.primary-button.compact { border-radius: 14px; padding: 12px 16px; }
.primary-button.full { width: 100%; border-radius: 14px; margin-top: 16px; }

.secondary-button {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.62);
  color: var(--ink);
  padding: 14px 22px;
}

.trust-row {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.trust-row svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.gauge-section { padding: 28px 0 86px; }

.tool-card {
  background: var(--surface);
  border: 1px solid rgba(23,24,21,.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tool-topbar {
  padding: 28px 30px 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.tool-topbar h2, .section-heading h2, .explainer h2, .reference-card h2, .final-cta h2 {
  font-family: "Manrope", sans-serif;
  letter-spacing: -.045em;
}

.tool-topbar h2 {
  font-size: 28px;
  margin: 5px 0 0;
}

.unit-toggle {
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-2);
  display: inline-flex;
}

.unit-button {
  border: 0;
  color: var(--muted);
  background: transparent;
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

.unit-button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 3px 12px rgba(24,25,20,.08);
}

.notice {
  margin: 0 30px;
  padding: 13px 15px;
  border-radius: 16px;
  background: #fff8e9;
  border: 1px solid #f0dfb4;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
  align-items: center;
}

.notice.calibrated {
  background: #eef8f1;
  border-color: #cfe8d6;
}

.notice-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.75);
  font-size: 18px;
}

.notice-copy { display: flex; flex-direction: column; gap: 1px; }
.notice-copy strong { font-size: 13px; }
.notice-copy span { color: var(--muted); font-size: 12px; line-height: 1.45; }

.notice-action {
  border: 0;
  background: transparent;
  color: var(--accent-ink);
  cursor: pointer;
  font-weight: 800;
  padding: 8px;
}

.how-to-mini {
  padding: 28px 30px 12px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.how-to-mini p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 14px; }

.step-pill {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
}

.gauge-grid {
  padding: 18px 30px 30px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.gauge-item {
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 12px 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.gauge-item:hover { border-color: #c9cbc3; }

.gauge-name {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.gauge-name strong {
  font-family: "Manrope", sans-serif;
  letter-spacing: -.03em;
  font-size: 17px;
}

.gauge-name span { color: var(--muted); font-size: 11px; white-space: nowrap; }

.gap-stage {
  height: 116px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.gap-wrap {
  position: relative;
  height: 92px;
  width: min(100%, 106px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gap-left, .gap-right {
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.gap-left::before, .gap-left::after,
.gap-right::before, .gap-right::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 2px;
  background: var(--ink);
}

.gap-left::before, .gap-left::after { right: 0; }
.gap-right::before, .gap-right::after { left: 0; }
.gap-left::before, .gap-right::before { top: 0; }
.gap-left::after, .gap-right::after { bottom: 0; }

.gap-centerline {
  position: absolute;
  left: 50%;
  top: 18px;
  bottom: 18px;
  width: 1px;
  background: repeating-linear-gradient(to bottom, #b7bab1 0 3px, transparent 3px 7px);
  opacity: .8;
}

.gauge-mm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.gauge-mm::before {
  content: "";
  width: 12px;
  height: 1px;
  background: currentColor;
}

.closest-note {
  margin: 0 30px 24px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.closest-note span { color: var(--accent); font-size: 18px; }
.closest-note p { margin: 0; }

.tool-footer {
  background: #171815;
  color: white;
  padding: 18px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.tool-footer > div { display: flex; flex-direction: column; gap: 2px; }
.tool-footer-label { color: #adafa8; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.tool-footer strong { font-size: 13px; }

.small-button {
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: white;
  padding: 9px 14px;
  font-size: 12px;
}

.small-button.danger { color: #9c3118; background: #fff0ea; border-color: #ffd4c5; }

.explainer { padding: 76px 0; }

.explainer-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 70px;
}

.explainer h2, .section-heading h2, .reference-card h2, .final-cta h2 {
  margin: 8px 0 16px;
  font-size: clamp(34px, 4.8vw, 58px);
  line-height: 1.02;
}

.explainer-copy p, .reference-copy p {
  color: var(--muted);
  line-height: 1.75;
  font-size: 16px;
}

.diagram-card {
  min-height: 330px;
  border-radius: var(--radius-lg);
  background: #eceee8;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  padding: 40px;
}

.bolt-diagram { width: min(330px, 100%); position: relative; }
.bolt-head {
  width: 90px;
  height: 70px;
  background: var(--ink);
  border-radius: 12px 12px 6px 6px;
  clip-path: polygon(20% 0, 80% 0, 100% 50%, 80% 100%, 20% 100%, 0 50%);
  margin: 0 auto;
}

.bolt-shaft {
  width: 45px;
  height: 140px;
  margin: -1px auto 0;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 8px 0;
}

.bolt-shaft span { height: 3px; background: #eceee8; transform: skewY(-14deg); }

.dimension-line {
  width: 120px;
  margin: 18px auto 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
}

.dimension-line i { flex: 1; height: 1px; background: currentColor; }
.dimension-line b { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }

.content-section { padding: 74px 0; }

.section-heading { max-width: 700px; margin-bottom: 28px; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.info-card {
  min-height: 255px;
  padding: 26px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.56);
}

.info-number {
  font-family: "Manrope", sans-serif;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.info-card h3 {
  margin: 38px 0 12px;
  font-family: "Manrope", sans-serif;
  letter-spacing: -.03em;
  font-size: 22px;
}

.info-card p { color: var(--muted); line-height: 1.65; font-size: 14px; }

.reference-section { padding: 26px 0 84px; }

.reference-card {
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: white;
  padding: 46px;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 60px;
}

.reference-card .section-kicker { color: #f4a07d; }
.reference-card h2 { font-size: clamp(34px, 4vw, 52px); }
.reference-copy p { color: #c7c9c2; }
.reference-copy strong { color: white; }

.faq-section { padding: 72px 0 90px; }

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-list details { border-bottom: 1px solid var(--line); }

.faq-list summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 44px 22px 0;
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  font-size: 18px;
  position: relative;
}

.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 16px;
  font-size: 28px;
  font-weight: 400;
  color: var(--muted);
}

.faq-list details[open] summary::after { content: "−"; }

.faq-list details p {
  max-width: 760px;
  margin: -6px 0 22px;
  color: var(--muted);
  line-height: 1.7;
}

.final-cta {
  margin-bottom: 76px;
  background: var(--accent-soft);
  border: 1px solid #f2d8ca;
  border-radius: var(--radius-lg);
  padding: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.final-cta h2 { margin-bottom: 0; font-size: clamp(30px, 4vw, 46px); }

.site-footer {
  padding: 34px 0 50px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  color: var(--muted);
}

.footer-brand { display: flex; gap: 10px; align-items: center; color: var(--ink); }
.footer-brand > div { display: flex; flex-direction: column; }
.footer-brand span:last-child { color: var(--muted); font-size: 11px; margin-top: 2px; }
.site-footer nav { display: flex; gap: 16px; align-items: center; }
.site-footer nav a { text-decoration: none; font-size: 13px; font-weight: 600; }
.footer-button { padding: 0; font-size: 13px; }
.copyright { grid-column: 1 / -1; margin: 4px 0 0; font-size: 11px; }

.accuracy-dialog {
  width: min(680px, calc(100% - 24px));
  max-height: min(88vh, 850px);
  padding: 0;
  border: 0;
  border-radius: 26px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 30px 100px rgba(20, 22, 18, .28);
}

.accuracy-dialog::backdrop {
  background: rgba(13,14,12,.5);
  backdrop-filter: blur(5px);
}

.dialog-shell { padding: 28px; overflow-y: auto; max-height: inherit; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.dialog-header h2 { margin: 5px 0 0; font: 800 29px/1.1 "Manrope", sans-serif; letter-spacing: -.04em; }

.icon-button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.dialog-intro { color: var(--muted); line-height: 1.6; font-size: 14px; margin: 18px 0; }

.calibration-options { display: grid; gap: 9px; }

.cal-option {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  text-align: left;
  gap: 10px;
  cursor: pointer;
}

.cal-option:hover { border-color: #c9cbc3; background: #fbfbf8; }
.cal-option.recommended { border-color: #edc4b3; background: #fff9f6; }
.cal-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); font-size: 18px; }
.cal-option span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; }
.cal-option strong { font-size: 14px; }
.cal-option small { color: var(--muted); }
.cal-option em { font-size: 10px; color: var(--accent-ink); background: var(--accent-soft); padding: 5px 7px; border-radius: 999px; font-style: normal; font-weight: 800; }

.cal-panel {
  margin-top: 14px;
  padding: 18px;
  border-radius: 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.panel-heading { display: flex; flex-direction: column; gap: 3px; margin-bottom: 14px; }
.panel-heading strong { font-size: 15px; }
.panel-heading span, .panel-note { color: var(--muted); font-size: 12px; line-height: 1.5; }

.field-label { display: block; margin: 10px 0 7px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }

.input-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }

input, select {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 14px;
  padding: 12px 13px;
  outline: none;
}

input:focus, select:focus { border-color: #b5b8ae; box-shadow: 0 0 0 3px rgba(23,24,21,.05); }

.preset-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.preset-row button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.cal-line-wrap, .paper-stage, .coin-stage {
  display: grid;
  place-items: center;
  min-height: 105px;
  overflow-x: auto;
  padding: 8px;
}

.cal-line, .paper-line { height: 3px; background: var(--ink); position: relative; }
.cal-line::before, .cal-line::after, .paper-line::before, .paper-line::after {
  content: "";
  position: absolute;
  top: -7px;
  width: 2px;
  height: 17px;
  background: var(--ink);
}
.cal-line::before, .paper-line::before { left: 0; }
.cal-line::after, .paper-line::after { right: 0; }

.coin-circle { border: 2px solid var(--ink); border-radius: 50%; background: rgba(255,255,255,.75); }

.adjust-row {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 8px;
  align-items: center;
  margin-top: 7px;
}

.adjust-row button {
  height: 40px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  cursor: pointer;
  font-size: 20px;
}

.adjust-row span { text-align: center; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

.paper-choice { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; }
.paper-choice label { display: inline-flex; gap: 6px; align-items: center; }
.paper-choice input { width: auto; }

.saved-calibration {
  margin-top: 14px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 14px;
  background: #eef8f1;
  border: 1px solid #cfe8d6;
}

.saved-calibration > div { display: flex; flex-direction: column; gap: 2px; }
.saved-calibration strong { font-size: 13px; }
.saved-calibration span { color: var(--muted); font-size: 11px; }
.saved-calibration .small-button { color: #9c3118; }

.skip-button {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 15px 0 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 24px);
  padding: 11px 15px;
  border-radius: 12px;
  background: var(--ink);
  color: white;
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
  z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 860px) {
  .hero { padding-top: 68px; }
  .gauge-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .explainer-grid { grid-template-columns: 1fr; gap: 28px; }
  .diagram-card { min-height: 280px; }
  .info-grid { grid-template-columns: 1fr; }
  .info-card { min-height: 0; }
  .info-card h3 { margin-top: 22px; }
  .reference-card { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 620px) {
  .shell, .site-header { width: min(calc(100% - 24px), var(--shell)); }
  .site-header { min-height: 68px; }
  #headerStatusText { display: none; }
  .text-button { padding: 10px; }
  .hero { padding: 58px 0 42px; }
  .hero h1 { font-size: clamp(50px, 16vw, 72px); }
  .hero-copy { font-size: 16px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .primary-button, .secondary-button { width: 100%; }
  .trust-row { gap: 12px 18px; font-size: 11px; }
  .gauge-section { padding-bottom: 54px; }
  .tool-topbar { padding: 22px 18px 14px; align-items: flex-start; flex-direction: column; }
  .tool-topbar h2 { font-size: 24px; }
  .notice { margin: 0 18px; grid-template-columns: 28px 1fr; }
  .notice-action { grid-column: 2; justify-self: start; padding: 2px 0; }
  .how-to-mini { padding: 22px 18px 10px; }
  .gauge-grid { padding: 14px 18px 20px; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
  .gauge-item { padding: 13px 8px 12px; }
  .gauge-name { flex-direction: column; align-items: center; gap: 1px; }
  .gap-stage { height: 102px; }
  .gap-wrap { height: 84px; }
  .closest-note { margin: 0 18px 20px; }
  .tool-footer { padding: 16px 18px; }
  .explainer, .content-section, .faq-section { padding: 54px 0; }
  .reference-section { padding-bottom: 54px; }
  .reference-card { padding: 28px 22px; }
  .final-cta { padding: 28px 22px; margin-bottom: 50px; align-items: flex-start; flex-direction: column; }
  .final-cta .primary-button { width: auto; }
  .site-footer { grid-template-columns: 1fr; }
  .dialog-shell { padding: 22px 17px; }
  .dialog-header h2 { font-size: 24px; }
  .cal-option { grid-template-columns: 36px 1fr; }
  .cal-option em { display: none; }
  .input-row { grid-template-columns: 1fr; }
  .primary-button.compact { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* --- V2 measurement + mobile reliability refinements --- */
.gauge-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 9px;
  padding-top: 12px;
}

.gauge-item {
  padding: 12px 8px 10px;
  border-radius: 15px;
}

.gauge-name {
  margin-bottom: 5px;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.gauge-name strong { font-size: 15px; }
.gauge-name span { font-size: 10px; }
.gap-stage { height: 72px; }
.gap-wrap { height: 62px; width: min(100%, 82px); }
.gap-left, .gap-right { top: 7px; bottom: 7px; width: 1.5px; }
.gap-left::before, .gap-left::after,
.gap-right::before, .gap-right::after { width: 7px; height: 1.5px; }
.gap-centerline { top: 14px; bottom: 14px; }
.gauge-mm { font-size: 10px; gap: 4px; }
.gauge-mm::before { width: 9px; }

.simple-cal-card {
  margin-top: 14px;
  padding: 18px;
  border-radius: 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.simple-cal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.simple-cal-title > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.simple-cal-title strong { font-size: 15px; }
.simple-cal-title small { color: var(--muted); font-size: 12px; }
.device-size-groups { display: grid; gap: 14px; }
.quick-presets { margin-top: 6px; }
.quick-presets button { min-width: 58px; }
.custom-size-row { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }

.advanced-cal {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  overflow: hidden;
}

.advanced-cal summary {
  cursor: pointer;
  list-style: none;
  padding: 15px 16px;
  font-weight: 800;
  font-size: 13px;
  position: relative;
}
.advanced-cal summary::-webkit-details-marker { display: none; }
.advanced-cal summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 10px;
  font-size: 22px;
  font-weight: 400;
  color: var(--muted);
}
.advanced-cal[open] summary::after { content: "−"; }
.advanced-cal-body { padding: 0 16px 16px; }
.advanced-cal-body p { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 0 0 10px; }
.cal-line-wrap { overflow: hidden; min-height: 86px; padding-inline: 0; }
.cal-line { max-width: 100%; }

@media (max-width: 1000px) {
  .gauge-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .gauge-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .gauge-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 12px 14px 18px;
  }
  .gauge-item { padding: 10px 5px 9px; border-radius: 13px; }
  .gauge-name strong { font-size: 14px; }
  .gauge-name span { font-size: 9px; }
  .gap-stage { height: 64px; }
  .gap-wrap { height: 56px; width: min(100%, 72px); }
  .gauge-mm { font-size: 9px; }
  .simple-cal-card { padding: 14px; }
  .quick-presets button { min-width: 52px; padding-inline: 8px; }
  .dialog-shell { overflow-x: hidden; }
  .accuracy-dialog { width: min(96vw, 680px); }
}

@media (max-width: 360px) {
  .gauge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
