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

:root {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #173832;
  background: #f4f7f5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #173832;
  --muted: #70827d;
  --soft: #e7eeea;
  --accent: #147b68;
  --accent-dark: #0e6556;
  --pale: #eaf5f0;
  --white: #ffffff;
  --danger: #bd4a42;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #f4f7f5; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.site-header { height: 76px; background: rgba(255,255,255,.86); border-bottom: 1px solid #e6ece8; }
.header-inner { width: min(1100px, calc(100% - 56px)); height: 100%; margin: auto; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; color: #fff; background: #147b68; }
.brand-mark svg { width: 29px; height: 29px; }
.brand-copy { display: flex; flex-direction: column; gap: 2px; }
.brand-copy strong { font-family: Manrope, sans-serif; font-size: 15px; font-weight: 800; letter-spacing: -.35px; }
.brand-copy span { color: #82918c; font-size: 9px; font-weight: 700; letter-spacing: 1.18px; }
.header-note { display: flex; align-items: center; gap: 9px; color: #61746e; font-size: 12px; font-weight: 600; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #31a27e; box-shadow: 0 0 0 4px #e8f4ef; }
.page-shell { width: min(1100px, calc(100% - 56px)); margin: 0 auto; }
.intro { min-height: 226px; display: flex; align-items: center; justify-content: space-between; gap: 36px; padding: 35px 0 38px; }
.eyebrow, .section-kicker { display: flex; align-items: center; gap: 9px; margin: 0; color: #147b68; font-size: 10px; font-weight: 700; letter-spacing: 1.42px; }
.eyebrow-line { width: 19px; height: 1px; background: #66a99b; }
h1, h2, p { margin-top: 0; }
h1 { margin: 13px 0 9px; font-family: Manrope, sans-serif; color: #153b34; font-size: clamp(32px, 4vw, 43px); line-height: 1.13; font-weight: 800; letter-spacing: -1.9px; }
.intro-copy { max-width: 495px; margin: 0; color: #657872; font-size: 14px; line-height: 1.65; }
.calculator-layout { display: flex; flex-direction: column; align-items: flex-start; gap: 19px; padding: 28px 0 47px; border-top: 1px solid #e3ebe6; }
.entry-column { min-width: 0; width: min(100%, 820px); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-kicker { margin-bottom: 5px; color: #82918c; font-size: 9px; letter-spacing: 1.24px; }
h2 { margin: 0; color: #1b3933; font-family: Manrope, sans-serif; font-size: 20px; font-weight: 800; letter-spacing: -.55px; }
.count-badge { display: inline-grid; vertical-align: 2px; place-items: center; min-width: 22px; height: 22px; margin-left: 3px; padding: 0 6px; border-radius: 8px; color: #147b68; background: #e7f1ed; font: 700 11px 'DM Sans', sans-serif; letter-spacing: 0; }
.section-hint { max-width: 205px; margin: 0 0 2px; color: #899690; font-size: 11px; line-height: 1.45; text-align: right; }
.infusion-list { display: flex; flex-direction: column; gap: 13px; }
.infusion-card { padding: 17px 18px 15px; border: 1px solid #e1e9e4; border-radius: 14px; background: #fff; box-shadow: 0 3px 11px rgba(29, 71, 57, .025); transition: border-color .16s ease, box-shadow .16s ease; }
.infusion-card:focus-within { border-color: #b7d6cb; box-shadow: 0 5px 19px rgba(29, 90, 69, .06); }
.infusion-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.infusion-title { display: flex; align-items: center; gap: 9px; color: #203c35; font-size: 13px; font-weight: 700; }
.infusion-index { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; color: #147b68; background: #eaf5f0; font-size: 11px; font-weight: 700; }
.remove-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 34px; padding: 5px 8px; border: 0; border-radius: 8px; color: #82918c; background: transparent; cursor: pointer; font-size: 11px; transition: color .16s ease, background .16s ease; }
.remove-button:hover:not(:disabled) { color: #a33d37; background: #fff1ef; }
.remove-button:disabled { opacity: .38; cursor: not-allowed; }
.remove-icon { font-size: 16px; line-height: 1; }
.name-field { margin-bottom: 12px; }
.field-label { display: block; margin: 0 0 6px; color: #61736d; font-size: 11px; font-weight: 600; }
.field-optional { color: #9aa59f; font-weight: 400; }
.name-input, .number-input { display: block; width: 100%; min-height: 46px; padding: 11px 12px; border: 1px solid #dfe7e2; border-radius: 9px; outline: none; color: #223d36; background: #fff; font-size: 15px; transition: border-color .16s ease, box-shadow .16s ease; }
.name-input::placeholder, .number-input::placeholder { color: #a6b1ac; }
.name-input:focus, .number-input:focus { border-color: #7db9a5; box-shadow: 0 0 0 3px rgba(35, 145, 111, .1); }
.input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input-wrap { position: relative; }
.input-wrap .number-input { padding-right: 53px; }
.unit-suffix { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); color: #84928c; font-size: 11px; pointer-events: none; }
.field-error { min-height: 0; margin: 5px 0 0; color: var(--danger); font-size: 11px; line-height: 1.35; }
.field-error:empty { display: none; }
.number-input.invalid, .name-input.invalid { border-color: #da9993; background-color: #fffafa; }
.item-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 15px; padding: 12px 13px; border-radius: 9px; background: #f4f8f6; }
.item-result-main { min-width: 0; }
.item-result-label { display: block; margin-bottom: 3px; color: #73857e; font-size: 10px; }
.item-result-time { display: block; color: #1b5345; font-family: Manrope, sans-serif; font-size: 16px; font-weight: 800; letter-spacing: -.35px; }
.item-result-time.pending { color: #87958f; font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 500; letter-spacing: 0; }
.converted-rate { flex: 0 0 auto; color: #6c8179; font-size: 10px; line-height: 1.5; text-align: right; }
.converted-rate strong { display: block; color: #45685d; font-size: 12px; font-weight: 700; }
.add-button { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 48px; margin-top: 13px; border: 1px dashed #a7c5b9; border-radius: 10px; color: #176e5c; background: rgba(255,255,255,.48); cursor: pointer; font-size: 13px; font-weight: 700; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.add-button:hover { border-color: #69a58e; background: #edf7f2; }
.add-button:active { transform: scale(.99); }
.add-button span { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 7px; color: #fff; background: #147b68; font-size: 17px; font-weight: 400; line-height: 1; }
.results-column { position: static; width: min(100%, 820px); }
.summary-card { overflow: hidden; padding: 20px; border: 1px solid #dbe9e2; border-radius: 15px; background: #fff; box-shadow: 0 6px 24px rgba(20, 70, 50, .045); }
.summary-topline { display: flex; align-items: center; gap: 9px; color: #73877f; font-size: 9px; font-weight: 700; letter-spacing: 1.22px; }
.summary-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #147b68; background: #eaf5f0; }
.summary-icon svg { width: 17px; height: 17px; }
.summary-caption { margin: 17px 0 4px; color: #74857e; font-size: 11px; }
.total-time { color: #165343; font-family: Manrope, sans-serif; font-size: clamp(28px, 3vw, 35px); line-height: 1.2; font-weight: 800; letter-spacing: -1.15px; overflow-wrap: anywhere; }
.total-status { min-height: 17px; margin: 6px 0 17px; color: #8a9791; font-size: 11px; line-height: 1.45; }
.total-status.is-ready { color: #45806b; }
.total-status.is-error { color: #ad5a50; }
.summary-divider { height: 1px; background: #e9eeeb; }
.summary-stats { display: flex; justify-content: space-between; gap: 10px; padding: 14px 0; }
.summary-stats div { display: flex; flex-direction: column; gap: 5px; }
.summary-stats div:last-child { text-align: right; }
.summary-stats span { color: #84918b; font-size: 10px; }
.summary-stats strong { color: #39584e; font-family: Manrope, sans-serif; font-size: 15px; font-weight: 800; }
.sequential-note { display: flex; gap: 8px; padding: 10px 11px; border-radius: 9px; color: #55786b; background: #eef6f1; }
.sequential-note > span { flex: 0 0 auto; font-size: 14px; }
.sequential-note p { margin: 0; color: #5f786e; font-size: 10px; line-height: 1.5; }
.safety-note { margin: 12px 5px 0; color: #89958f; font-size: 10px; line-height: 1.55; }
.page-footer { display: flex; justify-content: space-between; gap: 12px; padding: 16px 0 22px; border-top: 1px solid #e4eae6; color: #95a09b; font-size: 10px; }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(20,123,104,.35); outline-offset: 3px; }

@media (max-width: 760px) {
  .site-header { height: 68px; }
  .header-inner, .page-shell { width: min(100% - 36px, 560px); }
  .brand-mark { width: 37px; height: 37px; border-radius: 12px; }
  .header-note { font-size: 11px; }
  .intro { min-height: auto; align-items: flex-start; flex-direction: column; gap: 18px; padding: 30px 0 24px; }
  h1 { margin-top: 11px; font-size: clamp(31px, 8vw, 39px); letter-spacing: -1.6px; }
  .desktop-break { display: none; }
  .intro-copy { max-width: 450px; font-size: 13px; }
  .calculator-layout { display: flex; flex-direction: column; gap: 19px; padding: 20px 0 30px; }
  .results-column { position: static; order: 0; width: 100%; }
  .entry-column { width: 100%; }
  .summary-card { padding: 16px 17px; }
  .summary-caption { margin-top: 12px; }
  .total-time { font-size: clamp(28px, 8vw, 34px); }
  .total-status { margin-bottom: 12px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 5px; margin-bottom: 13px; }
  .section-hint { max-width: none; text-align: left; }
}

@media (max-width: 430px) {
  .header-inner, .page-shell { width: calc(100% - 30px); }
  .header-note { gap: 7px; font-size: 10px; }
  .brand-copy strong { font-size: 14px; }
  .brand-copy span { font-size: 8px; }
  .input-grid { grid-template-columns: 1fr; gap: 10px; }
  .infusion-card { padding: 14px 13px 13px; }
  .infusion-card-head { margin-bottom: 12px; }
  .name-field { margin-bottom: 10px; }
  .number-input, .name-input { min-height: 48px; }
  .page-footer { flex-direction: column; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

.start-time-entry { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 14px; padding: 14px 15px; border: 1px solid #dce9e3; border-radius: 12px; background: #edf5f1; }
.start-time-copy { min-width: 0; }
.start-time-label { display: block; margin-bottom: 4px; color: #315c4e; font-size: 12px; font-weight: 700; }
.start-time-label span { margin-left: 4px; color: #82918a; font-size: 10px; font-weight: 500; }
.start-time-copy p { margin: 0; color: #74867f; font-size: 10px; line-height: 1.45; }
.time-input { min-height: 44px; min-width: 126px; padding: 8px 10px; border: 1px solid #cbdcd3; border-radius: 9px; color: #1b5345; background: #fff; font: 700 15px 'DM Sans', sans-serif; }
.time-input:focus { outline: 3px solid rgba(20,123,104,.14); border-color: #70ad97; }
.individual-schedule { margin: 8px 2px 0; color: #467161; font-size: 11px; font-weight: 600; line-height: 1.5; }
.individual-schedule::before { content: '↳'; margin-right: 7px; color: #75a58f; }
.individual-schedule.pending { color: #899690; font-weight: 400; }
.end-time-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0 16px; padding: 12px 14px; border: 1px solid #dce9e3; border-radius: 10px; background: #eef6f1; }
.end-time-label { display: block; margin-bottom: 4px; color: #698078; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.end-time-note { margin: 0; color: #71827b; font-size: 10px; line-height: 1.45; }
.end-time-summary strong { flex: 0 0 auto; color: #155341; font-family: Manrope, sans-serif; font-size: 23px; font-weight: 800; letter-spacing: -.5px; text-align: right; }
@media (max-width: 520px) {
  .start-time-entry { align-items: flex-start; flex-direction: column; gap: 10px; }
  .time-input { width: 100%; min-height: 48px; }
  .end-time-summary { align-items: flex-start; flex-direction: column; }
  .end-time-summary strong { font-size: 22px; text-align: left; }
}
