:root {
  --cream: #f8efd5;
  --paper: #fff9e9;
  --gold: #edcb78;
  --cocoa: #34281c;
  --cocoa-soft: #5f4b34;
  --pink: #dda1a0;
  --pink-light: #efc6bd;
  --green: #86d887;
}

* { box-sizing: border-box; }

html { background: var(--cream); }

body {
  min-width: 280px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 85% 12%, rgba(237, 203, 120, .55), transparent 28rem),
    var(--cream);
  color: var(--cocoa);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }
button, input { color: inherit; font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--pink); }

.site-header {
  width: min(1260px, calc(100% - 48px));
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  border-bottom: 1px solid rgba(52, 40, 28, .2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 20px;
  font-weight: 950;
  letter-spacing: -.04em;
}

.brand img {
  width: 46px;
  height: 46px;
  display: block;
  border: 2px solid var(--cocoa);
  border-radius: 50%;
  object-fit: cover;
}

.back-link, .footer-link {
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .1em;
  text-transform: uppercase;
}

main { width: min(1260px, calc(100% - 48px)); margin: 0 auto; }

.intro { max-width: 950px; padding: 90px 0 58px; }

.kicker {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .12em;
}

.kicker > span { padding: 9px 12px; border: 1px solid var(--cocoa); border-radius: 999px; }

.kicker b {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--cocoa-soft);
  font-size: 12px;
}

.kicker b::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.kicker b[data-state="live"]::before { background: var(--green); }
.kicker b[data-state="paused"]::before { background: var(--pink); }

h1, h2, .result-value {
  font-family: "Arial Rounded MT Bold", "Avenir Next", ui-rounded, system-ui, sans-serif;
}

h1 {
  margin: 30px 0 26px;
  font-size: clamp(66px, 9vw, 124px);
  line-height: .82;
  letter-spacing: -.085em;
  text-transform: uppercase;
}

em { color: var(--pink); font-style: normal; -webkit-text-stroke: 2px var(--cocoa); paint-order: stroke fill; }

.intro > p {
  max-width: 760px;
  margin: 0;
  color: var(--cocoa-soft);
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.6;
}

.intro strong { color: var(--cocoa); }

.calculator {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-bottom: 100px;
  border: 2px solid var(--cocoa);
  border-radius: 22px;
  box-shadow: 8px 8px 0 var(--cocoa);
  overflow: hidden;
}

.calculator-inputs, .calculator-result { min-width: 0; padding: clamp(28px, 4vw, 54px); }
.calculator-inputs { background: var(--paper); }
.calculator-result { background: var(--cocoa); color: var(--cream); }

.step-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .12em;
}

.step-label span { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid currentColor; border-radius: 50%; }
.step-label-light { color: var(--cream); }

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border: 2px solid var(--cocoa);
  border-radius: 14px;
  background: var(--cream);
}

