/* lp-patrol.com の共通の見た目（docs/trust-redesign/02-design.md §4）。inline の style は使わない（CSP の style-src 'self' で通す） */
:root {
  color-scheme: light dark;
  --bg: #f7f8fa;
  --card: #ffffff;
  --fg: #1d2330;
  --muted: #5b6475;
  --line: #e3e6ec;
  /* #2f6fe4 は --bg の上で 4.38（AA 未満）だったので濃くした。--bg 5.26・--card 5.59・--accent-weak 4.93・白い文字 5.59 */
  --accent: #2a63cc;
  --accent-weak: #eaf1fd;
  --note: #6b5a2e;
  --on-accent: #ffffff;
  --font: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151c;
    --card: #1a1f29;
    --fg: #e8ebf1;
    --muted: #a3acbb;
    --line: #2a3140;
    --accent: #7aa7ff;
    --accent-weak: #1c2840;
    --note: #d9c58f;
    --on-accent: #0d1420;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1 { font-size: 28px; line-height: 1.5; margin: 0 0 16px; font-weight: 700; }
h2 { font-size: 22px; line-height: 1.5; margin: 0 0 16px; font-weight: 700; }
h3 { font-size: 17px; line-height: 1.6; margin: 0 0 8px; font-weight: 700; }
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px; padding-left: 1.4em; }
li + li { margin-top: 4px; }
code { font-family: var(--mono); font-size: .92em; word-break: break-all; }
pre { margin: 0 0 16px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow: auto; font-family: var(--mono); font-size: 13px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
strong, b { font-weight: 700; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--card); padding: 8px 12px; border-radius: 8px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 32px; }
.narrow { max-width: 744px; }
.prose { max-width: 680px; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 14px; }
.mt { margin-top: 16px; }
.mt-lg { margin-top: 40px; }

/* 頭と足 */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--fg); }
.brand img { display: block; width: 168px; height: auto; }
.brand .kana { font-size: 12px; color: var(--muted); }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; }
/* マイページ（app.lp-patrol.com）への入口。ここからはログインの有無が分からないので、ログイン済みならそのまま、未ログインならアプリの側でログインへ回る /orgs を指す */
.site-nav { margin-left: auto; }
.site-mypage { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 2px solid var(--accent); border-radius: 8px; font-size: 14px; font-weight: 700; color: var(--accent); text-decoration: none; white-space: nowrap; }
.site-mypage:hover { background: var(--accent-weak); }
.site-mypage-icon { display: none; }
.site-footer { padding: 32px 0 48px; font-size: 14px; color: var(--muted); }
.site-footer ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer li + li { margin-top: 0; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }

/* 段 */
.hero { padding: 72px 0 56px; background: var(--card); border-bottom: 1px solid var(--line); }
.hero .lead { font-size: 18px; max-width: 680px; }
.page-head { padding: 48px 0 32px; background: var(--card); border-bottom: 1px solid var(--line); }
.page-head .lead { max-width: 680px; margin-bottom: 0; }
.blk { padding: 64px 0; border-bottom: 1px solid var(--line); }
.blk.alt { background: var(--card); }
.blk h2 + .sub { margin-top: -8px; }

.tag { display: inline-block; font-size: 14px; padding: 2px 12px; border-radius: 999px; background: var(--accent-weak); color: var(--fg); margin-bottom: 16px; }
.sample-badge { display: inline-block; font-size: 13px; border: 1px dashed var(--accent); color: var(--fg); border-radius: 6px; padding: 2px 8px; margin-bottom: 12px; }
.notice { border: 1px dashed var(--accent); background: var(--accent-weak); border-radius: 12px; padding: 16px 20px; margin: 0 0 24px; }
.notice p:last-child { margin-bottom: 0; }

/* ボタン */
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 8px; font: inherit; font-weight: 700; text-decoration: none; border: 2px solid var(--accent); cursor: pointer; text-align: center; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.secondary { background: transparent; color: var(--accent); }
.btn.small { min-height: 44px; padding: 0 16px; font-size: 14px; }

