:root {
  --brand: #047857; --brand-dark: #064e3b; --brand-tint: #ecfdf5; --brand-line: #a7f3d0;
  --ink: #0f172a; --body: #334155; --muted: #64748b; --line: #e2e8f0; --bg: #f8faf9; --card: #fff;
  --amber: #f59e0b; --red: #b91c1c;
  --radius: 14px; --shadow: 0 10px 30px rgba(6, 78, 59, .08), 0 2px 6px rgba(15, 23, 42, .04);
  --font: ui-sans-serif, -apple-system, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--body); background: var(--bg); }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-head { background: #fff; border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--brand-dark); text-decoration: none; letter-spacing: -.2px; }
.logo .mark { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 17px; }
.nav { display: flex; gap: 4px 14px; flex-wrap: wrap; font-size: 14px; }
.nav a { text-decoration: none; color: var(--body); padding: 6px 2px; }
.nav a:hover, .nav a[aria-current] { color: var(--brand); }

/* Hero */
.hero { padding: 34px 0 10px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.08; letter-spacing: -1px; color: var(--brand-dark); margin: 0 0 10px; }
.lede { font-size: 18px; max-width: 760px; margin: 0; }
.updated { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--brand-dark); background: var(--brand-tint);
  border: 1px solid var(--brand-line); border-radius: 999px; padding: 3px 12px; }

/* Calculator */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin: 22px 0 8px; }
@media (max-width: 820px) { .calc { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card h2 { margin-top: 0; }
form .field { margin-bottom: 14px; }
form label { display: block; font-weight: 600; color: var(--ink); font-size: 15px; margin-bottom: 5px; }
form .hint { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.input { display: flex; align-items: center; border: 1.5px solid #cbd5e1; border-radius: 10px; background: #fff; overflow: hidden; }
.input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(4, 120, 87, .15); }
.input span { padding: 0 10px; color: var(--muted); font-weight: 600; }
.input input, select { flex: 1; border: 0; font: inherit; font-size: 17px; padding: 10px 10px; min-width: 0; background: transparent; color: var(--ink); }
.input input:focus, select:focus { outline: none; }
select { width: 100%; border: 1.5px solid #cbd5e1; border-radius: 10px; background: #fff; padding: 10px 12px; font-size: 16px; }
select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(4, 120, 87, .15); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; color: var(--ink); }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--brand); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } .card { padding: 18px 16px; } }

.results { position: sticky; top: 16px; align-self: start; }
.results h2 { font-size: 18px; color: var(--brand-dark); margin: 0 0 12px; }
dl { margin: 0; }
dl .r { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
dl .r dt { color: var(--body); }
dl .r dd { margin: 0; font-weight: 600; color: var(--ink); text-align: right; white-space: nowrap; }
dl .r dd small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
dl .r.total dt, dl .r.total dd { font-weight: 800; }
dl.big { margin-top: 14px; background: var(--brand-tint); border-radius: 12px; padding: 4px 14px; }
dl.big .r { border-bottom-color: #d1fae5; }
dl.big .r:last-child { border-bottom: 0; }
dl.big .keep dd { font-size: 24px; color: var(--brand-dark); }
dl.big .profit dd { font-size: 20px; color: var(--brand); }
dl.big .profit.neg dd { color: var(--red); }

/* Compare table */
.verdict { background: var(--brand-tint); border: 1px solid var(--brand-line); border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; color: var(--brand-dark); }
table.cmp { width: 100%; border-collapse: collapse; font-size: 15px; }
table.cmp th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 6px 8px; border-bottom: 2px solid var(--line); }
table.cmp td { padding: 9px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.cmp td:nth-child(2) { white-space: normal; }
.results { overflow-x: auto; }
table.cmp tr.best td { background: var(--brand-tint); font-weight: 700; }
table.cmp td:first-child { color: var(--muted); width: 28px; }
table.cmp .barcol { width: 32%; }
table.cmp .bar { display: block; height: 10px; border-radius: 5px; background: var(--brand); }
@media (max-width: 520px) { table.cmp .barcol { display: none; } }

/* Content */
main section { margin: 34px 0; }
h2 { font-size: 24px; line-height: 1.2; letter-spacing: -.4px; color: var(--brand-dark); margin: 0 0 12px; }
h3 { font-size: 18px; color: var(--ink); margin: 22px 0 8px; }
ul.facts { padding-left: 20px; }
ul.facts li { margin: 8px 0; }
table.data { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 15px; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: #f1f5f9; color: var(--ink); font-size: 13px; }
table.data td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 10px 0; }
details summary { font-weight: 700; color: var(--ink); cursor: pointer; }
details p { margin: 10px 0 0; }

/* CTA */
.cta { display: grid; grid-template-columns: 1.1fr .9fr; gap: 22px; align-items: center; background: var(--brand-dark); color: #d1fae5;
  border-radius: 18px; padding: 26px; margin: 36px 0; }
.cta h2 { color: #fff; }
.cta p { margin: 0 0 14px; }
.cta img { border-radius: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .25); }
.cta.noimg { grid-template-columns: 1fr; }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; } }
.btn { display: inline-block; background: var(--amber); color: #1f2937; font-weight: 800; text-decoration: none; padding: 12px 20px; border-radius: 10px; }
.btn:hover { background: #fbbf24; color: #111827; }
.btn.secondary { background: transparent; color: #fff; border: 1.5px solid #6ee7b7; margin-left: 8px; }

/* Link grid */
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.links a { display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-decoration: none; color: var(--ink); font-weight: 700; }
.links a small { display: block; color: var(--muted); font-weight: 500; }
.links a:hover { border-color: var(--brand); }

/* Products */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.product img { border-radius: 10px; border: 1px solid var(--line); }
.product h3 { margin: 12px 0 6px; }
.price { font-size: 22px; font-weight: 800; color: var(--brand-dark); }
.soon { display: inline-block; color: var(--muted); font-weight: 600; }

/* Footer */
.site-foot { background: #fff; border-top: 1px solid var(--line); margin-top: 50px; padding: 28px 0 36px; font-size: 14px; color: var(--muted); }
.site-foot .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 20px; }
@media (max-width: 700px) { .site-foot .cols { grid-template-columns: 1fr; } }
.site-foot a { color: var(--body); }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin: 4px 0; }
.sources { font-size: 13px; color: var(--muted); }
.sources li { word-break: break-word; }

/* Store calculator */
.calc.stacked { grid-template-columns: minmax(0, 1fr); }
.calc.stacked .results { position: static; }
.srow { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 0 14px; padding-top: 10px; border-top: 1px solid var(--line); }
@media (max-width: 640px) { .srow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .srow .field:first-child { grid-column: 1 / -1; } }
@media (max-width: 380px) { .srow { grid-template-columns: minmax(0, 1fr); } }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pos { color: var(--brand); font-weight: 700; }
.neg { color: var(--red); font-weight: 700; }
table.cmp.wide td:first-child { color: inherit; width: auto; white-space: normal; }
.results .hint { font-size: 13px; color: var(--muted); }

/* Poshmark offer table: rows under the target are marked with words too */
table.cmp tr.below td { background: #fef2f2; color: #7f1d1d; }
table.cmp tr.below td:last-child { font-weight: 700; }
table.cmp.wide tr.below td:first-child { color: #7f1d1d; }
.verdict.neg-note { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }

/* Quarterly estimated tax: the planning-estimate note under the calculator, and the form's sub-heading */
.disclaimer { background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: 12px 16px; margin: 20px 0 0; color: #78350f; font-size: 15px; }
form > h3 { margin: 6px 0 10px; }
.results details { margin: 14px 0 6px; }
