:root {
  color-scheme: light;
  --bg: #f4f8f7;
  --paper: #fbfdfc;
  --surface: #ffffff;
  --surface-soft: #eef6f4;
  --ink: #101817;
  --ink-soft: #263735;
  --muted: #667772;
  --line: #d9e5e1;
  --line-strong: #c3d4cf;
  --teal: #0f766e;
  --teal-deep: #0b4f4a;
  --blue: #2563eb;
  --green: #13823f;
  --yellow: #a15c00;
  --red: #b42318;
  --shadow-soft: 0 20px 70px rgba(13, 71, 66, 0.1);
  --shadow-panel: 0 24px 80px rgba(16, 24, 23, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 248, 247, 0.96) 44%, #f4f8f7 100%),
    repeating-linear-gradient(90deg, rgba(15, 118, 110, 0.045) 0 1px, transparent 1px 96px);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: var(--teal-deep);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(217, 229, 225, 0.82);
  background: rgba(251, 253, 252, 0.9);
  padding: 18px max(24px, calc((100vw - 1180px) / 2));
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--teal), var(--teal-deep));
  color: #fff;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.22);
}

.brand-mark svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 5px;
  box-shadow: 0 10px 30px rgba(16, 24, 23, 0.05);
  font-size: 0.92rem;
}

.top-nav a {
  border-radius: 999px;
  color: var(--muted);
  padding: 8px 13px;
  text-decoration: none;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  background: var(--surface-soft);
  color: var(--teal-deep);
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 24px 24px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(330px, 0.78fr) minmax(620px, 1.22fr);
  gap: 42px;
  align-items: center;
  min-height: calc(100vh - 88px);
  padding: 28px 0 42px;
}

.section-label {
  margin: 0 0 16px;
  color: var(--teal-deep);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 570px;
  margin-bottom: 22px;
  color: var(--ink);
  font-size: clamp(2.7rem, 5vw, 5rem);
  line-height: 0.96;
  font-weight: 880;
}

h2 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1.18;
  font-weight: 850;
}

.lead {
  max-width: 560px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 1.12rem;
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  max-width: 560px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: 0 16px 40px rgba(16, 24, 23, 0.06);
}

.hero-proof div {
  display: grid;
  gap: 2px;
  background: rgba(255, 255, 255, 0.86);
  padding: 14px;
}

.hero-proof strong {
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
}

.hero-proof span {
  color: var(--muted);
  font-size: 0.78rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 18px;
  border: 1px solid rgba(195, 212, 207, 0.82);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(238, 246, 244, 0.92)),
    var(--surface);
  padding: 12px;
  box-shadow: var(--shadow-panel);
}

.calculator-panel,
.result-panel,
.tool-strip article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.calculator-panel {
  padding: 24px;
}

.panel-heading span,
.result-label {
  display: block;
  margin-bottom: 5px;
  color: var(--teal-deep);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.panel-heading p {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.94rem;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field span {
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 780;
}

.field input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  padding: 0 14px;
  font: inherit;
  font-size: 1rem;
  font-weight: 780;
}

.field input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
  outline: none;
}

.primary-button {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  box-shadow: 0 16px 28px rgba(15, 118, 110, 0.18);
}

.primary-button:hover,
.primary-button:focus-visible {
  background: linear-gradient(135deg, #10857b, #083f3b);
}

.result-panel {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 26px;
}

.status-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border-radius: 999px;
  background: #e5f8ed;
  color: var(--green);
  padding: 0 15px;
  font-size: 0.92rem;
  font-weight: 900;
}

.status-chip.is-warning {
  background: #fff3dc;
  color: var(--yellow);
}

.status-chip.is-danger {
  background: #fff0ee;
  color: var(--red);
}

.status-note {
  max-width: 190px;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: right;
}

.ratio-number {
  display: grid;
  gap: 5px;
  margin-bottom: 24px;
}

.ratio-number strong {
  color: var(--teal-deep);
  font-size: clamp(3.5rem, 8vw, 6rem);
  line-height: 0.86;
  font-weight: 880;
}

.ratio-number span {
  color: var(--ink-soft);
  font-weight: 800;
}

.meter {
  position: relative;
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ece9;
}

.meter-fill {
  display: block;
  width: 24%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #16c7a3, var(--green));
  transition: width 180ms ease, background 180ms ease;
}

