@font-face {
  font-family: "Geist";
  src: url("./fonts/Geist-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("./fonts/Geist-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("./fonts/Geist-Medium.otf") format("opentype");
  font-weight: 510;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("./fonts/Geist-SemiBold.otf") format("opentype");
  font-weight: 590;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("./fonts/Geist-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("./fonts/GeistMono-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("./fonts/GeistMono-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("./fonts/GeistMono-Medium.otf") format("opentype");
  font-weight: 510;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Pixel";
  src: url("./fonts/GeistPixel-Square.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --page-bg: #0a0a0a;
  --card-bg: #0a0a0a;
  --card-bg-soft: #171717;
  --input-bg: #151515;
  --border-soft: rgba(255, 255, 255, 0.06);
  --border-input: rgba(255, 255, 255, 0.085);
  --text-main: #f5f5f5;
  --text-muted: #a3a3a3;
  --text-soft: #b8b8b8;
  --text-secondary: rgba(245, 245, 245, 0.72);
  --text-tertiary: rgba(245, 245, 245, 0.62);
  --text-helper: rgba(245, 245, 245, 0.68);
  --footer-muted: rgba(176, 176, 176, 0.54);
  --button-bg: #ffffff;
  --button-text: #0a0a0a;
  --color-pitch-black: var(--page-bg);
  --color-graphite: var(--card-bg);
  --color-deep-slate: var(--card-bg-soft);
  --color-charcoal-grey: #1f1f1f;
  --color-muted-ash: #2a2a2a;
  --color-gunmetal: #171717;
  --color-porcelain: var(--text-main);
  --color-light-steel: var(--text-soft);
  --color-storm-cloud: var(--text-muted);
  --color-fog-grey: var(--text-muted);
  --color-alabaster: #e5e5e6;
  --color-syringe-accent: #d99a22;
  --vial-liquid: var(--color-syringe-accent);
  --vial-liquid-strong: var(--color-syringe-accent);
  --vial-glass: rgba(12, 12, 12, 0.82);
  --vial-outline: rgba(245, 245, 245, 0.18);
  --vial-cap: rgba(245, 245, 245, 0.28);
  --vial-neck-band: rgba(245, 245, 245, 0.14);
  --color-warning-red: #eb5757;
  --color-card-dark: var(--card-bg);
  --color-card-darker: var(--card-bg-soft);
  --color-input-dark: var(--input-bg);
  --color-soft-border: var(--border-soft);
  --color-softer-border: var(--border-input);
  --color-muted-premium: var(--text-muted);
  --color-button-dark: var(--button-text);
  --font-inter-variable: "Geist", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-berkeley-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-geist-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-geist-pixel: "Geist Pixel", "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --text-caption: 10px;
  --leading-caption: 1.4;
  --tracking-caption: 0;
  --text-body: 14px;
  --leading-body: 1.4;
  --tracking-body: 0;
  --text-heading: 24px;
  --leading-heading: 1.33;
  --tracking-heading: 0;
  --spacing-4: 4px;
  --spacing-8: 8px;
  --spacing-12: 12px;
  --spacing-16: 16px;
  --spacing-20: 20px;
  --spacing-24: 24px;
  --spacing-32: 32px;
  --spacing-40: 40px;
  --spacing-64: 64px;
  --radius-sm: 2px;
  --radius-md: 20px;
  --radius-xl: 24px;
  --radius-pill: 9999px;
  --shadow-sm: rgba(0, 0, 0, 0.18) 0 10px 28px 0;
  --shadow-md: rgba(0, 0, 0, 0.2) 0 0 14px 0 inset;
  --shadow-subtle: rgba(255, 255, 255, 0.035) 0 1px 0 0 inset;
  --shadow-subtle-5: rgba(255, 255, 255, 0.025) 0 1px 0 0 inset;
  --shadow-xl: rgba(0, 0, 0, 0.26) 0 16px 44px 0;
  --component-input-x: 14px;
}

body.theme-light {
  --page-bg: #ffffff;
  --card-bg: #ffffff;
  --card-bg-soft: #fafafa;
  --input-bg: #fafafa;
  --border-soft: #e5e5e5;
  --border-input: #e5e5e5;
  --text-main: #111111;
  --text-muted: #707070;
  --text-soft: #111111;
  --text-secondary: rgba(17, 17, 17, 0.68);
  --text-tertiary: rgba(17, 17, 17, 0.56);
  --text-helper: rgba(17, 17, 17, 0.62);
  --footer-muted: rgba(55, 55, 50, 0.58);
  --button-bg: #111111;
  --button-text: #ffffff;
  --color-pitch-black: var(--page-bg);
  --color-graphite: var(--card-bg);
  --color-deep-slate: var(--card-bg-soft);
  --color-charcoal-grey: #fafafa;
  --color-muted-ash: #eeeeee;
  --color-gunmetal: #fafafa;
  --color-porcelain: var(--text-main);
  --color-light-steel: var(--text-soft);
  --color-storm-cloud: var(--text-muted);
  --color-fog-grey: var(--text-muted);
  --color-card-dark: var(--card-bg);
  --color-card-darker: var(--card-bg-soft);
  --color-input-dark: var(--input-bg);
  --color-soft-border: var(--border-soft);
  --color-softer-border: var(--border-input);
  --color-muted-premium: var(--text-muted);
  --color-button-dark: var(--button-text);
  --color-syringe-accent: #c9a270;
  --vial-liquid: var(--color-syringe-accent);
  --vial-liquid-strong: var(--color-syringe-accent);
  --vial-glass: #f7f5f0;
  --vial-outline: rgba(17, 17, 17, 0.26);
  --vial-cap: #5f5f5d;
  --vial-neck-band: #b9b9b5;
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-subtle: none;
  --shadow-subtle-5: none;
  --shadow-xl: none;
}

* {
  box-sizing: border-box;
}

[hidden],
.is-hidden {
  display: none !important;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--color-pitch-black);
  color: var(--color-porcelain);
  font-family: var(--font-inter-variable);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
}

.app-shell {
  position: relative;
  z-index: 1;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(720px, calc(100% - var(--spacing-32)));
  margin: 0 auto;
  padding: var(--spacing-24) 0 var(--spacing-64);
}

.hero-panel {
  display: grid;
  gap: var(--spacing-24);
  width: 100%;
  margin-bottom: var(--spacing-32);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.hero-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-16);
  width: 100%;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  color: var(--color-porcelain);
  text-decoration: none;
}

.brand-mark img {
  display: block;
  width: 31px;
  height: auto;
}

.hero-copy {
  max-width: 680px;
}

.top-controls {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 0;
  padding-top: 4px;
}

.language-switch {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
}

.language-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 54px;
  height: 28px;
  box-shadow: none;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: rgba(245, 245, 245, 0.62);
  padding: 0 9px;
  font-size: 11px;
  font-weight: 400;
  outline: none;
  transition: background-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.language-trigger:hover,
.language-trigger.is-open {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(245, 245, 245, 0.92);
}

.language-trigger:focus-visible {
  box-shadow: 0 0 0 2px rgba(245, 245, 245, 0.16);
}

.language-trigger svg {
  width: 9px;
  height: 9px;
  opacity: 0.58;
  transition: transform 160ms ease;
}

.language-trigger.is-open svg {
  transform: rotate(180deg);
}

.language-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  right: auto;
  z-index: 20;
  display: grid;
  gap: 1px;
  min-width: 72px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: #151515;
  padding: 4px;
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.22),
    0 2px 8px rgba(255, 255, 255, 0.02) inset;
  transform: translateX(-50%);
}

