/* Matters (owner, 2026-11-04): a matter's hearings and documents, the Matters page, and the Not filed yet menu.
   One table style, one text size in tables, a state as a dot (2026-11-05), and one style for a pill that
   opens a menu. */

.mt-sub { margin: 2px 0 8px; }
.mt-head-btns { margin: 0; }
.mt-card { display: grid; gap: 12px; }
.mt-cardhead { display: flex; align-items: baseline; gap: 8px 14px; flex-wrap: wrap; }
.mt-cardhead h2 { margin: 0; }

.mt-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.mt-table th { text-align: left; font-size: 13px; font-weight: 700; color: var(--muted); padding: 6px 8px;
  border-bottom: 1px solid var(--border); white-space: nowrap; }
.mt-table td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.mt-table tbody tr:last-child td { border-bottom: 0; }
.mt-name { font-weight: 600; color: var(--text); }
.mt-name a { color: inherit; }
.mt-name a:hover { color: var(--accent-ink); }
.mt-nw { white-space: nowrap; }
.mt-end { text-align: right; white-space: nowrap; }
.mt-end > * + * { margin-left: 6px; }
.mt-inline { display: inline; margin: 0; }

/* A state as a dot and the words (owner, 2026-11-05; style.css "Status as a small dot"): grey ring not yet, amber
   started or waiting, blue done. */
.mt-pill { display: inline-block; font-size: 14px; line-height: 1.5; white-space: nowrap; color: var(--text);
  background: none; border: 0; padding: 0; font-family: inherit; }
.mt-pill::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px;
  vertical-align: 1px; box-shadow: inset 0 0 0 1.5px var(--dot-none); }
.mt-pill-wait::before { background: var(--dot-part); box-shadow: none; }
.mt-pill-done::before { background: var(--dot-done); box-shadow: none; }
.mt-pill-act::before { background: var(--dot-act); box-shadow: none; }
.mt-pill-plain::before { display: none; }
/* A pill that opens a menu (a transcript's matter, a document's kind): the words, dotted under, and a small arrow. */
.mt-pill-menu { position: relative; padding: 0 16px 0 0; cursor: pointer; list-style: none; background: none;
  border: 0; border-bottom: 1px dotted var(--muted); border-radius: 0; }
.mt-pill-menu::before { display: none; }
.mt-pill-menu.mt-pill-wait { color: var(--muted); }
.mt-pill-menu::-webkit-details-marker { display: none; }
.mt-pill-menu::after { content: ""; position: absolute; right: 2px; top: 50%; margin-top: -2px;
  border: 4px solid transparent; border-top-color: var(--muted); border-bottom: 0; }
.mt-pill-menu:hover, .mt-pill-menu[aria-expanded="true"], details[open] > .mt-pill-menu {
  border-bottom-color: var(--gold); }
button.mt-pill-menu { background: none; }
a.home-unfiled { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
a.home-unfiled::before { display: none; }

/* Add hearings: a fold under the table. */
.mt-add > summary { list-style: none; display: inline-block; cursor: pointer; }
.mt-add > summary::-webkit-details-marker { display: none; }
/* "+ Add hearings" and "Add the chosen hearings": one button, the same shape, height, font and width (Arash,
   2026-11-14), "+ Add hearings" right under the line that says there are none. */
.mt-add-btn { min-width: 220px; max-width: 100%; box-sizing: border-box; justify-content: center; text-align: center; }
/* A summary is a block of its own: as a button, its words in the middle like every other button's. */
.mt-add > summary.mt-add-btn { display: inline-flex; align-items: center; }
.mt-none + .mt-add { margin-top: -4px; }
.mt-add-form { display: grid; gap: 10px; margin-top: 10px; padding: 12px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--wash); }
.mt-add-top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.mt-find { flex: 1; min-width: 220px; max-width: none; }
.mt-scroll { max-height: 340px; overflow: auto; background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); }
.mt-add-go { margin: 0; align-items: center; }

/* Dropping files. */
.mt-drop { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border: 2px dashed var(--border-strong); border-radius: 8px; padding: 12px 16px; background: var(--wash); }
.mt-drop.mt-over, body.mt-dragging .mt-drop { border-color: var(--gold); background: rgba(212,160,23,0.08); }
.mt-drop .file-button { margin: 0; }
.mt-dropped td { font-size: 14px; }

/* A document's kind and details, changed on its row. */
.mt-edit { position: relative; }
.mt-edit-form { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: 280px; display: grid; gap: 8px;
  padding: 12px; background: var(--card-bg); border: 1px solid var(--border-strong); border-radius: 8px;
  box-shadow: 0 6px 20px rgba(10,22,40,0.18); }
