* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; padding: 16px 16px 40px;
  background: #0d1117; color: #e6edf3;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
h1 { font-size: 18px; margin: 0 0 2px; letter-spacing: 0.5px; }
.sub { color: #8b949e; font-size: 12px; margin-bottom: 16px; }
.card {
  background: #161b22; border: 1px solid #30363d; border-radius: 10px;
  padding: 14px; margin-bottom: 14px;
}
.card h1 {
  font-size: 16px; text-transform: uppercase; letter-spacing: 1px;
  color: #58a6ff; margin: 0 0 10px;
}
.card h2 {
  font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
  color: #8b949e; margin: 10px 0 0px;
}
label {
  display: block; font-size: 12px; color: #8b949e; margin: 10px 0 4px;
}
input, select {
  width: 100%; padding: 10px; font-size: 16px; border-radius: 8px;
  border: 1px solid #30363d; background: #0d1117; color: #e6edf3;
}
.row { display: flex; gap: 10px; }
.row > div { flex: 1; }
.segmented {
  display: flex; border: 1px solid #30363d; border-radius: 8px; overflow: hidden;
}
.segmented button {
  flex: 1; padding: 10px 6px; background: #0d1117; color: #8b949e;
  border: none; font-size: 13px; border-right: 1px solid #30363d;
}
.segmented button:last-child { border-right: none; }
.segmented button.active { background: #1f6feb; color: white; }
button.calc {
  width: 100%; margin-top: 16px; padding: 14px; font-size: 16px; font-weight: 600;
  background: #238636; color: white; border: none; border-radius: 8px;
}
button.calc:active { background: #1a6e2b; }
.warn {
  background: #3d2a06; border: 1px solid #9e6a03; color: #f0b429;
  border-radius: 8px; padding: 10px 12px; font-size: 12px; margin-top: 10px;
}
.err {
  background: #3d0e0e; border: 1px solid #9e0303; color: #ff7b72;
  border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-top: 10px;
}
/* TOLD card output */
.told {
  background: #161b22; border: 2px solid #1f6feb; border-radius: 10px;
  padding: 16px; margin-top: 4px; margin-bottom: 14px;
}
.told-title {
  text-align: center; font-size: 13px; letter-spacing: 2px; color: #8b949e;
  margin-bottom: 10px; text-transform: uppercase;
}
.told-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px;
  font-size: 13px; margin-bottom: 10px;
}
.told-grid .full { grid-column: 1 / -1; margin-top: 4px; }
.told-grid .timestamp { color: #a371f7; font-size: 11px; text-align: right; }
.told-item { display: flex; justify-content: space-between; border-bottom: 1px dashed #30363d; padding: 3px 0; }
.told-item .k { color: #8b949e; }
.told-item .v { font-weight: 600; }
.told-line { display: flex; border-bottom: 1px solid #30363d; }
.big-out {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px;
}
.big-out.single { grid-template-columns: 1fr; }
.big-out .box {
  background: #0d1117; border: 1px solid #30363d; border-radius: 8px;
  padding: 12px; text-align: center;
}
.big-out .box .label { font-size: 11px; color: #8b949e; text-transform: uppercase; letter-spacing: 1px; }
.big-out .box .num { font-size: 26px; font-weight: 700; color: #3fb950; margin-top: 4px; }
.big-out .box .num.na { color: #ff7b72; font-size: 16px; }
.vspeed { font-size: 22px; font-weight: 700; text-align: center; color: #58a6ff; margin-top: 10px; }
.footnote { font-size: 11px; color: #6e7681; margin-top: 10px; line-height: 1.5; }
.summary {
  background: #161b22; border: 2px solid #a371f7; border-radius: 10px;
  padding: 16px; margin-bottom: 14px;
}
.summary h2 {
  font-size: 16px; text-transform: uppercase; letter-spacing: 1px;
  color: #a371f7; margin: 0 0 10px;
}
.summary-row { display:flex; justify-content:space-between; padding:6px 0; border-bottom:1px dashed #30363d; font-size:14px; }
.summary-row .v { font-weight:700; }
.more-details {
  margin-bottom: 14px;
}
.more-details > summary {
  cursor: pointer; list-style: none; user-select: none;
  font-size: 13px; letter-spacing: 1px; text-transform: uppercase;
  color: #8b949e; text-align: center; padding: 10px;
  background: #161b22; border: 1px solid #30363d; border-radius: 8px;
}
.more-details > summary::-webkit-details-marker { display: none; }
.more-details > summary::after { content: ' \25BE'; }
.more-details[open] > summary::after { content: ' \25B4'; }
.more-details[open] > summary { border-radius: 8px 8px 0 0; margin-bottom: 10px; }
.tabs {
  display: flex; gap: 6px; margin-bottom: 16px;
  border-bottom: 1px solid #30363d;
}
.tabs button {
  flex: 1; padding: 12px 4px; background: transparent; color: #8b949e;
  border: none; font-size: 14px; font-weight: 600; border-bottom: 2px solid transparent;
}
.tabs button.active { color: #58a6ff; border-bottom: 2px solid #58a6ff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.placeholder {
  text-align: center; color: #6e7681; padding: 60px 20px; font-size: 14px;
}
