/* Orion — Field Notes. System fonts only. No third-party assets. */

:root {
  --bg: #f4efe6;
  --bg-raised: #fffaf2;
  --ink: #1c1914;
  --muted: #5c564c;
  --line: #d4cdc0;
  --accent: #8a4a16;
  --focus: #1f4d7a;
  --held: #1c5c32;
  --held-bg: #e4f3e8;
  --failed: #8a1f1f;
  --failed-bg: #f8e6e4;
  --open: #6a5414;
  --open-bg: #f3ebd0;
  --shadow: 0 1px 0 rgba(28, 25, 20, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161410;
    --bg-raised: #221f1a;
    --ink: #f0e9de;
    --muted: #b4aa9c;
    --line: #3d382f;
    --accent: #e0a56a;
    --focus: #8cb4e0;
    --held: #8ed4a6;
    --held-bg: #1a3324;
    --failed: #f0a0a0;
    --failed-bg: #3a1c1c;
    --open: #e0c88a;
    --open-bg: #332c16;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -100%;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  background: var(--bg-raised);
  color: var(--ink);
}

.skip-link:focus {
  top: 0.75rem;
}

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

.site-header {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.site-kicker {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-header h1 {
  margin: 0 0 0.75rem;
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
}

.lede {
  margin: 0;
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.site-nav {
  margin-top: 1.25rem;
}

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

.site-nav a,
.note-source a,
.links a,
.footer-links a {
  color: var(--accent);
}

.site-nav a:hover,
.note-source a:hover,
.links a:hover,
.footer-links a:hover {
  text-decoration-thickness: 2px;
}

main section {
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

main h2 {
  margin: 0 0 1rem;
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  font-size: 1.6rem;
  font-weight: 600;
}

.verbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  margin: 0;
}

.verbs div {
  padding: 1rem 1.1rem;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.verbs dt {
  margin: 0 0 0.35rem;
  font-weight: 700;
}

.verbs dd {
  margin: 0;
  color: var(--muted);
}

.notes-list {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.note {
  padding: 1.25rem 1.35rem;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.note h3 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.45;
}

.note p {
  margin: 0 0 0.75rem;
}

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

.note-basis {
  color: var(--muted);
}

.status {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.status-open {
  background: var(--open-bg);
  color: var(--open);
}

.status-held {
  background: var(--held-bg);
  color: var(--held);
}

.status-failed {
  background: var(--failed-bg);
  color: var(--failed);
}

.hit-rate {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  font-size: 1.05rem;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: end;
  margin: 0 0 1rem;
}

.control {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 10rem;
}

.control label {
  font-size: 0.85rem;
  font-weight: 600;
}

select {
  min-height: 2.75rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  color: var(--ink);
  font: inherit;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--bg-raised);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 40rem;
}

caption {
  padding: 0.7rem 1rem;
  text-align: left;
  color: var(--muted);
  font-size: 0.9rem;
  caption-side: bottom;
}

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

th {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.claim-cell {
  min-width: 16rem;
}

.is-hidden {
  display: none;
}

.empty-msg {
  margin: 0.75rem 0 0;
}

.empty-msg[hidden] {
  display: none;
}

.how-list,
.links {
  margin: 0;
  padding-left: 1.2rem;
  max-width: 44rem;
}

.how-list li,
.links li {
  margin: 0 0 0.6rem;
}

.site-footer {
  padding-top: 1.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0 0 0.75rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.js-hint {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}