.mt-edit-form label { display: grid; gap: 3px; font-size: 13px; font-weight: 600; }
.mt-edit-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.mt-edit-doc { overflow-wrap: anywhere; }

/* A matter's page as one screen (owner, 2026-11-05): its name, a search box and the Matter menu, then tabs.
   static/matter-tabs.js hides the panels not chosen; without it they all show. */
.mt-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 24px; flex-wrap: wrap;
  margin: 4px 0 2px; }
.mt-top h1 { margin: 0; }
.mt-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.mt-search { margin: 0; min-width: 0; flex: 1 1 200px; }
.mt-search .form-control { width: 300px; max-width: 100%; height: 38px; margin: 0; }
.mt-menu { position: relative; }
.mt-menu > summary { list-style: none; cursor: pointer; padding-right: 30px; position: relative; display: inline-flex;
  align-items: center; }
.mt-menu > summary::-webkit-details-marker { display: none; }
.mt-menu > summary::after { content: ""; position: absolute; right: 12px; top: 50%; margin-top: -2px;
  border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0; }
.mt-menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 230px; padding: 6px 0;
  background: var(--card-bg); border: 1px solid var(--border-strong); border-radius: 8px;
  box-shadow: 0 6px 20px rgba(10,22,40,0.18); }
.mt-menu-pop a { display: block; padding: 7px 14px; color: var(--text); font-size: 14px; text-decoration: none; }
.mt-menu-pop a:hover { background: var(--chip); }
.mt-menu-pop .mt-menu-sep { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 9px; }
.mt-menu-pop form { margin: 0; }
.mt-menu-btn { display: block; width: 100%; padding: 7px 14px; color: var(--text); font: inherit; font-size: 14px;
  text-align: left; background: none; border: none; cursor: pointer; }
.mt-menu-btn:hover { background: var(--chip); }
/* Closed matters (2026-11-13): a line under the name with Reopen; on the Matters page, a fold at the foot. */
.mt-closed { display: flex; align-items: center; gap: 10px; margin: 2px 0 4px; font-size: 14px; color: var(--muted); }
/* A quiet fold at the foot since 8.1.4 (Arash's mockups, 2026-11-26): "Closed (2)", "Removed (1)". */
.mt-closed-list { margin-top: 6px; }
.mt-closed-list > summary { cursor: pointer; width: max-content; color: var(--muted); font-size: 14px; list-style: none;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }
.mt-closed-list > summary::-webkit-details-marker { display: none; }
.mt-closed-list > summary:hover { color: var(--text); text-decoration-color: var(--gold); }
.mt-closed-list[open] > summary { margin-bottom: 10px; }
.mt-due { display: flex; align-items: baseline; gap: 4px 6px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 12px; }
.mt-due a { margin-left: 6px; }

.mt-tabs-card { padding-top: 0; }
/* The tabs like the header's since 8.1.4 (Arash's mockup M2, 2026-11-26): plain words with their counts on a line,
   the open one darker with a small gold dot under it, the others muted. No numbered steps, no joints. */
