/* Wikiバイナリー
   コンセプト: 調査ファイル。
   モチーフ: フォルダのタブ見出し／判子（スタンプ）／チェックシート／業者モノグラム／方眼の地紋／時系列のタイムライン。
   配色: ペトロール（地）・エメラルド（主色）・コーラル（差し色）。警告は朱で、意味のある場所だけに使う。 */
:root {
  --petrol: #0f2a2e;
  --petrol-2: #163a3f;
  --ink: #14232a;
  --text: #2b3a40;
  --muted: #56666c;
  --line: #dbe3e1;
  --bg: #eef3f1;
  --panel: #ffffff;
  --soft: #f5f8f7;
  --emerald: #0e7c6b;
  --emerald-ink: #0a5c50;
  --emerald-soft: #e2f1ec;
  --coral: #e95e41;
  --coral-lt: #f2836b; /* 濃い背景に乗せる小さな文字用 */
  --coral-on: #0b1f22; /* --coral の面に乗せる文字 */
  --coral-ink: #b8462a;
  --coral-soft: #fdeeea;
  --warn: #c2321f;
  --warn-soft: #fcecea;
  --r-l: 14px;
  --r: 10px;
  --r-s: 4px;
  --max: 1200px;
  --font: "Zen Kaku Gothic New", system-ui, -apple-system, "Hiragino Sans", sans-serif;
  --num: "Barlow Condensed", "Zen Kaku Gothic New", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.8; font-feature-settings: "palt" 1; }
