/* iaright — M3-B3 public layout. No framework, no external fonts (CSP: style-src 'self'). */
:root {
  --bg: #ffffff; --surface: #f5f6f8; --text: #16181d; --muted: #545b66; --border: #d9dde3;
  --accent: #1f5fd1; --accent-hover: #174aa6; --accent-text: #ffffff; --focus: #1f5fd1;
  --notice-bg: #fff6dc; --notice-border: #c99a14; --error: #b42318; --error-bg: #fdecea;
  --ok: #146c2e; --ok-bg: #e7f5ea;
  --radius: 10px; --max: 60rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111317; --surface: #1b1e24; --text: #eceef2; --muted: #a8afba; --border: #333843;
    --accent: #7aa7ff; --accent-hover: #a3c1ff; --accent-text: #0b1020; --focus: #7aa7ff;
    --notice-bg: #2c2510; --notice-border: #c99a14; --error: #ff8a80; --error-bg: #2d1414;
    --ok: #7ddc94; --ok-bg: #12261a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111317; --surface: #1b1e24; --text: #eceef2; --muted: #a8afba; --border: #333843;
  --accent: #7aa7ff; --accent-hover: #a3c1ff; --accent-text: #0b1020; --focus: #7aa7ff;
  --notice-bg: #2c2510; --notice-border: #c99a14; --error: #ff8a80; --error-bg: #2d1414;
    --ok: #7ddc94; --ok-bg: #12261a;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); line-height: 1.6;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; outline: none; padding-top: 2rem; padding-bottom: 3rem; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: 16px; padding-right: 16px; }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: clamp(1.75rem, 4vw, 2.6rem); margin: 0 0 .75rem; letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; margin: 2.25rem 0 .75rem; }
h3 { font-size: 1.1rem; margin: 0 0 .25rem; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 44rem; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 8px; top: -100px; background: var(--accent); color: var(--accent-text);
  padding: .5rem 1rem; border-radius: var(--radius); z-index: 10; }
.skip-link:focus { top: 8px; }

/* header / footer */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 3.75rem; }
.logo { font-weight: 800; font-size: 1.3rem; color: var(--text); text-decoration: none; letter-spacing: -0.02em; }
.logo span { color: var(--accent); }
.header-inner nav { margin-left: auto; }
.nav { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: .4rem .75rem; border-radius: 8px; color: var(--text); text-decoration: none; }
.nav a:hover { background: var(--surface); }
.nav a[aria-current="page"] { background: var(--surface); font-weight: 600; }
.theme-toggle { background: transparent; border: 1px solid var(--border); border-radius: 8px; color: var(--text);
  width: 2.5rem; height: 2.5rem; cursor: pointer; display: inline-grid; place-items: center; }
.theme-toggle[hidden] { display: none; }
.theme-toggle-icon::before { content: "\263E"; font-size: 1.1rem; }
:root[data-theme="dark"] .theme-toggle-icon::before { content: "\2600"; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-toggle-icon::before { content: "\2600"; } }
.site-footer { border-top: 1px solid var(--border); background: var(--surface); font-size: .92rem; padding: 1.25rem 0; }
.site-footer p { margin: .25rem 0; max-width: 48rem; }