.language-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(245, 245, 245, 0.58);
  padding: 0 8px;
  font-size: 11px;
  font-weight: 400;
  outline: none;
  text-align: left;
  transition: background-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.language-button:hover {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(245, 245, 245, 0.86);
}

.language-button.is-active {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(245, 245, 245, 0.96);
}

.language-button:focus-visible {
  box-shadow: 0 0 0 2px rgba(245, 245, 245, 0.14);
}

.theme-button {
  display: inline-grid;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: rgba(245, 245, 245, 0.88);
  padding: 0;
  overflow: hidden;
  transition: color 180ms ease, opacity 180ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-button:hover {
  opacity: 0.78;
}

.theme-button:active {
  transform: scale(0.92);
}

.theme-button:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.64);
  outline-offset: 2px;
}

.theme-button svg {
  grid-area: 1 / 1;
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: opacity 300ms ease, transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-icon-sun {
  opacity: 0;
  transform: translateY(20px) scale(0.5);
}

.theme-icon-moon {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.theme-button.is-light .theme-icon-sun {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.theme-button.is-light .theme-icon-moon {
  opacity: 0;
  transform: translateY(20px) scale(0.5);
}

.theme-button.is-light,
.theme-button.is-active {
  background: transparent;
  color: #ffffff;
}

@media (prefers-reduced-motion: reduce) {
  .theme-button,
  .theme-button svg {
    transition-duration: 0.01ms;
  }
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  color: var(--color-porcelain);
  font-size: 30px;
  font-weight: 510;
  line-height: 1.2;
  letter-spacing: var(--tracking-heading);
}

.hero-copy p {
  margin-top: var(--spacing-4);
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 350;
  line-height: 1.48;
  white-space: pre-line;
}

.hero-helper-link {
  display: inline-flex;
  width: fit-content;
  margin-top: var(--spacing-16);
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
  text-decoration: none;
  transition: color 160ms ease, opacity 160ms ease;
}

.hero-helper-link:hover {
  color: rgba(245, 245, 245, 0.96);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-10);
  align-items: center;
  margin-top: var(--spacing-20);
}

.button {
  min-height: 44px;
  border: 0;
  border-radius: var(--radius-pill);
  padding: var(--spacing-12) var(--spacing-20);
  font-weight: 400;
  letter-spacing: var(--tracking-body);
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, opacity 160ms ease;
}

.button-primary {
  background: #ffffff;
  color: var(--color-button-dark);
}

.copy-action {
  position: relative;
  display: flex;
  flex: 0 1 auto;
}

.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 38px;
  padding: 0 var(--spacing-14);
  font-size: 13px;
}

.copy-icon-wrap {
  position: relative;
  display: inline-grid;
  width: 15px;
  height: 15px;
  place-items: center;
}

.copy-icon,
.copy-check {
  grid-area: 1 / 1;
  width: 15px;
  height: 15px;
  transition: opacity 160ms ease, transform 180ms ease;
}

.copy-icon {
  color: currentColor;
  opacity: 1;
  transform: scale(1);
}

.copy-check {
  color: currentColor;
  opacity: 0;
  transform: scale(0.72);
}

.copy-button.is-copied .copy-icon {
  opacity: 0;
  transform: scale(0.74);
}

.copy-button.is-copied .copy-check {
  opacity: 1;
  transform: scale(1);
}

.copy-button.is-copied {
  opacity: 1;
}

.copy-status {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 5;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  background: #171717;
  color: rgba(245, 245, 245, 0.9);
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity 160ms ease, transform 180ms ease;
  white-space: nowrap;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
}

.copy-status::after {
  position: absolute;
  left: 50%;
  top: 100%;
  width: 8px;
  height: 8px;
  background: #171717;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  content: "";
  transform: translate(-50%, -4px) rotate(45deg);
}

.copy-action.is-visible .copy-status {
  opacity: 1;
  transform: translate(-50%, 0);
}

.button-secondary {
  border: 1px solid var(--color-soft-border);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(247, 248, 248, 0.78);
}

.button:hover {
  opacity: 0.9;
}

.button-secondary:hover {
  border-color: var(--color-soft-border);
  background: rgba(255, 255, 255, 0.03);
  opacity: 0.82;
}

.clear-button {
  min-height: 38px;
  border-color: transparent;
  background: transparent;
  color: rgba(245, 245, 245, 0.48);
  padding: 0 var(--spacing-10);
  font-size: 13px;
}

.clear-button:hover {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(245, 245, 245, 0.78);
  opacity: 1;
}

.button:focus-visible,
input:focus-visible,
.custom-select-trigger:focus-visible {
  outline: 0;
}

.input-wrap:focus-within,
.custom-select-trigger:focus-visible {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: rgba(255, 255, 255, 0.08) 0 0 0 1px, rgba(255, 255, 255, 0.05) 0 0 22px 0, var(--shadow-md);
}

.button:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.64);
  outline-offset: 2px;
}

