:root {
  color-scheme: light;
  --ink: #173d36;
  --ink-deep: #0f2c28;
  --ink-soft: #506963;
  --paper: #f7f4ec;
  --surface: #fffdf8;
  --line: #d9ddd5;
  --line-strong: #bdc9c2;
  --mint: #d9ebe3;
  --mint-bright: #8ecbb3;
  --gold: #e5b85c;
  --gold-soft: #f4e6bd;
  --coral: #d98369;
  --danger: #a43d31;
  --shadow: 0 22px 60px rgb(23 61 54 / 10%);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --content-width: 1180px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink-deep);
  background:
    radial-gradient(circle at 10% 4%, rgb(217 235 227 / 72%), transparent 25rem),
    var(--paper);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
input[type="range"] {
  touch-action: manipulation;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  color: white;
  background: var(--ink-deep);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 3rem), var(--content-width));
  margin: 0 auto;
  padding: 1.6rem 0;
}

.brand {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border-radius: 0.8rem;
  color: var(--surface);
  background: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  font-weight: 700;
  box-shadow: inset 0 -3px rgb(0 0 0 / 10%);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.96rem;
  letter-spacing: -0.01em;
}

.brand small {
  color: var(--ink-soft);
  font-size: 0.73rem;
}

.header-link {
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
}

.header-link:hover {
  color: var(--ink-deep);
  border-color: var(--ink);
}

.hero {
  width: min(calc(100% - 3rem), 920px);
  margin: 5.5rem auto 4.75rem;
  text-align: center;
}

