/* =========================================================
   仮想通貨トラブル・詐欺対策リサーチデスク
   Design: "Forensic Ledger" — 捜査資料 × ブロックチェーン鑑識
   Display: Shippori Mincho B1 / Body: Noto Sans JP / Data: IBM Plex Mono
   ========================================================= */

:root {
  /* palette */
  --ink: #0d1524;
  /* 墨紺：基幹 */
  --ink-2: #16233e;
  /* 墨紺の階調 */
  --paper: #f3f5f9;
  /* 冷白：地 */
  --card: #ffffff;
  --text: #232c3e;
  --muted: #5e6a7e;
  --hairline: #d8dfe9;
  --hairline-dark: rgba(255, 255, 255, .14);
  --blue: #1c4fd8;
  /* 青写真 */
  --gold: #b8862b;
  /* 順位の金 */
  --gold-deep: #8f6a1e;
  --gold-soft: #faf4e4;
  --alert: #d6453a;
  /* 朱：警告・押印 */
  --alert-soft: #fdeeec;
  --green: #06c755;
  /* LINE機能色 */
  --green-deep: #05a648;

  /* type */
  --display: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --body: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --mono: "IBM Plex Mono", "Menlo", "Consolas", monospace;

  --radius: 4px;
  --shadow-card: 0 1px 2px rgba(13, 21, 36, .05), 0 8px 28px rgba(13, 21, 36, .07);
  --shadow-pop: 0 2px 6px rgba(13, 21, 36, .12), 0 18px 48px rgba(13, 21, 36, .18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.85;
  word-break: normal;
  line-break: strict;
  overflow-wrap: break-word;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

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

::selection {
  background: var(--ink);
  color: #fff;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* ---------- utility type ---------- */

.eyebrow {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  display: flex;
  align-items: center;
  gap: 12px;
}

.eyebrow::after {
  content: "";
  height: 1px;
  width: 56px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

/* =========================================================
   Header
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(13, 21, 36, .92);
  border-bottom: 1px solid var(--hairline-dark);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #e8edf6;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .04em;
}

.brand-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--alert);
  border-radius: 3px;
  color: #ff8a80;
  font-family: var(--display);
  font-weight: 800;
  font-size: 15px;
  background: rgba(214, 69, 58, .12);
}

.nav {
  display: flex;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .05em;
}

.nav a {
  text-decoration: none;
  color: #aab6ca;
  padding: 8px 13px;
  border-radius: 3px;
  transition: color .18s, background-color .18s;
}

.nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .07);
}

/* =========================================================
   Hero — 鑑識台帳
   ========================================================= */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #f0f3f9;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(13, 21, 36, .97) 0%, rgba(13, 21, 36, .88) 46%, rgba(13, 21, 36, .55) 100%),
    url("images/hero1.png") center / cover no-repeat;
}

/* 台帳グリッド：極細の罫線レイヤー */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 80% at 70% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 70% 40%, #000 30%, transparent 80%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 92px 0 72px;
}

.hero-copy {
  width: min(840px, 100%);
}

.hero-eyebrow {
  margin: 0 0 22px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .26em;
  color: #8fa3c4;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--gold);
}

.nowrap {
  display: inline-block;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.alert-pill {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px 7px 9px;
  border: 1px solid rgba(214, 69, 58, .55);
  border-radius: 3px;
  background: rgba(214, 69, 58, .14);
  color: #ffb4ac;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .06em;
}

.alert-pill span {
  width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  border-radius: 2px;
  background: var(--alert);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.hero h1 {
  margin: 24px 0 22px;
  font-family: var(--display);
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.34;
  font-weight: 800;
  letter-spacing: .015em;
  word-break: keep-all;
  overflow-wrap: normal;
  text-wrap: balance;
}

.hero h1 em {
  font-style: normal;
  color: #fff;
  position: relative;
  display: inline-block;
  padding: 0 2px;
}

/* 朱の傍線 — 校閲の赤入れ */
.hero h1 em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: .03em;
  height: .18em;
  background: var(--alert);
  z-index: -1;
  opacity: .85;
}

.hero p {
  max-width: 640px;
  margin: 0;
  color: #b9c5d8;
  font-size: 16px;
  font-weight: 400;
  line-height: 2;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

/* hero下部のデータストリップ */
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 46px;
  border-top: 1px solid var(--hairline-dark);
  width: min(640px, 100%);
}

.hero-meta div {
  padding: 16px 28px 2px 0;
  margin-right: 28px;
  border-right: 1px solid var(--hairline-dark);
}

.hero-meta div:last-child {
  border-right: 0;
  margin-right: 0;
}

.hero-meta strong {
  display: block;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  letter-spacing: .02em;
}

.hero-meta span {
  font-size: 11.5px;
  color: #8593aa;
  letter-spacing: .08em;
  font-weight: 500;
}

/* page-load sequence */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy>* {
    opacity: 0;
    transform: translateY(14px);
    animation: heroRise .7s cubic-bezier(.2, .7, .2, 1) forwards;
  }

  .hero-copy> :nth-child(1) {
    animation-delay: .05s;
  }

  .hero-copy> :nth-child(2) {
    animation-delay: .14s;
  }

  .hero-copy> :nth-child(3) {
    animation-delay: .26s;
  }

  .hero-copy> :nth-child(4) {
    animation-delay: .38s;
  }

  .hero-copy> :nth-child(5) {
    animation-delay: .5s;
  }

  .hero-copy> :nth-child(6) {
    animation-delay: .62s;
  }
}

@keyframes heroRise {
  to {
    opacity: 1;
    transform: none;
  }
}

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius);
  padding: 14px 28px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-light {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset;
}

.btn-light:hover {
  background: #e9eef6;
}

.btn-dark {
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
}

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

.btn-line {
  background: var(--green);
  color: #fff;
  box-shadow: 0 6px 18px rgba(6, 199, 85, .32);
}

.btn-line::after {
  content: "›";
  font-family: var(--mono);
  font-size: 17px;
  margin-left: 2px;
  transition: transform .16s ease;
}

.btn-line:hover {
  background: var(--green-deep);
  box-shadow: 0 8px 22px rgba(6, 199, 85, .4);
}

.btn-line:hover::after {
  transform: translateX(3px);
}

.btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* =========================================================
   Layout / TOC
   ========================================================= */

.layout {
  /* 左もくじと同幅の空き列を右に置き、本文をページ中央に揃える */
  width: min(1392px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 248px minmax(0, 800px) 248px;
  justify-content: center;
  gap: 48px;
  padding: 64px 0 96px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 84px;
}

.toc-box {
  border-left: 2px solid var(--ink);
  padding: 4px 0 4px 0;
}

.toc-box h2 {
  margin: 0 0 14px;
  padding-left: 18px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc-box a {
  display: block;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -2px;
  line-height: 1.6;
  transition: color .16s, border-color .16s;
}

.toc-box a:hover {
  color: var(--ink);
  border-left-color: var(--alert);
}

/* =========================================================
   Sections
   ========================================================= */

.content {
  min-width: 0;
}

.section {
  margin-bottom: 88px;
}

.section:last-child {
  margin-bottom: 0;
}

.section-title {
  display: block;
  margin-bottom: 26px;
}

.section-title h2,
.headline {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  line-height: 1.45;
  color: var(--ink);
  letter-spacing: .01em;
}

.section-icon {
  display: none;
}

.lead {
  margin: 14px 0 30px;
  color: var(--muted);
  font-size: 15px;
  max-width: 640px;
}

/* scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* =========================================================
   危険度チェック
   ========================================================= */

.diagnosis-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--alert);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 14px 34px;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 17px 0;
  font-size: 15.5px;
  font-weight: 500;
  border-bottom: 1px dashed var(--hairline);
}

.check-list li:last-child {
  border-bottom: 0;
}

.check-icon {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 3px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--alert);
  border-radius: 2px;
  color: var(--alert);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  background: var(--alert-soft);
}