.calculator-stack {
  display: grid;
  gap: var(--spacing-24);
  width: 100%;
}

.card {
  border: 1px solid var(--color-soft-border);
  border-radius: 24px;
  background: var(--color-card-dark);
  box-shadow: rgba(0, 0, 0, 0.22) 0 18px 48px 0, var(--shadow-subtle);
}

.calculator-card {
  overflow: visible;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.mode-toggle {
  display: inline-flex;
  gap: 2px;
  width: fit-content;
  max-width: 100%;
  margin-right: var(--spacing-8);
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.compound-toggle {
  display: flex;
  width: fit-content;
  max-width: 320px;
  margin: 0 auto var(--spacing-18, 18px);
  gap: 3px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.018);
  padding: 3px;
}

.input-method-toggle {
  display: inline-flex;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 var(--spacing-16);
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.mode-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 32px;
  min-width: 64px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  color: rgba(245, 245, 245, 0.78);
  font-size: 12px;
  font-weight: 450;
  line-height: 1;
  padding: 7px 12px;
  user-select: none;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 120ms ease;
}

.label-short {
  display: none;
}

.compound-button {
  flex: 0 0 auto;
  min-height: 28px;
  min-width: 82px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 450;
  line-height: 1;
  padding: 7px 12px;
  user-select: none;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 120ms ease;
}

.input-method-button {
  flex: 0 1 auto;
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-secondary);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 450;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 120ms ease;
}

.mode-button.is-active {
  border-color: transparent;
  background: #202020;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  color: #ffffff;
}

.compound-button.is-active {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
}

.input-method-button.is-active {
  border-color: transparent;
  background: #efeff1;
  color: #151515;
}

.compound-button:not(.is-active):hover,
.input-method-button:not(.is-active):hover,
.mode-button:not(.is-active):hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(245, 245, 245, 0.88);
}

.compound-button:active,
.input-method-button:active,
.mode-button:active,
.schedule-pill:active {
  transform: translateY(1px);
}

.compound-button:focus-visible,
.input-method-button:focus-visible,
.mode-button:focus-visible,
.schedule-pill:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(245, 245, 245, 0.16);
}

.mode-panel {
  display: grid;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--spacing-16);
  margin-bottom: var(--spacing-20);
}

h2 {
  color: var(--color-porcelain);
  font-size: 19px;
  font-weight: 450;
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
}

.form-title {
  max-width: 100%;
  color: var(--color-porcelain);
  opacity: 0.9;
  font-size: 17px;
  font-weight: 450;
  line-height: 1.35;
}

.field-grid {
  display: grid;
  gap: var(--spacing-20);
}

.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 6px;
}

.field > span:first-child {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.input-wrap,
select {
  display: flex;
  align-items: center;
  min-height: 52px;
  width: 100%;
  border: 1px solid var(--color-softer-border);
  border-radius: 18px;
  background: var(--color-input-dark);
  color: var(--color-porcelain);
  box-shadow: var(--shadow-md);
}

.input-wrap input {
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--color-porcelain);
  font-size: 16px;
  padding: var(--spacing-12) var(--spacing-8) var(--spacing-12) var(--component-input-x);
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
}

.input-wrap span {
  flex: 0 0 auto;
  padding-right: var(--spacing-12);
  color: var(--color-muted-premium);
  font-family: var(--font-berkeley-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
}

.custom-select {
  position: relative;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border-input);
  border-radius: 16px;
  background: var(--input-bg);
  color: var(--text-main);
  padding: 0 14px;
  font-size: 16px;
  font-weight: 400;
  text-align: left;
  box-shadow: var(--shadow-md);
}

.select-chevron {
  color: var(--text-muted);
  flex: 0 0 auto;
  height: 16px;
  width: 16px;
  transition: transform 160ms ease;
  transform-origin: center;
}

.custom-select-trigger.is-open .select-chevron {
  transform: rotate(180deg);
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  display: grid;
  gap: 2px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 18px;
  background: #111111;
  padding: 6px;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.custom-select-option {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--text-soft);
  padding: 0 12px;
  font-size: 15px;
  font-weight: 450;
  text-align: left;
}

.custom-select-option:hover {
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.92);
}

.custom-select-option.is-selected {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.95);
}

.blend-fields {
  display: grid;
  gap: var(--spacing-16);
}

.compound-rows {
  display: grid;
  gap: var(--spacing-12);
}

.compound-row {
  display: grid;
  gap: 6px;
}

.compound-row > span:first-child {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.compound-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(148px, 0.75fr);
  gap: var(--spacing-8);
}

.compound-inputs > input {
  min-width: 0;
  min-height: 52px;
  width: 100%;
  border: 1px solid var(--color-softer-border);
  border-radius: 18px;
  background: var(--color-input-dark);
  color: var(--color-porcelain);
  box-shadow: var(--shadow-md);
  padding: var(--spacing-12) var(--component-input-x);
  font-size: 16px;
}

.vial-usage-card {
  display: grid;
  justify-items: stretch;
  gap: var(--spacing-20);
  margin-top: var(--spacing-24);
  border: 1px solid var(--color-soft-border);
  border-radius: 24px;
  background: #151515;
  padding: var(--spacing-20);
  box-shadow: rgba(0, 0, 0, 0.22) 0 18px 48px 0, var(--shadow-subtle);
  overflow: hidden;
}

