/* The Glasshouse Files — dossier theme */
:root {
  --bg: #0B0F14;
  --surface: #141A22;
  --surface-2: #1B2330;
  --ink: #E8ECEF;
  --blue: #7CC4FF;
  --red: #E0625C;
  --tan: #C7A876;
  --muted: #7A8591;
  --line: rgba(232, 236, 239, 0.08);
  --serif: 'Source Serif 4', 'Charter', Georgia, serif;
  --sans: 'Inter Tight', 'Helvetica Neue', sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.7;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== top banner ===== */
.review-banner {
  background: #2a1518;
  color: #f0b9b5;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-align: center;
  padding: 6px 12px;
  text-transform: uppercase;
}

/* ===== masthead / nav ===== */
header.masthead {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 15, 20, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.masthead-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; gap: 28px;
  padding: 14px 24px;
}
.brand {
  font-family: var(--sans); font-weight: 800;
  font-size: 17px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--ink); white-space: nowrap;
}
.brand .accent { color: var(--red); }
nav.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
nav.tabs a {
  font-family: var(--sans); font-weight: 600; font-size: 12.5px;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--muted); padding: 7px 11px; border-radius: 4px;
}
nav.tabs a:hover { color: var(--ink); text-decoration: none; background: var(--surface); }
nav.tabs a.active { color: var(--blue); background: var(--surface); }

/* ===== layout ===== */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; margin: 0 auto; }
section.view { display: none; padding: 48px 0 96px; }
section.view.active { display: block; }

/* ===== overview hero ===== */
.hero { padding: 72px 0 40px; }
.kicker {
  font-family: var(--mono); font-size: 12px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--tan); margin-bottom: 18px;
}
h1.hero-title {
  font-family: var(--sans); font-weight: 800;
  font-size: clamp(40px, 6vw, 72px); line-height: 1.02;
  letter-spacing: -1px; margin-bottom: 22px;
}
h1.hero-title .accent { color: var(--red); }
.hero-sub {
  font-size: 21px; color: var(--muted); max-width: 820px; line-height: 1.6;
}
.hero-sub strong { color: var(--ink); }

/* stat bar */
.stat-bar {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; background: var(--line);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin: 48px 0;
}
.stat { background: var(--bg); padding: 26px 18px; text-align: center; }
.stat .n {
  font-family: var(--sans); font-weight: 800; font-size: 38px;
  color: var(--blue); line-height: 1;
}
.stat .n.red { color: var(--red); }
.stat .l {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--muted); margin-top: 10px; line-height: 1.5;
}