/* 面 */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.alt .card { background: var(--bg); }
.card > :last-child { margin-bottom: 0; }
.box { border: 1px solid var(--accent); border-radius: 12px; padding: 20px; background: var(--accent-weak); margin: 16px 0; }
.box > :last-child { margin-bottom: 0; }
.chip { display: inline-block; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; margin: 0 6px 4px 0; color: var(--fg); background: var(--card); }
.chip.sev { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.chip.unknown { border-style: dashed; }
.state-note { color: var(--note); font-weight: 700; }
/* 途中で折らない語（狭い幅で「プライバシーポリシー」の「ー」だけが次の行に落ちないように） */
.nw { white-space: nowrap; overflow-wrap: normal; }
/* 見出しを言葉の途中で改行しない（「直し方の依頼／文まで。」にしない）。入れ子にして、まず文の境目、収まらなければ文の中の句の境目で折り返す */
.phrase { display: inline-block; }

/* 流れ・手順 */
.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; list-style: none; padding: 0; }
.flow li { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.alt .flow li { background: var(--bg); }
.flow b { display: block; color: var(--accent); margin-bottom: 4px; }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.steps li { counter-increment: s; margin: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 20px 20px 20px 60px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 18px; top: 20px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }

/* 使い方のページ（/manual/）: 目次・流れの図・画面の写真 */
.toc ul { list-style: none; padding: 0; columns: 2; column-gap: 32px; margin: 0; }
.toc li { break-inside: avoid; }
.toc a { display: inline-flex; align-items: center; min-height: 44px; }
.flow-chart { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.flow-chart li { position: relative; margin: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 16px; font-size: 14px; }
.flow-chart li + li::before { content: "→"; content: "→" / ""; position: absolute; left: -22px; top: 50%; transform: translateY(-50%); color: var(--accent); font-weight: 700; font-size: 18px; }
.flow-chart b { display: block; font-size: 16px; margin: 4px 0; }
.flow-chart a { display: block; margin-top: 8px; }
.flow-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 14px; }
.flow-chart .flow-limit { border: 2px solid var(--accent); }
.flow-badge { display: inline-block; margin-left: 8px; font-size: 13px; font-weight: 700; color: var(--accent); background: var(--accent-weak); border: 1px solid var(--accent); border-radius: 999px; padding: 0 10px; }
.shot { margin: 24px 0 12px; }
.shot a { display: block; }
/* 写真は明るい画面のまま。暗色でもまわりと区切れるよう、白い地と枠で囲む */
.shot img { display: block; max-width: 100%; height: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 0 0 4px var(--card); }
.shot figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
.marks { margin-bottom: 24px; }
.marks > li::marker { color: #c8102e; font-weight: 700; }
@media (prefers-color-scheme: dark) {
  .shot img { border-color: var(--muted); }
  .marks > li::marker { color: #ff8a8a; }
}

/* 情報源の一覧（トップ） */
.srclist { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 24px; }
.srclist li { margin: 0; border-bottom: 1px solid var(--line); padding: 8px 0; }
.srclist .kind { color: var(--muted); font-size: 13px; margin-left: 8px; }
.feed-summary { margin: 16px 0; }

/* 情報源の帯（トップの冒頭・情報源のページの冒頭） */
/* 見出しより目立たないよう、枠は細い線と左の色の線だけにし、地は周りより一段だけ変える */
.src-band { border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--bg); border-radius: 10px; padding: 14px 18px; margin: 8px 0 24px; max-width: 880px; }
.src-band-lead { font-size: 16px; font-weight: 700; line-height: 1.6; margin: 0 0 10px; }
.src-band-list { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.src-band-list li { margin: 0; font-size: 13px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px; white-space: nowrap; }
.src-band-note { font-size: 13px; color: var(--muted); margin: 0; }
.src-band-note a { font-weight: 700; }

/* FAQ */
details.faq { border-bottom: 1px solid var(--line); padding: 4px 0; }
details.faq summary { font-weight: 700; cursor: pointer; min-height: 44px; display: flex; align-items: center; padding: 8px 0; list-style: none; }
details.faq summary::-webkit-details-marker { display: none; }
/* 開閉の印（読み上げには出さない）。閉じているとき ▸・開いているとき ▾ */
details.faq summary::before { content: "▸"; content: "▸" / ""; flex: none; width: 1.2em; color: var(--accent); }
details.faq[open] summary::before { content: "▾"; content: "▾" / ""; }
details.faq p { margin: 4px 0 12px; }

/* 表 */
.table-box { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: top; }
th { font-weight: 700; color: var(--muted); font-size: 13px; }
tbody th { color: var(--fg); font-size: 15px; }
table.ops th { width: 30%; }
.legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 13px; color: var(--muted); }
.legend li + li { margin-top: 0; }

/* お知らせ */
.news-list { list-style: none; padding: 0; }
.news-item { border-left: 3px solid var(--line); padding-left: 16px; margin: 0 0 16px; }
.news-item time { font-weight: 700; margin-right: 8px; }

/* 見本 */
.sample-site dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
.sample-site dt { color: var(--muted); }
.sample-site dd { margin: 0; }
.item { margin-bottom: 16px; }
.item-head { margin-bottom: 12px; }
.item-head .title { display: block; font-size: 17px; font-weight: 700; margin-top: 4px; }
.pick { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; cursor: pointer; }
.pick input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.reader { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.reader h3 { font-size: 15px; }
.reader p { margin-bottom: 12px; }
.tablist { display: none; gap: 8px; margin-bottom: 12px; }
.tablist [role="tab"] { min-height: 44px; padding: 0 16px; border-radius: 8px; border: 2px solid var(--accent); background: transparent; color: var(--accent); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.tablist [role="tab"][aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.basis { font-size: 14px; color: var(--muted); }
.handoff textarea { width: 100%; min-height: 360px; font-family: var(--mono); font-size: 13px; line-height: 1.6; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--fg); resize: vertical; }
.handoff .msg { min-height: 1.8em; font-weight: 700; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.pick-all { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

@media (max-width: 900px) {
  /* ロゴ・リンク・マイページが1行に収まらないので、1行目にロゴとマイページ、2行目にリンクを置く */
  .site-nav { order: 2; width: 100%; margin-left: 0; }
  .grid3 { grid-template-columns: 1fr; }
  .flow-chart { grid-template-columns: 1fr; }
  .flow-chart li + li::before { content: "↓"; content: "↓" / ""; left: 50%; top: -24px; transform: translateX(-50%); }
}
/* 情報源の表は8列あり、1000px 以下では列が詰まって読めないので、情報源ごとのカードに組み替える */
@media (max-width: 1000px) {
  table.resp thead { display: none; }
  table.resp, table.resp tbody, table.resp tr, table.resp td, table.resp th { display: block; width: 100%; }
  table.resp tr { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; padding: 8px 12px; background: var(--card); }
  table.resp td, table.resp th { border: 0; padding: 4px 0; }
  table.resp td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: 12px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 40px 0 32px; }
  .hero .lead { font-size: 16px; }
  .src-band { padding: 12px 14px; }
  .src-band-lead { font-size: 15px; }
  .page-head { padding: 32px 0 24px; }
  .blk { padding: 48px 0; }
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  .card { padding: 20px; }
  .grid2, .steps, .srclist, .flow { grid-template-columns: 1fr; }
  .toc ul { columns: 1; }
  .btns { flex-direction: column; }
  .btn { width: 100%; }
  .brand img { width: 140px; }
  /* スマホでは文字をやめて人の形のマークだけにする（読み上げは aria-label の「マイページ」） */
  .site-mypage { justify-content: center; width: 44px; padding: 0; }
  .site-mypage-icon { display: block; }
  .site-mypage-text { display: none; }
  .sample-site dl { grid-template-columns: 1fr; gap: 0; }
  .sample-site dd { margin-bottom: 8px; }
  /* 見本: スマホではタブで切り替える（JS が動くときだけ。動かなければ両方を縦に並べる） */
  .reader { grid-template-columns: 1fr; gap: 8px; }
  .js .tablist { display: flex; }
  .js .reader .is-inactive { display: none; }
  table.ops th { width: auto; }
}
/* 360px 未満ではロゴ・読み仮名・マイページが1行に収まらないので、読み仮名をロゴの下へ */
@media (max-width: 359px) {
  .brand { flex-direction: column; align-items: flex-start; gap: 0; }
}