.diagnosis-call {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 34px;
  background: var(--ink);
  color: #e8edf6;
}

.diagnosis-call p {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  max-width: 460px;
}

.diagnosis-call .btn-dark {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}

.diagnosis-call .btn-dark:hover {
  background: #e9eef6;
}

/* =========================================================
   Ranking — 鑑識台帳カード
   ========================================================= */

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.rank-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.rank-card.is-first {
  border: 1.5px solid var(--gold);
  box-shadow: 0 2px 8px rgba(184, 134, 43, .14), 0 22px 56px rgba(13, 21, 36, .12);
}

/* ---- rank label：CASE No. 帯 ---- */
.rank-label {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 28px;
  background: var(--ink);
  color: #fff;
  border-bottom: 1px solid var(--hairline);
}

.rank-label span {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  color: #c4cfdf;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.rank-label span::before {
  content: "RANK";
  font-size: 10px;
  letter-spacing: .26em;
  color: #7c8aa1;
}

.is-first .rank-label {
  background: linear-gradient(95deg, #1a2440, var(--ink));
}

.is-first .rank-label span {
  color: #ecd9a8;
}

.is-first .rank-label span::before {
  color: var(--gold);
}

/* 朱印「最注目」 */
.rank-label strong {
  margin-left: auto;
  font-family: var(--display);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .3em;
  text-indent: .3em;
  color: var(--alert);
  border: 1.8px solid var(--alert);
  border-radius: 3px;
  padding: 4px 10px;
  background: #fff;
  transform: rotate(-3deg);
  box-shadow: 0 2px 6px rgba(214, 69, 58, .25);
}

/* ---- main ---- */
.rank-main {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  grid-template-areas:
    "logo head"
    "logo body";
  gap: 6px 34px;
  padding: 30px 28px 26px;
}

.company-head {
  grid-area: head;
}

.company-tag {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--gold-deep);
  text-transform: uppercase;
}

.company-head h3 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: clamp(21px, 2.4vw, 27px);
  font-weight: 800;
  line-height: 1.4;
  color: var(--ink);
}

.company-logo {
  grid-area: logo;
  align-self: start;
}

.company-logo img {
  width: 100%;
  border: 1px solid var(--hairline);
  border-radius: 3px;
}

.company-body {
  grid-area: body;
  min-width: 0;
}

.company-headline {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.75;
}

.company-text {
  margin: 0 0 18px;
  font-size: 14.5px;
  color: var(--muted);
}

.fact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.fact-list span {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .03em;
  padding: 5px 11px;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  background: var(--paper);
  color: var(--text);
}

.is-first .fact-list span {
  border-color: #e7d6ab;
  background: var(--gold-soft);
  color: var(--gold-deep);
}

.point-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 22px;
  border-top: 1px solid var(--hairline);
}

.point-list div {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 2px;
  font-size: 14.5px;
  font-weight: 600;
  border-bottom: 1px solid var(--hairline);
}

.point-list span {
  flex: none;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-deep);
}

/* ---- detail table：台帳 ---- */
.rank-detail {
  border-top: 1px solid var(--hairline);
  background: #fafbfd;
  padding: 6px 28px 22px;
}

.rank-detail table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.rank-detail th {
  width: 128px;
  padding: 11px 18px 11px 0;
  text-align: left;
  vertical-align: top;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--muted);
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}

.rank-detail td {
  padding: 11px 0;
  border-bottom: 1px solid var(--hairline);
  font-weight: 500;
}

.rank-detail tr:last-child th,
.rank-detail tr:last-child td {
  border-bottom: 0;
}

/* ---- 4位以降 ---- */
.ranking-more {
  border: 1px dashed #b9c3d3;
  border-radius: var(--radius);
  background: transparent;
}

.ranking-more summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  transition: background-color .16s;
  user-select: none;
}

.ranking-more summary::-webkit-details-marker {
  display: none;
}

.ranking-more summary::after {
  content: "＋";
  font-family: var(--mono);
  font-weight: 600;
  color: var(--gold-deep);
  transition: transform .2s;
}

.ranking-more[open] summary::after {
  content: "－";
}

.ranking-more summary:hover {
  background: rgba(13, 21, 36, .03);
}

.ranking-more summary small {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--muted);
  font-weight: 500;
}

.ranking-more-list {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: 4px 0 0;
  margin-top: 4px;
}

