:root {
  --bg: #f4f7f7;
  --card: #ffffff;
  --text: #1c2526;
  --muted: #637173;
  --accent: #0f8a7e;
  --accent-dark: #0b6f65;
  --border: #dfe6e6;
  --link: #0b6f65;
  --ok: #15803d;
  --ok-bg: #dcfce7;
  --cond: #b45309;
  --cond-bg: #fef3c7;
  --ng: #b91c1c;
  --ng-bg: #fee2e2;
  --unk: #475569;
  --unk-bg: #e2e8f0;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121718;
    --card: #1b2223;
    --text: #e6eeee;
    --muted: #97a6a8;
    --border: #2c3637;
    --link: #5fd3c6;
    --ok: #86efac;
    --ok-bg: #14361f;
    --cond: #fcd34d;
    --cond-bg: #3a2c0b;
    --ng: #fca5a5;
    --ng-bg: #3d1515;
    --unk: #cbd5e1;
    --unk-bg: #2a3240;
  }
}
* { box-sizing: border-box; }
a { color: var(--link); }
a:hover { text-decoration: none; }
body {
  margin: 0;
  font-family: "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}
header.site {
  background: var(--accent);
  color: #fff;
  padding: 14px 16px;
}
header.site .inner, main, footer { max-width: 820px; margin: 0 auto; }
header.site a { color: #fff; text-decoration: none; font-weight: 700; }
header.site nav { margin-top: 4px; font-size: 14px; }
header.site nav a { font-weight: 400; margin-right: 14px; opacity: .9; }
main { padding: 20px 16px 40px; }
h1 { font-size: 24px; margin: 0 0 6px; }
h2 { font-size: 18px; margin: 28px 0 10px; }
h3 { font-size: 16px; margin: 18px 0 6px; }
.lead { color: var(--muted); margin: 0 0 20px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
input[type=search], input[type=text], select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
}
input:focus, select:focus { outline: 2px solid var(--accent); border-color: transparent; }
.search-box { font-size: 17px !important; padding: 14px 14px !important; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 9px 6px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.tool-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.tool-list a { text-decoration: none; color: inherit; }
.tool-list .card { height: 100%; margin: 0; }
.tool-list .card:hover { border-color: var(--accent); }
.tool-list h2 { margin: 0 0 6px; font-size: 17px; color: var(--accent); }
.tool-list p { margin: 0; color: var(--muted); font-size: 14px; }
.card ul, .card ol { margin: 8px 0; padding-left: 22px; }
.card li { margin: 4px 0; }
.ad { min-height: 90px; margin: 16px 0; text-align: center; color: var(--muted); font-size: 12px; }
footer { padding: 20px 16px 40px; font-size: 12px; color: var(--muted); }

/* バッジ */
.badge {
  display: inline-block;
  min-width: 2.2em;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}
.badge.ok { color: var(--ok); background: var(--ok-bg); }
.badge.cond { color: var(--cond); background: var(--cond-bg); }
.badge.ng { color: var(--ng); background: var(--ng-bg); }
.badge.unknown { color: var(--unk); background: var(--unk-bg); }
.legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--muted); margin: 8px 0 0; }

/* 検索結果 */
.results { list-style: none; padding: 0; margin: 12px 0 0; }
.results li { border-top: 1px solid var(--border); }
.results li:first-child { border-top: 0; }
.results a { display: block; padding: 10px 4px; text-decoration: none; color: inherit; }
.results a:hover { background: var(--bg); }
.results .t { font-weight: 700; }
.results .s { font-size: 12px; color: var(--muted); }
.tag { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 4px; border: 1px solid var(--border); color: var(--muted); margin-right: 6px; vertical-align: 1px; }

/* 詳細 */
.rules-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.rule-row { display: grid; grid-template-columns: 9em 4.5em 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); align-items: start; }
.rule-row:last-child { border-bottom: 0; }
.rule-row .k { font-size: 13px; color: var(--muted); font-weight: 600; }
.rule-row .v { font-size: 14px; }
@media (max-width: 560px) {
  .rule-row { grid-template-columns: 1fr auto; }
  .rule-row .v { grid-column: 1 / -1; }
}
.meta { font-size: 12px; color: var(--muted); }
.callout { border-left: 4px solid var(--accent); background: var(--bg); padding: 10px 12px; border-radius: 0 8px 8px 0; margin: 12px 0; font-size: 14px; }
.callout.warn { border-color: var(--cond); }
.sources { font-size: 13px; }
.company-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.company-list a { display: block; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: inherit; background: var(--card); }
.company-list a:hover { border-color: var(--accent); }
.company-list .n { font-weight: 700; }
.company-list .b { margin-top: 4px; display: flex; gap: 4px; flex-wrap: wrap; font-size: 11px; color: var(--muted); align-items: center; }

/* チェッカー */
.checker-result { margin-top: 14px; }
.checker-result .verdict { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 34px; margin: 10px 0; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