.hero__eyebrow,
.kicker {
  margin: 0 0 0.55rem;
  color: var(--ink-soft);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero__eyebrow {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  justify-content: center;
}

.hero__eyebrow span {
  width: 1.7rem;
  height: 2px;
  background: var(--gold);
}

.hero h1 {
  max-width: 810px;
  margin: 0 auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.hero__intro {
  max-width: 680px;
  margin: 1.8rem auto 2rem;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
}

.hero__facts {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(255 253 248 / 72%);
  box-shadow: 0 8px 25px rgb(23 61 54 / 5%);
}

.hero__facts span {
  padding: 0.65rem 1rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.hero__facts span + span {
  border-left: 1px solid var(--line);
}

.hero__facts strong {
  margin-right: 0.25rem;
  color: var(--ink-deep);
}

.calculator-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  width: min(calc(100% - 3rem), var(--content-width));
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgb(23 61 54 / 8%);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.config-panel,
.results-panel {
  min-width: 0;
  padding: clamp(2rem, 4.5vw, 3.4rem);
}

.section-heading {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 2.4rem;
}

.section-heading--wide {
  width: min(100%, var(--content-width));
  margin-right: auto;
  margin-left: auto;
}

.step-number {
  display: grid;
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 800;
}

.section-heading h2,
.results-panel h2,
.method-section h2,
.faq-section h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.configuration-form {
  display: grid;
  gap: 0;
}

.form-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.form-field + .form-field {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.field-heading {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  justify-content: space-between;
}

.field-heading label {
  display: block;
  color: var(--ink-deep);
  font-size: 0.92rem;
  font-weight: 800;
}

.field-heading p {
  max-width: 23rem;
  margin: 0.3rem 0 0;
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.number-suffix {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 0.65rem;
  background: white;
}

.number-suffix:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--mint);
}

.number-suffix input {
  width: 5.6rem;
  min-height: 2.7rem;
  padding: 0.45rem 0.2rem 0.45rem 0.65rem;
  border: 0;
  outline: 0;
  color: var(--ink-deep);
  background: transparent;
  font-size: 0.9rem;
  font-weight: 750;
  text-align: right;
}

.number-suffix span {
  padding: 0 0.65rem 0 0.35rem;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.number-suffix:has(input:disabled) {
  opacity: 0.65;
  background: var(--paper);
}

.range {
  --range-progress: 0%;
  width: 100%;
  height: 0.45rem;
  margin: 1rem 0 0;
  border-radius: 999px;
  outline: 0;
  background: linear-gradient(to right, var(--ink) var(--range-progress), var(--mint) var(--range-progress));
  cursor: pointer;
  appearance: none;
}

.range:disabled {
  cursor: not-allowed;
  filter: grayscale(0.25);
  opacity: 0.55;
}

.range::-webkit-slider-thumb {
  width: 1.35rem;
  height: 1.35rem;
  border: 4px solid white;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 1px var(--ink), 0 3px 8px rgb(23 61 54 / 25%);
  appearance: none;
}

.range::-moz-range-thumb {
  width: 0.8rem;
  height: 0.8rem;
  border: 4px solid white;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 1px var(--ink), 0 3px 8px rgb(23 61 54 / 25%);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.68rem;
}

.field-error {
  min-height: 1.1em;
  margin: 0.45rem 0 0;
  color: var(--danger);
  font-size: 0.7rem;
  font-weight: 700;
}

.salary-presets {
  margin-top: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.salary-presets__heading {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
}

.salary-presets__heading p,
.salary-presets__heading span {
  margin: 0;
}

.salary-presets__heading p {
  color: var(--ink-deep);
  font-size: 0.76rem;
  font-weight: 800;
}

.salary-presets__heading span {
  color: var(--ink-soft);
  font-size: 0.63rem;
}

.salary-preset-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.salary-preset {
  display: flex;
  min-width: 0;
  min-height: 2.65rem;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  color: var(--ink-soft);
  background: white;
  font-size: 0.68rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.salary-preset:hover:not(:disabled) {
  border-color: var(--ink);
  color: var(--ink-deep);
}

.salary-preset[aria-pressed="true"] {
  border-color: var(--ink);
  color: var(--ink-deep);
  background: var(--mint);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.salary-preset:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.salary-preset span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.salary-preset strong {
  flex: 0 0 auto;
  color: var(--ink-deep);
  font-size: 0.66rem;
  font-variant-numeric: tabular-nums;
}

.salary-presets__note {
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
  font-size: 0.62rem;
  line-height: 1.45;
}

.salary-presets__note a {
  color: var(--ink);
  font-weight: 750;
  text-underline-offset: 0.14em;
}

.salary-presets__note a:hover {
  color: var(--coral);
}

.configuration-hint {
  margin: 1.7rem 0 0;
  padding: 0.75rem 0.9rem;
  border-left: 2px solid var(--gold);
  color: var(--ink-soft);
  background: rgb(244 230 189 / 35%);
  font-size: 0.72rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.7rem;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 3rem;
  gap: 0.55rem;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button {
  flex: 1 1 12rem;
  border: 1px solid var(--ink);
  color: white;
  background: var(--ink);
  box-shadow: 0 8px 20px rgb(23 61 54 / 18%);
}

.primary-button:hover {
  background: var(--ink-deep);
  transform: translateY(-1px);
}

.secondary-button {
  flex: 0 1 auto;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  background: transparent;
}

.secondary-button:hover:not(:disabled) {
  color: var(--ink-deep);
  background: var(--paper);
}

.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.button-icon {
  display: grid;
  width: 1.4rem;
  height: 1.4rem;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 50%;
  font-size: 0.62rem;
}

.results-panel {
  position: relative;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 100% 0, rgb(142 203 179 / 22%), transparent 18rem),
    linear-gradient(145deg, #1c4a41, var(--ink-deep));
}

.results-panel::after {
  position: absolute;
  right: -4rem;
  bottom: -5rem;
  width: 16rem;
  height: 16rem;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 50%;
  content: "";
}

.results-panel__header {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.kicker--light {
  color: #b8d5ca;
}

.result-status {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  padding: 0.32rem 0.58rem;
  border: 1px solid rgb(255 255 255 / 15%);
  border-radius: 999px;
  color: #c6ddd5;
  background: rgb(255 255 255 / 5%);
  font-size: 0.65rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgb(229 184 92 / 14%);
}

.results-panel[data-status="running"] .status-dot {
  background: var(--mint-bright);
  box-shadow: 0 0 0 3px rgb(142 203 179 / 18%);
  animation: pulse 1.6s ease-in-out infinite;
}

.results-panel[data-status="paused"] .status-dot {
  background: var(--coral);
  box-shadow: 0 0 0 3px rgb(217 131 105 / 16%);
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 7px rgb(142 203 179 / 8%);
  }
}

.cost-result {
  position: relative;
  z-index: 1;
  margin: clamp(3.2rem, 8vw, 5.3rem) 0 0;
}

.cost-result strong,
.cost-result span {
  display: block;
}

.cost-result strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.65rem, 5.5vw, 4.65rem);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.cost-result span {
  margin-top: 0.8rem;
  color: #b8d5ca;
  font-size: 0.76rem;
}

.timer-block {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 2.4rem;
  padding: 1rem 0;
  border-top: 1px solid rgb(255 255 255 / 13%);
  border-bottom: 1px solid rgb(255 255 255 / 13%);
}

.timer-block span {
  color: #9fc1b5;
  font-size: 0.7rem;
}

.timer-block strong {
  color: white;
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.minute-meter {
  position: relative;
  z-index: 1;
  margin-top: 2rem;
}

.minute-meter__track {
  height: 0.55rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(255 255 255 / 10%);
}

.minute-meter__track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint-bright), var(--gold));
  transition: width 200ms linear;
}

.minute-meter__labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.55rem;
  color: #b8d5ca;
  font-size: 0.66rem;
}

.result-facts {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 2.3rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 13%);
}

.result-facts div + div {
  padding-left: 1.5rem;
  border-left: 1px solid rgb(255 255 255 / 13%);
}

.result-facts dt {
  color: #9fc1b5;
  font-size: 0.68rem;
}

.result-facts dd {
  margin: 0.25rem 0 0;
  color: white;
  font-size: 0.96rem;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

.status-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.noscript-message {
  width: min(calc(100% - 3rem), var(--content-width));
  margin: 1rem auto;
  padding: 1rem;
  border: 1px solid var(--coral);
  border-radius: var(--radius-sm);
  color: var(--danger);
  background: var(--surface);
}

.method-section,
.faq-section {
  width: min(calc(100% - 3rem), var(--content-width));
  margin: clamp(6rem, 11vw, 9rem) auto;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.method-grid article {
  padding: 1.6rem;
  border-top: 2px solid var(--ink);
  background: rgb(255 253 248 / 58%);
}

.method-number {
  color: var(--coral);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
}

.method-grid h3 {
  margin: 1.3rem 0 0.45rem;
  font-size: 0.92rem;
}

.method-grid p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.formula-note {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1.5rem;
  border: 1px solid #d6c38e;
  border-radius: var(--radius-md);
  background: #fbf2d9;
}

.formula-note__icon {
  display: grid;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.formula-note h3 {
  margin: 0;
  font-size: 0.9rem;
}

.formula-note p {
  margin: 0.35rem 0 0;
  color: #5d5336;
  font-size: 0.78rem;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.faq-grid article {
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.faq-grid h3 {
  margin: 0;
  font-size: 0.92rem;
}

.faq-grid p {
  margin: 0.45rem 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

footer {
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  width: min(calc(100% - 3rem), var(--content-width));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.7rem;
}

footer p {
  max-width: 34rem;
  margin: 0;
}

footer div p + p {
  margin-top: 0.35rem;
}

footer a {
  flex: 0 0 auto;
  color: var(--ink-deep);
  font-weight: 700;
  text-underline-offset: 0.16em;
}

footer a:hover {
  color: var(--coral);
}

.footer-contact {
  flex: 0 0 auto;
  text-align: right;
}

@media (max-width: 900px) {
  .calculator-shell {
    grid-template-columns: 1fr;
  }

  .method-grid {
    grid-template-columns: 1fr;
  }

  .method-grid article {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 1rem;
  }

  .method-number {
    grid-row: 1 / 3;
  }

  .method-grid h3 {
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  .site-header,
  .hero,
  .calculator-shell,
  .method-section,
  .faq-section,
  footer,
  .noscript-message {
    width: min(calc(100% - 1.5rem), var(--content-width));
  }

  .site-header {
    padding: 1rem 0;
  }

  .header-link {
    display: none;
  }

  .hero {
    margin-top: 3.5rem;
    margin-bottom: 3rem;
  }

  .hero h1 {
    font-size: clamp(2.7rem, 15vw, 4rem);
  }

  .hero__facts {
    display: grid;
    width: 100%;
    border-radius: var(--radius-sm);
  }

  .hero__facts span + span {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .config-panel,
  .results-panel {
    padding: 1.65rem 1.25rem;
  }

  .field-heading {
    display: grid;
    gap: 0.8rem;
  }

  .number-suffix {
    width: 100%;
  }

  .number-suffix input {
    flex: 1;
    width: auto;
    text-align: left;
  }

  .salary-presets__heading {
    display: block;
  }

  .salary-presets__heading span {
    display: block;
    margin-top: 0.15rem;
  }

  .salary-preset-list {
    grid-template-columns: 1fr;
  }

  .form-actions {
    display: grid;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .results-panel__header {
    display: block;
  }

  .result-status {
    margin-top: 0.9rem;
  }

  .cost-result {
    margin-top: 3.2rem;
  }

  .cost-result strong {
    font-size: clamp(2.35rem, 12vw, 3.2rem);
  }

  .timer-block {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.3rem;
  }

  .result-facts {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .result-facts div + div {
    padding-top: 1rem;
    padding-left: 0;
    border-top: 1px solid rgb(255 255 255 / 13%);
    border-left: 0;
  }

  .method-section,
  .faq-section {
    margin-top: 5rem;
    margin-bottom: 5rem;
  }

  .faq-grid {
    grid-template-columns: 1fr;
  }

  .formula-note {
    display: block;
  }

  .formula-note__icon {
    margin-bottom: 0.8rem;
  }

  footer {
    display: grid;
    gap: 0.8rem;
  }

  .footer-contact {
    text-align: left;
  }
}

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