/* overview cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 8px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 26px 24px; cursor: pointer; transition: border-color .15s, transform .15s;
  display: block; color: var(--ink);
}
.card:hover { border-color: var(--blue); text-decoration: none; transform: translateY(-2px); }
.card h3 {
  font-family: var(--sans); font-weight: 700; font-size: 18px; margin-bottom: 8px;
}
.card h3 .num { color: var(--tan); font-family: var(--mono); font-size: 13px; margin-right: 8px; }
.card p { font-size: 15px; color: var(--muted); line-height: 1.6; }

/* ===== article (report) ===== */
.article-head { padding: 24px 0 8px; border-bottom: 1px solid var(--line); margin-bottom: 36px; }
.article-head .tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--red); margin-bottom: 14px;
}
.article-head h1 {
  font-family: var(--sans); font-weight: 800; font-size: clamp(30px, 4.5vw, 46px);
  line-height: 1.12; margin-bottom: 18px; letter-spacing: -0.5px;
}
.deck {
  font-size: 21px; font-style: italic; color: var(--muted);
  border-left: 3px solid var(--red); padding-left: 18px; margin-bottom: 22px; line-height: 1.55;
}
.byline { font-family: var(--sans); font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.byline strong { color: var(--ink); text-transform: uppercase; }

.article-body p { margin-bottom: 24px; }
.article-body .lede { font-size: 21px; }
.article-body .lede::first-letter {
  font-family: var(--sans); font-size: 64px; font-weight: 800; float: left;
  line-height: .82; margin: 6px 10px 0 0; color: var(--red);
}
.article-body h2 {
  font-family: var(--sans); font-weight: 800; font-size: 27px;
  margin: 52px 0 20px; padding-top: 24px; border-top: 2px solid var(--red);
}
.article-body h3 {
  font-family: var(--sans); font-weight: 700; font-size: 21px; margin: 34px 0 16px;
}
.article-body ul { margin: 16px 0 28px 22px; }
.article-body li { margin-bottom: 12px; }
.article-body strong { color: #fff; }

figure { margin: 36px 0; }
figure img { width: 100%; border-radius: 6px; display: block; }
figcaption {
  font-family: var(--sans); font-size: 12.5px; color: var(--muted);
  padding: 10px 2px; line-height: 1.55;
}
figcaption .credit { font-style: italic; color: #5b6671; }

.pull-quote {
  margin: 44px 0; padding: 30px 34px;
  background: var(--surface); border-left: 4px solid var(--red); border-radius: 0 8px 8px 0;
}
.pull-quote p {
  font-family: var(--sans); font-weight: 700; font-size: 23px;
  line-height: 1.45; margin-bottom: 12px !important; color: #fff;
}
.pull-quote .attribution {
  font-family: var(--mono); font-size: 11.5px; color: var(--tan);
  letter-spacing: 1px; text-transform: uppercase;
}

.doc-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 36px 0; }
.doc-item {
  background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--red);
  border-radius: 4px; padding: 16px 12px; text-align: center;
}
.doc-item .doc-tag {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--red); font-weight: 700; margin-bottom: 7px;
}
.doc-item .doc-label {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .4px; line-height: 1.45;
}

.numbers-table { width: 100%; border-collapse: collapse; margin: 40px 0; background: var(--surface); border-radius: 8px; overflow: hidden; }
.numbers-table caption {
  font-family: var(--sans); font-weight: 800; font-size: 15px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--red); padding: 18px; background: var(--surface);
  caption-side: top;
}
.numbers-table th {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--muted); text-align: left; padding: 10px 16px; border-bottom: 1px solid var(--line);
}
.numbers-table td {
  font-family: var(--sans); font-size: 14.5px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); vertical-align: top;
}
.numbers-table td:first-child { color: var(--muted); font-size: 12.5px; width: 36%; }
.numbers-table td.hl { color: var(--red); font-weight: 700; }

.inline-stats { font-family: var(--mono); font-size: 15px; line-height: 2.1; }
.inline-stats strong { color: var(--blue); font-size: 19px; }

/* ===== paper ===== */
.paper-head { text-align: center; padding: 30px 0 10px; }
.paper-series { font-family: var(--mono); font-size: 11.5px; letter-spacing: 1.5px; color: var(--tan); text-transform: uppercase; }
.paper-head h1 {
  font-family: var(--serif); font-weight: 700; font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.3; margin: 22px auto 18px; max-width: 860px;
}
.paper-author { font-style: italic; color: var(--muted); font-size: 16px; line-height: 1.7; margin-bottom: 26px; }
.paper-actions { margin-bottom: 36px; }
.btn {
  display: inline-block; font-family: var(--sans); font-weight: 600; font-size: 13px;
  letter-spacing: 1px; text-transform: uppercase; color: var(--bg);
  background: var(--blue); border-radius: 5px; padding: 11px 22px;
}
.btn:hover { text-decoration: none; filter: brightness(1.1); }
.abstract {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 30px 34px; margin: 0 auto 44px; font-size: 16px; line-height: 1.75; text-align: left;
}
.abstract h2 { font-family: var(--sans); font-size: 14px; letter-spacing: 2px; text-transform: uppercase; color: var(--tan); margin-bottom: 14px; }
.abstract .kw { margin-top: 16px; font-size: 14px; color: var(--muted); }
.paper-body h2 {
  font-family: var(--sans); font-weight: 800; font-size: 21px;
  text-transform: uppercase; letter-spacing: .5px; margin: 44px 0 16px; color: var(--ink);
}
.paper-body h3 { font-family: var(--sans); font-weight: 700; font-style: italic; font-size: 17.5px; margin: 28px 0 12px; }
.paper-body p { margin-bottom: 18px; font-size: 17px; text-align: justify; }
.refs { font-size: 14px; color: var(--muted); }
.refs li { margin-bottom: 10px; line-height: 1.6; }
.refs { margin-left: 26px; }

