/* fefinance.xyz — Inflation Calculator
   Visual identity: rust + ivory + warm grey, italic serif headings,
   editorial long-form layout, 12px rounded corners. */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px; line-height: 1.7;
  color: #2b2620; background: #fbf6ee;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: #a14a32; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #6e3122; }

h1, h2, h3, h4 {
  font-family: "Iowan Old Style", Georgia, "Times New Roman", serif;
  font-weight: 700; font-style: italic;
  color: #3a2e25; line-height: 1.2; margin: 0 0 .55em;
  letter-spacing: -.005em;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); margin-top: 1.6em; }
h3 { font-size: 1.15rem; font-style: normal; font-weight: 700; }
p { margin: 0 0 1em; }

code, kbd, samp, .mono {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: .9em; background: #f0e6d3; padding: .12em .4em; border-radius: 3px;
  color: #6e3122;
}

:root {
  --rust: #a14a32;
  --rust-dark: #6e3122;
  --rust-soft: #f4d8cc;
  --ochre: #c9904e;
  --ivory: #fbf6ee;
  --paper: #f5ecd9;
  --paper-2: #ede1c5;
  --line: #d8c8a6;
  --text: #2b2620;
  --muted: #6f6253;
  --hi: #3a2e25;
}

.container { width: min(1080px, 92%); margin: 0 auto; }

/* ---- Header ---- */
.site-header {
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 0;
}
.brand { display: inline-flex; align-items: center; gap: .7rem; line-height: 1.1; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--ivory); color: var(--rust);
  border: 2.5px solid var(--rust);
  display: grid; place-items: center;
  font-family: Georgia, serif; font-style: italic; font-weight: 700; font-size: .95rem;
  flex-shrink: 0;
}
.brand-text { display: inline-flex; flex-direction: column; gap: 1px; }
.brand-name {
  color: var(--hi); font-family: Georgia, serif; font-weight: 700;
  font-size: 1rem; font-style: italic;
}
.brand-tagline {
  font-family: Georgia, serif; font-style: italic;
  font-size: .76rem; font-weight: 400; color: var(--rust);
}
@media (max-width: 720px) { .brand-tagline { display: none; } }

.nav { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; align-items: center; row-gap: .25rem; }
.nav a {
  font-family: Georgia, serif; font-style: italic; font-weight: 600;
  color: var(--hi); font-size: .96rem; text-decoration: none;
  padding: .25rem 0; white-space: nowrap;
}
.nav a:hover { color: var(--rust); }
.nav-toggle {
  display: none; background: transparent; border: 0; padding: .4rem; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--rust);
  margin: 5px 0;
}

/* ---- Hero (editorial) ---- */
.hero {
  padding: 4.5rem 0 3.5rem;
  background:
    linear-gradient(180deg, var(--ivory) 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.hero::before {
  content: "";
  position: absolute; top: 1.5rem; left: 50%; transform: translateX(-50%);
  width: 80px; height: 1px; background: var(--rust);
}
.hero-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.eyebrow {
  font-family: Georgia, serif; font-style: italic;
  font-size: .92rem; color: var(--rust);
  margin-bottom: 1.2rem; display: inline-block;
}
.eyebrow::before, .eyebrow::after { content: "·"; margin: 0 .5rem; color: var(--ochre); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; margin: 0 auto 1em; }

/* ---- Tool ---- */
.tool {
  background: var(--ivory);
  border: 1px solid var(--line);
  padding: 2rem;
  margin: 2.5rem auto;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(58, 46, 37, .08);
  max-width: 800px;
}
.tool h2 { margin-top: 0; text-align: center; }
.tool-grid {
  display: grid; gap: 1.2rem;
  grid-template-columns: 1fr 1fr;
}
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label {
  font-family: Georgia, serif; font-style: italic; font-weight: 700;
  color: var(--hi); font-size: 1rem;
}
.field input, .field select {
  font: inherit; padding: .7rem .9rem;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--ivory); color: var(--text);
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--rust);
  box-shadow: 0 0 0 3px rgba(161, 74, 50, .15); background: #fff;
}
.field small { color: var(--muted); font-size: .82rem; font-style: italic; }

.tool-output {
  margin-top: 1.6rem; padding: 1.6rem 1.8rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: center;
}
.tool-output h3 {
  color: var(--rust); margin: 0 0 .4rem;
  font-style: italic; font-family: Georgia, serif; font-size: 1rem;
  font-weight: 600;
}
.tool-output .big {
  font-family: Georgia, serif; font-style: italic;
  font-size: 2.5rem; font-weight: 700; color: var(--hi);
  letter-spacing: -.01em; line-height: 1;
}
.tool-output .breakdown {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem; margin-top: 1.4rem; padding-top: 1.4rem;
  border-top: 1px dashed var(--line);
}
.tool-output .breakdown div span:first-child {
  display: block; font-size: .82rem; color: var(--muted);
  font-style: italic; margin-bottom: .25rem;
}
.tool-output .breakdown div span:last-child {
  font-family: Georgia, serif; font-style: italic;
  font-size: 1.15rem; font-weight: 700; color: var(--rust);
}

.privacy-note {
  font-style: italic; font-family: Georgia, serif;
  font-size: .92rem; color: var(--muted);
  border-left: 3px solid var(--ochre);
  padding: .6rem 1rem; margin-top: 1rem;
}

