/* ═══════════════════════════════════════════════════════════════════
   ATTY LABS — Research & Blog
   Layered on style.css. Reading column, figures, citations.
   ═══════════════════════════════════════════════════════════════════ */

.nav-links a.is-current { color: var(--text); }
.nav-links a.is-current::after {
  content: ""; display: block; height: 2px; border-radius: 2px;
  background: var(--bull); margin-top: 4px;
}

/* ── the reading column ───────────────────────────────────────── */
.rs-col { max-width: 760px; }
.rs-article { padding-top: 66px; }

.rs-head { padding: 62px 0 34px; position: relative; overflow: hidden; }
.rs-head::after {
  content: ""; position: absolute; inset: -60% -20% auto -20%; height: 520px;
  background: radial-gradient(ellipse at 50% 0%, rgba(46,123,255,.12), transparent 62%);
  pointer-events: none;
}
.rs-back {
  display: inline-block; font-family: var(--font-mono); font-size: 12.5px;
  color: var(--text-faint); margin-bottom: 22px;
}
.rs-back:hover { color: var(--text-dim); text-decoration: none; }

.rs-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.rs-tag {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-faint);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px;
}
.rs-tag--macro { color: var(--bull); border-color: rgba(0,230,118,.32); }
.rs-tag--live  { color: var(--gold); border-color: rgba(201,165,75,.34); }

.rs-head h1 { font-size: clamp(31px, 4.6vw, 49px); margin-bottom: 20px; }
.rs-dek {
  font-size: 20px; line-height: 1.55; color: var(--text-dim); max-width: 60ch;
}
.rs-byline {
  margin-top: 26px; font-family: var(--font-mono); font-size: 12.5px;
  color: var(--text-faint); display: flex; gap: 9px; flex-wrap: wrap;
}
.rs-dot { opacity: .5; }

/* ── the key-number strip ─────────────────────────────────────── */
.rs-keys {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; margin: 12px 0 8px;
}
.rs-key { background: var(--card); padding: 20px 18px; }
.rs-key b {
  display: block; font-family: var(--font-mono); font-size: 29px;
  font-weight: 600; line-height: 1; color: var(--text);
}
.rs-key span {
  display: block; font-size: 12.5px; color: var(--text-faint);
  margin-top: 9px; line-height: 1.4;
}
.rs-key--up   b { color: var(--bull); }
.rs-key--down b { color: var(--blue); }
.rs-key--flat b { color: var(--gold); }

/* ── body copy ────────────────────────────────────────────────── */
.rs-body { padding: 40px 0 76px; }
.rs-body h2 {
  font-size: clamp(23px, 2.8vw, 31px); margin: 54px 0 18px; letter-spacing: -.02em;
}
.rs-body h2:first-of-type { margin-top: 44px; }
.rs-body p { color: var(--text-dim); margin-bottom: 19px; font-size: 17px; line-height: 1.72; }
.rs-body p strong { color: var(--text); font-weight: 650; }
.rs-body em { color: var(--text); font-style: italic; }
.rs-body cite { font-style: italic; color: var(--text-dim); }
.rs-body sup a {
  font-family: var(--font-mono); font-size: 11px; padding: 0 1px;
  text-decoration: none; color: var(--blue);
}
.rs-body sup a:hover { text-decoration: underline; }

.rs-list { list-style: none; display: grid; gap: 15px; margin: 6px 0 22px; }
.rs-list li {
  color: var(--text-dim); font-size: 16.5px; line-height: 1.65;
  padding-left: 19px; position: relative;
}
.rs-list li::before {
  content: ""; position: absolute; left: 0; top: 11px;
  width: 6px; height: 6px; border-radius: 2px; background: var(--bull);
}
.rs-list b { color: var(--text); font-weight: 650; }

/* ── provenance block ─────────────────────────────────────────── */
.rs-provenance {
  border: 1px solid var(--line); border-left: 3px solid var(--blue);
  background: var(--bg-soft); border-radius: var(--radius-sm);
  padding: 24px 26px; margin-bottom: 8px;
}
.rs-provenance h4 {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .13em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 13px; font-weight: 600;
}
.rs-provenance p { font-size: 15.5px; margin-bottom: 13px; }
.rs-provenance p:last-child { margin-bottom: 0; }

/* ── figures ──────────────────────────────────────────────────── */
.rs-fig {
  margin: 34px 0 38px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 16px 4px;
  box-shadow: 0 24px 60px -34px rgba(0,0,0,.9);
}
.rs-fig svg { width: 100%; height: auto; display: block; border-radius: 8px; }
.rs-fig figcaption {
  font-size: 13.5px; color: var(--text-faint); line-height: 1.55;
  padding: 14px 6px 16px; border-top: 1px solid var(--line-soft); margin-top: 12px;
}

/* ── the identity block ───────────────────────────────────────── */
.rs-eq {
  margin: 26px 0 30px; padding: 20px 22px; overflow-x: auto;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-left: 3px solid var(--blue); border-radius: var(--radius);
}
.rs-eq code {
  font-family: var(--font-mono); font-size: 13px; line-height: 1.85;
  color: var(--text-dim); white-space: pre; display: block;
}