.ranking-more[open] {
  border-color: transparent;
}

.ranking-more[open] summary {
  border: 1px dashed #b9c3d3;
  border-radius: var(--radius);
  margin-bottom: 28px;
}

/* =========================================================
   画像セクション
   ========================================================= */

.visual-section {
  margin-bottom: 48px;
}

.visual-section img {
  width: 100%;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

/* =========================================================
   FAQ
   ========================================================= */

.faq details {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  margin-top: 12px;
  overflow: hidden;
}

.faq details:first-of-type {
  margin-top: 26px;
}

.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 19px 24px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
  user-select: none;
  transition: background-color .16s;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before {
  content: "Q";
  flex: none;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-deep);
}

.faq summary:hover {
  background: rgba(13, 21, 36, .025);
}

.faq details p {
  margin: 0;
  padding: 2px 24px 22px 53px;
  position: relative;
  font-size: 14.5px;
  color: var(--muted);
}

.faq details p::before {
  content: "A";
  position: absolute;
  left: 24px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--alert);
}

/* =========================================================
   公的窓口
   ========================================================= */

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

.hotlines div {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hotlines strong {
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .04em;
}

.hotlines span {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .06em;
}

/* =========================================================
   Footer
   ========================================================= */

.footer {
  background: var(--ink);
  color: #8593aa;
  padding: 44px 0 120px;
  font-size: 12.5px;
  line-height: 2;
}

.footer p {
  margin: 0 0 12px;
  max-width: 760px;
}

.footer p:last-child {
  margin: 18px 0 0;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  color: #5d6b84;
}

/* =========================================================
   Floating CTA
   ========================================================= */

.floating-cta {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  display: grid;
  gap: 10px;
}

.floating-cta .btn {
  min-height: 50px;
  box-shadow: var(--shadow-pop);
  font-size: 14px;
}

.floating-cta .btn-dark {
  background: rgba(13, 21, 36, .94);
  backdrop-filter: blur(8px);
}

/* =========================================================
   Chat modal — 状況整理ツール
   ========================================================= */

.chat-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 13, 23, .66);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}

.chat-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.chat-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 32px 90px rgba(0, 0, 0, .45);
  transform: translateY(14px) scale(.985);
  transition: transform .26s cubic-bezier(.2, .7, .2, 1);
}

.chat-modal.is-open .chat-dialog {
  transform: none;
}

.chat-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: 1px solid var(--hairline-dark);
  background: rgba(255, 255, 255, .08);
  color: #c4cfdf;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  padding: 6px 13px;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color .16s, color .16s;
}

.chat-close:hover {
  background: rgba(255, 255, 255, .16);
  color: #fff;
}

.chat-head {
  padding: 22px 26px 18px;
  background: var(--ink);
  color: #fff;
}

.chat-head strong {
  display: block;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .02em;
  margin-bottom: 4px;
  padding-right: 70px;
}

.chat-head span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: #8fa3c4;
}

.chat-progress {
  height: 3px;
  background: var(--ink-2);
}

.chat-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold), #e3bf6e);
  transition: width .35s cubic-bezier(.2, .7, .2, 1);
}

.chat-log {
  flex: 1;
  min-height: 280px;
  max-height: 46vh;
  overflow-y: auto;
  padding: 22px 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--paper);
}

.msg {
  max-width: 88%;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.75;
}

.msg.bot {
  align-self: flex-start;
  background: var(--card);
  border: 1px solid var(--hairline);
  color: var(--text);
}

.msg.bot span {
  color: var(--muted);
  font-size: 12.5px;
}

.msg.user {
  align-self: flex-end;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
}

.msg.result {
  max-width: 100%;
  border-top: 3px solid var(--gold);
  box-shadow: var(--shadow-card);
}

.result-heading {
  display: block;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
}

.result-copy {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13.5px;
}

.msg.result strong {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--gold-deep);
}

.msg.result ul {
  margin: 8px 0 0;
  padding-left: 20px;
  font-size: 13.5px;
}

.msg.result li {
  margin-bottom: 3px;
}

.chat-options {
  display: grid;
  gap: 9px;
  padding: 14px 22px;
  background: var(--paper);
  border-top: 1px solid var(--hairline);
}

.chat-options:empty {
  padding: 0;
  border-top: 0;
}

.chat-options button {
  text-align: left;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  background: var(--card);
  padding: 12px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}

.chat-options button:hover {
  border-color: var(--ink);
  box-shadow: 0 4px 14px rgba(13, 21, 36, .1);
  transform: translateY(-1px);
}

.chat-options button span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.chat-controls {
  display: flex;
  justify-content: space-between;
  padding: 12px 22px;
  background: var(--card);
  border-top: 1px solid var(--hairline);
}

.chat-controls button {
  border: 0;
  background: none;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 3px;
  transition: color .15s, background-color .15s;
}

.chat-controls button:hover {
  color: var(--ink);
  background: var(--paper);
}

.chat-result-cta {
  padding: 14px 22px 20px;
  background: var(--card);
}

.chat-result-cta .btn {
  width: 100%;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1280px) {
  .layout {
    width: min(1120px, calc(100% - 40px));
    grid-template-columns: 248px minmax(0, 1fr);
    justify-content: stretch;
  }
}

@media (max-width: 1020px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 44px;
  }

  .toc {
    position: static;
  }

  .toc-box {
    border: 1px solid var(--hairline);
    border-left: 2px solid var(--ink);
    border-radius: var(--radius);
    background: var(--card);
    padding: 18px 6px;
  }
}

