:root {
  color-scheme: light;
  --ink: #18212f;
  --muted: #657083;
  --line: #d9e0e8;
  --paper: #f7f9fb;
  --panel: #ffffff;
  --green: #0f766e;
  --green-dark: #0b5f59;
  --coral: #e35d4f;
  --amber: #f3a712;
  --blue: #2563eb;
  --shadow: 0 18px 50px rgba(24, 33, 47, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  background: var(--paper);
  color: var(--ink);
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(217, 224, 232, 0.9);
  background: rgba(247, 249, 251, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
}

.nav {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.nav a {
  padding: 8px 10px;
  border-radius: 8px;
}

.nav a:hover {
  background: #ebf1f4;
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.7fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 64px);
  padding: clamp(44px, 7vw, 96px) clamp(18px, 5vw, 72px) 56px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(227, 93, 79, 0.08), transparent 38%),
    #f7f9fb;
}

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

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

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(42px, 8vw, 84px);
  line-height: 1.02;
  letter-spacing: 0;
}

.lead {
  max-width: 680px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.button.primary {
  background: var(--green);
  color: #fff;
}

.button.primary:hover {
  background: var(--green-dark);
}

.button.secondary {
  border-color: var(--line);
  background: #fff;
}

.button.ad {
  background: var(--coral);
  color: #fff;
}

.hero-visual {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(217, 224, 232, 0.95);
  border-radius: 8px;
  background:
    radial-gradient(circle at 88% 10%, rgba(243, 167, 18, 0.22), transparent 26%),
    #fff;
  box-shadow: var(--shadow);
  padding: 24px;
}

.visual-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
}

.visual-top span,
.visual-grid span {
  color: var(--muted);
  font-size: 13px;
}

.visual-top strong {
  font-size: clamp(30px, 5vw, 44px);
}

.bar-chart {
  display: flex;
  align-items: end;
  gap: 14px;
  height: 180px;
  padding: 18px;
  margin-bottom: 24px;
  border-radius: 8px;
  background: #eef4f5;
}

.bar-chart span {
  flex: 1;
  min-width: 30px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--green), #7fc6bd);
}

.bar-chart span:nth-child(2) {
  background: linear-gradient(180deg, var(--coral), #f5afa7);
}

.bar-chart span:nth-child(3) {
  background: linear-gradient(180deg, var(--blue), #9bb7f8);
}

.bar-chart span:nth-child(4) {
  background: linear-gradient(180deg, var(--amber), #f7d585);
}

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

.section {
  padding: 76px clamp(18px, 5vw, 72px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 26px;
}

.section h2 {
  margin-bottom: 10px;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.1;
}

.section-text {
  color: var(--muted);
  line-height: 1.8;
}

.tool-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.tab {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.tab.active {
  border-color: var(--green);
  background: #e6f4f1;
  color: var(--green-dark);
}

.tool-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: 22px;
  align-items: start;
}

.tool-form,
.result-panel,
.revenue-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 36px rgba(24, 33, 47, 0.07);
}

.tool-form {
  display: none;
  padding: clamp(18px, 3vw, 26px);
}

.tool-form.active {
  display: block;
}

.form-heading p {
  color: var(--muted);
  line-height: 1.7;
}

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

label {
  display: grid;
  gap: 7px;
  color: #354255;
  font-size: 14px;
  font-weight: 800;
}

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

.calculate {
  width: 100%;
  margin-top: 18px;
}

.result-panel {
  position: sticky;
  top: 84px;
  min-height: 420px;
  padding: clamp(18px, 3vw, 26px);
}

.result-empty {
  display: grid;
  min-height: 360px;
  place-items: center;
  align-content: center;
  text-align: center;
  color: var(--muted);
}

.result-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 8px;
  background: #e6f4f1;
  color: var(--green);
  font-size: 26px;
  font-weight: 900;
}

.result-total {
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 8px;
  background: #e6f4f1;
}

.result-total span {
  display: block;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 800;
}

.result-total strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(32px, 5vw, 44px);
}

.result-list {
  display: grid;
  gap: 9px;
  margin: 16px 0 18px;
  padding: 0;
  list-style: none;
}

.result-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid #edf1f4;
}

.insight {
  margin: 14px 0;
  padding: 14px;
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  background: #fff8e8;
  color: #5d4820;
  line-height: 1.7;
}

.result-panel h4 {
  margin: 18px 0 8px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(300px, 1fr);
  gap: 28px;
  align-items: center;
  background: #ffffff;
}

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

.guide-grid a {
  min-height: 86px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fb;
  font-weight: 900;
}

.guide-grid a:hover {
  border-color: var(--green);
  background: #e6f4f1;
}

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

.revenue-grid article {
  padding: 20px;
}

.revenue-grid p {
  color: var(--muted);
  line-height: 1.7;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 26px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 980px) {
  .hero,
  .tool-shell,
  .split-section,
  .revenue-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .result-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
  }

  .field-grid,
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .result-actions,
  .button {
    width: 100%;
  }

  .footer {
    flex-direction: column;
  }
}
