:root {
  --ink: #263044;
  --muted: #697287;
  --paper: #f7f5fb;
  --card: #ffffff;
  --line: #ddd9e8;
  --purple: #6554a4;
  --purple-dark: #4c3d86;
  --lavender: #eeeafb;
  --peach: #f3a980;
  --mint: #dff1e9;
  --shadow: 0 18px 50px rgba(53, 44, 88, .11);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 5% 0%, rgba(243, 169, 128, .16), transparent 26rem),
    radial-gradient(circle at 95% 10%, rgba(101, 84, 164, .12), transparent 30rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a { color: var(--purple-dark); }
button, input, select { font: inherit; }
.shell { width: min(1160px, calc(100% - 28px)); margin: 0 auto; }
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 0;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark {
  width: 47px; height: 47px; display: grid; place-items: center;
  border-radius: 15px; background: var(--purple); color: #fff;
  font-weight: 900; font-size: 21px; box-shadow: 0 8px 20px rgba(101, 84, 164, .27);
}
.brand-name { display: block; font-size: 21px; line-height: 1.1; font-weight: 900; letter-spacing: -.035em; }
.brand-tag { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.main-nav { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.main-nav a { color: #555d70; text-decoration: none; font-size: 13px; font-weight: 800; }
.main-nav a:hover { color: var(--purple); }

.hero {
  position: relative; overflow: hidden; padding: clamp(34px, 6vw, 66px);
  border-radius: 28px; color: #fff;
  background: linear-gradient(135deg, var(--purple-dark), #7766bb);
  box-shadow: var(--shadow);
}
.hero:after {
  content: ""; position: absolute; right: -80px; top: -130px;
  width: 300px; height: 300px; border: 52px solid rgba(255,255,255,.07); border-radius: 50%;
}
.eyebrow { margin: 0 0 8px; color: var(--peach); font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.hero .eyebrow { color: #ffd1b6; }
.hero h1 { max-width: 770px; margin: 0 0 15px; font-size: clamp(36px, 6vw, 62px); line-height: 1.01; letter-spacing: -.055em; }
.hero p { max-width: 720px; margin: 0; color: rgba(255,255,255,.82); font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.button {
  display: inline-flex; justify-content: center; align-items: center;
  min-height: 46px; padding: 10px 18px; border: 0; border-radius: 12px;
  background: var(--purple); color: #fff; text-decoration: none; font-weight: 850; cursor: pointer;
}
.button-light { background: #fff; color: var(--purple-dark); }
.button-ghost { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); }

.safety-banner {
  display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; padding: 15px 17px;
  border: 1px solid #e8ceb8; border-radius: 14px; background: #fff8f2; color: #655648; font-size: 13px;
}
.safety-banner strong { color: #8b4e2f; }
.section { margin-top: 46px; }
.section-heading { max-width: 780px; margin-bottom: 20px; }
.section-heading h2, .article h2 { margin: 0 0 8px; font-size: clamp(26px, 4vw, 38px); line-height: 1.14; letter-spacing: -.04em; }
.section-heading p { margin: 0; color: var(--muted); }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tool-card, .content-card {
  padding: 23px; border: 1px solid var(--line); border-radius: 19px;
  background: rgba(255,255,255,.9); box-shadow: 0 8px 25px rgba(53,44,88,.055);
}
.tool-card { display: block; color: inherit; text-decoration: none; transition: transform .16s, box-shadow .16s; }
.tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tool-number {
  display: grid; place-items: center; width: 35px; height: 35px; margin-bottom: 14px;
  border-radius: 11px; background: var(--lavender); color: var(--purple); font-weight: 900;
}
.tool-card h3, .content-card h3 { margin: 0 0 7px; font-size: 20px; letter-spacing: -.025em; }
.tool-card p, .content-card p { margin: 0; color: var(--muted); font-size: 14px; }

.calculator {
  padding: clamp(22px, 4vw, 35px); border: 1px solid var(--line);
  border-radius: 21px; background: rgba(255,255,255,.95); box-shadow: var(--shadow);
}
.tool-tabs { display: flex; gap: 7px; padding-bottom: 18px; margin-bottom: 22px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tool-tabs button {
  white-space: nowrap; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--muted); font-size: 12px; font-weight: 850; cursor: pointer;
}
.tool-tabs button.active { border-color: var(--purple); background: var(--purple); color: #fff; }
.calc-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.calc-head h2 { margin: 0 0 5px; font-size: 28px; line-height: 1.12; letter-spacing: -.035em; }
.calc-head p { margin: 0; color: var(--muted); font-size: 14px; }
.guidance-pill {
  align-self: flex-start; white-space: nowrap; padding: 7px 11px;
  border-radius: 999px; background: var(--lavender); color: var(--purple-dark); font-size: 11px; font-weight: 850;
}
.fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.wide { grid-column: 1 / -1; }
label { display: block; margin-bottom: 7px; color: #51596d; font-size: 12px; font-weight: 850; }
input, select {
  width: 100%; height: 49px; padding: 0 13px; border: 1px solid var(--line);
  border-radius: 11px; background: #fff; color: var(--ink); outline: none;
}
input:focus, select:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(101,84,164,.12); }
.hint { margin-top: 6px; color: var(--muted); font-size: 11px; }
.calc-actions { display: flex; gap: 10px; margin-top: 18px; }
.calc-actions .button { flex: 1; }
.reset { padding: 10px 17px; border: 0; border-radius: 11px; background: #ece9f2; color: var(--ink); font-weight: 800; cursor: pointer; }
.results { display: none; margin-top: 22px; overflow: hidden; border: 1px solid #cddfd6; border-radius: 17px; background: #edf8f2; }
.results.show { display: block; }
.result-top { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 21px 22px 17px; }
.result-label { color: #347357; font-size: 11px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.result-value { margin-top: 4px; color: #2e6b51; font-size: clamp(28px,5vw,43px); line-height: 1.08; font-weight: 900; letter-spacing: -.045em; }
.result-note { max-width: 360px; color: #4d6d5e; text-align: right; font-size: 13px; }
.result-details { padding: 14px 22px; border-top: 1px solid #cddfd6; color: #52675d; font-size: 13px; }
.schedule-table { width: 100%; border-collapse: collapse; margin-top: 5px; }
.schedule-table th, .schedule-table td { padding: 9px 8px; border-bottom: 1px solid #dbe9e1; text-align: left; font-size: 13px; }
.schedule-table th { color: #3d5b4c; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }

.article-layout { display: grid; grid-template-columns: minmax(0,1fr) 285px; gap: 25px; margin-top: 26px; }
.article {
  padding: clamp(23px,4vw,42px); border: 1px solid var(--line); border-radius: 21px; background: var(--card);
}
.article h1 { margin: 0 0 12px; font-size: clamp(33px,5vw,50px); line-height: 1.04; letter-spacing: -.05em; }
.article h2 { margin-top: 35px; }
.article h3 { margin: 25px 0 6px; font-size: 20px; }
.article p, .article li { color: #4d566a; }
.article .lead { color: #384156; 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: var(--lavender); }
.callout { margin: 20px 0; padding: 18px; border-radius: 14px; background: var(--lavender); color: #50447e; }
.source-list a { overflow-wrap: anywhere; }
.sidebar { position: sticky; top: 18px; align-self: start; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.sidebar h2 { margin: 0 0 10px; font-size: 18px; }
.sidebar a { display: block; padding: 7px 0; border-bottom: 1px solid #eeeaf4; text-decoration: none; font-size: 13px; font-weight: 750; }

.site-footer { margin-top: 48px; padding: 29px 0 35px; 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: #596176; text-decoration: none; font-size: 13px; }
.copyright { margin-top: 22px; color: #858b9b; font-size: 11px; }

@media (max-width: 820px) {
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}
@media (max-width: 680px) {
  .site-header { align-items: flex-start; flex-direction: column; gap: 14px; }
  .brand-tag { display: none; }
  .main-nav { gap: 12px; }
  .hero { border-radius: 20px; }
  .tool-grid, .footer-grid, .fields { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .calc-head, .result-top { flex-direction: column; align-items: stretch; }
  .guidance-pill { white-space: normal; }
  .result-note { text-align: left; }
}
