/* deadman-guardian site — one stylesheet, no fonts loaded, no third-party requests. */

:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #5c5c5c;
  --rule: #d8d8d8;
  --rule-soft: #ececec;
  --link: #14507a;
  --quote-bar: #b9b9b9;
  --band: #f6f6f4;
  --yes: #1f6b3a;
  --no: #96201d;
  --wait: #7a5a12;
  --route: #1a4f7a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181a;
    --fg: #e6e6e4;
    --muted: #a2a5a8;
    --rule: #34383c;
    --rule-soft: #26292c;
    --link: #7cb7e0;
    --quote-bar: #4a4f54;
    --band: #1d2023;
    --yes: #7fc79a;
    --no: #e88b88;
    --wait: #d8b662;
    --route: #8fb9dc;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.62;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.1rem 4rem;
}

.wrap.wide { max-width: 64rem; }

/* ---- header / nav ---- */

header.site {
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.6rem;
}

header.site .wrap { padding-top: 1.2rem; padding-bottom: 0.9rem; }

.brand {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--fg);
}

.brand span { color: var(--muted); font-weight: 400; }

nav {
  margin-top: 0.55rem;
  font-size: 0.94rem;
}

nav a {
  margin-right: 1.05rem;
  color: var(--link);
  text-decoration: none;
}

nav a:hover { text-decoration: underline; }
nav a[aria-current="page"] { color: var(--fg); font-weight: 600; }

/* ---- text ---- */

h1 {
  font-size: 1.7rem;
  line-height: 1.28;
  margin: 1.4rem 0 0.9rem;
  font-weight: 650;
}

h2 {
  font-size: 1.22rem;
  margin: 2.4rem 0 0.7rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule-soft);
  font-weight: 650;
}

h3 {
  font-size: 1.02rem;
  margin: 1.7rem 0 0.4rem;
  font-weight: 650;
}

p, li { margin: 0.75rem 0; }
ul, ol { padding-left: 1.25rem; }

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

.lede {
  font-size: 1.1rem;
  border-left: 3px solid var(--fg);
  padding-left: 0.95rem;
  margin: 1.2rem 0 1.6rem;
}

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

blockquote {
  margin: 0.85rem 0;
  padding: 0.1rem 0 0.1rem 0.95rem;
  border-left: 3px solid var(--quote-bar);
  color: var(--fg);
}

blockquote p { margin: 0.45rem 0; }

cite {
  display: block;
  font-style: normal;
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.87em;
}

pre {
  background: var(--band);
  border: 1px solid var(--rule-soft);
  padding: 0.8rem 0.9rem;
  overflow-x: auto;
  line-height: 1.45;
}

/* ---- status banner ---- */

.status {
  border: 1px solid var(--rule);
  border-left: 4px solid var(--no);
  background: var(--band);
  padding: 0.85rem 1rem;
  margin: 1.3rem 0;
}

.status strong { display: block; margin-bottom: 0.2rem; }
.status p { margin: 0.35rem 0 0; font-size: 0.94rem; }

.note {
  border: 1px solid var(--rule);
  background: var(--band);
  padding: 0.85rem 1rem;
  margin: 1.3rem 0;
}

.note p:first-child { margin-top: 0; }
.note p:last-child { margin-bottom: 0; }

/* ---- tables ---- */

.tablewrap { overflow-x: auto; margin: 1.1rem 0; }

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.93rem;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--rule-soft);
}

th {
  border-bottom: 1px solid var(--rule);
  font-weight: 650;
  white-space: nowrap;
}

/* ---- verdict labels ---- */

.v { font-weight: 650; white-space: nowrap; }
.v-yes { color: var(--yes); }
.v-no { color: var(--no); }
.v-wait { color: var(--wait); }
.v-route { color: var(--route); }

.firm {
  border-top: 1px solid var(--rule-soft);
  padding-top: 1.1rem;
  margin-top: 1.9rem;
}

.firm h3 { margin-top: 0; }

.tag {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--rule);
  padding: 0.05rem 0.4rem;
  margin-left: 0.35rem;
  color: var(--muted);
  vertical-align: 0.1em;
  white-space: nowrap;
}

.tag-written { border-color: var(--no); color: var(--no); }

/* ---- footer ---- */

footer.site {
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
  font-size: 0.88rem;
  color: var(--muted);
}

footer.site .wrap { padding-top: 1.1rem; padding-bottom: 2.5rem; }
footer.site a { color: var(--link); }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 0.5rem;
  top: 0.5rem;
  background: var(--bg);
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--fg);
  z-index: 2;
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  h1 { font-size: 1.45rem; }
  .lede { font-size: 1.02rem; }
}

.why {
  border-left: 3px solid var(--rule);
  padding-left: 0.95rem;
  margin: 1.3rem 0 1.6rem;
  font-size: 0.97rem;
}

.why .small { display: inline-block; margin-top: 0.35rem; }

/* Wide tables collapse into stacked rows on a phone, instead of crushing columns. */
@media (max-width: 620px) {
  table.stack thead { display: none; }
  table.stack tr {
    display: block;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--rule);
  }
  table.stack td {
    display: block;
    border: 0;
    padding: 0.1rem 0;
  }
  table.stack td::before {
    content: attr(data-label) ": ";
    color: var(--muted);
    font-size: 0.86em;
  }
  table.stack td:first-child {
    font-size: 1.02rem;
    font-weight: 650;
    padding-bottom: 0.25rem;
  }
  table.stack td:first-child::before { content: none; }
  .tablewrap { overflow-x: visible; }
}