@media (max-width: 860px) {
  .rank-main {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "logo"
      "body";
    gap: 14px;
    padding: 24px 22px 22px;
  }

  .company-logo {
    max-width: 380px;
  }

  .rank-detail {
    padding: 6px 22px 20px;
  }

  .rank-label {
    padding: 12px 22px;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 15.5px;
  }

  .nav {
    display: none;
  }

  .hero-inner {
    padding: 64px 0 56px;
  }

  .hero p {
    font-size: 14.5px;
  }

  .hero-meta div {
    padding-right: 18px;
    margin-right: 18px;
  }

  .hero-meta strong {
    font-size: 18px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .check-list {
    padding: 8px 20px;
  }

  .check-list li {
    font-size: 14px;
    gap: 12px;
  }

  .diagnosis-call {
    padding: 20px;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }

  .section {
    margin-bottom: 64px;
  }

  .rank-detail th {
    width: 96px;
    padding-right: 12px;
  }

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

  .floating-cta {
    left: 0;
    right: 0;
    bottom: 0;
    grid-template-columns: 1fr 1.4fr;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--hairline);
  }

  .floating-cta .btn {
    min-height: 46px;
    padding: 10px 8px;
    font-size: 13px;
    box-shadow: none;
  }

  .floating-cta .btn-line {
    box-shadow: 0 4px 14px rgba(6, 199, 85, .3);
  }

  .footer {
    padding-bottom: 130px;
  }

  .chat-modal {
    padding: 10px;
  }

  .chat-dialog {
    max-height: calc(100vh - 20px);
  }

  .chat-log {
    max-height: 52vh;
  }
}

/* ---------- fixes ---------- */

.section {
  scroll-margin-top: 80px;
}

@media (max-width: 720px) {
  .hero h1 {
    font-size: clamp(27px, 7.6vw, 34px);
  }

  .hero h1 .nowrap {
    white-space: normal;
  }

  .hero-eyebrow {
    font-size: 10px;
    letter-spacing: .2em;
  }
}

@media (max-width: 720px) {
  .company-body .btn {
    width: 100%;
  }
}


/* =========================================================
   Resource Sections (資料一・二・三) — コード再現版
   ========================================================= */

.rs-section {
  position: relative;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 48px;
  background: var(--card);
}

/* ---- ヘッダー帯 ---- */
.rs-header {
  position: relative;
  display: flex;
  align-items: center;
  padding: 10px 24px;
  background: var(--ink);
  border-bottom: 1px solid var(--hairline-dark);
  min-height: 40px;
}

.rs-exhibit {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .22em;
  color: #8fa3c4;
  text-transform: uppercase;
}

/* ---- 朱印スタンプ ---- */
.rs-stamp {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 2px solid var(--alert);
  border-radius: 3px;
  background: rgba(214, 69, 58, .08);
  color: var(--alert);
  font-family: var(--display);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: .12em;
  line-height: 1.5;
  text-align: center;
  transform: translateY(-50%) rotate(-4deg);
  white-space: pre;
}

/* ---- ヒーローエリア ---- */
.rs-hero {
  padding: 36px 32px 28px;
  background: var(--ink);
  color: #f0f3f9;
  position: relative;
}

/* 台帳グリッド */
.rs-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.rs-hero__lead-label {
  margin: 0 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px 6px 9px;
  border: 1px solid rgba(214, 69, 58, .5);
  border-radius: 3px;
  background: rgba(214, 69, 58, .14);
  color: #ffb4ac;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  position: relative;
  z-index: 1;
}

.rs-hero__title {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: clamp(22px, 3.2vw, 34px);
  font-weight: 800;
  line-height: 1.42;
  color: #fff;
  letter-spacing: .01em;
  position: relative;
  z-index: 1;
}

.rs-hero__title span {
  display: block;
}

.rs-hero__title em {
  font-style: normal;
  position: relative;
  display: inline-block;
  padding: 0 2px;
}

.rs-hero__title em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: .03em;
  height: .17em;
  background: var(--alert);
  z-index: -1;
  opacity: .85;
}

.rs-hero__sub {
  margin: 0;
  color: #b9c5d8;
  font-size: 14.5px;
  position: relative;
  z-index: 1;
}

/* ---- アラートピル（ヘッダー内） ---- */
.rs-alert-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 8px;
  border: 1px solid rgba(214, 69, 58, .5);
  border-radius: 3px;
  background: rgba(214, 69, 58, .14);
  color: #ffb4ac;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
}

.rs-alert-pill__icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 2px;
  background: var(--alert);
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  flex: none;
}

.rs-alert-pill__text {
  min-width: 0;
}

/* ---- ボディ ---- */
.rs-body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ---- コールアウト ---- */
.rs-callout {
  padding: 20px 24px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--text);
}

.rs-callout p {
  margin: 0 0 8px;
}

.rs-callout p:last-child {
  margin: 0;
}

.rs-callout__accent {
  color: var(--blue);
}

