@font-face {
  font-family: "Nimbus Sans";
  src: url("/static/fonts/NimbusSans.otf") format("opentype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
:root {
  --bg: #FDFDFC;
  --fg: #17150F;
  --muted: #17150F;
  --border: rgba(20,18,50,0.13);
  --accent: #1b4d33;
  --accent-bg: #eef3ef;
  --green: #16A34A;
  --indigo: #1b4d33;
  --orange: #E4571B;
  --grad: linear-gradient(90deg, #16A34A 0%, #221fc3 100%);
  --grad-135: linear-gradient(135deg, #16A34A 0%, #221fc3 100%);
  --kook-green: #c9f24d;
  --kook-ink: #17352a;
  --kook-cream: #f4fbe8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Nimbus Sans", "Helvetica Neue", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: 14px;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
}
strong, b, th, h1, h2, h3, h4, .logo { font-weight: 500; }

header {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.75rem 1.5rem;
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}

.logo {
  font-weight: 600;
  text-decoration: none;
  color: var(--fg);
  font-size: 1.05rem;
}

.nav-search {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  max-width: 420px;
}

.nav-search input {
  flex: 1;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font: inherit;
}

button {
  padding: 0.4rem 0.9rem;
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
  transition: filter 0.12s ease, box-shadow 0.12s ease;
}
button:hover { filter: brightness(1.08); }
button:active { filter: brightness(0.95); }

input:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}
button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-bg);
}
a { transition: color 0.12s ease; }

main {
  padding: 1.5rem;
}

/* ── Dashboard homepage ── */
.home-dash {
  max-width: 1100px;
  margin: 2rem auto 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.dash-section {}

.dash-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}
.dash-section-head h2 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.dash-count {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
  margin-left: 0.25rem;
}
.dash-more {
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
}
.dash-more:hover { text-decoration: underline; }
.dash-more-group {
  display: flex;
  gap: 1rem;
}

.dash-table-wrap {
  overflow-x: auto;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  scrollbar-width: thin;
}
.dash-table-wrap::-webkit-scrollbar { width: 5px; height: 5px; }
.dash-table-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.dash-table th {
  text-align: left;
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 0.3rem 0.5rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 1;
}
.dash-table td {
  padding: 0.3rem 0.5rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.dash-table td a {
  color: var(--fg);
  text-decoration: none;
  font-weight: 500;
}
.dash-table td a:hover { color: var(--accent); }
.dash-table th.num,
.dash-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.dash-table td.muted { color: var(--muted); }
.dash-table td.tabnum { font-variant-numeric: tabular-nums; }

.dash-overflow {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.dash-overflow a { color: var(--accent); text-decoration: none; }
.dash-overflow a:hover { text-decoration: underline; }

.dash-prec-group { margin-bottom: 0.85rem; }
.dash-prec-group:last-child { margin-bottom: 0; }
.dash-prec-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 0 0.25rem;
}

.rumored { color: var(--accent); font-size: 0.75rem; }
.home-cards {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.2rem 0.2rem 0.75rem;
  margin-top: 0.5rem;
  scrollbar-width: thin;
}
.home-cards::-webkit-scrollbar { height: 5px; }
.home-cards::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.home-card {
  flex: 0 0 260px;
  min-height: 140px;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--fg);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  animation: home-card-in 0.45s ease both;
}
.home-card:nth-child(2) { animation-delay: 0.05s; }
.home-card:nth-child(3) { animation-delay: 0.10s; }
.home-card:nth-child(4) { animation-delay: 0.15s; }
.home-card:nth-child(5) { animation-delay: 0.20s; }
.home-card:nth-child(n+6) { animation-delay: 0.25s; }

@keyframes home-card-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

a.home-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 18px -8px var(--accent-bg);
  transform: translateY(-2px);
}
.home-card-meta {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.72rem;
  color: var(--muted);
}
.home-card-ticker {
  font-weight: 600;
  color: var(--fg);
  letter-spacing: 0.02em;
}
.home-card-form {
  padding: 0.08rem 0.35rem;
  background: var(--accent-bg);
  color: var(--accent);
  border-radius: 3px;
  font-size: 0.68rem;
  font-weight: 500;
}
.home-card-date { font-variant-numeric: tabular-nums; }
.home-card-hook {
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--fg);
  flex: 1;
}
.home-card-company {
  font-size: 0.72rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 0.4rem;
  margin-top: auto;
}
.home-card-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 500;
}
.home-card--surprise {
  background: linear-gradient(135deg, var(--bg) 0%, var(--accent-bg) 180%);
}
.home-card--stat { justify-content: center; text-align: left; }
.home-card-stat-row {
  display: flex;
  gap: 1.25rem;
}
.home-card-stat-row > div {
  display: flex;
  flex-direction: column;
}
.home-card-stat-row strong {
  font-size: 1.4rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.home-card-stat-row span {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.home-card-stat-latest {
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.home-card-stat-latest:hover { color: var(--accent); }


.big-search {
  display: flex;
  gap: 0.5rem;
}
.big-search input {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  font: inherit;
}
.big-search button { padding: 0.7rem 1.4rem; font-size: 1rem; }

.search-results { max-width: 1000px; margin: 0 auto; }
.search-results h1 { margin-bottom: 0.25rem; }
.search-results .ticker { color: var(--muted); font-weight: 400; }
.search-results .meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 2rem; }
.category { margin-bottom: 2rem; }
.category h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.5rem;
  font-weight: 600;
}
.category h2 .count {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 400;
  margin-left: 0.4rem;
}
.category h2 .diff-link {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent);
  text-decoration: none;
  margin-left: 0.75rem;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: white;
  transition: all 0.12s ease;
}
.category h2 .diff-link:hover { border-color: var(--accent); background: var(--accent-bg); }
details.more { margin-top: 0.25rem; }
details.more > summary {
  cursor: pointer;
  padding: 0.5rem 0.6rem;
  color: var(--accent);
  font-size: 0.85rem;
  list-style: none;
  user-select: none;
}
details.more > summary::before { content: "+ "; }
details[open].more > summary::before { content: "− "; }
details.more > summary:hover { background: var(--accent-bg); border-radius: 4px; }
details.more .filing-list { margin-top: 0.25rem; }

.filing-list {
  margin-top: 0.5rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.filing-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 110px 190px;
  gap: 0.9rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
  text-decoration: none;
  font-size: 0.92rem;
  transition: background 0.1s ease;
}
.filing-row .accession { color: var(--muted); font-size: 0.82rem; }
.filing-row .period-inline { color: var(--muted); margin-left: 0.45rem; font-size: 0.85rem; }
.filing-row > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.filing-row:last-child { border-bottom: 0; }
.filing-row.head {
  background: #f5f5f5;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.filing-row:not(.head):hover { background: var(--accent-bg); }
.filing-row .accession { font-variant-numeric: tabular-nums; }

.filing-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 280px;
  gap: 1.5rem;
  align-items: start;
  margin: 0 auto;
}
.filing-layout.two-col {
  grid-template-columns: 240px minmax(0, 1fr);
}

.toc {
  position: sticky;
  top: 4rem;
  max-height: calc(100vh - 5rem);
  overflow-y: auto;
  padding-right: 0.5rem;
}
.toc h2 { font-size: 1.05rem; margin: 0 0 0.25rem; }
.toc .meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 1rem; }
.toc nav { display: flex; flex-direction: column; gap: 0.1rem; }
.toc a {
  padding: 0.25rem 0.5rem;
  color: var(--fg);
  text-decoration: none;
  border-radius: 3px;
  font-size: 0.87rem;
  line-height: 1.35;
  overflow-wrap: break-word;
  word-break: break-word;
}
.toc a:hover { background: var(--accent-bg); color: var(--accent); }
.toc .level-2 { padding-left: 1.25rem; color: var(--muted); }
.toc .level-3 { padding-left: 2rem; color: var(--muted); font-size: 0.82rem; }

.filing-body {
  background: white;
  padding: 2rem 2.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow-x: auto;
  /* No font-family / size here — filer inline styles (Helvetica, Times, etc.)
     carry through and look like SEC's own viewer. Our Adelle Sans still styles
     the header, TOC, and notes. */
}
.filing-body h1, .filing-body h2, .filing-body h3 {
  scroll-margin-top: 4rem;
}
.filing-body table { font-variant-numeric: tabular-nums; }
.filing-body img { max-width: 100%; height: auto; }

.notes {
  position: sticky;
  top: 4rem;
  max-height: calc(100vh - 5rem);
}
.notes-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.notes h3 { font-size: 0.95rem; margin: 0; }
.sec-link {
  display: inline-block;
  margin-top: 0.3rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
}
.sec-link:hover { text-decoration: underline; }

.compare-link, .refresh-link { color: var(--accent); text-decoration: none; }
.compare-link:hover, .refresh-link:hover { text-decoration: underline; }

