/* Shell, form controls, and ledger pieces. Page layout stays in Tailwind. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

body {
  margin: 0;
  padding-top: 4.25rem;
  background: #f8fbf9;
  color: #1d2a24;
  font-family: "Public Sans", "Segoe UI", Arial, sans-serif;
}

::selection {
  background: #1b7f54;
  color: #ffffff;
}

.wrap {
  width: min(80rem, 100%);
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 640px) {
  .wrap {
    padding-inline: 1.5rem;
  }
}

.icon {
  width: 1.5rem;
  height: 1.5rem;
}

.icon-sm {
  width: 1.15rem;
  height: 1.15rem;
}

.topbar {
  width: 100%;
}

.bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4.25rem;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: #e1f2e8;
  padding: 0.4rem;
  color: #14663f;
}

.brand-name {
  overflow: hidden;
  font-family: Archivo, "Arial Black", Arial, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.025em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nav-desktop {
  display: none;
}

.nav-cta {
  display: none !important;
}

.nav-desktop {
  margin-left: auto;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 9999px;
  color: #43524a;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.nav-link[aria-current="page"] {
  background: #1b7f54;
  color: #ffffff;
}

.menu-btn {
  margin-left: auto;
  display: flex;
  flex-shrink: 0;
  border: 2px solid #1d2a24;
  border-radius: 9999px;
  background: transparent;
  color: #1d2a24;
  padding: 0.4rem;
  cursor: pointer;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  border-top: 1px solid #d5e2db;
  background: #ffffff;
  padding: 0.5rem 1rem 1rem;
}

.nav-mobile.is-open {
  display: flex;
}

.nav-mobile .nav-link {
  padding: 0.75rem 0.25rem;
  border-bottom: 1px solid #d5e2db;
  border-radius: 0;
}

@media (min-width: 960px) {
  .nav-desktop {
    display: inline-flex;
  }

  .nav-cta {
    display: inline-flex !important;
  }

  .menu-btn,
  .nav-mobile {
    display: none !important;
  }
}

.btn,
.btn-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 1.35rem;
  border-radius: 9999px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
}

.btn {
  border: none;
  background: #1b7f54;
  color: #ffffff;
}

.btn-line {
  border: 2px solid #1d2a24;
  background: transparent;
  color: #1d2a24;
}

.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
}

.brand:focus-visible,
.nav-link:focus-visible,
.menu-btn:focus-visible,
.btn:focus-visible,
.btn-line:focus-visible,
.field:focus-visible,
.cat-btn:focus-visible {
  outline: 3px solid #1b7f54;
  outline-offset: 2px;
}

.prefooter {
  background: #edf3f0;
  border-top: 1px solid #d5e2db;
}

.prefooter-grid,
.footer-grid {
  display: grid;
  gap: 1.75rem;
}

.prefooter-grid {
  padding-block: 3.5rem;
}

.prefooter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-footer {
  background: #ffffff;
  border-top: 1px solid #d5e2db;
}

.footer-grid {
  padding-block: 2.5rem 1.25rem;
  font-size: 0.95rem;
}

.footer-title {
  font-weight: 700;
  margin-bottom: 0.55rem;
}

.footer-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-list li + li {
  margin-top: 0.35rem;
}

.footer-list a,
.link {
  color: inherit;
  text-underline-offset: 0.15em;
}

.legal {
  padding-bottom: 2rem;
  font-size: 0.8rem;
  color: #617068;
}

@media (min-width: 768px) {
  .prefooter-grid {
    grid-template-columns: 1.5fr 0.9fr;
    align-items: center;
  }

  .prefooter-actions {
    justify-content: flex-end;
  }

  .footer-grid {
    grid-template-columns: 1.3fr 0.7fr 1.1fr;
  }
}

.field {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  border: 1px solid #d5e2db;
  border-radius: 0.75rem;
  background: #ffffff;
  color: #1d2a24;
  padding: 0.65rem 0.85rem;
  font: inherit;
}

.cat-btn {
  border: 2px solid #d5e2db;
  border-radius: 9999px;
  background: #ffffff;
  color: #43524a;
  padding: 0.4rem 0.85rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.cat-btn[aria-pressed="true"]:not(:disabled) {
  background: #1b7f54;
  border-color: #1b7f54;
  color: #ffffff;
}

.cat-btn:disabled {
  opacity: 1;
  cursor: default;
}

.form-error {
  margin-top: 0.25rem;
  color: #b83a3a;
  font-size: 0.875rem;
}

.form-ok {
  border-left: 4px solid #1b7f54;
  background: #e1f2e8;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
}

.calc-grid {
  display: grid;
  gap: 1rem;
  text-align: left;
}

@media (min-width: 640px) {
  .calc-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.calc-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
}

.ledger {
  margin-top: 1.25rem;
  border: 1px solid #d5e2db;
  border-radius: 0.75rem;
  background: #ffffff;
  overflow: hidden;
}

.ledger-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1rem;
  border-top: 1px solid #d5e2db;
}

.ledger-row:first-child {
  border-top: 0;
}

.ledger-row dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
}

.ledger-row.is-strong {
  font-weight: 700;
  font-size: 1.125rem;
  background: #e1f2e8;
}

.calc-error {
  border-left: 4px solid #b83a3a;
  background: #fce4e1;
  padding: 0.75rem 1rem;
  border-radius: 0 0.5rem 0.5rem 0;
}

.calc-note {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: #43524a;
}

.guide,
.jump {
  scroll-margin-top: 5.4rem;
}

@media (min-width: 1024px) {
  .guide-ref-sidebar {
    position: sticky;
    top: 5.4rem;
    align-self: start;
  }
}

.guide-card {
  min-height: 100%;
}

.guide-card-link {
  color: #14663f;
  font-weight: 700;
  text-decoration: none;
}

.guide-card-link:hover {
  opacity: 1;
}

.page-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 18rem;
  padding-block: 3rem;
}

@media (min-width: 768px) {
  .page-hero {
    min-height: 22rem;
    padding-block: 4rem;
  }
}

.page-hero-bg {
  pointer-events: none;
}

.page-hero-shade {
  background: rgba(29, 42, 36, 0.72);
}