.rs-callout--alert {
  border-left-color: var(--alert);
  background: var(--alert-soft);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.rs-callout--alert .rs-callout__icon {
  flex: none;
  align-self: flex-start;
  margin-top: 2px;
}

.rs-callout--alert p,
.rs-callout--alert>span~* {
  flex: 1;
  min-width: 0;
  margin: 0;
  line-height: 1.85;
}


.rs-callout__icon {
  flex: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 2px;
  background: var(--alert);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
}

/* ---- サブセクションラベル ---- */
.rs-sub-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rs-sub-label {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
}

.rs-sub-label__num {
  color: var(--gold-deep);
}

/* ---- タグ行 ---- */
.rs-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rs-tag {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  background: var(--paper);
  color: var(--text);
  letter-spacing: .03em;
}

/* ---- 役割テーブル ---- */
.rs-role-table {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
}

.rs-role-row {
  display: flex;
  align-items: center;
  gap: 0;
}

.rs-role-row--dark {
  background: var(--ink);
  color: #fff;
  border-bottom: 1px solid var(--hairline-dark);
}

.rs-role-row--mid {
  background: #2a3a56;
  color: #e8edf6;
}

.rs-role-actor {
  flex: none;
  width: 130px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-right: 1px solid var(--hairline-dark);
}

.rs-role-actor__name {
  font-size: 13.5px;
  font-weight: 700;
}

.rs-role-actor__en {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .18em;
  color: #8fa3c4;
  text-transform: uppercase;
}

.rs-role-flow {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 18px;
  flex-wrap: wrap;
}

.rs-role-step {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 10px;
}

.rs-role-step__label {
  font-size: 13px;
  font-weight: 700;
}

.rs-role-step__desc {
  font-size: 11px;
  color: #8fa3c4;
  font-family: var(--mono);
  letter-spacing: .04em;
}

.rs-role-arrow {
  font-family: var(--mono);
  font-size: 20px;
  color: #8fa3c4;
  line-height: 1;
  flex: none;
}

/* ---- 注意書き ---- */
.rs-notice {
  padding: 14px 18px;
  background: var(--alert-soft);
  border: 1px solid rgba(214, 69, 58, .25);
  border-radius: var(--radius);
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.8;
}

/* ---- 証拠グリッド ---- */
.rs-evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.rs-evidence-box {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
}

.rs-evidence-box__header {
  margin: 0;
  padding: 10px 16px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rs-evidence-box__header--police {
  background: #1c3a6e;
}

.rs-evidence-box__header--lawyer {
  background: #2d1c6e;
}

.rs-evidence-box__for {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .22em;
  background: rgba(255, 255, 255, .15);
  padding: 2px 7px;
  border-radius: 2px;
}

.rs-evidence-list {
  margin: 0;
  padding: 12px 18px 6px 32px;
  list-style: none;
}

.rs-evidence-list li {
  padding: 7px 0;
  font-size: 13.5px;
  font-weight: 500;
  border-bottom: 1px dashed var(--hairline);
  position: relative;
}

.rs-evidence-list li::before {
  content: "✓";
  position: absolute;
  left: -18px;
  color: var(--gold-deep);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.rs-evidence-list li:last-child {
  border-bottom: 0;
}

.rs-evidence-box__note {
  margin: 0;
  padding: 10px 16px 14px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}

/* ---- 選び方 5基準 ---- */
.rs-criteria-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.rs-criteria-item {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--hairline);
}

.rs-criteria-item:last-child {
  border-bottom: 0;
}

.rs-criteria-num {
  flex: none;
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding-top: 2px;
}

.rs-criteria-num__big {
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -.02em;
}

.rs-criteria-num__label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .22em;
  color: var(--gold-deep);
  text-transform: uppercase;
}

.rs-criteria-body {
  flex: 1;
  min-width: 0;
}

.rs-criteria-title {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.45;
}

.rs-criteria-text {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.85;
}

.rs-text--alert {
  color: var(--alert);
}

/* ---- ロードマップ ---- */
.rs-roadmap {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* 縦の点線 */
.rs-roadmap::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 48px;
  bottom: 48px;
  width: 2px;
  background: repeating-linear-gradient(to bottom,
      var(--hairline) 0,
      var(--hairline) 5px,
      transparent 5px,
      transparent 10px);
}

.rs-roadmap__item {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 22px 0;
  border-bottom: 1px solid var(--hairline);
  position: relative;
}

.rs-roadmap__item:last-child {
  border-bottom: 0;
}

.rs-roadmap__badge {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  z-index: 1;
  position: relative;
}

.rs-roadmap__badge--zero {
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  font-size: 13px;
}

.rs-roadmap__badge--caution {
  background: #b8862b;
}

.rs-roadmap__content {
  flex: 1;
  min-width: 0;
  padding-top: 4px;
}

.rs-roadmap__step-label {
  margin: 0 0 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--muted);
  text-transform: uppercase;
}

.rs-roadmap__title {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.45;
}

.rs-roadmap__desc {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.85;
}

.rs-roadmap__checklist {
  margin: 0;
  padding: 12px 16px 12px 14px;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}

