/* Docket Yard — the design system from docs/design, as tokens. The two faces are
   self-hosted (interface.md: a legal-research site must not leak its readers to a font
   host); both are SIL Open Font License, texts in static/fonts/. */
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/static/fonts/newsreader-normal.woff2) format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 400 600; font-display: swap; src: url(/static/fonts/newsreader-italic.woff2) format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/static/fonts/source-sans-3-normal.woff2) format("woff2"); }

:root {
  --paper: #faf8f4; --ink: #1f1d1a; --muted: #6b665e; --hair: #dcd7cd; --tint: #f2eee6;
  --accent: #8a3b2a; --row-pad: 12px; --summary-lines: 12; --ids: none;
  color-scheme: light;
}
/* dark: the reader's OS setting unless they chose; the accent is re-tuned to keep links
   at AA contrast on dark paper */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1a1917; --ink: #ece8e0; --muted: #9d978d; --hair: #33312d; --tint: #232120;
    --accent: #e08a72; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1a1917; --ink: #ece8e0; --muted: #9d978d; --hair: #33312d; --tint: #232120;
  --accent: #e08a72; color-scheme: dark;
}
:root[data-density="compact"] { --row-pad: 6px; --summary-lines: 1; }
:root[data-ids="on"] { --ids: inline; }

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif; font-size: 15px; line-height: 1.45; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
.serif { font-family: "Newsreader", Georgia, "Times New Roman", serif; }
.mono { font-variant-numeric: tabular-nums; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; padding: 8px 12px; background: var(--ink); color: var(--paper); z-index: 10; }
.skip:focus { left: 8px; }
h2 { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0 0 10px 0; }
ol.plain, ul.plain { list-style: none; margin: 0; padding: 0; }
.sheet { max-width: 1440px; margin: 0 auto; }
main { padding: 0 56px; }
.print-only { display: none; }

