/* MakerCost — warm, low-glare design system */
:root {
  color-scheme: light;
  --bg: #f5f2eb;
  --surface: #fffdf8;
  --surface-2: #eee9df;
  --fg: #292d27;
  --muted: #62665d;
  --line: #ded9ce;
  --accent: #884d35;
  --accent-hover: #824a34;
  --accent-soft: #f1e3d9;
  --button-text: #fffaf4;
  --good: #476c55;
  --danger: #a34f43;
  --shadow: 0 12px 34px rgba(48, 43, 34, .07);
  --radius: 18px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1c211d;
  --surface: #252c26;
  --surface-2: #303930;
  --fg: #eee9df;
  --muted: #b0b5a9;
  --line: #414a40;
  --accent: #d59a79;
  --accent-hover: #e6b394;
  --accent-soft: #3c302a;
  --button-text: #1c211d;
  --good: #9bc2a2;
  --danger: #e19a8f;
  --shadow: 0 12px 34px rgba(0, 0, 0, .18);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.65 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; transition: background-color .2s ease, color .2s ease;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.site-header nav { max-width: 1160px; min-height: 76px; margin: 0 auto; padding: .8rem 1.4rem; display: flex; align-items: center; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; text-decoration: none; white-space: nowrap; }
.brand-logo { display: block; width: 190px; height: auto; max-width: 100%; }
.brand-logo.brand-logo-dark { display: none; }
:root[data-theme="dark"] .brand-logo-light { display: none; }
:root[data-theme="dark"] .brand-logo-dark { display: block; }
.footer-brand { display: inline-flex; align-items: center; margin-bottom: .65rem; }
.footer-brand .brand-logo { width: 170px; }
.navlinks { display: flex; align-items: center; gap: 1.35rem; margin-left: auto; }
.navlinks a { color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 600; }
.navlinks a:hover { color: var(--accent); }
.theme-toggle { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 40px; padding: .45rem .75rem; border: 1px solid var(--line); border-radius: 999px; color: var(--fg); background: var(--surface); font: inherit; font-size: .85rem; font-weight: 650; cursor: pointer; }
.theme-toggle:hover { border-color: var(--accent); background: var(--accent-soft); }
main { max-width: 1160px; margin: 0 auto; padding: 2.5rem 1.4rem 5rem; min-height: 68vh; }
.hero { position: relative; overflow: hidden; padding: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 5vw, 4.5rem); margin: .3rem 0 3.5rem; border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(125deg, var(--surface) 0%, var(--accent-soft) 100%); box-shadow: var(--shadow); }
.hero:after { content: ""; position: absolute; width: 300px; height: 300px; right: -90px; top: -120px; border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); border-radius: 50%; box-shadow: 0 0 0 32px color-mix(in srgb, var(--accent) 5%, transparent), 0 0 0 64px color-mix(in srgb, var(--accent) 4%, transparent); pointer-events: none; }
.hero h1 { max-width: 760px; margin: 0 0 .9rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.5rem, 6vw, 4.6rem); line-height: 1.04; letter-spacing: -.045em; font-weight: 600; }
.hero p { max-width: 620px; margin: 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.2rem); }
.hero-kicker { margin-bottom: 1rem !important; color: var(--accent) !important; font-size: .78rem !important; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
section[id] { scroll-margin-top: 100px; margin: 3rem 0; }
section[id] > h2, .how h2, .faqs h2, .related h2 { margin: 0 0 .3rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.55rem, 3vw, 2rem); font-weight: 600; letter-spacing: -.025em; }
.blurb { margin: 0 0 1.2rem; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1rem; margin: 1.25rem 0 2rem; }
.card { display: flex; flex-direction: column; min-height: 178px; padding: 1.35rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--fg); text-decoration: none; box-shadow: 0 3px 12px rgba(40,35,25,.025); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.card:after { content: "↗"; align-self: flex-end; margin-top: auto; color: var(--accent); font-size: 1.1rem; }
.card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); color: var(--fg); }
.card h3 { margin: 0 0 .45rem; color: var(--fg); font-size: 1.08rem; letter-spacing: -.015em; }
.card p { margin: 0 0 1rem; color: var(--muted); font-size: .92rem; }
.calc { max-width: 900px; margin: 0 auto; }
.calc > h1 { margin: 0 0 .5rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.12; letter-spacing: -.04em; font-weight: 600; }
.not-found { position: relative; isolation: isolate; overflow: hidden; max-width: 860px; margin: clamp(2rem, 7vw, 5rem) auto; padding: clamp(2rem, 6vw, 4rem); border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(125deg, var(--surface) 0%, var(--accent-soft) 100%); box-shadow: var(--shadow); text-align: center; }
.not-found::after { content: ""; position: absolute; z-index: -1; width: 280px; height: 280px; top: -150px; right: -100px; border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); border-radius: 50%; box-shadow: 0 0 0 32px color-mix(in srgb, var(--accent) 5%, transparent), 0 0 0 64px color-mix(in srgb, var(--accent) 4%, transparent); pointer-events: none; }
.not-found-mark { display: grid; place-items: center; width: 60px; height: 60px; margin: 0 auto 1.25rem; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 5px 16px rgba(40, 35, 25, .06); }
.not-found-mark img { display: block; width: 44px; height: 44px; }
.not-found > .hero-kicker { margin: 0 0 .7rem !important; }
.not-found > h1 { max-width: 680px; margin: 0 auto .8rem; font-size: clamp(2.35rem, 5vw, 3.6rem); }
.not-found .intro { max-width: 590px; margin: 0 auto 1.5rem; }
.not-found-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; }
.not-found-explore { margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.not-found-explore > p { margin: 0 0 .75rem; color: var(--muted); font-size: .78rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.not-found-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem; }
.not-found-links a { display: inline-flex; padding: .5rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--fg); font-size: .85rem; font-weight: 650; text-decoration: none; transition: border-color .15s, background .15s, color .15s; }
.not-found-links a:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.intro { max-width: 720px; margin: 0 0 1.7rem; color: var(--muted); font-size: 1.08rem; }
.calc-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; padding: clamp(1rem, 3vw, 2rem); margin: 1.5rem 0 2rem; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.field { min-width: 0; }
.field > label, .field legend { display: block; margin: 0 0 .4rem; color: var(--fg); font-size: .9rem; font-weight: 700; }
.inwrap { position: relative; }
.field input, .field select, .repeatable-control input, .repeatable-control select { width: 100%; min-width: 0; min-height: 46px; padding: .68rem .8rem; border: 1px solid var(--line); border-radius: 10px; outline: none; background: var(--bg); color: var(--fg); font: inherit; font-size: .95rem; transition: border-color .15s, box-shadow .15s, background .15s; }
.field input:focus, .field select:focus, .repeatable-control input:focus, .repeatable-control select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 17%, transparent); }
.field input::placeholder, .repeatable-control input::placeholder { color: var(--muted); }
.unit { position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; pointer-events: none; }
.help { display: block; margin-top: .35rem; color: var(--muted); font-size: .8rem; }
.field[hidden] { display: none !important; }
.repeatable-field { grid-column: 1 / -1; min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: 15px; background: var(--bg); }
.repeatable-field legend { padding: 0 .35rem; font-size: 1rem; }
.repeatable-rows { display: grid; gap: .75rem; }
.repeatable-row { padding: .9rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.repeatable-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.repeatable-control { min-width: 0; }
.repeatable-control label { display: block; margin-bottom: .3rem; color: var(--muted); font-size: .78rem; font-weight: 700; }
.repeatable-control input, .repeatable-control select { min-height: 42px; padding: .55rem .65rem; font-size: .88rem; }
.repeatable-actions { display: flex; justify-content: flex-end; margin-top: .65rem; }
.button { appearance: none; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .65rem 1rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: .9rem; font-weight: 750; cursor: pointer; transition: transform .15s, background .15s, border-color .15s; }
.button:active { transform: translateY(1px); }
.button-primary { background: var(--accent); border-color: var(--accent); color: var(--button-text); }
.button-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button-secondary { background: var(--surface); color: var(--fg); }
.button-secondary:hover { border-color: var(--accent); background: var(--accent-soft); }
.button-remove { min-height: 34px; padding: .35rem .65rem; background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); font-size: .8rem; }
.form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .65rem; padding-top: .25rem; }
.results { grid-column: 1 / -1; display: grid; gap: .2rem; }
.results:empty { display: none; }
.results.on { margin-top: .2rem; padding: 1.2rem 1.25rem; border: 1px solid color-mix(in srgb, var(--good) 35%, var(--line)); border-radius: 15px; background: color-mix(in srgb, var(--good) 8%, var(--surface)); }
.results-title { margin: 0 0 .6rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; }
.result-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .8rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.result-row:last-child { border-bottom: 0; }
.result-label { color: var(--muted); }
.result-value { text-align: right; font-variant-numeric: tabular-nums; }
.result-primary .result-label, .result-primary .result-value { color: var(--good); font-weight: 800; }
.result-primary .result-value { font-size: 1.15rem; }
.result-hint { grid-column: 1 / -1; color: var(--muted); font-size: .82rem; }
.validation-message { grid-column: 1 / -1; margin: 0; padding: .7rem .85rem; border-radius: 10px; background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: var(--danger); font-size: .9rem; }
.how, .faqs, .related { margin: 3rem 0 0; max-width: 780px; }
.how p, .faqs p { color: var(--muted); }
.faqs h3 { margin: 1.2rem 0 .25rem; font-size: 1rem; }
.faqs p { margin: 0; }
.related ul { display: flex; flex-wrap: wrap; gap: .6rem; padding: 0; list-style: none; }
.related li a { display: inline-flex; padding: .55rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; font-size: .88rem; font-weight: 650; }
.calc table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1.2rem 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.calc th, .calc td { padding: .7rem .85rem; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.calc th { background: var(--surface-2); font-size: .85rem; }
.calc pre { overflow-x: auto; padding: 1rem; border-radius: 12px; background: var(--surface-2); color: var(--fg); }
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { max-width: 1160px; margin: 0 auto; padding: 1.6rem 1.4rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 2rem; }
.site-footer p { margin: 0; color: var(--muted); font-size: .85rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-links a { color: var(--muted); font-size: .85rem; text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
@media (max-width: 760px) {
  .site-header nav { min-height: 66px; padding: .65rem 1rem; gap: .75rem; flex-wrap: wrap; }
  .navlinks { order: 3; width: 100%; margin: 0; gap: 1.1rem; overflow-x: auto; padding: .25rem 0 .4rem; }
  .theme-toggle { margin-left: auto; }
  main { padding: 1.4rem 1rem 3.5rem; }
  .hero { margin-bottom: 2.5rem; border-radius: 20px; }
  .calc-form { grid-template-columns: 1fr; border-radius: 18px; }
  .repeatable-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .not-found { padding: 1.5rem; border-radius: 20px; }
  .not-found-actions { flex-direction: column; }
  .not-found-actions .button { width: 100%; }
  .repeatable-controls { grid-template-columns: 1fr; }
  .form-actions .button { flex: 1 1 100%; }
  .result-row { grid-template-columns: 1fr; gap: .15rem; }
  .result-value { text-align: left; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }

/* Homepage: calculator-first landing experience */
.home-hero { display:grid; grid-template-columns:minmax(0,1.12fr) minmax(320px,.88fr); align-items:center; gap:clamp(2rem,5vw,4.5rem); padding:clamp(2rem,5vw,4.4rem); margin:.3rem 0 2rem; border:1px solid var(--line); border-radius:28px; background:linear-gradient(125deg,var(--surface) 0%,var(--accent-soft) 100%); box-shadow:var(--shadow); }
.home-hero-copy { position:relative; z-index:1; }
.home-hero .hero-kicker, .find-calculator .hero-kicker, .home-how .hero-kicker { margin:0 0 .85rem !important; }
.home-hero h1 { max-width:690px; margin:0 0 1rem; font-family:Georgia,"Times New Roman",serif; font-size:clamp(2.7rem,5.8vw,4.7rem); line-height:1.02; letter-spacing:-.052em; font-weight:600; }
.home-hero h1 em { color:var(--accent); font-weight:500; }
.home-hero-description { max-width:590px; margin:0; color:var(--muted); font-size:clamp(1.03rem,1.8vw,1.18rem); }
.hero-proof { display:flex; flex-wrap:wrap; gap:.55rem 1.1rem; margin-top:1.65rem; color:var(--muted); font-size:.8rem; font-weight:650; }
.hero-proof span::first-letter { color:var(--good); }
.featured-calculator { position:relative; z-index:1; padding:clamp(1.35rem,3vw,2rem); border:1px solid color-mix(in srgb,var(--accent) 30%,var(--line)); border-radius:22px; background:var(--surface); box-shadow:0 16px 40px rgba(40,35,25,.09); }
.featured-topline { display:flex; align-items:center; gap:.65rem; margin-bottom:1.5rem; }
.featured-icon { display:block; flex:0 0 38px; width:38px; height:38px; border-radius:12px; object-fit:cover; }
.featured-label { color:var(--accent); font-size:.75rem; font-weight:800; letter-spacing:.09em; text-transform:uppercase; }
.featured-calculator h2 { margin:0 0 .55rem; font-family:Georgia,"Times New Roman",serif; font-size:clamp(1.55rem,2.5vw,2rem); line-height:1.15; letter-spacing:-.025em; }
.featured-calculator p { min-height:5.1em; margin:0 0 1.2rem; color:var(--muted); font-size:.94rem; }
.featured-button { width:100%; justify-content:space-between; padding:.85rem 1rem; text-decoration:none; }
.featured-note { display:block; margin-top:.8rem; color:var(--muted); font-size:.76rem; text-align:center; }
.find-calculator { margin:2.2rem 0 2.6rem; padding:clamp(1.2rem,3vw,2rem); border:1px solid var(--line); border-radius:22px; background:var(--surface); }
.find-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.find-heading h2, .home-how h2 { margin:0 0 .25rem; font-family:Georgia,"Times New Roman",serif; font-size:clamp(1.65rem,3vw,2.25rem); font-weight:600; letter-spacing:-.03em; }
.find-heading .blurb { margin:0; }
.calculator-count { flex:0 0 auto; padding:.35rem .7rem; border:1px solid var(--line); border-radius:999px; color:var(--muted); font-size:.76rem; font-weight:700; }
.calculator-search-wrap { display:flex; align-items:center; gap:.75rem; min-height:58px; padding:.4rem .8rem .4rem 1rem; border:1px solid var(--line); border-radius:13px; background:var(--bg); color:var(--muted); }
.calculator-search-wrap:focus-within { border-color:var(--accent); box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 15%,transparent); }
.calculator-search-wrap > span { font-size:1.65rem; line-height:1; }
.calculator-search-wrap input { flex:1; width:100%; min-width:0; border:0; outline:0; background:transparent; color:var(--fg); font:inherit; font-size:1rem; }
.calculator-search-wrap input::placeholder { color:var(--muted); }
.calculator-search-wrap kbd { padding:.15rem .45rem; border:1px solid var(--line); border-radius:5px; background:var(--surface); color:var(--muted); font: .75rem ui-monospace,monospace; }
.search-empty { margin:.9rem 0 0; color:var(--muted); font-size:.9rem; }
.search-empty button { padding:0; border:0; background:none; color:var(--accent); font:inherit; font-weight:750; text-decoration:underline; cursor:pointer; }
.calculator-section { margin:2.8rem 0; }
.section-heading { display:flex; align-items:flex-end; justify-content:space-between; }
.calculator-card { min-height:190px; }
.card-link { display:flex; align-items:center; justify-content:space-between; gap:.5rem; margin-top:auto; color:var(--accent); font-size:.83rem; font-weight:750; }
.calculator-card[hidden], .calculator-section[hidden] { display:none !important; }
.home-how { display:grid; grid-template-columns:1fr 1fr; gap:clamp(1.5rem,5vw,4rem); align-items:center; margin:3.5rem 0 1rem; padding:clamp(1.5rem,4vw,3rem); border:1px solid var(--line); border-radius:24px; background:var(--surface-2); }
.home-how > div > p:last-child { max-width:500px; margin:.7rem 0 0; color:var(--muted); }
.home-how ol { display:grid; gap:1rem; margin:0; padding:0; list-style:none; }
.home-how li { display:flex; align-items:flex-start; gap:.9rem; }
.home-how li > span { display:grid; place-items:center; flex:0 0 38px; height:38px; border-radius:11px; background:var(--accent-soft); color:var(--accent); font-size:.78rem; font-weight:800; }
.home-how li strong, .home-how li small { display:block; }
.home-how li strong { margin:.1rem 0 .15rem; font-size:.94rem; }
.home-how li small { color:var(--muted); font-size:.82rem; }
@media (max-width:800px) { .home-hero { grid-template-columns:1fr; gap:2rem; } .featured-calculator p { min-height:0; } .home-how { grid-template-columns:1fr; } }
@media (max-width:540px) { .home-hero { padding:1.5rem; border-radius:20px; } .home-hero h1 { font-size:clamp(2.45rem,12vw,3.6rem); } .hero-proof { display:grid; gap:.4rem; } .find-heading { align-items:flex-start; flex-direction:column; } .calculator-count { align-self:flex-start; } .calculator-search-wrap kbd { display:none; } }

.brand-logo {
  display: block;
  width: 320px;
  height: auto;
  max-width: none;
}

.footer-brand .brand-logo {
  width: 280px;
  height: auto;
}

@media (max-width: 600px) {
  .brand-logo {
    width: 240px;
  }

  .footer-brand .brand-logo {
    width: 220px;
  }
}