:root {
  --ink: #191817;
  --muted: #68635e;
  --paper: #f7f2e9;
  --paper-deep: #eee4d5;
  --white: #fffdf9;
  --wine: #7a171e;
  --wine-dark: #541016;
  --gold: #d8a63b;
  --sage: #315c52;
  --line: #ded5c8;
  --shadow: 0 18px 48px rgba(52, 36, 27, 0.1);
  --radius: 20px;
  --radius-small: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 85% 5%, rgba(216, 166, 59, 0.16), transparent 27rem),
    linear-gradient(180deg, #faf6ef 0, var(--paper) 34rem);
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  z-index: 100;
  left: 1rem;
  top: 1rem;
  transform: translateY(-150%);
  padding: 0.75rem 1rem;
  color: white;
  background: var(--wine);
  border-radius: 8px;
}

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

.site-header {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

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

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 850;
  letter-spacing: -0.06em;
  background: var(--wine);
  border-radius: 14px 14px 14px 4px;
  box-shadow: 0 8px 22px rgba(122, 23, 30, 0.2);
}

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

.brand strong {
  font-size: 1rem;
}

.brand small {
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.language-switch {
  display: flex;
  padding: 4px;
  background: rgba(255, 253, 249, 0.8);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.language-button {
  width: 44px;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.language-button.is-active {
  color: white;
  background: var(--ink);
}

main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, 0.8fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding: 4rem 0 5rem;
}

.eyebrow,
.result-kicker,
.example-label {
  display: inline-flex;
  color: var(--wine);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

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

.hero-copy > p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.65;
}

.hero-actions,
.checklist-actions,
.storage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-actions {
  margin-top: 1.8rem;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:focus-visible,
.language-button:focus-visible,
.text-button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(216, 166, 59, 0.6);
  outline-offset: 2px;
}

.button-primary {
  color: white;
  background: var(--wine);
  box-shadow: 0 10px 24px rgba(122, 23, 30, 0.17);
}

.button-primary:hover {
  background: var(--wine-dark);
}

.button-dark {
  color: white;
  background: var(--ink);
}

.button-quiet {
  color: var(--ink);
  background: var(--white);
  border-color: var(--line);
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.4rem;
  margin: 1.8rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.trust-list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.trust-list li span:first-child {
  color: var(--sage);
}

.hero-example {
  position: relative;
  overflow: hidden;
  padding: clamp(1.5rem, 4vw, 2.4rem);
  color: white;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 45%),
    var(--wine);
  border-radius: 28px 28px 28px 7px;
  box-shadow: 0 25px 60px rgba(84, 16, 22, 0.24);
}

.hero-example::after {
  content: "210";
  position: absolute;
  right: -1.1rem;
  bottom: -2.8rem;
  color: rgba(255, 255, 255, 0.07);
  font-size: 10rem;
  font-weight: 900;
  letter-spacing: -0.1em;
}

.example-label {
  color: #f6d994;
}

.mini-formula {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: end;
  gap: 0.75rem;
  margin: 2.3rem 0;
}

.mini-formula small,
.mini-formula strong {
  display: block;
}

.mini-formula small {
  min-height: 2.2rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
  line-height: 1.35;
}

.mini-formula strong {
  margin-top: 0.3rem;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.mini-formula > span {
  padding-bottom: 0.15rem;
  color: #f6d994;
  font-weight: 900;
}

.example-total {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.example-total span {
  color: rgba(255, 255, 255, 0.75);
}

.example-total strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.2rem;
}

.privacy-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.2rem;
  color: #21463d;
  background: #e4eee9;
  border: 1px solid #c8ddd4;
  border-radius: 14px;
}

.privacy-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--sage);
  border-radius: 50%;
  font-weight: 900;
}

.privacy-banner p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.6rem;
  margin: 0;
  line-height: 1.45;
}

.eligibility-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1.5rem 3rem;
  margin: 1.25rem 0;
  padding: clamp(1.25rem, 4vw, 2rem);
  background: rgba(255, 253, 249, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.eligibility-intro h2 {
  margin: 0.45rem 0 0.6rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.eligibility-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.eligibility-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.eligibility-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  color: #3d3935;
  font-size: 0.9rem;
  line-height: 1.45;
}

.eligibility-list li > span:first-child {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--sage);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 900;
}

