/* Register-Guard Capital v2 design system - shared chrome + tokens.
   Extracted from index.php's inline styles 2026-08-11 (single source of truth).
   Homepage-specific styles (piles, orbit, strip, record, feed, folder panel,
   beat modal) stay inline in index.php. Served with ?v=filemtime cache busting
   via rgcV2Stylesheet() in ui.php; keep that if you rename this file. */

@font-face {
  font-family: 'Manufacturing Consent';
  src: url('/fonts/ManufacturingConsent-Regular.ttf') format('truetype');
  font-weight: normal; font-style: normal; font-display: swap;
}
:root {
  --paper: #F7F6F3;
  --card: #FFFFFF;
  --paper-2: #EDECE8;
  --sheet: #FFFFFF;
  --ink: #111111;
  --ink-2: #55554F;
  --rule: rgba(17, 17, 17, 0.35);
  --rule-faint: rgba(17, 17, 17, 0.14);
  --shadow: rgba(17, 17, 17, 0.20);
  --card-shadow: 0 2px 6px rgba(17, 17, 17, 0.07), 0 8px 24px rgba(17, 17, 17, 0.05);
  --card-shadow-hover: 0 4px 10px rgba(17, 17, 17, 0.10), 0 14px 34px rgba(17, 17, 17, 0.08);
  --up: #2BFF88;
  --down: #FF5C4D;
  --date: #0433FF;
  --manila: #E9CE93;
  --inv-bg: #232323;
  --inv-ink: #F5F4F0;
  --inv-muted: #B9B8B2;
  --radius: 14px;
  --serif: 'Times New Roman', 'Liberation Serif', Times, serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131313;
    --card: #1B1B1A;
    --paper-2: #242423;
    --sheet: #1A1A19;
    --ink: #EDEDEA;
    --ink-2: #A6A6A0;
    --rule: rgba(237, 237, 234, 0.38);
    --rule-faint: rgba(237, 237, 234, 0.16);
    --shadow: rgba(0, 0, 0, 0.55);
    --card-shadow: 0 2px 6px rgba(0, 0, 0, 0.45), 0 8px 24px rgba(0, 0, 0, 0.35);
    --card-shadow-hover: 0 4px 10px rgba(0, 0, 0, 0.55), 0 14px 34px rgba(0, 0, 0, 0.45);
    --date: #3D5CFF;
    --manila: #7C6B42;
    --inv-bg: #262626;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17.5px;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.sheet-wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px 64px; }
.card {
  background: var(--card);
  border: 1px solid var(--rule-faint);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}
.card:hover { box-shadow: var(--card-shadow-hover); transform: translateY(-2px); }

/* ---------- masthead ---------- */
.toprule { border-top: 4px solid var(--ink); border-bottom: 1px solid var(--ink); height: 3px; margin-top: 18px; }
.masthead { text-align: center; padding: 34px 0 22px; }
.masthead h1 {
  font-family: 'Manufacturing Consent', var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 7.5vw, 96px);
  line-height: 0.95;
  margin: 0;
  letter-spacing: 0.01em;
  text-shadow: 3px 3px 0 var(--paper-2);
}
.masthead .tagline { font-style: italic; color: var(--ink-2); margin-top: 12px; font-size: 17px; }
.dateline {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  border-top: 1px solid var(--ink);
  padding: 8px 2px 0;
}
.dateline a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.dateline a:hover { text-underline-offset: 5px; }

/* dates: piercing blue everywhere */
.dt { color: var(--date); }

/* ---------- nav ---------- */
nav {
  display: flex; justify-content: center;
  gap: clamp(20px, 5vw, 60px);
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  margin-top: 8px; padding: 12px 0;
}
nav a {
  display: inline-block;
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; position: relative;
}
nav a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: -4px; height: 2px; background: var(--ink); }
nav a:hover { transform: translateY(-1px); }
nav a:hover::after, nav a[aria-current]::after { right: 0; }

/* ---------- inverted section header bar (generic; index.php's
   .strip-hd/.rail-hd/.feed-hd are page-local variants of this) ---------- */
