/* =========================================================
   退職代行サービス 比較記事 LP — styles.css
   Palette: navy #1E3A8A / white / accent #F59E0B
   Type:    Noto Sans JP (本文) / Inter (数字・英字)
   ========================================================= */

:root {
  --navy:        #1E3A8A;
  --navy-700:    #1B3478;
  --navy-50:     #EEF2FB;
  --navy-100:    #DDE4F4;
  --orange:      #F59E0B;
  --orange-50:   #FFF6E5;
  --ink:         #111827;
  --ink-2:       #374151;
  --ink-3:       #6B7280;
  --line:        #E5E7EB;
  --line-2:      #D1D5DB;
  --bg:          #FFFFFF;
  --bg-soft:     #F9FAFB;
  --ok:          #047857;
  --warn:        #B45309;
  --shadow-sm:   0 1px 2px rgba(17,24,39,.05);
  --shadow-md:   0 4px 14px rgba(17,24,39,.08);
  --radius:      8px;
  --radius-lg:   14px;
  --maxw:        1120px;
  --sidebar-w:   260px;

  --f-sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --f-num:  "Inter", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--f-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--navy-700); }

p { margin: 0 0 1em; }
ul, ol { padding-left: 1.4em; margin: 0 0 1em; }
li { margin: .25em 0; }
strong { font-weight: 700; }

/* numbers / english use Inter */
.num, time, .price { font-family: var(--f-num); font-feature-settings: "tnum" 1; }

/* ================== Top Bar ================== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 12px 20px;
  display: flex; align-items: center; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; color: var(--navy); text-decoration: none;
  letter-spacing: .02em;
}
.brand__mark {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--navy);
  display: grid; place-items: center;
  color: #fff; font-family: var(--f-num); font-weight: 700; font-size: 13px;
}
.brand__name { font-size: 15px; }
.brand__sub { font-size: 11px; color: var(--ink-3); font-weight: 500; }
.topbar__meta { margin-left: auto; display: flex; gap: 12px; align-items: center; font-size: 12px; color: var(--ink-3); }
.topbar__meta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); display: inline-block; }
@media (max-width: 720px){ .topbar__meta { display: none; } }

/* ================== Breadcrumb ================== */
.crumbs {
  max-width: var(--maxw); margin: 0 auto;
  padding: 12px 20px 0;
  font-size: 12px; color: var(--ink-3);
}
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li::after { content: "›"; margin-left: 6px; color: var(--line-2); }
.crumbs li:last-child::after { content: ""; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--navy); text-decoration: underline; }

/* ================== Hero ================== */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: 24px 20px 8px;
}
.hero__kicker {
  display: inline-block; font-size: 12px; font-weight: 700;
  color: var(--navy); background: var(--navy-50);
  padding: 4px 10px; border-radius: 999px; letter-spacing: .04em;
}
.hero h1 {
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.45; margin: 14px 0 12px;
  letter-spacing: .01em;
}
.hero__lead {
  color: var(--ink-2); max-width: 780px; font-size: 16px;
}
.hero__metabar {
  display: flex; flex-wrap: wrap; gap: 18px;
  margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line);
  font-size: 12px; color: var(--ink-3);
}
.hero__metabar span strong { color: var(--ink); font-weight: 600; }
.hero__metabar .updated {
  margin-left: auto;
  background: #fff; border: 1px solid var(--line);
  padding: 4px 10px; border-radius: 6px;
}

/* ================== Layout ================== */
.layout {
  max-width: var(--maxw); margin: 0 auto;
  padding: 24px 20px 48px;
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 40px;
  align-items: start;
}
@media (max-width: 960px){
  .layout { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
}

/* ================== TOC (sticky sidebar) ================== */
.toc {
  position: sticky; top: 80px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  font-size: 13px;
  background: var(--bg-soft);
  max-height: calc(100vh - 100px); overflow: auto;
}
.toc__title {
  font-size: 11px; font-weight: 700; letter-spacing: .12em;
  color: var(--ink-3); text-transform: uppercase;
  margin-bottom: 10px;
}
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.toc li { counter-increment: toc; margin: 0; }
.toc li a {
  display: block; padding: 7px 0 7px 28px;
  color: var(--ink-2); text-decoration: none;
  position: relative; line-height: 1.5;
  border-radius: 4px;
}
.toc li a::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute; left: 0; top: 7px;
  font-family: var(--f-num); font-size: 11px; color: var(--ink-3);
  font-weight: 600;
}
.toc li a:hover { color: var(--navy); }
.toc li a.is-active {
  color: var(--navy); font-weight: 600;
  background: var(--navy-50);
  padding-left: 32px;
}
.toc li a.is-active::before { left: 6px; color: var(--navy); }