/* the preference strip: the reader's, not the page's, so it sits above everything */
.prefs { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 56px; background: var(--tint); border-bottom: 1px solid var(--hair); font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.prefs-label { letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; margin-right: 4px; }
.prefs-note { margin-left: auto; }
.chip-small { height: 24px; padding: 0 10px; font-size: 12px; }

.masthead { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 56px; border-bottom: 1px solid var(--hair); }
.masthead-left { display: flex; align-items: baseline; gap: 28px; }
.wordmark { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.nav { display: flex; gap: 22px; font-size: 14px; }
.nav a { color: var(--ink); font-weight: 500; }
.lookup input { width: 320px; height: 36px; padding: 0 12px; border: 1px solid var(--hair); border-radius: 4px; font: inherit; font-size: 14px; background: var(--paper); color: var(--ink); }

/* home */
.lead { padding: 48px 0 0 0; display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 56px; align-items: end; }
.lead h1 { margin: 0; font-size: 40px; line-height: 1.1; font-weight: 500; letter-spacing: -0.02em; max-width: 760px; }
.lead p { margin: 14px 0 0 0; font-size: 16px; max-width: 680px; }
.search { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border: 1px solid var(--ink); border-radius: 4px; background: var(--paper); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 17px; color: var(--ink); outline: none; }
.search input::placeholder { color: var(--muted); }
.week { padding-top: 44px; }
.week-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 10px; }
h2.week-title { font-family: "Newsreader", Georgia, serif; font-size: 26px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink); margin: 0; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; padding: 24px 0 8px 0; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .n { font-size: 44px; line-height: 1; font-weight: 500; letter-spacing: -0.02em; }
.stat .l { font-size: 13px; color: var(--muted); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; padding-top: 32px; }
.two-col.wide-rail { grid-template-columns: minmax(0, 1fr) 420px; }
.rail { display: flex; flex-direction: column; gap: 32px; }
.rail p { margin: 0; font-size: 14px; line-height: 1.5; }
.rail .mono { color: var(--ink); }
.row { display: grid; grid-template-columns: 96px 168px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--hair); align-items: start; }
.row .muted { font-size: 14px; }
.moved-section { padding-top: 40px; }
table.moved { width: 100%; border-collapse: collapse; }
.moved th, .moved td { padding: 10px 16px 10px 0; border-top: 1px solid var(--hair); text-align: left; vertical-align: baseline; }
.moved th { border-top: 0; padding-top: 0; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.moved td:last-child, .moved th:last-child { padding-right: 0; }
.moved .num { text-align: right; white-space: nowrap; }
.moved .dk { width: 168px; }
.dk { font-weight: 600; white-space: nowrap; }

/* the docket sheet */
.caption { padding-top: 40px; }
.caption-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.caption-meta .label { letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.docket-number { margin: 8px 0 0 0; font-size: 56px; line-height: 1; font-weight: 500; letter-spacing: -0.02em; white-space: nowrap; }
.caption-title { margin: 18px 0 0 0; max-width: 860px; font-size: 22px; line-height: 1.3; letter-spacing: 0.01em; }
.caption-note { margin: 10px 0 0 0; font-size: 13px; }
.record-summary { margin: 16px 0 0 0; font-size: 17px; font-style: italic; }
.actions { display: flex; align-items: center; gap: 10px; margin-top: 28px; }
.actions .ext { margin-left: 8px; font-size: 14px; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 4px; font: inherit; font-size: 14px; font-weight: 600; border: 1px solid var(--ink); color: var(--ink); background: transparent; cursor: pointer; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar #filters { flex: 1 1 auto; }
.toolbar-right { display: flex; align-items: center; gap: 18px; color: var(--muted); margin-left: auto; white-space: nowrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border: 1px solid var(--hair); border-radius: 999px; font: inherit; font-size: 13px; font-weight: 500; color: var(--ink); background: transparent; cursor: pointer; }
.chip-on, .chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.entry { display: grid; grid-template-columns: 96px 112px minmax(0, 1fr) 40px; gap: 16px; align-items: start; padding: var(--row-pad) 0; border-top: 1px solid var(--hair); }
.entry[hidden] { display: none; }
.entry-date { font-size: 14px; }
.kind { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; color: var(--muted); padding-top: 2px; }
.kind-decision { color: var(--accent); }
.entry-decision { background: var(--tint); margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.entry-body { min-width: 0; overflow-wrap: anywhere; }
.entry-title { font-weight: 500; }
.entry-title a { color: var(--ink); }
.entry-for { color: var(--muted); }
.id { display: var(--ids); font-weight: 500; font-size: 13px; color: var(--muted); margin-right: 10px; }
.summary { font-family: "Newsreader", Georgia, serif; font-size: 15px; line-height: 1.5; margin-top: 2px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--summary-lines); overflow: hidden; }
/* the record prints captions and summaries in capitals; shown as printed, sized to read */
.as-printed { font-size: 0.94em; letter-spacing: 0.01em; }
.caption-title.as-printed { font-size: 22px; }
.entry-links { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.pdf { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid var(--hair); border-radius: 4px; color: var(--muted); }
.pdf:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.cite { font-style: italic; font-size: 15px; }

.footer { margin-top: 56px; padding: 24px 56px 40px 56px; border-top: 1px solid var(--hair); display: flex; justify-content: space-between; align-items: baseline; gap: 24px; font-size: 13px; color: var(--muted); }

@media (max-width: 900px) {
  main, .masthead, .footer, .prefs { padding-left: 20px; padding-right: 20px; }
  .prefs-note { margin-left: 0; flex-basis: 100%; }
  .masthead { height: auto; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; gap: 12px; }
  .lookup { flex: 1 1 100%; }
  .lookup input { width: 100%; }
  .lead { grid-template-columns: 1fr; gap: 24px; }
  .lead h1 { font-size: 30px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .two-col, .two-col.wide-rail { grid-template-columns: 1fr; gap: 32px; }
  .row { grid-template-columns: 1fr; gap: 4px; }
  .moved thead { display: none; }
  .moved tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--hair); }
  .moved td { display: block; border: 0; padding: 0; }
  .moved td.dk { grid-column: 1; width: auto; }
  .moved td.num.filings { grid-column: 2; grid-row: 1; }
  .moved td.num.filings::after { content: " filings"; font-weight: 400; color: var(--muted); }
  .moved td.title { grid-column: 1 / -1; }
  .moved td.num.last { grid-column: 1 / -1; text-align: left; color: var(--muted); }
  .entry { grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 0; }
  .entry-date { grid-column: 2; grid-row: 1; justify-self: end; font-size: 13px; }
  .kind { grid-column: 1; grid-row: 1; font-size: 11px; }
  .entry-body, .entry-links { grid-column: 1 / -1; }
  .entry-links { flex-direction: row; align-items: center; justify-content: flex-start; }
  .entry-decision { margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .chip, .chip-small { height: 40px; padding: 0 14px; font-size: 14px; }
  .pdf { width: 44px; height: 44px; }
  .docket-number { font-size: 40px; }
  .footer { flex-direction: column; }
  .btn { height: 44px; }
}

@media print {
  /* one palette whatever the reader's theme, so a dark-mode reader does not print black */
  :root, :root[data-theme="dark"] { --paper: #fff; --ink: #000; --muted: #444; --hair: #bbb; --tint: #eee; --accent: #000; --summary-lines: 100; --ids: inline; }
  @page { margin: 18mm; }
  body { font-size: 12pt; }
  main { padding: 0; }
  .no-print, .prefs, .toolbar, .skip { display: none !important; }
  .print-only { display: block; }
  .two-col, .two-col.wide-rail { display: block; }
  .rail { margin-top: 24px; }
  h1 { break-after: avoid; }
  .entry, .row, .moved tr { break-inside: avoid; }
  .entry { grid-template-columns: 80px 90px minmax(0, 1fr); }
  .entry-links { display: block; text-align: left; }
  .pdf { width: auto; height: auto; border: 0; padding: 0; }
  .pdf::after { content: " " attr(href); font-size: 8pt; word-break: break-all; color: var(--muted); }
  .summary { display: block; -webkit-line-clamp: unset; overflow: visible; }
  a { color: #000; }
}

/* follow (subscribe) form in the sheet rail */
.follow { display: grid; gap: 8px; }
.follow input[type="email"] { width: 100%; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 4px; background: var(--paper); color: var(--ink); font: inherit; }
.follow-cadence { border: 0; padding: 0; margin: 0; display: grid; gap: 4px; }
.follow-cadence label { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.follow .btn { justify-self: start; }
