:root {
  --ink: #14251f;
  --muted: #607069;
  --accent: #176b4d;
  --accent-dark: #0f5139;
  --accent-soft: #e8f3ed;
  --paper: #f7f8f5;
  --white: #ffffff;
  --line: #dce3de;
  --warm: #f1eee7;
  --danger: #9b3b2d;
  --radius: 18px;
  --shadow: 0 18px 60px rgba(20, 37, 31, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; }
button, input { font: inherit; }
a { color: inherit; }
.shell { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 99; padding: 10px 16px; background: var(--ink); color: white; }
.skip-link:focus { top: 12px; }
.noscript { padding: 12px 20px; color: white; background: var(--danger); text-align: center; font-weight: 700; }
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent); border-bottom: 1px solid rgba(20, 37, 31, .08); backdrop-filter: blur(12px); }
.header-inner { height: 72px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 780; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--accent); font-size: 12px; letter-spacing: .04em; }
nav { display: flex; gap: 30px; }
nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
nav a:hover { color: var(--accent); }

.hero { min-height: 630px; padding: 112px 0 90px; position: relative; overflow: hidden; }
.hero::after { content: "$"; position: absolute; right: 5%; top: 42px; color: transparent; -webkit-text-stroke: 1px rgba(23, 107, 77, .12); font: 700 430px/1 Georgia, serif; transform: rotate(8deg); pointer-events: none; }
.eyebrow, .kicker { color: var(--accent); text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 800; }
.eyebrow { display: flex; align-items: center; gap: 9px; }
.eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
h1 { position: relative; z-index: 1; max-width: 880px; margin: 22px 0; font: 500 clamp(48px, 7.3vw, 88px)/.98 Georgia, "Times New Roman", serif; letter-spacing: -.045em; }
h1 em { color: var(--accent); font-weight: 500; }
.hero-copy { max-width: 610px; color: var(--muted); font-size: 19px; }
.hero-actions { display: flex; gap: 12px; margin: 34px 0 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 28px; min-height: 50px; padding: 0 22px; border-radius: 10px; text-decoration: none; font-size: 14px; font-weight: 750; }
.button.primary { color: white; background: var(--accent); box-shadow: 0 8px 24px rgba(23, 107, 77, .2); }
.button.primary:hover { background: var(--accent-dark); }
.button.secondary { background: var(--white); border: 1px solid var(--line); }
.trust-row { display: flex; gap: 24px; color: var(--muted); font-size: 13px; }

