:root {
  --ink: #16201c;
  --muted: #5c6963;
  --line: #d8dfd7;
  --surface: #ffffff;
  --soft: #f4f7f1;
  --accent: #166858;
  --accent-dark: #0d4339;
  --amber: #f2b84b;
  --rose: #c45757;
  --sky: #4d7fa3;
  --shadow: 0 20px 50px rgba(22, 32, 28, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-dark); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--rose); }

.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 10; padding: 0.7rem 1rem; background: var(--ink); color: #fff; }
.skip-link:focus { top: 1rem; }

/* Header + navigation */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgba(244, 247, 241, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  width: min(1120px, calc(100% - 2rem)); margin: 0 auto; padding: 0.9rem 0;
}
.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--ink); font-weight: 800; text-decoration: none; }
.brand span { white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 1.25rem; font-weight: 700; flex-wrap: wrap; list-style: none; }
.nav-links a { color: var(--ink); text-decoration: none; }
.has-dropdown { position: relative; }
.dropdown-toggle { background: none; border: none; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; padding: 0; }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 210px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow);
  padding: 0.4rem; display: none; flex-direction: column; gap: 0.1rem; z-index: 30;
}
.has-dropdown:hover .dropdown-menu, .has-dropdown:focus-within .dropdown-menu { display: flex; }
.dropdown-menu a { padding: 0.5rem 0.7rem; border-radius: 6px; white-space: nowrap; font-weight: 600; }
.dropdown-menu a:hover { background: #edf3ed; }

/* Layout shells */
.hero, .tool-section, .content-band, .blog-preview, .faq, .blog-shell, .article-shell, .tools-band, header.article-header {
  width: min(1120px, calc(100% - 2rem)); margin: 0 auto;
}

.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(240px, 0.7fr);
  gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
  padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(1.5rem, 3vw, 2.5rem);
}
.hero-copy { max-width: 690px; }
.eyebrow { margin: 0 0 0.55rem; color: var(--accent-dark); font-size: 0.78rem; font-weight: 800; letter-spacing: 0; text-transform: uppercase; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { max-width: 720px; font-size: clamp(1.9rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p { margin: 0; }
.hero-text { max-width: 620px; margin-top: 1.1rem; color: var(--muted); font-size: 1.06rem; }
.hero-actions, .form-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.4rem; }

.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px;
  padding: 0.75rem 1rem; border: 1px solid transparent; border-radius: 8px;
  font: inherit; font-weight: 800; text-decoration: none; cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--accent); color: #fff; box-shadow: 0 12px 28px rgba(22, 104, 88, 0.22); }
.button.primary:hover { background: var(--accent-dark); color: #fff; }
.button.secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.button.text-button { background: transparent; color: var(--muted); }

.hero-visual { display: grid; place-items: center; }
.hero-visual img { width: min(360px, 100%); filter: drop-shadow(0 24px 32px rgba(22, 32, 28, 0.16)); }

.tool-section, .content-band, .blog-preview, .faq, .blog-shell, .article-shell, .tools-band { padding: 3rem 0; }
.section-heading { max-width: 720px; margin-bottom: 1.5rem; }
.section-heading p:last-child { margin-top: 0.8rem; color: var(--muted); }

.calculator-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr); gap: 1rem; align-items: stretch; }
.calculator-card, .result-card, .post-card, .blog-index-card, .tool-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow);
}
.calculator-card { padding: clamp(1rem, 3vw, 1.5rem); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
label { display: grid; gap: 0.35rem; color: var(--ink); font-weight: 800; }
input, select {
  width: 100%; min-height: 46px; border: 1px solid #bcc8c0; border-radius: 8px;
  padding: 0.7rem 0.8rem; background: #fff; color: var(--ink); font: inherit;
}
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgba(242, 184, 75, 0.8); outline-offset: 2px; }
small { color: var(--muted); font-weight: 500; }