.scope-warning {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  padding: 0.9rem 1rem;
  color: #6b4e1e;
  background: #fff5dc;
  border-left: 3px solid var(--gold);
  border-radius: 7px;
  font-size: 0.82rem;
  line-height: 1.5;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  align-items: start;
  gap: 1.25rem;
  padding-bottom: 5rem;
}

.form-stack {
  display: grid;
  gap: 1.25rem;
}

.panel {
  background: rgba(255, 253, 249, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-panel,
.checklist-panel {
  padding: clamp(1.25rem, 3.5vw, 2rem);
}

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

.step-number {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--wine);
  background: #f5e3de;
  border-radius: 11px 11px 11px 3px;
  font-size: 0.78rem;
  font-weight: 900;
}

.section-heading h2,
.storage-panel h2,
.result-panel h2,
.source-section h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.025em;
}

.section-heading h2 {
  font-size: 1.7rem;
}

.section-heading p,
.storage-panel p {
  margin: 0.3rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.field-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  color: #312e2b;
  font-size: 0.87rem;
  font-weight: 760;
}

.field-wide {
  grid-column: span 2;
}

.field small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.4;
}

input,
select {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.8rem;
  color: var(--ink);
  background: white;
  border: 1px solid #d8cec0;
  border-radius: 10px;
  transition: border 150ms ease, box-shadow 150ms ease;
}

input:hover,
select:hover {
  border-color: #bfae9d;
}

input[aria-invalid="true"] {
  border-color: #b83a42;
  box-shadow: 0 0 0 3px rgba(184, 58, 66, 0.1);
}

.money-input {
  position: relative;
}

.money-input > span {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 700;
}

.money-input input {
  padding-left: 2rem;
}

.details-card {
  margin-top: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.details-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.details-card summary::-webkit-details-marker {
  display: none;
}

.details-card summary small {
  color: var(--muted);
  font-weight: 600;
}

.details-card[open] summary {
  border-bottom: 1px solid var(--line);
}

.details-content {
  padding: 1rem;
}

.inline-note {
  margin: 0 0 1rem;
  padding: 0.8rem 0.9rem;
  color: #5e4b2c;
  background: #fff5dc;
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  font-size: 0.83rem;
  line-height: 1.45;
}

hr {
  height: 1px;
  margin: 1.5rem 0;
  background: var(--line);
  border: 0;
}

.warning-box {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  color: #694b16;
  background: #fff4d5;
  border: 1px solid #eed28e;
  border-radius: 10px;
  font-size: 0.84rem;
  line-height: 1.5;
}

.warning-box strong {
  display: block;
}

.result-panel {
  position: sticky;
  top: 1rem;
  overflow: hidden;
  padding: 1.7rem;
  background:
    linear-gradient(160deg, rgba(216, 166, 59, 0.13), transparent 35%),
    var(--white);
}

.result-panel h2 {
  margin-top: 0.35rem;
  font-size: 1.8rem;
}

.tax-total {
  margin: 0.8rem 0 0;
  color: var(--wine);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 6vw, 4.3rem);
  font-weight: 700;
  letter-spacing: -0.05em;
}

