/* Golf Club Length & Lie Angle Calculator (Wrist-to-Floor & Dynamic Divot) */

.ll-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 13px;
}

.ll-seg-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 6px 0 4px;
}

.ll-preset-btn,
.ll-seg-btn {
  appearance: none;
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--hairline-strong);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 140ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ll-preset-btn small,
.ll-seg-btn small {
  display: block;
  font-weight: 500;
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 3px;
}

.ll-preset-btn:hover:not([aria-pressed="true"]),
.ll-seg-btn:hover:not([aria-pressed="true"]) {
  border-color: var(--turf);
  transform: translateY(-1px);
}

.ll-preset-btn[aria-pressed="true"],
.ll-seg-btn[aria-pressed="true"] {
  background: var(--pine);
  border-color: var(--pine);
  color: #f4f7f2;
}

.ll-preset-btn[aria-pressed="true"] small,
.ll-seg-btn[aria-pressed="true"] small {
  color: rgba(244, 247, 242, 0.82);
}

html[data-theme="radar"] .ll-preset-btn,
html[data-theme="radar"] .ll-seg-btn {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(158, 192, 176, 0.3);
  color: #e6f2ec;
}

html[data-theme="radar"] .ll-preset-btn[aria-pressed="true"],
html[data-theme="radar"] .ll-seg-btn[aria-pressed="true"] {
  background: var(--optic-bright);
  border-color: var(--optic-bright);
  color: #081c14;
}

html[data-theme="radar"] .ll-preset-btn[aria-pressed="true"] small,
html[data-theme="radar"] .ll-seg-btn[aria-pressed="true"] small {
  color: rgba(8, 28, 20, 0.8);
}

.ll-sliders-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 13px;
}

.ll-slider-card {
  padding: 11px 13px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--hairline-strong);
}

html[data-theme="radar"] .ll-slider-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(158, 192, 176, 0.25);
}

.ll-slider-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}

.ll-slider-val {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  color: var(--turf);
}

html[data-theme="radar"] .ll-slider-val {
  color: var(--optic-bright);
}

.ll-range {
  width: 100%;
  accent-color: var(--turf);
  cursor: pointer;
}

html[data-theme="radar"] .ll-range {
  accent-color: var(--optic-bright);
}

/* Sole-Turf Lie & Aim Vector Radar */
.ll-radar-box {
  margin: 14px 0 16px;
  padding: 14px 16px 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, #0b241b 0%, #071912 100%);
  border: 1px solid #1f4d3b;
  color: #e6f2ec;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 20px rgba(7, 25, 18, 0.14);
}

.ll-radar-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px 12px;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9ec0b0;
}

.ll-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
}

.ll-leg-raw { color: #9ec0b0; font-weight: 700; }
.ll-leg-fit { color: #6ee7b7; font-weight: 700; }

.ll-svg {
  display: block;
  width: 100%;
  height: auto;
}

@keyframes llTrace {
  0% { stroke-dashoffset: 100; }
  100% { stroke-dashoffset: 0; }
}

.ll-divider {
  stroke: rgba(158, 192, 176, 0.25);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.ll-turf-line {
  stroke: #34d399;
  stroke-width: 2.2;
}

.ll-club-head {
  fill: rgba(110, 231, 183, 0.2);
  stroke: #6ee7b7;
  stroke-width: 2.2;
}

.ll-shaft-line {
  stroke: #cbd5e1;
  stroke-width: 3;
  stroke-linecap: round;
}

.ll-shaft-std {
  stroke: rgba(158, 192, 176, 0.45);
  stroke-width: 2;
  stroke-dasharray: 4 3;
}

.ll-aim-raw {
  fill: none;
  stroke: rgba(252, 165, 165, 0.65);
  stroke-width: 2;
  stroke-dasharray: 5 4;
}

.ll-aim-fit {
  fill: none;
  stroke: #6ee7b7;
  stroke-width: 2.8;
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
  animation: llTrace 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ll-svg-label {
  fill: #9ec0b0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9.5px;
}

.ll-svg-pill-bg {
  fill: rgba(8, 28, 20, 0.9);
  stroke: rgba(110, 231, 183, 0.42);
  stroke-width: 1;
}

.ll-svg-pill-txt {
  fill: #e6f2ec;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9.5px;
  font-weight: 700;
}

.ll-status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.38);
  color: var(--turf);
}

html[data-theme="radar"] .ll-status-pill {
  color: #6ee7b7;
}

.ll-readout-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.ll-metric-card {
  padding: 12px;
  border-radius: 9px;
  background: var(--paper);
  border: 1px solid var(--hairline-strong);
  min-width: 0;
}

.ll-metric-card.is-primary {
  border-width: 1.5px;
  border-color: var(--turf);
}

html[data-theme="radar"] .ll-metric-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(158, 192, 176, 0.25);
}

html[data-theme="radar"] .ll-metric-card.is-primary {
  border-color: var(--optic-bright);
}

.ll-metric-kicker {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.ll-metric-val {
  display: block;
  font-family: var(--sans);
  font-size: clamp(17px, 1.7vw, 20px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  overflow-wrap: break-word;
}

.ll-metric-sub {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
}

.ll-copy-btn {
  appearance: none;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--hairline-strong);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

html[data-theme="radar"] .ll-copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(158, 192, 176, 0.4);
  color: #e6f2ec;
}

@media (prefers-reduced-motion: reduce) {
  .ll-aim-fit {
    animation: none !important;
  }

  .ll-preset-btn,
  .ll-seg-btn {
    transition: none !important;
  }
}

@media (max-width: 720px) {
  .ll-preset-grid,
  .ll-seg-grid,
  .ll-readout-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