.result-card { padding: 1.4rem; background: #fdfcf8; }
.result-card h3 { margin-bottom: 0.6rem; font-size: clamp(1.5rem, 4vw, 2.35rem); }
.result-sign { display: grid; gap: 0.6rem; }
.sign-symbol { font-size: 4rem; line-height: 1; }
.result-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.result-meta span { padding: 0.35rem 0.55rem; border-radius: 8px; background: #edf3ed; color: var(--accent-dark); font-size: 0.9rem; font-weight: 800; }
.notice { margin-top: 1rem; padding: 0.8rem; border-left: 4px solid var(--amber); background: #fff8e8; color: #604415; }

.two-column { display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); }
.two-column p { color: var(--muted); }
.info-list { display: grid; gap: 1rem; }
.info-list article { padding: 0 0 1rem; border-bottom: 1px solid var(--line); }

.post-grid, .blog-index-grid, .tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.post-card, .blog-index-card, .tool-card { padding: 1.25rem; }
.post-card h3, .blog-index-card h2, .tool-card h3 { font-size: 1.15rem; }
.post-card p, .blog-index-card p, .tool-card p { margin-top: 0.65rem; color: var(--muted); }
.tool-card a.button { margin-top: 1rem; }
/* "More Calculators" grid: all calculator buttons render green (primary) for consistency across pages */
.tool-card .button.secondary { background: var(--accent); color: #fff; border-color: transparent; box-shadow: 0 12px 28px rgba(22, 104, 88, 0.22); }
.tool-card .button.secondary:hover { background: var(--accent-dark); color: #fff; }
.center-link { margin-top: 1.25rem; text-align: center; font-weight: 800; }

/* .faq { max-width: 820px; } */
details { padding: 1rem 0; border-bottom: 1px solid var(--line); }
summary { color: var(--ink); font-weight: 800; cursor: pointer; }
details p { margin-top: 0.65rem; color: var(--muted); }

.site-footer {
  display: flex; justify-content: space-between; gap: 1rem;
  width: min(1120px, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0;
  border-top: 1px solid var(--line); color: var(--muted);
}
.site-footer div { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Articles + legal */
.blog-hero, .article-header { /*max-width: 820px; */ padding: 2.5rem 0 1.5rem; }
.blog-hero p, .article-header p, .article-content p, .article-content li { color: var(--muted); }
.article-shell { /*max-width: 840px;*/ }
.breadcrumb { margin-bottom: 1rem; color: var(--muted); font-size: 0.94rem; }
.article-content { display: grid; gap: 1.35rem; padding-bottom: 2.5rem; }
.article-content h2 { margin-top: 0.6rem; font-size: clamp(1.45rem, 3vw, 2rem); }
.article-content ul, .article-content ol { color: var(--muted); padding-left: 1.2rem; display: grid; gap: 0.4rem; }
.tool-callout { padding: 1rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.placeholder-note { padding: 0.8rem 1rem; border: 1px dashed var(--line); border-radius: 8px; background: #fff; color: var(--muted); font-size: 0.94rem; }

/* Contact form + author box */
textarea {
  width: 100%; min-height: 150px; border: 1px solid #bcc8c0; border-radius: 8px;
  padding: 0.7rem 0.8rem; background: #fff; color: var(--ink); font: inherit; resize: vertical;
}
.contact-form { display: grid; gap: 1rem; max-width: 600px; }
.form-status { margin-top: 0.5rem; font-weight: 700; }
.byline { color: var(--muted); font-size: 0.95rem; font-weight: 600; margin-top: 0.5rem; }
.byline a { color: var(--accent-dark); }
.author-box { display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; margin-top: 1.75rem; }
.author-box .author-avatar { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%; background: #edf3ed; display: grid; place-items: center; font-weight: 800; color: var(--accent-dark); }
.author-box .author-meta { display: grid; gap: 0.3rem; }
.author-box h3 { font-size: 1.05rem; }
.author-box p { color: var(--muted); font-size: 0.95rem; }

/* City autocomplete + simplified calculator inputs */
.city-field { position: relative; }
.autocomplete-list {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px);
  max-height: 260px; overflow-y: auto; margin: 0; padding: 0; list-style: none;
  background: #fff; border: 1px solid #bcc8c0; border-radius: 8px; box-shadow: var(--shadow);
}
.autocomplete-list:empty { display: none; }
.autocomplete-item { padding: 0.6rem 0.8rem; cursor: pointer; font-weight: 600; }
.autocomplete-item:hover, .autocomplete-item.active { background: #edf3ed; color: var(--accent-dark); }
.autocomplete-item small { display: block; color: var(--muted); font-size: 0.85rem; font-weight: 400; }
.field-full { grid-column: 1 / -1; }
.checkbox-row { display: flex; align-items: center; gap: 0.55rem; font-weight: 600; color: var(--ink); }
.checkbox-row input { width: auto; min-height: 0; }
.advanced-toggle { background: none; border: none; color: var(--accent-dark); font: inherit; font-weight: 700; cursor: pointer; padding: 0; text-decoration: underline; }
.advanced-fields { margin-top: 1rem; display: grid; gap: 1rem; }
.advanced-fields[hidden] { display: none; }
.time-row { display: flex; gap: 0.5rem; align-items: center; }
.time-row select { min-width: 0; flex: 1; }

/* Rising sign meanings grid (expandable, 12 signs) */
.sign-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; }
.sign-cell { display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 0.85rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 700; color: var(--accent-dark); text-decoration: none; }
a.sign-cell:hover { background: #edf3ed; color: var(--accent-dark); }
.sign-cell.soon { color: var(--muted); font-weight: 600; background: var(--soft); cursor: default; }
.sign-cell .sign-glyph { font-size: 1.15rem; line-height: 1; color: var(--accent); }
.sign-cell .soon-tag { margin-left: auto; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 700; }
@media (max-width: 700px) { .sign-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 400px) { .sign-grid { grid-template-columns: 1fr; } }

/* Rich footer (calculators + guides + site) */
.site-footer-rich { border-top: 0.5px solid var(--line); margin-top: 1rem; }
.footer-cols { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr 1fr; gap: 1.5rem; width: min(1120px, calc(100% - 2rem)); margin: 0 auto; padding: 2.5rem 0 1.25rem; }
.footer-brand-name { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 800; color: var(--ink); }
.footer-brand-name img { width: 26px; height: 26px; }
.footer-tagline { margin-top: 0.6rem; color: var(--muted); font-size: 0.92rem; max-width: 32ch; }
.footer-col h4 { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent-dark); margin: 0 0 0.7rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.footer-col a { color: var(--accent-dark); text-decoration: none; font-size: 0.92rem; }
.footer-col a:hover { color: var(--rose); }
.footer-bottom { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; padding: 1rem 0 2.5rem; border-top: 0.5px solid var(--line); color: var(--muted); font-size: 0.9rem; }

/* Responsive */
@media (max-width: 820px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .hero, .calculator-layout, .two-column { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .hero-visual img { width: min(260px, 70%); }
  .post-grid, .blog-index-grid, .tool-grid, .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .footer-cols { grid-template-columns: 1fr; }
  .nav { flex-direction: column; align-items: flex-start; }
  .site-footer { flex-direction: column; align-items: flex-start; }
  .brand span { white-space: normal; }
  .button { width: 100%; }
  .dropdown-menu { position: static; display: flex; box-shadow: none; border: none; padding: 0.2rem 0 0.4rem 0.8rem; min-width: 0; }
}
input.wpcf7-form-control.wpcf7-submit.has-spinner.button.primary {
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.75rem 1rem;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
