/* Plumbline site: infrastructure look, zero third-party, readable measure. */
:root {
  --bg: #f6f5f1;
  --ink: #1a1a1a;
  --muted: #5a5a5a;
  --line: #d8d6d0;
  --accent: #0b5fff;
  --banner-bg: #0b5fff;
  --banner-ink: #ffffff;
  --panel: #ffffff;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --measure: 70ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121417;
    --ink: #e8eaed;
    --muted: #9aa0a6;
    --line: #2a2f36;
    --accent: #6b9fff;
    --banner-bg: #1a3a8a;
    --banner-ink: #e8eaed;
    --panel: #1a1e24;
  }
}

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

html {
  color-scheme: light dark;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

a {
  color: var(--accent);
  text-underline-offset: 2px;
}
a:hover { text-decoration-thickness: 2px; }
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  width: min(42rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 3.5rem;
}

.prose p,
.prose li,
.prose dd {
  max-width: var(--measure);
}

/* Status banner: required, prominent */
.study-banner {
  background: var(--banner-bg);
  color: var(--banner-ink);
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.45;
}
.study-banner a {
  color: var(--banner-ink);
  text-decoration: underline;
}
.study-banner-inline {
  text-align: left;
  margin: 1.5rem 0;
  max-width: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  align-items: baseline;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.5rem;
}
.nav .brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.nav a:not(.brand) {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.nav a:not(.brand):hover,
.nav a[aria-current="page"] {
  color: var(--accent);
}

h1 {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem;
  line-height: 1.25;
  max-width: var(--measure);
}
h2 {
  font-size: 1.2rem;
  font-weight: 650;
  margin: 2rem 0 0.55rem;
  max-width: var(--measure);
}
h3 {
  font-size: 1.05rem;
  font-weight: 650;
  margin: 1.35rem 0 0.4rem;
  max-width: var(--measure);
}
.lead {
  font-size: 1.15rem;
  line-height: 1.55;
  max-width: var(--measure);
  margin: 0 0 1.25rem;
}
p, li { color: var(--ink); }
.muted, .meta { color: var(--muted); font-size: 0.92rem; }

.mono, code, kbd, pre, .hash, .key {
  font-family: var(--mono);
  font-size: 0.88em;
}
pre, .hash-block, .command-block {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 0.85rem 1rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0.5rem 0 0.35rem;
  max-width: 100%;
}
.hash-block, .command-block {
  position: relative;
  width: 100%;
}
button.copy {
  font-family: var(--sans);
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  margin-top: 0.35rem;
}
button.copy:hover { border-color: var(--accent); color: var(--accent); }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1rem 1.1rem;
  margin: 1rem 0;
}

.is-isnot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 1rem 0 1.5rem;
}
.is-isnot h3 {
  margin-top: 0;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.is-isnot ul {
  margin: 0.35rem 0 0;
  padding-left: 1.15rem;
}
.is-isnot li {
  margin-bottom: 0.4rem;
  max-width: none;
}
@media (max-width: 640px) {
  .is-isnot { grid-template-columns: 1fr; }
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}
.stat {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 0.75rem 0.9rem;
}
.stat .label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}
.stat .value {
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 600;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 0.75rem 0 1.25rem;
}
.table th, .table td {
  text-align: left;
  padding: 0.6rem 0.45rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.table .mono { word-break: break-all; }

@media (max-width: 640px) {
  .table, .table thead, .table tbody, .table tr, .table th, .table td {
    display: block;
    width: 100%;
  }
  .table thead { display: none; }
  .table tr {
    border: 1px solid var(--line);
    background: var(--panel);
    margin-bottom: 0.65rem;
    padding: 0.55rem 0.7rem;
  }
  .table td {
    border: none;
    padding: 0.25rem 0;
  }
  .table td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.1rem;
  }
}

.search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}
.search-row input[type="search"],
.search-row input[type="text"] {
  flex: 1;
  min-width: 200px;
  font-family: var(--mono);
  font-size: 0.95rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}
.search-row button {
  font-family: var(--sans);
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

.platform-list {
  margin: 0.5rem 0 1rem;
  padding-left: 1.2rem;
}
.platform-list li { margin-bottom: 0.65rem; }

.glossary dt {
  font-weight: 650;
  margin-top: 1rem;
}
.glossary dd {
  margin: 0.25rem 0 0;
  color: var(--ink);
}

.doc-pre {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1rem;
  max-width: 100%;
  overflow-x: auto;
}

.error { color: #b00020; }
@media (prefers-color-scheme: dark) {
  .error { color: #ff8a80; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
