:root {
  --ink: #17201d;
  --muted: #68736e;
  --paper: #f4f1e9;
  --card: #fffdf8;
  --line: #d8d5cb;
  --green: #1f5948;
  --green-2: #2e765f;
  --orange: #e78335;
  --shadow: 0 16px 42px rgba(27, 38, 34, .1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(231, 131, 53, .1), transparent 28rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a { color: var(--green); }
button, input, select { font: inherit; }
.site-shell { max-width: 1180px; margin: 0 auto; padding: 24px 22px 50px; }
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--green);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(31, 89, 72, .25);
}
.brand-name { display: block; font-size: 25px; font-weight: 900; letter-spacing: -.04em; line-height: 1; }
.brand-tag { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.main-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.main-nav a { color: #47524d; text-decoration: none; font-size: 14px; font-weight: 750; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--green); }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 17px; flex-wrap: wrap; }
.language-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 2px solid var(--green);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(31, 89, 72, .16);
}
.language-label {
  align-self: stretch;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--orange);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.language-switcher a {
  min-width: 67px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #44504b;
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .01em;
  transition: color .15s, background .15s, transform .15s;
}
.language-switcher a:hover { background: #e8f0eb; color: var(--green); }
.language-switcher a[aria-current="true"] {
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 10px rgba(31, 89, 72, .24);
  transform: translateY(-1px);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 54px);
  border-radius: 24px;
  background: var(--green);
  color: #fff;
  box-shadow: var(--shadow);
}
.hero:after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -90px;
  top: -130px;
  border: 50px solid rgba(255, 255, 255, .06);
  border-radius: 50%;
}
.hero h1 { max-width: 760px; margin: 0 0 14px; font-size: clamp(34px, 6vw, 58px); line-height: 1.02; letter-spacing: -.055em; }
.hero p { max-width: 720px; margin: 0; color: rgba(255, 255, 255, .8); font-size: 17px; }
.eyebrow {
  margin: 0 0 9px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.hero .eyebrow { color: #ffb579; }
.hero-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 10px 17px;
  border: 0;
  border-radius: 11px;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  font-weight: 850;
  cursor: pointer;
}
.button-light { background: #fff; color: var(--green); }
.button-ghost { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25); }

.section { margin-top: 42px; }
.section-heading { max-width: 760px; margin-bottom: 18px; }
.section-heading h2, .article h2 { margin: 0 0 8px; font-size: clamp(25px, 4vw, 36px); line-height: 1.15; letter-spacing: -.035em; }
.section-heading p { margin: 0; color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.card {
  padding: 21px;
  border: 1px solid rgba(216, 213, 203, .9);
  border-radius: 17px;
  background: rgba(255, 253, 248, .9);
  box-shadow: 0 8px 24px rgba(27, 38, 34, .05);
}
.card h3 { margin: 0 0 7px; font-size: 19px; letter-spacing: -.02em; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.card-link { display: block; color: inherit; text-decoration: none; transition: transform .16s, box-shadow .16s; }
.card-link:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-kicker { margin-bottom: 12px; color: var(--orange); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; }

.calculator {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(216, 213, 203, .9);
  border-radius: 20px;
  background: rgba(255, 253, 248, .94);
  box-shadow: var(--shadow);
}
.calc-toolbar { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 22px; }
.calc-toolbar .select-block { flex: 1; max-width: 430px; }
.unit-toggle { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: #f5f3ec; }
.unit-toggle button { padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 800; cursor: pointer; }
.unit-toggle button.active { background: var(--green); color: #fff; }
.calc-head { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 18px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.calc-head h2 { margin: 0 0 5px; font-size: 27px; line-height: 1.15; letter-spacing: -.03em; }
.calc-head p { margin: 0; color: var(--muted); font-size: 14px; }
.formula { align-self: flex-start; white-space: nowrap; padding: 6px 11px; border-radius: 999px; background: #e6efe9; color: var(--green); font-size: 12px; font-weight: 800; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field-wide { grid-column: 1 / -1; }
label { display: block; margin-bottom: 7px; color: #4d5954; font-size: 12px; font-weight: 850; }
.input-wrap { position: relative; }
input, select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
input { padding-right: 58px; }
input:focus, select:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(46, 118, 95, .12); }
.suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; pointer-events: none; }
.calc-actions { display: flex; gap: 10px; margin-top: 18px; }
.calc-actions .button { flex: 1; }
.reset { border: 0; border-radius: 11px; padding: 10px 17px; background: #ebe8df; color: var(--ink); font-weight: 800; cursor: pointer; }
.results { display: none; margin-top: 22px; overflow: hidden; border: 1px solid #c8d8d0; border-radius: 17px; background: #edf5f0; }
.results.show { display: block; }
.result-main { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 20px 22px 16px; }
.result-label { color: var(--green); font-size: 11px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.result-value { margin-top: 3px; color: var(--green); font-size: clamp(29px, 5vw, 42px); font-weight: 900; letter-spacing: -.05em; line-height: 1.1; }
.result-sub { max-width: 310px; color: #4f665d; text-align: right; font-size: 13px; }
.breakdown { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 12px 22px; border-top: 1px solid #c8d8d0; color: #53645d; font-size: 12px; }
.breakdown strong { color: var(--ink); }
.notice { margin-top: 17px; padding: 13px 15px; border-left: 4px solid var(--orange); border-radius: 8px; background: #fff7ec; color: #66594d; font-size: 13px; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 25px; margin-top: 26px; }
.article {
  padding: clamp(22px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
}
.article h1 { margin: 0 0 12px; font-size: clamp(31px, 5vw, 48px); line-height: 1.05; letter-spacing: -.045em; }
.article h2 { margin-top: 34px; }
.article h3 { margin: 26px 0 5px; font-size: 20px; }
.article p, .article li { color: #48534e; }
.article .lead { color: #34413c; font-size: 18px; }
.article table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; }
.article th, .article td { padding: 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.article th { background: #edf2ee; }
.formula-box { margin: 20px 0; padding: 18px; border-radius: 13px; background: #e8f0eb; color: var(--green); font-weight: 850; }
.example { padding: 18px; border-radius: 13px; background: #f4efe5; }
.sidebar-box { position: sticky; top: 20px; align-self: start; padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: var(--card); }
.sidebar-box h2 { margin: 0 0 10px; font-size: 18px; }
.sidebar-box a { display: block; padding: 7px 0; border-bottom: 1px solid #ece9e0; text-decoration: none; font-size: 14px; font-weight: 720; }

.trust-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; }
.trust-item { padding: 15px; border-radius: 13px; background: #e8eee9; text-align: center; font-size: 13px; font-weight: 800; color: var(--green); }
.site-footer { margin-top: 44px; padding-top: 27px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; }
.site-footer h2 { margin: 0 0 8px; font-size: 18px; }
.site-footer p { margin: 0; color: var(--muted); font-size: 13px; }
.footer-links a { display: block; margin: 5px 0; color: #52605a; font-size: 13px; text-decoration: none; }
.copyright { margin-top: 22px; color: #7d8581; font-size: 11px; }
.policy-date { color: var(--muted); font-size: 13px; }
.contact-card { max-width: 700px; padding: 22px; border-radius: 16px; background: #e8f0eb; }

@media (max-width: 850px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-layout { grid-template-columns: 1fr; }
  .sidebar-box { position: static; }
}

@media (max-width: 680px) {
  .site-shell { padding: 17px 13px 35px; }
  .site-header { align-items: flex-start; flex-direction: column; }
  .brand-tag { display: none; }
  .header-actions { width: 100%; gap: 10px; justify-content: flex-start; }
  .main-nav { width: 100%; justify-content: flex-start; gap: 11px; }
  .main-nav a { font-size: 12px; }
  .language-switcher {
    width: 100%;
    justify-content: center;
  }
  .language-label { padding: 0 8px; }
  .language-switcher a { min-width: 0; flex: 1; padding: 8px 6px; font-size: 12px; }
  .hero { border-radius: 18px; }
  .card-grid, .trust-strip, .footer-grid { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .calc-toolbar, .calc-head, .result-main { align-items: stretch; flex-direction: column; }
  .result-sub { text-align: left; }
  .formula { white-space: normal; }
}
