/* KKI888 Guide - one stylesheet, mobile first, system fonts, no images */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f3f5fa;
  --ink: #141a2b;
  --muted: #465066;
  --line: #cfd6e4;
  --brand: #1f3a8a;
  --link: #1746b8;
  --visited: #5a35a8;
  --focus: #b45309;
  --notice-bg: #1b2440;
  --notice-ink: #ffffff;
  --warn-bg: #fff3cd;
  --warn-ink: #3d2e00;
  --warn-line: #b88700;
  --bad-bg: #fde8e8;
  --bad-ink: #7a1414;
  --good-bg: #e3f3e8;
  --good-ink: #0f4a26;
  --code-bg: #e9edf6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1422;
    --surface: #182036;
    --ink: #e9edf6;
    --muted: #b6c0d4;
    --line: #37435f;
    --brand: #a9c0ff;
    --link: #9cb8ff;
    --visited: #c9b0ff;
    --focus: #fbbf24;
    --notice-bg: #05080f;
    --notice-ink: #ffffff;
    --warn-bg: #3b2f08;
    --warn-ink: #ffe8a3;
    --warn-line: #d9a800;
    --bad-bg: #441a1a;
    --bad-ink: #ffc9c9;
    --good-bg: #143524;
    --good-ink: #bdebcd;
    --code-bg: #232d47;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:visited {
  color: var(--visited);
}

a:hover {
  text-decoration-thickness: 0.14em;
}

a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.125rem;
}

.skip {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--bg);
  color: var(--link);
  border: 2px solid var(--focus);
  border-radius: 0.375rem;
}

.skip:focus {
  top: 0.5rem;
}

/* Disclosure strip shown on every page */

.notice {
  background: var(--notice-bg);
  color: var(--notice-ink);
  font-size: 0.9375rem;
  line-height: 1.5;
  padding: 0.75rem 0;
}

.notice p {
  margin: 0;
}

.notice strong {
  color: #ffd76a;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
}

.wordmark:visited {
  color: var(--ink);
}

.wordmark img {
  display: block;
  border-radius: 0.375rem;
}

.wordmark small {
  display: none;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.2;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  min-width: 3rem;
  justify-content: center;
  padding: 0 0.5rem;
  border-radius: 0.375rem;
  font-size: 1rem;
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

/* Page furniture */

main {
  display: block;
  padding-bottom: 3rem;
}

.crumbs {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  color: var(--muted);
}

.crumbs li {
  display: inline;
}

.crumbs li + li::before {
  content: "\203A";
  padding: 0 0.5rem;
}

.crumbs a {
  display: inline-block;
  padding: 0.75rem 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.25;
  text-wrap: balance;
}

h1 {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.75rem;
  letter-spacing: -0.01em;
}

h2 {
  margin: 2.75rem 0 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 1.4375rem;
}

h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.1875rem;
}

p,
ul,
ol,
dl,
table,
figure,
blockquote {
  margin: 0 0 1.125rem;
}

ul,
ol {
  padding-left: 1.375rem;
}

li {
  margin-bottom: 0.5rem;
}

li > ul,
li > ol {
  margin-top: 0.5rem;
}

.lead {
  font-size: 1.1875rem;
  line-height: 1.55;
}

.byline {
  color: var(--muted);
  font-size: 0.9375rem;
}

.tl {
  padding: 0.875rem 1rem;
  border-left: 0.3125rem solid var(--brand);
  background: var(--surface);
  border-radius: 0 0.375rem 0.375rem 0;
}

code,
.addr {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.9375em;
  background: var(--code-bg);
  padding: 0.0625rem 0.3125rem;
  border-radius: 0.25rem;
  overflow-wrap: anywhere;
}

/* Key findings */

.findings {
  margin: 0 0 1.125rem;
  padding: 0;
  list-style: none;
  counter-reset: finding;
}

.findings li {
  position: relative;
  margin: 0 0 0.75rem;
  padding: 0.875rem 1rem 0.875rem 3.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  counter-increment: finding;
}

.findings li::before {
  content: counter(finding);
  position: absolute;
  left: 0.875rem;
  top: 0.875rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--brand);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.75rem;
  text-align: center;
}

.findings strong {
  display: block;
}

/* Table of contents */

.toc {
  padding: 1rem 1rem 0.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  margin-bottom: 1.125rem;
}

.toc h2 {
  margin: 0 0 0.25rem;
  padding: 0;
  border: 0;
  font-size: 1.0625rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.375rem;
}

.toc li {
  margin: 0;
}

.toc a {
  display: inline-block;
  padding: 0.6875rem 0;
}

/* Callouts */

.callout {
  padding: 0.875rem 1rem;
  border: 1px solid var(--warn-line);
  border-left-width: 0.3125rem;
  border-radius: 0.375rem;
  background: var(--warn-bg);
  color: var(--warn-ink);
}