.vial-usage-copy {
  display: grid;
  gap: 0;
  justify-items: start;
  min-width: 0;
  text-align: left;
}

.vial-usage-content {
  display: grid;
  gap: var(--spacing-4);
  justify-items: start;
  min-width: 0;
}

.vial-usage-kicker {
  margin: 0 0 var(--spacing-4);
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 450;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.vial-usage-content strong {
  color: var(--color-porcelain);
  font-family: var(--font-inter-variable);
  font-size: 21px;
  font-weight: 510;
  line-height: 1.35;
  letter-spacing: 0;
}

.vial-usage-content .vial-title-value {
  display: inline;
  color: var(--color-porcelain);
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.vial-usage-content span {
  display: block;
  color: var(--color-muted-premium);
  font-size: 13px;
  line-height: 1.5;
}

.vial-usage-visual {
  display: grid;
  justify-items: center;
  gap: var(--spacing-8);
  width: 100%;
  min-width: 0;
}

.vial-usage-visual span {
  max-width: 180px;
  color: var(--text-tertiary);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  text-align: center;
}

.vial-illustration {
  display: block;
  width: auto;
  height: 148px;
  color: rgba(245, 245, 245, 0.42);
}

.vial-liquid-surface {
  stroke: rgba(255, 238, 205, 0.72);
  stroke-width: 1;
  filter: drop-shadow(0 0 3px rgba(209, 161, 90, 0.18));
  pointer-events: none;
  transition: opacity 320ms ease, y1 680ms cubic-bezier(0.22, 1, 0.36, 1), y2 680ms cubic-bezier(0.22, 1, 0.36, 1);
}

.vial-dose-guides line {
  stroke: rgba(10, 10, 10, 0.46);
  stroke-width: 0.5;
  stroke-dasharray: 2 2;
  pointer-events: none;
}

#vialLiquid {
  transition: height 680ms cubic-bezier(0.22, 1, 0.36, 1), y 680ms cubic-bezier(0.22, 1, 0.36, 1);
}

.vial-leftover-region {
  fill: var(--vial-glass);
  opacity: 0;
  pointer-events: none;
  transition: height 680ms cubic-bezier(0.22, 1, 0.36, 1), opacity 320ms ease;
}

.schedule-card {
  display: grid;
  gap: var(--spacing-16);
  margin-top: var(--spacing-24);
  border: 1px solid var(--color-soft-border);
  border-radius: 24px;
  background: #151515;
  padding: var(--spacing-20);
  box-shadow: rgba(0, 0, 0, 0.22) 0 18px 48px 0, var(--shadow-subtle);
}

.schedule-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--spacing-12);
}

.schedule-header > div {
  min-width: 0;
}

.schedule-kicker {
  margin-bottom: var(--spacing-4);
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 450;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.schedule-header h2 {
  color: var(--color-porcelain);
  font-size: 21px;
  font-weight: 510;
  line-height: 1.35;
}

.schedule-calendar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;
  gap: 7px;
  min-height: 36px;
  max-width: 210px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(245, 245, 245, 0.92);
  padding: 0 var(--spacing-12);
  font-size: 12px;
  font-weight: 450;
  transition: opacity 160ms ease, background-color 160ms ease;
}

.schedule-calendar-button:hover {
  background: rgba(255, 255, 255, 0.06);
  opacity: 0.9;
}

.schedule-calendar-button svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
}

.schedule-calendar-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-duration {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.schedule-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-secondary);
  padding: 0 12px;
  font-size: 11px;
  font-weight: 450;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 120ms ease;
}

.schedule-pill.is-active {
  border-color: transparent;
  background: #f5f5f5;
  color: #151515;
}

.schedule-window {
  display: grid;
  gap: var(--spacing-12);
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 18px;
  background: #1a1a1a;
  padding: var(--spacing-14, 14px);
}

.schedule-frequency-label {
  color: var(--color-porcelain);
  font-size: 15px;
  font-weight: 450;
  line-height: 1.35;
}

.schedule-days {
  display: grid;
  gap: 6px;
  overflow: visible;
}

.schedule-weekday-row,
.schedule-week-row {
  display: grid;
  gap: 6px;
  align-items: center;
}

.schedule-weekday-row {
  grid-template-columns: 52px repeat(7, minmax(0, 1fr));
}

.schedule-week-row {
  grid-template-columns: 52px minmax(0, 1fr);
}

.schedule-weekday-row {
  align-items: end;
}