/* ---- Content (editorial body) ---- */
.content { padding: 1.5rem 0 3rem; max-width: 720px; margin: 0 auto; }
.content section { margin-bottom: 2.5rem; }
.content > section > p:first-of-type::first-letter {
  font-family: Georgia, serif; font-style: italic; font-weight: 700;
  font-size: 3.5em; float: left; line-height: 1; padding-right: .15em; padding-top: .15em;
  color: var(--rust);
}

.author-card {
  display: grid; grid-template-columns: 90px 1fr; gap: 1.4rem;
  align-items: center; padding: 1.6rem;
  background: var(--paper);
  border-radius: 12px;
  border: 1px solid var(--line);
  margin: 1.2rem 0;
}
.author-avatar {
  width: 90px; height: 90px; border-radius: 50%;
  background: var(--ivory); color: var(--rust);
  border: 3px solid var(--rust);
  font-size: 1.9rem; font-weight: 700; font-family: Georgia, serif; font-style: italic;
  display: grid; place-items: center;
}
.author-meta { color: var(--muted); font-size: .95rem; margin: 0 0 .4rem; font-style: italic; }
.cred-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.cred-row span {
  display: inline-block; padding: .2rem .65rem;
  background: var(--ivory); border: 1px solid var(--line);
  border-radius: 14px; font-size: .8rem; color: var(--rust-dark);
  font-weight: 600;
}

/* Reference / data tables */
.ref-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--ivory); }
.ref-table { width: 100%; border-collapse: collapse; font-size: .94rem; min-width: 480px; }
.ref-table th, .ref-table td {
  padding: .7rem .9rem; text-align: left;
  border-bottom: 1px solid var(--line);
}
.ref-table thead th {
  background: var(--paper-2); color: var(--hi);
  font-family: Georgia, serif; font-weight: 700; font-style: italic;
}
.ref-table tbody tr:hover td { background: var(--paper); }
.ref-table td.num { font-family: "JetBrains Mono", Consolas, monospace; font-size: .9rem; }

.callout {
  border-left: 3px solid var(--rust);
  background: var(--paper);
  padding: 1rem 1.3rem; margin: 1.2rem 0;
  border-radius: 0 8px 8px 0;
  font-size: 1rem; font-style: italic; font-family: Georgia, serif;
}
.callout strong { font-style: normal; }

/* Forms */
.form-card {
  background: var(--ivory); border: 1px solid var(--line);
  border-radius: 12px; padding: 1.8rem;
  margin: 1rem 0 2rem;
  box-shadow: 0 4px 14px rgba(58, 46, 37, .06);
}
.form-card label { display: grid; gap: .35rem; margin-bottom: 1rem; font-family: Georgia, serif; font-style: italic; font-weight: 700; color: var(--hi); font-size: .98rem; }
.form-card input, .form-card textarea, .form-card select {
  font: inherit; padding: .65rem .85rem;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--ivory);
}
.form-card input:focus, .form-card textarea:focus, .form-card select:focus {
  outline: none; border-color: var(--rust);
  box-shadow: 0 0 0 3px rgba(161, 74, 50, .15); background: #fff;
}
.btn {
  display: inline-block; padding: .7rem 1.6rem;
  font: inherit; font-family: Georgia, serif; font-style: italic; font-weight: 700; font-size: 1.05rem;
  border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--rust); background: var(--rust); color: var(--ivory);
}
.btn:hover { background: var(--rust-dark); border-color: var(--rust-dark); }

/* Footer */
.site-footer {
  background: var(--rust-dark); color: #d8c8a6;
  padding: 2.6rem 0 1.4rem;
}
.site-footer a { color: var(--ochre); text-decoration: none; }
.site-footer a:hover { color: var(--ivory); }
.site-footer .brand-mark { background: var(--ivory); color: var(--rust-dark); border-color: var(--ochre); }
.site-footer .brand-name { color: var(--ivory); }
.site-footer .brand-tagline { color: var(--ochre); }
.footer-grid {
  display: grid; gap: 1.6rem;
  grid-template-columns: 2fr 1fr 1fr;
  margin-bottom: 1.4rem;
}
.site-footer h4 {
  color: var(--ivory); font-family: Georgia, serif; font-style: italic;
  font-size: 1.05rem; margin-bottom: .8rem; font-weight: 700;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: .35rem 0; font-size: .95rem; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .8rem;
  padding-top: 1.2rem; border-top: 1px solid rgba(216, 200, 166, .2);
  font-style: italic; font-size: .84rem; font-family: Georgia, serif;
  color: #b8a479;
}

/* Responsive */
@media (max-width: 880px) {
  .tool-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .author-card { grid-template-columns: 1fr; }
  .author-avatar { width: 70px; height: 70px; font-size: 1.5rem; }
  .content > section > p:first-of-type::first-letter { font-size: 3em; }

  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; right: 4%; left: 4%; z-index: 50;
    background: var(--ivory); border: 1px solid var(--line); border-radius: 8px;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .6rem; box-shadow: 0 6px 18px rgba(58, 46, 37, .12);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: .65rem .9rem; }
  .nav a:hover { background: var(--paper); }
}