.result-period {
  min-height: 1.25rem;
  margin: 0.2rem 0 1.4rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.rental-alert {
  display: grid;
  gap: 0.3rem;
  margin: -0.35rem 0 1rem;
  padding: 0.9rem;
  color: #6a2428;
  background: #f8e6e5;
  border: 1px solid #e7bfbd;
  border-radius: 10px;
  font-size: 0.78rem;
  line-height: 1.45;
}

.rental-alert[hidden] {
  display: none;
}

.result-breakdown {
  margin: 0;
  border-top: 1px solid var(--line);
}

.result-breakdown > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.result-breakdown dt {
  color: var(--muted);
  font-size: 0.8rem;
}

.result-breakdown dd {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 850;
  text-align: right;
}

.result-breakdown .breakdown-highlight {
  margin: 0.5rem -0.6rem;
  padding: 0.8rem 0.6rem;
  background: #f7eadf;
  border: 0;
  border-radius: 8px;
}

.formula-box {
  margin-top: 1rem;
  padding: 0.9rem;
  background: #f3eee6;
  border-radius: 10px;
}

.formula-box span,
.formula-box code {
  display: block;
}

.formula-box span {
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.formula-box code {
  overflow-wrap: anywhere;
  color: #403b37;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.5;
}

.result-note {
  display: grid;
  gap: 0.25rem;
  margin-top: 1rem;
  padding: 0.9rem;
  color: #24483f;
  background: #e7f0ec;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.45;
}

.legal-note {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.checklist-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.checklist-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.65fr) minmax(0, 1.35fr);
}

.checklist-row + .checklist-row {
  border-top: 1px solid var(--line);
}

.checklist-row span {
  min-width: 0;
  padding: 0.75rem 0.9rem;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.checklist-row span:first-child {
  color: var(--muted);
  background: #f5f0e8;
  font-size: 0.77rem;
  font-weight: 700;
}

.checklist-row span:last-child {
  font-size: 0.84rem;
  font-weight: 800;
}

.empty-value {
  color: #9a9188;
  font-weight: 600 !important;
}

.checklist-actions {
  margin-top: 1rem;
}

.storage-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.2rem 1.4rem;
  box-shadow: none;
}

.storage-panel h2 {
  font-size: 1.2rem;
}

.storage-panel p {
  font-size: 0.82rem;
}

.text-button {
  padding: 0.6rem;
  color: var(--wine);
  background: transparent;
  border: 0;
  font-weight: 800;
  cursor: pointer;
}

.source-section {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2rem;
  margin-bottom: 4rem;
  padding: clamp(1.5rem, 5vw, 3rem);
  color: white;
  background: var(--ink);
  border-radius: 24px 24px 24px 7px;
}

.source-section .eyebrow {
  color: #f1c96d;
}

.source-section h2 {
  margin-top: 0.6rem;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
}

.source-section p {
  max-width: 720px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.6;
}

.source-link {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.1rem;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
}

footer {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
}

footer span:first-child {
  color: var(--ink);
  font-weight: 850;
}

.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 1.25rem;
  transform: translate(-50%, 160%);
  max-width: min(90vw, 560px);
  padding: 0.85rem 1rem;
  color: white;
  background: var(--ink);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  font-size: 0.85rem;
  transition: transform 200ms ease;
}

.toast.is-visible {
  transform: translate(-50%, 0);
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 3rem 0;
  }

  .hero-example {
    max-width: 620px;
  }

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

  .result-panel {
    position: static;
    grid-row: 1;
  }
}

@media (max-width: 720px) {
  .site-header,
  main,
  footer {
    width: min(100% - 1rem, 1180px);
  }

  .site-header {
    min-height: 74px;
  }

  .brand small {
    display: none;
  }

  .hero {
    padding-top: 2.2rem;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 14vw, 4.3rem);
  }

  .mini-formula {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 0.35rem;
  }

  .mini-formula > span {
    padding: 0;
  }

  .mini-formula small {
    min-height: 0;
  }

  .field-grid,
  .field-grid-three {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: auto;
  }

  .storage-panel,
  .eligibility-panel,
  .source-section,
  footer {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .storage-panel {
    flex-direction: column;
  }

  .source-section {
    display: grid;
  }

  .scope-warning {
    grid-column: auto;
  }

  footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .form-panel,
  .checklist-panel,
  .result-panel {
    padding: 1rem;
    border-radius: 15px;
  }

  .checklist-row {
    grid-template-columns: 1fr;
  }

  .checklist-row span:first-child {
    padding-bottom: 0.3rem;
  }

  .checklist-row span:last-child {
    padding-top: 0.35rem;
  }

  .button,
  .checklist-actions .button {
    width: 100%;
  }
}

@media print {
  body {
    background: white;
  }

  .site-header,
  .hero,
  .privacy-banner,
  .eligibility-panel,
  .form-panel,
  .storage-panel,
  .source-section,
  footer,
  .checklist-actions,
  .toast {
    display: none !important;
  }

  main,
  .workspace {
    width: 100%;
    display: block;
  }

  .form-stack {
    display: block;
  }

  .result-panel,
  .checklist-panel {
    position: static;
    box-shadow: none;
    break-inside: avoid;
    margin-bottom: 1rem;
  }

  .result-panel {
    display: block;
  }
}

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