.schedule-weekday-row > span {
  color: rgba(245, 245, 245, 0.54);
  font-size: 10px;
  font-weight: 450;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.schedule-weekday-row > span:first-child {
  text-align: left;
}

.schedule-week-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.schedule-weekday-row > span:not(:first-child) {
  min-width: 0;
}

.schedule-month-label {
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 450;
  line-height: 1.2;
  text-align: left;
}

.schedule-day {
  position: relative;
  display: grid;
  min-height: 48px;
  min-width: 0;
  align-content: center;
  justify-items: center;
  gap: 1px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 6px;
  background: #171717;
  color: #f5f5f5;
  padding: 4px 3px;
  text-align: center;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.schedule-day-popover {
  position: absolute;
  z-index: 10;
  bottom: calc(100% + 8px);
  left: 50%;
  display: grid;
  gap: 3px;
  width: max-content;
  max-width: min(320px, 84vw);
  border-radius: 8px;
  background: #f5f5f5;
  color: #171717;
  padding: 8px 11px;
  text-align: left;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px) scale(0.98);
  transform-origin: 50% 100%;
  transition: opacity 220ms ease, transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.schedule-day-popover::after {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 9px;
  height: 9px;
  background: #f5f5f5;
  content: "";
  transform: translate(-50%, -5px) rotate(45deg);
}

.schedule-day-popover b {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.15;
}

.schedule-day-popover span {
  color: #171717;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.25;
  white-space: normal;
}

.schedule-day:hover,
.schedule-day:focus-visible {
  z-index: 11;
  transform: scale(1.06);
}

.schedule-day:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(245, 245, 245, 0.42);
}

.schedule-day:hover .schedule-day-popover,
.schedule-day:focus-visible .schedule-day-popover,
.schedule-day.is-popover-open .schedule-day-popover {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.schedule-day.is-today {
  border-color: rgba(245, 245, 245, 0.9);
  box-shadow: inset 0 0 0 1px rgba(245, 245, 245, 0.28);
}

.schedule-day-check {
  position: absolute;
  top: 5px;
  right: 5px;
  display: inline-grid;
  width: 12px;
  height: 12px;
  place-items: center;
  border-radius: var(--radius-pill);
  background: rgba(245, 245, 245, 0.12);
  color: rgba(245, 245, 245, 0.9);
}

.schedule-day-check svg {
  width: 8px;
  height: 8px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.schedule-day-check path {
  fill: none;
}

.schedule-day-weekday {
  color: rgba(245, 245, 245, 0.62);
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.1;
  text-transform: uppercase;
}

.schedule-day strong {
  color: #f5f5f5;
  font-family: var(--font-inter-variable);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
}

.schedule-dose-line {
  color: var(--text-helper);
  font-size: 8px;
  font-weight: 400;
  line-height: 1;
  margin-top: 1px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-day.is-blend {
  min-height: 48px;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.schedule-day.is-blend .schedule-day-weekday,
.schedule-day.is-blend strong {
  justify-self: center;
}

.schedule-blend-compact {
  display: block;
  max-width: 100%;
  margin-top: 1px;
  color: var(--text-helper);
  font-size: 8px;
  font-weight: 400;
  line-height: 1;
}

.schedule-blend-compact span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--spacing-16);
  margin-top: var(--spacing-20);
}

.syringe-module .result-strip {
  margin-top: var(--spacing-24);
}

.result-item,
.metric {
  display: grid;
  gap: var(--spacing-8);
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 18px;
  background: #1f1f1f;
  padding: var(--spacing-16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.syringe-module .result-item {
  align-content: start;
  gap: 0;
  border-color: rgba(255, 255, 255, 0.055);
  background: #1c1c1c;
  padding: 14px var(--spacing-16);
  box-shadow: none;
}

.result-item span,
.metric span {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.syringe-module .result-item > span {
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 14px;
}

.result-item strong,
.metric strong {
  color: var(--color-light-steel);
  font-family: var(--font-berkeley-mono);
  font-size: 17px;
  font-weight: 510;
  line-height: 1.4;
  letter-spacing: 0;
}

.result-item strong {
  color: var(--color-porcelain);
  font-size: 20px;
}

.syringe-module .result-item strong {
  color: #f5f5f5;
  font-weight: 400;
}

.result-helper {
  display: block;
  color: var(--text-helper);
  font-family: var(--font-inter-variable);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}

.result-helper[hidden] {
  display: none;
}

.result-context {
  display: block;
  color: var(--text-tertiary);
  font-family: var(--font-inter-variable);
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
}

.blend-breakdown {
  display: block;
  max-width: 100%;
  color: var(--text-helper);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

.blend-breakdown[hidden] {
  display: none;
}

.weekly-blend-breakdown {
  display: block;
  max-width: 100%;
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.weekly-blend-breakdown span {
  display: inline;
}

.weekly-blend-breakdown span + span::before {
  content: "  •  ";
}

.weekly-blend-breakdown[hidden] {
  display: none;
}

.syringe-module {
  margin-top: var(--spacing-28, 28px);
  border: 1px solid var(--color-soft-border);
  border-radius: 24px;
  background: #151515;
  padding: var(--spacing-24);
  box-shadow: rgba(0, 0, 0, 0.22) 0 18px 48px 0, var(--shadow-subtle);
}

.syringe-summary {
  display: grid;
  gap: var(--spacing-6, 6px);
  margin-bottom: var(--spacing-20);
}

.syringe-summary p {
  margin: 0;
  color: var(--color-porcelain);
  font-size: 21px;
  font-weight: 510;
  line-height: 1.35;
  letter-spacing: 0;
}

.syringe-summary strong {
  color: var(--color-porcelain);
  font-weight: inherit;
}

.syringe-summary span {
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
}

.syringe-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-12);
  margin-bottom: var(--spacing-12);
}

.syringe-readout span {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.syringe-readout strong {
  color: var(--color-porcelain);
  font-family: var(--font-berkeley-mono);
  font-size: 15px;
  font-weight: 400;
}

.syringe {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 128px;
}

.syringe-plunger-line,
.needle {
  stroke: rgba(245, 245, 245, 0.2);
  stroke-width: 1.2;
  stroke-linecap: round;
}

.syringe-endcap,
.needle-tip {
  fill: rgba(245, 245, 245, 0.14);
  stroke: rgba(255, 255, 255, 0.1);
}

.syringe-body {
  fill: rgba(245, 245, 245, 0.035);
  stroke: rgba(255, 255, 255, 0.11);
  stroke-width: 1;
  stroke-linejoin: round;
}

.syringe-channel {
  fill: rgba(255, 255, 255, 0.028);
  stroke: rgba(255, 255, 255, 0.08);
  stroke-opacity: 1;
}

.barrel-fill {
  fill: url("#doseFill");
  transition: width 160ms ease;
}

.syringe-inner-highlight {
  fill: rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.syringe-glass {
  fill: url("#barrelSheen");
  stroke: rgba(247, 248, 248, 0.07);
}

.syringe-stopper {
  fill: rgba(245, 245, 245, 0.86);
  transition: x 160ms ease;
}

.ticks line {
  stroke: var(--color-light-steel);
  stroke-opacity: 0.2;
  stroke-width: 0.8;
}

.ticks .major {
  stroke-opacity: 0.42;
  stroke-width: 1;
}

.syringe-labels {
  fill: var(--text-muted);
  font-family: var(--font-berkeley-mono);
  font-size: 11px;
  letter-spacing: 0;
  text-anchor: middle;
}

.syringe-labels .scale-name {
  fill: var(--text-muted);
  font-style: italic;
  text-anchor: end;
}

.syringe-labels .u100-label {
  fill: var(--text-soft);
  font-size: 11px;
  text-anchor: start;
}

.syringe-average-note {
  margin-top: var(--spacing-8);
  color: var(--color-muted-premium);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  text-align: center;
}

.syringe-average-note[hidden] {
  display: none;
}

.warning {
  margin-top: var(--spacing-8);
  color: var(--color-warning-red);
  font-size: 13px;
  line-height: 1.5;
}

.disclaimer {
  display: block;
  justify-content: center;
  max-width: 620px;
  margin: var(--spacing-40) auto 0;
  color: var(--footer-muted);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.55;
  text-align: center;
}

.support-strip {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  margin: var(--spacing-28, 28px) auto 0;
  color: var(--footer-muted);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.support-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-porcelain);
  padding: 4px var(--spacing-8);
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  transition: opacity 160ms ease, background-color 160ms ease;
}

.support-button span {
  font-family: var(--font-geist-pixel);
  letter-spacing: 0;
}

.support-button:hover {
  opacity: 0.86;
}

.support-button img {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  transform-origin: center;
  transition: transform 180ms ease;
}

.support-button:hover img {
  transform: rotate(-8deg) scale(1.04);
}

.legal-links {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-8);
  width: 100%;
  margin: var(--spacing-20) auto 0;
  color: var(--footer-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
}

.legal-link {
  border: 0;
  background: transparent;
  color: var(--footer-muted);
  padding: var(--spacing-4) 2px;
  font: inherit;
  cursor: pointer;
  transition: color 160ms ease, opacity 160ms ease;
}

.legal-link:hover {
  color: rgba(245, 245, 245, 0.86);
}

.legal-dialog {
  width: min(560px, calc(100% - var(--spacing-32)));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: #101010;
  color: var(--text-main);
  padding: 0;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.58);
}

.legal-dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
}

.legal-dialog-card {
  display: grid;
  gap: var(--spacing-20);
  padding: 28px;
}

.legal-dialog-header {
  display: block;
}

.legal-dialog h2 {
  margin: 0;
  color: var(--text-main);
  font-size: 22px;
  font-weight: 510;
  line-height: 1.25;
}

.legal-dialog-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: var(--spacing-4);
}

.legal-close {
  min-height: 38px;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(245, 245, 245, 0.82);
  padding: 0 var(--spacing-16);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  transition: background-color 160ms ease, opacity 160ms ease;
}

.legal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  opacity: 0.9;
}

.legal-dialog-body {
  display: grid;
  gap: var(--spacing-12);
  color: rgba(176, 176, 176, 0.86);
  font-size: 14px;
  line-height: 1.6;
}

.legal-dialog-body p {
  margin: 0;
}

body.theme-light .mode-toggle,
body.theme-light .theme-button {
  border-color: transparent;
  background: transparent;
}

body.theme-light .language-trigger {
  color: rgba(21, 21, 21, 0.62);
}

body.theme-light .language-trigger:hover,
body.theme-light .language-trigger.is-open {
  background: rgba(17, 17, 17, 0.045);
  color: rgba(17, 17, 17, 0.9);
}

body.theme-light .language-trigger:focus-visible {
  box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.12);
}

body.theme-light .language-menu {
  border-color: rgba(17, 17, 17, 0.07);
  background: #ffffff;
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.055),
    0 2px 6px rgba(0, 0, 0, 0.04);
}

body.theme-light .compound-toggle,
body.theme-light .input-method-toggle {
  border-color: transparent;
  background: transparent;
}

body.theme-light .mode-button.is-active {
  border-color: transparent;
  background: #f7f7f7;
  color: #111111;
  box-shadow: none;
}

body.theme-light .language-button.is-active {
  background: rgba(17, 17, 17, 0.055);
  color: #111111;
}

body.theme-light .hero-helper-link {
  color: var(--text-tertiary);
}

body.theme-light .hero-helper-link:hover {
  color: rgba(17, 17, 17, 0.9);
}

body.theme-light .brand-mark img {
  filter: invert(1);
}

body.theme-light .compound-button.is-active,
body.theme-light .input-method-button.is-active {
  border-color: transparent;
  background: #151515;
  color: #ffffff;
  box-shadow: none;
}

body.theme-light .input-method-button {
  border-color: #e0e0e0;
  background: #ffffff;
  color: var(--text-secondary);
}

body.theme-light .language-button,
body.theme-light .compound-button,
body.theme-light .input-method-button,
body.theme-light .mode-button,
body.theme-light .theme-button {
  color: var(--text-secondary);
}

body.theme-light .mode-button {
  color: rgba(17, 17, 17, 0.72);
}

body.theme-light .language-button:hover {
  background: rgba(17, 17, 17, 0.035);
  color: rgba(17, 17, 17, 0.9);
}

body.theme-light .language-button:focus-visible {
  box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.1);
}