.rs-roadmap__checklist li {
  padding: 6px 0;
  font-size: 13.5px;
  font-weight: 500;
  border-bottom: 1px dashed var(--hairline);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.rs-roadmap__checklist li:last-child {
  border-bottom: 0;
}

.rs-roadmap__checklist li::before {
  content: "✓";
  color: var(--gold-deep);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  flex: none;
  margin-top: 2px;
}

/* ---- フッターバー ---- */
.rs-footer-bar {
  padding: 22px 32px;
  background: var(--ink);
  color: #b9c5d8;
  font-size: 14.5px;
  line-height: 1.85;
  border-top: 1px solid var(--hairline-dark);
}

.rs-footer-bar p {
  margin: 0;
}

.rs-footer-bar__accent {
  color: #fff;
}

/* ---- レスポンシブ ---- */
@media (max-width: 720px) {
  .rs-body {
    padding: 22px 18px;
    gap: 24px;
  }

  .rs-hero {
    padding: 28px 18px 22px;
  }

  .rs-header {
    padding: 10px 18px;
  }

  .rs-footer-bar {
    padding: 18px;
  }

  .rs-role-actor {
    width: 90px;
    padding: 12px 12px;
  }

  .rs-role-flow {
    padding: 10px 10px;
    gap: 2px;
  }

  .rs-role-step {
    padding: 4px 6px;
  }

  .rs-role-step__label {
    font-size: 12px;
  }

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

  .rs-criteria-item {
    gap: 16px;
  }

  .rs-criteria-num__big {
    font-size: 24px;
  }

  .rs-criteria-title {
    font-size: 15px;
  }

  .rs-roadmap::before {
    left: 15px;
  }

  .rs-roadmap__badge {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .rs-roadmap__title {
    font-size: 16px;
  }
}

/* =========================================================
   Responsive line-wrap fixes
   ========================================================= */
.hero-copy,
.section-title,
.diagnosis-card,
.rank-card,
.rs-section,
.chat-dialog {
  max-width: min(100%, calc(100vw - 32px));
}

.hero h1,
.headline,
.company-head h3,
.company-headline,
.rs-hero__title,
.rs-criteria-title,
.rs-roadmap__title,
.rs-footer-bar,
.btn,
.chat-options button,
.ranking-more summary {
  line-break: strict;
  word-break: keep-all;
  overflow-wrap: normal;
  text-wrap: balance;
}

.hero p,
.lead,
.company-text,
.rs-callout,
.rs-notice,
.rs-roadmap__desc,
.faq details p,
.msg {
  word-break: normal;
  overflow-wrap: break-word;
}

.btn,
.chat-options button,
.floating-cta .btn {
  white-space: normal;
  min-width: 0;
}

@media (max-width: 860px) {
  .hero-copy {
    width: min(100%, 680px);
  }

  .rank-main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "logo"
      "body";
  }

  .company-logo img {
    width: min(100%, 680px);
    margin-inline: auto;
  }
}

@media (max-width: 720px) {
  .hero h1 {
    font-size: 26px;
    line-height: 1.45;
  }

  .hero h1 .nowrap {
    display: inline;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: normal;
  }

  .hero-actions,
  .floating-cta,
  .chat-options {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-actions {
    display: grid;
  }

  .hero-actions .btn,
  .floating-cta .btn,
  .company-body .btn,
  .chat-options button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .headline,
  .rs-hero__title {
    font-size: 24px;
    line-height: 1.55;
  }

  .company-head h3 {
    font-size: 24px;
    line-height: 1.45;
  }

  .company-headline {
    font-size: 17px;
    line-height: 1.75;
  }

  .fact-list span,
  .point-list div,
  .rs-tag,
  .rs-evidence-list li,
  .rs-roadmap__checklist li {
    word-break: normal;
    overflow-wrap: break-word;
  }

  .rank-detail table,
  .rank-detail tbody,
  .rank-detail tr,
  .rank-detail th,
  .rank-detail td {
    display: block;
    width: 100%;
  }

  .rank-detail th {
    white-space: normal;
    padding-bottom: 2px;
    border-bottom: 0;
  }

  .rank-detail td {
    padding-top: 0;
  }
}

@media (max-width: 380px) {
  .container,
  .hero-copy,
  .section,
  .rank-card,
  .rs-section,
  .chat-dialog {
    max-width: min(100%, calc(100vw - 20px));
  }

  .hero h1 {
    font-size: 23px;
  }

  .headline,
  .rs-hero__title,
  .company-head h3 {
    font-size: 22px;
  }

  .alert-pill,
  .hero-eyebrow,
  .company-tag,
  .rank-label,
  .ranking-more summary small {
    letter-spacing: .06em;
  }
}

/* =========================================================
   Resource mobile readability and overlap fixes
   ========================================================= */
.rs-body,
.rs-callout,
.rs-notice,
.rs-criteria-text,
.rs-roadmap__desc,
.rs-footer-bar {
  font-size: max(15.5px, 1rem);
}

.rs-evidence-list li,
.rs-roadmap__checklist li,
.rs-tag,
.rs-role-step__label,
.rs-criteria-title {
  font-size: max(14.5px, .94rem);
}

.rs-exhibit,
.rs-sub-label,
.rs-role-actor__en,
.rs-roadmap__step-label,
.rs-criteria-num__label {
  line-height: 1.55;
}

@media (max-width: 720px) {
  .rs-header {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 12px 14px;
    min-height: 0;
  }

  .rs-exhibit {
    flex: 1 1 180px;
    min-width: 0;
    font-size: 11px;
    letter-spacing: .12em;
    line-height: 1.55;
  }

  .rs-stamp {
    position: static;
    width: auto;
    min-width: 58px;
    height: auto;
    min-height: 34px;
    margin-left: auto;
    padding: 5px 9px;
    transform: rotate(-3deg);
    white-space: nowrap;
    font-size: 11px;
    line-height: 1.25;
    letter-spacing: .08em;
  }

  .rs-hero {
    padding: 28px 16px 22px;
  }

  .rs-hero__lead-label {
    display: flex;
    width: fit-content;
    max-width: 100%;
    align-items: flex-start;
    font-size: 13px;
    line-height: 1.55;
    white-space: normal;
  }

  .rs-hero__title {
    font-size: clamp(24px, 6.6vw, 30px);
    line-height: 1.55;
  }

  .rs-hero__sub {
    font-size: 16px;
    line-height: 1.9;
  }

  .rs-body {
    padding: 24px 16px;
    gap: 26px;
    font-size: 16px;
  }

  .rs-callout,
  .rs-notice {
    font-size: 16px;
    line-height: 1.9;
  }

  .rs-sub-label {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 12.5px;
    letter-spacing: .08em;
  }

  .rs-tag-row {
    gap: 9px;
  }

  .rs-tag {
    font-size: 13.5px;
    line-height: 1.45;
    padding: 7px 10px;
  }

  .rs-role-row {
    align-items: stretch;
  }

  .rs-role-actor {
    width: 96px;
    padding: 12px 10px;
  }

  .rs-role-actor__name {
    font-size: 14px;
    line-height: 1.45;
  }

  .rs-role-actor__en {
    font-size: 9px;
    letter-spacing: .12em;
  }

  .rs-role-flow {
    padding: 10px;
  }

  .rs-role-step__label {
    font-size: 14px;
    line-height: 1.45;
  }

  .rs-role-step__desc {
    font-size: 11.5px;
    line-height: 1.45;
  }

  .rs-evidence-list {
    padding-left: 30px;
  }

  .rs-evidence-list li,
  .rs-roadmap__checklist li {
    font-size: 15px;
    line-height: 1.75;
  }

  .rs-evidence-box__note {
    font-size: 14px;
    line-height: 1.75;
  }

  .rs-criteria-item {
    gap: 14px;
    padding: 22px 0;
  }

  .rs-criteria-num {
    width: 54px;
  }

  .rs-criteria-title {
    font-size: 17px;
    line-height: 1.65;
  }

  .rs-criteria-text {
    font-size: 16px;
    line-height: 1.9;
  }

  .rs-roadmap__title {
    font-size: 18px;
    line-height: 1.6;
  }

  .rs-roadmap__desc {
    font-size: 16px;
    line-height: 1.9;
  }

  .rs-footer-bar {
    padding: 18px 16px;
    font-size: 16px;
    line-height: 1.9;
  }
}

@media (max-width: 380px) {
  .rs-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .rs-stamp {
    margin-left: 0;
  }

  .rs-role-row {
    flex-direction: column;
  }

  .rs-role-actor {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--hairline-dark);
  }
}

/* =========================================================
   Final mobile containment pass
   ========================================================= */
@media (max-width: 720px) {
  .content,
  .section,
  .diagnosis-card,
  .rank-card,
  .rank-main,
  .company-head,
  .company-body,
  .rank-detail,
  .rs-section,
  .rs-header,
  .rs-hero,
  .rs-body,
  .rs-callout,
  .rs-footer-bar,
  .faq details,
  .chat-dialog {
    min-width: 0;
    max-width: 100%;
  }

  .company-headline,
  .company-text,
  .point-list div,
  .fact-list span,
  .rank-detail th,
  .rank-detail td,
  .rs-alert-pill,
  .rs-hero__lead-label,
  .rs-hero__title,
  .rs-hero__sub,
  .rs-callout,
  .rs-callout p,
  .rs-notice,
  .rs-sub-label,
  .rs-tag,
  .rs-role-actor__name,
  .rs-role-step__label,
  .rs-role-step__desc,
  .rs-evidence-box__header,
  .rs-evidence-list li,
  .rs-evidence-box__note,
  .rs-criteria-title,
  .rs-criteria-text,
  .rs-roadmap__title,
  .rs-roadmap__desc,
  .rs-roadmap__checklist li,
  .rs-footer-bar,
  .rs-footer-bar p,
  .faq summary,
  .faq details p,
  .msg,
  .chat-options button {
    max-width: 100%;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    text-wrap: auto;
  }

  .rs-hero__title,
  .rs-alert-pill,
  .rs-hero__lead-label,
  .rs-footer-bar,
  .rs-footer-bar p,
  .company-headline,
  .company-text,
  .point-list div {
    word-break: keep-all;
    overflow-wrap: normal;
    line-break: strict;
  }

  .company-headline {
    font-size: 18px;
    line-height: 1.75;
  }

  .company-text,
  .point-list div {
    font-size: 16px;
    line-height: 1.85;
  }

  .rs-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }

  .rs-exhibit {
    flex: none;
    width: 100%;
    min-width: 0;
    letter-spacing: .08em;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .rs-alert-pill {
    width: 100%;
    max-width: 100%;
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    font-size: 14px;
    line-height: 1.55;
    white-space: normal;
  }

  .rs-alert-pill__text {
    line-break: strict;
    word-break: keep-all;
    overflow-wrap: normal;
  }

  .rs-alert-pill__icon {
    flex: 0 0 auto;
  }

  .rs-hero__title {
    font-size: clamp(22px, 6vw, 28px);
    line-height: 1.5;
    text-wrap: balance;
  }

  .rs-hero__title span {
    display: block;
  }

  .rs-role-table {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .rs-role-row {
    min-width: 640px;
    flex-direction: row;
    align-items: stretch;
  }

  .rs-role-actor {
    width: 150px;
    padding: 14px 16px;
  }

  .rs-role-flow {
    flex-wrap: nowrap;
    gap: 8px;
    padding: 12px 16px;
  }

  .rs-role-step {
    min-width: 122px;
  }

  .rs-role-step__label,
  .rs-role-step__desc,
  .rs-role-actor__name {
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
  }

  .rs-stamp {
    align-self: flex-start;
    margin-left: 0;
  }

  .rs-footer-bar {
    padding: 18px 14px;
  }

  .rs-footer-bar p {
    font-size: 16px;
    line-height: 1.95;
  }
}

@media (max-width: 380px) {
  .company-headline {
    font-size: 17px;
  }

  .rs-alert-pill,
  .rs-footer-bar p {
    font-size: 15.5px;
  }

  .rs-alert-pill {
    font-size: 13.5px;
    padding-inline: 8px;
  }

  .rs-hero__title {
    font-size: 21px;
  }
}

/* =========================================================
   Layout review pass: readable LP rules
   ========================================================= */
.content,
.section,
.diagnosis-card,
.rank-card,
.rank-main,
.company-head,
.company-body,
.rank-detail,
.rs-section,
.rs-header,
.rs-hero,
.rs-body,
.rs-callout,
.rs-notice,
.rs-footer-bar,
.faq details,
.chat-dialog {
  min-width: 0;
  max-width: 100%;
}

.company-headline,
.company-text,
.point-list div,
.rank-detail td,
.lead,
.rs-callout,
.rs-callout p,
.rs-notice,
.rs-hero__sub,
.rs-criteria-text,
.rs-roadmap__desc,
.rs-evidence-box__note,
.rs-footer-bar,
.rs-footer-bar p,
.faq summary,
.faq details p,
.msg {
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  line-break: strict;
  text-wrap: auto;
}

.hero h1,
.headline,
.company-head h3,
.rs-hero__title,
.rs-criteria-title,
.rs-roadmap__title {
  word-break: normal;
  overflow-wrap: break-word;
  line-break: strict;
  text-wrap: balance;
}

.company-headline {
  font-size: clamp(17px, 1.9vw, 19px);
  line-height: 1.75;
}

.company-text,
.rank-detail td {
  font-size: 15px;
  line-height: 1.85;
}

.rank-card {
  overflow: visible;
}

.rank-main {
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 18px 34px;
}

.company-logo {
  min-width: 0;
}

.company-body .btn {
  width: fit-content;
  max-width: 100%;
}

.fact-list,
.point-list {
  min-width: 0;
}

.fact-list span {
  max-width: 100%;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.55;
}

.point-list div {
  align-items: flex-start;
}

.rs-role-table {
  overflow: visible;
}

.rs-role-row {
  display: grid;
  grid-template-columns: minmax(178px, 220px) minmax(0, 1fr);
  align-items: stretch;
}

.rs-role-actor {
  width: auto;
  min-width: 0;
  padding: 18px 22px;
}

.rs-role-actor__name {
  font-size: 14.5px;
  line-height: 1.55;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.rs-role-flow {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1.12fr);
  align-items: center;
  gap: 10px;
  padding: 18px 24px;
  flex-wrap: nowrap;
}

.rs-role-step {
  min-width: 0;
  padding: 6px 4px;
}

.rs-role-step__label {
  font-size: 15px;
  line-height: 1.45;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.rs-role-step__desc {
  font-size: 12px;
  line-height: 1.55;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.rs-alert-pill,
.rs-hero__lead-label {
  max-width: 100%;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.rs-alert-pill__text,
.nowrap {
  max-width: 100%;
}

@media (max-width: 980px) {
  .rank-main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "logo"
      "body";
    gap: 18px;
  }

  .company-logo img {
    width: min(100%, 680px);
    margin-inline: auto;
  }

  .company-body .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
    line-height: 1.8;
  }

  .container {
    width: min(100% - 24px, 1120px);
  }

  .section,
  .rank-card,
  .rs-section {
    max-width: 100%;
  }

  .company-headline {
    font-size: 18px;
    line-height: 1.8;
  }

  .company-text,
  .point-list div,
  .rank-detail td {
    font-size: 16px;
    line-height: 1.85;
  }

  .fact-list span {
    font-size: 12.5px;
  }

  .rs-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 14px;
  }

  .rs-exhibit,
  .rs-sub-label {
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    letter-spacing: .08em;
  }

  .rs-stamp {
    position: static;
    justify-self: start;
    width: auto;
    height: auto;
    min-height: 34px;
    margin-left: 0;
    padding: 6px 10px;
    transform: rotate(-3deg);
    white-space: nowrap;
  }

  .rs-alert-pill,
  .rs-hero__lead-label {
    width: 100%;
    align-items: flex-start;
    font-size: 14px;
    line-height: 1.65;
  }

  .rs-hero {
    padding: 28px 16px 24px;
  }

  .rs-hero__title {
    font-size: clamp(22px, 6vw, 28px);
    line-height: 1.55;
  }

  .rs-body {
    padding: 24px 16px;
    gap: 28px;
  }

  .rs-callout,
  .rs-notice,
  .rs-footer-bar p {
    font-size: 16px;
    line-height: 1.9;
  }

  .rs-callout--alert {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 12px;
  }

  .rs-evidence-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .rs-role-table {
    overflow: visible;
  }

  .rs-role-row {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .rs-role-actor {
    width: auto;
    border-right: 0;
    border-bottom: 1px solid var(--hairline-dark);
    padding: 14px 16px;
  }

  .rs-role-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 14px 16px;
  }

  .rs-role-arrow {
    transform: rotate(90deg);
    justify-self: start;
    margin-left: 8px;
  }

  .rs-role-step {
    padding: 8px 0;
  }

  .rs-role-step__label {
    font-size: 16px;
  }

  .rs-role-step__desc {
    font-size: 13px;
  }

  .rs-criteria-item {
    gap: 14px;
  }

  .rs-criteria-title,
  .rs-roadmap__title {
    font-size: 18px;
    line-height: 1.65;
  }
}

@media (max-width: 380px) {
  .container {
    width: min(100% - 20px, 1120px);
  }

  .hero h1 {
    font-size: 23px;
  }

  .headline,
  .company-head h3,
  .rs-hero__title {
    font-size: 21px;
  }

  .company-headline {
    font-size: 17px;
  }

  .rs-alert-pill,
  .rs-hero__lead-label {
    font-size: 13.5px;
  }
}

/* =========================================================
   Exhibit stamp label refinement
   ========================================================= */
.rs-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 14px;
  padding: 12px 18px 12px 24px;
}

.rs-header__eyebrow {
  min-width: 0;
}

.rs-exhibit {
  display: inline-block;
  max-width: 100%;
  line-height: 1.55;
}

.rs-stamp {
  position: static;
  right: auto;
  top: auto;
  width: auto;
  height: auto;
  min-height: 0;
  margin-left: 0;
  padding: 5px 10px;
  transform: none;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  font-family: var(--body);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.35;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .18), 0 6px 16px rgba(0, 0, 0, .16);
  justify-self: end;
}

