:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #61707d;
  --line: #d9e1e7;
  --paper: #fbfcfa;
  --panel: #ffffff;
  --green: #14745f;
  --green-soft: #e7f2ee;
  --coral: #b4573d;
  --blue: #225f8f;
  --blue-soft: #e8f1f7;
  --gold: #9c7a20;
  --rose: #93506b;
  --warm: #f5efe7;
  --shadow: 0 16px 45px rgba(22, 32, 42, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #fff;
  color: var(--ink);
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #eef1f3;
  box-shadow: 0 6px 18px rgba(23, 32, 42, 0.06);
  backdrop-filter: blur(12px);
}

.nav {
  max-width: 1780px;
  margin: 0 auto;
  padding: 18px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  width: 54px;
  height: 54px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 9px;
  border: 3px solid #17202a;
  border-radius: 5px;
  background: #fff;
}

.brand-mark::after {
  content: "¥";
  position: absolute;
  right: -10px;
  bottom: -9px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 2px solid #17202a;
  border-radius: 4px;
  background: #fff;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
}

.brand-mark span {
  align-self: end;
  border-radius: 999px;
  background: var(--blue);
}

.brand-mark span:nth-child(1) {
  height: 18px;
}

.brand-mark span:nth-child(2) {
  height: 28px;
  background: var(--green);
}

.brand-mark span:nth-child(3) {
  height: 23px;
  background: var(--coral);
}

.brand-copy {
  display: grid;
  line-height: 1.1;
}

.brand-copy strong {
  color: #17203c;
  font-size: 25px;
  letter-spacing: 0.04em;
}

.brand-copy small {
  color: #30343a;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-align: center;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 26px;
}

.nav-links a {
  padding: 8px 0;
  color: #30343a;
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--green);
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 56px;
}

.section-title {
  max-width: 760px;
  margin-bottom: 24px;
}

.section-title h2 {
  margin: 6px 0 10px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.18;
  letter-spacing: 0;
}

.section-title p {
  color: var(--muted);
}

.hero {
  min-height: calc(100vh - 92px);
  display: grid;
  place-items: center;
  padding: 130px 0 76px;
  text-align: center;
}

.hero-copy h1 {
  margin: 22px auto 28px;
  max-width: 760px;
  color: #2e3238;
  font-size: clamp(42px, 5.2vw, 70px);
  line-height: 1.34;
  letter-spacing: 0;
}

