:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #17202a;
  --muted: #627083;
  --border: #d8dee8;
  --accent: #0f6b5f;
  --accent-hover: #0a5a50;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Yu Gothic UI", "Yu Gothic", "Hiragino Sans", Meiryo, sans-serif;
  line-height: 1.75;
}

a {
  color: inherit;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px max(24px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  transform: translateY(1px);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

#clerk-nav {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-end;
  min-width: 4em;
  min-height: 32px;
}

.auth-toast {
  position: fixed;
  z-index: 1000;
  top: 20px;
  left: 50%;
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border-radius: 10px;
  background: #0f6b5f;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  font-weight: 700;
  transform: translate(-50%, -120px);
  animation: auth-toast-in .35s ease-out forwards;
}

.auth-toast--leaving {
  animation: auth-toast-out .25s ease-in forwards;
}

@keyframes auth-toast-in {
  to { transform: translate(-50%, 0); }
}

@keyframes auth-toast-out {
  to { transform: translate(-50%, -120px); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-toast, .auth-toast--leaving { animation-duration: .01ms; }
}

.account-page {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}

.account-page .lead {
  margin-right: auto;
  margin-left: auto;
}

.account-page #clerk-account {
  display: grid;
  justify-items: center;
  width: 100%;
  margin: 24px auto 0;
}

.account-status {
  color: var(--muted);
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent);
}

