/* ================================================================
   style.css — company-establish-tax
   完全自己完結 / 外部参照ゼロ / CLS最小化
   ================================================================ */

/* ── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: "Noto Sans CJK JP", "Hiragino Kaku Gothic ProN",
               "Meiryo", "Yu Gothic", sans-serif;
  color: #333333;
  line-height: 1.8;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: #1b2a4a; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Variables ────────────────────────────────────────── */
:root {
  --c-main:    #1b2a4a;
  --c-accent:  #d93025;
  --c-bg-alt:  #F6F8FB;
  --c-result:  #FFF3F2;
  --c-white:   #ffffff;
  --c-gray:    #666666;
  --c-border:  #e2e6ea;
  --c-green:   #0b7245;
  --radius:    12px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,.10);
}

/* ── Container ────────────────────────────────────────── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ───────────────────────────────────────────── */
.site-header {
  background: var(--c-main);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: .05em;
}
.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-accent);
  color: #ffffff;
  font-weight: 700;
  font-size: .95rem;
  padding: 10px 24px;
  border-radius: 6px;
  white-space: nowrap;
  transition: background .2s, transform .15s;
  height: 44px;
  min-width: 200px;
}
.header-cta:hover { background: #b92218; text-decoration: none; transform: translateY(-1px); }

/* ── Breadcrumb ───────────────────────────────────────── */
.breadcrumb {
  background: var(--c-bg-alt);
  padding: 10px 0;
  font-size: .8rem;
  color: var(--c-gray);
}
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0 6px; }
.breadcrumb li:not(:last-child)::after { content: "›"; margin-left: 6px; color: #aaa; }
.breadcrumb a { color: var(--c-main); }

/* ── FV Section ───────────────────────────────────────── */
.fv {
  background: var(--c-bg-alt);
  padding: 0;
  overflow: hidden;
}
.fv-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  min-height: 500px;
}
.fv-text {
  padding: 56px 48px 56px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.fv-kicker {
  display: inline-block;
  background: var(--c-accent);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
  letter-spacing: .08em;
  margin-bottom: 16px;
}
.fv h1 {
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 900;
  line-height: 1.4;
  color: var(--c-main);
  margin-bottom: 20px;
}
.fv-sub {
  font-size: 1rem;
  color: #444;
  margin-bottom: 24px;
  line-height: 1.9;
}
.fv-checklist {
  list-style: none;
  margin-bottom: 32px;
}
.fv-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .95rem;
  color: var(--c-main);
  font-weight: 600;
  margin-bottom: 8px;
}
.fv-checklist li::before {
  content: "✓";
  color: var(--c-accent);
  font-weight: 900;
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.fv-image {
  position: relative;
  overflow: hidden;
}
.fv-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  min-height: 360px;
}

/* ── CTA Button ───────────────────────────────────────── */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-accent);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.1rem;
  text-decoration: none;
  height: 56px;
  padding: 0 36px;
  border-radius: 8px;
  letter-spacing: .04em;
  box-shadow: 0 4px 16px rgba(217,48,37,.35);
  transition: background .2s, transform .15s, box-shadow .2s;
  min-width: 260px;
}
.btn-cta:hover {
  background: #b92218;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(217,48,37,.40);
  text-decoration: none;
}
.btn-cta::after {
  content: " →";
  font-weight: 700;
}

/* ── Section Alternating ──────────────────────────────── */
.sec-white { background: #ffffff; }
.sec-alt   { background: var(--c-bg-alt); }

section { padding: 72px 0; }

/* ── Section Titles ───────────────────────────────────── */
.sec-title {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 900;
  color: var(--c-main);
  line-height: 1.4;
  margin-bottom: 32px;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--c-accent);
  display: inline-block;
}
.sec-sub {
  font-size: 1.05rem;
  color: #555;
  margin-bottom: 28px;
  line-height: 1.9;
}
h3 {
  font-size: clamp(17px, 1.8vw, 22px);
  font-weight: 800;
  color: var(--c-main);
  margin: 40px 0 16px;
  padding-left: 14px;
  border-left: 4px solid var(--c-accent);
  line-height: 1.4;
}

/* ── Result Card ──────────────────────────────────────── */
.result-card {
  background: var(--c-result);
  border-left: 5px solid var(--c-accent);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin: 32px 0;
  line-height: 2.0;
  font-size: 1rem;
}
.result-card strong {
  color: var(--c-accent);
  font-weight: 800;
}
.result-card p { margin-bottom: 8px; }
.result-card p:last-child { margin-bottom: 0; }

/* ── Figure Wrapper ───────────────────────────────────── */
.fig-wrap {
  margin: 32px 0;
}
.fig-wrap img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.fig-caption {
  text-align: center;
  font-size: .82rem;
  color: var(--c-gray);
  margin-top: 13px;
  line-height: 1.5;
}

