.telos-calc {
  --bg: #050706;
  --panel: #0b110d;
  --panel-2: #101810;
  --line: rgba(155, 240, 0, 0.2);
  --line-strong: rgba(155, 240, 0, 0.42);
  --text: #f8fff2;
  --muted: #aab6a5;
  --lime: #9bf000;
  --lime-soft: #d7ff77;
  --warning: #ffde72;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  line-height: 1.6;
  margin-left: 0;
  max-width: none;
  overflow-x: clip;
  padding: 20px;
  position: relative;
  width: 100%;
}

body:has([data-telos-calculator]) .entry-title,
body:has([data-telos-calculator]) .page-title,
body:has([data-telos-calculator]) h1.wp-block-post-title {
  text-align: center;
}

.telos-calc,
.telos-calc * {
  box-sizing: border-box;
}

.telos-container {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
  margin: 0 auto;
  max-width: 1200px;
}

.telos-header {
  text-align: center;
}

.telos-logo {
  background: transparent;
  border: 0;
  border-radius: 0;
  display: block;
  height: 86px;
  margin: 0 auto 8px;
  object-fit: contain;
  padding: 0;
  width: 170px;
}

.telos-brand-title {
  color: var(--lime);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 6px;
}

.telos-calc h1 {
  background: linear-gradient(135deg, #f8fff2, #9bf000);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0 0 10px;
  overflow-wrap: anywhere;
}

.telos-subtitle {
  color: var(--muted);
  font-size: 1rem;
  margin: 0;
}

.telos-main {
  align-items: start;
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 1fr) 380px;
}

.tab-bar,
.sub-tab-bar {
  background: #071007;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  padding: 4px;
}

