:root {
  --ink: #173523;
  --muted: #5d6f63;
  --paper: #fbfdf9;
  --surface: #ffffff;
  --line: #dbe9df;
  --green: #0d7c3a;
  --green-deep: #07572a;
  --green-soft: #eaf7ee;
  --cta: #f0b429;
  --cta-ink: #3e2b00;
  --edge: clamp(1.75rem, 20vw, 18rem);
  --edge-right: clamp(1rem, 3vw, 3rem);
  --header-h: 4.5rem;
  --radius: 18px;
  --shadow: 0 14px 40px rgba(18, 75, 40, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1.5rem); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.72;
}
a { color: inherit; }
button, input { font: inherit; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.025em; }
h1 { margin: 0; font-size: clamp(2.6rem, 6vw, 5.8rem); max-width: 15ch; }
h2 { margin: 0 0 1rem; font-size: clamp(1.75rem, 3vw, 2.65rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.15rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: .75rem var(--edge);
  background: rgba(251, 253, 249, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
  text-decoration: none;
}
.brand img { width: 46px; height: 46px; object-fit: contain; flex: 0 0 auto; }
.brand-mark { font-size: clamp(.9rem, 1.25vw, 1.15rem); font-weight: 850; line-height: 1.05; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 1rem; flex-wrap: nowrap; font-size: .91rem; }
.site-nav > a { text-decoration: none; white-space: nowrap; }
.nav-toggle { display: none; }
.nav-dropdown { position: relative; }
.nav-dropdown > button { border: 0; background: transparent; color: inherit; cursor: pointer; padding: .5rem 0; }
.nav-dropdown__menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  width: 17rem;
  max-height: 70vh;
  overflow: auto;
  padding: .55rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown:focus-within .nav-dropdown__menu,
.nav-dropdown.is-open .nav-dropdown__menu { display: grid; }
.nav-dropdown__menu a { padding: .6rem .75rem; border-radius: 9px; text-decoration: none; }
.nav-dropdown__menu a:hover { background: var(--green-soft); }
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: .72rem 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--cta);
  color: var(--cta-ink);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.btn-header { white-space: nowrap; }

.hero {
  padding: clamp(4.5rem, 10vw, 9rem) var(--edge) clamp(3.2rem, 7vw, 6rem);
  border-bottom: 1px solid var(--line);
}
.hero p { max-width: 62rem; font-size: clamp(1.05rem, 1.6vw, 1.28rem); color: var(--muted); }
.hero h1 + p { margin-top: 1.6rem; }
.hero p:last-child { font-size: .93rem; color: var(--green-deep); }

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(13rem, 15vw, 16rem);
  gap: clamp(2rem, 4vw, 4.5rem);
  padding: 3rem var(--edge-right) 5rem var(--edge);
  align-items: start;
}
.article { min-width: 0; }
.article > section { margin-bottom: clamp(4.2rem, 8vw, 7.5rem); }
.article > section > p { max-width: 68rem; }
.eyebrow {
  margin-bottom: .65rem !important;
  color: var(--green);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.page-toc {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  max-height: calc(100vh - var(--header-h) - 2rem);
  overflow-y: auto;
  padding-left: 1.1rem;
  border-left: 2px solid var(--line);
}
.page-toc > strong { font-size: .88rem; text-transform: uppercase; letter-spacing: .08em; }
.page-toc > p { margin: .2rem 0 .9rem; color: var(--muted); font-size: .8rem; }
.page-toc nav { display: grid; gap: .38rem; }
.page-toc__link {
  display: grid;
  grid-template-columns: 2rem 1fr;
  align-items: center;
  padding: .48rem .45rem;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: .84rem;
  line-height: 1.3;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}
.page-toc__link span {
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-deep);
  font-weight: 850;
  font-size: .67rem;
}
.page-toc__link:hover { transform: translateX(3px); color: var(--green-deep); background: #fff; }
.page-toc__link.is-active { color: var(--green-deep); background: #fff; box-shadow: 0 6px 18px rgba(18, 75, 40, .08); }
.page-toc__link.is-active span { background: var(--cta); color: var(--cta-ink); }

.author-card {
  display: grid;
  grid-template-columns: 3.3rem 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.author-avatar {
  display: block;
  width: 3.3rem;
  height: 3.3rem;
  border-radius: 50%;
  overflow: hidden;
  background: var(--green-soft);
}
.author-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.author-card strong, .author-card span { display: block; }
.author-card strong a { text-decoration: none; }
.author-card span { color: var(--green-deep); font-size: .88rem; }
.author-card p { margin: .25rem 0 0; color: var(--muted); font-size: .92rem; }
.author-card .author-verification { color: var(--ink); font-weight: 750; }
.author-card--compact { margin-bottom: 3rem !important; }

.author-profile__intro {
  display: grid;
  grid-template-columns: minmax(13rem, 20rem) 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.author-profile__intro > img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.expertise-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  padding: 0;
  list-style: none;
}
.expertise-list li {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.professional-link {
  display: inline-flex;
  padding: .7rem 1rem;
  border-radius: 999px;
  font-weight: 750;
}
.professional-link.is-disabled { color: var(--muted); background: #e8ece8; }

.affiliate-note { color: var(--muted); font-size: .82rem; }
.rank-cards { display: grid; gap: .85rem; margin-top: 1.4rem; min-width: 0; }
.rank-card--row {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, .9fr) minmax(0, 1.5fr) minmax(0, .7fr) minmax(7.5rem, .8fr);
  gap: 1rem;
  align-items: center;
  padding: 1.05rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 5px 20px rgba(18, 75, 40, .04);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.rank-card--row:hover { transform: translateY(-4px); border-color: var(--cta); box-shadow: var(--shadow); }
.rank-card--row > * { min-width: 0; }
.rank-card__badge {
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 50%;
  color: white;
  background: var(--green-deep);
  font-size: 1.05rem;
  font-weight: 900;
}
.rank-card__brand { min-width: 0; }
.rank-card__brand img { width: 100%; max-width: 105px; height: 52px; object-fit: contain; object-position: left center; }
.rank-card__name { margin: .1rem 0; font-weight: 850; line-height: 1.2; }
.rank-card__stars { white-space: nowrap; font-size: .78rem; }
.rank-card__star { color: #d7dfd8; }
.rank-card__star.is-on { color: var(--cta); }
.rank-card__features { margin: 0; padding-left: 1.15rem; font-size: .85rem; color: var(--muted); }
.rank-card__features li { margin: .1rem 0; }
.rank-card__bonus { font-size: .88rem; font-weight: 750; }
.rank-card__bonus-label { display: block; color: var(--muted); font-size: .72rem; font-weight: 600; text-transform: uppercase; }
.rank-card__cta .btn { width: 100%; }
.rank-card__cta .is-disabled { background: #e8ece8; color: #7b877f; cursor: not-allowed; }

.pay-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 1rem;
}
.pay-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: .4rem;
  padding: 1.15rem 1.2rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 5px 20px rgba(18, 75, 40, .04);
  cursor: pointer;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.pay-card:hover, .pay-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--cta);
  box-shadow: var(--shadow);
}
.pay-card:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--cta) 35%, transparent);
  outline-offset: 3px;
}
.pay-card__logo {
  width: 100%;
  max-width: 12rem;
  height: 2.7rem;
  margin-bottom: .55rem;
  object-fit: contain;
  object-position: left center;
}
.pay-card__name { font-weight: 850; line-height: 1.25; }
.pay-card__note { color: var(--muted); font-size: .87rem; line-height: 1.5; }
.pay-card__link { display: inline-flex; align-items: center; gap: .3rem; margin-top: .3rem; color: var(--green-deep); font-weight: 800; font-size: .85rem; }
.pay-card__link::after { content: " →"; }
.pay-card:hover .pay-card__link, .pay-card:focus-visible .pay-card__link { color: var(--green); }

.steps { counter-reset: item; list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding: 0; }
.steps li { padding: 1.25rem; background: var(--green-soft); border-radius: var(--radius); }
.steps strong, .steps span { display: block; }
.steps strong { margin-bottom: .35rem; color: var(--green-deep); }
.steps span { color: var(--muted); font-size: .92rem; }

.table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
table { display: table; width: 100%; min-width: 36rem; table-layout: auto; border-collapse: collapse; }
th, td { padding: .9rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--green-deep); color: white; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }
tbody th { position: sticky; left: 0; background: #f5faf6; color: var(--green-deep); }
tr:last-child th, tr:last-child td { border-bottom: 0; }

.notice, .responsible {
  padding: 1.4rem;
  border-radius: var(--radius);
  background: #fff8df;
  border: 1px solid #eed890;
}
.notice p, .responsible p { margin: .4rem 0 0; }
.faq { border-top: 1px solid var(--line); }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.acc-trigger span { transition: transform .2s ease; }
.acc-trigger[aria-expanded="true"] span { transform: rotate(180deg); }
.acc-panel { display: none; color: var(--muted); }
.acc-panel.is-open { display: block; }

footer {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 2rem;
  padding: 3rem var(--edge);
  color: #e8f7ed;
  background: var(--green-deep);
}
footer a { display: block; margin-bottom: .4rem; }
footer p { color: #bdd9c6; }
.to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 50%;
  color: white;
  background: var(--green);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: .2s ease;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }

@media (max-width: 1280px) {
  :root { --edge: clamp(1.25rem, 7vw, 6rem); }
}

/* Below 1100px the right rail is too narrow, so the TOC becomes a sticky top panel */
@media (max-width: 1099px) {
  html { scroll-padding-top: calc(var(--header-h) + 5.5rem); }
  .content-layout { grid-template-columns: minmax(0, 1fr); padding-right: var(--edge); }
  .page-toc--rail {
    order: -1;
    z-index: 20;
    top: var(--header-h);
    max-height: none;
    overflow: visible;
    margin-bottom: 2rem;
    padding: .7rem .9rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(251, 253, 249, .97);
    backdrop-filter: blur(12px);
  }
  .page-toc--rail > p { display: none; }
  .page-toc--rail > strong { display: block; margin-bottom: .45rem; }
  .page-toc--rail nav { display: flex; flex-wrap: wrap; gap: .4rem; }
  .page-toc--rail .page-toc__link { grid-template-columns: auto auto; gap: .45rem; border: 1px solid var(--line); background: var(--surface); }
  .page-toc--rail .page-toc__link:hover { transform: translateY(-2px); }
  .rank-card--row { grid-template-columns: 2.8rem minmax(0, .85fr) minmax(0, 1.4fr) minmax(0, .7fr) minmax(7rem, .75fr); }
}

@media (max-width: 860px) {
  :root { --edge: clamp(.875rem, 10vw, 9rem); --header-h: 4rem; }
  html { scroll-padding-top: calc(var(--header-h) + 1rem); }
  .site-header { flex-wrap: wrap; padding: .65rem var(--edge); }
  .brand { max-width: calc(100% - 5rem); }
  .brand img { width: 40px; height: 40px; }
  .brand-mark { font-size: clamp(.78rem, 3.1vw, 1rem); }
  .nav-toggle { display: inline-flex; margin-left: auto; border: 1px solid var(--line); border-radius: 999px; padding: .45rem .7rem; background: white; }
  .site-nav { display: none; flex: 1 0 100%; width: 100%; flex-wrap: wrap; margin: 0; padding: .7rem 0 .25rem; }
  .site-nav.is-open { display: flex; }
  .nav-dropdown { width: 100%; }
  .nav-dropdown__menu { position: static; width: 100%; box-shadow: none; margin-top: .4rem; }
  .btn-header { width: 100%; }
  .hero { padding-top: 4rem; }
  .content-layout { display: block; padding: 2rem var(--edge) 4rem; }
  .page-toc { display: none; }
  .article > section { margin-bottom: 4.2rem; }
  .rank-card--row {
    grid-template-columns: 2.55rem minmax(0, 1fr);
    gap: .7rem;
    padding: .8rem;
  }
  .rank-card__badge { width: 2.3rem; height: 2.3rem; }
  .rank-card__features, .rank-card__bonus { grid-column: 2; flex: 0 0 auto; }
  .rank-card__features { padding-left: 1rem; }
  .rank-card__cta { grid-column: 1 / -1; }
  .pay-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .pay-card { padding: .8rem .85rem .95rem; gap: .3rem; }
  .pay-card__logo { height: 2.1rem; max-width: 100%; margin-bottom: .35rem; }
  .pay-card__name { font-size: .95rem; }
  .pay-card__note { font-size: .8rem; line-height: 1.45; }
  .pay-card__link { font-size: .8rem; }
  .steps { grid-template-columns: 1fr; }
  .author-profile__intro, .expertise-list { grid-template-columns: 1fr; }
  .author-profile__intro > img { max-width: 18rem; }
  footer { grid-template-columns: 1fr; padding: 2.2rem var(--edge); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  .rank-card--row:hover, .page-toc__link:hover, .pay-card:hover, .pay-card:focus-visible { transform: none; }
}