/* CTA block after figures */
.cta-block {
  text-align: center;
  margin: 40px 0 8px;
}
.cta-block .btn-cta {
  margin: 0 auto;
}
.cta-note {
  text-align: center;
  font-size: .8rem;
  color: var(--c-gray);
  margin-top: 10px;
}

/* ── Table ────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  margin: 32px 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
  font-size: .95rem;
}
thead tr { background: var(--c-main); color: #ffffff; }
thead th {
  padding: 16px 20px;
  text-align: left;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
}
tbody tr { min-height: 56px; }
tbody td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--c-border);
  vertical-align: middle;
  line-height: 1.7;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background: var(--c-bg-alt); }
.row-total { background: var(--c-result) !important; font-weight: 700; }
.row-total td { border-top: 2px solid var(--c-accent); }
.td-diff { color: var(--c-accent); font-weight: 800; }
.td-good { color: var(--c-green); font-weight: 700; }
.td-warn { color: var(--c-accent); font-weight: 700; }

/* ── Note Box ─────────────────────────────────────────── */
.note-box {
  background: #fffbe6;
  border: 1px solid #ffe082;
  border-left: 5px solid #f9a825;
  border-radius: var(--radius);
  padding: 20px 24px;
  font-size: .92rem;
  margin: 24px 0;
  line-height: 1.85;
}
.warn-box {
  background: #fff5f5;
  border: 1px solid #ffcdd2;
  border-left: 5px solid var(--c-accent);
  border-radius: var(--radius);
  padding: 20px 24px;
  font-size: .92rem;
  margin: 24px 0;
  line-height: 1.85;
}

/* ── Numbered List ────────────────────────────────────── */
.num-list {
  list-style: none;
  counter-reset: num-cnt;
  margin: 20px 0;
}
.num-list li {
  counter-increment: num-cnt;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 16px 20px;
  background: var(--c-bg-alt);
  border-radius: 8px;
  font-size: .95rem;
  line-height: 1.8;
}
.num-list li::before {
  content: counter(num-cnt);
  min-width: 32px;
  height: 32px;
  background: var(--c-main);
  color: #fff;
  font-weight: 800;
  font-size: .9rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Check List ───────────────────────────────────────── */
.check-list {
  list-style: none;
  margin: 20px 0;
}
.check-list li {
  padding: 12px 16px 12px 42px;
  position: relative;
  border-bottom: 1px solid var(--c-border);
  font-size: .95rem;
  line-height: 1.75;
}
.check-list li:last-child { border-bottom: none; }
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 14px;
  color: var(--c-green);
  font-weight: 900;
  font-size: 1.05rem;
}

/* ── FAQ ──────────────────────────────────────────────── */
.faq-list {
  margin: 24px 0;
}
.faq-item {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.faq-q {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px 24px;
  background: var(--c-main);
  cursor: default;
}
.faq-q-icon {
  min-width: 32px;
  height: 32px;
  background: var(--c-accent);
  color: #fff;
  font-weight: 900;
  font-size: .95rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.faq-q-text {
  font-weight: 700;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.6;
}
.faq-a {
  padding: 20px 24px 20px 70px;
  font-size: .95rem;
  line-height: 1.85;
  background: #ffffff;
  color: #333;
}

/* ── HowTo Steps ──────────────────────────────────────── */
.howto-steps {
  counter-reset: step-cnt;
  margin: 24px 0;
}
.howto-step {
  counter-increment: step-cnt;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 24px;
  background: #ffffff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.howto-step::before {
  content: "STEP " counter(step-cnt);
  min-width: 80px;
  height: 80px;
  background: var(--c-main);
  color: #fff;
  font-weight: 900;
  font-size: .75rem;
  letter-spacing: .05em;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-align: center;
  line-height: 1.2;
}
.howto-step-content h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--c-main);
  margin-bottom: 8px;
}
.howto-step-content p {
  font-size: .93rem;
  color: #555;
  line-height: 1.8;
}

/* ── Highlight Boxes (3-col) ──────────────────────────── */
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 32px 0;
}
.highlight-card {
  background: #ffffff;
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--c-main);
  text-align: center;
}
.highlight-card.accent-top { border-top-color: var(--c-accent); }
.highlight-card .hc-num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--c-accent);
  display: block;
  margin-bottom: 4px;
}
.highlight-card .hc-label {
  font-size: .85rem;
  color: var(--c-gray);
}
.highlight-card .hc-desc {
  font-size: .9rem;
  color: #444;
  margin-top: 10px;
  line-height: 1.7;
}

/* ── Final CTA Banner ─────────────────────────────────── */
.final-cta {
  background: var(--c-main);
  padding: 72px 0;
}
.final-cta h2 {
  font-size: clamp(22px, 2.8vw, 34px);
  font-weight: 900;
  color: #ffffff;
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.4;
  border: none;
  padding: 0;
}
.final-cta .sec-title { border: none; }
.final-cta p {
  text-align: center;
  color: #c0cfe0;
  font-size: .95rem;
  margin-bottom: 36px;
  line-height: 1.8;
}
.final-cta .btn-cta {
  display: flex;
  width: auto;
  max-width: 380px;
  margin: 0 auto;
  font-size: 1.15rem;
  height: 64px;
}

