@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,wght@0,500;0,700;1,700&family=Instrument+Sans:wght@400;500;600&family=Fira+Code:wght@400;500&display=swap');

:root {
  --soil:      #1c1a14;
  --moss:      #3d5a2e;
  --fern:      #5a7f42;
  --leaf:      #8ab56a;
  --mist:      #f2ede4;
  --parchment: #e8e1d4;
  --linen:     #f9f6f0;
  --ink:       #1c1a14;
  --ink-mid:   #5a5344;
  --ink-muted: #9c9082;
  --border:    #d4cabc;
  --white:     #ffffff;
  --red:       #a33020;
  --red-bg:    #fdf2ef;
  --shadow:    0 2px 12px rgba(28,26,20,0.1);
  --radius:    6px;
  --font-head: 'Fraunces', Georgia, serif;
  --font-body: 'Instrument Sans', system-ui, sans-serif;
  --font-mono: 'Fira Code', 'Courier New', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); font-size: 15px; line-height: 1.65; color: var(--ink); background: var(--linen); -webkit-font-smoothing: antialiased; }
a { color: var(--moss); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── AD SLOTS: collapse when empty ── */
.ad-slot { width: 100%; text-align: center; background: transparent; min-height: 0; }
.ad-slot:empty { display: none; }
.ad-slot ins.adsbygoogle:not([data-ad-status]) { display: none !important; }

/* ── SPONSOR SLOT ── */
.sponsor-slot { display: none; background: var(--parchment); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 14px; font-size: 0.8rem; text-align: center; margin: 12px 0; }
.sponsor-label { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); margin-right: 8px; }