/* search */
.hero { padding: 1.5rem 0 .5rem; }
.search-form { margin: 1.25rem 0 .5rem; max-width: 44rem; }
.search-form label { display: block; font-weight: 600; margin-bottom: .4rem; }
.search-row { display: flex; gap: .5rem; }
.search-row input { flex: 1; min-width: 0; font: inherit; padding: .75rem .9rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.search-row input[aria-invalid="true"] { border-color: var(--error); }
.search-row button { font: inherit; font-weight: 600; padding: .75rem 1.25rem; border-radius: var(--radius);
  border: 0; background: var(--accent); color: var(--accent-text); cursor: pointer; }
.search-row button:hover { background: var(--accent-hover); }
.hint { font-size: .9rem; color: var(--muted); margin: .4rem 0 0; }
.form-error { color: var(--error); background: var(--error-bg); border-radius: var(--radius); padding: .5rem .9rem; margin-top: .6rem; }
.form-error p { margin: 0; }
@media (max-width: 480px) { .search-row { flex-direction: column; } }

.small-heading { font-size: .95rem; color: var(--muted); font-weight: 600; margin: 1.25rem 0 .5rem; }
.chips, .category-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chip, .category-list a { display: inline-block; padding: .35rem .8rem; border: 1px solid var(--border);
  border-radius: 999px; text-decoration: none; color: var(--text); background: var(--surface); }
.chip:hover, .category-list a:hover { border-color: var(--accent); color: var(--accent); }

.steps { padding-left: 1.25rem; max-width: 44rem; }
.steps li { margin-bottom: .6rem; }
.note { font-size: .95rem; color: var(--muted); max-width: 44rem; }
.notice { background: var(--notice-bg); border-left: 4px solid var(--notice-border); padding: .75rem 1rem;
  border-radius: 0 var(--radius) var(--radius) 0; max-width: 44rem; }

/* results and task lists */
.candidates { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .75rem; }
.card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; background: var(--bg); }
.card p { margin: .35rem 0 0; }
.card-meta { font-size: .85rem; color: var(--muted); }
.why { font-size: .9rem; color: var(--muted); }
.task-group { scroll-margin-top: 1rem; }
.task-list { padding-left: 1.25rem; }
.task-list li { margin-bottom: .4rem; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .4rem;
  font-size: .9rem; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; }

/* task pages (M3-B4) */
.requirements, .evidence { padding-left: 1.25rem; max-width: 48rem; }
.requirements li, .evidence li { margin-bottom: .6rem; }
.legend { display: grid; gap: .35rem; margin: 1rem 0; }
.legend div { display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; }
.legend dt { margin: 0; } .legend dd { margin: 0; color: var(--muted); }
.badge { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
  border: 1px solid var(--border); }
.badge-COMPATIBLE { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.badge-UNKNOWN { background: var(--surface); color: var(--muted); }
.badge-INCOMPATIBLE { background: var(--error-bg); color: var(--error); border-color: var(--error); }
.group { border: 1px solid var(--border); border-radius: var(--radius); margin: 1rem 0; background: var(--bg); }
.group > summary { cursor: pointer; padding: .75rem 1rem; list-style-position: inside; }
.group[open] > summary { border-bottom: 1px solid var(--border); }
.group-title { display: inline; font-size: 1.05rem; margin: 0; }
.group > p { padding: 0 1rem; }
.table-wrap { overflow-x: auto; }
.offerings { width: 100%; border-collapse: collapse; font-size: .93rem; }
.offerings th, .offerings td { text-align: left; vertical-align: top; padding: .6rem 1rem; border-top: 1px solid var(--border); }
.offerings thead th { border-top: 0; font-size: .85rem; color: var(--muted); font-weight: 600; }
.offerings tbody th { font-weight: 600; }
.offerings code { font-size: .82rem; color: var(--muted); word-break: break-all; }
.checks { list-style: none; margin: 0; padding: 0; }
.check-satisfied > span:first-child { color: var(--ok); font-weight: 700; }
.check-missing > span:first-child { color: var(--error); font-weight: 700; }
.check-unknown > span:first-child { color: var(--muted); font-weight: 700; }
@media (max-width: 720px) {
  .offerings thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .offerings, .offerings tbody, .offerings tr, .offerings th, .offerings td { display: block; width: 100%; }
  .offerings tr { border-top: 1px solid var(--border); padding: .5rem 0; }
  .offerings th, .offerings td { border-top: 0; padding: .25rem 1rem; }
  .offerings td::before { content: attr(data-label); display: block; font-size: .8rem; color: var(--muted); font-weight: 600; }
}