.hero-copy h1 span {
  background: linear-gradient(transparent 62%, #d9f3cc 62%);
}

.hero-kicker {
  margin: 0;
  color: #92979d;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.lead {
  max-width: 720px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.9;
}

.eyebrow {
  margin: 0;
  color: var(--coral);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 44px;
}

.centered-actions {
  justify-content: center;
}

.button,
.calc-form button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.button.primary,
.calc-form button {
  background: #3d9d71;
  color: #fff;
}

.button.large {
  min-width: min(560px, 100%);
  min-height: 82px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  font-size: 24px;
  box-shadow: 0 10px 18px rgba(52, 128, 82, 0.22);
}

.button.secondary {
  background: #eef2f4;
  color: var(--ink);
}

.hero-meta {
  margin-top: 58px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  color: #8d9298;
  font-size: 16px;
  font-weight: 800;
}

.life-tools {
  scroll-margin-top: 110px;
  padding: 44px 0 18px;
}

.life-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.life-card {
  min-height: 260px;
  display: grid;
  align-content: space-between;
  gap: 22px;
  padding: 24px;
  border: 1px solid #e4e8eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(23, 32, 42, 0.05);
  text-decoration: none;
}

.life-card:hover {
  border-color: #b9d9c9;
  transform: translateY(-2px);
  transition: transform 160ms ease, border-color 160ms ease;
}

.life-label {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef5f1;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.life-card h3 {
  margin: 0;
  font-size: 29px;
  line-height: 1.2;
  letter-spacing: 0;
}

.life-card p {
  margin: 0;
  color: var(--muted);
}

.life-card strong {
  color: #30343a;
  font-size: 15px;
}

.life-card strong::after {
  content: " →";
}

.life-card.home .life-label {
  background: #eef3fb;
  color: var(--blue);
}

.life-card.education .life-label {
  background: #fff5df;
  color: var(--gold);
}

.life-card.donation .life-label {
  background: #f8eceb;
  color: var(--coral);
}

.life-card.investment .life-label {
  background: #eef5f1;
  color: var(--green);
}

.life-card.pension .life-label {
  background: #f5edf2;
  color: var(--rose);
}

.hero-meta span + span::before {
  content: "|";
  margin-right: 16px;
  color: #c6cbd0;
}

.quick-tools {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  scroll-margin-top: 110px;
  margin: 0 0 22px;
  padding-top: 28px;
  border-top: 1px solid #f0f2f3;
}

.quick-tools a {
  min-height: 86px;
  padding: 14px;
  display: grid;
  align-content: space-between;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  text-decoration: none;
}

.quick-tools a:hover {
  border-color: #c8bca8;
  box-shadow: 0 8px 24px rgba(22, 32, 42, 0.07);
}

.quick-tools span {
  color: var(--coral);
  font-size: 13px;
  font-weight: 800;
}

.quick-tools strong {
  font-size: 15px;
  line-height: 1.35;
}

.ad-band {
  margin: 8px 0 28px;
  padding: 12px;
  border: 1px dashed #b9c4cc;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.ad-placeholder {
  margin-top: 8px;
  min-height: 86px;
  display: grid;
  place-items: center;
  background: #f1f4f6;
  border-radius: 6px;
  color: #71808c;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tool-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 8px 28px rgba(22, 32, 42, 0.05);
}

.tool-card.featured {
  border-top: 5px solid var(--green);
}

.tool-head {
  min-height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.tool-head h2,
.content-section h2,
.notice h2 {
  margin: 4px 0 0;
  line-height: 1.2;
  letter-spacing: 0;
}

.tag {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff3d3;
  color: #755900;
  font-size: 12px;
  font-weight: 800;
}

.tag.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.tool-intro {
  color: var(--muted);
  min-height: 52px;
}

.calc-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.calc-form.three {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.calc-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.calc-form input,
.calc-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.calc-form input::placeholder {
  color: #a6b0b8;
}

.calc-form input:not(:placeholder-shown) {
  border-color: #9bb9ae;
  background: #fbfffd;
  font-weight: 800;
}

.calc-form button {
  grid-column: 1 / -1;
}

.result {
  margin-top: 16px;
  min-height: 132px;
  padding: 16px;
  border-radius: 8px;
  background: #f6f8f4;
  border: 1px solid #dfe7dc;
}

.tool-card.wide {
  grid-column: 1 / -1;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  padding: 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e4e9e1;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 4px;
  font-size: 21px;
  line-height: 1.2;
}

.result-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.empty-result {
  min-height: 100px;
  display: grid;
  align-content: center;
  gap: 8px;
  color: #87929b;
}

.empty-result strong {
  color: #6f7a82;
}

.empty-result span {
  font-size: 13px;
}

.noscript-note {
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 8px;
  background: #fff5df;
  color: #6b571f;
  font-size: 13px;
  font-weight: 800;
}

.content-section {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.principle-grid article {
  padding: 20px;
  border-left: 4px solid var(--green);
  background: #f7faf8;
}

.principle-grid article:nth-child(2) {
  border-color: var(--blue);
}

.principle-grid article:nth-child(3) {
  border-color: var(--coral);
}

.principle-grid h3 {
  margin: 0 0 8px;
}

.principle-grid p {
  margin: 0;
  color: var(--muted);
}

.strategy-section {
  margin-top: 30px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 24px;
  align-items: stretch;
  padding: 26px;
  border-radius: 8px;
  background: #17202a;
  color: #fff;
}

.strategy-copy p {
  color: #d7dee4;
}

.strategy-copy h2 {
  margin: 6px 0 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.steps div {
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.steps span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  font-weight: 900;
}

.steps strong {
  display: block;
  margin-top: 14px;
}

.steps p {
  margin: 6px 0 0;
  color: #c5d0d8;
  font-size: 13px;
}

.article-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.article-grid article {
  padding: 18px;
  border-left: 4px solid var(--blue);
  background: #fff;
}

.article-grid article:nth-child(2) {
  border-color: var(--green);
}

.article-grid article:nth-child(3) {
  border-color: var(--coral);
}

.article-grid article:nth-child(4) {
  border-color: var(--gold);
}

.article-grid article:nth-child(5) {
  border-color: var(--rose);
}

.article-grid h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.article-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.article-grid a {
  display: inline-block;
  margin-top: 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.blog-preview {
  margin-top: 46px;
  padding: 30px 0 0;
  border-top: 1px solid var(--line);
}

.blog-preview h2 {
  margin: 4px 0 18px;
  line-height: 1.2;
}

.post-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.post-list a {
  min-height: 136px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  text-decoration: none;
}

.post-list span {
  color: var(--coral);
  font-size: 13px;
  font-weight: 800;
}

.post-list strong {
  line-height: 1.45;
}

.notice {
  margin-top: 40px;
  padding: 22px;
  border: 1px solid #ead7a1;
  border-radius: 8px;
  background: #fff9e8;
}

.notice p {
  color: #66552b;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 24px 20px 40px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  max-width: 1160px;
  margin: 0 auto;
  color: var(--muted);
}

.footer p {
  margin: 6px 0 0;
}

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

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.legal-page {
  max-width: 820px;
  padding: 54px 0 70px;
}

.tool-page {
  max-width: 920px;
  padding: 54px 0 70px;
}

.tool-page h1 {
  margin: 8px 0 16px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: 0;
}

.tool-page .tool-card {
  margin-top: 26px;
}

.assumption-box {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid #dfe7dc;
  border-radius: 8px;
  background: #f7faf8;
}

.assumption-box h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.assumption-box p {
  margin: 8px 0 0;
  color: var(--muted);
}

.assumption-box a,
.legal-page a {
  color: var(--green);
  font-weight: 800;
  text-decoration: none;
}

.legal-page h1 {
  margin: 8px 0 20px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: 0;
}

.legal-page h2 {
  margin-top: 28px;
}

.legal-page p {
  color: var(--muted);
}

@media (max-width: 860px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 20px;
  }

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

  .hero,
  .life-grid,
  .tools-grid,
  .article-grid,
  .quick-tools,
  .strategy-section,
  .steps,
  .post-list,
  .principle-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 76px 0 58px;
  }

  .brand-copy strong {
    font-size: 27px;
  }

  .brand-copy small {
    font-size: 12px;
  }

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

  .tool-intro,
  .tool-head {
    min-height: auto;
  }

  .calc-form.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  main,
  .nav,
  .footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-copy h1 {
    font-size: 38px;
    line-height: 1.32;
  }

  .lead {
    font-size: 16px;
    line-height: 1.85;
  }

  .button.large {
    min-height: 64px;
    font-size: 18px;
  }

  .hero-meta {
    margin-top: 34px;
    display: grid;
    gap: 8px;
  }

  .hero-meta span + span::before {
    content: "";
    margin: 0;
  }

  .calc-form,
  .calc-form.three,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
  }
}
