:root {
  --green: #0f6b45;
  --green-dark: #0b4f33;
  --green-deep: #083826;
  --green-soft: #e7f3ec;
  --gold: #c8a446;
  --ink: #14211a;
  --muted: #3e5147;
  --line: #e3ebe6;
  --card: #ffffff;
  --bg: #ffffff;
  --shadow: 0 12px 32px rgba(11, 79, 51, 0.08);
  --header-h: 72px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Manrope", "Noto Sans", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; height: auto; }

:focus { outline: none; }

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--green);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  background: var(--green);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 10px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--green-dark);
  color: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.header-inner {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
  min-height: 44px;
  min-width: 0;
}

.logo img {
  display: block;
  height: 56px;
  width: auto;
}

.nav-toggle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.site-nav { display: none; }

.site-nav.is-open {
  display: grid;
  gap: 4px;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  color: var(--ink);
  padding: 8px 16px 14px;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 30px rgba(11, 79, 51, 0.12);
}

.tools-toggle,
.site-nav > a {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.tools-panel { display: none; }

@media (max-width: 879px) {
  .site-nav.is-open .tools-panel {
    display: grid;
    position: static;
    width: auto;
    min-width: 0;
    padding: 0 0 4px 8px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
}

.tools-panel a {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--green-dark);
  text-decoration: none;
  font-weight: 700;
}

.site-nav a[aria-current="page"],
.tools-panel a[aria-current="page"] {
  background: var(--green-soft);
  color: var(--green-dark);
}

.ad-bar {
  background: #f6faf8;
  border-bottom: 1px solid var(--line);
}

.ad-bar-inner {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0;
  display: flex;
  justify-content: center;
}

.ad-slot { width: min(420px, 100%); }

.ad-slot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.ad-caption {
  margin-top: 6px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}

.ad-caption a {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

.ad-caption a:hover { text-decoration: underline; }

.container {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.hero { margin-bottom: 8px; }

.hero h1,
.container > header h1,
.article-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.55rem, 4.4vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--green-dark);
  font-weight: 800;
}

.hero p,
p.subtitle,
.meta {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.meta { font-size: 0.9rem; margin-bottom: 8px; }

.container > header { margin-bottom: 18px; }

.powered-by {
  display: inline;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: lowercase;
  color: var(--muted);
  margin: 0 6px 0 0;
  text-shadow: none;
}

.powered-by::before {
  content: "";
  display: block;
  height: 2px;
}

.brand-text {
  color: var(--green);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  text-shadow: none;
  white-space: nowrap;
}

.section-title {
  margin: 26px 0 12px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  color: var(--green-dark);
}

.container > .section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.container > .section-title::before {
  content: "";
  width: 22px;
  height: 3px;
  border-radius: 99px;
  background: var(--gold);
  flex: none;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.tool-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 100%;
}

.tool-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
}

.tool-icon svg { display: block; }

.tool-card h3,
.article-item h3,
.card h3 {
  margin: 12px 0 6px;
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--green-dark);
}

.tool-card p,
.article-item p,
.card p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
}

.tool-card p { flex: 1; }

.card > a,
.article-item > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px 0 16px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.card > a::after,
.article-item > a::after {
  content: "";
  width: 22px;
  height: 22px;
  flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='11' fill='%23c8a446'/%3E%3Cpath d='M8.2 6.6 13.4 11 8.2 15.4' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}

.card > a:hover,
.article-item > a:hover { background: var(--green-deep); }

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.breadcrumbs a {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.breadcrumbs a:hover { text-decoration: underline; }

.article-list { display: grid; gap: 12px; }

.article-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: #f8fbf9;
}

.article-hero { margin-bottom: 8px; }

.content {
  font-size: 1.05rem;
  line-height: 1.75;
}

.content h2,
.card h2 {
  color: var(--green-dark);
  font-size: 1.28rem;
  line-height: 1.3;
  margin: 1.5em 0 0.45em;
}

.content h3 {
  color: var(--green);
  font-size: 1.08rem;
  margin: 1.2em 0 0.35em;
}

.content p,
.card p { margin: 0 0 0.9em; }

.content ul,
.content ol,
.steps {
  margin: 0.4em 0 1em;
  padding-left: 1.2rem;
}

.content li,
.steps li { margin: 0.35em 0; }

.content li::marker,
.steps li::marker { color: var(--green); }

.content a,
.inline-link,
.source-list a,
.subtitle a,
.container > header a {
  color: var(--green);
  font-weight: 700;
}

.content a:hover,
.inline-link:hover,
.source-list a:hover { text-decoration: underline; }

.note,
.disclaimer {
  margin-top: 16px;
  padding: 14px 16px;
  border-left: 4px solid #b7791f;
  background: #fff8ec;
  color: #5c3b12;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.6;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

input:not([type="checkbox"]),
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #c9dbd2;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

textarea { min-height: 140px; resize: vertical; }

input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--green);
}

.field { margin-bottom: 16px; }

.hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.45;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-top: 8px;
  font-weight: 600;
  color: var(--muted);
}

button {
  font: inherit;
  font-weight: 700;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--green);
  background: #fff;
  color: var(--green-dark);
  cursor: pointer;
}

button:hover { background: var(--green-soft); }

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

button[type="submit"],
.modal button {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  width: 100%;
}