/* ── callouts ─────────────────────────────────────────────────── */
.rs-callout {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-soft); padding: 26px 28px; margin: 32px 0;
}
.rs-callout h4 { font-size: 17px; font-weight: 700; margin-bottom: 11px; color: var(--text); }
.rs-callout p { font-size: 15.5px; margin-bottom: 12px; }
.rs-callout p:last-child, .rs-callout ol:last-child { margin-bottom: 0; }
.rs-callout ol { color: var(--text-dim); font-size: 15.5px; line-height: 1.65; padding-left: 20px; display: grid; gap: 11px; }
.rs-callout--next { border-left: 3px solid var(--bull); }

/* ── method ───────────────────────────────────────────────────── */
.rs-method {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); padding: 8px 26px; margin: 22px 0 8px;
}
.rs-method dl { display: grid; }
.rs-method dt {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .13em;
  text-transform: uppercase; color: var(--text-faint);
  padding-top: 20px; font-weight: 600;
}
.rs-method dd {
  color: var(--text-dim); font-size: 15px; line-height: 1.66;
  padding: 7px 0 20px; border-bottom: 1px solid var(--line-soft);
}
.rs-method dd:last-of-type { border-bottom: 0; }

/* ── references ───────────────────────────────────────────────── */
.rs-refs {
  counter-reset: ref; list-style: none; display: grid; gap: 14px; margin-top: 20px;
}
.rs-refs li {
  counter-increment: ref; position: relative; padding-left: 32px;
  font-size: 14.5px; line-height: 1.6; color: var(--text-dim);
}
.rs-refs li::before {
  content: counter(ref); position: absolute; left: 0; top: 1px;
  font-family: var(--font-mono); font-size: 12px; color: var(--text-faint);
  border: 1px solid var(--line); border-radius: 5px;
  width: 22px; height: 22px; display: grid; place-items: center;
}
.rs-refs li:target::before { border-color: var(--blue); color: var(--blue); }

.rs-disclaimer {
  margin-top: 54px; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 13.5px; line-height: 1.6; color: var(--text-faint);
}

/* ═══ index page ══════════════════════════════════════════════ */
.rs-index-head { padding: 92px 0 20px; }
.rs-index-head h1 { max-width: 15ch; margin-bottom: 18px; }
.rs-index-head .rs-dek { max-width: 62ch; }

.rs-cards { display: grid; gap: 20px; margin-top: 12px; }
.rs-card {
  display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 30px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 30px; align-items: center;
  transition: border-color .16s ease, transform .16s ease;
}
.rs-card:hover { border-color: var(--line); transform: translateY(-2px); }
.rs-card h3 { font-size: 23px; font-weight: 700; margin: 12px 0 10px; letter-spacing: -.018em; }
.rs-card h3 a { color: var(--text); }
.rs-card h3 a:hover { color: var(--bull); text-decoration: none; }
.rs-card p { color: var(--text-dim); font-size: 15.5px; line-height: 1.62; margin-bottom: 15px; }
.rs-card-meta {
  font-family: var(--font-mono); font-size: 12px; color: var(--text-faint);
  display: flex; gap: 9px; flex-wrap: wrap;
}
.rs-card-fig {
  background: var(--bg-deep); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 10px; overflow: hidden;
}
.rs-card-fig svg { width: 100%; height: auto; display: block; }

.rs-soon {
  margin-top: 46px; border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 28px 30px; background: var(--bg-soft);
}
.rs-soon h3 { font-size: 18px; margin-bottom: 14px; }
.rs-soon ul { list-style: none; display: grid; gap: 11px; }
.rs-soon li {
  color: var(--text-dim); font-size: 15px; padding-left: 20px; position: relative;
}
.rs-soon li::before {
  content: ""; position: absolute; left: 0; top: 10px; width: 6px; height: 6px;
  border-radius: 999px; border: 1px solid var(--text-faint);
}
.rs-soon b { color: var(--text-dim); font-weight: 650; }

@media (max-width: 760px) {
  .rs-card { grid-template-columns: 1fr; gap: 20px; }
  .rs-card-fig { order: -1; }
  .rs-body p { font-size: 16.5px; }
  .rs-fig { padding: 12px 12px 2px; }
  .rs-method { padding: 4px 18px; }
  .rs-provenance, .rs-callout { padding: 20px 18px; }
  .rs-eq { padding: 16px 14px; }
  .rs-eq code { font-size: 11.5px; }
}

/* ── data table (the table view behind an article's figures) ─── */
.rs-table-wrap { overflow-x: auto; margin: 22px 0 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.rs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rs-table th, .rs-table td { padding: 10px 14px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line-soft); }
.rs-table th:first-child, .rs-table td:first-child { text-align: left; min-width: 0; }
.rs-table thead th {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-faint); font-weight: 600; vertical-align: bottom; white-space: normal; min-width: 108px;
}
.rs-table td { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.rs-table td:first-child { color: var(--text); font-weight: 600; }
.rs-table tbody tr:last-child td { border-bottom: 0; }
.rs-table tr.rs-row-group td { font-weight: 600; color: var(--text); background: var(--bg-soft); }
.rs-table .rs-sub { display: block; font-size: 11.5px; color: var(--text-faint); font-weight: 400; }