/* ── Footer ───────────────────────────────────────────── */
.site-footer {
  background: #111827;
  color: #9ca3af;
  padding: 40px 0 24px;
  font-size: .82rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}
.footer-brand {
  font-size: 1rem;
  font-weight: 700;
  color: #e5e7eb;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links a {
  color: #9ca3af;
  font-size: .82rem;
}
.footer-links a:hover { color: #e5e7eb; }
.footer-copy {
  text-align: center;
  border-top: 1px solid #374151;
  padding-top: 20px;
  color: #6b7280;
  font-size: .78rem;
}

/* ── Utility ──────────────────────────────────────────── */
.text-accent { color: var(--c-accent); font-weight: 700; }
.text-main   { color: var(--c-main);   font-weight: 700; }
.mt-0  { margin-top: 0; }
.mt-16 { margin-top: 16px; }
.mt-32 { margin-top: 32px; }
.mb-0  { margin-bottom: 0; }
.mb-16 { margin-bottom: 16px; }
p { margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }

/* ── TOC ──────────────────────────────────────────────── */
.toc-box {
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 32px 0;
}
.toc-box h2 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--c-main);
  margin-bottom: 14px;
  border: none;
  padding: 0;
  display: block;
}
.toc-box ol {
  padding-left: 24px;
  font-size: .92rem;
}
.toc-box ol li { margin-bottom: 6px; }
.toc-box a { color: var(--c-main); text-decoration: underline; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 860px) {
  .container { padding: 0 16px; }

  /* FV */
  .fv-inner {
    grid-template-columns: 1fr;
  }
  .fv-text {
    padding: 40px 0 32px;
    order: 1;
  }
  .fv-image {
    order: 2;
  }
  .fv-image img { min-height: 240px; }

  /* Header */
  .site-logo { font-size: .95rem; }
  .header-cta { font-size: .85rem; padding: 8px 14px; min-width: 0; height: 40px; }

  /* Sections */
  section { padding: 48px 0; }

  /* btn */
  .btn-cta {
    width: 100%;
    min-width: 0;
    padding: 0 20px;
    font-size: 1rem;
  }
  .final-cta .btn-cta { max-width: 100%; }

  /* Table */
  .table-wrap { border-radius: 0; }

  /* grid */
  .highlight-grid { grid-template-columns: 1fr; }

  /* HowTo */
  .howto-step::before { min-width: 60px; height: 60px; font-size: .68rem; }

  /* FAQ */
  .faq-a { padding-left: 24px; }

  /* footer */
  .footer-inner { flex-direction: column; }
}

@media (max-width: 480px) {
  .fv h1 { font-size: 26px; }
  .sec-title { font-size: 20px; }
  h3 { font-size: 17px; }
  .howto-step { flex-direction: column; }
  .howto-step::before { min-width: 100%; height: 40px; border-radius: 6px; }
}


/* === Enhancements for 2-year total comparison === */
.cta-lead{
  margin: 0 0 12px;
  font-size: 0.98rem;
  line-height: 1.8;
  color: #1b2a4a;
}
.note{
  margin-top: 14px;
  font-size: 0.92rem;
  line-height: 1.8;
  color: #495057;
}
.row-total td{
  font-weight: 700;
  background: #FFF3F2;
}
.row-diff td{
  font-weight: 700;
}
.row-diff td:nth-child(2){
  color: #d93025;
}
.table-wrap table td, .table-wrap table th{
  vertical-align: top;
}


/* ===== Image Overflow Fix ===== */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

.figure-wrap {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.figure-wrap img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* ===== FV Image Fix ===== */
.fv-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.fv-image img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* Specific fix for fig03 overflow */
img[src*="fig03"] {
  max-width: 100%;
  height: auto;
}

/* ===== Responsive Fix ===== */
@media (max-width: 768px) {
  .fv {
    flex-direction: column;
  }

  .fv-image {
    margin-top: 24px;
  }
}


/* ===== v3 Fix: prevent perceived right-crop on FV and figures ===== */
/* Cache-bust via index.html ?v=1772439466 */

.fv-image {
  overflow: hidden;
}

.fv-image img {
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
  object-position: center;
}

/* Give figures inner padding so edge-to-edge artwork doesn't look clipped */
.fig-wrap {
  padding: 12px;
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.fig-wrap img {
  width: 100%;
  height: auto;
  border-radius: 0;
  box-shadow: none;
}

@media (max-width: 768px) {
  .fv-image img {
    max-height: 420px;
  }
}
/* Mapカード（カテゴリトップ）：赤を減らし、ヘッダー同等の藍色に寄せる */
#map .highlight-card .hc-num{ color: var(--c-main); }