body.theme-light .theme-button.is-active {
  background: transparent;
  color: #111111;
}

body.theme-light .theme-button:hover {
  background: #f7f7f7;
}

body.theme-light .card,
body.theme-light .calculator-card {
  background: var(--card-bg);
  box-shadow: none;
}

body.theme-light .calculator-card {
  background: transparent;
}

body.theme-light .button-primary,
body.theme-light .schedule-pill.is-active {
  background: #111111;
  color: #ffffff;
}

body.theme-light .schedule-pill,
body.theme-light .button-secondary {
  border-color: #e5e5e5;
  background: #ffffff;
  color: rgba(17, 17, 17, 0.72);
  box-shadow: none;
}

body.theme-light .compound-button:not(.is-active):hover,
body.theme-light .input-method-button:not(.is-active):hover,
body.theme-light .mode-button:not(.is-active):hover,
body.theme-light .schedule-pill:not(.is-active):hover {
  background: rgba(17, 17, 17, 0.035);
  color: #111111;
}

body.theme-light .compound-button:focus-visible,
body.theme-light .input-method-button:focus-visible,
body.theme-light .mode-button:focus-visible,
body.theme-light .schedule-pill:focus-visible {
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.12);
}

body.theme-light .schedule-pill.is-active {
  border-color: transparent;
  background: #111111;
  color: #ffffff;
}