.mt-tabs { display: flex; align-items: flex-end; gap: 26px; margin: 0 -24px 14px; padding: 0 24px;
  border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.mt-tabs a { position: relative; display: inline-flex; align-items: baseline; gap: 5px; padding: 12px 0 12px;
  color: var(--muted); font-size: 15px; font-weight: 500; text-decoration: none; }
.mt-tabs a:hover { color: var(--text); text-decoration: none; }
.mt-tabs a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mt-tabs a.mt-tab-on { color: var(--text); font-weight: 600; }
.mt-tabs a.mt-tab-on::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 6px; height: 6px;
  margin-left: -3px; border-radius: 50%; background: #D4A017; }
.mt-tab-n { font-weight: 400; }
.mt-tab-dot { margin: 0 0 0 2px; align-self: center; }
/* The name's docket, muted beside it; the ⋯ buttons (the Matter menu, a hearing's Take out). */
.mt-docket-h { font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 10px; }
.mt-menu > summary.mt-more { padding: 0 12px; font-size: 18px; letter-spacing: 1px; }
.mt-menu > summary.mt-more::after { display: none; }
.mt-row-menu { display: inline-block; vertical-align: middle; text-align: left; }
.mt-row-menu .mt-menu-pop { min-width: 160px; }
.mt-hearings .mt-date { width: 110px; }
.mt-hearings td.mt-muted { color: var(--muted); }
.mt-hearings .mt-end > * + * { margin-left: 6px; }
/* "+ Add hearings" as a quiet link under the table (8.1.4); it opens the same panel. */
.mt-add { border-top: 1px solid var(--border); padding-top: 10px; }
.mt-add > summary.mt-add-link { color: var(--accent-ink); font-size: 14px; text-decoration: underline;
  text-underline-offset: 3px; }
.mt-add > summary.mt-add-link:hover { color: var(--text); }
.mt-panel { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
/* A narrow window (round 6, at 400 px): a table wider than the card scrolls inside it, and never widens the
   card, nor what is under it ("+ Add hearings"). */
@media (max-width: 640px) { .mt-panel > .mt-table { display: block; overflow-x: auto; }
  /* The Kind editor opens over the page, never inside the table that scrolls (the review of 8.0.1: Save was cut
     off at 640 px and under). */
  .mt-edit-form { position: fixed; top: 72px; left: 12px; right: 12px; width: auto; max-height: calc(100vh - 96px);
    overflow: auto; z-index: 60; } }
.mt-panel + .mt-panel { margin-top: 22px; }
.mt-tabbed .mt-panel { display: none; margin-top: 0; }
.mt-tabbed .mt-panel.mt-on { display: grid; }
.mt-panel > h2 { margin: 0; font-size: 18px; }
.mt-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mt-waiting { margin: 0; }

/* New analysis: the four kinds as cards, then only what the chosen one needs. */
.mt-newan { border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; background: var(--card-bg);
  font-size: 14px; }
/* One type size for the form's text, its hints one step smaller (Arash, 2026-11-13: the Counts line was far
   smaller than the rest). */
.mt-newan .hint-text, .mt-newan .an-more > summary { font-size: 14px; }
.mt-newan fieldset { display: grid; gap: 14px; }
.mt-newan-title { font-size: 16px; font-weight: 700; margin: 0 0 2px; padding: 0; }
.an-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
/* The chart first and alone (2026-11-13); the other three folded under it. */
.an-kinds-main { grid-template-columns: 1fr; }
.an-kind-main b { font-size: 16px; }
.an-others > summary { cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.an-kind { display: block; position: relative; padding: 10px 12px 10px 34px; border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer; font-size: 14px; white-space: normal; }
.an-kind input { position: absolute; left: 12px; top: 13px; margin: 0; }
.an-kind b { display: block; }
.an-kind-on, .an-kind:has(input:checked) { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.an-field { display: grid; gap: 6px; }
.an-field[hidden], .an-sent li[hidden] { display: none; }
.an-field-title { margin: 0; }
.mt-newan .an-hearings { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 2px 18px;
  margin: 0; }
.mt-newan .an-witness select { max-width: 40em; }
.an-more > summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.an-more[open] > summary { margin-bottom: 8px; }
.an-counts-box { display: grid; gap: 4px; }
.an-go { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.an-note > summary { list-style: none; }
.an-note > summary::-webkit-details-marker { display: none; }
.an-note ol { margin: 6px 0 0 1.2em; }
.an-proposed { margin: 0; }

/* The Matters page, leaner since 8.1.4 (Arash's mockup M1, 2026-11-26): the name and one box to make a matter on
   one line, then cards of rows. A row is a line of its own: the main words, then what is muted, then a button or
   the arrow. The whole of a matter's row is its link. */
.mt-list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; }
.mt-list-head h1 { margin: 0; }
.mt-new-form { display: flex; gap: 8px; align-items: center; margin: 0; }
.mt-new-form .form-control { width: 260px; max-width: 100%; margin: 0; }
.mt-list { padding: 0; overflow: visible; margin-bottom: 14px; }
.mt-list-title { margin: 0; padding: 12px 16px; font-size: 15px; font-weight: 600; color: var(--text); }
.mt-count { font-weight: 400; color: var(--muted); margin-left: 4px; }
.mt-row { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; padding: 12px 16px;
  border-top: 1px solid var(--border); font-size: 14px; color: var(--text); text-decoration: none; }
.mt-row[hidden] { display: none; }
.mt-list > .mt-row:first-child { border-top: 0; }
.mt-row-main { flex: 1 1 240px; min-width: 0; }
.mt-row .dot { margin-right: 0; }
.mt-muted { color: var(--muted); }
.mt-row .mt-muted { font-size: 13px; }
.mt-row-main .mt-muted { font-size: 14px; }
.mt-hname { font-weight: 600; color: var(--text); }
.mt-hname-more { color: inherit; }
.mt-hname:hover, .mt-hname-more:hover { color: var(--accent-ink); }
.mt-twin { display: block; }
.mt-mname { color: var(--text); font-weight: 700; }
a.mt-mrow:hover { background: var(--chip); text-decoration: none; }
a.mt-mrow:hover .mt-mname { color: var(--accent-ink); }
a.mt-mrow:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.mt-n { min-width: 90px; text-align: right; }
.mt-chev { color: var(--muted); font-size: 18px; line-height: 1; }
.mt-live { white-space: nowrap; }
.mt-mrow-closed .mt-mname { color: var(--muted); font-weight: 600; }
.mt-unfiled { border-color: var(--gold); }
/* The arrow beside a docket's button: another matter, or the new one's name. */
.mt-pick { position: relative; }
.mt-pick > summary { list-style: none; cursor: pointer; }
.mt-pick > summary::-webkit-details-marker { display: none; }
.mt-pick-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 320px; max-width: 90vw;
  display: grid; gap: 8px; padding: 10px; background: var(--card-bg); border: 1px solid var(--border-strong);
  border-radius: 8px; box-shadow: 0 6px 20px rgba(10,22,40,0.18); }
.mt-pick-line { display: flex; gap: 6px; align-items: center; margin: 0; }
.mt-pick-line .form-control { flex: 1; min-width: 0; margin: 0; padding: 5px 8px; font-size: 14px; }
/* Open a saved matter, in the header's menu (8.1.4). */
.mt-open-saved .file-button { cursor: pointer; margin: 0; }
.mt-open-saved .mt-take { font-size: 13px; padding-top: 0; color: rgba(255,255,255,0.65); cursor: pointer; }

/* The Not filed yet menu (static/matter-pick.js). */
.mp-wrap { position: relative; display: inline-block; }
.mp-pop { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; width: 270px; display: grid; gap: 4px;
  padding: 8px; background: var(--card-bg); color: var(--text); border: 1px solid var(--border-strong);
  border-radius: 8px; box-shadow: 0 6px 20px rgba(10,22,40,0.2); font-size: 14px; text-align: left; }
.mp-pop[hidden] { display: none; }
/* Its lines wrap inside it (2026-11-13 review: a long matter name ran past its edge). */
.mp-pop { white-space: normal; }
.mp-pop .mp-note { overflow-wrap: anywhere; }
.mp-h { font-size: 13px; font-weight: 700; color: var(--muted); padding: 2px 6px; }
.mp-find { margin: 0 0 4px; padding: 5px 8px; font-size: 14px; }
.mp-list { display: grid; gap: 2px; max-height: 220px; overflow: auto; }
.mp-opt { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; width: 100%;
  padding: 6px 8px; border: 0; border-radius: 5px; background: none; color: var(--text); font: inherit;
  font-size: 14px; text-align: left; cursor: pointer; }
.mp-opt small { color: var(--muted); font-size: 13px; white-space: nowrap; }
.mp-opt:hover, .mp-opt:focus-visible { background: var(--chip); outline: none; }
.mp-first { font-weight: 700; }
.mp-sep { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }
.mp-new { display: flex; gap: 6px; }
.mp-new .form-control { margin: 0; padding: 5px 8px; font-size: 14px; }
.mp-note { font-size: 13px; color: var(--muted); padding: 2px 6px; }
.mp-err { font-size: 13px; color: var(--error); padding: 2px 6px; }

/* The filed-twice note with its Take H2 out button (Arash, 2026-11-13). */
.mt-twice { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; white-space: normal;
  font-size: 14px; }
/* Save to a file (2026-11-14): one question in a small dialog. */
.mt-save { margin: auto; border: 1px solid var(--card-border); border-radius: 12px; padding: 20px 24px; max-width: 520px;
  background: var(--card-bg); color: var(--body-text); }
.mt-save::backdrop { background: rgba(10, 22, 40, .35); }
.mt-save h2 { font-size: 18px; margin: 0 0 12px; }
.mt-save-line { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin: 0 0 16px; }
.mt-save-line label { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }

/* The Analyses page, leaner since 8.1.4 (Arash's mockup A1, 2026-11-26): a row per analysis, the whole row its
   link (the link's box covers the row), Try again above it on one that did not finish. None yet: one line. */
.an-row { position: relative; }
.an-row:hover { background: var(--chip); }
.an-row-link { color: var(--text); text-decoration: none; }
.an-row-link::after { content: ""; position: absolute; inset: 0; }
.an-row-link:hover { color: var(--accent-ink); text-decoration: none; }
.an-row-link:focus-visible { outline: none; }
.an-row-link:focus-visible::after { outline: 2px solid var(--focus); outline-offset: -2px; }
.an-again-row { position: relative; z-index: 1; }
/* "Did not finish" in red, dark enough to read at 13 px (the mockup's #A23B37), lighter on the dark theme. */
.an-failed { --an-red: #A23B37; color: var(--an-red); font-size: 13px; }
:root[data-theme="dark"] .an-failed { --an-red: #F0857F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .an-failed { --an-red: #F0857F; } }
.an-dot-failed { background: var(--an-red); box-shadow: none; }
.an-day { min-width: 70px; text-align: right; white-space: nowrap; }
.an-empty { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0; }

.an-made-with { margin-left: 4px; }
.an-made { margin: 0 0 10px; }
