/* 230mtvilla.com — parcel dossier styles.
 * Single stylesheet, no build step. Two page types share it: the dossier home
 * page and the full-text engineering report.
 */

:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --ink: #1c1a17;
  --ink-soft: #5d564d;
  --rule: #e3ddd4;
  --accent: #7a6a52;
  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161513;
    --surface: #1f1d1a;
    --ink: #f2eee8;
    --ink-soft: #a9a196;
    --rule: #322e2a;
    --accent: #c3ae8c;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(3rem, 12vh, 8rem) 1.5rem 4rem;
}

.masthead {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2.5rem;
}

.eyebrow {
  margin: 0 0 1.25rem;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.lede {
  max-width: var(--measure);
  margin: 0;
  color: var(--ink-soft);
}

.panel {
  margin: 2.5rem 0 0;
}

h2 {
  margin: 0 0 1rem;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.status {
  margin: 0;
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}

.status > div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding: 0.875rem 1rem;
  background: var(--surface);
}

@media (max-width: 30rem) {
  .status > div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

.status dt {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.status dd {
  margin: 0;
  font-size: 0.9375rem;
}

.link {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.link:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.foot {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.foot p {
  margin: 0 0 0.5rem;
}

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

/* ---------------------------------------------------------------------------
 * Dossier + report
 * ------------------------------------------------------------------------ */

/* The report page runs long; the dossier is a reference document. Both are
 * read, not skimmed, so the measure stays narrow and the rhythm stays even. */
.wrap--doc {
  max-width: 48rem;
  padding-top: clamp(2rem, 6vh, 4rem);
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 4px;
}

.panel h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.panel h4 {
  margin: 1.25rem 0 0.5rem;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
}

.panel p,
.panel li {
  max-width: var(--measure-wide, 42rem);
}

.panel > p:first-of-type {
  margin-top: 0;
}

/* Section rule: the dossier has many short sections and they need separating
 * without a box around every one. */
.panel + .panel {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

/* --- tables ------------------------------------------------------------- */
/* Wide tables scroll inside their own container; the page body never does. */
.tablewrap {
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid var(--rule);
  border-radius: 4px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 30rem;
  font-size: 0.9375rem;
  background: var(--surface);
}

caption {
  caption-side: top;
  padding: 0.75rem 1rem;
  text-align: left;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--rule);
}

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

thead th {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

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

td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

tr.total th,
tr.total td {
  font-weight: 600;
  border-top: 2px solid var(--rule);
}

/* --- verbatim transcription --------------------------------------------- */
/* Marked visually as quoted material, not as site prose. The left rule is the
 * only signal that carries in both themes without relying on color alone. */
.verbatim {
  border-left: 3px solid var(--rule);
  padding-left: 1.25rem;
  margin: 1rem 0 0;
}

.verbatim .letterhead,
.verbatim .addressee,
.verbatim .signature {
  font-size: 0.9375rem;
  line-height: 1.5;
}

.verbatim .letterhead {
  color: var(--ink-soft);
}

.pagemark {
  margin: 2.5rem 0 0.75rem;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Redaction labels. Bracketed in the text as well, so the meaning survives
 * when styles do not load and when the page is read aloud. */
.redacted {
  font-style: normal;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-bottom: 1px dotted var(--accent);
  padding: 0 0.15em;
}

.sic {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.8125em;
  color: var(--accent);
  white-space: nowrap;
}

/* --- provenance, hashes, notices ---------------------------------------- */
.hash {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.notice {
  margin: 1rem 0 0;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  font-size: 0.9375rem;
}

.notice > :first-child {
  margin-top: 0;
}

.notice > :last-child {
  margin-bottom: 0;
}

.download {
  display: inline-block;
  margin: 1rem 0 0;
  padding: 0.75rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--ink);
  text-decoration: none;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.9375rem;
}

.download:hover {
  border-color: var(--ink);
}

.download .meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.sourcenote {
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.toc {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
}

.toc li {
  margin-bottom: 0.35rem;
}

.asof {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

@media print {
  .skip,
  .download {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