/* ================== Article ================== */
.article { min-width: 0; }
.article h2 {
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.45;
  margin: 56px 0 18px;
  padding: 0 0 12px 14px;
  border-left: 5px solid var(--navy);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 80px;
}
.article h2 .h2num {
  font-family: var(--f-num); font-size: 13px; font-weight: 700;
  color: var(--navy); display: block; letter-spacing: .12em;
  margin-bottom: 4px;
}
.article h3 {
  font-size: 19px; line-height: 1.5;
  margin: 32px 0 10px;
}
.article h4 { font-size: 16px; margin: 20px 0 8px; }

/* lead under h2 */
.lead {
  background: var(--navy-50);
  border-left: 3px solid var(--navy);
  padding: 12px 16px;
  font-weight: 600; color: var(--navy-700);
  border-radius: 0 6px 6px 0;
  margin: 0 0 20px;
  font-size: 15px;
}

/* ================== Definition card (Ch.1) ================== */
.deftypes {
  display: grid; gap: 14px;
  grid-template-columns: repeat(3, 1fr);
  margin: 18px 0 8px;
}
@media (max-width: 720px){ .deftypes { grid-template-columns: 1fr; } }
.deftype {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: #fff;
}
.deftype__tag {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  display: inline-block; padding: 3px 8px; border-radius: 4px;
  background: var(--navy-50); color: var(--navy);
  margin-bottom: 8px;
}
.deftype--law .deftype__tag { background: #ECFDF5; color: var(--ok); }
.deftype--union .deftype__tag { background: #FFF6E5; color: var(--warn); }
.deftype--private .deftype__tag { background: #F3F4F6; color: var(--ink-2); }
.deftype h4 { margin: 0 0 6px; font-size: 16px; }
.deftype p { font-size: 13px; color: var(--ink-2); margin: 0; line-height: 1.7; }
.deftype__range {
  font-family: var(--f-num); font-size: 12px; color: var(--ink-3);
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line);
}

/* ================== Criteria (Ch.2) ================== */
.criteria {
  list-style: none; padding: 0; margin: 14px 0;
  display: grid; gap: 10px;
}
.criteria li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.criteria__n {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: grid; place-items: center;
  font-family: var(--f-num); font-weight: 700; font-size: 15px;
}
.criteria__body strong { display: block; font-size: 15px; margin-bottom: 2px; }
.criteria__body p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.7; }

/* ================== Comparison Table (Ch.3) ================== */
.compare-wrap {
  position: relative;
  margin: 16px 0 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.compare-meta {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  font-size: 12px; color: var(--ink-3);
}
.compare-meta .updated-tag {
  background: #fff; border: 1px solid var(--line);
  padding: 3px 8px; border-radius: 4px;
  font-family: var(--f-num);
}
.compare-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table.compare {
  width: 100%; min-width: 720px;
  border-collapse: separate; border-spacing: 0;
  font-size: 13.5px;
}
table.compare thead th {
  position: sticky; top: 60px; z-index: 5;
  background: var(--navy); color: #fff;
  font-weight: 600; text-align: left;
  padding: 12px 12px;
  border-right: 1px solid rgba(255,255,255,.15);
  white-space: nowrap;
}
table.compare thead th:first-child { padding-left: 16px; }
table.compare thead th:last-child { border-right: 0; }
table.compare tbody td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  background: #fff;
}
table.compare tbody tr:last-child td { border-bottom: 0; }
table.compare tbody tr:hover td { background: var(--navy-50); }
table.compare td:first-child {
  padding-left: 16px;
  font-weight: 700;
  position: sticky; left: 0;
  background: #fff;
  border-right: 1px solid var(--line);
  min-width: 130px;
}
table.compare tbody tr:hover td:first-child { background: var(--navy-50); }
.svc-tag {
  display: inline-block; font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 3px;
  margin-top: 4px;
  letter-spacing: .04em;
}
.svc-tag--law { background: #ECFDF5; color: var(--ok); }
.svc-tag--union { background: #FFF6E5; color: var(--warn); }
.svc-tag--private { background: #F3F4F6; color: var(--ink-2); }

.cell-yes { color: var(--ok); font-weight: 700; }
.cell-no { color: var(--ink-3); }
.cell-est {
  display: inline-block; font-family: var(--f-num);
  font-size: 10px; font-weight: 700;
  background: var(--orange-50); color: var(--warn);
  padding: 1px 6px; border-radius: 3px;
  margin-left: 6px; letter-spacing: .04em;
  vertical-align: 1px;
}
.cell-src {
  display: block; font-size: 10.5px; color: var(--ink-3);
  margin-top: 4px;
}
.cell-src a { color: var(--ink-3); }

/* legend */
.compare-legend {
  display: flex; flex-wrap: wrap; gap: 14px;
  padding: 10px 14px;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--ink-3);
}
.compare-legend b { color: var(--ink-2); }

/* ================== Service cards (Ch.3 detail) ================== */
.service {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 16px 0;
  background: #fff;
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 720px){ .service { grid-template-columns: 1fr; } }
.service__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.service__rank {
  font-family: var(--f-num);
  width: 32px; height: 32px; border-radius: 6px;
  background: var(--navy-50); color: var(--navy);
  display: grid; place-items: center;
  font-weight: 700; font-size: 14px;
}
.service h3 { margin: 0; font-size: 18px; }
.service__type { font-size: 11px; color: var(--ink-3); }
.service__desc { font-size: 14px; color: var(--ink-2); margin: 8px 0 12px; line-height: 1.8; }
.service__facts {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-bottom: 10px;
}
.fact {
  border: 1px solid var(--line); border-radius: 6px;
  padding: 8px 10px; background: var(--bg-soft);
}
.fact__label { font-size: 10.5px; color: var(--ink-3); letter-spacing: .04em; }
.fact__value { font-family: var(--f-num); font-weight: 700; font-size: 14px; color: var(--ink); }
.service__src { font-size: 11px; color: var(--ink-3); margin-top: 6px; }
.service__src a { color: var(--ink-3); }
.service__cta {
  border-left: 1px dashed var(--line);
  padding-left: 20px;
  display: flex; flex-direction: column; gap: 8px;
}
@media (max-width: 720px){
  .service__cta { border-left: 0; padding-left: 0; border-top: 1px dashed var(--line); padding-top: 14px; }
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px; font-weight: 700; font-size: 14px;
  border-radius: 8px; text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .06s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--orange); color: #fff; box-shadow: 0 2px 0 #C77E04; }
.btn--primary:hover { background: #E08F08; color: #fff; }
.btn--ghost {
  background: #fff; color: var(--navy);
  border-color: var(--navy-100);
}
.btn--ghost:hover { background: var(--navy-50); }
.btn small { font-weight: 500; opacity: .85; font-size: 11px; }

/* ================== Fit / Unfit blocks ([uAUogEprOs] Codex aff 改善) ================== */
.fitblock {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0 12px;
  font-size: 12.5px;
}
@media (max-width: 720px){ .fitblock { grid-template-columns: 1fr; } }
.fitblock__col {
  border-radius: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
}
.fitblock__col--fit {
  background: #ECFDF5;
  border-color: #A7F3D0;
}
.fitblock__col--unfit {
  background: var(--bg-soft);
  border-color: var(--line);
}
.fitblock__title {
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: .04em;
  margin-bottom: 6px;
}
.fitblock__col--fit .fitblock__title { color: var(--ok); }
.fitblock__col--unfit .fitblock__title { color: var(--ink-3); }
.fitblock ul { padding-left: 18px; margin: 0; }
.fitblock li { margin: 2px 0; line-height: 1.6; color: var(--ink-2); }

/* ================== Steps (Ch.4) ================== */
.steps {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; margin: 18px 0;
  counter-reset: step;
}
@media (max-width: 720px){ .steps { grid-template-columns: 1fr 1fr; } }
.step {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; background: #fff;
  position: relative;
  counter-increment: step;
}
.step::before {
  content: "STEP " counter(step);
  display: block;
  font-family: var(--f-num); font-size: 10.5px; font-weight: 700;
  color: var(--orange); letter-spacing: .12em;
  margin-bottom: 6px;
}
.step h4 { margin: 0 0 6px; font-size: 15px; }
.step p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.step__time { font-family: var(--f-num); font-size: 11px; color: var(--ink-3); margin-top: 8px; display: block; }

/* ================== Failure cases (Ch.5) ================== */
.fails { display: grid; gap: 12px; margin: 14px 0; }
.fail {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; background: #fff;
  display: grid; grid-template-columns: 80px 1fr; gap: 14px; align-items: start;
}
.fail__icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--orange-50); color: var(--warn);
  display: grid; place-items: center;
  font-family: var(--f-num); font-weight: 700; font-size: 22px;
}
.fail h4 { margin: 0 0 6px; font-size: 15px; }
.fail p { margin: 0 0 6px; font-size: 13.5px; color: var(--ink-2); line-height: 1.75; }
.fail__lesson {
  font-size: 12.5px; padding: 8px 10px;
  background: var(--bg-soft); border-left: 3px solid var(--navy);
  border-radius: 0 4px 4px 0;
  color: var(--ink-2);
}
.fail__lesson b { color: var(--navy); }

/* ================== FAQ (Ch.6) ================== */
.faq { display: grid; gap: 8px; margin: 14px 0; }
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 14px 44px 14px 48px;
  font-weight: 600; font-size: 14.5px; color: var(--ink);
  position: relative;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "Q"; font-family: var(--f-num); font-weight: 700;
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: grid; place-items: center; font-size: 12px;
}
.faq summary::after {
  content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-family: var(--f-num); color: var(--ink-3); font-size: 22px; line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq__a {
  padding: 4px 16px 16px 48px;
  font-size: 13.5px; color: var(--ink-2); line-height: 1.85;
  border-top: 1px solid var(--line);
  position: relative;
  background: var(--bg-soft);
}
.faq__a::before {
  content: "A"; font-family: var(--f-num); font-weight: 700;
  position: absolute; left: 16px; top: 14px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--orange); color: #fff;
  display: grid; place-items: center; font-size: 12px;
}
.faq__a { padding-top: 14px; }

/* ================== Editorial policy (Ch.7) ================== */
.policy {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px; background: var(--bg-soft);
  margin: 14px 0;
}
.policy dl {
  display: grid; grid-template-columns: 140px 1fr; gap: 8px 18px;
  margin: 0; font-size: 13.5px;
}
@media (max-width: 560px){ .policy dl { grid-template-columns: 1fr; gap: 2px 0; } }
.policy dt { color: var(--ink-3); font-weight: 600; padding-top: 2px; }
.policy dd { margin: 0; color: var(--ink-2); padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.policy dd:last-of-type { border-bottom: 0; }
.policy dd a { color: var(--navy); }

/* ================== Summary CTA (Ch.8) ================== */
.summary-cta {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-700) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  margin: 18px 0 0;
}
.summary-cta h3 { color: #fff; margin: 0 0 10px; font-size: 20px; }
.summary-cta p { color: rgba(255,255,255,.86); font-size: 14px; }
.summary-cta__row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.summary-cta .btn--primary { box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.summary-cta .btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.summary-cta .btn--ghost:hover { background: rgba(255,255,255,.08); color: #fff; }

/* ================== Footer ================== */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  margin-top: 48px;
  padding: 28px 20px;
  font-size: 12px; color: var(--ink-3);
  text-align: center;
}
.footer a { color: var(--ink-3); margin: 0 8px; }

/* ================== Cookie banner ================== */
.cmp {
  position: fixed; left: 16px; right: 16px; bottom: 16px;
  z-index: 80;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  max-width: 720px;
  margin: 0 auto;
  font-size: 12.5px; color: var(--ink-2);
}
.cmp p { margin: 0; }
.cmp__buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.cmp button {
  font-family: inherit;
  font-size: 12px; font-weight: 600;
  padding: 8px 12px; border-radius: 6px;
  border: 1px solid var(--line); cursor: pointer;
  background: #fff; color: var(--ink-2);
}
.cmp button.primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.cmp.is-hidden { display: none; }

/* ================== Affiliate disclosure ================== */
.affdisc {
  font-size: 11px; color: var(--ink-3);
  background: var(--bg-soft);
  border: 1px dashed var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  margin: 12px 0 0;
}

/* ================== Highlight TOC active state ================== */
@media (prefers-reduced-motion: no-preference) {
  .toc li a { transition: background .15s ease, color .15s ease; }
}