.rs-header .rs-alert-pill {
  grid-column: 1 / -1;
  justify-self: start;
}

@media (max-width: 720px) {
  .rs-header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    padding: 12px 14px;
    gap: 8px 10px;
  }

  .rs-exhibit {
    font-size: 10.5px;
    letter-spacing: .08em;
  }

  .rs-stamp {
    justify-self: end;
    align-self: start;
    padding: 5px 9px;
    font-size: 11.5px;
    transform: none;
  }

  .rs-header .rs-alert-pill {
    width: 100%;
  }
}

/* =========================================================
   Exhibit label matches ranking emphasis
   ========================================================= */
.rs-header {
  grid-template-columns: minmax(0, 1fr) auto;
}

.rs-header__eyebrow,
.rs-header > .rs-exhibit {
  grid-column: 1;
  grid-row: 1;
}

.rs-stamp {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: center;
  padding: 4px 10px;
  border: 1.8px solid var(--alert);
  background: #fff;
  color: var(--alert);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .16em;
  text-indent: .16em;
  line-height: 1.25;
  transform: rotate(-3deg);
  box-shadow: 0 2px 6px rgba(214, 69, 58, .25);
}

.rs-header .rs-alert-pill {
  grid-column: 1 / -1;
  grid-row: 2;
}

