/* TOBレーダー：調査ファイル（ドシエ）風の紙面。白い紙に黒の文字、朱（はんこの赤）を飾りに、見出しの通し番号は FILE 01。
   データの横棒は dataviz の検証済みパレットの先頭（青）1色だけ。朱は飾りと「平均より高い」行の目印にだけ使い、意味は数字と文字でも出す */
:root {
  color-scheme: light;
  --page: #f4f3ef; --surface: #ffffff; --surface-2: #f8f7f3;
  --ink: #141414; --ink-2: #474747; --muted: #767676;
  --grid: #e4e1da; --axis: #cbc7bd; --border: rgba(20,20,20,0.12);
  --bar: #2a78d6; --track: #eceae4;
  --accent: #b7321a; --accent-wash: rgba(183,50,26,0.07); --rock: #16171a;
  --good-text: #006300;
  --mono: ui-monospace, "Cascadia Mono", "Consolas", "SFMono-Regular", monospace;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page: #0e0f11; --surface: #16181c; --surface-2: #1b1d22;
    --ink: #ebeae6; --ink-2: #b2b0aa; --muted: #83817b;
    --grid: #26282d; --axis: #3a3c42; --border: rgba(255,255,255,0.10);
    --bar: #3987e5; --track: #24272d;
    --accent: #ff7a5c; --accent-wash: rgba(255,122,92,0.08); --good-text: #0ca30c;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0e0f11; --surface: #16181c; --surface-2: #1b1d22;
  --ink: #ebeae6; --ink-2: #b2b0aa; --muted: #83817b;
  --grid: #26282d; --axis: #3a3c42; --border: rgba(255,255,255,0.10);
  --bar: #3987e5; --track: #24272d;
  --accent: #ff7a5c; --accent-wash: rgba(255,122,92,0.08); --good-text: #0ca30c;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--page); font: 15px/1.8 system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

/* ヘッダー：黒地に朱の細い線。ロゴにレーダーの小さな円 */
.bar { position: sticky; top: 0; z-index: 10; background: var(--rock); color: #ecebe7; border-bottom: 3px solid #b7321a; }
.bar-in { max-width: 1120px; margin: 0 auto; padding: 10px 20px 4px; display: flex; align-items: center; gap: 12px; }
.logo { display: flex; flex-direction: column; text-decoration: none; color: inherit; line-height: 1.25; min-width: 0; }
.mark-logo { display: flex; align-items: center; gap: 8px; font: 700 11px/1.4 var(--mono); letter-spacing: 0.26em; color: #ff8a70; white-space: nowrap; }
.mark-logo i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid #ff8a70; position: relative; overflow: hidden;
  background: conic-gradient(from 0deg, rgba(255,138,112,0.75), rgba(255,138,112,0) 25%); animation: sweep 3s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mark-logo i { animation: none; } }
.logo .name { font-weight: 800; font-size: 21px; color: #fff; white-space: nowrap; }
.tools { margin-left: auto; display: flex; gap: 8px; flex-shrink: 0; }
.lang, .theme { white-space: nowrap; font: 500 12px var(--mono); color: #ecebe7; background: transparent; border: 1px solid #45474c; border-radius: 3px;
  padding: 4px 10px; text-decoration: none; cursor: pointer; }
.lang:hover, .theme:hover { border-color: #ff8a70; }
.tabs { max-width: 1120px; margin: 0 auto; padding: 0 12px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs a { position: relative; color: #a9a7a1; text-decoration: none; padding: 7px 10px 9px; font-size: 13.5px; white-space: nowrap; }
.tabs a:hover { color: #fff; }
.tabs a[aria-current] { color: #fff; font-weight: 700; }
.tabs a[aria-current]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; background: #ff8a70; }

main { max-width: 1120px; margin: 0 auto; padding: 8px 20px 24px; counter-reset: file; }
.alert { background: var(--accent-wash); border: 1px solid var(--accent); border-radius: 4px; padding: 10px 14px; margin: 16px 0; }

.hero { padding: 40px 0 10px; max-width: 900px; }
.kicker { display: inline-block; font: 700 12px var(--mono); letter-spacing: 0.24em; color: var(--accent); border: 1.5px solid var(--accent);
  padding: 2px 10px; margin: 0 0 16px; transform: rotate(-1.5deg); }
.hero h1 { font-size: clamp(28px, 4.6vw, 44px); line-height: 1.3; margin: 0 0 18px; font-weight: 800; }
.hero .mark { background: linear-gradient(transparent 62%, var(--accent-wash) 62%); box-shadow: inset 0 -3px 0 var(--accent); }
.lead { color: var(--ink-2); font-size: 16px; margin: 0 0 14px; max-width: 880px; }

.block { margin: 40px 0; }
.block > h2 { counter-increment: file; font-size: 20px; margin: 0 0 14px; padding: 0 0 8px 14px; border-left: 4px solid var(--accent); border-bottom: 1px solid var(--grid); }
.block > h2::before { content: "FILE " counter(file, decimal-leading-zero); display: block; font: 700 11px/1.6 var(--mono); letter-spacing: 0.22em; color: var(--muted); }
.block h3 { font-size: 15px; margin: 18px 0 8px; }
.more { margin: 12px 0 0; font-weight: 600; }
.more a { text-decoration: none; }
.note { color: var(--muted); font-size: 12.5px; margin: 8px 0 0; }
.small { font-size: 12.5px; }
.muted { color: var(--muted); }
.updated { color: var(--muted); font: 12px var(--mono); margin: 32px 0 0; }
.disclaimer { margin: 28px 0 0; padding: 12px 14px; border: 1px dashed var(--axis); border-radius: 4px; font-size: 12.5px; color: var(--ink-2); background: var(--surface); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 10px 0 14px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 10px 14px 12px; display: flex; flex-direction: column; position: relative; }
.tile::before { content: ""; position: absolute; left: 0; top: 0; width: 28px; height: 3px; background: var(--accent); }
.t-label { font-size: 12px; color: var(--ink-2); line-height: 1.5; }
.t-val { font: 700 24px/1.35 system-ui, sans-serif; font-variant-numeric: tabular-nums; margin: 2px 0; overflow-wrap: anywhere; }
.t-note { font-size: 11.5px; color: var(--muted); line-height: 1.5; }

.findings { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.findings li { padding: 8px 12px 8px 30px; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; position: relative; }
.findings li::before { content: "▸"; position: absolute; left: 12px; color: var(--accent); }
.methods li { margin-bottom: 8px; }
.weak { margin: 10px 0 0; padding: 8px 12px; border-left: 3px solid var(--axis); color: var(--ink-2); font-size: 14px; }

/* 表 */
.tbl-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--grid); text-align: left; vertical-align: top; }
thead th { font-size: 11.5px; color: var(--muted); font-weight: 600; background: var(--surface-2); line-height: 1.4; vertical-align: bottom; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
table.num td { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.num td.txt { text-align: left; white-space: normal; }
table.num thead th { text-align: right; }
table.num thead th:first-child, table.num thead th:nth-child(2) { text-align: left; }
table.cand thead th:nth-child(3), table.cand thead th:last-child, table.act thead th:nth-child(2), table.bt thead th:last-child,
table.holders thead th:nth-child(2) { text-align: left; }
th small { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; }
th a { color: var(--ink); text-decoration: none; font-weight: 600; }
th a:hover { color: var(--accent); text-decoration: underline; }
td.rk { color: var(--muted); font-weight: 700; text-align: left !important; font-family: var(--mono); }
td.hl { font-weight: 700; }
td.barcell { width: 26%; min-width: 90px; vertical-align: middle; }
tr.hi th, tr.hi td { background: var(--accent-wash); }
tr.hi th::after { content: " ▲"; color: var(--accent); font-size: 11px; }
tbody tr:hover th, tbody tr:hover td { background: var(--accent-wash); }
.hb { display: block; height: 9px; background: var(--track); border-radius: 0 4px 4px 0; overflow: hidden; }
.hb i { display: block; height: 100%; background: var(--bar); border-radius: 0 4px 4px 0; }

/* 会社のページ */
.crumb { font-size: 13px; margin: 20px 0 0; color: var(--muted); }
h1.co { font-size: clamp(22px, 3.6vw, 32px); margin: 6px 0 12px; line-height: 1.35; }
h1.co small { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.facts { display: grid; grid-template-columns: minmax(0, 1fr) auto; margin: 0 0 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; max-width: 560px; }
.facts dt, .facts dd { margin: 0; padding: 6px 12px; border-bottom: 1px solid var(--grid); }
.facts dt { color: var(--ink-2); font-size: 13px; }
.facts dd { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.facts dt:last-of-type, .facts dd:last-of-type { border-bottom: 0; }

footer.site-foot { max-width: 1120px; margin: 0 auto; padding: 18px 20px 40px; border-top: 1px solid var(--grid); display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--muted); }
footer.site-foot a { color: var(--ink); }

@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .bar-in { padding: 10px 14px 4px; gap: 10px; }
  .mark-logo { font-size: 10px; letter-spacing: 0.16em; }
  .logo .name { font-size: 18px; }
  .lang, .theme { font-size: 11px; padding: 3px 8px; }
  main { padding: 4px 14px 20px; }
  .block { margin: 28px 0; }
  .block > h2 { font-size: 18px; }
  .hero { padding: 26px 0 6px; }
  .lead { font-size: 15px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .t-val { font-size: 19px; }
  .tabs { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }

  /* 表はスマホ幅では1行を1枚のカードにし、数字を3列に並べる */
  .tbl-wrap { overflow: visible; background: transparent; border: 0; }
  table.stack thead { display: none; }
  table.stack, table.stack tbody { display: block; width: 100%; }
  table.stack tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 10px; row-gap: 4px; position: relative;
    background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 10px 12px; margin-bottom: 8px; }
  table.stack th[scope="row"] { grid-column: 1 / -1; padding: 0 40px 4px 0; border: 0; font-size: 15px; }
  table.stack td { display: flex; flex-direction: column; padding: 0; border: 0; text-align: left !important; white-space: normal; font-size: 15px; font-weight: 600; min-width: 0; }
  table.stack td::before { content: attr(data-label); color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.4; }
  table.stack td[data-label=""]::before { content: none; }
  table.stack td.txt { grid-column: 1 / -1; font-weight: 400; font-size: 13px; }
  table.stack td.na { display: none; }
  table.stack td.rk { position: absolute; top: 10px; right: 12px; font-size: 16px; color: var(--accent); flex-direction: row; }
  table.stack td.rk::before { content: "#"; font-size: 14px; color: var(--accent); }
  table.stack td.barcell { grid-column: 1 / -1; width: auto; }
  tr.hi th::after { content: " ▲ 平均より高い"; }
  html[lang="en"] tr.hi th::after { content: " ▲ above average"; }
  tbody tr:hover th, tbody tr:hover td { background: transparent; }
  .facts { max-width: none; }
}
@media (forced-colors: active) { .hb i { forced-color-adjust: none; } }

/* 過去の検証：結論・特徴ごとの一言・同じ目盛りの横棒（平均の位置に縦線） */
.concl { margin: 0; padding-left: 1.4em; display: grid; gap: 8px; font-size: 16px; }
.concl li { padding-left: 4px; }
.concl li::marker { color: var(--accent); font-weight: 700; }
.how { margin: 14px 0 0; }
.feat { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 14px 16px 10px; margin: 0 0 12px; }
.feat h3 { margin: 0 0 4px; font-size: 16px; }
.take { margin: 0 0 10px; color: var(--ink-2); }
.rbars { display: grid; gap: 6px; }
.rb { display: grid; grid-template-columns: minmax(110px, 22%) 1fr 150px; gap: 10px; align-items: center; font-size: 13.5px; }
.rb-l { color: var(--ink-2); }
.rb.hi .rb-l { color: var(--ink); font-weight: 700; }
.rb.hi .rb-l::after { content: " ▲"; color: var(--accent); font-size: 11px; }
.rb-bar { position: relative; height: 14px; background: var(--track); border-radius: 0 4px 4px 0; }
.rb-bar i { display: block; height: 100%; background: var(--bar); border-radius: 0 4px 4px 0; }
.rb-bar b { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); opacity: 0.55; }
.rb-v { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rb-v small { font-weight: 400; color: var(--muted); font-size: 11.5px; margin-left: 6px; }
.feat .data { margin-top: 8px; }
.data summary { cursor: pointer; font-size: 12.5px; color: var(--ink-2); }
.data .tbl-wrap { margin-top: 6px; }
.hits { margin-bottom: 10px; }
@media (max-width: 720px) {
  .concl { font-size: 15px; }
  .rb { grid-template-columns: 1fr auto; gap: 2px 8px; }
  .rb-bar { grid-column: 1 / -1; order: 3; }
  .rb-v small { display: block; margin: 0; }
}

/* 概要：特徴のカード（大きな「N社に1社」と、全上場企業との2本の棒） */
h3.sub { font-size: 14px; color: var(--ink-2); margin: 22px 0 8px; }
.fcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.fc { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--accent); border-radius: 4px; padding: 12px 14px 10px; }
.fc.weak { border-top-color: var(--axis); }
.fc h3 { margin: 0 0 6px; font-size: 14.5px; line-height: 1.5; }
.fc-n { margin: 0; font-size: 14px; color: var(--ink-2); }
.fc-n b { font: 800 34px/1.1 system-ui, sans-serif; color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 2px; }
.fc-n span { margin-left: 4px; }
.fc-x { margin: 2px 0 10px; font-weight: 700; color: var(--accent); }
.fc.weak .fc-x { color: var(--ink-2); }
.fc-bars { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 8px; align-items: center; font-size: 12px; }
.fc-bl { color: var(--ink-2); white-space: nowrap; }
.fc-bv { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.hb.avg i { background: var(--axis); }
.fc-k { margin: 6px 0 0; font-size: 11.5px; color: var(--muted); }

/* 概要：買い手の型ごとの列 */
.tcols { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.tc { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 12px 14px 10px; display: flex; flex-direction: column; }
.tc h3 { margin: 0; font-size: 15px; }
.tc-d { margin: 2px 0 6px; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.tc-n { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.tc-n b { color: var(--ink); font-size: 14px; }
.tc-sig { margin: 0 0 8px; padding: 6px 8px; background: var(--surface-2); border-radius: 3px; font-size: 12.5px; line-height: 1.6; }
.tc-sig span { display: block; font-size: 11px; color: var(--muted); }
.tc-sig em { font-style: normal; margin-right: 6px; }
.tc-list { margin: 0; padding-left: 1.5em; display: grid; gap: 6px; font-size: 13.5px; flex: 1; }
.tc-list li::marker { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.tc-list a { color: var(--ink); font-weight: 600; text-decoration: none; }
.tc-list a:hover { color: var(--accent); text-decoration: underline; }
.tc-x { margin-left: 6px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 12.5px; }
.tc-list small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.tc .more { margin-top: 8px; font-size: 13px; }

/* 候補の表：型の札・点数の棒・理由のチップ */
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { font-size: 12px; line-height: 1.5; padding: 1px 8px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 7px; border: 1px solid var(--axis); border-radius: 3px; color: var(--ink-2); white-space: nowrap; }
table.num td.tp { text-align: left; }
table.num td.score { text-align: left; min-width: 170px; }
td.score .hb { margin: 4px 0 2px; }
td.score .sc { font-weight: 700; font-size: 14px; }
td.score small { display: block; color: var(--muted); font-size: 11.5px; white-space: normal; line-height: 1.4; }
table.cand thead th:nth-child(4), table.cand.bytype thead th:nth-child(3) { text-align: left; }
.jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0 0; }
.jump a { font-size: 13px; padding: 3px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); text-decoration: none; color: var(--ink); }
.jump a:hover { border-color: var(--accent); color: var(--accent); }
.block[id] { scroll-margin-top: 90px; }
.funds .rb { grid-template-columns: minmax(140px, 26%) 1fr 60px; }

/* 会社のページ：冒頭のまとめ、理由と過去の実績 */
.verdict { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 4px; padding: 12px 16px; margin: 0 0 14px; font-size: 15.5px; }
.verdict p { margin: 0; }
.verdict p + p { margin-top: 6px; color: var(--ink-2); font-size: 14px; }
.reasons small { display: block; color: var(--muted); font-size: 12.5px; }
table.holders thead th:nth-child(3) { text-align: left; }

@media (max-width: 720px) {
  .fc-n b { font-size: 30px; }
  table.stack td.tp { grid-column: 1 / -1; display: block; }
  table.stack td.tp::before { content: none; }
  table.stack td.score { grid-column: 1 / -1; font-weight: 400; }
  .funds .rb { grid-template-columns: 1fr auto; }
  .verdict { font-size: 15px; }
}

/* アクティビスト：損益の分布・含み損の一覧・並べ替え */
.rb.loss .rb-bar i { background: var(--axis); }
.under { max-width: 760px; }
.sort { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.sort button { font: inherit; font-size: 13px; padding: 3px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; }
.sort button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); font-weight: 700; }
