:root {
  --bg: #f7f7f5;
  --bg-elev: #ffffff;
  --text: #1a1a1a;
  --muted: #5c5c5c;
  --border: #d4d4d0;
  --link: #0b57d0;
  --link-visited: #681da8;
  --th: #ecece8;
  --row-hover: #f0f0ec;
  --accent: #2f5d50;
  --chip: #e8eeeB;
  --shadow: 0 1px 2px rgba(0,0,0,.06);
  --tone-good: #2f8f65;
  --tone-ok: #c4922e;
  --tone-bad: #c45c4a;
  --tone-neutral: #7a7a7a;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-ui: "IBM Plex Sans", system-ui, sans-serif;
}

[data-theme="dark"] {
  --bg: #121416;
  --bg-elev: #1b1e22;
  --text: #e8eaed;
  --muted: #a8adb4;
  --border: #333840;
  --link: #8ab4f8;
  --link-visited: #c58af9;
  --th: #252a31;
  --row-hover: #22262c;
  --accent: #7eb8a4;
  --chip: #2a3038;
  --shadow: 0 1px 2px rgba(0,0,0,.35);
  --tone-good: #4caf82;
  --tone-ok: #d4a84b;
  --tone-bad: #e07060;
  --tone-neutral: #8b919a;
}

* { box-sizing: border-box; }
html { color-scheme: light dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  font-size: 16px;
}
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:visited { color: var(--link-visited); }
.wrap { max-width: 1280px; margin: 0 auto; padding: 1.25rem 1.1rem 3rem; }
.wrap.wrap--wide { max-width: min(100%, calc(100vw - 1.5rem)); width: 100%; box-sizing: border-box; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-bottom: 1rem; font-family: var(--font-ui); font-size: 0.9rem;
}
.brand { font-weight: 600; color: var(--text); text-decoration: none; letter-spacing: 0.01em; }
.brand:visited { color: var(--text); }
.theme-toggle {
  font-family: var(--font-ui);
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.breadcrumbs {
  font-family: var(--font-ui);
  font-size: 0.86rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.breadcrumbs a { color: var(--link); }
.breadcrumbs span.sep { margin: 0 0.35rem; color: var(--muted); }
h1 {
  font-family: var(--font-ui);
  font-size: 1.55rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
}
h2 {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.75rem 0 0.65rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
}
.lede { color: var(--muted); margin: 0 0 1.25rem; font-size: 0.98rem; }
.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
  margin: 1rem 0 1.5rem;
}
.folder {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.05rem;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
}
.folder:visited { color: var(--text); }
.folder:hover { border-color: var(--accent); }
.folder-favicon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 4px;
  object-fit: contain;
  background: #fff;
}
.folder .name { font-family: var(--font-ui); font-weight: 600; margin: 0; }
.folder .meta { font-family: var(--font-ui); font-size: 0.82rem; color: var(--muted); }
.toolbar {
  display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center;
  margin: 0.75rem 0 0.85rem; font-family: var(--font-ui); font-size: 0.88rem;
}
.toolbar label { color: var(--muted); }
.toolbar input, .toolbar select {
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.55rem;
  font: inherit;
}
.toolbar input { min-width: 200px; }
.sheet-db-link {
  margin-left: 0.15rem;
  font-weight: 500;
  white-space: nowrap;
}
.result-summary {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: baseline;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}
.result-summary .shown {
  color: var(--text);
  font-weight: 500;
}
.result-summary .facet-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.55rem;
  align-items: baseline;
}
.result-summary .facet-label {
  font-weight: 500;
  color: var(--text);
  opacity: 0.75;
}
.result-summary .facet {
  white-space: nowrap;
}
.result-summary .facet strong {
  color: var(--text);
  font-weight: 600;
}
.table-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elev);
  box-shadow: var(--shadow);
  -webkit-overflow-scrolling: touch;
}
table.data {
  width: 100%;
  min-width: 1280px;
  max-width: none;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-elev);
  font-family: var(--font-ui);
  font-size: 0.86rem;
  table-layout: fixed;
}
table.data th, table.data td {
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 0.45rem 0.55rem;
  vertical-align: top;
  text-align: left;
  overflow: visible;
  overflow-wrap: break-word;
  word-break: normal;
}
table.data th:last-child,
table.data td:last-child { border-right: 0; }
table.data tbody tr:last-child td { border-bottom: 0; }
/* Keep interactive value columns wide enough for full labels */
table.data col[data-col="priority"] { min-width: 7.4rem; }
table.data col[data-col="status"] { min-width: 8.6rem; }
table.data col[data-col="title"] { min-width: 12.5rem; }
table.data th {
  position: relative;
  background: var(--th);
  font-weight: 600;
  white-space: nowrap;
  user-select: none;
}
table.data th[data-sort] {
  cursor: default;
}
table.data th .sort {
  display: inline-block;
  min-width: 0.95em;
  margin-left: 0.2rem;
  padding: 0.05rem 0.2rem;
  border-radius: 4px;
  font-weight: 400;
  font-size: 0.78em;
  line-height: 1;
  color: var(--muted);
  opacity: 0.55;
  cursor: pointer;
}
table.data th .sort.sort--active {
  color: var(--text);
  opacity: 1;
}
table.data th .sort:hover,
table.data th .sort:focus {
  outline: none;
  color: var(--accent);
  opacity: 1;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
table.data th .col-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  z-index: 2;
  user-select: none;
  touch-action: none;
}
table.data th .col-resizer:hover,
table.data th .col-resizer.is-dragging {
  background: color-mix(in srgb, var(--accent) 35%, transparent);
}
body.is-col-resizing {
  cursor: col-resize !important;
  user-select: none !important;
}
body.is-col-resizing iframe,
body.is-col-resizing a { pointer-events: none; }
.chip {
  display: inline-block;
  background: var(--chip);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
  font-size: 0.78rem;
  white-space: nowrap;
}
.chip.awaiting,
.chip.drafted { border-color: var(--tone-ok); }
.chip.published { border-color: var(--tone-good); }
.chip.queued,
.chip.monitor { border-color: var(--tone-neutral); }
.chip.on-hold { border-color: var(--tone-bad); }
.list-plain { margin: 0.4rem 0 1rem 1.15rem; }
.list-plain li { margin: 0.25rem 0; }
.panel {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin: 0.75rem 0 1.25rem;
  box-shadow: var(--shadow);
}
iframe.preview {
  width: 100%;
  min-height: 72vh;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
[data-theme="dark"] iframe.preview { background: #fff; }
.empty { color: var(--muted); font-family: var(--font-ui); font-size: 0.92rem; }

.cell-title { font-weight: 600; overflow-wrap: anywhere; word-break: break-word; line-height: 1.35; }
.cell-url {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  line-height: 1.35;
}
.cell-url a {
  color: var(--link);
  display: block;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.cell-url .url-host {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
}
.cell-url .url-path {
  display: block;
  font-weight: 500;
}
.muted { color: var(--muted); font-size: 0.8rem; }
.value-select,
.status-select {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  box-sizing: border-box;
  background-color: transparent;
  color: var(--text);
  border: 1.5px solid var(--tone-neutral);
  border-radius: 999px;
  padding: 0.28rem 1.45rem 0.28rem 0.55rem;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.25;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23888' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.45rem center;
  background-size: 8px 5px;
  white-space: nowrap;
  text-overflow: clip;
}
.value-select:hover,
.value-select:focus,
.status-select:hover,
.status-select:focus {
  outline: none;
  border-color: var(--accent);
}
.value-select--good,
.status-select--published { border-color: var(--tone-good); }
.value-select--ok,
.status-select--awaiting,
.status-select--drafted { border-color: var(--tone-ok); }
.value-select--bad,
.status-select--on-hold { border-color: var(--tone-bad); }
.value-select--neutral,
.status-select--queued,
.status-select--monitor { border-color: var(--tone-neutral); }
.status-edit { margin-top: 0.45rem; }
.docs-cell .doc-line {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.22rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}
.docs-cell .doc-line:last-child { border-bottom: 0; }
.doc-label { color: var(--muted); }
ul.why { margin: 0; padding-left: 1rem; font-size: 0.82rem; }
ul.why li { margin: 0.15rem 0; }
details summary { cursor: pointer; color: var(--link); font-size: 0.82rem; }
.mini ul { margin: 0.25rem 0 0.5rem 1rem; padding: 0; font-size: 0.78rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
table.data { font-size: 0.86rem; }
td.queue-num {
  text-align: center;
  font-variant-numeric: tabular-nums;
}
td.queue-num a.sheet-row-link {
  font-weight: 600;
  text-decoration: none;
}
td.queue-num a.sheet-row-link:hover {
  text-decoration: underline;
}

/* Audit package doc viewer */
.doc-tabs {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin: 0 0 1rem; padding: 0 0 0.6rem;
  border-bottom: 1px solid var(--border);
}
.doc-tab {
  font-family: var(--font-ui); font-size: 0.85rem;
  padding: 0.35rem 0.7rem; cursor: pointer;
  color: var(--text); background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: 4px;
}
.doc-tab:hover { border-color: var(--accent); }
.doc-tab.is-active {
  background: var(--accent); border-color: var(--accent);
  color: var(--bg-elev); font-weight: 600;
}
.doc-meta {
  font-family: var(--font-ui); font-size: 0.82rem;
  color: var(--muted); margin: 0 0 1.25rem;
}
.md-body { font-size: 0.95rem; line-height: 1.6; max-width: 70rem; }
.md-body h1 { font-size: 1.5rem; margin: 0 0 0.75rem; }
.md-body h2 {
  font-size: 1.2rem; margin: 1.9rem 0 0.6rem;
  padding-bottom: 0.25rem; border-bottom: 1px solid var(--border);
}
.md-body h3 { font-size: 1.03rem; margin: 1.4rem 0 0.45rem; }
.md-body h4, .md-body h5, .md-body h6 { font-size: 0.95rem; margin: 1.1rem 0 0.4rem; }
.md-body p { margin: 0 0 0.8rem; }
.md-body ul, .md-body ol { margin: 0 0 0.9rem 1.35rem; padding: 0; }
.md-body li { margin: 0 0 0.28rem; }
.md-body hr { border: 0; border-top: 1px solid var(--border); margin: 1.6rem 0; }
.md-body blockquote {
  margin: 0 0 0.9rem; padding: 0.5rem 0.9rem;
  border-left: 3px solid var(--accent);
  background: var(--chip); color: var(--muted);
}
.md-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86em; background: var(--chip);
  padding: 0.1rem 0.3rem; border-radius: 3px;
}
.md-body pre.md-code {
  background: var(--chip); border: 1px solid var(--border);
  border-radius: 4px; padding: 0.75rem 0.9rem;
  overflow-x: auto; margin: 0 0 1rem;
}
.md-body pre.md-code code { background: none; padding: 0; font-size: 0.82rem; }
.md-table-scroll { overflow-x: auto; margin: 0 0 1.1rem; }
table.md-table {
  border-collapse: collapse; width: 100%;
  font-family: var(--font-ui); font-size: 0.83rem;
}
table.md-table th, table.md-table td {
  border: 1px solid var(--border);
  padding: 0.4rem 0.55rem; vertical-align: top;
}
table.md-table th { background: var(--th); font-weight: 600; }
table.md-table tbody tr:hover { background: var(--row-hover); }


/* readable-cols-2026-07-28e */