img { max-width: 100%; height: auto; }
a { color: var(--emerald-ink); text-underline-offset: 3px; }
a:hover { color: var(--emerald); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.4; margin: 0; text-wrap: balance; font-weight: 900; }
/* 見出し・短いラベルは文節で折り返す（「海外バ／イナリー」のような切れ方を防ぐ） */
h1, h2, h3, h4, th, label, button, nav a, .tab, small { word-break: auto-phrase; text-wrap: balance; }
figcaption { word-break: auto-phrase; }
p, li, td { text-wrap: pretty; }
.ph { display: inline-block; max-width: 100%; }
p { margin: 0 0 1em; text-wrap: pretty; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nb { display: inline-block; }

/* ── ヘッダー（2段） ── */
.hd { background: var(--petrol); color: #fff; position: sticky; top: 0; z-index: 30; }
.hd-top { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; text-decoration: none; flex: none; }
.logo img { display: block; width: 186px; height: auto; }
.logo:hover { color: #fff; }
.logo-mark { width: 34px; height: 34px; flex: none; }
.logo b { font-size: 18px; font-weight: 900; letter-spacing: 0.02em; display: block; line-height: 1.2; }
.logo small { display: block; font-size: 12px; color: #a9c4c0; line-height: 1.3; }
.hd-search { margin-left: auto; position: relative; width: 340px; }
.hd-search input { width: 100%; height: 40px; border-radius: 999px; border: 1px solid #3d5c60; background: var(--petrol-2); color: #fff; font: inherit; font-size: 14px; padding: 0 44px 0 18px; }
.hd-search input::placeholder { color: #9fb8b5; }
.hd-search input:focus { outline: 2px solid var(--coral); outline-offset: 1px; }
.hd-search svg { position: absolute; right: 14px; top: 11px; width: 18px; height: 18px; color: #9fb8b5; pointer-events: none; }
.gnav-bar { background: var(--petrol-2); border-top: 1px solid #23464b; }
.gnav { display: flex; gap: 4px; }
.gnav a { color: #d6e4e2; text-decoration: none; font-size: 14px; font-weight: 700; padding: 11px 16px 10px; border-bottom: 3px solid transparent; }
.gnav a:hover { color: #fff; }
.gnav a[aria-current="page"] { color: #fff; border-bottom-color: var(--coral); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid #3d5c60; border-radius: var(--r-s); padding: 7px 12px; font: inherit; font-size: 13px; color: #fff; align-items: center; gap: 8px; cursor: pointer; }
.menu-btn .bars { position: relative; width: 16px; height: 2px; background: currentColor; }
.menu-btn .bars::before, .menu-btn .bars::after { content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: currentColor; transition: transform .2s; }
.menu-btn .bars::before { top: -5px; } .menu-btn .bars::after { top: 5px; }
.menu-btn[aria-expanded="true"] .bars { background: transparent; }
.menu-btn[aria-expanded="true"] .bars::before { transform: translateY(5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars::after { transform: translateY(-5px) rotate(-45deg); }
.hd-res { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border-radius: var(--r); list-style: none; margin: 0; padding: 6px; z-index: 40; box-shadow: 0 10px 30px rgba(15, 42, 46, .18); }

/* ── 検索結果（共通） ── */
.res-item a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.res-item a:hover, .res-item a:focus { background: var(--soft); }
.res-item b { display: block; font-size: 15px; line-height: 1.3; }
.res-item span.op { display: block; font-size: 12px; color: var(--muted); line-height: 1.4; }
.res-item .stamp-mini { margin-left: auto; }
.res-none { padding: 10px; font-size: 13px; color: var(--muted); }

/* ── パンくず ── */
.crumb { font-size: 12px; color: var(--muted); padding-top: 16px; }
.crumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumb li + li::before { content: "›"; margin-right: 6px; color: #9aaba8; }
.crumb a { color: var(--muted); }

/* ── パネルとフォルダのタブ見出し ── */
.panel { background: var(--panel); border-radius: var(--r-l); padding: 28px; position: relative; }
.folder { margin-top: 44px; min-width: 0; overflow-x: clip; }
.folder .tab { display: inline-flex; align-items: center; gap: 10px; background: var(--panel); border-radius: var(--r) var(--r) 0 0; padding: 12px 22px 6px; position: relative; }
.folder .tab::after { content: ""; position: absolute; right: -18px; bottom: 0; width: 18px; height: 18px; background: radial-gradient(circle at 100% 0, transparent 18px, var(--panel) 18.5px); }
.folder .tab h2 { font-size: 20px; min-width: 0; }
.folder .tab .idx { font-family: var(--num); font-size: 15px; font-weight: 700; color: #fff; background: var(--emerald); border-radius: 999px; min-width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; padding: 0 8px; }
.folder > .panel { border-top-left-radius: 0; }
.folder-hd { display: flex; align-items: flex-end; justify-content: space-between; gap: 4px 16px; flex-wrap: wrap; }
.folder .tab { max-width: 100%; }
.folder-hd .more { font-size: 14px; font-weight: 700; padding-bottom: 10px; white-space: nowrap; }
.panel-note { font-size: 14px; color: var(--muted); margin: -4px 0 20px; }

/* ── ページ冒頭（下層） ── */
.page-hero { background: var(--petrol); color: #d6e4e2; position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 28px 28px; pointer-events: none; }
.page-hero .wrap { position: relative; z-index: 1; padding-top: 36px; padding-bottom: 44px; }
.page-hero h1 { color: #fff; font-size: 34px; }
.page-hero .lead { margin: 12px 0 0; max-width: 780px; color: #c4d6d3; }
.page-hero .crumb { padding: 0 0 18px; color: #9fb8b5; }
.page-hero .crumb a { color: #c4d6d3; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--coral-lt); margin-bottom: 10px; }
.kicker::before { content: ""; width: 18px; height: 2px; background: currentColor; }
.overlap { margin-top: -24px; position: relative; }

.cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.cats a { color: #d6e4e2; text-decoration: none; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 5px 16px; font-size: 14px; font-weight: 700; }
.cats a:hover { color: #fff; border-color: #fff; }
.cats a[aria-current="page"] { background: var(--coral); border-color: var(--coral); color: var(--coral-on); }

/* ── 判子（スタンプ） ── */
.stamp { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 92px; height: 92px; border-radius: 50%; border: 3px solid currentColor; outline: 1px dashed currentColor; outline-offset: -9px; color: var(--warn); font-weight: 900; line-height: 1.2; text-align: center; transform: rotate(-12deg); background: rgba(255,255,255,.85); flex: none; }
.stamp small { font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.stamp b { font-size: 16px; letter-spacing: .06em; }
.stamp .num { font-size: 13px; font-weight: 600; }
.stamp.ok { color: var(--emerald); }
.stamp.gray { color: #5f6f73; }
.stamp-mini { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--warn); border: 1.5px solid currentColor; border-radius: 999px; padding: 2px 9px 2px 7px; white-space: nowrap; line-height: 1.5; background: #fff; }
.stamp-mini::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.stamp-mini.ok { color: var(--emerald-ink); }
.stamp-mini.gray { color: #5f6f73; }

/* ── モノグラム ── */
.mono { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: 12px; color: #fff; font-family: var(--num); font-weight: 700; font-size: 20px; letter-spacing: .02em; position: relative; }
.mono::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--coral); border: 2px solid #fff; display: none; }
.mono.flag::after { display: block; background: var(--warn); }
.mono.lg { width: 84px; height: 84px; border-radius: 20px; font-size: 38px; }
.mono.sm { width: 34px; height: 34px; border-radius: 9px; font-size: 15px; }

/* ── 業者ロゴのタイル ── */
.logo-tile { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 88px; height: 44px; padding: 5px 8px; background: #fff; border-radius: 10px; border: 1px solid var(--line); position: relative; }
.logo-tile img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.logo-tile.sq { width: 44px; padding: 4px; }
.logo-tile.sm { width: 64px; height: 34px; padding: 4px 6px; border-radius: 8px; }
.logo-tile.sm.sq { width: 34px; padding: 3px; }
.logo-tile.lg { width: 176px; height: 84px; padding: 10px 14px; border-radius: 16px; }
.logo-tile.lg.sq { width: 84px; }
.logo-tile.flag::after { content: ""; position: absolute; right: -4px; bottom: -4px; width: 12px; height: 12px; border-radius: 50%; background: var(--warn); border: 2px solid #fff; }

/* ── 写真の背景 ── */
.photo-bg { position: absolute; inset: 0; z-index: 0; background-size: cover; background-position: center; }
.photo-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(15,42,46,.92) 0%, rgba(15,42,46,.78) 45%, rgba(15,42,46,.42) 100%); }

/* ── ステータスのタグ ── */
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 1; padding: 6px 9px; border-radius: 999px; white-space: nowrap; font-weight: 700; }
.tag-ok { background: var(--emerald-soft); color: var(--emerald-ink); }
.tag-none { background: #eaefee; color: #4c5b60; }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── 表 ── */
.tbl-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 14px 14px 14px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl thead th { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--soft); padding: 10px 14px 10px 0; border-bottom: 0; white-space: nowrap; }
.tbl thead th:first-child { padding-left: 14px; border-radius: 8px 0 0 8px; }
.tbl thead th:last-child { border-radius: 0 8px 8px 0; }
.tbl tbody th, .tbl tbody td:first-child { padding-left: 14px; }
.tbl .na { color: var(--muted); }
.spec { width: 100%; border-collapse: collapse; font-size: 15px; }
.spec th { width: 30%; text-align: left; font-weight: 700; color: var(--muted); font-size: 13px; padding: 14px 16px 14px 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.spec td { padding: 14px 0; border-bottom: 1px dashed var(--line); color: var(--ink); }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }
.spec td .line { display: block; }
.scroll-hint { display: none; font-size: 12px; color: var(--muted); margin: 0 0 8px; }

/* ── ボタン ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 24px; border-radius: 999px; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; border: 0; font-family: inherit; }
.btn-primary { background: var(--emerald); color: #fff; box-shadow: 0 4px 0 var(--emerald-ink); }
.btn-primary:hover { color: #fff; transform: translateY(2px); box-shadow: 0 2px 0 var(--emerald-ink); }
.btn-ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-cta { background: var(--coral); color: #fff; font-weight: 900; box-shadow: 0 4px 0 var(--coral-ink); }
.btn-cta:hover { color: #fff; transform: translateY(2px); box-shadow: 0 2px 0 var(--coral-ink); }

/* ── 出典 ── */
.source { font-size: 12px; color: var(--muted); line-height: 1.7; }
.source a { color: var(--muted); word-break: break-all; }
.source ul { margin: 4px 0 0; padding-left: 1.2em; }

/* ── 本文 ── */
.prose { max-width: 780px; }
.panel.prose { max-width: none; }
.panel.prose > * { max-width: 780px; }
.prose h2 { font-size: 22px; margin: 44px 0 16px; display: flex; align-items: center; gap: 12px; }
.prose h2::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: var(--emerald); transform: rotate(45deg); flex: none; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 17px; margin: 28px 0 10px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0 0 1.4em; }
.prose th, .prose td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose thead th { font-size: 12px; color: var(--muted); font-weight: 700; background: var(--soft); border-bottom: 0; }

/* ── フッター ── */
.ft { margin-top: 72px; background: var(--petrol); color: #b7cbc8; font-size: 13px; position: relative; }
.ft::before { content: ""; position: absolute; left: 0; right: 0; top: -28px; height: 28px; background: var(--petrol); clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.ft a { color: #e6efed; }
.ft-in { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; padding: 48px 24px 32px; }
.ft h2 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.ft ul { list-style: none; margin: 0; padding: 0; }
.ft li { margin-bottom: 8px; }
.ft-risk { border-top: 1px solid #2a4a4f; padding: 20px 24px 32px; font-size: 12px; color: #a9bfbc; line-height: 1.8; }
.ft-risk p { margin: 0 0 8px; }

@media (max-width: 960px) {
  .hd-search { display: none; }
  .menu-btn { display: inline-flex; }
  .gnav-bar { display: none; }
  .gnav-bar.open { display: block; position: absolute; left: 0; right: 0; top: 100%; z-index: 50; max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); overflow-y: auto; box-shadow: 0 12px 24px rgba(15, 42, 46, .35); }
  .gnav { flex-direction: column; gap: 0; padding: 8px 8px 16px; }
  .gnav a { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #23464b; padding: 14px 12px; }
  .gnav a::after { content: ""; width: 7px; height: 7px; border-top: 2px solid #7f9c99; border-right: 2px solid #7f9c99; transform: rotate(45deg); flex: none; }
  .gnav a[aria-current="page"] { border-bottom-color: #23464b; color: var(--coral-lt); }
  .ft-in { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .panel { padding: 20px 16px; border-radius: var(--r); }
  .folder { margin-top: 36px; }
  .folder .tab { padding: 10px 16px 6px; }
  .folder .tab h2 { font-size: 17px; }
  .page-hero h1 { font-size: 25px; }
  .page-hero .wrap { padding-top: 24px; padding-bottom: 40px; }
  .spec th { width: 36%; }
  .scroll-hint { display: block; }
  .stamp { width: 78px; height: 78px; }
  .stamp b { font-size: 14px; }
  .ft-in { padding: 40px 16px 24px; }
  .hd-top { gap: 10px; }
  .logo { min-width: 0; flex: 0 1 auto; }
  .logo img { width: 155px; }
  .menu-btn { padding: 6px 10px; flex: none; }
  .folder-hd .more { padding-bottom: 4px; }
  .ft-risk { padding: 16px 16px 28px; }
}
