/* RAT 案D v2: 写真が主役の誌面。白地・黒い見出し・アクセント1色（RAT のロゴのオレンジ）
   骨格=東洋経済オンライン（スマホ）／PC の段組み=Tech in Asia・TechCrunch */
:root {
  --ink: #111; --ink-2: #444; --ink-3: #767676; --rule: #e6e6e6; --bar: #2b2b2b;
  --accent: #d2561e; --bg: #fff; --bg-2: #f6f5f3;
  --sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.75; letter-spacing: .02em; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

.mock-bar { background: #000; color: #ccc; font-size: 11.5px; line-height: 1.5; padding: 6px 16px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.mock-bar a { color: #fff; text-decoration: underline; }
.mock-bar .dsw a { display: inline-block; text-decoration: none; border: 1px solid #555; border-radius: 3px; padding: 0 7px; margin-left: 3px; }
.mock-bar .dsw a[aria-current] { background: #fff; color: #000; }

/* ヘッダー（東洋経済型: 白いロゴ帯＋濃いナビの帯） */
.hd { background: #fff; position: sticky; top: 0; z-index: 20; }
.hd-top { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { display: flex; align-items: center; }
.logo img { height: 28px; width: auto; }
.hd-r { display: flex; align-items: center; gap: 4px; }
.hd-r .btn { display: none; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; color: var(--ink); cursor: pointer; }
.icon-btn svg { width: 22px; height: 22px; }
.hd-sub { display: none; }
.gnav { background: var(--bar); }
.gnav .wrap { display: flex; overflow-x: auto; scrollbar-width: none; padding: 0; }
.gnav .wrap::-webkit-scrollbar { display: none; }
.gnav a { flex: none; color: #fff; font-size: 14px; font-weight: 700; padding: 10px 14px; letter-spacing: .04em; }
.gnav a[aria-current] { background: #000; box-shadow: inset 0 -3px 0 var(--accent); }

/* 共通の部品 */
.kicker { font-size: 12.5px; font-weight: 700; color: var(--accent); letter-spacing: .04em; }
.by { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ev { font-size: 11.5px; color: var(--ink-2); border: 1px solid #cfcfcf; border-radius: 3px; padding: 0 6px; line-height: 1.7; white-space: nowrap; }
.ph { position: relative; overflow: hidden; background: #ddd; }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
a:hover .ph img { transform: scale(1.03); }
.r169 { aspect-ratio: 16 / 9; } .r32 { aspect-ratio: 3 / 2; }
h2.sec { font-size: 18px; font-weight: 700; margin: 0 0 12px; padding: 0 0 8px; border-bottom: 2px solid var(--ink); display: flex; justify-content: space-between; align-items: baseline; }
h2.sec a { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.block { padding: 28px 0 4px; }

/* おすすめ（大きな写真の1本） */
.lead { display: block; }
.lead .t { font-size: 21px; font-weight: 700; line-height: 1.5; margin: 10px 0 6px; }
.lead p { font-size: 14.5px; color: var(--ink-2); margin: 0 0 8px; line-height: 1.8; }
.lead:hover .t { text-decoration: underline; text-underline-offset: 4px; }
.sublead { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 12px; margin-top: 20px; }
.sublead .t { font-size: 14.5px; font-weight: 700; line-height: 1.55; margin: 7px 0 4px; }
.sublead a:hover .t { text-decoration: underline; }

/* 一覧（文字左・写真右） */
.row { display: grid; grid-template-columns: 1fr 120px; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--rule); align-items: start; }
.row .t { font-size: 15.5px; font-weight: 700; line-height: 1.55; margin: 3px 0 5px; }
.row:hover .t { text-decoration: underline; text-underline-offset: 3px; }
.row .ph { aspect-ratio: 4 / 3; }

/* 特集（写真に文字を重ねる。雑誌の扉） */
.feature { position: relative; display: block; color: #fff; margin: 0 -16px; }
.feature .ph { aspect-ratio: 4 / 5; }
.feature .cap { position: absolute; inset: auto 0 0 0; padding: 80px 20px 22px; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.feature .lab { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .12em; background: var(--accent); padding: 2px 10px; }
.feature .t { font-size: 24px; font-weight: 700; line-height: 1.45; margin: 10px 0 6px; }
.feature p { margin: 0; font-size: 14px; opacity: .92; line-height: 1.75; }

/* ランキング（番号＋写真） */
.rank-tabs { display: flex; border: 1px solid var(--ink); border-radius: 3px; overflow: hidden; margin: 0 0 4px; }
.rank-tabs button { flex: 1; border: 0; background: #fff; padding: 6px 0; font-size: 13px; font-weight: 700; cursor: pointer; }
.rank-tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.rank { list-style: none; margin: 0; padding: 0; counter-reset: rk; }
.rank li { counter-increment: rk; border-bottom: 1px solid var(--rule); }
.rank a { display: grid; grid-template-columns: 24px 92px 1fr; gap: 10px; padding: 12px 0; align-items: start; }
.rank a::before { content: counter(rk); font-size: 20px; font-weight: 800; line-height: 1.1; color: var(--ink); }
.rank li:nth-child(-n+3) a::before { color: var(--accent); }
.rank .ph { aspect-ratio: 4 / 3; }
.rank .t { font-size: 14px; font-weight: 700; line-height: 1.55; }
.rank a:hover .t { text-decoration: underline; }
.rank-panel[hidden] { display: none; }

/* 連載（写真カードの横スクロール） */
.hscroll { scroll-padding: 0 16px; display: grid; grid-auto-flow: column; grid-auto-columns: 72%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > a { scroll-snap-align: start; }
.scard .ph { aspect-ratio: 3 / 2; }
.scard .meta { font-size: 12px; font-weight: 700; color: var(--accent); margin-top: 9px; }
.scard b { display: block; font-size: 17px; line-height: 1.45; margin: 2px 0 4px; }
.scard p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.7; }

/* テーマ（写真のタイル） */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { position: relative; display: block; color: #fff; }
.tile .ph { aspect-ratio: 3 / 2; }
.tile span { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 12px 9px; font-size: 15px; font-weight: 700; background: linear-gradient(transparent, rgba(0,0,0,.68)); }
.tile em { font-style: normal; font-size: 11.5px; font-weight: 500; opacity: .85; margin-left: 6px; }

/* 人と習慣（インタビュー型） */
.people { display: grid; gap: 18px; }
.person { display: grid; grid-template-columns: 40% 1fr; gap: 14px; align-items: center; }
.person .ph { aspect-ratio: 4 / 5; }
.person .q { font-size: 17px; font-weight: 700; line-height: 1.6; margin: 6px 0; }
.person p { font-size: 13px; color: var(--ink-3); margin: 0; line-height: 1.7; }
.person:hover .q { text-decoration: underline; }

/* 最先端医療（写真の帯） */
.band { position: relative; display: block; color: #fff; margin: 0 -16px; }
.band .ph { aspect-ratio: 4 / 3; }
.band .cap { position: absolute; inset: 0; padding: 22px 20px; display: flex; flex-direction: column; justify-content: flex-end; background: linear-gradient(transparent 20%, rgba(0,0,0,.8)); }
.band .t { font-size: 22px; font-weight: 700; line-height: 1.45; margin: 6px 0 6px; }
.band p { margin: 0; font-size: 13.5px; opacity: .92; }
.band .lab { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: #ffb38a; }
.soudan { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--ink); padding: 14px 16px; margin-top: 14px; font-size: 14.5px; font-weight: 700; }
.soudan span { font-size: 12.5px; font-weight: 400; color: var(--ink-3); display: block; }

/* ニュースレター */
.nl { background: var(--bg-2); padding: 22px 18px; margin: 0 -16px; display: grid; gap: 14px; }
.nl .ph { aspect-ratio: 16 / 9; }
.nl b { font-size: 19px; line-height: 1.5; display: block; }
.nl p { font-size: 14px; color: var(--ink-2); margin: 4px 0 12px; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 11px 20px; font-size: 14.5px; font-weight: 700; border: 1px solid var(--ink); background: #fff; color: var(--ink); cursor: pointer; }
.btn-ink { background: var(--ink); color: #fff; }

/* フッター */
.ft { background: #1c1c1c; color: #bbb; margin-top: 44px; padding: 34px 0 40px; font-size: 13.5px; }
.ft .logo-w { font-size: 18px; font-weight: 800; color: #fff; }
.ft .logo-w span { color: var(--accent); }
.ft-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 20px; }
.ft h4 { font-size: 13px; color: #fff; margin: 0 0 6px; }
.ft ul { list-style: none; margin: 0; padding: 0; }
.ft li { margin: 4px 0; }
.ft .note { margin-top: 24px; font-size: 12px; color: #8a8a8a; line-height: 1.8; border-top: 1px solid #333; padding-top: 14px; }

.toast { position: fixed; left: 16px; right: 16px; bottom: 20px; max-width: 460px; margin: 0 auto; background: #000; color: #fff; font-size: 13.5px; line-height: 1.7; padding: 12px 16px; z-index: 50; display: none; }
.toast.on { display: block; }

/* ===== 記事 ===== */
.art-hero { margin: 0 -16px; }
.art-hero .ph { aspect-ratio: 16 / 10; }
.credit { font-size: 11px; color: var(--ink-3); padding: 4px 16px 0; }
.art { padding-top: 16px; }
.crumb { font-size: 12px; color: var(--ink-3); margin-bottom: 8px; }
.art h1 { font-size: 24px; font-weight: 700; line-height: 1.5; margin: 6px 0 10px; }
.art .lede { font-size: 15.5px; color: var(--ink-2); line-height: 1.85; margin: 0 0 14px; }
.art-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: 12.5px; color: var(--ink-3); }
.author { display: flex; align-items: center; gap: 10px; margin: 14px 0 20px; font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.author .av { width: 40px; height: 40px; border-radius: 50%; flex: none; background: #222; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.author b { color: var(--ink); }
.points { border-top: 3px solid var(--ink); border-bottom: 1px solid var(--rule); padding: 12px 0 14px; margin: 0 0 24px; }
.points b { font-size: 14px; }
.points ul { margin: 6px 0 0; padding-left: 1.2em; font-size: 15.5px; line-height: 1.85; }
.points li { margin: 3px 0; }
.body { font-size: 17px; line-height: 1.95; }
.body p { margin: 0 0 1.15em; }
.body h2 { font-size: 21px; font-weight: 700; line-height: 1.5; margin: 40px 0 14px; padding-top: 14px; border-top: 1px solid var(--ink); scroll-margin-top: 110px; }
.body figure { margin: 22px 0 26px; }
.body figure.pic { margin-left: -16px; margin-right: -16px; }
.body figure.pic .ph { aspect-ratio: 3 / 2; }
.body figure.dia { background: var(--bg-2); padding: 18px 12px 12px; }
.body figure svg { display: block; width: 100%; max-width: 600px; height: auto; margin: 0 auto; }
.body figcaption { font-size: 12.5px; color: var(--ink-3); padding: 8px 16px 0; line-height: 1.6; }
.body figure.dia figcaption { padding: 8px 4px 0; }
.roles { list-style: none; margin: 0 0 1em; padding: 0; counter-reset: rl; }
.roles li { counter-increment: rl; display: grid; grid-template-columns: 34px 1fr; padding: 12px 0; border-top: 1px solid var(--rule); }
.roles li:last-child { border-bottom: 1px solid var(--rule); }
.roles li::before { content: counter(rl); font-size: 20px; font-weight: 800; color: var(--accent); line-height: 1.4; }
.roles b { display: block; font-size: 16px; }
.roles span { font-size: 15.5px; color: var(--ink-2); line-height: 1.8; }
.term { font: inherit; color: inherit; background: none; border: 0; padding: 0; border-bottom: 1.5px dotted var(--ink-2); cursor: pointer; }
.pop { position: fixed; left: 16px; right: 16px; bottom: 20px; max-width: 520px; margin: 0 auto; background: #111; color: #eee; padding: 14px 18px; font-size: 15px; line-height: 1.8; box-shadow: 0 10px 30px rgba(0,0,0,.3); display: none; z-index: 40; }
.pop b { color: #fff; }
.pop.on { display: block; }
.evt { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 6px 0 22px; line-height: 1.6; }
.evt caption { text-align: left; font-size: 13px; font-weight: 700; padding-bottom: 6px; }
.evt caption a { color: var(--ink-3); font-weight: 400; margin-left: 8px; text-decoration: underline; }
.evt th, .evt td { border-bottom: 1px solid var(--rule); padding: 10px 6px; text-align: left; vertical-align: top; }
.evt thead th { font-size: 12px; color: var(--ink-3); font-weight: 500; border-bottom: 1px solid var(--ink); }
.evt td:nth-child(2) { white-space: nowrap; }
.box { background: var(--bg-2); padding: 16px 18px; margin: 0 0 1.2em; font-size: 15.5px; line-height: 1.85; }
.box b { display: block; font-size: 14px; margin-bottom: 2px; }
.box ul { margin: 6px 0 0; padding-left: 1.2em; }
details.more { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); margin: 30px 0 0; }
details.more summary { cursor: pointer; font-weight: 700; padding: 13px 0; list-style: none; display: flex; justify-content: space-between; font-size: 15px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: "＋"; }
details.more[open] summary::after { content: "－"; }
details.more table { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 1.75; margin: 0 0 14px; }
details.more th, details.more td { border-top: 1px solid var(--rule); padding: 9px 6px; text-align: left; vertical-align: top; }
details.more th { width: 30%; color: var(--ink-3); font-weight: 500; }
.react { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 28px 0 0; font-size: 14px; font-weight: 700; }
.react span { flex-basis: 100%; }
.react button { border: 1px solid var(--ink); background: #fff; padding: 6px 14px; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.react button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.src { font-size: 12.5px; color: var(--ink-2); line-height: 1.75; margin-top: 28px; }
.src ol { padding-left: 1.4em; margin: 6px 0 0; }
.src li { margin: 5px 0; word-break: break-word; }
.src a { text-decoration: underline; }
.disc { font-size: 12px; color: var(--ink-3); margin-top: 22px; line-height: 1.75; }
.side { display: none; }

/* ===== タブレット以上 ===== */
@media (min-width: 760px) {
  .wrap { padding: 0 28px; }
  .feature, .band, .nl, .art-hero, .body figure.pic { margin-left: 0; margin-right: 0; }
  .feature .ph { aspect-ratio: 21 / 9; }
  .feature .cap { padding: 90px 36px 30px; }
  .feature .t { font-size: 32px; max-width: 760px; }
  .feature p { max-width: 640px; }
  .band .ph { aspect-ratio: 21 / 8; }
  .band .cap { padding: 32px 40px; background: linear-gradient(90deg, rgba(0,0,0,.78), rgba(0,0,0,.1)); }
  .band .t { font-size: 28px; max-width: 560px; }
  .band p { max-width: 520px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .hscroll { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; margin: 0; padding: 0; }
  .people { grid-template-columns: 1fr 1fr; gap: 28px; }
  .nl { grid-template-columns: 1fr 1fr; align-items: center; padding: 28px; }
  .row { grid-template-columns: 200px 1fr; }
  .row .ph { order: -1; aspect-ratio: 3 / 2; }
  .ft-cols { grid-template-columns: repeat(4, 1fr); }
  .credit { padding: 4px 0 0; }
}

/* ===== PC ===== */
@media (min-width: 1040px) {
  .hd-top { height: 72px; }
  .logo img { height: 38px; }
  .hd-sub { display: inline; font-size: 12px; color: var(--ink-3); margin-left: 16px; letter-spacing: .06em; }
  .hd-r .btn { display: inline-flex; padding: 8px 16px; font-size: 13px; margin-right: 6px; }
  .gnav a { padding: 11px 18px; font-size: 14.5px; }
  .hero-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 32px; padding-top: 26px; }
  .lead .t { font-size: 30px; line-height: 1.4; }
  .sublead { grid-template-columns: 1fr; margin-top: 0; gap: 0; }
  .sublead a { display: grid; grid-template-columns: 160px 1fr; gap: 14px; padding: 0 0 16px; margin-bottom: 16px; border-bottom: 1px solid var(--rule); }
  .sublead a:last-child { border-bottom: 0; margin-bottom: 0; }
  .sublead .t { font-size: 16px; margin-top: 0; }
  .main-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 44px; }
  .side { display: block; }
  .side-in { position: sticky; top: 132px; display: grid; gap: 30px; }
  .side .nl { grid-template-columns: 1fr; padding: 20px; }
  .only-sp { display: none; }
  .art-grid { display: grid; grid-template-columns: minmax(0, 740px) 300px; gap: 60px; justify-content: center; }
  .art-hero { max-width: 1140px; margin: 24px auto 0; }
  .art-hero .ph { aspect-ratio: 21 / 9; }
  .art h1 { font-size: 34px; }
  .body { font-size: 18px; }
}