.ac-wrap { position: relative; flex: 1; }
.ac-wrap input { width: 100%; }
.ac-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  z-index: 20;
  max-height: 360px;
  overflow-y: auto;
}
.ac-dropdown:empty { display: none; }
.ac-item {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  color: var(--fg);
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  text-align: left;
}
.ac-item:last-child { border-bottom: 0; }
.ac-item:hover { background: var(--accent-bg); }
.ac-tkr { font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.ac-name { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-empty { padding: 0.6rem 0.75rem; color: var(--muted); font-size: 0.88rem; }
.ac-divider { padding: 0.35rem 0.75rem; font-size: 0.72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; border-top: 1px solid var(--border); background: var(--bg); }
.ac-uk { font-size: 0.7rem; background: var(--accent-bg); border-radius: 3px; padding: 0.1em 0.35em; }

.transcript-page { max-width: 760px; margin: 0 auto; }
.transcript-header h1 { margin: 0 0 0.25rem; font-size: 1.4rem; }
.transcript-header .meta { color: var(--muted); font-size: 0.9rem; margin: 0 0 1.5rem; }
.transcript-body {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2rem 2.5rem;
  font-size: 0.95rem;
  line-height: 1.7;
}
.transcript-body p { margin: 0 0 1rem; }
.transcript-section {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
  margin: 2.5rem 0 1.25rem;
}
.transcript-body .transcript-section:first-child { margin-top: 0; }
.transcript-speaker {
  margin: 1.75rem 0 0.5rem !important;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
}
.transcript-body .transcript-speaker:first-of-type { border-top: none; padding-top: 0; }
.transcript-speaker .speaker-name { font-weight: 800; }
.transcript-speaker .speaker-role {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.transcript-list {
  list-style: disc;
  margin-left: 1.5rem;
  margin-bottom: 0.4rem;
  color: var(--muted);
}

.transcript-page.with-sidebar { max-width: 1080px; }
.transcript-layout { display: block; }
.transcript-page.with-sidebar .transcript-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 2rem;
  align-items: start;
}
.transcript-sidebar {
  position: sticky;
  top: 1rem;
  font-size: 0.85rem;
  order: 2;
}
.sidebar-group { margin-bottom: 1.5rem; }
.sidebar-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.transcript-sidebar a {
  display: block;
  padding: 0.35rem 0;
  text-decoration: none;
  color: var(--text, #111);
  border-bottom: 1px solid transparent;
}
.transcript-sidebar a:hover { color: var(--accent); }
.analyst-link .analyst-name {
  display: block;
  font-weight: 500;
}
.analyst-link .analyst-firm {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 0.1rem;
}
@media (max-width: 860px) {
  .transcript-page.with-sidebar .transcript-layout {
    grid-template-columns: 1fr;
  }
  .transcript-sidebar {
    position: static;
    order: 1;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    background: white;
    margin-bottom: 1rem;
  }
}

.earnings-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.metrics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.25rem;
  align-items: flex-end;
}
.metric { min-width: 0; }
.metric-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.metric-value {
  font-size: 1.5rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.metric-note {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.75rem;
  align-self: flex-end;
}
.earnings-exhibits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.exhibit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.85rem;
  color: var(--text, #111);
  background: white;
}
.exhibit-btn { transition: all 0.12s ease; }
.exhibit-btn:hover { border-color: var(--accent); color: var(--accent); }
.exhibit-btn.primary {
  background: var(--accent, #1f5eff);
  color: white;
  border-color: var(--accent, #1f5eff);
}
.exhibit-btn.primary:hover { color: white; filter: brightness(0.95); }
.exhibit-btn .exhibit-ico { font-size: 0.9rem; }
.exhibit-btn .exhibit-name {
  color: inherit;
  opacity: 0.7;
  font-size: 0.78rem;
  margin-left: 0.2rem;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.exhibit-more { font-size: 0.8rem; margin-left: 0.25rem; }
.exhibit-more summary { cursor: pointer; color: var(--muted); }
.exhibit-more ul { margin: 0.4rem 0 0 1rem; padding: 0; }
.exhibit-more li { list-style: disc; margin: 0.15rem 0; }

.compare { max-width: 1200px; margin: 0 auto; }
.compare-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.compare-header h1 { margin: 0; }
.compare-header .meta { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.9rem; }

.view-toggle {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.view-toggle a {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: white;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.88rem;
  transition: all 0.12s ease;
}
.view-toggle a:hover { border-color: var(--accent); color: var(--accent); }
.view-toggle a.active:hover { color: white; }
.view-toggle a.back:hover { border-color: transparent; color: var(--accent); }
.view-toggle.ask-toggle { margin-bottom: 1.5rem; }
.view-toggle a.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.view-toggle a.back {
  border: 0;
  background: transparent;
  color: var(--accent);
  margin-left: 0.5rem;
}

.statement {
  margin-bottom: 2.5rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
}
.statement h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  color: var(--accent);
}
.statement-table h2 { display: none; }
.statement-table p { margin: 0.25rem 0; color: var(--muted); font-size: 0.9rem; }
.statement-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}
.statement-table th, .statement-table td {
  padding: 0.35rem 0.6rem;
  border-bottom: 1px solid var(--border);
}
.statement-table th { background: #f5f5f5; text-align: right; }
.statement-table th:first-child { text-align: left; }
.statement-table td:first-child { text-align: left; }
.statement-table td { text-align: right; }
.statement-table em { color: var(--muted); font-style: normal; }
.empty { color: var(--muted); padding: 2rem; text-align: center; }

.tables-view { max-width: 1400px; margin: 0 auto; }
.period-controls {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.period-pill {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.82rem;
  background: white;
}
.period-pill { transition: all 0.12s ease; }
.period-pill:hover { border-color: var(--accent); color: var(--accent); }
.period-pill.active { background: var(--accent); color: white; border-color: var(--accent); }
.period-pill.active:hover { color: white; filter: brightness(1.08); }
.tables-scroll {
  overflow-x: auto;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
}
table.xtable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.87rem;
  font-variant-numeric: tabular-nums;
}
table.xtable th, table.xtable td {
  padding: 0.4rem 0.7rem;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  text-align: right;
}
table.xtable th { background: #f5f5f5; color: var(--muted); font-weight: 500; font-size: 0.8rem; }
table.xtable tbody tr:last-child td { border-bottom: 0; }
table.xtable .sticky-col {
  position: sticky;
  left: 0;
  background: white;
  text-align: left;
  z-index: 1;
  border-right: 1px solid var(--border);
  min-width: 200px;
}
table.xtable thead .sticky-col { background: #f5f5f5; }
table.xtable td.num { color: var(--fg); }
table.xtable tbody tr:hover td { background: var(--accent-bg); }
table.xtable tbody tr:hover .sticky-col { background: var(--accent-bg); }
p.fn { color: var(--muted); font-size: 0.8rem; margin-top: 0.75rem; }

.compare-inline {
  margin: 1rem 0 0.25rem;
}
.compare-inline-btn {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: var(--accent-bg);
  color: var(--accent);
  border: 1px solid transparent;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: "Nimbus Sans", "Helvetica Neue", -apple-system, sans-serif;
}
.compare-inline-btn:hover {
  background: var(--accent);
  color: white;
}
.row-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
}
.row-link:hover { color: var(--accent); }
.export-link {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.82rem;
  background: white;
  margin-left: 0.35rem;
}
.export-link:hover { background: var(--accent); color: white; }
table.xtable .cell-src {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted transparent;
}
table.xtable .cell-src:hover { color: var(--accent); border-bottom-color: var(--accent); }
table.xtable .row-anchor {
  color: inherit;
  text-decoration: none;
}
table.xtable .row-anchor:hover { color: var(--accent); }
:target { scroll-margin-top: 80px; }
tr:target .sticky-col { background: var(--accent-bg); box-shadow: inset 2px 0 0 var(--accent); }

.unavailable-card {
  max-width: 640px;
  margin: 1.5rem auto;
  padding: 1.75rem 2rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.unavailable-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}
.unavailable-card h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 0.95rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.unavailable-card .error {
  padding: 0.6rem 0.8rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 4px;
  font-size: 0.88rem;
}
.unavailable-actions {
  margin-top: 0.5rem;
}
.yt-form {
  display: flex;
  gap: 0.5rem;
  margin: 0.6rem 0 0.35rem;
}
.yt-form input[type="url"] {
  flex: 1;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font: inherit;
  font-size: 0.9rem;
}
.yt-form button {
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: 4px;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.yt-form button:hover { filter: brightness(0.95); }
.source-links { list-style: none; padding: 0; margin: 0.4rem 0; }
.source-links li { margin: 0.25rem 0; }
.source-links a { color: var(--accent); text-decoration: none; }
.source-links a:hover { text-decoration: underline; }
.notes textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font: inherit;
  font-size: 0.9rem;
  resize: vertical;
}
.save-status { color: var(--muted); font-size: 0.8rem; height: 1rem; margin-top: 0.25rem; }
.saved { color: #2d7a3e; }

.hit .excerpt { color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.hit mark { background: #fff3a6; color: var(--fg); padding: 0 2px; border-radius: 2px; }

/* Ask / search page */
.corpus-tickers a { color: var(--accent); text-decoration: none; }
.corpus-tickers a:hover { text-decoration: underline; }
.reindex-btn {
  margin-left: 0.5rem;
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  background: white;
  color: var(--accent);
  border: 1px solid var(--border);
}
.reindex-btn:hover { border-color: var(--accent); filter: none; }

.ask-filters {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin: 0 0 1.5rem;
  font-size: 0.88rem;
  flex-wrap: wrap;
}
.ask-filters .label { color: var(--muted); margin-right: 0.25rem; }
/* Global chip — used by ask-filters AND pdb-filters */
.chip {
  display: inline-block;
  padding: 0.28rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg);
  text-decoration: none;
  background: white;
  font-size: 0.84rem;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.chip.active:hover { color: white; filter: brightness(1.08); }
.ask-filters .ask-mode {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.85rem;
}
.ask-filters .ask-mode a { color: var(--accent); text-decoration: none; }
.ask-filters .ask-mode a:hover { text-decoration: underline; }

.ask-answer {
  background: white;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.ask-answer p:first-child { margin-top: 0; }
.ask-answer p:last-child { margin-bottom: 0; }

.ask-cites-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 0.5rem;
  font-weight: 600;
}
.filing-row.hit {
  grid-template-columns: 40px 220px minmax(0, 1fr);
  align-items: start;
}
.filing-row.hit.two-col { grid-template-columns: 260px minmax(0, 1fr); }
.filing-row.hit .hit-company { color: var(--muted); font-size: 0.85rem; margin-top: 0.15rem; }
.filing-row.suggestion { grid-template-columns: 110px minmax(0, 1fr); }
.filing-row.suggestion .form { font-weight: 500; color: var(--accent); }
.ticker-title { font-weight: 400; }
.filing-row.hit .cite-n { font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.filing-row.hit .cite-meta { color: var(--muted); font-size: 0.82rem; margin-top: 0.15rem; }

.ask-page {
  max-width: 980px;
}
.ask-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 0.65rem 0 1rem;
}
.ask-hero h1 {
  margin: 0;
}
.ask-subtitle {
  max-width: 58ch;
  margin: 0.55rem 0 0;
  color: #17150F;
  line-height: 1.45;
}
.ask-corpus-card {
  flex: 0 0 auto;
  min-width: 142px;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(0,0,0,0.14);
  background: #fffdf7;
  text-align: right;
}
.ask-corpus-count {
  display: block;
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ask-corpus-label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #17150F;
}
.ask-search {
  margin: 1rem 0 0.9rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(0,0,0,0.12);
  border-bottom: 1px solid rgba(0,0,0,0.12);
}
.ask-query-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
}
.ask-query-line input,
.ask-ticker input {
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: inherit;
}
.ask-query-line input {
  width: 100%;
  min-width: 0;
  padding: 0.9rem 1rem;
  font-size: 1.05rem;
}
.ask-query-line input::placeholder,
.ask-ticker input::placeholder {
  color: rgba(23,21,15,0.45);
}
.ask-query-line input:focus,
.ask-ticker input:focus {
  outline: 2px solid var(--forest);
  outline-offset: 2px;
}
.ask-query-line button {
  min-width: 112px;
  padding: 0 1.25rem;
  border: 1.5px solid var(--forest);
  background: var(--forest);
  color: #fffdf7;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.ask-query-line button:hover {
  filter: brightness(1.06);
}
.ask-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.ask-ticker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.ask-ticker span {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ask-ticker input {
  width: 106px;
  padding: 0.43rem 0.55rem;
  text-transform: uppercase;
}
.ask-source {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.ask-source-option {
  position: relative;
}
.ask-source-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.ask-source-option span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(0,0,0,0.16);
  border-right: 0;
  background: #fffdf7;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}
.ask-source-option:first-child span {
  border-radius: 4px 0 0 4px;
}
.ask-source-option:last-child span {
  border-right: 1px solid rgba(0,0,0,0.16);
  border-radius: 0 4px 4px 0;
}
.ask-source-option input:checked + span {
  background: var(--forest);
  color: #fffdf7;
  border-color: var(--forest);
}
.ask-source-option input:focus-visible + span {
  outline: 2px solid var(--forest);
  outline-offset: 2px;
}
.ask-prompts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0.85rem 0 1.1rem;
  border-top: 1px solid rgba(0,0,0,0.12);
}
.ask-prompts a {
  padding: 0.75rem 0.85rem 0.75rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.12);
  color: var(--ink) !important;
  text-decoration: none !important;
  line-height: 1.35;
}
.ask-prompts a:hover {
  color: var(--forest) !important;
}
.ask-corpus-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.7rem;
  color: #17150F;
  font-size: 0.86rem;
  margin: 0.75rem 0 1.15rem;
}
.ask-corpus-row > span:not(:last-child)::after {
  content: "";
}
.ask-corpus-row .corpus-tickers {
  margin-left: 0.25rem;
}
.ask-page .reindex-btn {
  margin-left: auto;
  background: transparent;
  border-color: rgba(0,0,0,0.16);
}
.ask-page .htmx-indicator {
  color: #17150F;
}
.ask-page .ask-filters {
  justify-content: flex-end;
  margin: 0 0 1rem;
}
.ask-page .ask-filters .ask-mode {
  margin-left: 0;
}
.ask-page .ask-cites-label {
  margin-top: 1.1rem;
  color: #17150F;
}
.ask-page .filing-list {
  background: transparent;
}
.ask-page .filing-row.hit {
  border-color: rgba(0,0,0,0.11);
}

@media (max-width: 760px) {
  .ask-hero {
    display: block;
  }
  .ask-corpus-card {
    display: inline-block;
    margin-top: 0.9rem;
    text-align: left;
  }
  .ask-query-line {
    grid-template-columns: 1fr;
  }
  .ask-query-line button {
    min-height: 2.8rem;
  }
  .ask-controls {
    align-items: stretch;
  }
  .ask-ticker,
  .ask-source {
    width: 100%;
  }
  .ask-ticker input {
    flex: 1;
    width: auto;
  }
  .ask-source-option {
    flex: 1;
  }
  .ask-source-option span {
    justify-content: center;
    width: 100%;
  }
  .ask-prompts {
    grid-template-columns: 1fr;
  }
  .ask-page .reindex-btn {
    margin-left: 0;
  }
  .ask-page .filing-row.hit {
    grid-template-columns: 36px minmax(0, 1fr);
  }
  .ask-page .filing-row.hit .excerpt {
    grid-column: 1 / -1;
  }
}

/* Transcripts list */
table.filings {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  font-size: 0.92rem;
}
table.filings th, table.filings td {
  padding: 0.6rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
table.filings thead th {
  background: #f5f5f5;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
table.filings tbody tr:last-child td { border-bottom: 0; }
table.filings tbody tr:hover td { background: var(--accent-bg); }
table.filings td.form { font-weight: 500; width: 160px; }
table.filings td.date { color: var(--muted); width: 220px; font-variant-numeric: tabular-nums; }
table.filings td.date .upcoming { color: var(--muted); font-style: italic; }
table.filings .read-link { color: var(--accent); text-decoration: none; font-weight: 500; }
table.filings .read-link:hover { text-decoration: underline; }
table.filings .tag {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.05rem 0.45rem;
  background: #f5f5f5;
  color: var(--muted);
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.error-card {
  background: #fff8d6;
  border: 1px solid #f0e3a0;
  color: #6b5700;
  border-radius: 6px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.notes-panel {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 340px;
  max-width: calc(100vw - 2rem);
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(20, 20, 40, 0.12);
  z-index: 20;
  display: flex;
  flex-direction: column;
}
.notes-toggle {
  background: transparent;
  color: var(--fg);
  border: 0;
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 8px 8px 0 0;
}
.notes-toggle:hover { background: var(--accent-bg); }
.notes-panel.closed .notes-toggle { border-bottom: 0; border-radius: 8px; }
.notes-panel.closed .notes-toggle .chev { transform: rotate(180deg); }
.notes-toggle .chev { transition: transform 0.15s ease; font-size: 0.75rem; color: var(--muted); }
.notes-body {
  padding: 0.65rem 0.85rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.notes-panel.closed .notes-body { display: none; }
.notes-panel textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font: inherit;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 10rem;
}

@media (max-width: 1100px) {
  .filing-layout, .filing-layout.two-col { grid-template-columns: 220px 1fr; }
}
@media (max-width: 720px) {
  .filing-layout, .filing-layout.two-col { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; }
  .notes-panel { width: calc(100vw - 1.5rem); right: 0.75rem; bottom: 0.75rem; }

  /* Header: drop nav-search on mobile (logo click = home; results pages have their own search) */
  header { gap: 0.75rem; padding: 0.65rem 1rem; }
  .nav-search { display: none; }

  /* Filing rows reflow: form + label on line 1, filed date on line 2, accession hidden */
  .filing-row, .filing-row.head {
    grid-template-columns: 70px minmax(0, 1fr);
    grid-template-rows: auto auto;
    row-gap: 0.15rem;
    padding: 0.7rem 0.9rem;
  }
  .filing-row > span:nth-child(3) {
    grid-column: 2;
    color: var(--muted);
    font-size: 0.82rem;
  }
  .filing-row > span:nth-child(4) { display: none; }
  .filing-row.head > span:nth-child(3) { text-transform: uppercase; }
  .filing-row > span { white-space: normal; }

  .view-toggle { flex-wrap: wrap; }
  .compare-header { gap: 0.75rem; }
  .big-search { flex-direction: column; }
  .big-search input { width: 100%; min-width: 0; }
  .big-search button { width: 100%; }

  .home-dash { margin-top: 1.5rem; gap: 2rem; }
  .dash-section-head { flex-direction: column; gap: 0.25rem; }
  .dash-more-group { flex-wrap: wrap; }
  .dash-table { font-size: 0.82rem; }

  main { padding: 1rem; }
  .search-results h1 { font-size: 1.4rem; }
}

/* ---------- filing-to-filing diff view ---------- */
.diff-view { max-width: 1000px; margin: 0 auto; }
.diff-view h1 { margin-bottom: 0.25rem; }
.diff-view .ticker { color: var(--muted); font-weight: 400; }
.diff-view .meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.25rem; }

.diff-picker {
  display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: flex-end;
  background: white; border: 1px solid var(--border); border-radius: 8px;
  padding: 0.9rem 1rem; margin-bottom: 1.75rem;
}
.diff-picker label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.82rem; color: var(--muted); flex: 1; min-width: 220px; }
.diff-picker select { padding: 0.4rem 0.5rem; font-size: 0.9rem; border: 1px solid var(--border); border-radius: 4px; background: white; }
.diff-picker button {
  padding: 0.5rem 1rem; background: var(--accent); color: white;
  border: 0; border-radius: 4px; font-size: 0.9rem; cursor: pointer;
}

.diff-empty { color: var(--muted); background: white; padding: 1rem; border: 1px dashed var(--border); border-radius: 6px; }

.diff-section {
  background: white; border: 1px solid var(--border); border-radius: 8px;
  padding: 1.1rem 1.25rem; margin-bottom: 1.25rem;
}
.diff-section h2 {
  margin: 0 0 0.75rem; font-size: 1.1rem; display: flex; align-items: center;
  gap: 0.6rem; flex-wrap: wrap;
}
.diff-stats { display: inline-flex; gap: 0.35rem; font-size: 0.78rem; font-weight: 400; }
.diff-stats .pill {
  padding: 0.1rem 0.55rem; border-radius: 999px; letter-spacing: 0.02em;
}
.diff-stats .pill.added   { background: #dcfce7; color: #166534; }
.diff-stats .pill.removed { background: #fee2e2; color: #991b1b; }
.diff-stats .pill.changed { background: #fef3c7; color: #92400e; }
.diff-stats .pill.equal   { background: #f3f4f6; color: var(--muted); }

.diff-warn { color: var(--muted); font-size: 0.85rem; font-style: italic; }

.diff-body summary {
  cursor: pointer; color: var(--muted); font-size: 0.85rem; padding: 0.25rem 0;
  user-select: none;
}
.diff-body[open] > summary { margin-bottom: 0.5rem; }

.diff-blocks { font-size: 0.93rem; line-height: 1.55; }
.diff-p { margin: 0.55rem 0; padding: 0.45rem 0.7rem; border-radius: 4px; }
.diff-p.diff-equal   { color: #6b6b6b; background: transparent; padding-left: 0.7rem; border-left: 2px solid #e5e5e0; }
.diff-p.diff-added   { background: #dcfce7; border-left: 3px solid #16a34a; }
.diff-p.diff-removed { background: #fee2e2; border-left: 3px solid #dc2626; text-decoration: line-through; text-decoration-color: rgba(153,27,27,0.35); }
.diff-p.diff-changed { background: #fffbeb; border-left: 3px solid #d97706; }

.diff-p ins { background: #bbf7d0; color: #14532d; text-decoration: none; padding: 0 0.1em; border-radius: 2px; }
.diff-p del { background: #fecaca; color: #7f1d1d; text-decoration: line-through; padding: 0 0.1em; border-radius: 2px; }

.category h2 .diff-link {
  margin-left: 0.75rem; font-size: 0.82rem; font-weight: 400;
  color: var(--accent); text-decoration: none; letter-spacing: 0;
  text-transform: none;
}
.category h2 .diff-link:hover { text-decoration: underline; }

.diff-summary-wrap { margin: 0 0 0.9rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.summarize-btn {
  padding: 0.45rem 0.85rem; font-size: 0.88rem;
  background: white; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 999px; cursor: pointer;
}
.summarize-btn:hover { background: var(--accent-bg); }
.summary-loading { color: var(--muted); font-size: 0.85rem; font-style: italic; display: none; }
.htmx-request .summary-loading, .summary-loading.htmx-request { display: inline; }
.summary-slot { flex-basis: 100%; }
.diff-summary {
  margin-top: 0.6rem; padding: 0.9rem 1.1rem;
  background: #fffdf5; border: 1px solid #eadfb8; border-left: 3px solid #d4a017;
  border-radius: 6px; font-size: 0.92rem; line-height: 1.55;
}
.diff-summary.err { background: #fef2f2; border-color: #fecaca; border-left-color: #dc2626; color: #7f1d1d; }
.diff-summary p:first-child { margin-top: 0; }
.diff-summary p:last-child { margin-bottom: 0; }
.diff-summary ul { margin: 0.25rem 0; padding-left: 1.25rem; }
.diff-summary li { margin: 0.3rem 0; }

/* Share-a-highlight */
.sec-share-btn {
  position: absolute;
  z-index: 1000;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 12px;
  font: 500 13px/1 'Adelle Sans', system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}
.sec-share-btn:hover { background: #333; }
.sec-share-btn[hidden] { display: none; }
mark.sec-highlight {
  background: #fff3a0;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(214, 181, 0, 0.35);
}

.filing-summary-wrap { margin: 0 0 1.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.filing-summary {
  flex-basis: 100%;
  margin-top: 0.6rem; padding: 1rem 1.2rem;
  background: #fffdf5; border: 1px solid #eadfb8; border-left: 3px solid #d4a017;
  border-radius: 6px; font-size: 0.93rem; line-height: 1.6;
}
.filing-summary h1, .filing-summary h2, .filing-summary h3 {
  font-size: 0.95rem; margin: 0.9rem 0 0.3rem;
}
.filing-summary h1:first-child, .filing-summary h2:first-child { margin-top: 0; }
.filing-summary p { margin: 0.4rem 0; }
.filing-summary ul { margin: 0.3rem 0; padding-left: 1.3rem; }
.filing-summary li { margin: 0.3rem 0; }
.filing-summary strong { color: #1a1a1a; }

/* ---------- phrase tracker ---------- */
.track-view { max-width: 1000px; margin: 0 auto; }
.track-view h1 { margin-bottom: 0.25rem; }
.track-view .meta { color: var(--muted); margin-bottom: 1.25rem; }

.track-form {
  display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: flex-end;
  background: white; border: 1px solid var(--border); border-radius: 8px;
  padding: 0.9rem 1rem; margin-bottom: 1.5rem;
}
.track-form label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.82rem; color: var(--muted); }
.track-form input[type=text], .track-form select {
  padding: 0.45rem 0.6rem; font-size: 0.95rem; border: 1px solid var(--border); border-radius: 4px; background: white;
}
.track-form label:nth-child(2) { flex: 1; min-width: 260px; }
.track-form button {
  padding: 0.5rem 1.1rem; background: var(--accent); color: white;
  border: 0; border-radius: 4px; font-size: 0.95rem; cursor: pointer;
}
.track-error { color: #991b1b; background: #fef2f2; padding: 0.6rem 0.9rem; border-radius: 4px; }
.track-summary { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.5rem; }

.track-year { margin-bottom: 1.25rem; }
.track-year h2 {
  font-size: 0.85rem; color: var(--muted); letter-spacing: 0.08em;
  text-transform: uppercase; margin: 0 0 0.5rem; font-weight: 500;
}
.track-items { display: flex; flex-direction: column; gap: 0.5rem; }
.track-item {
  display: grid; grid-template-columns: 120px 1fr; gap: 1rem;
  padding: 0.75rem 1rem; background: white; border: 1px solid var(--border);
  border-radius: 6px; color: var(--fg); text-decoration: none;
  transition: border-color 0.1s;
}
.track-item:hover { border-color: var(--accent); }
.track-item .date { font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.track-item .kind-badge {
  margin-top: 0.3rem; font-size: 0.75rem; padding: 0.1rem 0.5rem;
  background: var(--accent-bg); color: var(--accent); border-radius: 3px;
  display: inline-block; font-weight: 500;
}
.track-item.transcript .kind-badge { background: #ede9fe; color: #5b21b6; }
.track-item .excerpt {
  font-size: 0.9rem; line-height: 1.55; color: #2d2d2d;
}
.track-item .excerpt mark {
  background: #fef08a; color: inherit; padding: 0 0.15em; border-radius: 2px;
}

.what-btn {
  font-size: 0.78rem; padding: 0.18rem 0.55rem;
  background: transparent; color: var(--muted);
  border: 1px dashed var(--border); border-radius: 4px;
  cursor: pointer; font-family: inherit;
}
.what-btn:hover { color: var(--accent); border-color: var(--accent); border-style: solid; }
.label-err { color: #991b1b; font-size: 0.82rem; }
.label-empty { color: var(--muted); }

/* ---------- main nav ---------- */
.main-nav {
  display: flex;
  gap: 0.25rem;
}
.main-nav a {
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.1s, background 0.1s;
}
.main-nav a:hover { color: var(--fg); background: var(--accent-bg); }
.main-nav a.active { color: var(--accent); background: var(--accent-bg); font-weight: 500; }

/* ---------- private db shared ---------- */
.pdb-page { max-width: 1200px; margin: 0 auto; }

.pdb-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}
.pdb-tabs a {
  padding: 0.5rem 0.9rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.1s, border-color 0.1s;
}
.pdb-tabs a:hover { color: var(--fg); }
.pdb-tabs a.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }

.pdb-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.pdb-title { font-size: 1.5rem; margin: 0 0 0.15rem; }
.pdb-subtitle { color: var(--muted); margin: 0; font-size: 0.92rem; }

.pdb-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
}
.filter-label {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 0.15rem;
}
.filter-label + .filter-label,
.filter-group-sep {
  margin-left: 1rem;
}
.deal-type-tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.4rem;
  background: #f3f4f6;
  color: var(--muted);
  border-radius: 3px;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.pdb-table-wrap {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow-x: auto;
}
.pdb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}
.pdb-table th, .pdb-table td {
  padding: 0.32rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light, #eee);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pdb-table th {
  background: #f5f5f5;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
  padding: 0.4rem 0.65rem;
}
.pdb-table tbody tr:last-child td { border-bottom: 0; }
.pdb-table tbody tr:hover td { background: var(--accent-bg); }
.pdb-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.pdb-table th.num { text-align: right; }
.pdb-table .tabnum { font-variant-numeric: tabular-nums; }
.txn-table td:first-child { max-width: 220px; white-space: normal; overflow: visible; }
.hi-multiple { color: #d97706; font-weight: 600; }

/* Sortable + filterable column headers (shared across precedent tabs) */
.th-sortable { cursor: pointer; white-space: nowrap; user-select: none; -webkit-user-select: none; position: relative; }
.th-sortable:hover .th-label { color: var(--fg, #111); }
.th-sortable.sort-asc .th-label::after { content: ' ↑'; font-size: 0.65rem; opacity: 0.5; }
.th-sortable.sort-desc .th-label::after { content: ' ↓'; font-size: 0.65rem; opacity: 0.5; }
.th-filter-btn { display: inline-block; margin-left: 3px; font-size: 0.6rem; color: var(--muted, #999); cursor: pointer; vertical-align: middle; opacity: 0.6; transition: opacity 0.1s; }
.th-filter-btn:hover, .th-filter-btn.filter-active { opacity: 1; color: var(--link, #1a56db); }
.th-filter-btn.filter-active { font-weight: 700; }
.col-filter-dropdown { position: fixed; background: #fff; border: 1px solid var(--border, #ddd); border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,0.12); z-index: 200; min-width: 140px; max-height: 260px; overflow-y: auto; padding: 4px 0; font-weight: 400; white-space: nowrap; }
.col-filter-dropdown .cf-item { display: block; padding: 5px 14px; font-size: 0.75rem; color: var(--fg, #222); cursor: pointer; text-decoration: none; }
.col-filter-dropdown .cf-item:hover { background: var(--accent-bg, #f0f4ff); }
.col-filter-dropdown .cf-item.cf-active { font-weight: 600; color: var(--link, #1a56db); }

.pdb-empty {
  padding: 3rem 2rem;
  text-align: center;
  color: var(--muted);
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.pdb-empty a { color: var(--accent); text-decoration: none; }
.pdb-empty a:hover { text-decoration: underline; }

.pdb-section { margin-top: 2rem; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.section-title { font-size: 1rem; margin: 0; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; font-size: 0.78rem; }

.pdb-notes-body {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  white-space: pre-wrap;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* metric cards */
.metric-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}
.metric-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.85rem 1.25rem;
  min-width: 120px;
  transition: border-color 0.12s, background 0.12s;
}
.metric-card-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
.metric-card-value { font-size: 1.4rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* buttons */
.btn-primary {
  display: inline-block;
  padding: 0.45rem 1rem;
  background: var(--accent);
  color: white;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border: 0;
  cursor: pointer;
  transition: filter 0.12s;
}
.btn-primary:hover { filter: brightness(1.08); color: white; }

.btn-ghost {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  background: white;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.88rem;
  transition: border-color 0.12s, color 0.12s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-danger {
  padding: 0.4rem 0.75rem;
  background: white;
  color: #dc2626;
  border: 1px solid #fca5a5;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.12s;
}
.btn-danger:hover { background: #fef2f2; border-color: #dc2626; }

.btn-inline-delete {
  background: transparent;
  color: var(--muted);
  border: 0;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
  border-radius: 3px;
  transition: color 0.1s;
}
.btn-inline-delete:hover { color: #dc2626; background: #fef2f2; }

.back-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.88rem;
  white-space: nowrap;
}
.back-link:hover { text-decoration: underline; }

.muted-sm { color: var(--muted); font-size: 0.85rem; }
.icon-link { text-decoration: none; margin-right: 0.25rem; font-size: 0.9rem; }

/* status badges */
.status-badge {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  vertical-align: middle;
  margin-left: 0.4rem;
}
.status-active { background: #dcfce7; color: #166534; }
.status-acquired { background: #e0e7ff; color: #3730a3; }
.status-ipo { background: #fef3c7; color: #92400e; }
.status-dead { background: #f3f4f6; color: var(--muted); }

.rumored-badge {
  display: inline-block;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  vertical-align: middle;
  margin-left: 0.4rem;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
tr.round-rumored td { opacity: 0.82; font-style: italic; }
tr.round-rumored td strong { font-style: normal; }

/* Precedents list — rumored + footnotes */
.rumored-toggle {
  display: inline-block;
  cursor: pointer;
  margin-right: 0.35rem;
  color: #aaa;
  font-size: 0.95rem;
  line-height: 1;
  user-select: none;
  vertical-align: middle;
}
.rumored-toggle.on { color: #d97706; }
.rumored-toggle:hover { color: #d97706; }
tr.row-rumored td:not(.fc-actions) { opacity: 0.88; }
tr.row-rumored .row-link { font-style: italic; }

.footnote-marker {
  font-size: 0.72rem;
  margin-left: 0.2rem;
  color: #6b7280;
}
.footnote-marker a { color: inherit; text-decoration: none; }
.footnote-marker a:hover { text-decoration: underline; }

.footnotes {
  margin-top: 1.2rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 860px;
}
.footnotes-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 0.5rem;
}
.footnotes-list { padding-left: 1.4rem; margin: 0; }
.footnotes-list li { margin-bottom: 0.35rem; line-height: 1.45; }
.footnote-ref { font-weight: 500; color: var(--link, #1a56db); text-decoration: none; }
.footnote-ref:hover { text-decoration: underline; }
.note-marker { cursor: pointer; }

/* Companies list — expand row */
.co-expand-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 1px 3px;
  line-height: 1;
  border-radius: 3px;
  margin-right: 4px;
  vertical-align: middle;
  transition: background 0.1s, color 0.1s;
}
.co-expand-btn:hover { background: rgba(0,0,0,0.05); color: var(--text, #111); }
.co-expand-btn.open { color: var(--text, #111); }
tr.co-expand-row > td {
  background: rgba(0,0,0,0.015);
  border-top: 0;
  padding: 0.85rem 1rem;
}
.co-expand-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem 1.1rem;
}
.co-expand-field { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.co-expand-wide { grid-column: 1 / -1; }
.co-expand-k {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 500;
}
.co-expand-v {
  padding: 2px 4px;
  border-radius: 3px;
  cursor: pointer;
  min-height: 1.4em;
  word-break: break-word;
}
.co-expand-v:hover { background: rgba(0,0,0,0.04); }
.co-expand-links {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.25rem;
  padding-top: 0.4rem;
  border-top: 1px dashed var(--border);
}

/* forms */
.pdb-form-page { max-width: 760px; }
.pdb-form { background: white; border: 1px solid var(--border); border-radius: 6px; padding: 1.5rem; }
.pdb-form-inline { background: var(--accent-bg); border: 1px solid var(--border); border-radius: 6px; padding: 1.25rem; margin-top: 1rem; }

.form-section { margin-bottom: 1.5rem; }
.form-section-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
}
.form-grid-sm { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.form-field { display: flex; flex-direction: column; gap: 0.25rem; }
.form-field-wide { grid-column: 1 / -1; }
.form-field span { font-size: 0.78rem; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.form-field input, .form-field select, .form-field textarea {
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font: inherit;
  font-size: 0.9rem;
  background: white;
}
.form-field textarea { resize: vertical; font-size: 0.9rem; }
.pdb-form textarea { width: 100%; font: inherit; font-size: 0.9rem; padding: 0.45rem 0.6rem; border: 1px solid var(--border); border-radius: 4px; }
.form-actions { display: flex; gap: 0.75rem; align-items: center; margin-top: 1.5rem; }
.form-actions-sm { margin-top: 0.85rem; }

.add-form-details summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.88rem;
  padding: 0.5rem 0;
  user-select: none;
  list-style: none;
  margin-top: 0.75rem;
}
.add-form-details summary::before { content: "+ "; }
.add-form-details[open] summary::before { content: "− "; }
.pdb-inline-form { margin-top: 0.75rem; }

/* financials */
.fin-table td.fin-value { font-weight: 500; font-variant-numeric: tabular-nums; }
/* Excel-comment-style source indicator attached to the value */
.fin-src {
  display: inline-block;
  font-size: 0.65rem;
  vertical-align: super;
  margin-left: 2px;
  color: var(--accent);
  opacity: 0.55;
  text-decoration: none;
  line-height: 1;
}
.fin-src:hover { opacity: 1; }
.fin-src-text { cursor: default; }
.growth-badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.growth-pos { background: #dcfce7; color: #166534; }
.growth-neg { background: #fee2e2; color: #991b1b; }
.fin-link { color: var(--fg); text-decoration: none; border-bottom: 1px dotted var(--accent); }
.fin-link:hover { color: var(--accent); border-bottom-color: var(--accent); }
.metric-card-link { text-decoration: none; color: var(--fg); display: block; cursor: pointer; }
.metric-card-link:hover { border-color: var(--accent); background: var(--accent-bg); }
.metric-card-cta { font-size: 0.72rem; color: var(--accent); margin-top: 0.35rem; }
.pdb-title-sub { font-weight: 400; color: var(--muted); }
.pdb-hint { color: var(--muted); font-size: 0.88rem; margin-top: 0.5rem; }
.pdb-hint a { color: var(--accent); text-decoration: none; }
.pdb-hint a:hover { text-decoration: underline; }
.pdb-source { color: var(--muted); font-size: 0.82rem; margin-top: 2rem; }
.pdb-source a { color: var(--accent); }

/* ── Company detail — properties grid ───────────────────────── */
.co-h1 { cursor: pointer; }
.co-h1:hover { color: var(--accent); }

.co-props {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 2rem;
}
.co-prop {
  display: grid;
  grid-template-columns: 110px 1fr;
  border-bottom: 1px solid var(--border);
}
.co-prop:nth-child(odd)  { border-right: 1px solid var(--border); }
.co-prop:nth-last-child(-n+2) { border-bottom: 0; }
.co-prop-wide {
  grid-column: 1 / -1;
  border-right: 0 !important;
  border-bottom: 0 !important;
}
.co-prop-k {
  padding: 0.45rem 0.75rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: #f7f6f3;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
}
.co-prop-v {
  padding: 0.45rem 0.75rem;
  font-size: 0.88rem;
  cursor: pointer;
  min-height: 34px;
  display: flex;
  align-items: center;
}
.co-prop-v:hover { background: var(--accent-bg); }
.co-prop-wide .co-prop-v { align-items: flex-start; min-height: 52px; }
.co-prop-link { color: var(--accent); text-decoration: none; font-size: 0.82rem; word-break: break-all; }
.co-prop-link:hover { text-decoration: underline; }
/* active state for prop values */
.co-prop-v.co-cell-active { padding: 0 !important; display: block; }
.co-props .co-cell-input { padding: 0.45rem 0.75rem; font-size: 0.82rem; }
.co-props textarea.co-cell-input { resize: vertical; min-height: 52px; }

/* ── Companies table ─────────────────────────────────────────── */
.co-table { table-layout: fixed; }
/* 7 cols: Company, Description, Sector, ARR, Round, Valuation, Status */
.co-table th:nth-child(1), .co-table td:nth-child(1) { width: 14%; }
.co-table th:nth-child(2), .co-table td:nth-child(2) { width: 26%; }
.co-table th:nth-child(3), .co-table td:nth-child(3) { width: 10%; }
.co-table th:nth-child(4), .co-table td:nth-child(4) { width: 12%; }
.co-table th:nth-child(5), .co-table td:nth-child(5) { width: 13%; }
.co-table th:nth-child(6), .co-table td:nth-child(6) { width: 13%; }
.co-table th:nth-child(7), .co-table td:nth-child(7) { width: 9%; }
.co-desc-cell { color: var(--muted); font-size: 0.78rem; line-height: 1.35; }

/* date / source sub-line inside numeric cells */
.co-sub { display: block; font-size: 0.72rem; color: var(--muted); margin-top: 0.15rem; line-height: 1.3; }
.co-dash { color: var(--border); }
.co-inferred { color: var(--muted); font-style: italic; }

/* muted text cells */
.co-muted-cell { color: var(--muted); }

/* status badge: no stray left margin when standalone in a cell */
.co-table .status-badge { margin-left: 0; }
.co-status-cell { white-space: nowrap; }
.co-actions-cell { text-align: right; }

/* ── Inline editing ───────────────────────────────────────────── */
[data-editable] { cursor: pointer; position: relative; }
[data-editable]:hover { background: var(--accent-bg) !important; }

.co-cell-active {
  background: white !important;
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  padding: 0 !important;
  cursor: default;
}

.co-cell-input {
  display: block;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  color: var(--fg);
  padding: 0.32rem 0.65rem;
  min-width: 0;
}
select.co-cell-input { cursor: pointer; }

/* ── Add row ─────────────────────────────────────────────────── */
.co-add-row td { background: var(--bg); border-top: 1px dashed var(--border) !important; }
.co-add-row:hover td { background: var(--bg) !important; }
.co-add-row form { display: contents; }

.co-add-input {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0;
  outline: 0;
  -webkit-appearance: none;
}
.co-add-input:focus { color: var(--fg); }
.co-add-input::placeholder { color: var(--border); }
select.co-add-input { color: var(--muted); cursor: pointer; }
select.co-add-input:focus { color: var(--fg); }

.co-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: 4px;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  margin-left: auto;
}
.co-add-btn:hover { filter: brightness(1.1); }

/* ── Shared ──────────────────────────────────────────────────── */
.source-link { color: var(--accent); text-decoration: none; font-size: 0.76rem; }
.source-link:hover { text-decoration: underline; }
.edit-icon-link { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; padding: 0.2rem; border-radius: 3px; transition: color 0.1s, background 0.1s; }
.edit-icon-link:hover { color: var(--accent); background: var(--accent-bg); }

@media (max-width: 720px) {
  .pdb-header { flex-direction: column; }
  .metric-cards { gap: 0.75rem; }
  .metric-card { min-width: 0; flex: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .pdb-table th, .pdb-table td { padding: 0.45rem 0.6rem; }
}

/* ── Latest News block ───────────────────────────────────────── */
.pdb-collapsible > summary {
  cursor: pointer;
  list-style: none;
  padding: 0.5rem 0;
  user-select: none;
}
.pdb-collapsible > summary::-webkit-details-marker { display: none; }
.pdb-collapsible > summary::before {
  content: "−";
  display: inline-block;
  width: 1.1em;
  color: var(--muted);
  font-weight: 400;
}
.pdb-collapsible:not([open]) > summary::before { content: "+"; }

.news-block { padding: 0.25rem 0 0.5rem; }
.news-block-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0 0.75rem;
  font-size: 0.78rem;
}
.news-block-meta { color: var(--muted); }
.news-err { color: #c0392b; }
.news-just-refreshed { color: var(--accent); font-weight: 600; }

.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid #e3e3e0;
}
.news-item {
  padding: 0.6rem 0;
  border-bottom: 1px solid #e3e3e0;
}
.news-title {
  display: block;
  color: inherit;
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.35;
}
.news-title:hover { color: var(--accent); text-decoration: underline; }
.news-meta {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 0.2rem;
}
.news-source { font-weight: 500; }
.news-empty { padding: 0.75rem 0; font-size: 0.85rem; }

.htmx-indicator { opacity: 0; transition: opacity 0.15s; }
.htmx-request .htmx-indicator { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════════
   RESTRAINED layer — dot-paper background, Helvetica, mostly monochrome
   with lime + forest green. A few select playful objects, not full kook.
   ═══════════════════════════════════════════════════════════════════ */
:root { --dot: #dadada; --forest: #1b4d33; --lime: #c9f24d; --ink: #17241d; }

body {
  font-family: "Nimbus Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background-color: #fff;
  background-image: radial-gradient(circle, var(--dot) 1.1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { border-radius: 0 !important; box-shadow: none !important; }

/* Header + content sit on solid white so the dots read as a page margin */
header { background: #fff; border-bottom: 1px solid rgba(0,0,0,0.12); }
main { background: #fff; }

.logo { font-weight: 800; letter-spacing: -0.02em; }

/* Nav: clean monochrome, active = forest underline (no sticker boxes) */
.main-nav a, .main-nav a:hover, .main-nav a.active { background: none !important; }
.main-nav a { color: #17150F; font-weight: 600; position: relative; }
.main-nav a:hover { color: var(--ink); }
.main-nav a.active { color: var(--ink); font-weight: 700; }
.main-nav a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -0.85rem; height: 2px; background: var(--forest); }

/* Primary buttons: forest green */
button, .psk-btn-primary, .nav-search button {
  background: var(--forest) !important; color: #fff !important; border: 0 !important;
  font-weight: 600; text-decoration: none !important;
}

/* Hero: bold Helvetica; eyebrow = the one lime sticker (slight tilt) */
.psk-hero-title { font-weight: 800; color: var(--ink); letter-spacing: -0.028em; }
.psk-overline {
  display: inline-block; font-weight: 700; letter-spacing: 0.06em; color: var(--ink);
  background: var(--lime); padding: 0.18rem 0.6rem; transform: rotate(-2deg);
}

/* Fact rows: clean hairline rows, forest/lime marker (restrained) */
.psk-fact-grid { display: block; border-top: 1px solid rgba(0,0,0,0.1); }
.psk-fact-card {
  border: 0 !important; border-bottom: 1px solid rgba(0,0,0,0.1) !important;
  background: transparent !important; transform: none !important;
  padding: 1.15rem 0 1.15rem 1.1rem !important; position: relative;
  text-decoration: none !important; color: var(--ink) !important;
}
.psk-fact-card::before { content: ""; position: absolute; left: 0; top: 1.4rem; width: 7px; height: 7px; background: var(--forest); }
.psk-fact-round::before { background: var(--lime); box-shadow: none; outline: 1px solid var(--forest); }
.psk-fact-kicker { color: #17150F !important; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.psk-fact-title { color: var(--ink); font-weight: 600; }
.psk-fact-sub { color: #17150F; }
.psk-fact-card:hover .psk-fact-title { color: var(--forest); }

/* Filter chips: clean; active forest */
.psk-filter-active, .psk-filter-active:hover { background: var(--forest) !important; border-color: var(--forest) !important; color: #fff !important; }
.chip.active { background: var(--forest) !important; border-color: var(--forest) !important; color: #fff !important; }

/* Footlinks: lime underline accent */
.psk-footlinks { display: flex; flex-wrap: wrap; gap: 1.3rem; margin-top: 1.5rem; }
.psk-footlink, .ask-mode a { color: var(--forest); text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 3px; text-underline-offset: 3px; }

/* Filing/summary: clean rules, no cream box */
.filing-summary, .diff-summary, .ask-answer { background: transparent !important; border: 0 !important; border-top: 1px solid rgba(0,0,0,0.12) !important; padding: 1.3rem 0 !important; }
.filing-summary h1, .diff-summary h1, .section-title { font-weight: 800; color: var(--ink); }
.filing-summary li::marker, .diff-summary li::marker { color: var(--forest); }
th { color: #17150F; font-weight: 700; }

/* Dot paper is the whole page; dense data gets a white "sheet" for legibility */
main { background: transparent !important; }
.dash-table-wrap, table.filings, .xtable, .track-table, .filing-doc, .filing-body,
.psk-co-list, .compare-wrap, .tables-wrap { background: #fff; }

/* Filter chips: clean bordered pills on the dot paper */
.psk-filter, a.psk-filter { text-decoration: none !important; border: 1px solid rgba(0,0,0,0.16); background: #fff; color: #17150F; padding: 0.35rem 0.8rem; }
.psk-filter:hover { border-color: var(--ink); color: var(--ink); }
.psk-filter-count { color: inherit; }

/* Prose / empty-state links → forest green with lime underline */
.psk-empty a, main p a, .content a:not(.psk-btn):not(.psk-filter) { color: var(--forest); text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 2px; text-underline-offset: 2px; }

/* Warm cream paper (Jacky Boehm / Umi) + lime highlighter on emphasis words */
body { background-color: #f5f2e9 !important; }
:root { --dot: #d6d2c4; }
header { background: #f5f2e9 !important; border-bottom: 1px solid rgba(0,0,0,0.12); }
main { background: transparent !important; }
.dash-table-wrap, table.filings, .xtable, .track-table, .filing-doc, .filing-body,
.psk-co-list, .compare-wrap, .tables-wrap { background: #fffdf7; }

/* Umi-style lime highlighter — sits behind the text like a marker swipe */
.hl {
  background: linear-gradient(120deg, transparent 2%, var(--lime) 2%, var(--lime) 98%, transparent 98%);
  padding: 0.02em 0.12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* All one white (per sutera.ch) — revert the cream */
body { background-color: #fff !important; }
:root { --dot: #e6e6e6; }
header { background: #fff !important; }
.dash-table-wrap, table.filings, .xtable, .track-table, .filing-doc, .filing-body,
.psk-co-list, .compare-wrap, .tables-wrap { background: #fff; }

/* Floating tucked objects — subtle line-art doodles at angles */
.psk-page { position: relative; }
.doodles { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.doodle { position: absolute; opacity: 0.9; }
.d-star     { width: 30px; top: 0.2rem;  left: 210px; transform: rotate(12deg); }
.d-squiggle { width: 74px; top: 3.4rem;  right: 8%;   transform: rotate(-6deg); }
.d-plane    { width: 46px; top: 8.5rem;  right: 16%;  transform: rotate(8deg); }
.psk-hero, .psk-fact-grid, .psk-footlinks { position: relative; z-index: 1; }
@media (max-width: 900px) { .d-squiggle, .d-plane { display: none; } }

/* Reposition floating doodles into the hero whitespace, above content */
.doodles { z-index: 2; }
.d-star     { width: 32px; top: 0.6rem;  right: 54%; left: auto; transform: rotate(14deg); }
.d-squiggle { width: 82px; top: 5rem;    right: 17%; transform: rotate(-7deg); }
.d-plane    { width: 52px; top: 1.6rem;  right: 33%; transform: rotate(9deg); }
@media (max-width: 900px) { .doodles { display: none; } }

/* Real tucked objects (replace doodles) — money roll + carved dragon pillar */
.obj { position: absolute; display: block; }
.obj-money  { width: 150px; top: 1.4rem;  right: 27%; transform: rotate(-9deg); mix-blend-mode: multiply; }
.obj-pillar { height: 300px; width: auto;  top: -0.4rem; right: 8%; transform: rotate(4deg); }
@media (max-width: 1000px) { .doodles { display: none; } }

/* Dot paper EVERYWHERE — no white banners; dots darker, smaller, further apart */
body { background-color: #fff !important; background-image: radial-gradient(circle, #c4c4c4 0.9px, transparent 1px) !important; background-size: 30px 30px !important; }
header, main, .psk-page,
.dash-table-wrap, table.filings, .xtable, .track-table, .filing-doc, .filing-body,
.psk-co-list, .compare-wrap, .tables-wrap { background: transparent !important; }
header { border-bottom: 1px solid rgba(0,0,0,0.14); }

/* ── Search-first Brief ──────────────────────────────────────── */
.brief-search { max-width: 700px; margin: 1.6rem 0 2.6rem; position: relative; z-index: 1; }
.brief-search-input {
  width: 100%; font-size: 1.15rem; font-weight: 500;
  padding: 0.95rem 1.15rem; border: 2px solid var(--ink); background: #fff;
  font-family: "Nimbus Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; color: var(--ink);
}
.brief-search-input:focus { outline: none; border-color: var(--forest); }
.brief-scope { font-size: 0.72rem; color: #17150F; margin-top: 0.5rem; letter-spacing: 0.05em; text-transform: uppercase; }
.brief-results { margin-top: 0.9rem; background: #fff; }
.brief-results:empty { display: none; }
.brief-results .ac-item {
  display: flex; align-items: baseline; gap: 0.85rem; padding: 0.65rem 0.4rem;
  border-bottom: 1px solid rgba(0,0,0,0.08); text-decoration: none; color: var(--ink);
}
.brief-results .ac-item:hover { background: #f6f9f2; }
.brief-results .ac-divider {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700;
  color: #17150F; margin: 1.1rem 0 0.35rem;
}
.brief-results .ac-empty { color: #17150F; padding: 0.8rem 0.4rem; font-size: 0.9rem; }
.brief-results .ac-tkr { font-weight: 700; min-width: 58px; font-size: 0.85rem; }
.brief-results .ac-name { color: var(--ink); }
.ac-priv, .ac-fund { background: var(--forest); color: #fff !important; font-size: 0.62rem; font-weight: 700; padding: 0.08rem 0.4rem; letter-spacing: 0.04em; min-width: 0 !important; }
.brief-notable { margin-top: 2rem; position: relative; z-index: 1; }
.brief-notable .section-title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: #17150F; font-weight: 700; margin-bottom: 0.4rem; }

/* Eyebrow labels flat (no tilt); lime reserved ONLY for the highlighter */
.psk-overline { background: transparent !important; box-shadow: none !important; transform: none !important; padding: 0 !important; color: #17150F !important; font-weight: 700; letter-spacing: 0.13em; }
.psk-fact-round::before { background: var(--forest) !important; outline: none !important; }
.psk-footlink, .ask-mode a, .psk-empty a, main p a { text-decoration-color: var(--forest) !important; }
.filing-summary li::marker, .diff-summary li::marker { color: var(--forest) !important; }

/* Nav: all labels black always; active = tight underline in the font color */
.main-nav a, .main-nav a:hover, .main-nav a.active { color: var(--ink) !important; }
.main-nav a { font-weight: 600; }
.main-nav a.active { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--ink); }
.main-nav a.active::after { display: none !important; }

/* Remove the little gray eyebrow labels (Brief / Coverage / Comps) on each page */
.psk-overline { display: none !important; }

/* Hero layout restored: title left, action button right, aligned */
.psk-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; padding: 1.6rem 0 0.5rem; border: none !important; }
.psk-hero > div:first-child { flex: 1 1 auto; min-width: 0; }
.psk-hero-actions { flex: 0 0 auto; padding-top: 0.4rem; }
.psk-hero-sub { color: #17150F; font-size: 0.9rem; margin: 0.5rem 0 0; }
.psk-hero-tight { padding: 1rem 0 0.3rem; }
.psk-filter-row { margin: 0.4rem 0 1.4rem; border: none !important; }

/* Top menu bar: remove gray borders (header line + search box → clean underline) */
header { border-bottom: none !important; }
.nav-search input {
  border: none !important; border-bottom: 1.5px solid var(--ink) !important; border-radius: 0 !important;
  background: transparent !important; box-shadow: none !important; padding: 0.45rem 0.2rem !important;
}

/* Keep the hero action button next to the title, not flung to the far edge */
.psk-hero { justify-content: flex-start !important; }
.psk-hero > div:first-child { flex: 0 1 auto !important; }
.psk-hero-actions { padding-top: 0.5rem; }

/* ══════════════════════════════════════════════════════════════════════
   APP SHELL — persistent left sidebar (Plain Signal structure, Ten Key ink)
   Authoritative. Supersedes the old top menu bar. v64.
   ══════════════════════════════════════════════════════════════════════ */

:root { --sb-w: 250px; }

/* Fixed sidebar + offset content. Body keeps the dot paper; the sidebar
   sits on solid white so its rows read cleanly against the page margin. */
body.app .sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sb-w);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.9rem 0.7rem 0.8rem;
  background: #fff;
  border-right: 1px solid rgba(0,0,0,0.12);
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 120;
}
body.app .app-main {
  margin-left: var(--sb-w);
  padding: 1.4rem 1.9rem 4rem;
  min-height: 100vh;
}
body.app main { padding: 1.4rem 1.9rem 4rem; }  /* keep in sync if class drops */

/* Brand */
.sb-brand {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.25rem 0.5rem 0.9rem;
  font-weight: 800; font-size: 1.12rem; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.sb-brand-mark { display: inline-flex; align-items: flex-end; gap: 2px; height: 17px; }
.sb-brand-mark i { width: 3px; background: var(--forest); display: block; }
.sb-brand-mark i:nth-child(1) { height: 9px; }
.sb-brand-mark i:nth-child(2) { height: 17px; }
.sb-brand-mark i:nth-child(3) { height: 6px; }
.sb-brand-mark i:nth-child(4) { height: 13px; }

/* Sidebar search */
.sb-search { position: relative; margin: 0 0.15rem 0.7rem; }
.sb-search-ico { position: absolute; left: 0.55rem; top: 50%; transform: translateY(-50%); color: #17150F; pointer-events: none; }
.sb-search input {
  width: 100%;
  padding: 0.5rem 0.6rem 0.5rem 1.85rem;
  font: inherit; font-size: 0.86rem;
  color: var(--ink);
  background: #f4f4f1;
  border: 1px solid transparent !important;
}
.sb-search input::placeholder { color: #17150F; }
.sb-search input:focus-visible {
  outline: none;
  background: #fff;
  border-color: var(--forest) !important;
  box-shadow: 0 0 0 3px rgba(27,77,51,0.10) !important;
}
.sb-ac {
  position: absolute; top: calc(100% + 5px); left: 0; right: 0;
  background: #fff; border: 1px solid rgba(0,0,0,0.14);
  z-index: 40; max-height: 60vh; overflow-y: auto;
}
.sb-ac:empty { display: none; }
.sb-ac .ac-item { grid-template-columns: 54px minmax(0,1fr); gap: 0.5rem; font-size: 0.82rem; padding: 0.45rem 0.6rem; }
.sb-ac .ac-item:hover { background: var(--accent-bg); }

/* Primary nav */
.sb-nav { display: flex; flex-direction: column; gap: 1px; margin-bottom: 0.35rem; }
.sb-link {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.5rem 0.6rem;
  color: #17150F; font-weight: 600; font-size: 0.9rem;
  text-decoration: none !important;
  position: relative;
}
.sb-link svg { width: 18px; height: 18px; flex: 0 0 18px; color: #17150F; }
.sb-link:hover { background: #f4f4f1; color: var(--ink); }
.sb-link:hover svg { color: var(--ink); }
.sb-link.active { color: var(--ink); font-weight: 700; background: var(--accent-bg); }
.sb-link.active svg { color: var(--forest); }
.sb-link.active::before {
  content: ""; position: absolute; left: 0; top: 0.35rem; bottom: 0.35rem;
  width: 2.5px; background: var(--forest);
}

/* Grouped lists (Favorites / Recent) */
.sb-group { margin-top: 0.85rem; }
.sb-group-label {
  padding: 0 0.6rem 0.35rem;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.11em;
  text-transform: uppercase; color: #17150F;
}
.sb-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.4rem 0.6rem;
  color: #17150F; font-size: 0.86rem; font-weight: 500;
  text-decoration: none !important;
}
.sb-item:hover { background: #f4f4f1; color: var(--ink); }
.sb-item.active { background: var(--accent-bg); color: var(--ink); font-weight: 600; }
.sb-item-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-ava {
  flex: 0 0 20px; width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.62rem; font-weight: 700; letter-spacing: -0.02em;
  color: #fff; background: var(--ink);
}
.sb-ava-fav { background: var(--forest); }
.sb-ava-company { background: var(--forest); }
.sb-ava-filing { background: #2b2b2b; }

/* Footer utilities pinned to the bottom */
.sb-foot { margin-top: auto; padding-top: 0.7rem; border-top: 1px solid rgba(0,0,0,0.09); }
.sb-foot-link {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  color: #17150F; font-weight: 600; font-size: 0.85rem;
  text-decoration: none !important;
}
.sb-foot-link svg { width: 16px; height: 16px; color: #17150F; }
.sb-foot-link:hover { color: var(--forest); }
.sb-foot-link:hover svg { color: var(--forest); }

/* Mobile drawer */
.sb-toggle {
  display: none;
  position: fixed; top: 0.7rem; left: 0.7rem; z-index: 130;
  width: 38px; height: 38px; align-items: center; justify-content: center;
  background: #fff !important; color: var(--ink) !important;
  border: 1px solid rgba(0,0,0,0.15) !important;
}
.sb-scrim { display: none; }

@media (max-width: 880px) {
  body.app .sidebar { transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: none; }
  body.app.sb-open .sidebar { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,0.18) !important; }
  body.app .app-main, body.app main { margin-left: 0; padding-top: 3.6rem; }
  .sb-toggle { display: inline-flex; }
  body.app.sb-open .sb-scrim {
    display: block; position: fixed; inset: 0; z-index: 110;
    background: rgba(0,0,0,0.32);
  }
}

/* ══════════════════════════════════════════════════════════════════════
   COMPANY PAGE — editorial styling for the redesigned hero + sections.
   These classes shipped in markup with no CSS; the global reset left them
   bare. Squared, hairline, forest/ink — matches the shell. v64.
   ══════════════════════════════════════════════════════════════════════ */

.pdb-page { max-width: 940px; }

/* Hero */
.psk-co-hero {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1.5rem; padding: 0.4rem 0 1.4rem; margin-bottom: 1.6rem;
  border-bottom: 1px solid rgba(0,0,0,0.12);
}
.psk-co-hero-main { display: flex; align-items: flex-start; gap: 1rem; min-width: 0; }
.psk-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--forest); color: #fff;
  font-weight: 800; letter-spacing: -0.02em; flex: 0 0 auto;
}
.psk-avatar-lg { width: 52px; height: 52px; font-size: 1.5rem; }
.psk-co-hero-text { min-width: 0; }
.psk-co-hero-name {
  font-size: 2rem; font-weight: 800; letter-spacing: -0.03em;
  color: var(--ink); margin: 0.1rem 0 0; line-height: 1.05;
}
.psk-co-hero-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.7rem 0 0; }
.psk-chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.55rem; font-size: 0.78rem; font-weight: 600;
  color: #17150F; background: #f4f4f1; border: 1px solid rgba(0,0,0,0.08);
}
.psk-chip-warn { background: #fbeee6; border-color: #E4571B; color: #9c3a11; }
.psk-co-hero-desc { color: #17150F; margin: 0.8rem 0 0; max-width: 62ch; }
.psk-co-hero-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 0; }
.psk-pill-link {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.3rem 0.7rem; font-size: 0.82rem; font-weight: 600;
  color: var(--forest) !important; background: #fff;
  border: 1px solid rgba(27,77,51,0.28);
  text-decoration: none !important;
}
.psk-pill-link:hover { background: var(--accent-bg); border-color: var(--forest); }
.psk-co-hero-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 0.5rem; }
.psk-btn-danger {
  background: #fff !important; color: #9c2b1a !important;
  border: 1px solid rgba(156,43,26,0.35) !important; font-weight: 600;
  padding: 0.4rem 0.85rem;
}
.psk-btn-danger:hover { background: #fbeee6 !important; }
.psk-btn-sm { font-size: 0.82rem; }

/* Collapsible "Edit properties" */
.psk-collapse { margin: 0 0 1.6rem; border: 1px solid rgba(0,0,0,0.12); }
.psk-collapse > summary {
  cursor: pointer; padding: 0.6rem 0.9rem; font-weight: 600; font-size: 0.85rem;
  color: #17150F; background: #f4f4f1; list-style: none;
}
.psk-collapse > summary::-webkit-details-marker { display: none; }
.psk-collapse > summary::before { content: "▸ "; color: #17150F; }
.psk-collapse[open] > summary::before { content: "▾ "; }
.psk-collapse .co-props { padding: 1rem 0.9rem; }

/* Section cards (news, etc.) */
.psk-card { margin: 0 0 1.6rem; }
.psk-card-head {
  display: flex; align-items: baseline; gap: 0.6rem;
  padding-bottom: 0.5rem; margin-bottom: 0.9rem;
  border-bottom: 1px solid rgba(0,0,0,0.12);
}
.psk-card-head h2 { font-size: 1.05rem; font-weight: 800; color: var(--ink); margin: 0; letter-spacing: -0.02em; }
.psk-card-sub { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: #17150F; }

/* Section titles for tables (Rounds / M&A / IPO) */
.pdb-section { margin: 0 0 1.6rem; }
.pdb-section .section-header { padding-bottom: 0.5rem; margin-bottom: 0.9rem; border-bottom: 1px solid rgba(0,0,0,0.12); }
.pdb-section .section-title { font-size: 1.05rem; font-weight: 800; color: var(--ink); margin: 0; letter-spacing: -0.02em; }

/* Metric tiles — squared, hairline, forest number */
.metric-cards { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 1.6rem; border: 1px solid rgba(0,0,0,0.12); }
.metric-card {
  flex: 1 1 150px; min-width: 150px; padding: 0.9rem 1rem;
  border-right: 1px solid rgba(0,0,0,0.1); background: #fff;
  text-decoration: none !important; color: var(--ink) !important;
}
.metric-card:last-child { border-right: 0; }
.metric-card-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #17150F; }
.metric-card-value { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); margin-top: 0.2rem; font-variant-numeric: tabular-nums; }
.metric-card-cta { font-size: 0.75rem; color: var(--forest); margin-top: 0.35rem; }
.metric-card-link:hover .metric-card-value { color: var(--forest); }
.muted-sm { color: #17150F; font-weight: 400; font-size: 0.85em; }

/* Add-round form: quieter when open */
.add-form-details { border-top: 1px solid rgba(0,0,0,0.1); margin-top: 0.4rem; }
.add-form-details > summary {
  cursor: pointer; padding: 0.6rem 0; font-weight: 600; font-size: 0.85rem; color: var(--forest);
  list-style: none;
}
.add-form-details > summary::-webkit-details-marker { display: none; }
.pdb-hint { color: #17150F; }
.pdb-hint a { color: var(--forest); }

/* ══════════════════════════════════════════════════════════════════════
   S&P 500 EARNINGS CALENDAR (Brief) — sector-toggled agenda. v65.
   ══════════════════════════════════════════════════════════════════════ */

.brief-earnings { margin-top: 2.6rem; max-width: 760px; position: relative; z-index: 1; }

.earn-head { display: flex; align-items: baseline; gap: 0.6rem; }
.earn .section-title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: #17150F; font-weight: 700; }
.earn-sub { font-size: 0.78rem; color: #17150F; }

/* Sector filter chips */
.earn-filters { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.7rem 0 1.1rem; }
.earn-chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.28rem 0.6rem; font-size: 0.78rem; font-weight: 600;
  color: #17150F; background: #fff; border: 1px solid rgba(0,0,0,0.16);
  text-decoration: none !important; cursor: pointer;
}
.earn-chip:hover { border-color: var(--ink); color: var(--ink); }
.earn-chip.active { background: var(--forest); border-color: var(--forest); color: #fff; }
.earn-chip-n { font-size: 0.7rem; opacity: 0.7; font-variant-numeric: tabular-nums; }
.earn-chip.active .earn-chip-n { opacity: 0.85; }

/* Agenda: one block per day, hairline separated */
.earn-cal { border-top: 1px solid rgba(0,0,0,0.12); }
.earn-day { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 1rem;
  padding: 0.85rem 0; border-bottom: 1px solid rgba(0,0,0,0.1); }
.earn-day-head { position: sticky; top: 0.5rem; align-self: start; }
.earn-dow { display: block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #17150F; }
.earn-date { display: block; font-size: 0.98rem; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; }
.earn-today { color: var(--forest); }
.earn-day-count { display: inline-block; margin-top: 0.2rem; font-size: 0.7rem; color: #17150F; font-variant-numeric: tabular-nums; }

.earn-rows { display: flex; flex-direction: column; }
.earn-row {
  display: flex; align-items: baseline; gap: 0.6rem;
  padding: 0.28rem 0; text-decoration: none !important; color: var(--ink);
}
.earn-row:hover .earn-tkr { color: var(--forest); }
.earn-row:hover .earn-name { color: var(--ink); }
.earn-tkr { flex: 0 0 62px; font-weight: 700; font-size: 0.85rem; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.earn-name { flex: 1 1 auto; min-width: 0; color: #17150F; font-size: 0.87rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.earn-tag { flex: 0 0 auto; font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #17150F; }
.earn-est { flex: 0 0 auto; font-size: 0.72rem; color: #17150F; font-variant-numeric: tabular-nums; }

.earn-empty { padding: 1.4rem 0; color: #17150F; border-top: 1px solid rgba(0,0,0,0.12); font-size: 0.9rem; }
.earn-empty code { background: #f4f4f1; padding: 0.05rem 0.3rem; font-size: 0.85em; }

@media (max-width: 560px) {
  .earn-day { grid-template-columns: 1fr; gap: 0.4rem; }
  .earn-day-head { position: static; }
  .earn-tag { display: none; }
}

/* ── Earnings: month grid + selected-day strip (v66) ── */
.earn-grid { margin-top: 0.4rem; border: 1px solid rgba(0,0,0,0.14); border-bottom: 0; }
.earn-grid-dow { display: grid; grid-template-columns: repeat(7, 1fr); background: #f4f4f1; }
.earn-grid-dow span {
  padding: 0.35rem 0.55rem; font-size: 0.66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; color: #17150F;
  border-bottom: 1px solid rgba(0,0,0,0.12);
}
.earn-grid-row { display: grid; grid-template-columns: repeat(7, 1fr); }
.earn-cell {
  position: relative; min-height: 62px; padding: 0.4rem 0.5rem;
  border-bottom: 1px solid rgba(0,0,0,0.1); border-right: 1px solid rgba(0,0,0,0.1);
  display: flex; flex-direction: column; justify-content: space-between;
  background: #fff; text-decoration: none !important; color: var(--ink);
}
.earn-grid-row > .earn-cell:nth-child(7n) { border-right: 0; }
.earn-cell-num { font-size: 0.82rem; font-weight: 600; color: #17150F; font-variant-numeric: tabular-nums; }
.earn-cell-num b { color: var(--ink); font-weight: 800; }
.earn-cell.past { background: #fbfbfa; }
.earn-cell.past .earn-cell-num { color: #17150F; }
.earn-cell.today .earn-cell-num { color: var(--forest); font-weight: 800; }
.earn-cell.today::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--forest);
}
.earn-cell.has-earnings { cursor: pointer; }
.earn-cell.has-earnings:hover { background: var(--accent-bg); }
.earn-cell-badge {
  align-self: flex-start; min-width: 20px; text-align: center;
  padding: 0.08rem 0.35rem; font-size: 0.72rem; font-weight: 700;
  background: var(--forest); color: #fff; font-variant-numeric: tabular-nums;
}
.earn-cell.selected { background: var(--accent-bg); box-shadow: inset 0 0 0 2px var(--forest) !important; }
.earn-cell.selected .earn-cell-num { color: var(--forest); font-weight: 800; }

/* Selected-day detail strip */
.earn-selected { border: 1px solid rgba(0,0,0,0.14); border-top: 0; padding: 0.9rem 1rem 1rem; background: #fff; }
.earn-sel-head { font-size: 0.95rem; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; margin-bottom: 0.5rem; display: flex; align-items: baseline; gap: 0.55rem; }
.earn-sel-count { font-size: 0.72rem; font-weight: 600; color: #17150F; text-transform: uppercase; letter-spacing: 0.06em; }
.earn-sel-empty { font-weight: 500; color: #17150F; }

@media (max-width: 560px) {
  .earn-cell { min-height: 48px; padding: 0.3rem 0.35rem; }
  .earn-cell-num { font-size: 0.72rem; }
  .earn-tag { display: none; }
}

/* ── Favorite (star) toggle ── */
.fav-form { display: inline-block; margin: 0; }
.fav-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.32rem 0.7rem; font-size: 0.82rem; font-weight: 600;
  background: #fff !important; color: #17150F !important;
  border: 1px solid rgba(0,0,0,0.18) !important; cursor: pointer;
}
.fav-btn:hover { border-color: var(--forest) !important; color: var(--forest) !important; }
.fav-btn .fav-star { font-size: 0.95rem; line-height: 1; color: #17150F; }
.fav-btn:hover .fav-star { color: var(--forest); }
.fav-btn.fav-on {
  background: var(--accent-bg) !important; color: var(--forest) !important;
  border-color: var(--forest) !important;
}
.fav-btn.fav-on .fav-star { color: var(--forest); }

/* ══════════════════════════════════════════════════════════════════════
   LIST TABLES — Coverage + Comps (fundraise / M&A / IPO). These psk-co-*
   / psk-deal-* grids shipped in markup with no CSS, so the <ul> collapsed
   to raw bullets. Editorial data-grid: hairline rows, forest avatars. v66.
   ══════════════════════════════════════════════════════════════════════ */

/* List-page hero: title left, action pinned right */
.psk-hero-editorial { justify-content: space-between !important; align-items: flex-start; }
.psk-hero-editorial > div:first-child { flex: 1 1 auto !important; }
.psk-hero-editorial .psk-hero-actions { flex: 0 0 auto; }

/* Precedent tabs (Fundraise / M&A / IPO) */
.psk-precedent-tabs { display: flex; gap: 0.4rem; margin-bottom: 1.4rem; }
.psk-precedent-tabs a {
  padding: 0.4rem 0.85rem; font-size: 0.86rem; font-weight: 600;
  color: #17150F; background: #fff; border: 1px solid rgba(0,0,0,0.16);
  text-decoration: none !important;
}
.psk-precedent-tabs a:hover { border-color: var(--ink); color: var(--ink); }
.psk-precedent-tabs a.active,
.psk-precedent-tabs a[aria-current="page"] { background: var(--forest); border-color: var(--forest); color: #fff; }

/* Card wrapper + grid head */
.psk-table-card { border: 1px solid rgba(0,0,0,0.14); background: #fff; margin-top: 0.4rem; }
.psk-table-head {
  display: grid; gap: 0.8rem; align-items: center;
  padding: 0.55rem 0.9rem; border-bottom: 1px solid rgba(0,0,0,0.14);
  background: #f4f4f1;
}
.psk-th { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: #17150F; }
.psk-th-num { text-align: right; }
.psk-th-date { text-align: right; }

/* Rows */
.psk-co-list { list-style: none; margin: 0; padding: 0; }
.psk-co-row {
  display: grid; gap: 0.8rem; align-items: center;
  padding: 0.6rem 0.9rem; border-bottom: 1px solid rgba(0,0,0,0.08);
}
.psk-co-list > li:last-child { border-bottom: 0; }
.psk-co-row:hover { background: #fafaf8; }
.row-rumored, .round-rumored { opacity: 0.72; }

/* Grid templates (head + row share the same columns) */
.psk-co-head-wide, .psk-co-row-wide {
  grid-template-columns: minmax(0,2.3fr) 0.8fr 1.2fr 0.9fr minmax(0,1.9fr) 0.9fr;
}
.psk-deal-head-fundraise, .psk-deal-row-fundraise {
  grid-template-columns: minmax(0,1.9fr) 1.2fr 1.3fr 0.9fr 0.95fr 0.85fr 0.7fr 0.75fr 1.1fr;
}
.psk-deal-head-ma, .psk-deal-row-ma {
  grid-template-columns: minmax(0,1.7fr) 1.4fr 0.95fr 0.8fr 0.8fr 0.85fr 1fr;
}
.psk-deal-head-ipo, .psk-deal-row-ipo {
  grid-template-columns: minmax(0,1.7fr) 0.95fr 0.95fr 0.8fr 0.8fr 0.9fr 0.85fr 1fr;
}

/* Company cell */
.psk-co-cell { display: flex; align-items: center; gap: 0.6rem; min-width: 0; text-decoration: none !important; color: var(--ink); }
.psk-co-cell .psk-avatar { width: 26px; height: 26px; font-size: 0.78rem; flex: 0 0 26px; }
.psk-avatar-portco { background: #b8860b !important; }
.psk-co-name-wrap { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.psk-co-name { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 0.3rem; }
.psk-co-cell:hover .psk-co-name { color: var(--forest); }
.psk-portco-mark { color: #b8860b; font-size: 0.8rem; }
.psk-cell-sub { font-size: 0.72rem; color: #17150F; }

/* Data cells */
.psk-num-cell { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-size: 0.87rem; }
.psk-text-cell { color: #17150F; font-size: 0.87rem; min-width: 0; }
.psk-date-cell { text-align: right; color: #17150F; font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.psk-dash { color: #17150F; }
.hi-multiple { color: var(--orange); font-weight: 700; }

/* Small chips inside cells */
.psk-chip-sm {
  display: inline-block; padding: 0.08rem 0.4rem; font-size: 0.68rem; font-weight: 600;
  color: #17150F; background: #f0f0ec; border: 1px solid rgba(0,0,0,0.07); white-space: nowrap;
}
.psk-chip-sm-warn { color: #9c3a11; background: #fbeee6; border-color: rgba(228,87,27,0.3); }
.deal-type-tag { color: var(--forest); background: var(--accent-bg); border-color: rgba(27,77,51,0.2); }
.subsector-tags { display: inline-flex; flex-wrap: wrap; gap: 0.2rem; }
.subsector-pill { padding: 0.05rem 0.35rem; font-size: 0.66rem; background: #f0f0ec; color: #17150F; }
.subsector-empty { color: #17150F; font-size: 0.72rem; cursor: pointer; }

/* News cell */
.psk-news-cell { min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.psk-news-headline { color: var(--ink); font-size: 0.82rem; text-decoration: none !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psk-news-headline:hover { color: var(--forest); text-decoration: underline !important; }
.psk-news-source { font-size: 0.7rem; color: #17150F; }
.psk-news-empty { color: #17150F; font-size: 0.8rem; }

/* Inline edit + row actions */
.psk-name-edit { cursor: text; }
.psk-inline-view { font-size: 0.72rem; color: var(--forest); text-decoration: none !important; margin-left: 0.25rem; }
.psk-inline-view:hover { text-decoration: underline !important; }
.rumored-toggle { cursor: pointer; color: #b8860b; font-size: 0.82rem; }
.rumored-toggle:not(.on) { color: #17150F; }
.psk-row-actions { display: flex; align-items: center; gap: 0.4rem; justify-content: flex-end; font-size: 0.72rem; }
.psk-row-actions a, .psk-row-actions button { font-size: 0.72rem; color: #17150F; background: none !important; border: 0 !important; padding: 0.1rem 0.2rem; cursor: pointer; text-decoration: none !important; }
.psk-row-actions a:hover { color: var(--forest); }
.footnote-marker a { color: var(--forest); text-decoration: none !important; }

/* Empty state */
.psk-empty { padding: 2rem 0; color: #17150F; }
.psk-empty a { color: var(--forest); }

@media (max-width: 820px) {
  .psk-table-head { display: none; }
  .psk-co-row { grid-template-columns: 1fr 1fr !important; gap: 0.3rem 0.8rem; }
  .psk-co-cell { grid-column: 1 / -1; }
}

/* ══════════════════════════════════════════════════════════════════════
   CONSISTENT PAGE-TITLE POSITION — every page's <h1> starts at the same
   spot (same top offset, same left edge). v68.
   ══════════════════════════════════════════════════════════════════════ */

/* Left-align all page wrappers (kill the centered margins) so the title's
   left edge is always the main padding, never viewport-centered. */
.psk-page, .pdb-page, .search-results {
  max-width: 1120px;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Same top offset for the first title block on every page */
.psk-hero, .psk-hero-tight, .psk-hero-editorial { padding-top: 0.35rem !important; padding-bottom: 0.55rem !important; }
.psk-co-hero { padding-top: 0.35rem !important; }
.search-results { padding-top: 0.35rem !important; }

/* Zero the intrinsic h1 margins so only the wrapper padding sets position */
.psk-hero-title, .psk-co-hero-name { margin: 0 !important; }
.search-results > h1 { margin-top: 0 !important; }

/* Unify the title look: same size + weight across pages */
.psk-hero-title, .psk-co-hero-name, .search-results h1 {
  font-size: 1.9rem; font-weight: 800; letter-spacing: -0.028em; line-height: 1.1;
}
@media (max-width: 640px) {
  .psk-hero-title, .psk-co-hero-name, .search-results h1 { font-size: 1.5rem; }
}

/* ══════════════════════════════════════════════════════════════════════
   MONOCHROMATIC + SIDEBAR COLLAPSE. v69.
   All text is now near-black. Keep two functional exceptions light:
   input placeholders and "de-emphasis via opacity" (not gray).
   ══════════════════════════════════════════════════════════════════════ */

:root { --muted: #17150F; }

/* Placeholders stay a light gray so inputs don't look pre-filled */
input::placeholder, textarea::placeholder { color: #b3b3ad !important; }

/* Calendar: past / empty days dim via opacity, not gray (still black text) */
.earn-cell.past { opacity: 0.4; }
.earn-cell.past .earn-cell-num { color: var(--ink); }
.psk-dash, .earn-cell:not(.has-earnings) .earn-cell-num { opacity: 0.5; }

/* ── Sidebar hide / show ── */
.sidebar { transition: transform 0.18s ease; }
.sb-collapse {
  position: absolute; top: 0.85rem; right: 0.55rem;
  width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent !important; color: var(--ink) !important;
  border: 1px solid rgba(0,0,0,0.14) !important; cursor: pointer; padding: 0;
}
.sb-collapse:hover { background: #f4f4f1 !important; }

/* Floating "show" button (shared with the mobile hamburger) */
.sb-toggle { background: #fff !important; color: var(--ink) !important; border: 1px solid rgba(0,0,0,0.16) !important; }

@media (min-width: 881px) {
  body.sb-collapsed .sidebar { transform: translateX(-100%); }
  body.sb-collapsed .app-main, body.sb-collapsed main {
    margin-left: 0;
    padding-left: 5.75rem;
  }
  .sb-toggle { display: none; }               /* hidden on desktop unless collapsed */
  body.sb-collapsed .sb-toggle { display: inline-flex; }
}
@media (max-width: 880px) {
  .sb-collapse { display: none; }              /* mobile uses the scrim + hamburger */
}

/* ══════════════════════════════════════════════════════════════════════
   v70 — cream canvas · tiny sparse dots · all-black text · sentence case
   · no neon highlight · no objects · panels blended into the cream.
   ══════════════════════════════════════════════════════════════════════ */

/* Warm cream page with small, widely-spaced dots */
body {
  background-color: #F2F2EB !important;
  background-image: radial-gradient(circle, #D8D5C8 0.6px, transparent 0.7px) !important;
  background-size: 46px 46px !important;
}

/* Objects off (belt + suspenders with the markup removal) */
.doodles, .obj, .doodle { display: none !important; }

/* Neon highlight off — plain black text */
.hl { background: none !important; padding: 0 !important; }

/* Panels dissolve into the cream; structure stays via hairlines */
.sidebar, .psk-table-card, .metric-cards, .metric-card, .psk-card,
.earn-grid, .earn-grid-dow, .earn-cell, .earn-cell.past, .earn-selected,
.sb-ac, .ac-dropdown, .brief-results, .psk-collapse > summary, .add-form-details,
.psk-co-row:hover, .sb-link:hover, .sb-item:hover, .sb-foot-link:hover,
.sb-link.active, .sb-item.active, .earn-cell.has-earnings:hover, .earn-cell.selected {
  background: transparent !important;
}
/* Inputs + chips keep a faint cream fill / hairline so they read as controls */
.sb-search input, .brief-search-input { background: #E9E7DA !important; }
.psk-chip, .psk-chip-sm, .deal-type-tag, .subsector-pill,
.psk-filter:not(.psk-filter-active) {
  background: transparent !important; border: 1px solid rgba(0,0,0,0.16) !important;
}

/* Everything is black text + sentence case + normal tracking */
body, body *:not(svg):not(path):not(i) {
  color: #17150F !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}
a { text-decoration-color: #17150F !important; }
.sb-brand-mark i { background: #17150F !important; }   /* logo mark → black */

/* Restore legible light text ONLY where it sits on a dark/forest fill */
.psk-btn-primary, .nav-search button, .sb-search button,
button:not(.psk-btn-danger):not(.fav-btn):not(.sb-collapse):not(.sb-toggle):not(.earn-chip),
.sb-ava, .psk-avatar, .psk-avatar-lg,
.earn-cell-badge, .psk-filter-active, .chip.active,
.psk-precedent-tabs a.active,
.psk-btn-primary *, .earn-chip.active *, .psk-filter-active * {
  color: #fff !important;
}

/* ── v71: darker dots + active menu item = tight underline (no border) ── */
body {
  background-image: radial-gradient(circle, #C4C0AD 0.6px, transparent 0.7px) !important;
}

/* Kill the forest left-bar / border on active nav; underline the label instead */
.sb-link.active::before { display: none !important; }
.sb-link.active, .sb-item.active { background: transparent !important; }
.sb-link.active .sb-nav-txt,
.sb-item.active .sb-item-label {
  text-decoration: underline !important;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: #17150F !important;
}
/* active nav icon also black (was forest) */
.sb-link.active svg, .sb-foot-link:hover svg { color: #17150F !important; }

/* ══════════════════════════════════════════════════════════════════════
   v72 — design QA: resolve the live surface collisions.
   Search rests quietly, rows read as rows, forms match the shell, and
   mobile controls keep their affordance on the dotted canvas.
   ══════════════════════════════════════════════════════════════════════ */

:root {
  --tk-paper: #F2F2EB;
  --tk-control: #ECECE3;
  --tk-control-hover: #E6E6DA;
  --tk-line: rgba(23, 21, 15, 0.18);
  --tk-line-strong: rgba(23, 21, 15, 0.36);
}

.brief-search { max-width: 720px; margin: 1.35rem 0 2.35rem; }
.brief-search-input {
  min-height: 54px;
  border: 1.5px solid var(--ink) !important;
  background: var(--tk-control) !important;
  box-shadow: none !important;
}
.brief-search-input:hover { border-color: var(--tk-line-strong) !important; }
.brief-search-input:focus,
.brief-search-input:focus-visible {
  outline: none !important;
  border-color: var(--forest) !important;
  box-shadow: 0 0 0 2px rgba(27, 77, 51, 0.14) !important;
}

.brief-notable { max-width: 760px; margin-top: 2.15rem; }
.brief-notable .section-title {
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  margin-bottom: 0.35rem !important;
}
.psk-fact-grid { border-top: 1px solid var(--tk-line); }
.psk-fact-card {
  display: grid !important;
  grid-template-columns: 8px minmax(0, 1fr);
  column-gap: 1rem;
  align-items: baseline;
  width: 100%;
  min-height: 0;
  padding: 0.9rem 0 !important;
  border-bottom: 1px solid var(--tk-line);
  text-decoration: none !important;
}
.psk-fact-card::before {
  position: static !important;
  width: 6px !important;
  height: 6px !important;
  margin-top: 0.45em;
  background: var(--forest) !important;
}
.psk-fact-title {
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.28;
}
.psk-fact-sub {
  grid-column: 2;
  margin-top: 0.22rem;
  font-size: 0.78rem;
  line-height: 1.3;
  opacity: 0.72;
}
.psk-fact-card:hover .psk-fact-title { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

.earn-filters {
  max-width: 760px;
  gap: 0.85rem;
  margin: 0.65rem 0 1rem;
  align-items: flex-end;
}
.earn-chip {
  position: relative;
  min-height: 26px;
  padding: 0.18rem 0 0.34rem;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: var(--ink) !important;
  box-shadow: none !important;
}
.earn-chip::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.14s ease-out;
}
.earn-chip:hover { background: transparent !important; color: var(--ink) !important; }
.earn-chip:hover::after { transform: scaleX(1); opacity: 0.28; }
.earn-chip.active {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.earn-chip.active::after { transform: scaleX(1); opacity: 1; }
.earn-chip.active,
.earn-chip.active * { color: var(--ink) !important; }
.earn-chip-n { opacity: 0.54; }

.earn-grid,
.earn-grid-dow,
.earn-selected {
  max-width: 760px;
}
.earn-grid {
  border-color: var(--tk-line-strong) !important;
  background: rgba(241, 239, 229, 0.4) !important;
}
.earn-grid-dow {
  background: rgba(23, 21, 15, 0.035) !important;
}
.earn-cell {
  background: rgba(241, 239, 229, 0.28) !important;
  border-color: var(--tk-line) !important;
}
.earn-cell.has-earnings:hover { background: var(--tk-control-hover) !important; }
.earn-cell.selected {
  background: var(--tk-control) !important;
  box-shadow: inset 0 0 0 1.5px var(--ink) !important;
}
.earn-cell.today::after { background: var(--ink) !important; }
.earn-cell-badge {
  background: var(--ink) !important;
  color: var(--tk-paper) !important;
}

.pdb-form-page { max-width: 980px; }
.pdb-form,
.pdb-form-inline,
#prefill-box {
  background: transparent !important;
  border: 1px solid var(--tk-line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
#prefill-box { border-style: dashed !important; }
.form-section-title {
  border-bottom-color: var(--tk-line) !important;
  font-size: 0.86rem !important;
  font-weight: 700 !important;
  color: var(--ink) !important;
}
.form-field span {
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  color: var(--ink) !important;
}
.form-field input,
.form-field select,
.form-field textarea,
.pdb-form textarea,
#prefill-url {
  min-height: 38px;
  border: 1px solid var(--tk-line-strong) !important;
  border-radius: 0 !important;
  background: var(--tk-control) !important;
  box-shadow: none !important;
  color: var(--ink) !important;
  font: inherit !important;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.pdb-form textarea:focus,
#prefill-url:focus {
  outline: none !important;
  border-color: var(--forest) !important;
  box-shadow: 0 0 0 2px rgba(27, 77, 51, 0.14) !important;
}
input[type="checkbox"] {
  min-height: auto;
  accent-color: var(--ink);
}

.sb-toggle {
  background: var(--tk-paper) !important;
  border-color: var(--ink) !important;
  padding: 0 !important;
  box-shadow: 0 0 0 1px rgba(241, 239, 229, 0.75);
}
.sb-toggle svg {
  display: block;
  width: 20px;
  height: 20px;
  color: var(--ink) !important;
  stroke: var(--ink) !important;
}

@media (max-width: 560px) {
  body.app .app-main,
  body.app main {
    padding: 4.25rem 1.25rem 3rem;
  }
  .psk-hero-title {
    max-width: none;
    font-size: 1.5rem !important;
    line-height: 1.1 !important;
  }
  .brief-search { margin-top: 1.1rem; margin-bottom: 2rem; }
  .brief-search-input {
    min-height: 50px;
    font-size: 1rem !important;
    padding: 0.8rem 0.9rem !important;
  }
  .psk-fact-card {
    grid-template-columns: 7px minmax(0, 1fr);
    column-gap: 0.75rem;
  }
  .earn-filters {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.95rem;
    padding-bottom: 0.35rem;
    scrollbar-width: none;
  }
  .earn-filters::-webkit-scrollbar { display: none; }
  .earn-chip {
    flex: 0 0 auto;
    white-space: nowrap !important;
  }
  .earn-cell { min-height: 50px; }
  .earn-cell-badge {
    min-width: 18px;
    padding: 0.06rem 0.3rem;
    font-size: 0.68rem;
  }
}

/* v74: Comps pages, shared table chrome */
.psk-precedents-page .psk-hero-editorial {
  padding-bottom: 1.15rem !important;
  margin-bottom: 0.15rem;
}
.psk-precedents-page .psk-hero-sub {
  margin-top: 0.45rem;
  font-size: 0.95rem;
  opacity: 0.78;
}
.psk-precedent-tabs,
.psk-precedents-page > .psk-filter-row:not(.psk-precedent-tabs) {
  gap: 0.25rem;
  margin: 0.85rem 0;
}
.psk-precedents-page .psk-filter {
  min-height: 32px;
  padding: 0.35rem 0.7rem;
  background: transparent !important;
  border-color: var(--tk-line) !important;
  color: var(--ink) !important;
  font-size: 0.84rem;
}
.psk-precedents-page .psk-filter-active {
  background: var(--tk-control) !important;
  border-color: var(--ink) !important;
  box-shadow: inset 0 -2px 0 var(--ink);
  color: var(--ink) !important;
}
.psk-precedents-page .psk-filter-active * {
  color: var(--ink) !important;
}
.psk-precedents-page .psk-table-card {
  margin-top: 1.35rem;
  border-color: var(--tk-line-strong) !important;
  background: transparent !important;
}
.psk-precedents-page .psk-table-head {
  background: var(--tk-paper) !important;
  border-bottom-color: var(--tk-line-strong);
}
.psk-precedents-page .psk-empty {
  max-width: 28rem;
  margin-top: 1.25rem;
  padding: 0;
  color: var(--ink) !important;
  font-size: 0.92rem;
  line-height: 1.5;
  opacity: 0.72;
}
.psk-precedents-page .icon-link {
  text-decoration: none !important;
}
.psk-precedents-page .btn-inline-delete {
  color: var(--ink) !important;
}

/* v75: true white paper. The dot grid is texture, not a tinted canvas. */
:root {
  --tk-paper: #fff;
  --tk-control: #f1f1ee;
  --tk-control-hover: #e8e8e4;
}

html,
body {
  background-color: #fff !important;
}

body {
  background-image: radial-gradient(circle, #d4d4cf 0.6px, transparent 0.7px) !important;
  background-size: 46px 46px !important;
}

body.app .app-main,
body.app main {
  background-color: transparent !important;
}
