:root {
  --bg: #faf6f0;
  --surface: #fffdf9;
  --text: #403833;
  --muted: #8a7f74;
  --border: #e9dfd2;
  --accent: #a3697a;
  --accent-dark: #8d5261;
  --result-bg: #f6ecee;
  --gold: #c9a97e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Karla", "Segoe UI", system-ui, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: 0.03em;
  color: var(--text);
  text-decoration: none;
}
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.4rem;
}
.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.site-header nav a:hover { color: var(--accent-dark); }

main { padding: 1.75rem 1rem 3rem; }

h1, h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
}
h1 { font-size: 2.1rem; line-height: 1.2; margin: 0.5rem 0 0.25rem; }
h2 { font-size: 1.45rem; margin-top: 2.25rem; }
.lede { color: var(--muted); font-size: 1.1rem; margin-top: 0; }

a { color: var(--accent-dark); }

/* Calculator card */
.tool {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}
.tool h2:first-child { margin-top: 0; }

.fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.9rem 1.25rem;
  margin-bottom: 1rem;
}
.field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
input, select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
}
input:focus, select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
input[type="checkbox"] {
  width: auto;
  accent-color: var(--accent);
}
.field-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.field-check label {
  margin-bottom: 0;
}

/* Results */
.results {
  background: var(--result-bg);
  border-radius: 4px;
  padding: 1.1rem 1.35rem;
  margin-top: 1rem;
}
.big-result {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.15;
  margin: 0 0 0.25rem;
}
.muted { color: var(--muted); }
.footnote { color: var(--muted); font-size: 0.85rem; margin-bottom: 0; }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
}
th, td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
th { font-weight: 600; }
td.num, th.num { text-align: right; }

@media (max-width: 480px) {
  th, td { padding: 0.35rem 0.3rem; }
}

button {
  font: inherit;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
button:hover { border-color: var(--accent); color: var(--accent-dark); }

/* Hashtag chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}
.chips li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.95rem;
}

/* Homepage */
.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 1.5rem 0 0.5rem;
  text-align: center;
}
.hero-title {
  text-align: center;
  font-size: 2.5rem;
  margin: 0 0 0.5rem;
}
.hero-lede {
  text-align: center;
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 34rem;
  margin: 0 auto 1.25rem;
}
.flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin: 0 0 1.5rem;
}
.flourish .line { width: 90px; height: 1px; background: var(--gold); }
.cta-row { text-align: center; margin-bottom: 1rem; }
.cta {
  display: inline-block;
  background: var(--accent);
  color: var(--surface);
  border-radius: 999px;
  padding: 0.8rem 1.8rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}
.cta:hover { background: var(--accent-dark); }

/* Tool cards on the homepage */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
  margin: 2rem 0;
  padding: 0;
  list-style: none;
}
.tool-grid a {
  display: block;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.3rem 1.5rem;
  color: inherit;
  text-decoration: none;
}
.tool-grid a:hover { border-color: var(--accent); }
.tool-grid h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}
.tool-grid p { margin: 0; font-size: 0.93rem; color: var(--muted); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1.3rem 0 1.6rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.site-footer nav { display: flex; gap: 1.25rem; margin-bottom: 0.5rem; }
.site-footer a { color: var(--accent-dark); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer p { margin: 0; }
