:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #475569;
  --primary: #1d4ed8;
  --primary-dark: #1e3a8a;
  --primary-soft: #eff6ff;
  --accent: #0f766e;
  --accent-soft: #f0fdfa;
  --warn-bg: #fffbeb;
  --warn-border: #fde68a;
  --warn-text: #92400e;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 16px rgba(15, 23, 42, 0.04);
  --max-width: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

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

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.92rem;
  font-weight: 600;
}

.nav-links a {
  color: var(--text-muted);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  text-decoration: none;
}

/* PR Disclosure bar */
.pr-bar {
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 7px 0;
}

.pr-bar .pr-tag {
  display: inline-block;
  background: #e2e8f0;
  color: #334155;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 6px;
}

/* Hero */
.hero {
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  border-bottom: 1px solid var(--border);
  padding: 48px 0 44px;
}

.hero-badge {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border: 1px solid #bfdbfe;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.hero p.lead {
  margin: 0 0 24px;
  color: var(--text-muted);
  max-width: 760px;
  font-size: 1.02rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.94rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.22);
}

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

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: #115e59;
}

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Sections & Cards */
.section {
  padding: 44px 0;
}

.section-header {
  margin-bottom: 24px;
}

.section-header h2 {
  margin: 0 0 6px;
  font-size: 1.45rem;
  line-height: 1.35;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

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

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.card > .btn:last-child,
.card > a:last-child {
  margin-top: auto;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  line-height: 1.45;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.pill {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 2px 9px;
  border-radius: 999px;
}

.pill-teal {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Interactive Widgets */
.widget-box {
  background: var(--surface);
  border: 1px solid #cbd5e1;
  border-top: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.widget-box.teal {
  border-top-color: var(--accent);
}

.control-group {
  margin-bottom: 18px;
}

.control-group label {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 8px;
}

.control-group input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
}

.radio-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.radio-pills button {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.12s ease;
}

.radio-pills button[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.widget-box.teal .radio-pills button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
}

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

.cost-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  background: var(--bg);
}

.cost-card.best {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.cost-card .tool-name {
  font-weight: 800;
  font-size: 0.95rem;
}

.cost-card .price-jpy {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 4px 0 2px;
  white-space: nowrap;
}

.cost-card .price-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.saving-banner {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid #99f6e4;
  color: #134e4a;
  font-size: 0.9rem;
  font-weight: 700;
}

.diag-result {
  margin-top: 18px;
  padding: 18px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid #99f6e4;
}

.diag-result h4 {
  margin: 0 0 6px;
  font-size: 1.08rem;
  color: #134e4a;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 600px;
}

th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: var(--surface-alt);
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: none;
}

/* Article Layout */
.article-wrap {
  max-width: 820px;
  margin: 32px auto 56px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 40px;
  box-shadow: var(--shadow);
}

.breadcrumb {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.article-wrap h1 {
  margin: 0 0 14px;
  font-size: clamp(1.45rem, 2.6vw, 1.95rem);
  line-height: 1.4;
}

.article-wrap h2 {
  margin: 34px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-soft);
  font-size: 1.3rem;
}

.article-wrap h3 {
  margin: 24px 0 10px;
  font-size: 1.08rem;
}

.summary-box {
  background: var(--primary-soft);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 18px 20px;
  margin: 20px 0 26px;
}

.summary-box strong {
  display: block;
  margin-bottom: 6px;
  color: var(--primary-dark);
}

.trust-card {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 24px 0;
  color: var(--warn-text);
  font-size: 0.92rem;
}

.trust-card h3 {
  margin-top: 0;
  color: var(--warn-text);
}

.cta-box {
  border: 1px solid #bfdbfe;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border-radius: 10px;
  padding: 20px 22px;
  margin: 24px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cta-box-info {
  flex: 1 1 320px;
}

.cta-box-info .cta-title {
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.cta-box-info .cta-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 12px;
  background: var(--bg);
}

.faq-item .faq-q {
  font-weight: 800;
  margin-bottom: 6px;
}

.toc-box {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 20px 0 26px;
  font-size: 0.9rem;
}

.toc-box ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 40px 0 32px;
  margin-top: 48px;
  font-size: 0.88rem;
}

.site-footer a {
  color: #e2e8f0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 24px;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 18px;
  color: #94a3b8;
  font-size: 0.8rem;
}

@media (max-width: 960px) {
  .grid-2,
  .grid-3,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .calc-results {
    grid-template-columns: 1fr;
  }

  .article-wrap {
    padding: 24px 18px;
    margin: 18px auto 36px;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 20px;
  }
}