.callout > :last-child {
  margin-bottom: 0;
}

.callout a,
.callout a:visited {
  color: inherit;
}

.callout.plain {
  border-color: var(--line);
  border-left-color: var(--brand);
  background: var(--surface);
  color: var(--ink);
}

.callout.plain a {
  color: var(--link);
}

.callout.plain a:visited {
  color: var(--visited);
}

blockquote {
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 0.3125rem solid var(--line);
}

blockquote p {
  margin-bottom: 0.5rem;
}

blockquote footer {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Tables */

.table-scroll {
  overflow-x: auto;
  margin: 0 0 1.125rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}

table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 0.9688rem;
}

tbody th {
  font-weight: 600;
}

.when {
  display: block;
  margin-top: 0.25rem;
  font-weight: 400;
  color: var(--muted);
}

caption {
  padding: 0.75rem 0.875rem;
  text-align: left;
  font-weight: 700;
  caption-side: top;
}

th,
td {
  padding: 0.625rem 0.875rem;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

thead th {
  background: var(--surface);
}

.status {
  display: inline-block;
  padding: 0.0625rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: 700;
  white-space: nowrap;
}

.status.no {
  background: var(--bad-bg);
  color: var(--bad-ink);
}

.status.yes {
  background: var(--good-bg);
  color: var(--good-ink);
}

/* Figures */

figure {
  padding: 0;
}

figure img {
  display: block;
  width: 100%;
  max-width: 26rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #ffffff;
}

figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Web address anatomy */

.anatomy {
  margin: 0 0 1.125rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--surface);
}

.anatomy .url {
  display: block;
  margin: 0 0 0.875rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.375rem;
  background: var(--bg);
  border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.anatomy .p1 {
  color: var(--muted);
}

.anatomy .p2 {
  background: var(--warn-bg);
  color: var(--warn-ink);
  font-weight: 700;
  padding: 0.0625rem 0.125rem;
  border-radius: 0.1875rem;
}


.anatomy dt {
  font-weight: 700;
}

.anatomy dd {
  margin: 0 0 0.625rem;
}

.anatomy dl {
  margin-bottom: 0.75rem;
}

.anatomy > :last-child {
  margin-bottom: 0;
}

/* Checklist */

.checklist {
  padding: 0;
  list-style: none;
  counter-reset: check;
}

.checklist > li {
  position: relative;
  margin: 0 0 0.875rem;
  padding: 0 0 0.875rem 2.75rem;
  border-bottom: 1px solid var(--line);
  counter-increment: check;
}

.checklist > li:last-child {
  border-bottom: 0;
}

.checklist > li::before {
  content: counter(check);
  position: absolute;
  left: 0;
  top: 0.125rem;
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--brand);
  border-radius: 0.375rem;
  color: var(--brand);
  font-weight: 700;
  line-height: 1.75rem;
  text-align: center;
}

.checklist strong {
  display: block;
}

/* Help box */

.help {
  padding: 1rem;
  border: 2px solid var(--brand);
  border-radius: 0.5rem;
  background: var(--surface);
}

.help h3 {
  margin-top: 0;
}

.help > :last-child {
  margin-bottom: 0;
}

.tel {
  font-weight: 700;
  white-space: nowrap;
}

.faq h3 {
  margin-top: 1.5rem;
}

.sources li,
.log li {
  margin-bottom: 0.75rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}

.actions a {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  font-weight: 700;
}

.findings .tel,
.site-footer .tel {
  display: inline-block;
  padding: 0.75rem 0;
}

.small {
  font-size: 0.9375rem;
  color: var(--muted);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 1.5rem 0 2.5rem;
  font-size: 0.9375rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin: 0;
}

.site-footer li a {
  padding: 0.75rem 0;
}

/* 404 */

.center {
  text-align: center;
  padding-top: 2rem;
}

.center ul {
  display: inline-block;
  text-align: left;
}

@media (min-width: 40rem) {
  body {
    font-size: 1.125rem;
  }

  h1 {
    font-size: 2.25rem;
    margin-top: 2rem;
  }

  h2 {
    font-size: 1.625rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .lead {
    font-size: 1.25rem;
  }

  .wordmark small {
    display: block;
  }

  .toc ol {
    columns: 2;
    column-gap: 2rem;
  }

  .toc li {
    break-inside: avoid;
  }
}

@media print {
  .notice,
  .site-nav,
  .skip,
  .toc {
    display: none;
  }

  body {
    font-size: 11pt;
    color: #000000;
    background: #ffffff;
  }

  a {
    color: #000000;
  }

  h2 {
    break-after: avoid;
  }

  .table-scroll {
    overflow: visible;
    border: 0;
  }
}