@media (max-width: 720px) {
  .rs-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .rs-stamp {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    font-size: 12px;
    padding: 4px 8px;
    transform: rotate(-3deg);
  }

  .rs-header .rs-alert-pill {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* =========================================================
   Floating CTA fixed bottom repair
   ========================================================= */
.floating-cta {
  position: fixed !important;
  top: auto !important;
  left: auto !important;
  right: 22px !important;
  bottom: max(22px, var(--fixed-cta-bottom, 0px)) !important;
  inset-block-start: auto !important;
  inset-block-end: max(22px, var(--fixed-cta-bottom, 0px)) !important;
  inset-inline-start: auto !important;
  inset-inline-end: 22px !important;
  z-index: 2147483000;
  transform: translate3d(0, 0, 0) !important;
  margin: 0 !important;
  width: auto !important;
  max-width: min(320px, calc(100vw - 32px));
  will-change: transform;
}

@media (max-width: 720px) {
  .floating-cta {
    position: fixed !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: var(--fixed-cta-bottom, 0px) !important;
    inset-block-start: auto !important;
    inset-block-end: var(--fixed-cta-bottom, 0px) !important;
    inset-inline-start: 0 !important;
    inset-inline-end: 0 !important;
    width: 100% !important;
    max-width: none;
    transform: translate3d(0, 0, 0) !important;
    margin: 0 !important;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid var(--hairline);
    box-shadow: 0 -8px 24px rgba(13, 21, 36, .10);
  }

  .floating-cta .btn {
    min-height: 46px;
    width: 100%;
  }
}