body.theme-light .button-secondary {
  background: #f5f5f5;
  color: #111111;
}

body.theme-light .clear-button {
  border-color: transparent;
  background: transparent;
  color: rgba(17, 17, 17, 0.5);
}

body.theme-light .clear-button:hover {
  border-color: transparent;
  background: rgba(17, 17, 17, 0.045);
  color: #111111;
}

body.theme-light .custom-select-menu {
  border-color: rgba(17, 17, 17, 0.08);
  background: #ffffff;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.06),
    0 2px 6px rgba(0, 0, 0, 0.04);
}

body.theme-light .custom-select-option {
  color: rgba(17, 17, 17, 0.82);
}

body.theme-light .custom-select-option:hover {
  background: rgba(17, 17, 17, 0.035);
  color: #111111;
}

body.theme-light .custom-select-option.is-selected {
  background: rgba(17, 17, 17, 0.05);
  color: #111111;
}

body.theme-light .input-wrap:focus-within,
body.theme-light .custom-select-trigger:focus-visible {
  border-color: #bdbdbd;
  box-shadow: none;
}

body.theme-light .result-item,
body.theme-light .metric,
body.theme-light .syringe-module,
body.theme-light .schedule-card,
body.theme-light .vial-usage-card,
body.theme-light .schedule-window {
  border-color: #e5e5e5;
  background: #ffffff;
  box-shadow: none;
}

body.theme-light .vial-usage-card {
  background: #ffffff;
}

body.theme-light .vial-usage-visual span {
  color: rgba(17, 17, 17, 0.56);
}

body.theme-light .vial-illustration {
  color: rgba(17, 17, 17, 0.32);
}

body.theme-light .vial-liquid-surface {
  stroke: rgba(255, 255, 255, 0.86);
  filter: drop-shadow(0 0 2px rgba(201, 154, 87, 0.16));
}

body.theme-light .vial-dose-guides line {
  stroke: rgba(255, 255, 255, 0.82);
}

body.theme-light .result-item,
body.theme-light .metric {
  background: #fafafa;
}

body.theme-light .syringe-module .result-item {
  border-color: #e9e9e9;
  background: #fafafa;
}

body.theme-light .syringe-module .result-item > span {
  color: var(--text-secondary);
}

body.theme-light .syringe-module .result-item strong {
  color: #111111;
}

body.theme-light .schedule-window {
  background: #fafafa;
}

body.theme-light .schedule-calendar-button {
  border-color: #e2e2e2;
  background: #fafafa;
  color: #111111;
}

body.theme-light .schedule-calendar-button:hover {
  background: #f3f3f4;
  color: #111111;
}

body.theme-light .schedule-day {
  border-color: #e5e5e5;
  background: #ffffff;
  color: #111111;
}

body.theme-light .schedule-day-weekday,
body.theme-light .schedule-dose-line,
body.theme-light .schedule-blend-compact {
  color: rgba(17, 17, 17, 0.68);
}

body.theme-light .schedule-day strong {
  color: #111111;
}

body.theme-light .schedule-day.is-today {
  border-color: #171717;
  box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.08);
}

body.theme-light .schedule-day-check {
  background: rgba(17, 17, 17, 0.08);
  color: #111111;
}

body.theme-light .schedule-day-popover {
  background: #171717;
  color: #ffffff;
}

body.theme-light .schedule-day-popover::after {
  background: #171717;
}

body.theme-light .schedule-day-popover b,
body.theme-light .schedule-day-popover span {
  color: #ffffff;
}

body.theme-light .schedule-weekday-row > span,
body.theme-light .schedule-month-label {
  color: #707070;
}

body.theme-light .blend-breakdown,
body.theme-light .result-helper,
body.theme-light .result-context,
body.theme-light .weekly-blend-breakdown {
  color: var(--text-helper);
}

body.theme-light .syringe-summary p {
  color: var(--color-porcelain);
}

body.theme-light .syringe-summary strong {
  color: #111111;
}

body.theme-light .syringe-summary span {
  color: var(--text-tertiary);
}

body.theme-light .syringe-plunger-line,
body.theme-light .needle {
  stroke: rgba(72, 78, 84, 0.34);
}

body.theme-light .syringe-endcap,
body.theme-light .needle-tip {
  fill: #d8d8d6;
  stroke: rgba(46, 46, 46, 0.18);
}

body.theme-light .syringe-body {
  fill: rgba(239, 239, 238, 0.58);
  stroke: rgba(46, 46, 46, 0.18);
}

body.theme-light .syringe-channel {
  fill: rgba(211, 211, 210, 0.34);
  stroke: rgba(46, 46, 46, 0.14);
}

body.theme-light .syringe-glass {
  stroke: rgba(46, 46, 46, 0.09);
}

body.theme-light .syringe-inner-highlight {
  fill: rgba(255, 255, 255, 0.5);
}

body.theme-light .syringe-stopper {
  fill: #393939;
  opacity: 0.9;
}

body.theme-light .ticks line {
  stroke: #555555;
  stroke-opacity: 0.2;
}

body.theme-light .ticks .major {
  stroke-opacity: 0.36;
}

body.theme-light .syringe-labels,
body.theme-light .syringe-labels .scale-name {
  fill: rgba(17, 17, 17, 0.58);
}

