*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --forest: #2D6A4F;
  --sage: #52B788;
  --bg: #FAFAFA;
  --text: #1A1A1A;
  --muted: #666666;
  --border: #E0E0E0;
  --white: #FFFFFF;
  --footer-bg: #1A2744;
  --badge-bg: #E8F5EE;
}

html { font-size: 16px; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 52px;
}
.nav-logo {
  font-size: 0.95rem; font-weight: 700;
  color: var(--forest); text-decoration: none;
  letter-spacing: -0.01em;
}
.nav-logo span { color: var(--text); font-weight: 400; }
.nav-links { display: flex; align-items: center; gap: 0; list-style: none; }
.nav-links a {
  font-size: 0.82rem; font-weight: 500;
  color: var(--muted); text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--forest); background: var(--badge-bg); }
.nav-links .nav-cta {
  background: var(--forest); color: var(--white);
  margin-left: 0.5rem; padding: 0.35rem 0.9rem;
}
.nav-links .nav-cta:hover { background: #235c43; color: var(--white); }
.nav-links .nav-cta-outline {
  border: 1.5px solid var(--forest); color: var(--forest);
  margin-left: 0.5rem; padding: 0.35rem 0.9rem;
}
.nav-links .nav-cta-outline:hover { background: var(--badge-bg); color: var(--forest); }

/* ── MODALS ── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.5); align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white); border-radius: 10px;
  padding: 2rem; width: 100%; max-width: 440px; margin: 1rem;
  position: relative;
}
.modal h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.4rem; color: var(--text); }
.modal p { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.25rem; }
.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; cursor: pointer;
  font-size: 1.25rem; color: var(--muted); line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal form { display: flex; flex-direction: column; gap: 0.75rem; }
.modal input, .modal textarea {
  width: 100%; padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--border); border-radius: 6px;
  font-family: 'Inter', sans-serif; font-size: 0.9rem; color: var(--text);
  outline: none; background: var(--bg);
  transition: border-color 0.15s;
}
.modal input:focus, .modal textarea:focus { border-color: var(--sage); }
.modal textarea { min-height: 110px; resize: vertical; }
.modal-submit {
  background: var(--forest); color: var(--white); border: none;
  padding: 0.7rem 1.25rem; border-radius: 6px; cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 0.9rem; font-weight: 600;
  transition: background 0.15s; align-self: flex-start;
}
.modal-submit:hover { background: #235c43; }
.modal-success {
  display: none; text-align: center; padding: 1rem 0;
  color: var(--forest); font-weight: 600; font-size: 0.95rem;
}

/* ── SEARCH HERO ── */
.search-hero {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 2rem 2rem 1.75rem;
}
.search-hero-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 1rem;
}
.search-hero h1 {
  font-size: 1.15rem; font-weight: 600;
  color: var(--text); line-height: 1.35;
}
.search-hero h1 em { font-style: normal; color: var(--forest); }
.search-bar {
  display: flex; align-items: center;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 6px; overflow: hidden;
  max-width: 620px;
  transition: border-color 0.15s;
}
.search-bar:focus-within { border-color: var(--sage); }
.search-icon {
  padding: 0 0.75rem;
  color: var(--muted); display: flex; align-items: center; flex-shrink: 0;
}
.search-bar input {
  flex: 1; border: none; background: transparent;
  padding: 0.7rem 0.5rem;
  font-family: 'Inter', sans-serif; font-size: 0.9rem; color: var(--text); outline: none;
}
.search-bar input::placeholder { color: #AAAAAA; }
.search-bar button {
  background: var(--forest); border: none;
  padding: 0.7rem 1.1rem; cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 0.82rem; font-weight: 600;
  color: var(--white); white-space: nowrap; transition: background 0.15s;
}
.search-bar button:hover { background: #235c43; }

/* ── LAYOUT ── */
.layout {
  max-width: 1100px; margin: 0 auto;
  padding: 2rem 2rem;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: start;
}

/* ── SIDEBAR ── */
.sidebar { position: sticky; top: 72px; }
.sidebar-section { margin-bottom: 1.75rem; }
.sidebar-heading {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.6rem;
  padding-bottom: 0.5rem; border-bottom: 1px solid var(--border);
}

.topic-list { list-style: none; display: flex; flex-direction: column; gap: 0.2rem; }
.topic-item a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.45rem 0.65rem; border-radius: 5px;
  text-decoration: none; color: var(--text);
  font-size: 0.875rem; font-weight: 400;
  transition: background 0.12s, color 0.12s; cursor: pointer;
}
.topic-item a:hover { background: var(--badge-bg); color: var(--forest); }
.topic-item a.active { background: var(--badge-bg); color: var(--forest); font-weight: 600; }
.topic-badge {
  font-size: 0.72rem; font-weight: 600;
  background: var(--border); color: var(--muted);
  padding: 0.15rem 0.45rem; border-radius: 999px;
  min-width: 22px; text-align: center;
}
.topic-item a:hover .topic-badge,
.topic-item a.active .topic-badge { background: var(--sage); color: var(--white); }

.asked-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.asked-list a {
  font-size: 0.82rem; color: var(--muted); text-decoration: none;
  line-height: 1.45; display: block;
  padding: 0.3rem 0; border-left: 2px solid transparent; padding-left: 0.6rem;
  transition: color 0.12s, border-color 0.12s;
}
.asked-list a:hover { color: var(--forest); border-left-color: var(--sage); }

/* ── MAIN CONTENT ── */
.content-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem;
}
.content-header h2 {
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.content-header .q-count { font-size: 0.8rem; color: var(--muted); }
.content-divider { height: 1px; background: var(--border); margin-bottom: 1.25rem; }

/* ── QUESTION CARDS ── */
.q-cards { display: flex; flex-direction: column; gap: 0.85rem; }
.q-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 8px;
  padding: 1.25rem 1.4rem; text-decoration: none; color: inherit; display: block;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.q-card:hover { border-color: var(--sage); box-shadow: 0 2px 12px rgba(45,106,79,0.09); }
.q-card-top { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.55rem; }
.q-badge {
  display: inline-flex; align-items: center;
  background: var(--badge-bg); color: var(--forest);
  font-size: 0.72rem; font-weight: 600;
  padding: 0.2rem 0.6rem; border-radius: 4px; white-space: nowrap;
}
.q-card h3 {
  font-size: 1.0rem; font-weight: 600; color: var(--text);
  line-height: 1.4; margin-bottom: 0.45rem;
}
.q-card:hover h3 { color: var(--forest); }
.q-excerpt { font-size: 0.85rem; color: var(--muted); line-height: 1.55; margin-bottom: 0.65rem; }
.q-footer { display: flex; align-items: center; justify-content: space-between; }
.read-link { font-size: 0.8rem; font-weight: 600; color: var(--forest); }
.q-card:hover .read-link { text-decoration: underline; }

.no-results {
  display: none; padding: 2rem; text-align: center;
  color: var(--muted); font-size: 0.9rem;
  background: var(--white); border: 1px solid var(--border); border-radius: 8px;
}

/* ── ABOUT / STANDARD PAGE ── */
.page-content { max-width: 720px; margin: 0 auto; padding: 4rem 2rem; }
.page-tag {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--forest); margin-bottom: 1rem;
}
.page-content h1 {
  font-size: 2.2rem; font-weight: 700;
  line-height: 1.25; margin-bottom: 2rem; color: var(--text);
}
.body-text p { font-size: 1.05rem; line-height: 1.8; color: var(--text); margin-bottom: 1.25rem; }
.body-text p:last-child { margin-bottom: 0; }

