:root {
  --ink: #1e2725;
  --muted: #6c7771;
  --line: #dce3dc;
  --paper: #f5f6f1;
  --white: #ffffff;
  --green: #1d6652;
  --green-dark: #124638;
  --mint: #dcece2;
  --yellow: #edbd52;
  --yellow-pale: #fff4d7;
  --lavender: #e9e5f1;
  --shadow: 0 18px 55px rgba(32, 49, 42, .08);
  color: var(--ink);
  font-family: 'Manrope', sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); line-height: 1.5; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }

.site-header { border-bottom: 1px solid var(--line); background: rgba(245, 246, 241, .92); }
.site-header__inner { max-width: 1180px; margin: auto; padding: 22px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { color: var(--ink); display: inline-flex; align-items: center; gap: 11px; font-size: 15px; font-weight: 800; letter-spacing: -.03em; text-decoration: none; }
.brand__mark { width: 31px; height: 31px; display: grid; place-items: center; color: var(--white); background: var(--green); border-radius: 10px 10px 10px 2px; font-size: 15px; }
.site-header__status, .saved-label { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.site-header__status { display: inline-flex; align-items: center; gap: 8px; }
.site-header__dot, .saved-label__dot { width: 7px; height: 7px; border-radius: 50%; background: #6eaf68; }

.page-shell { max-width: 1180px; margin: auto; padding: 66px 28px 80px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr); align-items: end; gap: 60px; margin-bottom: 78px; }
.eyebrow { margin: 0 0 14px; color: var(--green); font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 710px; margin-bottom: 22px; font-size: clamp(44px, 6vw, 79px); line-height: .98; letter-spacing: -.075em; font-weight: 800; }
.hero__intro { max-width: 530px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.7; }
.hero__note { padding: 25px 26px; border-left: 2px solid var(--yellow); background: var(--yellow-pale); display: grid; gap: 7px; color: #6a5a2f; font-size: 13px; }
.hero__note-label { color: #9b7627; font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.hero__note strong { color: #4c401f; font-size: 16px; font-weight: 800; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.section-heading--stacked { align-items: end; }
h2 { margin-bottom: 0; font-size: 31px; line-height: 1.1; letter-spacing: -.055em; }
.section-heading__hint { max-width: 275px; margin: 0; color: var(--muted); font-size: 12px; text-align: right; }
.button { border: 0; transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease; }
.button:hover { transform: translateY(-2px); }
.button--text { padding: 5px 0; color: var(--green); background: transparent; font-size: 12px; font-weight: 800; }
.button--text:hover { color: var(--green-dark); }

.summary { margin-bottom: 82px; scroll-margin-top: 24px; }
.summary__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.summary-card { min-height: 205px; padding: 27px 29px 23px; display: flex; flex-direction: column; border: 1px solid transparent; box-shadow: var(--shadow); }
.summary-card--liquid { background: var(--mint); border-color: #c9e1d2; }
.summary-card--powder { background: var(--lavender); border-color: #ddd6e9; }
.summary-card__topline { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.summary-card__icon { width: 27px; height: 27px; display: grid; place-items: center; color: var(--green); border: 1px solid currentColor; border-radius: 50%; font-size: 18px; }
.summary-card__value { margin-top: auto; font-size: 56px; line-height: .95; letter-spacing: -.07em; }
.summary-card__label { color: var(--muted); font-size: 12px; }
.summary-card__detail { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(30, 39, 37, .12); color: var(--muted); font-family: 'DM Mono', monospace; font-size: 11px; }
.summary-card__detail span { display: block; }
.summary-card__detail span + span { margin-top: 5px; color: var(--ink); }

.calculator { margin-bottom: 84px; }
.calculator__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.calculator-form { padding: 30px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); }
.calculator-form--liquid { border-top: 4px solid var(--green); }
.calculator-form--powder { border-top: 4px solid #8873ad; }
.calculator-form__header { display: flex; align-items: start; justify-content: space-between; margin-bottom: 13px; }
.calculator-form__tag { color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.calculator-form h3 { margin: 7px 0 0; font-size: 25px; letter-spacing: -.05em; }
.calculator-form__unit { color: var(--green); font-family: 'DM Mono', monospace; font-size: 13px; font-weight: 500; }
.calculator-form--powder .calculator-form__unit { color: #8873ad; }
.calculator-form__description { min-height: 45px; margin-bottom: 25px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.field { display: block; margin-bottom: 15px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field__label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 800; }
.field__control { display: flex; align-items: center; border-bottom: 1px solid #bfcac1; }
.field__control:focus-within { border-color: var(--green); }
.field__control input, .field select { width: 100%; min-height: 43px; padding: 9px 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 14px; font-weight: 700; }
.field__control span { color: var(--muted); font-family: 'DM Mono', monospace; font-size: 11px; }
.field select { padding: 9px 30px 9px 0; border-bottom: 1px solid #bfcac1; appearance: auto; }
.is-hidden { display: none; }
.button--primary, .button--secondary { width: 100%; min-height: 50px; margin-top: 13px; color: var(--white); font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.button--primary { background: var(--green); }
.button--primary:hover { background: var(--green-dark); box-shadow: 0 8px 20px rgba(29, 102, 82, .2); }
.button--secondary { background: #8873ad; }
.button--secondary:hover { background: #725a9c; box-shadow: 0 8px 20px rgba(136, 115, 173, .2); }
.button span { margin-left: 8px; font-size: 18px; vertical-align: -1px; }
.form-message { min-height: 17px; margin: 10px 0 0; color: #bd4c3f; font-size: 11px; }

.results { margin-bottom: 45px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--white); box-shadow: var(--shadow); }
.results-table { width: 100%; min-width: 750px; border-collapse: collapse; text-align: left; }
.results-table th { padding: 16px 18px; color: var(--muted); background: #fafbf8; font-family: 'DM Mono', monospace; font-size: 10px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.results-table td { padding: 19px 18px; border-top: 1px solid var(--line); font-size: 13px; }
.results-table td:not(:first-child) { font-family: 'DM Mono', monospace; font-size: 12px; }
.results-table__empty td { padding: 34px 18px; color: var(--muted); text-align: center; font-family: 'Manrope', sans-serif; }
.results-table__type { display: flex; align-items: center; gap: 9px; font-weight: 800; }
.results-table__type-mark { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.results-table__type-mark--powder { background: #8873ad; }
.results-table__duration { color: var(--green); font-weight: 800; }
.results-table__cost--good { color: #237747 !important; font-weight: 800; }
.results-table__cost--bad { color: #b3443c !important; font-weight: 800; }
.comparison { margin-top: 15px; padding: 18px 21px; display: flex; align-items: center; gap: 14px; border-left: 4px solid var(--line); background: var(--white); color: var(--muted); }
.comparison--good { border-left-color: #3b9a68; background: #e9f6ed; color: #275d41; }
.comparison--neutral { border-left-color: #d0a03b; background: #fff7df; color: #705a27; }
.comparison__icon { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 16px; }
.comparison__title { display: block; margin-bottom: 3px; color: var(--ink); font-size: 13px; }
.comparison__text { margin: 0; font-size: 12px; }
.comparison__good { color: #237747; font-weight: 800; }
.comparison__bad { color: #b3443c; font-weight: 800; }
.delete-button { padding: 5px 0; border: 0; color: #bd4c3f; background: transparent; font-size: 11px; font-weight: 800; }
.delete-button:hover { color: #8f3027; text-decoration: underline; }

.site-footer { max-width: 1180px; margin: auto; padding: 24px 28px 35px; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.site-footer span:first-child { color: var(--ink); font-weight: 800; }

@media (max-width: 760px) {
  .site-header__inner, .site-footer { padding-left: 20px; padding-right: 20px; }
  .site-header__status { display: none; }
  .page-shell { padding: 45px 20px 60px; }
  .hero { grid-template-columns: 1fr; gap: 30px; margin-bottom: 60px; }
  h1 { font-size: 48px; }
  .hero__note { max-width: 390px; }
  .summary__grid, .calculator__grid { grid-template-columns: 1fr; }
  .field-row { gap: 14px; }
  .summary, .calculator { margin-bottom: 62px; }
  .section-heading { align-items: start; flex-direction: column; gap: 14px; }
  .section-heading__hint { text-align: left; }
  .saved-label { align-self: start; }
  .site-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero__copy, .hero__note, .summary-card, .calculator-form { animation: rise-in .65s ease both; }
  .hero__note { animation-delay: .1s; }
  .summary-card:nth-child(2) { animation-delay: .08s; }
  .calculator-form:nth-child(2) { animation-delay: .15s; }
  @keyframes rise-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
}