/* ── LAYOUT ── */
.page-wrap { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
.container { width: 100%; max-width: 820px; margin: 0 auto; padding: 0 20px; }

/* ── HEADER ── */
.site-header { background: var(--soil); padding: 0; border-bottom: 3px solid var(--fern); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0; }
.site-logo { font-family: var(--font-head); font-size: 1.15rem; font-weight: 700; font-style: italic; color: var(--mist); padding: 14px 0; }
.site-logo span { color: var(--leaf); font-style: normal; }
.site-nav { display: flex; gap: 0; }
.site-nav a { font-size: 0.8rem; font-weight: 500; color: #9c9082; padding: 14px 12px; transition: color 0.15s; }
.site-nav a:hover { color: var(--leaf); text-decoration: none; }
.site-nav a.active { color: var(--leaf); }
@media (max-width: 560px) {
  .site-header .container { flex-direction: column; align-items: flex-start; }
  .site-nav { flex-wrap: wrap; }
  .site-nav a { padding: 8px 10px 10px; }
}

/* ── HERO ── */
.tool-hero { background: var(--soil); padding: 50px 0 42px; }
.tool-hero h1 { font-family: var(--font-head); font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 700; font-style: italic; color: var(--mist); line-height: 1.1; margin-bottom: 12px; }
.tool-hero h1 em { font-style: normal; color: var(--leaf); }
.tool-hero p { color: #9c9082; font-size: 0.96rem; max-width: 500px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.badge { font-family: var(--font-mono); font-size: 0.67rem; letter-spacing: 0.06em; padding: 3px 10px; border-radius: 20px; background: rgba(138,181,106,0.1); border: 1px solid rgba(138,181,106,0.25); color: var(--leaf); }

/* ── CARD ── */
.calc-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; margin: 32px 0; }
.calc-card-title { font-family: var(--font-head); font-size: 1.25rem; font-weight: 500; color: var(--ink); margin-bottom: 24px; padding-bottom: 14px; border-bottom: 1px solid var(--parchment); }
@media (max-width: 560px) { .calc-card { padding: 20px; } }

/* ── FORM ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.full { grid-column: 1 / -1; }
.section-sep { font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); padding-bottom: 6px; border-bottom: 1px solid var(--parchment); margin: 20px 0 12px; grid-column: 1 / -1; }
label { font-size: 0.82rem; font-weight: 600; color: var(--ink-mid); }
label .req { color: var(--fern); margin-left: 2px; }
.input-wrap { position: relative; }
.input-wrap .pfx { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-muted); font-family: var(--font-mono); font-size: 0.88rem; pointer-events: none; }
.input-wrap input { padding-left: 26px; }
input[type="text"], input[type="number"], select { width: 100%; padding: 10px 12px; font-family: var(--font-mono); font-size: 0.9rem; color: var(--ink); background: var(--mist); border: 1px solid var(--border); border-radius: var(--radius); outline: none; -webkit-appearance: none; appearance: none; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; }
select { font-family: var(--font-body); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239c9082' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
input:focus, select:focus { border-color: var(--fern); box-shadow: 0 0 0 3px rgba(61,90,46,0.1); background: var(--white); }
input.err { border-color: var(--red) !important; box-shadow: 0 0 0 3px rgba(163,48,32,0.08) !important; }
.field-hint { font-size: 0.73rem; color: var(--ink-muted); line-height: 1.4; }
.field-error { font-size: 0.73rem; color: var(--red); min-height: 1rem; }
.error-banner { background: var(--red-bg); border: 1px solid #f0c0b0; border-radius: var(--radius); padding: 14px 18px; color: var(--red); font-size: 0.88rem; margin-bottom: 16px; }

/* ── MODE TOGGLE ── */
.mode-toggle { display: flex; gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.mode-toggle label { flex: 1; text-align: center; padding: 9px 14px; font-size: 0.82rem; font-weight: 600; cursor: pointer; color: var(--ink-muted); background: var(--mist); transition: background 0.15s, color 0.15s; }
.mode-toggle input[type="radio"] { display: none; }
.mode-toggle input[type="radio"]:checked + label { background: var(--moss); color: var(--white); }

/* ── BUTTONS ── */
.btn-row { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.btn-primary { flex: 1; min-width: 160px; background: var(--moss); color: var(--white); border: none; border-radius: var(--radius); padding: 13px 24px; font-family: var(--font-body); font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: background 0.15s, transform 0.1s; }
.btn-primary:hover { background: var(--fern); }
.btn-primary:active { transform: scale(0.98); }
.btn-secondary { background: transparent; color: var(--ink-mid); border: 1px solid var(--border); border-radius: var(--radius); padding: 13px 20px; font-family: var(--font-body); font-size: 0.88rem; cursor: pointer; transition: border-color 0.15s; }
.btn-secondary:hover { border-color: var(--ink-mid); color: var(--ink); }
.btn-copy { background: transparent; color: var(--moss); border: 1px solid var(--moss); border-radius: var(--radius); padding: 10px 18px; font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: background 0.15s, color 0.15s; }
.btn-copy:hover { background: var(--moss); color: var(--white); }

/* ── RESULTS ── */
#results { margin: 0 0 40px; }
.results-heading { font-family: var(--font-head); font-size: 1.3rem; font-weight: 500; margin-bottom: 18px; color: var(--ink); }
.rate-banner { background: var(--soil); border-radius: var(--radius); padding: 26px 28px 22px; margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.rbl { font-family: var(--font-mono); font-size: 0.67rem; letter-spacing: 0.1em; text-transform: uppercase; color: #6e6556; margin-bottom: 5px; }
.rate-big { font-family: var(--font-head); font-size: clamp(2.4rem, 5vw, 3.2rem); font-weight: 700; color: var(--leaf); line-height: 1; }
.rate-sub { font-size: 0.79rem; color: #9c9082; margin-top: 4px; }
.banner-cols { display: flex; gap: 32px; flex-wrap: wrap; }
.banner-col { }
.monthly-val { font-family: var(--font-mono); font-size: 1.45rem; font-weight: 500; color: var(--mist); }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.s-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px; box-shadow: 0 1px 3px rgba(28,26,20,0.06); }
.s-card .sl { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 5px; }
.s-card .sv { font-family: var(--font-mono); font-size: 1.12rem; font-weight: 500; color: var(--ink); }
.s-card.accent .sv { color: var(--moss); }
.results-meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-muted); margin-bottom: 14px; }
.disclaimer { font-size: 0.78rem; color: var(--ink-muted); background: var(--parchment); border-left: 3px solid var(--border); padding: 10px 14px; border-radius: 0 var(--radius) var(--radius) 0; font-style: italic; margin-bottom: 16px; }

/* ── INFO PAGES ── */
.info-hero { background: var(--soil); padding: 44px 0 36px; }
.info-hero h1 { font-family: var(--font-head); font-size: clamp(1.6rem, 3vw, 2.3rem); font-style: italic; font-weight: 700; color: var(--mist); margin-bottom: 8px; }
.info-hero p { color: #9c9082; font-size: 0.93rem; }
.info-body { padding: 40px 0; }
.info-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 32px; margin-bottom: 22px; box-shadow: 0 1px 4px rgba(28,26,20,0.06); }
.info-card h2 { font-family: var(--font-head); font-size: 1.15rem; font-weight: 500; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--parchment); color: var(--ink); }
.info-card h3 { font-size: 0.9rem; font-weight: 600; margin: 16px 0 6px; color: var(--ink); }
.info-card p { font-size: 0.88rem; color: var(--ink-mid); margin-bottom: 10px; line-height: 1.72; }
.info-card p:last-child { margin-bottom: 0; }
.info-card ul { list-style: disc; padding-left: 20px; margin-bottom: 10px; }
.info-card ul li { font-size: 0.88rem; color: var(--ink-mid); margin-bottom: 5px; line-height: 1.6; }
.info-card a { color: var(--moss); }
.faq-q { border-bottom: 1px solid var(--parchment); padding: 14px 0; }
.faq-q:last-child { border-bottom: none; padding-bottom: 0; }
.faq-q h3 { margin: 0 0 7px; font-size: 0.91rem; }
.faq-q p { margin: 0; }
@media (max-width: 560px) { .info-card { padding: 18px 16px; } }

/* ── CONTACT ── */
.contact-block { background: var(--parchment); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 18px; }
.contact-block .cl { font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fern); margin-bottom: 6px; }
.contact-block a { font-family: var(--font-mono); font-size: 0.95rem; color: var(--moss); font-weight: 500; }

/* ── FOOTER ── */
.site-footer { background: var(--soil); color: #6e6556; padding: 40px 0 24px; margin-top: 48px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 32px; margin-bottom: 32px; }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; gap: 20px; } }
.footer-col h4 { font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; color: #3d3829; margin-bottom: 12px; }
.footer-col a { display: block; color: #6e6556; font-size: 0.82rem; margin-bottom: 7px; transition: color 0.15s; }
.footer-col a:hover { color: var(--leaf); text-decoration: none; }
.footer-col p { font-size: 0.82rem; line-height: 1.65; }
#footer-network-links a { display: block; color: #6e6556; font-size: 0.82rem; margin-bottom: 7px; transition: color 0.15s; }
#footer-network-links a:hover { color: var(--leaf); text-decoration: none; }
.footer-bottom { border-top: 1px solid #2a2720; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; font-size: 0.79rem; color: #3d3829; }
.footer-bottom a { color: #3d3829; }
.footer-bottom a:hover { color: #6e6556; text-decoration: none; }
.footer-disclaimer { font-size: 0.74rem; color: #3d3829; border-top: 1px solid #2a2720; padding-top: 14px; margin-top: 4px; line-height: 1.55; }


/* Related tools footer list */
.related-tools{list-style:none;padding-left:0;margin:0;}
.related-tools li{margin:6px 0;}
.related-tools a{text-decoration:none;}
