@font-face {
  font-family: Fraunces;
  src: url("./assets/fraunces.woff2") format("woff2");
  font-weight: 500 600;
  font-display: swap;
}
@font-face {
  font-family: Fraunces;
  src: url("./assets/fraunces-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 500 600;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("./assets/inter.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --cream: #f8f5f1;
  --ink: #18191d;
  --red: #a3121a;
  --red-hover: #820e16;
  --muted: #5e5751;
  --line: #ded5cb;
  --sand: #eee8e0;
  --paper: #fffcf8;
  --display: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 1rem/1.65 var(--sans); }
figure, p, h1, h2, h3 { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
[id] { scroll-margin-block-start: 1.25rem; }
.wrap { width: min(100% - 2.5rem, 75rem); margin-inline: auto; }
.skip-link { position: fixed; z-index: 2; inset: .75rem auto auto .75rem; padding: .65rem 1rem; background: white; transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 2rem; padding-block: .65rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; min-height: 2.75rem; font: 600 1.4rem/1.15 var(--display); letter-spacing: -.053em; text-decoration: none; }
.brand-insurance { margin-inline-start: .07em; }
.brand-ny, .footer-brand span { color: var(--red); }
.brand-mark { display: grid; place-items: center; width: 1.9rem; height: 2.05rem; background: var(--red); clip-path: polygon(50% 0, 96% 14%, 96% 55%, 87% 77%, 68% 91%, 50% 100%, 32% 91%, 13% 77%, 4% 55%, 4% 14%); }
.brand-mark span { width: .83rem; height: .47rem; border: solid white; border-width: 0 0 2px 2px; transform: translateY(-.1rem) rotate(-45deg); }
.site-header nav { display: flex; flex-wrap: wrap; column-gap: clamp(1rem, 4vw, 2.1rem); }
.site-header nav a { display: grid; place-items: center; min-height: 2.75rem; white-space: nowrap; font-size: .875rem; font-weight: 600; text-decoration: none; }
.site-header nav a:hover { color: var(--red); text-decoration: underline; text-underline-offset: .28em; }

.hero { display: grid; align-items: center; gap: 2rem; padding-block: clamp(2.55rem, 6vw, 5.35rem); }
.eyebrow { display: flex; align-items: center; gap: .65rem; margin-bottom: 1.05rem; color: var(--red); font-size: .8125rem; font-weight: 700; letter-spacing: .105em; line-height: 1.45; text-transform: uppercase; }
.eyebrow::before { content: ""; flex: 0 0 1.55rem; height: 1px; background: currentColor; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; letter-spacing: -.04em; }
h1 { max-width: 12ch; font-size: clamp(2.87rem, 8.4vw, 5.15rem); line-height: .995; letter-spacing: -.052em; }
h1 em { display: block; color: var(--red); font-weight: 500; }
h2 { font-size: clamp(2.2rem, 4.8vw, 3.75rem); }
h3 { font-size: clamp(1.45rem, 2.4vw, 1.85rem); }
.hero-description { max-width: 30rem; margin-top: 1.35rem; color: var(--muted); font-size: clamp(1rem, 1.55vw, 1.125rem); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem 1.4rem; margin-top: 1.55rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3.15rem; border: 1px solid transparent; border-radius: .35rem; padding: .72rem 1.21rem; background: var(--red); color: white; font-size: .9375rem; font-weight: 700; line-height: 1.3; text-align: center; text-decoration: none; transition: background-color .15s ease; }
.button:hover { background: var(--red-hover); }
.text-link { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--red); font-size: .875rem; font-weight: 700; text-underline-offset: .28em; }
.text-link:hover { color: var(--red-hover); }
.byline { margin-top: 1.05rem; color: var(--muted); font-size: .8125rem; }
.hero-media { position: relative; overflow: hidden; width: 100%; min-height: 15rem; aspect-ratio: 5/4; border-radius: .65rem; background: #866856; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 58%; }
.hero-stat { position: absolute; inset: auto auto .85rem .85rem; display: flex; align-items: center; gap: .63rem; border-radius: .32rem; padding: .55rem .72rem; background: var(--cream); color: var(--ink); }
.hero-stat strong { color: var(--red); font: 600 2rem/.9 var(--display); letter-spacing: -.06em; }
.hero-stat span { font-size: .75rem; font-weight: 600; line-height: 1.25; }

.worksheet-section { padding-block: clamp(2.8rem, 6.4vw, 5.65rem); border-block: 1px solid var(--line); background: var(--sand); }
.section-heading { max-width: 43rem; }
.section-heading p { max-width: 38rem; margin-top: .7rem; color: var(--muted); }
.worksheet-section .section-heading { margin-inline: auto; text-align: center; }
.worksheet-section .section-heading p { margin-inline: auto; }
.worksheet { max-width: 62rem; margin: 1.65rem auto 0; overflow: hidden; border: 1px solid var(--line); border-radius: .65rem; background: var(--paper); box-shadow: 0 12px 36px #31211708; }
.worksheet table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.worksheet th, .worksheet td { padding: .6rem .4rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.worksheet :is(th, td):first-child { width: 25%; padding-inline-start: .65rem; }
.worksheet :is(th, td):last-child { padding-inline-end: .65rem; }
.worksheet th { text-align: start; overflow-wrap: anywhere; }
.worksheet thead { background: #f7f1ea; }
.worksheet thead th { padding-block: .85rem; color: var(--muted); font-size: .8125rem; font-weight: 600; line-height: 1.25; }
.quote-tag { display: inline-block; color: var(--ink); font-size: .9375rem; font-weight: 700; }
.worksheet tbody th { font-size: .8125rem; font-weight: 700; line-height: 1.25; }
.worksheet :is(input, select, textarea) { display: block; width: 100%; min-width: 0; min-height: 2.75rem; border: 1px solid #beb1a4; border-radius: .3rem; padding: .53rem .49rem; background-color: white; color: var(--ink); font-size: 1rem; line-height: 1.35; }
.worksheet :is(input, textarea)::placeholder { color: #6e645d; opacity: 1; }
.worksheet select { appearance: none; padding-inline-end: 1.65rem; background-image: linear-gradient(45deg, transparent 50%, #574d45 50%), linear-gradient(135deg, #574d45 50%, transparent 50%); background-position: right .76rem center, right .46rem center; background-size: .31rem .31rem; background-repeat: no-repeat; }
.worksheet textarea { height: 3.65rem; resize: vertical; }
.worksheet :is(input, textarea, select):focus-visible { outline-offset: 1px; }
.worksheet input[aria-invalid="true"] { border-color: var(--red); }
.premium-summary { padding: .9rem .65rem; background: #f7f1ea; font-size: .875rem; }
.premium-summary.has-result { color: var(--red); font-weight: 700; }
.worksheet-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 1rem; padding: .2rem .65rem; border-top: 1px solid var(--line); }
.save-note { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .8125rem; }
.lock { position: relative; display: inline-block; flex: 0 0 .7rem; height: .53rem; margin-top: .22rem; border: 1px solid currentColor; border-radius: .1rem; }
.lock::before { position: absolute; inset: -.33rem .09rem auto; height: .31rem; border: 1px solid; border-bottom: 0; border-radius: .3rem .3rem 0 0; content: ""; }
.clear-button { min-height: 2.75rem; border: 0; padding: .3rem 0; background: transparent; color: var(--red); font-size: .875rem; font-weight: 600; text-align: left; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.clear-button:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.worksheet-action { margin-top: 1.65rem; text-align: center; }
.no-script { padding: .65rem; }
.worked-example { display: grid; gap: 1.2rem; max-width: 62rem; margin: clamp(2rem, 4.7vw, 3.4rem) auto 0; border-block-start: 1px solid #c7b8aa; padding-block-start: 1.5rem; }
.worked-example p { max-width: 35rem; margin-top: .6rem; color: var(--muted); font-size: .9375rem; }
.worked-example strong { color: var(--ink); }
.worked-example table { width: 100%; border-collapse: collapse; background: var(--paper); font-size: .875rem; font-variant-numeric: tabular-nums; line-height: 1.3; }
.worked-example :is(th, td) { border: 1px solid var(--line); padding: .55rem .44rem; text-align: start; }
.worked-example :is(thead th, tbody th) { font-weight: 600; }
.worked-example thead { background: #f7f1ea; }
.worked-example :is(td, th):not(:first-child) { white-space: nowrap; }

.guide { padding-block: clamp(3rem, 7vw, 6.1rem); }
.guide-items { display: grid; margin-top: 1.65rem; border-top: 1px solid var(--line); }
.guide-items article { padding-block: 1.15rem; border-bottom: 1px solid var(--line); }
.guide-items h3 { margin-bottom: .55rem; }
.guide-items p { color: var(--muted); }

.faq-section { padding-block: clamp(2.9rem, 6.5vw, 5.45rem); border-top: 1px solid var(--line); background: #f2ede7; }
.faq { display: grid; gap: 1.25rem; }
.faq-items { border-top: 1px solid #cec2b7; }
.faq-items details { border-bottom: 1px solid #cec2b7; }
.faq-items summary { display: flex; align-items: center; justify-content: space-between; gap: 1.15rem; padding: 1rem 0; list-style: none; font-weight: 700; line-height: 1.45; cursor: pointer; }
.faq-items summary::-webkit-details-marker { display: none; }
.faq-items summary::after { display: block; flex: 0 0 1.1rem; height: 1.1rem; background: linear-gradient(currentColor, currentColor) center / .9rem 2px no-repeat, linear-gradient(currentColor, currentColor) center / 2px .9rem no-repeat; color: var(--red); content: ""; }
.faq-items details[open] summary::after { background-size: .9rem 2px, 0 0; }
.faq-items p { max-width: 46rem; padding: 0 1.6rem 1.2rem 0; color: var(--muted); }
.closing { padding-block: clamp(3rem, 6.7vw, 5.7rem); background: var(--ink); color: var(--cream); text-align: center; }
.closing p { margin-top: .75rem; color: #e2d9d2; }
.closing .button { margin-top: 1.5rem; border-color: #d4484f; }
.closing :focus-visible { outline-color: var(--cream); }
.site-footer { padding-block: 1.4rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.35rem; }
.site-footer p { color: var(--muted); font-size: .8125rem; }
.site-footer .footer-brand { color: var(--ink); font: 600 1.18rem/1.2 var(--display); letter-spacing: -.04em; }

@media (min-width: 34rem) {
  .wrap { width: min(100% - 4rem, 75rem); }
  .header-inner { min-height: 4.5rem; }
  .hero-media { aspect-ratio: 3/2; }
  .hero-stat { inset: auto auto 1.15rem 1.15rem; padding: .75rem .85rem; }
  .hero-stat strong { font-size: 2.5rem; }
  .hero-stat span { font-size: .8125rem; }
  .worksheet th, .worksheet td { padding: .65rem .7rem; }
  .worksheet :is(th, td):first-child, .premium-summary, .worksheet-footer { padding-inline-start: 1.15rem; }
  .worksheet :is(th, td):last-child, .premium-summary, .worksheet-footer { padding-inline-end: 1.15rem; }
  .worksheet tbody th { font-size: .9375rem; }
  .worksheet :is(input, select, textarea) { padding-inline-start: .7rem; }
  .worksheet textarea { height: 3rem; }
  .worked-example :is(th, td) { padding-inline: .7rem; }
}

@media (min-width: 58rem) {
  .wrap { width: min(100% - 7rem, 75rem); }
  .brand { font-size: 1.57rem; }
  .hero { grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr); gap: clamp(1.65rem, 3.6vw, 3.65rem); }
  h1 { font-size: clamp(3.4rem, 5.7vw, 5.15rem); }
  .hero-media { min-height: 29rem; aspect-ratio: 1.16; }
  .hero-media img { position: absolute; inset: 0; }
  .worksheet { margin-top: 2rem; }
  .worked-example { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 2.25rem; }
  .guide-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .guide-items article { min-height: 11rem; padding: 1.3rem 1.45rem; }
  .guide-items article:first-child { padding-inline-start: 0; }
  .guide-items article:last-child { padding-inline-end: 0; }
  .guide-items article + article { border-inline-start: 1px solid var(--line); }
  #resources .guide-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #resources .guide-items article:nth-child(odd) { padding-inline-start: 0; border-inline-start: 0; }
  .faq { grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 3rem; }
  .faq h2 { max-width: 9ch; }
}

@media (max-width: 23rem) {
  .wrap { width: calc(100% - 1.5rem); }
  h1 { font-size: 2.65rem; }
  .eyebrow { letter-spacing: .065em; }
  .worksheet :is(input, textarea)::placeholder { font-size: .82rem; }
  .worksheet select { padding-inline-end: 1.05rem; background-position: right .53rem center, right .28rem center; background-size: .25rem .25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
