/* ============================================
   OUTPOST REPORT — Stylesheet
   Found archival report. Modern restraint.
   ============================================ */

:root {
  /* Paper tones */
  --paper: #f5f0e8;
  --paper-dark: #ebe5d9;
  --paper-edge: #ddd7c9;
  --ink: #2c2a25;
  --ink-light: #6b6560;
  --ink-faint: #9e978d;
  --accent: #8b4513;
  --accent-faint: rgba(139, 69, 19, 0.12);
  --rule: rgba(44, 42, 37, 0.12);
  --shadow: rgba(44, 42, 37, 0.06);

  /* Type scale */
  --body-size: 1.125rem;
  --small-size: 0.8125rem;
  --tiny-size: 0.6875rem;
  --h1-size: 2rem;
  --h2-size: 1.375rem;
  --h3-size: 1.125rem;

  /* Measure */
  --content-width: 680px;
  --line-height: 1.72;
}

/* ---- Reset & Base ---- */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Source Serif 4", "Georgia", serif;
  font-size: var(--body-size);
  font-weight: 400;
  line-height: var(--line-height);
  color: var(--ink);
  background-color: var(--paper);
  min-height: 100vh;
}

/* Subtle paper grain — CSS only, no image */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  z-index: 9999;
}

/* ---- Report Container ---- */

.report {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 2rem 1.5rem 4rem;
}

.report__page {
  width: 100%;
  max-width: var(--content-width);
  position: relative;

  /* Subtle page edge shadow */
  box-shadow:
    0 1px 3px var(--shadow),
    0 0 40px var(--shadow);
  background: var(--paper);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 2.5rem 3rem 3rem;
}

@media (max-width: 640px) {
  .report {
    padding: 1rem 0.75rem 3rem;
  }
  .report__page {
    padding: 1.5rem 1.25rem 2rem;
  }
}

/* ---- Top Rail ---- */

.report__rail {
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--tiny-size);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  text-transform: uppercase;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1rem;
  margin-bottom: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  align-items: baseline;
}

.report__rail-sep {
  opacity: 0.4;
  user-select: none;
}

/* ---- Header ---- */

.report__header {
  margin-bottom: 2.5rem;
}

.report__title {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: var(--h1-size);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.report__subtitle {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 300;
  font-style: italic;
  color: var(--ink-light);
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* ---- Body Content ---- */

.report__body {
  /* Reading-first defaults for markdown content */
}

.report__body > * + * {
  margin-top: 1.25em;
}

.report__body h2 {
  font-size: var(--h2-size);
  font-weight: 600;
  margin-top: 2.5em;
  margin-bottom: 0.25em;
  color: var(--ink);
}

.report__body h3 {
  font-size: var(--h3-size);
  font-weight: 600;
  margin-top: 2em;
  margin-bottom: 0.25em;
  color: var(--ink);
}

.report__body h4 {
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--small-size);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-top: 2em;
  margin-bottom: 0.25em;
}

.report__body p {
  hanging-punctuation: first;
}

.report__body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-faint);
  text-underline-offset: 0.15em;
  transition: text-decoration-color 0.15s;
}

.report__body a:hover {
  text-decoration-color: var(--accent);
}

/* Lists */
.report__body ul,
.report__body ol {
  padding-left: 1.5em;
}

.report__body li + li {
  margin-top: 0.35em;
}

.report__body li::marker {
  color: var(--ink-faint);
}

/* Blockquotes — marginal note style */
.report__body blockquote {
  border-left: 2px solid var(--ink-faint);
  padding: 0.25em 0 0.25em 1.25em;
  margin-left: 0;
  color: var(--ink-light);
  font-style: italic;
}

.report__body blockquote p + p {
  margin-top: 0.75em;
}

/* Callout blocks — use > **Note:** or a custom class */
.report__body .callout {
  background: var(--paper-dark);
  border-left: 3px solid var(--accent);
  padding: 1em 1.25em;
  border-radius: 0 2px 2px 0;
  font-size: 0.95em;
}

.report__body .callout p:first-child {
  margin-top: 0;
}

.report__body .warning {
  background: var(--paper-dark);
  border-left: 3px solid #b44;
  padding: 1em 1.25em;
  border-radius: 0 2px 2px 0;
  font-size: 0.95em;
}

/* Inline code */
.report__body code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85em;
  background: var(--paper-dark);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: var(--ink);
}

/* Code fences — darker paper card */
.report__body pre {
  background: var(--paper-dark);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1.25em 1.5em;
  overflow-x: auto;
  line-height: 1.55;
}

.report__body pre code {
  background: none;
  padding: 0;
  font-size: 0.85em;
}

/* Tables */
.report__body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}

.report__body th {
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--small-size);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-align: left;
  text-transform: uppercase;
  color: var(--ink-light);
  border-bottom: 2px solid var(--rule);
  padding: 0.5em 0.75em;
}

.report__body td {
  padding: 0.5em 0.75em;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.report__body tr:last-child td {
  border-bottom: none;
}

/* Images */
.report__body img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 2px;
  border: 1px solid var(--rule);
}

/* Horizontal rules */
.report__body hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.5em 0;
}

/* Footnotes (kramdown) */
.report__body .footnotes {
  margin-top: 3em;
  padding-top: 1em;
  border-top: 1px solid var(--rule);
  font-size: 0.9em;
  color: var(--ink-light);
}

.report__body .footnotes ol {
  padding-left: 1.25em;
}

.report__body .footnotes li + li {
  margin-top: 0.5em;
}

.report__body sup a.footnote {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75em;
  text-decoration: none;
  color: var(--accent);
}

/* ---- Footer ---- */

.report__footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.report__related {
  margin-bottom: 2rem;
}

.report__related-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--tiny-size);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: block;
  margin-bottom: 0.75rem;
}

.report__related-list {
  list-style: none;
  padding: 0;
}

.report__related-list li + li {
  margin-top: 0.35rem;
}

.report__related-list a {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.95rem;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-faint);
  text-underline-offset: 0.15em;
  transition: text-decoration-color 0.15s;
}

.report__related-list a:hover {
  text-decoration-color: var(--accent);
}

.report__stamp {
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--tiny-size);
  font-weight: 300;
  letter-spacing: 0.15em;
  color: var(--ink-faint);
  text-align: center;
  margin-top: 2rem;
  opacity: 0.5;
}

/* ---- Home / Root Page ---- */

.home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.home__inner {
  max-width: 360px;
}

.home__title {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 2rem;
}

.home__body {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-faint);
  line-height: 1.7;
}

.home__body p + p {
  margin-top: 0.75em;
}

/* ---- 404 ---- */

.not-found {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.not-found__inner {
  max-width: 420px;
}

.not-found__title {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 1.5rem;
}

.not-found__body {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-faint);
  line-height: 1.7;
}

/* ---- Print ---- */

@media print {
  body::before {
    display: none;
  }
  .report__page {
    box-shadow: none;
    border: none;
    padding: 0;
  }
  .report__related {
    display: none;
  }
  .report__stamp {
    opacity: 1;
  }
}