button[type="submit"]:hover,
.modal button:hover { background: var(--green-deep); }

.contact-section form { display: grid; gap: 12px; }

.contact-section h2 { margin-top: 0; }

.suggestions {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-top: 6px;
  background: #fff;
  display: none;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.suggestions button {
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #f1f5f2;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  min-height: 44px;
}

.suggestions button:hover { background: var(--green-soft); }

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 6px 10px 6px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f4f8f6;
  font-weight: 800;
}

.price-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.source-list {
  margin: 8px 0 0 18px;
  padding: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.source-list li { margin-bottom: 6px; }

.source-list a { min-height: 44px; display: inline-flex; align-items: center; }

.results { display: grid; gap: 10px; }

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f4f8f6;
  border: 1px solid #e7f0eb;
}

.result-row strong { font-size: 0.95rem; }

.value {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  white-space: nowrap;
}

.card:has(#results-title) {
  position: relative;
  background: linear-gradient(165deg, #12784d 0%, #0b4f33 70%);
  color: #fff;
  border-color: transparent;
  overflow: hidden;
}

.card:has(#results-title)::before {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 56px;
  height: 56px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='28' fill='none' stroke='%23ffffff' stroke-opacity='0.28' stroke-width='4'/%3E%3Cpath d='M16 44 L27 31 L35 37 L49 20' fill='none' stroke='%23ffffff' stroke-width='4.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
  pointer-events: none;
}

#results-title {
  color: #fff;
  padding-right: 68px;
  margin-top: 0;
}

.card:has(#results-title) .result-row {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.card:has(#results-title) .value,
.card:has(#results-title) .result-row strong { color: #fff; }

.card:has(#results-title) .result-row:has(#monthlyPayment),
.card:has(#results-title) .result-row:has(#netAfterTax),
.card:has(#results-title) .result-row:has(#breakEvenAfterTax),
.card:has(#results-title) .result-row:has(#allowanceAmount) {
  display: block;
  background: rgba(255, 255, 255, 0.14);
  padding: 14px 16px 16px;
}

#monthlyPayment,
#netAfterTax,
#breakEvenAfterTax,
#allowanceAmount {
  display: block;
  margin-top: 4px;
  font-size: clamp(1.7rem, 5vw, 2.25rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

#allowanceAmount { white-space: normal; }

.card:has(#results-title) .hint,
.card:has(#results-title) .steps,
.card:has(#results-title) footer {
  color: rgba(255, 255, 255, 0.9);
}

.card:has(#results-title) .steps li::marker { color: var(--gold); }

.card:has(#results-title) .disclaimer {
  background: #fff;
  color: var(--ink);
  position: relative;
}

.card:has(#results-title) h3.section-title {
  color: #fff;
  margin-top: 18px;
}

.site-footer {
  background: var(--green-dark);
  color: #e7f4ed;
  padding: 28px 16px 36px;
  text-align: center;
  font-size: 0.9rem;
}

.site-footer div:nth-child(2) {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 8px;
}

.site-footer a:hover { text-decoration: underline; }

.footer-disclaimer {
  margin: 8px auto 0;
  max-width: 40rem;
  color: #d5ebe1;
  font-size: 0.8rem;
  line-height: 1.5;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 30, 20, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 80;
}

.modal {
  max-width: 480px;
  width: 100%;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 24px 50px rgba(8, 30, 20, 0.28);
}

.modal h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  color: var(--green-dark);
}

.modal p {
  margin: 0 0 14px;
  color: var(--ink);
  line-height: 1.55;
}

@media (min-width: 720px) {
  .grid:has(> .card > h3),
  .grid:has(> .tool-card) {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

/* The Greek subline drops below a readable size once the lockup is squeezed
   under the menu button. Keep the monogram tile and FINANCE TOOLS. */
@media (max-width: 344px) {
  .logo img {
    height: 46px;
    clip-path: polygon(0 0, 100% 0, 100% 54%, 22% 54%, 22% 100%, 0 100%);
  }
}

@media (min-width: 880px) {
  :root { --header-h: 84px; }

  .logo img {
    height: 68px;
    clip-path: none;
  }

  .nav-toggle { display: none; }

  .site-nav,
  .site-nav.is-open {
    display: flex;
    align-items: center;
    gap: 4px;
    position: static;
    transform: none;
    width: auto;
    background: transparent;
    color: #fff;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .tools-toggle,
  .site-nav > a {
    width: auto;
    color: #fff;
    min-height: 44px;
  }

  .site-nav > a:hover,
  .tools-toggle:hover,
  .site-nav > a[aria-current="page"] {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
  }

  .tools-menu { position: relative; }

  .tools-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    min-width: 240px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(11, 79, 51, 0.14);
    z-index: 40;
  }

  .tools-menu.is-open .tools-panel,
  .tools-menu:hover .tools-panel,
  .tools-menu:focus-within .tools-panel {
    display: grid;
  }

  .tools-panel a { color: var(--green-dark); }
  .tools-panel a:hover,
  .tools-panel a[aria-current="page"] {
    background: var(--green-soft);
    color: var(--green-dark);
  }

  .grid:has(> .card .field) {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    align-items: start;
  }

  .grid:has(> .card .field) > .card:has(#results-title) {
    position: sticky;
    top: 88px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
