/* =====================================================================================
   Component fixes (25 October 2026). Rules for shared components that thread-v2.css and
   thread-v2-app.css do not carry yet; both files stay as they are while other batches work
   on them, so these live here and base_t2.html links this file on every converted page.
   Move each rule into thread-v2-app.css when that file is next free, then delete this one.
   Tokens only: no raw colours, no black, no italic.
   ===================================================================================== */

/* The file row (t2_file.html): on the overview the links (Review, Statements, Export and the
   rest) ran past the right edge at 1024 px. The row may now shrink, and its links wrap onto a
   second line, right-aligned, each link kept whole. Below 44rem the system folds them into
   "In this file" as before. */
.t2 .t2-file { min-width: 0; }
.t2 .t2-file__links { flex-wrap: wrap; justify-content: flex-end; min-width: 0; row-gap: 0.375rem; }
.t2 .t2-file__links a { white-space: nowrap; }
.t2 .t2-file__back { flex: none; white-space: nowrap; }
.t2 .t2-file__id { flex: 0 1 auto; }

/* The way to change a record is a visible button, never a muted fold or a caption link
   (the managing partner's rule). A fold that opens an edit form wears the secondary button
   on its summary: <details class="t2-edit"><summary class="t2-btn t2-btn--secondary
   t2-btn--small">Revise the determination</summary><div class="t2-fold__body">...</div>.
   The summary keeps its own width and loses the disclosure marker; the form opens beneath it
   at the full width of the column. */
.t2 details > summary.t2-btn { list-style: none; width: fit-content; max-width: 100%; white-space: normal; text-align: left; line-height: 1.25; }
.t2 details > summary.t2-btn::-webkit-details-marker { display: none; }
.t2 details > summary.t2-btn::marker { content: ""; }
.t2 details[open] > summary.t2-btn { box-shadow: inset 0 0 0 1px var(--text); }
.t2 .t2-edit { display: block; min-width: 0; }
.t2 .t2-edit > .t2-fold__body { margin-top: var(--s4); }
.t2 .t2-edit:not([open]) > .t2-fold__body { display: none; }
/* The same in the legacy gate list (gate_checklist.html) when it sits inside a .t2 root. */
.t2 .gate-override > summary.btn { list-style: none; width: fit-content; cursor: pointer; }
.t2 .gate-override > summary.btn::-webkit-details-marker { display: none; }
.t2 .gate-override[open] > summary.btn { margin-bottom: var(--s3); }

/* A legacy definition list (.dl in components.css) inside a .t2 root: the value column may
   shrink, and a long hash or reference breaks inside it instead of widening the page. */
.t2 .dl { grid-template-columns: max-content minmax(0, 1fr); }
.t2 .dl dd { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 40rem) {
  .t2 .dl { grid-template-columns: minmax(0, 1fr); gap: 0.125rem; }
  .t2 .dl dd { margin-bottom: 0.5rem; }
}