.mode-button {
  min-height: 48px;
  padding: 8px 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.mode-button.active { background: var(--pink); box-shadow: 2px 2px 0 var(--cocoa); }

.amount-label { display: block; margin: 30px 0 10px; font-size: 13px; font-weight: 900; }

.amount-field {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  padding: 0 18px;
  border: 2px solid var(--cocoa);
  border-radius: 14px;
  background: #fffdf5;
  box-shadow: 4px 4px 0 var(--gold);
}

.amount-field span { flex: 0 0 auto; font-size: 12px; font-weight: 950; letter-spacing: .08em; }
.amount-field input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; font-size: clamp(23px, 3vw, 34px); font-weight: 850; letter-spacing: -.04em; }
.amount-field:focus-within { outline: 3px solid #3389d7; outline-offset: 3px; }

.input-help, .input-error, .updated, .share-note { font-size: 12px; line-height: 1.5; }
.input-help { margin: 12px 0 0; color: var(--cocoa-soft); }
.input-error { min-height: 17px; margin: 4px 0 0; color: #9d302c; font-weight: 750; }

.market-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(52, 40, 28, .2);
}

.market-strip small { display: block; min-height: 31px; font-size: 12px; font-weight: 950; letter-spacing: .07em; line-height: 1.35; }
.market-strip strong { display: block; margin-top: 6px; font-size: clamp(16px, 2vw, 22px); }
.updated { margin: 15px 0 0; color: var(--cocoa-soft); }

.result-eyebrow { margin: 48px 0 8px; color: #bbae99; font-size: 12px; font-weight: 950; letter-spacing: .09em; }
.result-value { display: block; max-width: 100%; overflow-wrap: anywhere; font-size: clamp(52px, 7vw, 90px); line-height: 1; letter-spacing: -.065em; }
.result-detail { min-height: 48px; margin: 16px 0 27px; color: #cabcaa; font-size: 13px; line-height: 1.5; }

.post-preview { padding: 20px; border: 1px solid rgba(248, 239, 213, .25); border-radius: 14px; background: rgba(255, 255, 255, .055); }
.post-preview-top { display: flex; justify-content: space-between; color: #bbae99; font-size: 12px; font-weight: 950; letter-spacing: .09em; }
.post-preview p { min-height: 66px; margin: 15px 0 0; white-space: pre-line; font-size: 14px; line-height: 1.55; }

.share-button {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 20px;
  padding: 0 20px;
  border: 2px solid var(--cream);
  border-radius: 13px;
  background: var(--pink);
  color: var(--cocoa);
  box-shadow: 4px 4px 0 var(--cream);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.share-button.disabled { opacity: .45; pointer-events: none; }
.share-button:not(.disabled):hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--cream); }
.share-note { margin: 14px 0 0; color: #bbae99; }

.method {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 80px;
  align-items: end;
  padding: 80px 0 100px;
  border-top: 1px solid rgba(52, 40, 28, .25);
}

.method-number { font-size: 12px; font-weight: 950; letter-spacing: .12em; }
.method h2 { margin: 18px 0 0; font-size: clamp(44px, 5vw, 70px); line-height: .9; letter-spacing: -.065em; text-transform: uppercase; }
.method > p { max-width: 650px; margin: 0; color: var(--cocoa-soft); font-size: 15px; line-height: 1.7; }

footer {
  min-height: 150px;
  display: grid;
  grid-template-columns: .7fr 1.6fr .7fr;
  align-items: center;
  gap: 40px;
  padding: 32px max(28px, calc((100vw - 1260px) / 2));
  background: var(--cocoa);
  color: var(--cream);
}

.footer-brand img { width: 40px; height: 40px; }
footer p { max-width: 620px; margin: 0 auto; color: #afa18d; font-size: 12px; line-height: 1.6; text-align: center; }
.footer-link { justify-self: end; }

:focus-visible { outline: 3px solid #3389d7; outline-offset: 4px; }

@media (max-width: 860px) {
  .calculator { grid-template-columns: 1fr; }
  .method { grid-template-columns: 1fr; gap: 35px; }
  footer { grid-template-columns: 1fr; gap: 24px; padding-top: 48px; padding-bottom: 48px; text-align: center; }
  .footer-brand, .footer-link { justify-self: center; }
}

@media (max-width: 560px) {
  .site-header, main { width: calc(100% - 30px); }
  .site-header { height: 76px; }
  .brand { font-size: 17px; }
  .brand img { width: 40px; height: 40px; }
  .back-link { max-width: 135px; font-size: 12px; line-height: 1.3; text-align: right; }
  .intro { padding: 65px 0 40px; }
  .kicker { align-items: flex-start; flex-direction: column; gap: 10px; }
  h1 { font-size: clamp(49px, 16.8vw, 76px); }
  .intro > p { font-size: 16px; }
  .calculator { margin-bottom: 75px; border-radius: 17px; box-shadow: 5px 5px 0 var(--cocoa); }
  .calculator-inputs, .calculator-result { padding: 26px 20px 30px; }
  .mode-switch { grid-template-columns: 1fr; }
  .amount-field { padding: 0 13px; }
  .amount-field span { font-size: 12px; }
  .market-strip { gap: 8px; }
  .market-strip strong { font-size: 15px; }
  .result-eyebrow { margin-top: 34px; }
  .result-value { font-size: clamp(48px, 16vw, 70px); }
  .post-preview { padding: 16px; }
  .share-button { padding: 0 15px; font-size: 12px; }
  .method { padding: 60px 0 75px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