.bar-hd {
  display: flex; justify-content: space-between; align-items: baseline;
  background: var(--inv-bg); color: var(--inv-ink);
  border-radius: 8px; padding: 9px 14px; margin: 0 0 8px;
}
.bar-hd h2, .bar-hd h3, .bar-hd h4 {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; margin: 0;
}
.bar-hd a { font-family: var(--mono); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.bar-hd a:hover { text-underline-offset: 5px; }

/* ---------- typography ---------- */
.eyebrow { font-family: var(--mono); font-size: 11.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 12px; }
.lead h2 { font-weight: 700; font-size: clamp(30px, 4.2vw, 50px); line-height: 1.06; margin: 0 0 16px; text-wrap: balance; }
.lead h2 a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 3px; }
.deck { font-size: 20px; line-height: 1.5; color: var(--ink-2); margin: 0 0 14px; max-width: 60ch; }
.meta { font-family: var(--mono); font-size: 12px; color: var(--ink-2); letter-spacing: 0.04em; }
.meta a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.meta a:hover { text-underline-offset: 5px; }
.second { border-top: 1px solid var(--rule-faint); margin-top: 30px; padding-top: 24px; }
.second h3 { font-size: 26px; line-height: 1.15; margin: 0 0 8px; text-wrap: balance; }
.second h3 a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.second p { margin: 0 0 10px; color: var(--ink-2); max-width: 62ch; }

.tag {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  padding: 2px 9px; border: 1px solid var(--ink); border-radius: 999px; justify-self: start;
}
.tag.insight { background: var(--ink); color: var(--card); }

/* pill button (folder-panel close on the homepage; the v2 button reference) */
.btn-pill {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  border: 1px solid var(--ink); border-radius: 999px;
  background: none; color: var(--ink); padding: 4px 14px; cursor: pointer;
}
.btn-pill:hover { background: var(--ink); color: var(--card); }
/* pill variants - promoted from page-local styles 2026-08-14 when the v2
   completion left three pages (about, investment-history, admin) duplicating
   them */
.btn-dim { border-color: var(--rule); color: var(--ink-2); }
.btn-dim:hover { background: var(--paper-2); color: var(--ink); border-color: var(--rule); }
.btn-danger { border-color: var(--down); color: var(--down); }
.btn-danger:hover { background: var(--down); color: #FFFFFF; }
.btn-sm { font-size: 11px; padding: 2px 10px; }

/* ---------- contact ---------- */
.contact {
  margin-top: 26px; padding: 20px 26px 22px;
  background: var(--inv-bg); color: var(--inv-ink);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 32px;
}
.contact .who { max-width: 52ch; }
.contact .who .firm { font-weight: 700; font-size: 18px; }
.contact .who .status { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.03em; margin-top: 10px; }
.contact .who .status .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--up); margin-right: 8px; vertical-align: 1px; }
.contact .who .status.sub { margin-top: 4px; padding-left: 15px; color: var(--inv-muted); }
.contact .tip { position: relative; cursor: help; }
.contact .tip::after {
  content: attr(data-tip); position: absolute; left: 0; bottom: calc(100% + 8px);
  background: var(--inv-ink); color: var(--inv-bg); border-radius: 6px;
  padding: 5px 9px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.02em;
  white-space: nowrap; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  opacity: 0; transform: translateY(3px); pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}
.contact .tip:hover::after, .contact .tip.tip-on::after { opacity: 1; transform: translateY(0); }
.contact .how { font-family: var(--mono); font-size: 13px; line-height: 2.1; text-align: right; }
.contact .how .k { color: var(--inv-muted); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; margin-right: 10px; }
.contact .how a { text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }
.contact .how a:hover { text-underline-offset: 5px; }
@media (max-width: 700px) { .contact .how { text-align: left; } }

/* ---------- footer ---------- */
footer { margin-top: 44px; border-top: 1px solid var(--ink); padding-top: 4px; }
/* 3-column grid, not space-between flex: the middle (site links) span
   stays truly centered whether or not a page passes the optional third
   span (changed 2026-08-14; with only two flex children the links sat
   hard right on subpages while the homepage's three children put them
   near center - the links jumped between pages). */
footer .inner {
  border-top: 3px solid var(--ink); padding-top: 16px;
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 10px 24px; align-items: baseline;
  font-family: var(--mono); font-size: 12px; color: var(--ink-2); letter-spacing: 0.05em;
}
footer .inner > :nth-child(1) { justify-self: start; }
footer .inner > :nth-child(2) { justify-self: center; text-align: center; }
footer .inner > :nth-child(3) { justify-self: end; text-align: right; }
@media (max-width: 760px) {
  footer .inner { grid-template-columns: 1fr; }
  footer .inner > :nth-child(n) { justify-self: start; text-align: left; }
}
footer a:hover { text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  .card, nav a, .btn-pill { transition: transform 180ms ease, box-shadow 180ms ease, background-color 140ms ease, padding-left 180ms ease; }
  a { transition: text-underline-offset 150ms ease, color 140ms ease; }
}