.meter-fill.is-warning {
  background: linear-gradient(90deg, #f5a524, #d97706);
}

.meter-fill.is-danger {
  background: linear-gradient(90deg, #ef4444, var(--red));
}

.meter-limit {
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: 60%;
  width: 2px;
  background: rgba(16, 24, 23, 0.42);
}

.meter-labels {
  display: flex;
  justify-content: space-between;
  margin: 9px 0 24px;
  color: var(--muted);
  font-size: 0.78rem;
}

.result-list {
  display: grid;
  gap: 0;
  margin: 0 0 20px;
  border-top: 1px solid var(--line);
}

.result-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
}

.result-list dt {
  color: var(--muted);
}

.result-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
  text-align: right;
}

.plain-advice {
  margin: auto 0 0;
  border: 1px solid #d8eee8;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #effaf6, #e7f3f1);
  color: var(--teal-deep);
  padding: 16px;
  font-weight: 800;
}

.tool-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 12px 0 30px;
}

.tool-strip article {
  min-height: 132px;
  padding: 20px;
  box-shadow: 0 14px 40px rgba(16, 24, 23, 0.05);
}

.tool-card-link {
  color: inherit;
  display: block;
  text-decoration: none;
}

.tool-card-link article {
  height: 100%;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.tool-card-link:hover article,
.tool-card-link:focus-visible article {
  border-color: var(--teal);
  box-shadow: 0 18px 48px rgba(15, 118, 110, 0.12);
  transform: translateY(-2px);
}

.secondary-strip {
  padding-top: 0;
}

.tool-strip span {
  color: var(--teal-deep);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tool-strip p,
.explain-band p,
.site-footer p {
  color: var(--muted);
}

.explain-band {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  border-top: 1px solid var(--line);
  padding: 38px 0 34px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 24px;
  font-size: 0.92rem;
}

.site-footer p {
  margin-bottom: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.longtail-hero {
  display: grid;
  grid-template-columns: minmax(330px, 0.75fr) minmax(640px, 1.25fr);
  gap: 42px;
  align-items: center;
  padding: 72px 0 54px;
}

.longtail-hero h1 {
  max-width: 620px;
  font-size: clamp(2.45rem, 4.5vw, 4.65rem);
}

.longtail-hero .lead strong {
  color: var(--teal-deep);
}

.answer-box {
  display: grid;
  gap: 8px;
  max-width: 440px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  padding: 18px;
  box-shadow: 0 16px 42px rgba(16, 24, 23, 0.06);
}

.answer-box span {
  color: var(--teal-deep);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.answer-box strong {
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
}

.answer-box p {
  margin-bottom: 0;
  color: var(--muted);
}

.compact-tool {
  align-items: stretch;
}

.content-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  border-top: 1px solid var(--line);
  padding: 36px 0 16px;
}

.content-band article,
.faq-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  padding: 22px;
}

.content-band p,
.faq-list p {
  color: var(--muted);
}

.faq-list {
  margin: 22px 0 40px;
}

.faq-list details {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

.faq-list details:first-of-type {
  margin-top: 8px;
}

.faq-list summary {
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
}

.faq-list details:last-child {
  padding-bottom: 0;
}

.daily-number strong {
  font-size: clamp(2.35rem, 5vw, 4.2rem);
}

.policy-page {
  max-width: 880px;
  padding: 70px 0 56px;
}

.policy-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  padding: clamp(22px, 4vw, 38px);
  box-shadow: var(--shadow-soft);
}

.policy-card h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2.35rem, 5vw, 4.6rem);
}

.policy-card h2 {
  margin-top: 30px;
}

.policy-card p,
.policy-card li {
  color: var(--muted);
}

.policy-date {
  margin-bottom: 28px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 800;
}

.policy-card ul {
  padding-left: 22px;
}

@media (max-width: 1040px) {
  .hero,
  .longtail-hero,
  .tool-grid,
  .tool-strip,
  .explain-band,
  .content-band {
    grid-template-columns: 1fr;
  }

  .hero {
    align-items: start;
    min-height: auto;
    padding-top: 16px;
  }

  .tool-grid {
    max-width: 720px;
  }

  .longtail-hero {
    align-items: start;
    padding-top: 22px;
  }
}

@media (max-width: 680px) {
  .site-header {
    position: static;
    align-items: flex-start;
    padding: 14px;
  }

  .brand {
    font-size: 0.95rem;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .top-nav {
    display: none;
  }

  main {
    padding: 26px 14px 16px;
  }

  h1 {
    font-size: 2.42rem;
  }

  .lead {
    font-size: 1rem;
  }

  .hero-proof {
    grid-template-columns: 1fr;
  }

  .tool-grid {
    border: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
  }

  .calculator-panel,
  .result-panel,
  .tool-strip article {
    box-shadow: 0 16px 42px rgba(16, 24, 23, 0.07);
  }

  .calculator-panel,
  .result-panel {
    padding: 17px;
  }

  .status-row,
  .result-list div,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-note,
  .result-list dd {
    text-align: left;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
