:root {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --bg-hover: #f5f5f5;
  --fg: #111111;
  --fg-soft: #444444;
  --muted: #888888;
  --line: #e5e5e5;
  --line-strong: #cccccc;
  --pos: #117a35;
  --neg: #a31515;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 40px 80px;
}

a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 2px;
}
a:hover { text-decoration-color: var(--fg); }

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-header .brand {
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.site-header nav a {
  margin-left: 28px;
  font-size: 14px;
  color: var(--fg-soft);
  text-decoration: none;
}
.site-header nav a:hover { color: var(--fg); }

.back-link {
  display: inline-block;
  font-size: 13px;
  color: var(--fg-soft);
  text-decoration: none;
  margin-bottom: 8px;
}
.back-link:hover { color: var(--fg); text-decoration: underline; }

.site-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 40px 40px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--line);
}

/* Headings */
h1 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
h2 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--fg-soft);
  margin: 32px 0 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

p { margin: 8px 0; }
.subtle { color: var(--muted); font-size: 13px; }
.warn {
  background: var(--bg-soft);
  padding: 10px 14px;
  border-left: 2px solid var(--fg);
  font-size: 13px;
  color: var(--fg-soft);
  margin: 12px 0;
}

ul { padding-left: 20px; }
li { padding: 2px 0; }

/* Big lists (year/month indexes) */
.big-list { list-style: none; padding: 0; }
.big-list li {
  padding: 10px 0;
  font-size: 15px;
  border-bottom: 1px solid var(--line);
}
.big-list li:last-child { border-bottom: 0; }

/* Primary call-to-action button */
.big-link {
  display: inline-block;
  padding: 9px 16px;
  background: var(--fg);
  color: var(--bg);
  border-radius: 4px;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
}
.big-link:hover { background: #000; }

/* Tables */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0;
  font-size: 13px;
}
th, td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
thead th {
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  border-bottom: 1px solid var(--line-strong);
  background: var(--bg);
}
.num {
  text-align: right;
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 13px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.daily-list tbody tr:hover { background: var(--bg-hover); }
.daily-list .insider-row { font-size: 12px; line-height: 1.5; color: var(--fg-soft); }

/* Valuation */
.valuation-row {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin: 12px 0;
}
.valuation-table { max-width: 360px; flex: 0 0 auto; margin: 0; }
.valuation-table th {
  width: 110px;
  font-weight: 500;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--fg);
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.valuation-table td { border-bottom: 1px solid var(--line); }
.valuation-table tr.spacer th,
.valuation-table tr.spacer td {
  background: var(--bg);
  border-bottom: 0;
  height: 18px;
  padding: 0;
}

.multiples-table { max-width: 280px; flex: 0 0 auto; margin: 0; }
.multiples-table thead th {
  text-align: left;
  background: var(--bg-soft);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  border-bottom: 1px solid var(--line-strong);
  padding: 8px 12px;
}
.multiples-table tbody th {
  width: 140px;
  font-weight: 500;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--fg);
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.multiples-table tbody td { border-bottom: 1px solid var(--line); }

/* Company description */
.company-desc {
  background: var(--bg-soft);
  padding: 14px 18px;
  border-left: 2px solid var(--line-strong);
  font-size: 13px;
  color: var(--fg-soft);
  margin: 16px 0;
}

/* Tabs */
.tabs-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 16px 0 12px;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.tabs {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
}
.tab-controls {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}
.tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 14px 8px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  color: var(--muted);
  margin-bottom: -1px;
}
.tab.active {
  color: var(--fg);
  border-bottom-color: var(--fg);
  font-weight: 500;
}
.freq {
  background: transparent;
  border: 1px solid var(--line);
  padding: 4px 10px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  color: var(--fg-soft);
  border-radius: 3px;
}
.freq.active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

/* Financial tables */
.fin-table { font-size: 13px; }
.fin-table thead th { background: var(--bg); }
.fin-table th:first-child {
  width: 280px;
  font-weight: 500;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--fg);
}
.fin-table tbody tr th,
.fin-table tbody tr td {
  padding: 11px 12px;
  vertical-align: middle;
}
/* Spacer = pure empty breathing room between sections, no line */
.fin-table tr.spacer th,
.fin-table tr.spacer td {
  background: var(--bg);
  border-top: 0;
  border-bottom: 0;
  padding: 0;
  height: 22px;
}

/* Subtotal rows (Total Revenue, Gross Profit, Operating Income, etc.) — bold */
.fin-table tr.subtotal th,
.fin-table tr.subtotal td {
  font-weight: 600;
  color: var(--fg);
}

/* Sub-rows (YoY %, Margin %, EPS, share counts) — indented italic, lighter */
.fin-table tr.sub th {
  padding-left: 32px;
  font-weight: 400;
  font-style: italic;
  font-size: 12px;
  color: var(--fg-soft);
}
.fin-table tr.sub td {
  font-style: italic;
  font-size: 12px;
  color: var(--fg-soft);
}

/* Insider activity */
.insiders-table { font-size: 12px; }
.insiders-table th:nth-child(n+5) { font-variant-numeric: tabular-nums; }
.insiders-table .txn-p td {
  background: #d6ecdb;
  color: #0a4a1f;
}
.insiders-table .txn-s td {
  background: #f5d6d6;
  color: #6b1414;
}
.insiders-table .table-derivative { color: var(--muted); }

/* Horizontal-scroll wrapper for any table that won't fit on narrow screens */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 12px 0;
  /* subtle scrollbar styling */
  scrollbar-width: thin;
}
.table-scroll > table { margin: 0; }

@media (max-width: 760px) {
  main { padding: 18px 14px 60px; }
  .site-header { padding: 12px 14px; }
  .site-header nav a { margin-left: 14px; font-size: 13px; }
  h1 { font-size: 20px; }
  h2 { font-size: 12px; }

  /* Compact table padding everywhere */
  th, td { padding: 8px 10px; }

  /* Daily list — force horizontal scroll, prevent column wrap */
  .daily-list { min-width: 720px; }
  .daily-list .insider-row { white-space: normal; }

  /* Financial tables — prevent row-label wrap, scroll horizontally */
  .fin-table { min-width: 540px; }
  .fin-table tbody th { white-space: nowrap; padding-right: 16px; }
  .fin-table th:first-child { width: auto; }
  .fin-table tr.sub th { padding-left: 24px; }

  /* Insider activity table — scroll horizontally */
  .insiders-table { min-width: 680px; }

  /* Valuation: tighten further on phone */
  .valuation-row { gap: 24px; }
  .valuation-table, .multiples-table { max-width: 100%; width: 100%; }
}

@media (max-width: 480px) {
  main { padding: 14px 10px 48px; }
  .site-header { padding: 10px 12px; }
  .site-header .brand { font-size: 14px; }
  .site-header nav a { margin-left: 10px; font-size: 12px; }
}