.calculator-section { padding: 100px 0; background: var(--white); border-block: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 38px; }
.section-heading .kicker { margin: 0 0 8px; }
.section-heading h2, .faq h2 { margin: 0; font: 500 clamp(36px, 5vw, 54px)/1.05 Georgia, serif; letter-spacing: -.035em; }
.section-heading > p { max-width: 410px; margin: 0; color: var(--muted); }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 14px 14px 0 0; overflow: hidden; }
.tab { min-height: 90px; display: flex; align-items: center; gap: 14px; padding: 16px 18px; color: var(--muted); background: #fafbf9; border: 0; border-right: 1px solid var(--line); text-align: left; cursor: pointer; }
.tab:last-child { border-right: 0; }
.tab:hover { background: var(--accent-soft); }
.tab.active { color: white; background: var(--accent); }
.tab-number { align-self: flex-start; margin-top: 3px; font: 600 11px/1 ui-monospace, monospace; opacity: .7; }
.tab b, .tab small { display: block; }
.tab b { font-size: 14px; }
.tab small { margin-top: 3px; font-size: 11px; opacity: .75; }
.calculator-card { box-shadow: var(--shadow); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.tab-panel { display: grid; grid-template-columns: minmax(0, 1.38fr) minmax(330px, .8fr); }
.tab-panel[hidden] { display: none; }
.form-side { padding: 42px 46px 48px; }
.panel-title { display: flex; gap: 14px; align-items: center; margin-bottom: 32px; }
.panel-title p, .panel-title h3 { margin: 0; }
.panel-title p { color: var(--accent); text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 800; }
.panel-title h3 { margin-top: 2px; font: 500 27px/1.2 Georgia, serif; }
.icon-box { width: 44px; height: 44px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); border-radius: 12px; font-weight: 800; }
.calc-form { display: grid; gap: 22px; }
.calc-form label { display: grid; gap: 8px; color: var(--ink); font-size: 13px; font-weight: 700; }
.hint { float: right; color: #8b9892; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
input[type="number"], input[type="date"], .date-input { width: 100%; height: 48px; padding: 0 14px; color: var(--ink); background: white; border: 1px solid #ccd6cf; border-radius: 9px; outline: none; }
.date-input { font-variant-numeric: tabular-nums; letter-spacing: .025em; }
.date-input::placeholder { color: #9aa59f; }
.date-control { position: relative; display: block; }
.date-control .date-input { padding-right: 50px; }
.date-picker-button { position: absolute; top: 5px; right: 5px; width: 38px; height: 38px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); border: 0; border-radius: 7px; pointer-events: none; font-size: 0; }
.date-picker-button::before { content: ""; width: 15px; height: 14px; border: 1.5px solid currentColor; border-radius: 3px; box-shadow: inset 0 4px 0 -2px var(--accent-soft); }
.date-picker-button::after { content: ""; position: absolute; top: 12px; width: 9px; height: 1.5px; background: currentColor; box-shadow: -3px -3px 0 -1px currentColor, 3px -3px 0 -1px currentColor; }
.date-control:hover .date-picker-button { background: #d9ebe1; }
.date-control:focus-within .date-picker-button { outline: 3px solid rgba(23, 107, 77, .22); outline-offset: 1px; }
.date-picker-native { position: absolute; z-index: 2; top: 5px; right: 5px; width: 38px !important; height: 38px !important; padding: 0 !important; opacity: 0; cursor: pointer; }
.date-picker-native::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: auto; height: auto; margin: 0; opacity: 0; cursor: pointer; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[readonly] { color: #65736d; background: #eef1ed; cursor: not-allowed; }
.money-input:has(input[readonly]) { background: #eef1ed; border-style: dashed; }
.money-input { display: flex; align-items: center; border: 1px solid #ccd6cf; border-radius: 9px; overflow: hidden; }
.money-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.money-input > span { padding-left: 15px; color: var(--muted); font-weight: 500; }
.money-input input { border: 0; box-shadow: none !important; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.check { grid-template-columns: auto 1fr !important; align-items: start; padding: 15px; background: #fafbf9; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--accent); }
.check b, .check small { display: block; }
.check small { margin-top: 3px; color: var(--muted); font-weight: 450; line-height: 1.45; }
.conditional { display: none !important; }
.conditional.visible { display: grid !important; }
details { border-top: 1px solid var(--line); }
details summary { padding: 17px 0 0; color: var(--accent); cursor: pointer; font-size: 13px; font-weight: 750; }
.details-body { display: grid; gap: 17px; padding-top: 18px; }
.result-side { padding: 46px 38px; color: white; background: var(--ink); display: flex; flex-direction: column; }
.result-label { margin: 0; color: #aebbb5; text-transform: uppercase; letter-spacing: .13em; font-size: 10px; font-weight: 800; }
.result-amount { display: block; margin: 12px 0 8px; font: 500 clamp(42px, 5vw, 64px)/1 Georgia, serif; letter-spacing: -.045em; overflow-wrap: anywhere; }
.result-caption { min-height: 44px; margin: 0 0 24px; color: #aebbb5; font-size: 13px; }
.result-caption.error { color: #ffb5a9; }
.breakdown { border-top: 1px solid rgba(255,255,255,.15); }
.breakdown-row { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.1); font-size: 12px; }
.breakdown-row span:first-child { color: #aebbb5; }
.breakdown-row strong { text-align: right; }
.formula { margin-top: 18px; padding: 14px; color: #bdd7ca; background: rgba(255,255,255,.06); border-radius: 9px; font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
.legal-button { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 24px; color: #e8f3ed; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.18); border-radius: 9px; cursor: pointer; font-size: 12px; font-weight: 750; }
.legal-button:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.32); }
.legal-button:focus-visible, .modal-close:focus-visible { outline: 3px solid #8bc7aa; outline-offset: 2px; }
.legal-button span { font: 600 18px Georgia, serif; }
.legal-note { margin: 0; padding-top: 16px; color: #82938b; font-size: 10px; }
.legal-modal { width: min(680px, calc(100% - 30px)); max-height: min(760px, calc(100vh - 30px)); padding: 0; overflow: auto; color: var(--ink); background: var(--white); border: 0; border-radius: 18px; box-shadow: 0 30px 100px rgba(8, 24, 18, .28); }
.legal-modal::backdrop { background: rgba(10, 24, 19, .62); backdrop-filter: blur(4px); }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding: 30px 32px 22px; border-bottom: 1px solid var(--line); }
.modal-header .kicker { margin: 0 0 5px; }
.modal-header h2 { margin: 0; font: 500 32px/1.1 Georgia, serif; letter-spacing: -.025em; }
.modal-close { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-radius: 50%; cursor: pointer; font-size: 25px; line-height: 1; }
.modal-intro { margin: 0; padding: 22px 32px 8px; color: var(--muted); }
.legal-list { display: grid; gap: 10px; padding: 14px 32px 28px; }
.legal-item { display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.legal-article { color: var(--accent); font-size: 12px; font-weight: 800; }
.legal-item p { margin: 0; color: var(--muted); font-size: 13px; }
.legal-item p b { display: block; margin-bottom: 3px; color: var(--ink); }
.modal-disclaimer { margin: 0; padding: 18px 32px 24px; color: var(--muted); background: var(--warm); font-size: 11px; }
.notice { display: grid; grid-template-columns: 110px 1fr; gap: 20px; margin-top: 24px; padding: 20px 24px; background: var(--warm); border-radius: 12px; font-size: 13px; }
.notice p { margin: 0; color: var(--muted); }

.method { padding-block: 110px; }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.method-grid article { padding: 28px 28px 0 0; }
.method-grid article + article { padding-left: 28px; border-left: 1px solid var(--line); }
.method-grid span { color: var(--accent); font: 600 11px ui-monospace, monospace; }
.method-grid h3 { margin: 38px 0 10px; font: 500 24px Georgia, serif; }
.method-grid p { margin: 0; color: var(--muted); }
.faq { padding-block: 100px; display: grid; grid-template-columns: .8fr 1.2fr; gap: 90px; border-top: 1px solid var(--line); }
.faq .kicker { margin: 0 0 10px; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { display: flex; justify-content: space-between; gap: 20px; padding: 22px 0; color: var(--ink); font-size: 16px; }
.faq-list summary span { color: var(--accent); }
.faq-list details[open] summary span { transform: rotate(45deg); }
.faq-list p { margin: -6px 40px 22px 0; color: var(--muted); }
footer { padding: 60px 0 24px; color: white; background: var(--ink); }
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr; gap: 50px; }
.footer-inner p { color: #9aaba3; }
.footer-inner > div:last-child { display: flex; flex-direction: column; gap: 8px; }
.footer-inner > div:last-child p { margin: 0; }
.footer-inner > div:last-child ul { display: grid; gap: 6px; margin: 0; padding-left: 18px; }
.footer-inner a { text-decoration: none; font-size: 13px; }
.footer-bottom { display: flex; justify-content: space-between; margin-top: 55px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); color: #82938b; font-size: 11px; }

@media (max-width: 820px) {
  nav { display: none; }
  .hero { min-height: auto; padding: 80px 0; }
  .hero::after { font-size: 260px; right: -15%; }
  .section-heading { align-items: start; flex-direction: column; gap: 15px; }
  .tabs { grid-template-columns: repeat(2, 1fr); }
  .tab:nth-child(2) { border-right: 0; }
  .tab:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .tab-panel { grid-template-columns: 1fr; }
  .result-side { min-height: 420px; }
  .faq { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 560px) {
  .shell { width: min(100% - 24px, 1160px); }
  h1 { font-size: 48px; }
  .calculator-section { padding-block: 64px; }
  .hero-actions, .trust-row { align-items: stretch; flex-direction: column; }
  .button { width: 100%; min-height: 48px; }
  .trust-row { gap: 7px; }
  .tabs { grid-template-columns: 1fr; }
  .tab { min-height: 68px; padding: 12px 15px; border-right: 0; border-bottom: 1px solid var(--line); }
  .tab:last-child { border-bottom: 0; }
  .form-side { padding: 32px 22px; }
  .result-side { min-height: auto; padding: 38px 24px; }
  .result-amount { font-size: 46px; }
  .field-grid { grid-template-columns: 1fr; }
  input[type="number"], input[type="date"], .date-input { font-size: 16px; }
  .date-picker-button, .date-picker-native { top: 2px; right: 2px; width: 44px !important; height: 44px !important; }
  .date-control .date-input { padding-right: 54px; }
  .check { min-height: 48px; }
  .legal-button { min-height: 48px; }
  .notice { grid-template-columns: 1fr; gap: 5px; }
  .method-grid { grid-template-columns: 1fr; }
  .method-grid article, .method-grid article + article { padding: 26px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .method-grid h3 { margin-top: 16px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: 6px; }
  .modal-header, .modal-intro, .legal-list, .modal-disclaimer { padding-left: 20px; padding-right: 20px; }
  .legal-item { grid-template-columns: 1fr; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