.tab-btn,
.sub-tab-btn {
  background: transparent;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  cursor: pointer;
  flex: 1;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  min-height: 58px;
  padding: 11px 16px;
  text-align: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.sub-tab-btn {
  min-height: 68px;
}

.tab-btn.active,
.sub-tab-btn.active,
.tab-btn:focus-visible,
.sub-tab-btn:focus-visible {
  background: rgba(155, 240, 0, 0.16);
  color: var(--lime);
  outline: 1px solid rgba(155, 240, 0, 0.35);
}

.tab-subtitle,
.sub-tab-btn span {
  color: inherit;
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.72;
}

.calculator-section,
.pump-specs,
.info-card,
.warning-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.calculator-section {
  margin-bottom: 24px;
  overflow: hidden;
  padding: 24px;
}

.section-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title,
.input-card-label,
.metric-card span,
.primary-result span {
  color: var(--lime-soft);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.reset-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 8px 10px;
  text-transform: uppercase;
}

.inputs-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.input-card {
  background: var(--panel-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  display: block;
  min-width: 0;
  padding: 16px;
}

.input-card-label {
  display: block;
  margin-bottom: 10px;
}

.input-with-unit {
  align-items: center;
  background: #050706;
  border: 1px solid rgba(155, 240, 0, 0.28);
  border-radius: 9px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 52px;
  padding: 0 12px;
}

.input-with-unit input {
  background: transparent;
  border: 0;
  color: var(--text);
  font: inherit;
  font-size: 1.1rem;
  font-weight: 750;
  min-height: 50px;
  min-width: 96px;
  outline: none;
  width: 100%;
}

.unit-label {
  color: var(--lime);
  font-size: 0.78rem;
  font-weight: 850;
}

.unit-toggle {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.unit-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  flex: 1;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 850;
  min-height: 30px;
}

.unit-pill.active {
  background: var(--lime);
  border-color: var(--lime);
  color: #050706;
}

.input-card small {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  margin-top: 9px;
}

.syringe-size {
  margin: 8px 0 18px;
}

.syringe-options {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
}

.syringe-option {
  background: var(--panel-2);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  min-height: 70px;
  padding: 12px;
  text-align: left;
}

.syringe-option strong,
.syringe-option span {
  display: block;
}

.syringe-option span {
  color: var(--muted);
  font-size: 0.82rem;
}

.syringe-option.active {
  border-color: var(--line-strong);
  box-shadow: inset 0 0 0 1px rgba(155, 240, 0, 0.18);
}

.calculate-btn {
  background: linear-gradient(135deg, var(--lime), #d7ff77);
  border: 0;
  border-radius: 10px;
  color: #050706;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  margin: 4px 0 18px;
  min-height: 52px;
  padding: 14px 18px;
  text-transform: uppercase;
  width: 100%;
}

.primary-result {
  align-items: center;
  background: linear-gradient(135deg, rgba(155, 240, 0, 0.18), rgba(155, 240, 0, 0.06));
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
  min-height: 98px;
  padding: 18px 22px;
}

.primary-result strong {
  color: var(--lime);
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.95;
  white-space: nowrap;
}

.primary-result small {
  color: var(--muted);
  font-weight: 700;
}

.syringe-wrap {
  background:
    radial-gradient(circle at 42% 45%, rgba(155, 240, 0, 0.08), transparent 44%),
    linear-gradient(180deg, #050706, #060a07);
  border: 1px solid rgba(155, 240, 0, 0.18);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  margin-bottom: 18px;
  overflow: hidden;
  padding: 16px 14px 18px;
}

#syringeSvg {
  display: block;
  height: auto;
  width: 100%;
}

.syringe-body {
  fill: url(#telosSyringeBarrel);
  stroke: rgba(220, 236, 216, 0.38);
  stroke-width: 1.5;
}

.syringe-fill {
  fill: url(#telosSyringeFill);
  filter: drop-shadow(0 0 10px rgba(155, 240, 0, 0.25));
}

.syringe-highlight {
  stroke: rgba(255, 255, 255, 0.35);
  stroke-linecap: round;
  stroke-width: 1;
}

.syringe-shadow {
  stroke: rgba(155, 240, 0, 0.08);
  stroke-linecap: round;
  stroke-width: 12;
}

.major-tick,
.minor-tick {
  stroke: rgba(248, 255, 242, 0.58);
  stroke-width: 1.1;
}

.major-tick {
  stroke: rgba(248, 255, 242, 0.9);
  stroke-width: 1.9;
}

.tick-label {
  fill: #d8ead1;
  font-size: 12px;
  font-weight: 700;
}

.syringe-plunger,
.syringe-needle-base {
  fill: rgba(255, 255, 255, 0.11);
  stroke: rgba(220, 236, 216, 0.32);
  stroke-width: 1.2;
}

.syringe-flange {
  stroke: rgba(220, 236, 216, 0.52);
  stroke-linecap: round;
  stroke-width: 2;
}

.syringe-needle {
  stroke: rgba(220, 236, 216, 0.78);
  stroke-linecap: round;
  stroke-width: 2;
}

.syringe-needle-tip {
  fill: rgba(220, 236, 216, 0.78);
}

#syringeCaption {
  color: #d8ead1;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 6px;
  text-align: center;
}

.metrics-grid,
.spec-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metrics-grid.four,
.spec-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card,
.spec-grid div {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  min-height: 104px;
  padding: 14px;
}

.metric-card strong {
  color: var(--text);
  display: block;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 900;
  line-height: 1;
  margin: 10px 0 6px;
}

.metric-card small {
  color: var(--muted);
}

.spec-grid div {
  align-content: start;
  display: grid;
  gap: 10px;
  min-height: 112px;
}

.spec-grid span {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.25;
}

.spec-grid strong {
  color: var(--text);
  display: block;
  font-size: clamp(1.25rem, 1.65vw, 1.72rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.pump-specs {
  margin-top: 24px;
  padding: 22px;
}

.pump-specs h3,
.info-card h3,
.warning-card strong {
  color: var(--text);
  font-size: 1.12rem;
  line-height: 1.15;
  margin: 0 0 10px;
}

.pump-specs p,
.info-card p,
.info-card li,
.warning-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

.info-sidebar {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 24px;
}

.info-sidebar > div {
  display: grid;
  gap: 16px;
}

.info-card,
.warning-card {
  padding: 20px;
}

.info-card h4 {
  color: var(--lime-soft);
  font-size: 0.9rem;
  margin: 16px 0 5px;
}

.info-card ul,
.info-card ol {
  margin: 10px 0 0 20px;
  padding: 0;
}

.info-card.compact p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0;
}

.warning-card {
  background: rgba(255, 222, 114, 0.08);
  border-color: rgba(255, 222, 114, 0.25);
}

.warning-card strong {
  color: var(--warning);
}

[hidden] {
  display: none !important;
}

@media (max-width: 1020px) {
  .telos-main {
    grid-template-columns: 1fr;
  }

  .info-sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  .telos-calc {
    padding: 12px;
    width: 100vw;
  }

  .telos-logo {
    height: 70px;
    width: 145px;
  }

  .telos-calc h1 {
    font-size: 2rem;
  }

  .inputs-grid,
  .metrics-grid,
  .metrics-grid.four,
  .spec-grid,
  .syringe-options {
    grid-template-columns: 1fr;
  }

  .tab-bar,
  .sub-tab-bar {
    flex-direction: column;
  }

  .calculator-section {
    padding: 16px;
  }

  .primary-result {
    align-items: flex-start;
    flex-direction: column;
  }

  .primary-result strong {
    white-space: normal;
  }

}