/* ===== actors ===== */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 28px; }
.toolbar input[type="search"] {
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  font-family: var(--sans); font-size: 14px; border-radius: 6px; padding: 9px 14px; min-width: 240px;
}
.chip {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted); background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 14px; cursor: pointer; user-select: none;
}
.chip.active { color: var(--bg); background: var(--blue); border-color: var(--blue); }
.chip.red.active { background: var(--red); border-color: var(--red); }

.actor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.actor-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 22px; cursor: pointer; transition: border-color .15s;
}
.actor-card:hover { border-color: var(--tan); }
.actor-card .a-type {
  font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 8px;
}
.actor-card h3 { font-family: var(--sans); font-weight: 700; font-size: 18px; margin-bottom: 6px; }
.actor-card .a-role { font-family: var(--sans); font-size: 13px; color: var(--tan); margin-bottom: 10px; line-height: 1.5; }
.actor-card p { font-size: 14px; color: var(--muted); line-height: 1.6; }
.t-person { color: var(--blue); } .t-entity { color: var(--tan); }
.t-trust { color: #b08fd8; } .t-regulator { color: #7fd8a8; } .t-official { color: var(--red); }

/* actor detail modal */
.modal-bg {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(5, 8, 12, 0.8); backdrop-filter: blur(3px);
}
.modal-bg.open { display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 60px 18px; }
.modal {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  max-width: 720px; width: 100%; padding: 36px 38px; position: relative;
}
.modal .close {
  position: absolute; top: 14px; right: 18px; font-family: var(--sans);
  font-size: 26px; color: var(--muted); cursor: pointer; background: none; border: none;
}
.modal .close:hover { color: var(--ink); }
.modal h2 { font-family: var(--sans); font-weight: 800; font-size: 26px; margin-bottom: 4px; }
.modal .m-roles { color: var(--tan); font-family: var(--sans); font-size: 14px; margin-bottom: 16px; }
.modal .m-summary { font-size: 16px; margin-bottom: 20px; }
.modal h4 {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--muted); margin: 22px 0 10px;
}
.modal ul { margin-left: 20px; font-size: 14.5px; }
.modal li { margin-bottom: 8px; }
.modal .conn {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: 6px; padding: 10px 14px; margin-bottom: 8px; font-size: 13.5px;
  color: var(--ink); cursor: pointer;
}
.modal .conn:hover { border-color: var(--blue); text-decoration: none; }
.modal .conn .c-label { color: var(--blue); font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.modal .src { font-family: var(--mono); font-size: 11.5px; color: var(--muted); line-height: 1.8; }

/* ===== network ===== */
#net-wrap { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
#net-canvas { display: block; width: 100%; height: 640px; cursor: grab; }
#net-canvas.dragging { cursor: grabbing; }
.net-legend {
  position: absolute; top: 14px; left: 14px; background: rgba(11,15,20,.85);
  border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px;
  font-family: var(--mono); font-size: 11px; line-height: 2; color: var(--muted);
}
.net-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; }
.net-panel {
  position: absolute; top: 14px; right: 14px; width: 300px; max-height: calc(100% - 28px);
  overflow-y: auto; background: rgba(11,15,20,.92); border: 1px solid var(--line);
  border-radius: 8px; padding: 18px 20px; display: none;
}
.net-panel.open { display: block; }
.net-panel h3 { font-family: var(--sans); font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.net-panel .a-role { font-size: 12.5px; color: var(--tan); font-family: var(--sans); margin-bottom: 10px; }
.net-panel p { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 10px; }
.net-panel .conn-line { font-size: 12px; padding: 6px 0; border-top: 1px solid var(--line); color: var(--ink); }
.net-panel .conn-line .c-label { color: var(--blue); font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.net-panel .more { font-family: var(--mono); font-size: 11px; color: var(--blue); cursor: pointer; }
.net-hint { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 12px; }

/* ===== findings ===== */
.finding {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  margin-bottom: 12px; overflow: hidden;
}
.finding-head {
  display: flex; gap: 16px; align-items: baseline; padding: 18px 22px; cursor: pointer;
}
.finding-head:hover { background: var(--surface-2); }
.finding-head .f-id { font-family: var(--mono); font-size: 12px; color: var(--tan); white-space: nowrap; }
.finding-head h3 { font-family: var(--sans); font-size: 16.5px; font-weight: 700; flex: 1; }
.finding-head .f-juris { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; }
.finding-body { display: none; padding: 0 22px 20px; border-top: 1px solid var(--line); }
.finding.open .finding-body { display: block; }
.finding-body p { font-size: 15px; margin: 16px 0 12px; }
.finding-body .ev { font-family: var(--mono); font-size: 12px; color: var(--muted); line-height: 1.9; }
.finding-body .f-status { font-family: var(--sans); font-size: 13px; color: var(--blue); margin-top: 10px; }
.f-cat {
  font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--muted);
  white-space: nowrap;
}

/* ===== timeline ===== */
.tl { position: relative; margin-left: 14px; padding-left: 34px; border-left: 2px solid var(--line); }
.tl-item { position: relative; padding-bottom: 34px; }
.tl-item::before {
  content: ''; position: absolute; left: -41px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--blue);
  border: 2px solid var(--bg);
}
.tl-item.cat-transaction::before { background: var(--tan); }
.tl-item.cat-regulatory::before { background: #7fd8a8; }
.tl-item.cat-litigation::before { background: var(--red); }
.tl-item.cat-corporate::before { background: #b08fd8; }
.tl-date { font-family: var(--mono); font-size: 12px; color: var(--tan); letter-spacing: 1px; }
.tl-item h3 { font-family: var(--sans); font-size: 17px; font-weight: 700; margin: 4px 0 6px; }
.tl-item p { font-size: 14.5px; color: var(--muted); line-height: 1.65; max-width: 720px; }
.tl-actors { font-family: var(--mono); font-size: 11px; color: var(--blue); margin-top: 6px; }

/* ===== documents ===== */
.doc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.doc-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 20px 22px;
  color: var(--ink); display: block;
}
.doc-card:hover { border-color: var(--blue); text-decoration: none; }
.doc-card .d-tag { font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--red); margin-bottom: 7px; }
.doc-card h3 { font-family: var(--sans); font-size: 15.5px; font-weight: 700; margin-bottom: 6px; }
.doc-card p { font-size: 13px; color: var(--muted); line-height: 1.55; }

/* ===== section headers ===== */
.section-head { margin-bottom: 34px; }
.section-head h1 { font-family: var(--sans); font-weight: 800; font-size: 36px; margin-bottom: 10px; letter-spacing: -.5px; }
.section-head p.sub { color: var(--muted); font-size: 17px; max-width: 780px; }

/* ===== footer ===== */
footer {
  border-top: 1px solid var(--line); padding: 44px 0 64px; margin-top: 40px;
  font-family: var(--sans); font-size: 12.5px; color: var(--muted); line-height: 1.8;
}
footer .disc { max-width: 880px; margin-bottom: 18px; }
footer .meta { font-family: var(--mono); font-size: 11px; }

@media (max-width: 760px) {
  .masthead-inner { flex-direction: column; gap: 10px; align-items: flex-start; }
  .pull-quote p { font-size: 19px; }
  #net-canvas { height: 480px; }
  .net-panel { width: calc(100% - 28px); max-height: 45%; }
}