.site-main {
  width: min(1120px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.hero {
  padding: 32px 0 42px;
}

.home-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 530px;
  margin-bottom: 32px;
  padding: 48px 40px;
  overflow: hidden;
  border-radius: 16px;
  background: #f4fcfa;
  isolation: isolate;
}

.home-hero-copy {
  width: 43%;
}

.home-hero-image {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 900px) {
  .hero.home-hero {
    display: block;
    min-height: 0;
    padding: 28px 24px 0;
  }

  .home-hero-copy {
    width: 100%;
  }

  .home-hero-image {
    position: relative;
    display: block;
    width: calc(100% + 48px);
    height: auto;
    margin: 24px -24px 0;
  }
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: 40px;
  line-height: 1.25;
}

h2 {
  margin: 0 0 18px;
  font-size: 24px;
  line-height: 1.35;
}

h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.lead {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.section {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

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

.card {
  display: block;
  min-height: 170px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  text-decoration: none;
}

.card:hover {
  border-color: rgba(15, 107, 95, 0.45);
}

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

.locked-feature-card {
  display: block;
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 170px;
  padding: 20px;
  border: 1px solid #cbd3df;
  border-radius: 12px;
  background: linear-gradient(140deg, #f8fafc, #e9edf3);
  box-shadow: 0 10px 28px rgba(25, 38, 55, .07);
}

.locked-feature-card::after {
  content: "";
  position: absolute;
  top: -72px;
  right: -52px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(92, 110, 134, .15);
  border-radius: 50%;
  pointer-events: none;
}

.locked-feature-card h3 { margin: 10px 0 6px; }
.locked-feature-card p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }

.locked-feature-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid #b8c7d7;
  border-radius: 999px;
  background: #e8eff5;
  color: #34465a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}

.locked-feature-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid #93a1b3;
  border-radius: 8px;
  background: #d8e0e9;
  color: #243448;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
}

.locked-feature-button:hover { border-color: #657b93; background: #cbd7e3; transform: translateY(-1px); }
.gsc-app button.locked-feature-button, .ga4-app button.locked-feature-button { padding: 8px 13px; border: 1px solid #93a1b3; border-radius: 8px; background: #d8e0e9; color: #243448; box-shadow: none; }
.gsc-app button.locked-feature-button:hover:not(:disabled), .ga4-app button.locked-feature-button:hover:not(:disabled) { border-color: #657b93; background: #cbd7e3; box-shadow: none; }
.locked-feature-button:focus-visible { outline: 3px solid #dfad36; outline-offset: 3px; }
.locked-feature-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.locked-feature-card .locked-feature-campaign { margin: 10px 0 0; color: #8b5112; font-weight: 800; }
.unlocked-feature-card { border-color: rgba(15, 107, 95, .35); background: linear-gradient(140deg, #fff, #eaf7f3); color: inherit; text-decoration: none; }
.unlocked-feature-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.unlocked-feature-badge { display: inline-flex; padding: 3px 9px; border-radius: 999px; background: #dff3ec; color: var(--accent); font-size: 11px; font-weight: 800; }
.unlocked-feature-link { color: var(--accent); font-size: 13px; font-weight: 800; }

.free-period-control {
  display: grid;
  grid-template-columns: minmax(178px, auto) auto;
  align-items: stretch;
  gap: 8px;
  flex: 0 0 auto;
}

.free-period-value {
  display: grid;
  align-content: center;
  min-height: 54px;
  padding: 7px 14px;
  border: 1px solid #ccd5df;
  border-radius: 10px;
  background: #f1f4f7;
  color: #34465a;
}

.gsc-app .free-period-value span, .ga4-app .free-period-value span {
  order: 0;
  margin: 0;
  color: #6a7786;
  font-size: 11px;
  font-weight: 700;
}

.free-period-value strong { font-size: 16px; white-space: nowrap; }
.free-period-control .locked-feature-button { max-width: 190px; }
.gsc-app .free-period-control .locked-feature-button span, .ga4-app .free-period-control .locked-feature-button span { order: 0; margin: 0; color: inherit; font-size: inherit; }

.paid-feature-campaign { padding: 10px 12px; border-radius: 8px; background: #fff4dc; color: #8b5112; font-weight: 800; }

.plans-hero { text-align: center; }
.plans-hero h1, .plans-hero .lead { margin-right: auto; margin-left: auto; }
.plan-feature-notice { max-width: 760px; margin: 22px auto 0; padding: 12px 16px; border-radius: 9px; background: #e6f5ef; color: var(--accent); font-weight: 800; }
.plans-hero .paid-feature-campaign { max-width: 760px; margin: 10px auto 0; }
.plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.plan-card { display: flex; flex-direction: column; min-height: 350px; padding: 22px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.plan-card--featured { border: 2px solid var(--accent); box-shadow: 0 14px 34px rgba(15, 107, 95, .12); }
.plan-card--disabled { background: #eef1f4; color: #6d7886; }
.plan-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.plan-name { margin: 0; font-size: 21px; font-weight: 900; }
.plan-price { margin: 4px 0 0; font-size: 18px; font-weight: 800; }
.plan-price-tax { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.plan-status { display: inline-flex; flex: 0 0 auto; padding: 3px 9px; border-radius: 999px; background: #dfe4e9; color: #5f6a77; font-size: 11px; font-weight: 800; }
.plan-status--available { background: #dff3ec; color: var(--accent); }
.plan-description { margin: 22px 0 16px; color: var(--muted); font-size: 14px; }
.plan-connections { margin: auto 0 16px; color: var(--muted); font-size: 13px; }
.plan-connections strong { color: var(--text); font-size: 18px; }
.plan-card form { margin: 0; }
.plan-action { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; padding: 8px 14px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }
.plan-action:hover:not(:disabled) { background: var(--accent-hover); }
.plan-action--secondary { border: 1px solid var(--accent); background: #fff; color: var(--accent); }
.plan-action--secondary:hover { background: #eaf7f3; }
.plan-action:disabled { background: #c9d0d7; color: #687483; cursor: not-allowed; }
.plan-tax-note, .plan-table-note { margin: 16px 0 0; color: var(--muted); font-size: 13px; }
.plan-legal-consent { margin: 16px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.plan-legal-consent a { color: var(--accent); }
.plan-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.plan-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 14px; }
.plan-table th, .plan-table td { padding: 13px 14px; border-bottom: 1px solid var(--border); text-align: center; }
.plan-table th:first-child { width: 32%; text-align: left; }
.plan-table thead th { background: #edf5f3; font-weight: 900; }
.plan-table tbody tr:last-child th, .plan-table tbody tr:last-child td { border-bottom: 0; }
.plan-table-tax { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.plan-table-highlight th, .plan-table-highlight td { background: #fff4dc; }
.plan-help-note{margin:0 0 12px}.plan-feature-label{display:inline-flex;align-items:center;gap:9px}.feature-help-button{display:inline-grid;place-items:center;flex:0 0 auto;width:26px;height:26px;padding:0;border:1px solid #9cbdb1;border-radius:50%;background:#edf7f2;color:var(--accent);font-family:inherit;font-size:14px;font-weight:700;line-height:1;cursor:pointer}.feature-help-button:hover{background:var(--accent);color:#fff}.feature-help-button:focus-visible,.feature-help-close:focus-visible{outline:3px solid #dfad36;outline-offset:3px}
.feature-help-dialog{width:min(520px,calc(100% - 32px));max-height:calc(100dvh - 40px);padding:32px;border:1px solid var(--border);border-radius:16px;background:#fff;color:var(--text);box-shadow:0 24px 70px rgba(15,35,32,.25)}.feature-help-dialog::backdrop{background:rgba(14,31,29,.55)}.feature-help-dialog form{margin:0}.feature-help-dialog .eyebrow{margin:0 0 12px}.feature-help-dialog h2{font-size:22px;line-height:1.5;margin:0 24px 16px 0}.feature-help-dialog>p:not(.eyebrow){color:var(--muted);font-size:15px}.feature-help-close{position:absolute;top:12px;right:12px;display:grid;place-items:center;width:34px;height:34px;padding:0;border:0;border-radius:50%;background:#eef4f1;color:var(--text);font-size:24px;cursor:pointer}.feature-help-close:hover{background:#dbece4}.feature-help-link{display:inline-flex;gap:24px;margin-top:12px;color:var(--accent);font-weight:700;text-underline-offset:4px}
.report-cta{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 280px;align-items:center;gap:38px;isolation:isolate;overflow:hidden;margin:32px 0 0;padding:36px 40px;border:1px solid #245d55;border-radius:18px;background:radial-gradient(ellipse at top right,#236c5c,transparent 62%),#123b36;color:#fff;box-shadow:0 16px 36px -22px rgba(15,55,45,.6)}.report-cta .report-cta-eyebrow{margin:0 0 12px;color:#a7dccb;font-size:12px;font-weight:800;letter-spacing:2px}.report-cta h2{margin:0 0 14px;font-size:30px;line-height:1.5;color:#fff}.report-cta-copy>p:not(.report-cta-eyebrow){margin:0 0 18px;color:#d7e9e3;font-size:14px}.report-cta-tags{display:flex;flex-wrap:wrap;gap:7px;list-style:none;padding:0;margin:0 0 24px}.report-cta-tags li{padding:3px 10px;border:1px solid #527e70;border-radius:999px;font-size:11px;color:#d7e9e3}.report-cta-actions{display:flex;align-items:center;gap:20px;flex-wrap:wrap}.report-cta-primary{display:inline-flex;align-items:center;justify-content:center;gap:20px;min-height:48px;padding:10px 20px;border-radius:9px;background:#f3cf80;color:#17352b;font-size:14px;font-weight:800;text-decoration:none;box-shadow:0 6px 18px rgba(0,0,0,.1)}.report-cta-primary:hover{background:#ffe0a0}.report-cta-secondary{color:#fff;font-size:13px;text-underline-offset:4px}.report-cta a:focus-visible{outline:3px solid #fff;outline-offset:4px}.report-cta-copy .report-cta-campaign{margin:16px 0 0;color:#ffe0a0;font-weight:700}
.report-cta-visual{position:relative;min-height:250px;padding-bottom:38px}.report-cta-sheet{padding:21px;background:#fff;border-radius:10px;box-shadow:0 18px 35px rgba(0,0,0,.18);transform:rotate(3deg)}.report-cta-sheet>span{font-size:10px;letter-spacing:1.5px;font-weight:800;color:#13786c}.report-cta-mini-kpis{display:flex;gap:9px;margin:15px 0}.report-cta-mini-kpis i{flex:1;height:27px;background:linear-gradient(#d2e8df 5px,transparent 5px 11px,#edf4f0 11px);border-radius:3px}.report-cta-mini-chart{display:flex;align-items:end;gap:10px;height:95px;padding:0 8px 0;border-bottom:1px solid #c2d6cc}.report-cta-mini-chart i{flex:1;height:45%;border-radius:3px 3px 0 0;background:linear-gradient(to top,#13786c 65%,#d2a255 65% 88%,#638cb0 88%)}.report-cta-mini-chart i:nth-child(2){height:65%}.report-cta-mini-chart i:nth-child(3){height:58%}.report-cta-mini-chart i:nth-child(4){height:82%}.report-cta-mini-chart i:nth-child(5){height:70%}.report-cta-mini-chart i:nth-child(6){height:91%}.report-cta-mini-chart i:nth-child(7){height:78%}.report-cta-mini-lines{display:grid;gap:7px;margin-top:13px}.report-cta-mini-lines i{height:5px;width:80%;background:#e1ebe6;border-radius:3px}.report-cta-mini-lines i:last-child{width:55%}.report-cta-ai{position:absolute;bottom:0;left:-24px;padding:14px 20px;border:1px solid #dfc795;border-radius:10px;background:#fff7e6;color:#17352b;box-shadow:0 12px 28px rgba(0,0,0,.14)}.report-cta-ai>span{display:block;margin-bottom:5px;font-size:11px;font-weight:800;color:#796025}.report-cta-ai strong{font-size:13px;line-height:1.6}
@media(max-width:780px){.report-cta{grid-template-columns:1fr;gap:24px;padding:28px}.report-cta h2{font-size:26px}.report-cta-visual{display:none}.report-cta-actions{gap:16px}.report-cta-primary{width:100%}.feature-help-dialog{padding:28px 22px}}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 22px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--accent-hover);
}

.account-notice {
  margin: 22px 0 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff4dc;
  color: #8b5112;
  font-weight: 800;
}

.account-connections { margin-top: 38px; }
.account-connection-list { display: grid; gap: 10px; }
.account-connection-list article { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.account-connection-list small { display: block; margin-top: 4px; color: var(--muted); overflow-wrap: anywhere; }
.account-connection-list button { padding: 8px 12px; border: 1px solid #b8c3cf; border-radius: 6px; background: #fff; color: #34465a; font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
.account-success { margin: 22px 0 0; padding: 12px 14px; border-radius: 8px; background: #e6f5ef; color: #0f6b5f; font-weight: 800; }
.account-connect-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.account-connect-grid article, .account-site-form { padding: 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.account-connect-grid h2, .account-site-form h2 { margin-top: 0; }
.account-site-form { display: grid; gap: 8px; margin-top: 14px; }
.account-site-form select { width: 100%; min-height: 44px; padding: 8px; border: 1px solid var(--border); border-radius: 7px; background: #fff; font: inherit; }
.account-page-actions { display: flex; align-items: center; gap: 18px; margin-top: 28px; }

.text-page {
  max-width: 820px;
}

.text-page p,
.text-page li {
  color: var(--muted);
}

.site-footer {
  padding: 24px max(24px, calc((100vw - 1120px) / 2));
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

.site-footer p {
  margin: 0;
}

.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 10px; }
.site-footer a { color: var(--muted); }
.legal-table { width: 100%; border-collapse: collapse; background: var(--surface); }
.legal-table th, .legal-table td { padding: 13px 14px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.legal-table th { width: 30%; background: #edf5f3; }

@media (max-width: 720px) {
  .site-header {
    display: block;
    padding: 16px 14px;
  }

  .site-nav {
    margin-top: 10px;
    gap: 14px;
    flex-wrap: wrap;
  }

  .site-main {
    width: min(100% - 28px, 1120px);
    padding: 28px 0 48px;
  }

  .hero {
    padding: 18px 0 30px;
  }

  h1 {
    font-size: 29px;
  }

  .lead {
    font-size: 16px;
  }

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

  .plan-grid { grid-template-columns: 1fr; }
  .plan-card { min-height: 0; }

  .account-connect-grid { grid-template-columns: 1fr; }
  .account-page-actions { align-items: flex-start; flex-direction: column; }
  .free-period-control { grid-template-columns: 1fr; }
  .free-period-control .locked-feature-button { max-width: none; width: 100%; }
}