body.theme-light .copy-status,
body.theme-light .copy-status::after,
body.theme-light .legal-dialog {
  border-color: #e5e5e5;
  background: #ffffff;
  color: #111111;
  box-shadow: none;
}

body.theme-light .legal-close {
  background: rgba(20, 20, 20, 0.06);
  color: rgba(20, 20, 20, 0.8);
}

body.theme-light .legal-dialog-body {
  color: rgba(20, 20, 20, 0.68);
}

@media (max-width: 860px) {
  .app-shell {
    width: min(100% - var(--spacing-24), 680px);
    padding-top: var(--spacing-16);
    padding-bottom: var(--spacing-32);
  }

  .two-columns,
  .result-strip {
    grid-template-columns: 1fr;
  }

  .result-actions {
    align-items: center;
    flex-wrap: nowrap;
  }

  .result-actions > .button {
    flex: 0 0 auto;
  }

  .copy-action {
    min-width: 0;
  }

  .button {
    flex: 1 1 150px;
  }

  .result-actions > .button {
    flex: 0 0 auto;
  }

  .syringe-module {
    overflow: hidden;
  }

  .vial-illustration {
    height: 116px;
  }
}

@media (max-width: 520px) {
  .app-shell {
    width: calc(100% - var(--spacing-32));
    padding-top: var(--spacing-16);
    padding-bottom: var(--spacing-24);
  }

  .hero-panel {
    gap: var(--spacing-20);
    padding: 0;
  }

  .hero-topbar {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: var(--spacing-12);
  }

  .top-controls {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 100%;
    gap: 0;
    padding-top: 2px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .brand-mark img {
    width: 28px;
  }

  .hero-copy {
    min-width: 0;
  }

  .calculator-stack {
    gap: var(--spacing-16);
  }

  .calculator-card {
    padding: 0;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 19px;
  }

  .form-title {
    font-size: 16px;
    line-height: 1.32;
  }

  .input-wrap,
  .custom-select-trigger {
    min-height: 56px;
  }

  .compound-inputs {
    grid-template-columns: 1fr;
  }

  .syringe-readout {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--spacing-4);
  }

  .syringe-readout strong {
    font-size: 14px;
  }

  .syringe-module {
    padding: var(--spacing-22, 22px) var(--spacing-18, 18px);
  }

  .syringe-summary {
    margin-bottom: var(--spacing-24);
  }

  .syringe-readout {
    margin-bottom: var(--spacing-16);
  }

  .syringe-module .result-strip {
    gap: var(--spacing-12);
    margin-top: var(--spacing-24);
  }

  .syringe-module .result-item {
    padding: var(--spacing-18, 18px);
  }

  .vial-usage-card {
    grid-template-columns: 1fr;
    padding: var(--spacing-20);
  }

  .vial-usage-copy {
    justify-items: start;
    width: 100%;
    text-align: left;
  }

  .vial-usage-content {
    justify-items: start;
  }

  .vial-usage-content strong {
    font-size: 18px;
    line-height: 1.35;
  }

  .syringe-summary p,
  .schedule-header h2 {
    font-size: 18px;
  }

  .vial-usage-content span {
    font-size: 12px;
  }

  .syringe {
    width: 100%;
    height: 104px;
    max-width: 100%;
    margin: var(--spacing-4) 0 var(--spacing-8);
  }

  .syringe-labels {
    font-size: 14px;
  }

  .syringe-labels .u100-label {
    font-size: 13px;
  }

  .ticks line {
    stroke-opacity: 0.24;
  }

  .ticks .major {
    stroke-opacity: 0.46;
  }

  .result-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: var(--spacing-8);
  }

  .result-actions .button {
    width: auto;
    flex: 0 0 auto;
  }

  .copy-action {
    flex: 0 1 auto;
    min-width: 0;
  }

  .copy-button {
    width: auto;
    max-width: 100%;
  }

  .copy-button-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mode-toggle {
    flex: 0 1 auto;
    border-radius: var(--radius-pill);
  }

  .input-method-button {
    min-width: 0;
    min-height: 26px;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 11.5px;
  }

  .mode-button {
    min-height: 30px;
    min-width: 56px;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 12px;
    white-space: nowrap;
  }

  .label-full {
    display: none;
  }

  .label-short {
    display: inline;
  }

  .language-switch {
    height: 28px;
  }

  .theme-button {
    width: 22px;
    height: 22px;
  }

  .theme-button svg {
    width: 16px;
    height: 16px;
  }

  .language-button {
    min-width: 0;
    height: 26px;
    padding: 0 8px;
  }

  .legal-dialog {
    width: min(100% - var(--spacing-24), 560px);
  }

  .legal-dialog-card {
    gap: var(--spacing-16);
    padding: var(--spacing-20);
  }

  .legal-dialog-footer {
    padding-top: var(--spacing-8);
  }

  .legal-close {
    width: 100%;
  }

  .button {
    width: 100%;
  }

  .result-actions .button {
    width: auto;
    flex: 0 0 auto;
  }

  .schedule-card {
    padding: var(--spacing-20);
  }

  .schedule-window {
    padding: var(--spacing-14, 14px);
  }

  .schedule-weekday-row,
  .schedule-week-row {
    gap: 5px;
  }

  .schedule-weekday-row {
    grid-template-columns: 34px repeat(7, minmax(0, 1fr));
  }

  .schedule-week-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .schedule-week-days {
    gap: 5px;
  }

  .schedule-month-label {
    font-size: 10px;
  }

  .schedule-day {
    min-height: 48px;
    border-radius: 6px;
    padding: 4px 3px;
  }

  .schedule-day-check {
    display: none;
  }

  .schedule-day-popover {
    display: none;
  }

  .schedule-day.is-blend {
    min-height: 48px;
  }

  .schedule-day strong {
    font-size: 12px;
  }

  .schedule-dose-line {
    font-size: 8px;
  }
}
