/* The public share page's frame. The white panel IS the spreadsheet: the grid runs
   edge to edge inside it (no inner card, no page padding), the panel's own corners do
   the rounding, and the ask/find bar docks in the header's top-right corner. Everything
   inside the sheet is styled by the shared Orchard modules. */
.share-frame {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}
.share-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  min-height: 0;
}
.share-head h1 {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -.01em;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* "Updated 3h ago · updates daily" keeps its words whole: the title beside it already
   ellipsizes, so when the header runs out of room the dataset's NAME is the thing that
   gives way — a half-truncated cadence would read as a different cadence. */
.share-head #ds-updated { flex: 0 0 auto; white-space: nowrap; }
/* The docked ask/find bar: right-aligned, compact, no toolbar margins. */
.share-head .toolbar { margin: 0 0 0 auto; flex: 0 1 480px; min-width: 0; }
.share-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 12px 12px 0 0;
  margin: 0 14px;
  box-shadow: 0 0 0 1px var(--border), var(--shadow-card);
  overflow: hidden; /* the sheet's own scroller scrolls; the panel's corners clip it */
}
.share-content .page { padding: 0; margin: 0; max-width: none; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.share-content #data-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* With no data the card is the only thing in the panel, and the panel is the whole
   viewport here — so it sits in the middle of it rather than tucked under the header,
   where it read as a page that had failed to finish loading. (grid.js stamps .gridzero
   on the box whenever the zero state is the one showing.) The column is already flex;
   this only has to say where the free space goes. */
.share-content #data-body.gridzero { justify-content: center; padding-bottom: 6vh; }
/* The grid sheds its card chrome — the panel is the card now. */
.share-content .gridwrap { border: none; border-radius: 0; box-shadow: none; flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* flex owns the height here — the grid's own sizeGrid math assumes the old padded
   page and would leave a phantom gap above the footer. */
.share-content .gridscroll { flex: 1; max-height: none !important; }
/* Answer cards float on the panel above the sheet. */
.share-content #answers { margin: 12px 16px 0; }
.share-content #answers:empty { margin: 0; }
.share-content .empty.datazero { margin: 60px auto; }
@media (max-width: 640px) {
  .share-frame { height: auto; }
  .share-content { margin: 0; border-radius: 0; overflow: visible; }
  .share-head { padding: 12px 16px; flex-wrap: wrap; }
  .share-head .toolbar { flex: 1 1 100%; }
  /* …except at phone widths, where there is no room to give: the line wraps onto a
     second row rather than running off the edge. */
  .share-head #ds-updated { flex: 0 1 auto; white-space: normal; }
}

/* ── the questions page ─────────────────────────────────────────────────────
   /:token/questions — its own document, not a section under the grid. The dataset page
   is a spreadsheet, and a wall of prose beneath it is not what its owner shared; these
   answers also rank better on a page of their own than diluting that one. Static markup,
   no script: there is nothing here to make live.
   What stays on the dataset page is #qa-link, one line pointing here — which has to be
   there for PEOPLE, or this becomes a page only a crawler can reach. */
.qa-page { min-height: 100%; }
#dataset-qa {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
#dataset-qa h1 {
  font-size: 25px;
  font-weight: 660;
  letter-spacing: -.02em;
  line-height: 1.25;
  margin: 0 0 34px;
}
.qa-head { font-size: 13px; margin-bottom: 20px; }
.qa-head a { color: var(--text-3); text-decoration: none; }
.qa-head a:hover { color: var(--text); }
/* The one line the dataset page keeps. Quiet, but a real link a person can see and
   follow — the alternative is a page that exists only for crawlers. */
#qa-link { max-width: 760px; margin: 0 auto; padding: 18px 24px 28px; font-size: 13px; }
#qa-link a { color: var(--text-2); text-decoration: none; }
#qa-link a:hover { color: var(--text); text-decoration: underline; }
@media (max-width: 640px) { #qa-link { padding: 14px 16px 22px; } }
#dataset-qa .qa { margin: 0 0 32px; }
/* The questions are the only h2s on the page — the dataset's name is the h1, and every
   heading under it is something a person might actually have asked. */
#dataset-qa h2 {
  font-size: 17px;
  font-weight: 620;
  letter-spacing: -.01em;
  margin: 0 0 8px;
  line-height: 1.35;
}
#dataset-qa p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.6; color: var(--text-2); }
/* Rankings and tallies are how these answers actually come back — the model was told it
   could use lists and it takes the offer, because "which agencies did the most" has a
   list for an answer. */
#dataset-qa ul, #dataset-qa ol { margin: 0 0 10px; padding-left: 22px; }
#dataset-qa li { font-size: 14.5px; line-height: 1.6; color: var(--text-2); margin-bottom: 3px; }
#dataset-qa li::marker { color: var(--text-3); }
#dataset-qa strong { color: var(--text); font-weight: 600; }
#dataset-qa code { font-size: .92em; background: var(--neutral-bg); border-radius: 4px; padding: 1px 4px; }
/* "Which venues hosted the most" has a two-column answer and the model writes a pipe
   table for it; scrolls on its own so a wide one never pushes the page sideways. */
#dataset-qa table { border-collapse: collapse; font-size: 13.5px; margin: 0 0 12px; display: block; overflow-x: auto; }
#dataset-qa th, #dataset-qa td { text-align: left; padding: 5px 16px 5px 0; border-bottom: 1px solid var(--border-faint); white-space: nowrap; }
#dataset-qa th { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
#dataset-qa td { color: var(--text-2); }
/* A citation: small, quiet, and a real link to the archived page the figure came from. */
#dataset-qa sup { font-size: 10px; vertical-align: super; line-height: 0; margin-left: 1px; }
#dataset-qa sup a { color: var(--text-3); text-decoration: none; padding: 0 1px; }
#dataset-qa sup a:hover { color: var(--text); text-decoration: underline; }
.qa-note {
  margin-top: 36px !important;
  padding-top: 18px;
  border-top: 1px solid var(--border-faint);
  font-size: 12.5px !important;
  color: var(--text-3) !important;
}
@media (max-width: 640px) { #dataset-qa { padding: 36px 16px 56px; } }

/* The server-rendered first-rows table: plain, readable, gone the moment the script
   boots. Styled just enough that a no-JS reader gets a decent document. */
#ssr { padding: 16px 24px; overflow-x: auto; }
#ssr table { border-collapse: collapse; font-size: 13px; }
#ssr th, #ssr td { text-align: left; padding: 6px 14px 6px 0; border-bottom: 1px solid var(--border-faint); max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ssr th { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
#ssr p { margin: 12px 0 0; font-size: 12.5px; color: var(--text-2); }