/* ── QA ARTICLE PAGES ── */
.qa-header {
  background: var(--forest); color: var(--bg);
  padding: 4rem 2rem 3rem;
}
.qa-header-inner { max-width: 760px; margin: 0 auto; }
.qa-tag {
  display: inline-block;
  background: rgba(250,250,250,0.15); color: var(--bg);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; border-radius: 4px;
  padding: 0.3rem 0.7rem; margin-bottom: 1.25rem;
}
.qa-header h1 {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 600; line-height: 1.3;
  font-style: italic; color: var(--bg);
}
.qa-body { max-width: 760px; margin: 0 auto; padding: 3.5rem 2rem 4rem; }
.qa-body p { font-size: 1.05rem; line-height: 1.8; margin-bottom: 1.25rem; color: var(--text); }
.qa-body h2 {
  font-family: 'Inter', sans-serif;
  font-size: 1rem; font-weight: 600;
  margin-top: 2rem; margin-bottom: 0.65rem;
  color: var(--forest);
}
.qa-body ul { margin: 0.5rem 0 1.25rem 1.5rem; }
.qa-body ul li { font-size: 1.05rem; line-height: 1.75; margin-bottom: 0.4rem; }
.qa-body ol { margin: 0.5rem 0 1.25rem 1.5rem; }
.qa-body ol li { font-size: 1.05rem; line-height: 1.75; margin-bottom: 0.75rem; }
.back-link {
  display: inline-block; margin-bottom: 2rem;
  font-size: 0.9rem; font-weight: 500;
  color: var(--forest); text-decoration: none;
}
.back-link:hover { text-decoration: underline; }

/* ── FOOTER ── */
footer {
  background: var(--footer-bg); color: rgba(255,255,255,0.65);
  padding: 2rem 2rem; font-size: 0.84rem; margin-top: 2rem;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.75rem;
}
.footer-brand { color: var(--white); font-weight: 600; font-size: 0.9rem; }
.footer-tagline { color: rgba(255,255,255,0.5); font-size: 0.8rem; margin-top: 0.2rem; }
.footer-copy { font-size: 0.78rem; }

/* ── RESPONSIVE ── */
@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; padding: 1.25rem 1rem; }
  .sidebar { position: static; }
  .topic-list { flex-direction: row; flex-wrap: wrap; gap: 0.4rem; }
  .topic-item a { padding: 0.35rem 0.65rem; font-size: 0.8rem; }
  .asked-list { display: none; }
  nav { padding: 0 1rem; }
  .search-hero { padding: 1.25rem 1rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 768px) {
  .qa-header { padding: 3rem 1.25rem 2.5rem; }
  .qa-body { padding: 2.5rem 1.25rem 3rem; }
  .page-content { padding: 2.5rem 1.25rem; }
  .page-content h1 { font-size: 1.65rem; }
}
@media (max-width: 480px) {
  .nav-links .nav-cta, .nav-links .nav-cta-outline { display: none; }
}
