:root {
  font:
    15px/1.5 system-ui, sans-serif;
  font-synthesis: none;
  color: #18252f;
  background: #f8fafb;
  --blue: #003e75;
  --sub: #4f6171;
  --border: #cdd7df;
  --line: #e0e7ed;
  --field-border: #72818e;
  --focus-ring: #285d94;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
summary,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
summary,
select {
  cursor: pointer;
}
button {
  background: white;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px 12px;
  font-weight: 500;
}
button:hover,
a:hover {
  background: #eaf2f9;
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}
a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}
input,
select,
textarea {
  border: 1px solid var(--field-border);
  border-radius: 6px;
  background: white;
  padding: 8px 10px;
  max-width: 100%;
}
textarea {
  resize: vertical;
}
select:not([multiple]):not([size]) {
  appearance: none;
  padding-inline-end: 2.25rem;
  background-image: url("./chevron-down.svg");
  background-position: right 12px center;
  background-size: 14px 14px;
  background-repeat: no-repeat;
}
@media (forced-colors: active) {
  select:not([multiple]):not([size]) {
    appearance: auto;
    background-image: none;
  }
}
label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.86rem;
  font-weight: 600;
}
.skip {
  position: absolute;
  left: 10px;
  top: -60px;
}
.skip:focus {
  top: 5px;
  z-index: 15;
  background: white;
}
#layout {
  display: grid;
  grid-template-columns: clamp(256px, 20vw, 280px) minmax(0, 1fr);
  min-height: 100vh;
}
#sidebar {
  display: flex;
  position: sticky;
  top: 0;
  height: 100dvh;
  flex-direction: column;
  padding: 10px 16px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: white;
  border-right: 1px solid var(--line);
  z-index: 2;
}
.sidebarScroll {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  /* Leave room for keyboard focus rings inside the scrollport. */
  margin-inline: -4px;
  padding: 4px;
}
.sidebarScroll > * { flex-shrink: 0; }
.brand {
  color: inherit;
  text-decoration: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  letter-spacing: -0.4px;
  font-weight: 700;
  margin: 0 5px 6px;
}
.brandmark {
  border-radius: 8px;
  background: var(--blue);
  color: white;
  padding: 4px 12px;
  font-size: 1.35rem;
}
.brand small,
.sub,
small {
  font-size: 0.83rem;
  color: var(--sub);
  font-weight: 400;
  letter-spacing: 0;
}
.brand small {
  display: block;
}
nav {
  display: grid;
  gap: 3px;
  margin: 20px 0;
}
nav button, #sidebar nav a {
  background: transparent;
  border: 0;
  text-align: left;
  font: 500 15px/20px system-ui, sans-serif;
  color: #253746;
  padding: 9px 12px;
}
.viewSwitch { display: flex; align-items: center; margin: 0 0 12px; }
nav button[aria-current="page"], #sidebar nav a[aria-current] {
  color: var(--blue);
  background: #e8f0f8;
  font-weight: 600;
}
#sidebar nav { margin: 8px 0 0; gap: 1px; }
#sidebar .quickActions button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-block: 6px;
}
#sidebar .quickActions button[hidden] { display: none; }
.quickActions svg { flex: none; color: var(--blue); }
.sidefoot {
  margin-top: auto;
  display: grid;
  justify-items: start;
  gap: 5px;
}
.sidefoot nav {
  width: 100%;
}
#sidebar .accountSecurity {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  gap: 7px;
  color: inherit;
  text-decoration: none;
  font-weight: 500;
}
#sidebar .accountSecurity::before { margin: 0; }
#sidebar .accountSecurity:hover { color: var(--blue); text-decoration: underline; }
#account {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  overflow-wrap: anywhere;
  color: var(--blue);
  font-size: 0.83rem;
}
.accountRow {
  flex: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 0 8px;
  padding-top: 6px;
}
@media (pointer: coarse), (max-width: 650px) {
  #sidebar .accountSecurity, #account { min-height: 44px; }
}
#logout {
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--blue);
  border: 1px solid var(--border);
}
.quiet {
  border: 0;
  background: transparent;
  color: var(--sub);
  padding: 6px 0;
}
.body {
  min-width: 0;
}
.top {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border-bottom: 1px solid var(--line);
  padding: 11px clamp(16px, 3vw, 48px);
  height: 62px;
}
.searchLaunch {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  color: var(--sub);
  width: min(420px, 72%);
  font-weight: 400;
  text-align: left;
}
.top .outline {
  margin-left: auto;
}
kbd {
  font: 12px/1.4 inherit;
  font-size: 0.78rem;
  color: var(--sub);
  background: #f3f6f8;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
}
#menu {
  display: none;
}
.primary {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
.primary:hover {
  background: #13548b;
}
.outline {
  color: var(--blue);
}
main {
  padding: 28px clamp(16px, 3vw, 48px) 50px;
  max-width: 1640px;
  margin: auto;
}
h1,
h2,
h3 {
  color: #142630;
  line-height: 1.25;
  margin: 0;
}
h1 {
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  letter-spacing: -1px;
}
h2 {
  font-size: 1.08rem;
}
h3 {
  font-size: 1rem;
}
p {
  margin: 8px 0;
}
.pageHead,
.sectionHead,
.modalHead,
.row,
.chatTools {
  display: flex;
  align-items: center;
  gap: 9px;
}
.pageHead {
  justify-content: space-between;
  margin-bottom: 18px;
}
.pageHead > div,
.sectionHead > div {
  min-width: 0;
}
.sectionHead {
  justify-content: space-between;
  margin: 18px 0 9px;
}
#leaseHub .sectionHead, #rentPeriod { flex-wrap: wrap; }
#rentPeriod { display: flex; align-items: end; gap: 6px; }
#rentPeriod label { font-size: 0.82rem; }
@media (max-width: 650px), (pointer: coarse) {
  #rentPeriod :is(button, input) { min-height: 44px; }
}
.row {
  flex-wrap: wrap;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
  gap: 12px;
}
.panel,
.tile,
.notice,
.empty,
.tableBox {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.panel,
.tile {
  padding: 16px;
}
.panel, .tile, .tableBox {
  border-color: var(--card-border);
  box-shadow: var(--card-shadow);
}
.panel :is(.panel, .tableBox), .expandedTable > .tableBox {
  border-color: var(--line);
  box-shadow: none;
}
.tile {
  text-align: left;
  color: var(--blue);
}
.tile small {
  display: block;
  margin-top: 2px;
}
.notice,
.empty {
  padding: 15px;
  color: var(--sub);
}
.notice {
  background: #fff8e9;
  color: #5d430c;
}
.notice.activeReview {
  color: #263e51;
  background: #f1f6fa;
}
.statusNotice p {
  margin: 0;
}
.statusNotice p + p {
  margin-top: 4px;
}
.downloadAction {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 13px;
  border: 1px solid var(--blue);
  border-radius: 7px;
  background: var(--blue);
  color: white;
  font-weight: 600;
  text-decoration: none;
}
.downloadAction:hover {
  background: #073157;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
  margin-bottom: 12px;
}
.filters input[type="search"] {
  min-width: min(250px, 70vw);
}
.filters label {
  font-size: 0.78rem;
}
.tableBox {
  overflow: auto;
  max-height: 65vh;
}
table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 0.9rem;
}
th,
td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
th {
  position: sticky;
  top: 0;
  background: #f4f7fa;
  color: var(--sub);
  font-size: 0.78rem;
  white-space: nowrap;
  z-index: 1;
}
th > button {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 3px;
  min-height: 24px;
}
th > button:hover {
  color: var(--blue);
}
th > button:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}
th[aria-sort] > button {
  color: var(--blue);
}
th[aria-sort] > button::after {
  content: "";
  width: 12px;
  height: 12px;
  background: url("./chevron-down.svg") center / contain no-repeat;
}
th[aria-sort="ascending"] > button::after {
  transform: rotate(180deg);
}
/* The original and expanded agreement lists share this header. */
@media screen {
  table[aria-label="Agreements"] th {
    background: #224463;
    color: #fff;
    font-size: .83rem;
    font-weight: 600;
    vertical-align: middle;
    border-bottom-color: #193951;
    padding-block: 8px;
  }
  table[aria-label="Agreements"] th[aria-sort] {
    background: #153854;
  }
  table[aria-label="Agreements"] th > button {
    color: inherit;
  }
  table[aria-label="Agreements"] th > button:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  table[aria-label="Agreements"] th > button:focus-visible {
    outline-color: currentColor;
  }
}
@media screen and (forced-colors: none) {
  table[aria-label="Agreements"] th[aria-sort] > button::after {
    background: currentColor;
    mask: url("./chevron-down.svg") center / contain no-repeat;
  }
}
@media (forced-colors: active) {
  th[aria-sort] > button::after {
    forced-color-adjust: none;
    background: ButtonText;
    mask: url("./chevron-down.svg") center / contain no-repeat;
  }
}
td:first-child {
  min-width: 190px;
}
td small {
  display: block;
}
.tag {
  display: inline-flex;
  background: #edf3f8;
  color: #2b4c68;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 600;
}
.pager {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 10px;
}
.formGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.wide {
  grid-column: 1/-1;
}
label:has(> input:is([type="checkbox"], [type="radio"])), .check {
  display: flex;
  flex-direction: row;
  align-items: center;
}
label > input:is([type="checkbox"], [type="radio"]) {
  order: -1;
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin: 0;
}
.agreementOverview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 23rem), 1fr));
  align-items: start;
  gap: 16px;
  margin: 16px 0;
}
.agreementDetails, .agreementTerms, .agreementControls {
  min-width: 0;
  padding: 14px 18px;
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: 8px;
  background: white;
  overflow-wrap: anywhere;
}
.agreementOverview .sectionHead:first-child {
  min-height: 32px;
  margin: 0 0 8px;
}
.agreementOverview .sectionHead h2 { margin: 0; }
.docMeta, .commercialTerms { margin: 0; }
.docMeta > div {
  display: grid;
  grid-template-columns: clamp(6rem, 25%, 9rem) minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  padding: 5px 0;
  border-top: 1px solid var(--line);
}
.docMeta dt { color: var(--sub); }
.docMeta dd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2px 8px;
  min-width: 0;
  margin: 0;
  font-weight: 550;
}
.docMeta dd > :is(span, details) { flex: 1 1 8rem; min-width: 0; }
.docMeta .recordReview summary { padding-inline: 17px 0; }
.docMeta .recordReview summary::before { inset-inline-start: 0; }
.docMeta .reviewExplanation { padding-inline: 0; }
.docMeta dd > .linkBtn { align-self: center; }
.agreementOverview .iconAction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  color: var(--blue);
  background: transparent;
  vertical-align: middle;
}
.agreementOverview .iconAction:hover { background: #eaf2f9; }
.agreementOverview .iconAction svg { width: 16px; height: 16px; }
.commercialTerms > div { padding-block: 10px; border-top: 1px solid var(--line); }
.commercialTerms > div:last-child { padding-bottom: 0; }
.commercialTerms dt { font-weight: 650; }
.commercialTerms dd { margin: 4px 0 0; }
.commercialTerms ul { margin: 0; padding-inline-start: 1.2rem; }
.commercialTerms li + li { margin-top: 4px; }
.commercialTerms .muted { display: block; margin-top: 3px; color: var(--sub); }
.agreementControls > .sectionHead { flex-direction: column; align-items: flex-start; }
.agreementControls:not(:has(button)) { display: none; }
@media (max-width: 650px), (pointer: coarse) {
  .agreementOverview .iconAction { width: 44px; height: 44px; }
  .docMeta .recordReview summary { min-height: 44px; }
}
@media (max-width: 500px) {
  .agreementOverview { gap: 12px; }
  .agreementDetails, .agreementTerms, .agreementControls { padding: 12px; }
  .docMeta > div { grid-template-columns: 5.6rem minmax(0, 1fr); gap: 8px; }
}
.list {
  margin: 8px 0;
  padding-left: 20px;
}
.linkBtn {
  display: inline;
  background: none;
  border: 0;
  padding: 0;
  color: var(--blue);
  text-decoration: underline;
  text-align: left;
}
.agreementReader {
  min-width: 0; margin: 18px 0; border: 1px solid #202124; border-radius: 10px;
  background: #525659; scroll-margin-top: 12px; overflow: hidden;
}
.readerFrame { height: clamp(420px, 78dvh, 1000px); }
.readerFrame iframe { display: block; width: 100%; height: 100%; border: 0; }
.readerIsExpanded { overflow: hidden; }
.readerInlineHost { position: static; display: block; margin: 0; padding: 0; border: 0; width: auto; max-width: none; height: auto; max-height: none; overflow: visible; color: inherit; background: transparent; }
.readerDialog {
  width: min(1200px, 96vw); height: 92dvh; max-width: 96vw; max-height: 92dvh;
  border: 0; border-radius: 12px; padding: 0; overflow: hidden; background: #525659;
}
.readerDialog::backdrop { background: #000a; }
.readerDialog.readerFullScreen {
  inset: 0; margin: 0; width: 100vw; max-width: 100vw;
  height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0;
}
.readerDialog .agreementReader.readerExpanded {
  display: flex; flex-direction: column; width: 100%; height: 100%;
  margin: 0; border: 0; border-radius: 0;
}
.readerExpanded .readerFrame { flex: 1; min-height: 0; height: auto; }
@media (max-width: 650px) {
  .readerHead, .readerTools { padding-inline: 10px; }
  .readerFind { width: 100%; margin: 0; }
  .readerFind input { flex: 1; min-width: 0; }
  .readerStage { max-height: 68dvh; }
}
@media (max-width: 480px) {
  .readerHead {justify-content:flex-start}
  .readerTitle {flex-basis:100%}
  .readerHead .readerLongLabel {display:none}
}
.evidence {
  border-left: 2px solid #acbfd0;
  padding: 3px 10px;
  margin: 7px 0;
  color: #354c5d;
}
mark {
  background: #ffe899;
  color: #24313a;
}
.pending {
  padding: 10px;
  color: var(--sub);
}
.error {
  color: #902c28;
  background: #fff1ef;
  padding: 8px;
  border-radius: 5px;
}
dialog {
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 18px;
  max-width: min(720px, 95vw);
  width: 650px;
  max-height: 85dvh;
  color: inherit;
}
.shareAddressField {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  margin-top: 4px;
}
.shareAddressField input {
  min-width: 0;
  border-start-end-radius: 0;
  border-end-end-radius: 0;
}
.shareAddressField button {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 0;
  color: var(--blue);
  border-color: var(--field-border);
  border-inline-start: 0;
  border-start-start-radius: 0;
  border-end-start-radius: 0;
}
.shareAddressHelp { justify-content: space-between; gap: 4px 12px; margin-top: 6px; }
.shareAddressHelp .sub { margin: 0; }
.copyStatus { margin:0; }
.copyStatus:not(:empty) { margin:.4rem 0 .75rem; font-weight:600; }
dialog::backdrop {
  background: #17293b55;
}
.modalHead,
.paletteHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.paletteHead input {
  flex: 1;
  min-width: 0;
}
#paletteStatus:empty {
  margin: 0;
}
.option {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 3px;
  padding: 10px;
}
.option small {
  display: block;
}
.option[aria-selected="true"] {
  background: #e7f0fa;
}
#chatLauncher {position:fixed;right:max(20px,env(safe-area-inset-right));bottom:max(20px,env(safe-area-inset-bottom));z-index:7;width:56px;height:56px;display:grid;place-items:center;padding:0;border:0;border-radius:50%;background:var(--blue);color:white;box-shadow:0 2px 24px #14345532}
#chatLauncher:hover {background:#12385c}
#chatLauncher .collapseIcon,#chatLauncher[aria-expanded=true] .bubbleIcon {display:none}
#chatLauncher[aria-expanded=true] .collapseIcon {display:block}
#chat {position:fixed;right:20px;bottom:84px;height:min(800px,calc(100dvh - 104px));width:min(450px,calc(100vw - 40px));z-index:8;display:flex;flex-direction:column;background:white;border:1px solid var(--line);border-radius:16px;box-shadow:0 5px 40px #15263829;overflow:hidden}
#chat header {display:flex;align-items:center;justify-content:space-between;background:linear-gradient(135deg,#164a7c,#123864 65%,#123052);padding:10px 14px;color:white}
.chatIdentity,.chatActions {display:flex;align-items:center;gap:6px}
.chatIdentity img {
  object-fit: contain;
  padding: 3px;
  background: white;
  border-radius: 5px;
}
.chatIdentity h2 {color:white;font-size:1rem}
.chatActions button {display:grid;place-items:center;height:32px;width:32px;padding:0;border:0;border-radius:50%;background:#ffffff21;color:white}
.chatActions button:hover {background:#ffffff42}
.chatScope {padding:7px 15px;border-bottom:1px solid var(--line);font-size:.8rem;line-height:1.4;color:var(--sub)}
#chatWelcome {margin:auto 0;padding:26px;text-align:center}
#chatWelcome h3 {font-size:1.35rem;margin:10px 0 18px}
#chatSuggestions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#chatSuggestions button {font-size:.86rem;line-height:1.45;text-align:left;border-radius:12px;min-height:54px}
#messages {padding:12px 16px;min-height:0;overflow:auto;overscroll-behavior:contain;flex:1;overflow-wrap:anywhere}
#messages:empty {flex:0;padding:0}
#chatLatest {align-self:center;padding:3px 9px;font-size:.8rem}
.message {margin-bottom:18px;line-height:1.5}
.msgQ {width:fit-content;max-width:88%;margin-left:auto;background:#e6f0fb;color:#173a60;border-radius:15px 15px 4px 15px;padding:9px 14px}
.message .notice {font-size:.85rem;padding:8px 10px}
.votes button {font-size:.78rem;margin-right:6px;padding:4px 8px}
#questionForm {padding:10px 12px;background:white;margin:0}
.composeBox {position:relative;border:2px solid #53697c;border-radius:14px;background:white}
.composeBox:focus-within {border-color:var(--blue);box-shadow:0 0 0 2px #dce9f5}
#question {display:block;min-height:54px;max-height:180px;width:100%;resize:none;border:0;outline:0;background:transparent;font-size:16px;line-height:24px;padding:15px 59px 15px 14px;overflow-y:auto}
.sendChat {position:absolute;right:5px;bottom:5px;width:44px;height:44px;display:grid;place-items:center;padding:0;border:0;border-radius:50%;background:var(--blue);color:white}
.sendChat:hover {background:#143a5d}
@media(max-width:520px) {#chat {right:6px;bottom:72px;width:calc(100vw - 12px);height:calc(100dvh - 82px)}#chatLauncher{right:12px;bottom:10px}}
#toast:not(:empty) {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: #203341;
  color: white;
  padding: 9px 14px;
  border-radius: 8px;
  z-index: 20;
}
details {
  margin: 12px 0;
}
details summary {
  list-style: none;
  position: relative;
  padding-inline-start: 22px;
  font-weight: 600;
}
details summary::-webkit-details-marker {
  display: none;
}
details summary::before {
  content: "";
  position: absolute;
  inset-inline-start: 2px;
  top: 50%;
  width: 14px;
  height: 14px;
  background: url("./chevron-down.svg") center / contain no-repeat;
  transform: translateY(-50%) rotate(-90deg);
}
details[open] > summary::before {
  transform: translateY(-50%);
}
@media (forced-colors: active) {
  details summary { list-style: revert; padding-inline-start: 0; }
  details summary::-webkit-details-marker { display: revert; }
  details summary::before { display: none; }
}
#modalBody {
  overflow-wrap: anywhere;
}
#modalBody form:not([method="dialog"]) > .primary {
  margin-top: 14px;
}
.terms {
  margin-bottom: 16px;
}
.compact {
  font-size: 0.86rem;
}
button[hidden],
[hidden] {
  display: none !important;
}
@media (max-width: 820px) {
  #layout {
    grid-template-columns: 1fr;
  }
  #sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(280px, calc(100vw - 40px));
    transform: translateX(-100%);
    /* Hidden off-canvas controls must not receive keyboard focus. */
    visibility: hidden;
    box-shadow: 0 2px 22px #17293b25;
  }
  body.navOpen #sidebar {
    transform: none;
    visibility: visible;
  }
  #menu {
    display: block;
  }
  .top {
    height: 56px;
  }
  .searchLaunch {
    gap: 7px;
  }
  .pageHead {
    align-items: flex-start;
  }
  .pageHead .row {
    justify-content: flex-end;
  }
  main {
    padding-top: 18px;
  }
}
@media (max-width: 500px) {
  #chat {
    right: max(8px, env(safe-area-inset-right));
    width: calc(100% - 16px - env(safe-area-inset-right) - env(safe-area-inset-left));
  }
  .formGrid {
    grid-template-columns: 1fr;
  }
  .pageHead {
    flex-wrap: wrap;
  }
  .filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filters > label:first-child {
    grid-column: 1/-1;
  }
  .filters input[type="search"] {
    min-width: 0;
  }
  .paper {
    padding: 3px;
  }
  th,
  td {
    padding: 8px;
  }
  .grid {
    gap: 8px;
  }
}

.guideImage {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 12px 0 6px;
  cursor: zoom-in;
}
.guideImage img {
  display: block;
  width: min(560px, 100%);
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

#sidebar nav a {display:block; border-radius:6px; text-decoration:none}
#sidebar nav a:hover, .topicNav a:hover {background:#edf3f8}
.guideLayout {display:grid;grid-template-columns:clamp(175px,20vw,232px) minmax(0,1fr);gap:clamp(16px,3vw,44px);align-items:start}
.guideLayout > :not(nav), .tableFrame { min-width: 0; }
#adminContent > .sectionHead:first-child { margin-top: 0; }
.inboxToolbar { flex-wrap: wrap; gap: 8px 16px; }
.inboxToolbar .row { gap: 8px; }
.inboxToolbar button { height: 38px; }
.tableBox table[aria-label="Upload inbox"] { min-width: 55rem; }
table[aria-label="Upload inbox"] td { vertical-align: middle; }
table[aria-label="Upload inbox"] :is(th, td):nth-child(4) { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table[aria-label="Upload inbox"] time span { white-space: nowrap; }
.inboxCell, .inboxActions { display: flex; align-items: center; gap: 6px; }
.inboxCell > span { min-width: 0; overflow-wrap: anywhere; }
.inboxActions { flex-wrap: wrap; }
.inboxActions button { white-space: nowrap; min-height: 32px; padding: 4px 8px; }
.inboxIcon { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; min-height: 30px; padding: 0; color: var(--blue); background: transparent; border: 1px solid transparent; border-radius: 5px; }
.inboxIcon::before { margin: 0; }
.inboxIcon:hover, .inboxIcon:focus-visible { background: #eef4f9; border-color: var(--line); }
.uploadRegister { container: upload-inbox / inline-size; }
td small.inboxInlineSize, .inboxFileDetails { display: none; }
@container upload-inbox (max-width: 57rem) {
  .uploadRegister .tableBox table[aria-label="Upload inbox"] { min-width: 0; }
  table[aria-label="Upload inbox"] :is(th, td) { padding-inline: 8px; }
  table[aria-label="Upload inbox"] :is(th, td):nth-child(4) { display: none; }
  td small.inboxInlineSize { display: block; }
}
@container upload-inbox (max-width: 42rem) {
  table[aria-label="Upload inbox"] :is(th, td):nth-child(n+2):nth-child(-n+6) { display: none; }
  table[aria-label="Upload inbox"] td { vertical-align: top; }
  table[aria-label="Upload inbox"] td:last-child { width: 1%; }
  .inboxFileDetails { display: block; }
}
@media (pointer: coarse) {
  .inboxIcon, .inboxActions button, .inboxToolbar button { min-height: 44px; }
  .inboxIcon { min-width: 44px; }
}
.topicNav {position:sticky;top:76px;max-height:calc(100dvh - 96px);overflow:auto;display:grid;align-content:start;gap:3px;margin:0;padding:8px 16px 12px 0;border-right:1px solid var(--line)}
.topicNav h2 {font-size:.82rem;color:var(--sub);margin:12px 8px 3px}
.topicNav a {color:var(--ink);border-radius:6px;text-decoration:none;padding:7px 9px;line-height:1.35}
.topicNav a[aria-current="page"] {color:var(--blue);background:#e7eff8;font-weight:650}
.topicArticle {background:white;border:1px solid var(--line);border-radius:10px;padding:clamp(16px,3vw,32px);max-width:840px}
.topicArticle p {max-width:72ch;line-height:1.65}
.topicArticle .guideImage img {width:min(100%,720px)}
#guidePicker { display: none; }
@media(max-width:640px) {
  .guideLayout {grid-template-columns:minmax(0,1fr)}
  #guidePicker { display: block; width: 100%; min-height: 44px; }
  #guidePicker + nav { display: none; }
  .topicNav {position:static;max-height:none;grid-template-columns:repeat(2,minmax(0,1fr));border-right:0;border-bottom:1px solid var(--line)}
  .topicNav h2 {grid-column:1/-1}
}

.filters :is(select,input:not([type=checkbox]),button), .filters .check {min-height:38px}
.filters .check {align-self:end;line-height:1.25;gap:6px}
.filters .check input {margin:0}
.brand {gap:8px;font-weight:650;letter-spacing:-.035em}
.brand img {width:32px;height:32px;flex:none}

.guidanceForm {max-width:820px;display:grid;gap:12px}
.guidanceIndex {max-width:820px;margin:0 0 12px;padding:10px 16px}
.guidanceIndex summary {cursor:pointer;font-weight:600}
.guidanceIndexBody {display:grid;gap:8px;margin-top:10px}
.guidanceIndexBody > :is(p,ul) {margin:0}
.guidanceIndexBody input {min-width:0;max-width:100%}
.guidanceIndexBody ul {list-style:none;padding:0}
.guidanceIndexBody li {padding:6px 0;overflow-wrap:anywhere;border-bottom:1px solid var(--line)}
.guidanceIndexBody small,.guidanceMatch {color:var(--sub);font-size:.85rem}
.guidanceMatch .linkBtn {font:inherit}
.guidanceForm fieldset {display:grid;gap:9px;margin:0 0 12px;border:1px solid var(--line);border-radius:8px;padding:12px}
.guidanceForm fieldset button {justify-self:start}
.tableFrame {position:relative;min-width:0}
.tableActions {display:flex;justify-content:flex-end;padding:0 0 4px}
.expandTable {min-height:26px;padding:2px 7px;font-size:.76rem;color:var(--sub)}
dialog.expandedTable[open] {position:fixed;inset:0;width:100%;height:100%;max-width:100%;max-height:100dvh;margin:0;border:0;border-radius:0;overflow:auto;padding:16px;background:var(--surface,white);display:flex;flex-direction:column}
.advancedFilters summary {cursor:pointer;padding-block:7px;padding-inline-end:9px}
.filterFields {display:flex;flex-wrap:wrap;align-items:end;gap:8px;padding:8px 0}
@media (max-width:500px) {
  .advancedFilters[open] {grid-column:1/-1}
  .filterFields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .filterFields :is(label,select,input:not([type=checkbox])) {min-width:0;max-width:100%}
}
.requiredMark {color:#9a2222;display:inline}
.recordBack {display:inline-block}
main:has(> .recordTrail) {padding-top:10px}
.recordTrail {margin:0 0 7px;align-items:center;flex-wrap:wrap}
.recordTrail .recordBack {flex-shrink:0}
.recordParty {font-size:.83rem;color:var(--sub);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.recordTrail .row {gap:10px}
.recordTrail :is(a,button) {font-size:.86rem}
.recordTrail button {padding:4px 9px;min-height:30px}
.recordLegal svg,.readerNewTab svg {display:none}
.discussionLayout > .readerInlineHost > .agreementReader { margin:0 0 6px; }
.recordReview {margin:0;border-block:1px solid var(--line);color:var(--sub);background:#f7f9fb;font-size:.83rem}
.recordReview.attention {color:#63480e;background:#fffaec}
.recordReview summary {display:flex;align-items:center;flex-wrap:wrap;gap:3px 12px;padding:4px 10px 4px 27px;min-height:28px}
.recordReview summary::before {inset-inline-start:8px}
.recordReview .reviewDate {margin-left:auto;font-weight:400;white-space:nowrap}
.reviewExplanation {display:flex;gap:10px 18px;align-items:start;flex-wrap:wrap;padding:5px 10px 9px}
.reviewExplanation p {margin:2px 0}
.reviewExplanation label {font-size:.8rem}
@media(max-width:480px) {
  .recordParty {display:none}
  .recordTrail .row {gap:6px}
  .recordTrail {gap:3px 8px;margin-bottom:2px}
  .recordTrail :is(a,button), .recordReview summary {min-height:44px}
  .recordTrail .readerNewTab {width:44px;justify-content:center}
  .readerNewTab span {display:none}
  .readerNewTab svg {display:block}
  .recordReview .reviewDate {margin-left:0}
}
@media (max-width: 390px) {
  main:has(> .recordTrail) {padding-inline:8px}
  .recordTrail {gap:4px}
  .recordTrail .row {gap:3px}
  .recordTrail .recordBack {display:inline-flex;align-items:center;justify-content:center;width:44px;font-size:0}
  .recordTrail .recordBack::before {content:"←";font-size:1.15rem}
  .readerHead {gap:4px;padding-inline:4px}
  .readerChoice select {width:104px;font-size:.83rem;padding-inline-start:6px;padding-inline-end:18px;background-position:right 4px center}
}
.tableActions {align-items:center;gap:6px;flex-wrap:wrap}
.columnMenu {position:relative}
.columnMenu summary {cursor:pointer;padding-block:4px;padding-inline-end:8px;min-height:28px;color:var(--sub);font-size:.85rem}
.columnMenu fieldset {position:absolute;right:0;top:100%;z-index:6;min-width:170px;background:white;border:1px solid var(--line);border-radius:8px;padding:6px 10px;box-shadow:0 5px 18px #17293b20}
.columnMenu label {display:flex;align-items:center;gap:8px;padding:4px 0}
.columnMenu input {width:auto}
.columnMenu legend {font-size:.8rem;padding:0 3px}
.pager label {display:flex;align-items:center;gap:6px}
.pager select {width:auto}
@media (max-width: 650px), (pointer: coarse) {
  .agreementReader :is(button,select,input,.readerNative),
  .filters :is(button,select,input:not([type="checkbox"]),.check,summary),
  .tableActions :is(button,summary), .pager :is(button,select),
  th > button, .recordBack, .readerNewTab {
    min-height:44px;
  }
  .agreementReader .readerNative, .recordBack, .readerNewTab, .tableActions summary, .advancedFilters summary {
    display:inline-flex;
    align-items:center;
  }
  .readerGroup button, .readerHead button, .readerChoice button {min-width:44px}
}
#navClose,#navBackdrop {display:none}
@media(max-width:820px){
 #navClose {display:block;align-self:flex-end}
 #navBackdrop:not([hidden]) {position:fixed;inset:0;display:block;z-index:5;margin:0;border:0;border-radius:0;background:#15284455}
 body.navOpen #sidebar {z-index:6}
}
@media print {
 #sidebar,.top,.filters,.pager,.tableActions,#chatLauncher,#chat,.toast,.pageHead button {display:none!important}
 #layout,.body,.tableBox,.tableFrame {display:block;height:auto;max-height:none;overflow:visible}
 .tableBox thead {display:table-header-group}
 .tableBox tr {break-inside:avoid}
}
.expandedTable > .tableBox {flex:1;max-height:none;overflow:auto}
.expandedTable .tableActions {position:sticky;top:0;background:white;z-index:2;padding-bottom:9px}
body.hasExpandedTable {overflow:hidden}

#sidebar .searchLaunch {gap:9px;width:100%;margin:0 0 8px;min-height:40px}
#sidebar .searchLaunch kbd {margin-inline-start:auto}
.top {display:none}
.companyWrap {position:relative}
#companyPicker {width:100%;text-align:left;min-height:40px;font-weight: 400;padding-inline:12px 32px;background:white url("./chevron-down.svg") right 12px center / 14px no-repeat}
#companyPicker[aria-expanded=true] {border-color:var(--blue)}
#companyList {position:absolute;top:calc(100% + 4px);width:100%;max-height:44vh;overflow:auto;background:white;border:1px solid var(--border);padding:4px;border-radius:9px;box-shadow:0 8px 25px #1b365326;z-index:5}
#companyList [role=option] {border-radius:5px;padding:8px 26px 8px 8px;position:relative;cursor:pointer}
#companyList [aria-selected=true] {font-weight:600}
#companyList [aria-selected=true]::after {content:"✓";position:absolute;right:8px;color:var(--blue)}
#companyList .moving,#companyList [role=option]:hover {background:#e7eff8}
#palette {padding:0;border-radius:16px;width:min(680px,95vw);overflow:hidden}
#palette::backdrop {background:#17212c44}
.paletteHead {padding:12px 16px;margin:0;border-bottom:2px solid var(--blue)}
.paletteHead button {border:0;font-size:1.2rem}
.paletteHead #paletteClear {font-size:.875rem;color:var(--blue)}
#paletteRows {overflow-y:auto;max-height:min(49vh,420px);padding:6px}
#paletteRows:empty {padding:0}
.pickGroup {color:var(--sub);font-size:.78rem;font-weight:600;padding:5px 9px}
#paletteRows .option {border-radius:8px;font-weight:500}
.option span[aria-hidden] {float:right;color:var(--sub)}
@media(max-width:820px){.top{display:flex}#mobileSearch{width:auto}.topicNav{top:12px}}

#sidebar .searchLaunch {font-weight: 600;border-color:#879bae}
#paletteQ {flex:1;min-width:0;width:100%;min-height:40px;max-height:170px;resize:none;line-height:1.5;border:0;outline:none;overflow:auto;font-size:1rem}
.paletteHead:focus-within {border-bottom-color:var(--blue)}
.paletteFooter {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 12px;padding:8px 12px;border-top:1px solid var(--border)}
.paletteFeedback {display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px}
.paletteFeedback #paletteStatus {margin:0}
#paletteAsk {margin-left:auto;font-weight:600;color:var(--blue)}
#paletteRows .option {padding:7px 10px}
#chatLauncher {width:60px;height:60px}
#chat {width:min(520px,calc(100vw - 40px))}
@media(max-width:520px) {#chat {width:calc(100vw - 12px)}}
.advancedFilters {margin:0}
.advancedFilters > summary {min-height:38px;display:inline-flex;align-items:center}
.advancedFilters[open] {flex-basis:100%;order:10}
.filterFields {padding:0 0 4px}
.pager label {flex-direction:row}
/* The expanded reader uses the whole window apart from a thin margin. */
.readerDialog:not(.readerFullScreen) {width:calc(100vw - 24px);max-width:none;height:calc(100dvh - 24px);max-height:none}

/* Keep the record filters and table actions together without stretching checkboxes. */
#filters {
  display: block;
  margin: 0 0 8px;
}
#filters .filterPrimary {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 6px 10px;
}
#filters :is(.filterPrimary, .filterFields) > label:not(.check), .filterPrimary > .filterType, .filterFields > .filterDivision {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  min-width: 0;
  margin: 0;
}
.filterPrimary > .clearableSearch { flex: 2 1 180px; }
.clearableSearch { position: relative; min-width: 0; }
.clearableSearch input[type=search] { padding-inline-end: 44px; }
.clearableSearch input::-webkit-search-cancel-button { display: none; }
.clearableSearch .searchClear {
  position: absolute; inset-block: 0; inset-inline-end: 0;
  display: grid; place-items: center; width: 38px; min-height: 0;
  padding: 0; border: 0; background: transparent; color: var(--sub);
}
.clearableSearch .searchClear:is(:hover,:focus-visible) { color: var(--blue); background: #eaf2f9; }
.clearableSearch .searchClear:focus-visible { outline-offset: -3px; }
.filterPrimary > .filterType { flex: 1 1 130px; }
#typeFilterLabel, #divisionFilterLabel {font-size: .8rem; font-weight: 600;}
.filterChoiceButton {
  width: 100%;
  height: 38px;
  text-align: start;
  padding-inline: 10px 32px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: white url("./chevron-down.svg") right 12px center / 14px no-repeat;
  border-color: var(--field-border);
  font-size: .9rem;
  font-weight: 500;
}
.filterChoiceButton[aria-expanded=true] { border-color: var(--blue); }
.filterChoiceMenu {
  position: fixed;
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  max-height: 360px;
  overflow: auto;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 5px 20px #17293b26;
}
.filterChoiceMenu input[type=search] { width: 100%; min-height: 36px; flex: none; }
.typeChoicesActions { display: flex; align-items: center; gap: 6px; }
.typeChoicesActions button {
  min-height: 30px; padding: 2px 6px; border: 0; background: transparent;
  color: var(--blue); font-size: .85rem;
}
.typeChoicesList { overflow-y: auto; overscroll-behavior: contain; }
.typeChoicesList label:not([hidden]) {
  display: flex; flex-direction: row; align-items: center; gap: 9px;
  min-height: 32px; padding: 4px 6px; margin: 0; border-radius: 4px;
  font-size: .9rem; font-weight: 400; cursor: pointer;
}
.typeChoicesList label:is(:focus-within, :hover) { background: #edf3f8; }
.typeChoicesList input { flex: none; width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: var(--blue); }
.typeChoicesList small { margin-inline-start: auto; font-variant-numeric: tabular-nums; }
.typeChoicesEmpty { margin: 4px 6px; font-size: .85rem; color: var(--sub); }
#filters .filterPrimary :is(input[type=search], select), #filters .filterFields :is(select, input:not([type=checkbox])) {
  width: 100%;
  min-width: 0;
  height: 38px;
  font-size: .9rem;
}
#filters .filterCommands, #libraryTableActions .tableActions, .libraryFilterStatus {
  display: flex;
  align-items: center;
  gap: 6px;
}
.filterCommands { flex: none; }
#libraryTableActions { flex: none; margin-inline-start: auto; }
#libraryTableActions:empty { display: none; }
#libraryTableActions .tableActions { flex-wrap: nowrap; padding: 0; }
.filterPrimary .libraryFilterStatus {
  order: 1;
  flex-basis: 100%;
  color: var(--sub);
  font-size: .8rem;
}
.libraryFilterStatus:not(:has(> :not([hidden]))) { display: none; }
#filters #resetFilters {
  min-height: 28px;
  padding: 2px 4px;
  border: 0;
  color: var(--blue);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 2px;
}
#filters .filterFields:not([hidden]) {
  display: grid;
  grid-template-columns: minmax(110px, 1.15fr) minmax(104px, 1fr) repeat(2, minmax(124px, 1fr)) max-content;
  align-items: end;
  gap: 6px 10px;
  margin-top: 8px;
  padding: 0;
}
#filters .filterFields .check {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-height: 38px;
  margin: 0;
  white-space: nowrap;
}
#filters .filterFields .check input, .tableActions .columnMenu input[type=checkbox] {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  min-height: 16px;
  max-width: 16px;
  padding: 0;
  margin: 0;
  accent-color: var(--blue);
}
#libraryTableActions :is(summary, .expandTable),
.expandedTable .columnMenu summary, .expandedTable .expandTable {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding-block: 6px;
  padding-inline-end: 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: inherit;
  background-color: white;
  font-size: .85rem;
  white-space: nowrap;
}
#libraryTableActions :is(summary,.expandTable):hover,
.expandedTable .tableActions :is(summary,.expandTable):hover { background-color: #eaf2f9; }
.readerHead .iconAction, .tableActions .iconAction,
#libraryTableActions .iconAction, .expandedTable .tableActions .iconAction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  line-height: 1;
}
#libraryTableActions .iconAction, .expandedTable .tableActions .iconAction {width: 38px; height: 38px}
.iconAction svg {flex: none; pointer-events: none}
@media (max-width: 650px), (pointer: coarse) {
  .clearableSearch .searchClear { width: 44px; }
  .readerHead .iconAction, .tableActions .iconAction,
  #libraryTableActions .iconAction, .expandedTable .tableActions .iconAction {
    width: 44px; height: 44px; min-width: 44px; min-height: 44px;
  }
}
.tableActions .columnMenu { position: relative; margin: 0; }
.tableActions .columnMenu fieldset {
  inset-inline: auto 0;
  top: calc(100% + 3px);
  width: max-content;
  min-width: 11rem;
  max-width: min(16rem, calc(100vw - 32px));
  margin: 0;
  padding: 6px 10px 8px;
  z-index: 8;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.tableActions .columnMenuAbove fieldset { top: auto; bottom: calc(100% + 3px); }
.tableActions .columnMenu legend { float: left; width: 100%; padding: 0 0 3px; color: var(--sub); font-weight: 600; }
.tableActions .columnMenu label:first-of-type { clear: both; }
.tableActions .columnMenu label {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 30px;
  margin: 0;
  padding: 2px 0;
  color: inherit;
  font-size: .86rem;
  white-space: normal;
  cursor: pointer;
}
@media (max-width: 1000px) and (min-width: 821px) {
  #filters .filterFields:not([hidden]) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 650px), (pointer: coarse) {
  #filters .filterPrimary :is(input[type=search], select, button, summary),
  #filters .filterFields :is(select, input:not([type=checkbox]), .check),
  .expandedTable .tableActions :is(summary, button) { min-height: 44px; }
  .tableActions .columnMenu label, .typeChoicesList label:not([hidden]), .typeChoicesActions button,
  .filterChoiceMenu input[type=search] { min-height: 44px; }
}
@media (max-width: 650px) {
  #filters .filterPrimary { display: grid; grid-template-columns: minmax(0,1fr) max-content; gap: 6px 8px; }
  .filterPrimary > .clearableSearch, .filterPrimary .libraryFilterStatus, #libraryTableActions { grid-column: 1/-1; }
  #libraryTableActions { justify-self: start; }
  #filters .filterFields:not([hidden]) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filterPrimary #libraryTableActions { margin-inline-start: 0; }
  #libraryTableActions .columnMenu fieldset { inset-inline: 0 auto; }
}

#chatResize {display: none}
#chatHistoryList .historyStatus {margin: 6px 0; color: var(--muted)}
#chatHistoryList .historyStatus:empty {display: none}
#chatHistoryList .historyMore {margin-top: 8px}
@media (min-width: 521px) {
  #chat {
    width: min(var(--chat-width, 800px), calc(100vw - 40px));
    height: min(var(--chat-height, calc(100dvh - 100px)), calc(100dvh - 100px));
  }
  #chat header {padding-left: 28px}
  #chatResize {
    display: block;
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: white;
    background: transparent;
    cursor: nwse-resize;
    touch-action: none;
  }
  #chatResize::before {
    display: block;
    width: 11px;
    height: 11px;
    margin: auto;
    content: "";
    background: linear-gradient(135deg,transparent 27%,currentColor 28% 39%,transparent 40% 56%,currentColor 57% 68%,transparent 69%);
  }
  #chatResize:hover, #chatResize:focus-visible {background: #ffffff30}
}


/* Keep glyphs on their native pixel grid in text controls and menus. */
#filters .filterChoiceButton, #filters .filterPrimary input[type=search], .filterCommands button, #libraryTableActions .tableActions :is(button,summary) {
  font-family: system-ui, sans-serif; font-size: 14px; font-weight: 500; line-height: 20px;
}
#chatScope { display:flex; align-items:center; gap:4px; padding:4px 12px; border-block:1px solid var(--line); background:#edf3f9; color:#193852; }
#chatScope strong { flex:1; min-width:0; font-size:14px; line-height:20px; font-weight:600; }
#chatScope button { display:grid; place-items:center; width:32px; height:32px; flex:none; padding:0; }
.chatScopeModes { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:8px; }
#paletteModes { margin:0; padding:8px 12px; border-bottom:1px solid var(--border); }
.chatScopeModes button { min-height:32px; padding:4px 9px; background:transparent; border:1px solid transparent; }
.chatScopeModes button[aria-pressed="true"] { color:var(--blue); background:#e7f0fa; border-color:#abc4df; }
.chatScopeModes + input[type=search], input:has(+ .chatAgreementChoices) { width:100%; }
.scopeSearchStatus:empty { display:none; }
@media (pointer:coarse) { .chatScopeModes button { min-height:44px; } }
.chatAgreementChoices { max-height:min(54dvh,420px); overflow:auto; }
.chatAgreementChoices small { color:var(--sub); }
.answerPoints { margin:6px 0; padding-inline-start:21px; }
.answerPoints li { margin-block:6px; }
.message .answerRef { display:inline-flex; align-items:center; justify-content:center; min-width:24px;
  border:0; background:transparent; color:var(--blue); padding:1px 3px; min-height:24px;
  text-decoration:none; font-size:13px; line-height:20px; font-weight:600; vertical-align:baseline; }
.message .answerRef:hover { text-decoration:underline; }
.answerSources, .answerLimit { margin:6px 0; font-size:14px; }
.answerSources ol { list-style:none; padding-left:4px; }
.answerSources li { margin-block:6px; }
.answerSources small { display:block; color:var(--sub); }
.message textarea[data-manual-copy] { display:block; width:100%; min-height:84px; }

#filters .filterPrimary input[type=search]::placeholder { font-weight:400; color:#536373; opacity:1; }

/* ---- Design pass, November 20: one size, spacing and color system across screens ---- */

/* Text stays at 12px or larger, and fields share the button radius. */
kbd, .tag, .pickGroup, th, .filters label, .docMeta dt, .columnMenu legend { font-size: .8rem; }
input, select, textarea { border-radius: 7px; }

/* Status words carry the shared colors: green for current, gray for ended. */
.tag[data-tag="active"], .tag[data-tag="governing"] { background: #e4f3ea; color: #14532d; }
.tag[data-tag="ended"], .tag[data-tag="inactive"] { background: #eceff2; color: #46525d; }

/* Unavailable buttons stay legible instead of fading out. */
button:disabled { opacity: 1; color: #5f6d79; background: #f3f5f7; border-color: var(--line); }
button:disabled:hover { background: #f3f5f7; }
.primary:disabled, .primary:disabled:hover { color: #fff; background: #7d95ac; border-color: #7d95ac; }
.sendChat:disabled { color: #fff; background: #7d95ac; }

/* A heading keeps a little air before the controls or text it introduces. */
#main :not(.sectionHead, .modalHead, .pageHead > div) > h2 { margin-bottom: 8px; }
#main :not(.sectionHead) > h2 + a:where(:not(nav a)) { display: inline-block; margin-bottom: 8px; }

/* Every data table shares the agreement list's header. */
@media screen {
  .tableBox thead th {
    background: #224463;
    color: #fff;
    font-size: .83rem;
    font-weight: 600;
    vertical-align: middle;
    border-bottom-color: #193951;
    padding-block: 8px;
  }
  .tableBox thead th[aria-sort] { background: #153854; }
  .tableBox thead th > button, .tableBox thead th > button:hover { color: inherit; }
  .tableBox thead th > button:is(:hover, :focus-visible) { background: #153854; color: white; text-decoration: underline; text-underline-offset: 3px; }
  .tableBox thead th > button:focus-visible { outline-color: currentColor; }
}
@media screen and (forced-colors: none) {
  .tableBox thead th[aria-sort] > button::after {
    background: currentColor;
    mask: url("./chevron-down.svg") center / contain no-repeat;
  }
}

/* Tables use the height the window has instead of stopping two thirds down. */
.tableBox { max-height: max(340px, calc(100dvh - 228px)); }
table[aria-label="Activity"] td:first-child summary { white-space: nowrap; }

/* While all columns fit, the full-screen control rides in the header row. */
@media (min-width: 651px) and (pointer: fine) {
  .tableFrame.tableFits > .tableActions:not(:has(.columnMenu, .tableRowSearch:not([hidden]))) {
    position: absolute;
    top: var(--header-center, 20px);
    transform: translateY(-50%);
    right: 5px;
    z-index: 2;
    padding: 0;
  }
  .tableFrame.tableFits > .tableActions:not(:has(.columnMenu, .tableRowSearch:not([hidden]))) .iconAction {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    border-color: #ffffff55;
    background: transparent;
    color: #fff;
  }
  .tableFrame.tableFits > .tableActions:not(:has(.columnMenu, .tableRowSearch:not([hidden]))) .iconAction:hover { background: #ffffff26; }
  .tableFrame.tableFits > .tableActions:not(:has(.columnMenu, .tableRowSearch:not([hidden]))) .iconAction:focus-visible { outline-color: #fff; }
  .tableFrame.tableFits > .tableActions:not(:has(.columnMenu, .tableRowSearch:not([hidden]))) + .tableBox thead th:last-child { padding-inline-end: 46px; }
}

/* Filter rows: one control height and text size on every screen. */
.filters :is(select, input:not([type="checkbox"], [type="radio"])),
form.formGrid[aria-label^="Filter"] :is(select, input:not([type="checkbox"], [type="radio"])) {
  height: 38px;
  font-size: 14px;
  font-weight: 400;
}
.filters > button, form.formGrid[aria-label^="Filter"] > button { height: 38px; font-size: 14px; }
.filters .check, form.formGrid[aria-label^="Filter"] > .check {
  min-height: 38px;
  gap: 7px;
  font-size: .8rem;
  white-space: nowrap;
}
.check input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }

/* Administration filters sit on a line or two instead of a tall two-column form. */
form.formGrid[aria-label^="Filter"] {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 10px;
  margin-bottom: 10px;
}
form.formGrid[aria-label^="Filter"] > label:not(.check) { flex: 1 1 150px; min-width: 0; }
form.formGrid[aria-label^="Filter"] > label:not(.check) :is(input, select) { width: 100%; }
form.formGrid[aria-label^="Filter"] > button { flex: none; }

/* Pager, preferences and developer rows line their controls up. */
.pager :is(button, select) { height: 36px; }
.pager label { font-size: .8rem; }
/* The last pager control stays clear of the Ask AI button in the corner. */
.pager { padding-inline-end: 52px; }
.expandedTable > .pager { padding-inline-end: 0; }
table[aria-label="Agreement dates"] td:first-child { min-width: 0; white-space: nowrap; }
table[aria-label="Agreement dates"] td:nth-child(3) { min-width: 220px; }
form.panel:has(> #displayZone) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
form.panel:has(> #displayZone) > label { flex-basis: 100%; }
form.panel:has(> #displayZone) > :is(input, button) { height: 38px; }
form.panel:has(> #displayZone) > p { flex-basis: 100%; margin: 0; }
.panel[aria-labelledby="courtListenerHeading"] { margin-top: 16px; }
.panel[aria-labelledby="courtListenerHeading"] h2 { margin-top: 0; }
.panel[aria-labelledby="courtListenerHeading"] [role="status"]:empty { margin: 0; }
nav[aria-label="Developer sections"] { align-items: flex-end; margin: 0 0 14px; }
nav[aria-label="Developer sections"] > label { margin-inline-start: auto; }
nav[aria-label="Developer sections"] select { height: 38px; font-size: 14px; }
select[aria-label="Provider model directory"] { width: 100%; }

/* Search results: the return mark sits beside each row, centered, not under it. */
#paletteRows .option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
}
#paletteRows .option > small { grid-column: 1; }
#paletteRows .option > span[aria-hidden] { grid-column: 2; grid-row: 1 / span 2; float: none; }

/* Small links and disclosures meet the 24px pointer minimum. */
.recordTrail a { padding-block: 4px; }
details > summary { min-height: 28px; display: flex; align-items: center; }
.columnMenu summary, .advancedFilters > summary { display: inline-flex; }

/* Phones and touch screens: 44px targets, tables that scroll instead of crushing a column. */
@media (max-width: 650px), (pointer: coarse) {
  :where(button, select, summary, textarea, [role="option"], #sidebar nav a, .topicNav a, .viewSwitch a,
    input:not([type="checkbox"], [type="radio"], [type="file"], [type="range"])):not(.linkBtn, .answerRef, #chatResize) {
    min-height: 44px;
  }
  #sidebar nav a, .topicNav a, #companyList [role="option"] {
    display: flex;
    align-items: center;
    min-height: 44px;
  }
  #companyList [aria-selected="true"]::after { top: 50%; transform: translateY(-50%); }
  #menu, .chatActions button, #chatScope button, .paletteHead button, .modalHead button { min-width: 44px; min-height: 44px; }
  .chatActions button { width: 44px; height: 44px; }
  #paletteQ, #filters #resetFilters, .recordTrail :is(a, button), .filters > button,
  form.formGrid[aria-label^="Filter"] :is(select, input:not([type="checkbox"], [type="radio"]), button),
  .filters :is(select, input:not([type="checkbox"], [type="radio"])), .pager :is(button, select),
  nav[aria-label="Developer sections"] select, form.panel:has(> #displayZone) > :is(input, button) {
    min-height: 44px;
    height: auto;
  }
  .recordTrail a, #filters #resetFilters { display: inline-flex; align-items: center; }
  th > button { min-width: 44px; }
  #sidebar .searchLaunch, #companyPicker { min-height: 44px; }
  .check, .columnMenu label { min-height: 44px; }
  .check input, .columnMenu input[type="checkbox"], .typeChoicesList input { width: 20px; height: 20px; flex-basis: 20px; max-width: 20px; }
}
@media (max-width: 650px) {
  .filters .check, form.formGrid[aria-label^="Filter"] > .check { white-space: normal; }
  .pager { flex-wrap: wrap; padding-inline-end: 64px; }
  .tableBox table:not([aria-label="Agreements"]) { min-width: 540px; }
  .sectionHead { flex-wrap: wrap; }
  nav[aria-label="Developer sections"] > label { margin-inline-start: 0; flex-basis: 100%; }
}

@media (max-width:480px) {
  .recordTrail .recordLegal {width:44px;justify-content:center;padding-inline:0}
  .recordLegal span {display:none}
  .recordLegal svg {display:block}
}

/* ---- Design pass, round 2: dialogs, the agreement record, and the legal assistant ---- */

/* A dialog section keeps space between the control above and its heading. */
#modalBody h3 { margin: 16px 0 6px; }
#modalBody > h3:first-child { margin-top: 0; }

/* A record with no related documents shows its role without an empty card. */
.panel:has(> .tag:only-child) { padding: 0; border: 0; box-shadow: none; background: transparent; }

/* The reader's layout menu shows its whole label on a phone. */
/* Below 360px the menu keeps its narrow width so the reader's actions stay on one row. */

/* Legal assistant: its controls match the size used in every other filter row. */
#main .legalContext :is(select, input:not([type="checkbox"], [type="radio"])) { height: 38px; font-size: 14px; }
#main .legalContext label { font-size: .8rem; }
/* A checkbox sits beside its words, on the same line as the other controls. */
#main .legalContext label:has(> input[type="checkbox"]) { display: flex; flex-direction: row; align-items: center; gap: 7px; min-height: 38px; }
#main .legalContext input[type="checkbox"] { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }
/* Zero specificity: a row's own link rules, such as the 44px phone size, still win. */
:where(.row > a) { display: inline-flex; align-items: center; min-height: 24px; }
@media (max-width: 650px), (pointer: coarse) {
  #main .legalContext :is(select, input:not([type="checkbox"], [type="radio"])) { min-height: 44px; height: auto; }
  #main .legalContext label:has(> input[type="checkbox"]) { min-height: 44px; }
  #main .legalContext input[type="checkbox"] { width: 20px; height: 20px; }
  :where(.row > a) { min-height: 44px; }
}

.srOnly { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.pager { justify-content:center; flex-wrap:wrap; }
.pager .pageSteps { display:inline-flex; align-items:center; gap:8px; white-space:nowrap; }
.pager button { display:inline-flex; align-items:center; justify-content:center; line-height:1; }
.recordTrail .recordIdentity {
  flex: 1 1 22rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: last baseline;
  column-gap: 12px;
}
.recordIdentity h1 { margin:0; font-size:1.15rem; overflow-wrap:anywhere; }
.recordIdentity h1:only-child { grid-column: 1 / -1; }
.recordDate { justify-self:end; font-size:.86rem; color:var(--sub); white-space:nowrap; }
.chatReplay { width:min(100%,34rem); margin:auto; padding:8px; overflow-wrap:anywhere; }
#modal:has(.chatReplay) { width:min(38rem,96vw); }
#modal:has(.chatReplay) .message + .message { border-top:1px solid var(--border); padding-top:10px; }

.developerArticle { min-width:0; }
.developerArticle > form { margin-bottom:12px; }
.costFilters { align-items: flex-end; }
.costFilters .customDates:not([hidden]) { display: contents; }
.costFilters :is(select, input, button) { height: 38px; }

.message .answerRef { text-align:start; overflow-wrap:anywhere; }

.usageMetrics {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 22px;
  margin: 0;
}
.usageMetrics > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; }
.usageMetrics dt { font-size: .83rem; color: var(--sub); }
.usageMetrics dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.billingDetails p { margin: 4px 0; }
.developerArticle .sectionHead { flex-wrap: wrap; gap: 4px 16px; }
.developerArticle .sectionHead a { font-size: .83rem; }
.downloadMark { display:none; }
@media (max-width:500px) {
  main:has(> .recordTrail) { padding-top:0; }
  .recordTrail { gap:0; margin-bottom:0; }
  .recordTrail .recordIdentity { flex-basis:100%; line-height:1.25; column-gap:8px; }
  .recordIdentity h1 { font-size:1rem; }
  .recordIdentity .recordDate { font-size:.78rem; }
  .recordTrail .row { justify-content:flex-start; }
  .readerHead { gap:2px; }
  .readerHead .readerNative { width:44px; padding:0; }
  .readerHead .downloadLabel { display:none; }
  .readerHead .downloadMark { display:block; }
}
@media (max-width:359px) {
  .readerChoice select { width:106px; font-size:.8rem; padding-right:16px; }
}

/* Pagination: count on the left, page size and steps on the right, all on one baseline. */
.pager { justify-content: center; gap: 8px 12px; padding-inline: 0; font-size: .86rem; color: var(--sub); }
.expandedTable > .pager { padding-inline-end: 0; }
.pager label { flex-direction: row; align-items: center; gap: 8px; margin-left: 0; font-size: .86rem; font-weight: 500; color: var(--sub); }
.pager select { height: 34px; min-height: 34px; padding-block: 0; }
.pager .pageSteps { display: inline-flex; align-items: center; gap: 6px; }
.pager .pageSteps button { height: 34px; min-height: 34px; gap: 4px; padding: 0 10px; font-size: .86rem; color: var(--blue); }
.pager .pageSteps button:first-child { padding-left: 6px; }
.pager .pageSteps button:last-child { padding-right: 6px; }
.pager .pageSteps button:disabled { color: #9aa6b1; background: transparent; border-color: transparent; }
.pager .pageOf { min-width: 6.5em; text-align: center; color: #18252f; font-variant-numeric: tabular-nums; }
.pager [role="status"] { font-variant-numeric: tabular-nums; }
@media (max-width: 650px) { .pager { justify-content: center; } .pager label { margin-left: 0; } }

/* Conversation review: room to read, the facts up top, actions spaced below each answer. */
#modal:has(.reviewReplay) { width: min(52rem, 96vw); }
.chatReplay.reviewReplay { width: 100%; padding: 4px 6px 8px; }
.reviewFacts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafb; }
.reviewFacts div { min-width: 0; }
.reviewFacts dt { font-size: .74rem; font-weight: 600; letter-spacing: .02em; color: var(--sub); text-transform: uppercase; }
.reviewFacts dd { margin: 2px 0 0; font-size: .92rem; overflow-wrap: anywhere; }
.reviewFeedbackList { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 0; }
.reviewFeedback { padding: 5px 10px; border-radius: 14px; background: #eef2f6; font-size: .86rem; }
.reviewFeedback.good { background: #e6f4ea; color: #155724; }
.reviewFeedback.bad { background: #fdecea; color: #8a1c13; }
.reviewReplay .message { display: grid; gap: 10px; padding: 14px 0; }
.reviewReplay .message + .message { border-top: 1px solid var(--line); }
.reviewReplay .msgTime { margin: 0; font-size: .8rem; color: var(--sub); }
.reviewReplay .msgQ { justify-self: end; max-width: 85%; margin: 0; padding: 10px 14px; line-height: 1.5; }
.reviewReplay .reply { display: grid; gap: 10px; line-height: 1.6; }
.reviewReplay .reply > * { margin: 0; }
.reviewReplay .answerPoints { display: grid; gap: 8px; padding-left: 20px; }
.reviewReplay .answerRef { margin-left: 4px; }
.answerActions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px; border-top: 1px dashed var(--line); }
button.withIcon, a.withIcon { display: inline-flex; align-items: center; gap: 7px; }
button.withIcon svg, a.withIcon svg { flex: none; }

.ico-trash { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M10 11v6m4-6v6M6 7l1 13h10l1-13M9 7V4h6v3'/%3E%3C/svg%3E"); }
.ico-edit { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 5 4 4M4 20l4-1L20 7a2.8 2.8 0 0 0-4-4L4 15v5Z'/%3E%3C/svg%3E"); }
.ico-archive { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h18v4H3zM5 8v12h14V8M10 12h4'/%3E%3C/svg%3E"); }
.ico-revoke { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m5.6 5.6 12.8 12.8'/%3E%3C/svg%3E"); }
.ico-plus { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
.ico-share { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 14a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-1 1m2 5a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l1-1'/%3E%3C/svg%3E"); }
.ico-external { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6m0-6-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E"); }
.ico-sparkle { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8zM19 16l.8 2.2L22 19l-2.2.8L19 22l-.8-2.2L16 19l2.2-.8z'/%3E%3C/svg%3E"); }
.ico-scale { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M12 3v17m-6 1h12M3 6h18M6 6l-4 8h8L6 6Zm12 0-4 8h8l-4-8Z'/%3E%3C/svg%3E"); }
.ico-link { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 14a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-1 1m2 5a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l1-1'/%3E%3C/svg%3E"); }
.danger[class*="ico-"], button.ico-trash:hover, button.ico-revoke:hover { color: #a5281b; }

/* Agreement header actions: one button style, each with its icon. */
.recordTrail .row > :is(button, a.recordLegal, a.readerNewTab) {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 10px;
  border: 1px solid var(--border); border-radius: 7px; background: white; color: #18252f;
  font-size: .86rem; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.recordTrail .row > :is(button, a.recordLegal, a.readerNewTab):hover { background: #eef4f9; }
.recordTrail .row > a.recordLegal { flex-direction: row-reverse; }
.recordTrail .row > :is(a.recordLegal, a.readerNewTab) svg { display: block; width: 16px; height: 16px; }
.pageHead .row > button[class*="ico-"] { display: inline-flex; align-items: center; }

/* AI answer review: the question gets reading room; numbers stay on one line. */
table[aria-label="AI answer review"] td:first-child { min-width: 18rem; max-width: 28rem; }
table[aria-label="AI answer review"] td:first-child .linkBtn { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-align: left; }
table[aria-label="AI answer review"] td:not(:first-child) { white-space: nowrap; }

/* Group grants: scope, agreement types and capabilities in one form. */
.grantNote { margin: -4px 0 10px; }
.chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.chip { padding: 1px 8px; border-radius: 10px; background: #e8f0f8; color: #1d3f5f; font-size: .78rem; font-weight: 600; white-space: nowrap; }
#modal:has(.grantTypes) { width: min(44rem, 96vw); }
.grantTypes, .grantCaps, fieldset.wide { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; display: grid; gap: 6px; }
.grantTypes legend, .grantCaps legend, fieldset.wide legend { padding: 0 4px; font-weight: 600; }
/* A group of labelled fields keeps the gap a form gives them. */
fieldset.wide:not(.grantTypes, .grantCaps) { gap: 10px; min-width: 0; }
.grantTypeList, .grantCapList { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 2px 14px; max-height: 15rem; overflow: auto; }
.grantCapList { grid-template-columns: 1fr; max-height: none; }
.grantTypeList.muted { opacity: .5; }
.grantTypes .check, .grantCaps .check, .grantRestricted { margin: 0; flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400; }
.grantTypes .check input, .grantCaps .check input, .grantRestricted input { margin-top: 3px; }
.grantPresets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.chipButton { padding: 3px 10px; border-radius: 14px; font-size: .82rem; }
.chipButton:hover { background: #eef4f9; }
.grantTypeFilter { max-width: 16rem; }
.bulkDrop {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .6rem;
  border: 1px dashed #829ab2;
  border-radius: .55rem;
  padding: 1.15rem .75rem;
}
.bulkDrop.dragOver { background: #edf5fb; border-color: #15477a; }
#filingFlow { display: grid; gap: 14px; }
#filingFlow > :is([data-items], [data-result]):empty { display: none; }
#filingFlow > p { margin: 0; }
.filingOptions { display: flex; flex-wrap: wrap; align-items: end; gap: 4px 20px; }
.filingOptions > label { flex: 1 1 8rem; min-width: 0; }
.filingOptions select { width: 100%; min-width: 0; min-height: 40px; }
.filingDrop {
  position: relative;
  display: flex;
  flex-flow: row nowrap;
  gap: 12px;
  padding: 16px;
  background: #f5f8fb;
  color: var(--blue);
  font-weight: 400;
  cursor: pointer;
}
.filingDrop:hover, .filingDrop:focus-within { background: #edf5fb; border-color: var(--blue); }
.filingDrop:focus-within { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.filingDrop svg { flex: none; }
.filingDrop strong { text-decoration: underline; text-underline-offset: 2px; }
.filingDrop small { display: block; color: var(--sub); }
#filingFlow [data-items] { display: grid; gap: 8px; }
.filingFileState { display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.filingFileState > div { min-width: 0; overflow-wrap: anywhere; }
.filingFileState [role=status] { display: block; color: var(--sub); }
.filingFileState [data-retry] { min-height: 44px; }
#filingFlow .filingFailed { border-color: #ba7650; }
.filingFailed .filingFileState [role=status] { color: #88421d; }
.filingFooter, .filingLinks { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.filingFooter { border-top: 1px solid var(--line); padding-top: 10px; }
.filingLinks { flex: 1 1 auto; }
.filingLinks button { padding-inline: 0; }
.filingFooter [data-save] { margin-inline-start: auto; }
@media (max-width: 540px) {
  .filingOptions { gap: 4px 14px; }
  .filingOptions select, .filingFooter button { min-height: 44px; }
  .filingFooter { align-items: flex-end; }
  .filingLinks { flex: 1 1 min-content; align-items: flex-start; flex-direction: column; gap: 0; }
  .filingLinks button { text-align: start; }
  .filingDrop { justify-content: flex-start; }
}
#bulkQueue { list-style: none; padding: 0; max-height: 40vh; overflow: auto; }
#bulkQueue li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid #dce4ec; }
#bulkQueue li span:first-child, #bulkReview strong { overflow-wrap: anywhere; }
#bulkQueue li span:last-child { text-align: end; }
#bulkReview { display: grid; justify-items: start; gap: .7rem; }
#categoryAssignment { display: grid; gap: .65rem; }
#categoryAssignment fieldset { display: grid; max-height: 40vh; overflow: auto; border: 0; padding: 0; margin: 0; }
#categoryAssignment label { padding: .3rem 0; }
#categoryAssignment button { justify-self: start; }

/* Empty states explain themselves and offer the next step. */
.emptyHelp { display: grid; justify-items: start; gap: 6px; padding: 18px 20px; }
.emptyHelp strong { font-size: .98rem; }
.emptyHelp span { color: var(--sub); }
.emptyHelp button { margin-top: 4px; }
/* Model and tier names stay on one line in cost breakdowns. */
.developerArticle table td:nth-child(-n+3) { white-space: nowrap; }

/* AI settings: the provider model directory reads as a list, not a raw form control. */
select[aria-label="Provider model directory"] { width: 100%; padding: 4px; border-radius: 9px; font-size: .88rem; }
select[aria-label="Provider model directory"] option { padding: 6px 8px; border-radius: 6px; }
select[aria-label="Provider model directory"] option:checked { background: #e6eef7; color: #102c47; }
input[aria-label="Find a provider model"] { min-width: min(22rem, 100%); }
/* "Did you mean" above an empty search result. */
.searchSuggestion { margin: 0 0 8px; padding: 10px 14px; border: 1px solid #f0d58a; border-radius: 9px; background: #fff8e1; }
.searchSuggestion .linkBtn { font-weight: 600; }

/* On phones, Administration's sections sit in one scrolling row instead of filling the first screen. */
@media (max-width: 650px) {
  nav.topicNav[aria-label="Administration sections"] {
    display: flex; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
    padding: 4px 0 10px; margin-bottom: 4px;
  }
  nav.topicNav[aria-label="Administration sections"]::-webkit-scrollbar { display: none; }
  nav.topicNav[aria-label="Administration sections"] a {
    flex: none; white-space: nowrap; border: 1px solid var(--border); border-radius: 18px; padding: 8px 12px; min-height: 40px;
  }
}

/* Dates to review: proposals from the signed text, confirmed one at a time. */
.dateReview { margin: 6px 0 18px; padding: 14px 16px; border: 1px solid #f0d58a; border-radius: 10px; background: #fffbf0; }
.dateReview .sectionHead h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.dateReview > .sub { margin: 4px 0 10px; }
.countBadge { padding: 1px 8px; border-radius: 10px; background: #8a6d00; color: white; font-size: .78rem; }
.reviewActions { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.reviewActions button { padding: 4px 10px; min-height: 32px; }
.ico-calendar { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4m8-4v4'/%3E%3C/svg%3E"); }
.pageHead .row > a.button[class*="ico-"] { display: inline-flex; align-items: center; text-decoration: none; }

/* Wide screens: the reader with the agreement's documents and governing provisions beside it. */
.recordBody { display: grid; grid-template-columns: minmax(0, 1fr) clamp(260px, 24vw, 340px); gap: 14px; align-items: start; margin-bottom: 6px; }
.recordBody .readerInlineHost > .agreementReader { margin: 0; }
.recordSide { position: sticky; top: 12px; max-height: clamp(420px, 78dvh, 1000px); overflow: auto; }
.recordSide .recordFamily { margin: 0; display: grid; gap: 10px; font-size: .9rem; }
.recordSide details > summary { font-size: .95rem; }
.recordSide ul { padding-left: 18px; margin: 6px 0 0; display: grid; gap: 8px; }

.tableActions:has(.tableRowSearch:not([hidden])) { display:flex; align-items:center; gap:.45rem; padding:0 0 8px; min-height:32px; }
.tableRowSearch { width:min(15rem,55%); min-height:38px; margin-right:auto; }
.tableActions:has(.tableRowSearch:not([hidden])) .iconAction { width:38px; height:38px; }
.tableActions .expandTable { align-self:center; }
.directoryViewSwitch { display: inline-flex; padding: 2px; gap: 2px; border: 1px solid var(--line); border-radius: 7px; background: #eef2f5; }
.directoryViewSwitch button { border: 0; border-radius: 4px; background: transparent; padding: .35rem .7rem; color: var(--sub); }
.directoryViewSwitch button[aria-pressed="true"] { background: white; color: #153c63; box-shadow: 0 1px 3px #172c4426; }
.typeDirectory { max-inline-size: 52rem; }
#typeSearch { margin-bottom: 6px; max-width: 100%; }
.typeCardGrid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(14rem,100%),1fr)); gap:8px; }
.typeDirectoryCard { display:grid; align-content:start; gap:.3rem; padding:.75rem 1rem; text-align:start; background:white; border:1px solid var(--line); border-radius:8px; color:var(--blue); }
.typeDirectoryCard strong { overflow-wrap:anywhere; }
.typeDirectoryCard small { color:var(--sub); font-weight:400; }
.typeDirectory :is(th, td):last-child { width: 7rem; text-align: end; font-variant-numeric: tabular-nums; }
.tableBox table[aria-label="Agreement types"] { min-width: 0; }
.typeDirectory th:last-child button { justify-content: flex-end; }
.typeDirectory .linkBtn { text-align: start; overflow-wrap: anywhere; }
.tableStatus { margin: 0; }
.tableStatus > summary {
  width: fit-content;
  min-height: 28px;
  padding: 0 18px 0 0;
  cursor: pointer;
  border-radius: 4px;
}
.tableStatus > summary::before { inset-inline: auto 0; }
.tableStatus > small { margin-top: 3px; max-width: 15ch; color: var(--sub); }
@media print {
  .tableStatus::details-content { content-visibility: visible; }
  .tableStatus > summary::before { display: none; }
}
@media (min-width: 651px) {
  table[aria-label="Agreements"] th:first-child { width: 36%; }
  table[aria-label="Agreements"] td:first-child { overflow-wrap: anywhere; }
}
@media (pointer: coarse) {
  .tableStatus > summary { min-height: 44px; }
}
th button:hover,th button:focus-visible { color:inherit; text-decoration:underline; }
.recordTrail .row button::before { flex:none; margin:0; }
.recordStatusMeta .recordReview { background:transparent; border:0; }
.recordStatusMeta .recordReview summary { min-height:24px; padding-block:0; }
.recordStatusMeta .reviewDate { margin-left:0; }
#documentActivity td, #documentActivity th { padding-block:4px; vertical-align:middle; }
#documentActivity time { white-space:nowrap; }
.taskPeople summary { cursor:pointer; gap:8px; }
.taskChosen { margin-left:6px; font-weight:400; color:var(--sub); overflow-wrap:anywhere; }
.taskOptions { max-height:14rem; overflow:auto; }
.taskOptions label.taskPerson { display:flex; align-items:center; gap:8px; padding:5px 0; }
.taskOptions label[hidden] { display:none; }
.taskPerson input[type=checkbox] { width:auto; }
.taskSource { margin:0; }
#taskRows .linkBtn { text-align:left; white-space:pre-wrap; overflow-wrap:anywhere; }

.taskQuick { display:inline-flex; align-items:center; justify-content:center; gap:5px; }
.tableBox .taskQuick span { display:none; }
@media (max-width:650px) { .taskQuick span { display:none; } }

.dealTitle, .dealTableControls { display: inline-flex; align-items: center; gap: .4rem; }
.dealTitle { flex-wrap:wrap; min-width:0; }
.dealTableControls .iconAction { color: inherit; border-color: transparent; background: transparent; }
.dealTableControls .iconAction:hover, .dealTableControls .iconAction:focus-visible { color: #18252f; background: white; }

.dealCardHead { display:flex; align-items:center; gap:.65rem; }
.listToolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  min-width: 0;
  margin-bottom: 8px;
}
.listToolbar:not(:has(> :not([hidden]))) { display: none; }
.listToolbar > input[type="search"] { flex: 1 1 8rem; min-width: 0; max-width: 17rem; }
.listToolbar > [role="status"]:not(:empty) { flex-basis: 100%; }
.appliedFilterSummary {
  display: flex; flex: 1 0 100%; flex-wrap: wrap; align-items: center; gap: 4px 12px;
  min-width: 0; color: var(--sub); font-size: .87rem;
}
.appliedFilterSummary span { overflow-wrap: anywhere; }
.activityFilters .appliedFilterSummary:not([hidden]) { margin-bottom: 8px; }
.activityFilters .listToolbar { align-items: end; }
.activityFilters:not([data-filters-open]) [data-filter-fields] { display: none; }
form.responsiveFilters {
  display: flex;
  container: list-filters / inline-size;
}
.responsiveFilters [data-filter-fields], .dateSearchControls { display: contents; }
.responsiveFilters [data-filter-toggle] { display: none; }
#taskFilters > input[type="search"] { flex: 1 1 8rem; max-width: 17rem; min-width: 0; }
#taskFilters select { max-width: min(14rem, 100%); }
@container list-filters (max-width: 39rem) {
  .responsiveFilters [data-filter-toggle] { display: inline-flex; align-items: center; justify-content: center; }
  .responsiveFilters:not([data-filters-open]) [data-filter-fields] { display: none; }
  .responsiveFilters [data-filter-fields] {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(8.5rem, 100%), 1fr));
    align-items: end;
    gap: 6px 8px;
    width: 100%;
  }
  .responsiveFilters [data-filter-fields] :is(select, input) { min-width: 0; width: 100%; }
  .dateSearchControls { display: flex; flex: 1 1 14rem; align-items: center; gap: 8px; }
  #datesFilter .dateSearchControls input { flex: 1; min-width: 0; }
}
.activityFilters label:not(.check) { display: grid; gap: 4px; min-width: 0; font-size: .8rem; }
.activityFilters label > :is(input:not([type="checkbox"]), select) { width: 100%; min-width: 0; }
.activityFilters #activityExtraFilters > label:not(.check) { flex: 1 1 9rem; }
.expandedTable .listToolbar { flex: 1; margin-bottom: 0; }
#obligationTools .viewSwitch { margin: 0; }
.listToolbar > [data-table-tools] { margin-inline-start: auto; min-width: 0; }
.listToolbar > [data-table-tools]:empty { display: none; }
#obligationTools [data-table-tools] { flex: 1 1 12rem; }
.listToolbar [data-table-tools] .tableActions { padding: 0; }
#obligationTools .tableRowSearch { min-width: 0; flex: 1 1 8rem; max-width: 17rem; }
.dealCards { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,18rem),1fr)); gap:.65rem; padding:0; margin:0; list-style:none; }
.dealCard { position:relative; min-width:0; padding:.65rem .8rem; border:1px solid var(--border); border-radius:8px; background:white; }
.dealCard, .typeDirectoryCard {
  border-color: var(--card-border);
  box-shadow: var(--card-shadow);
}
@media (hover: hover) {
  :is(.dealCard, .typeDirectoryCard):hover {
    border-color: #9bb2c6;
    box-shadow: 0 2px 4px rgb(24 51 77 / 8%), 0 5px 14px -4px rgb(35 78 116 / 20%);
  }
}
.dealCard:has(:focus-visible), .typeDirectoryCard:focus-visible {
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 2px rgb(40 93 148 / 14%), 0 4px 12px -4px rgb(35 78 116 / 18%);
}
.dealCardHead { flex-wrap:wrap; gap:0 .5rem; margin-bottom:.25rem; }
.dealCardHead .dealName { font-weight:650; }
.dealCardHead .dealName::after { content:""; position:absolute; inset:0; }
.dealCardHead .sub { white-space:nowrap; font-size:.82rem; }
.dealName { overflow-wrap:anywhere; }
.tableBox table[aria-label="Deals"] { table-layout:fixed; min-width:0; }
table[aria-label="Deals"] th:first-child { width:31%; }
table[aria-label="Deals"] th:last-child { width:5.2rem; }
deal-member-links { position:relative; display:flex; align-items:baseline; min-width:0; gap:.55rem; overflow:hidden; }
deal-member-links a { white-space:nowrap; min-width:0; }
deal-member-links [data-member] { flex:none; overflow:hidden; text-overflow:ellipsis; }
deal-member-links [data-member]:first-child { flex:0 1 auto; }
deal-member-links [data-member] span { white-space:nowrap; }
deal-member-links [data-more] { flex:none; font-variant-numeric:tabular-nums; font-size:.86em; }
deal-member-links.measuringLinks [hidden] { position:absolute; display:block !important; visibility:hidden; pointer-events:none; width:max-content; }
.dealDirectoryExpand { float:right; display:inline-flex; align-items:center; }
.dealDirectoryExpand .expandTable { width:28px; height:28px; min-width:28px; min-height:28px; padding:5px; color:inherit; border-color:transparent; background:transparent; }
.dealDirectoryExpand .expandTable:hover { background:#ffffff26; }
.tableFrame:has(table[aria-label="Deals"]) > .tableActions:empty { display:none; }
deal-member-links a:focus-visible { outline-offset:-1px; }
@media (max-width:550px) {
  table[aria-label="Deals"] th:first-child { width:37%; }
  table[aria-label="Deals"] :is(th,td):last-child { display:none; }
  .dealDirectoryExpand .expandTable { width:44px; height:44px; }
}
/* Match the compact icon and label navigation in the RubyDev App planner. */
#sidebar nav a, .topicNav a, .viewSwitch a {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 36px;
  padding: 6px 9px;
  border-radius: 5px;
  font: 500 14px/20px system-ui, sans-serif;
  color: #243748;
  text-decoration: none;
  transition: none;
}
#sidebar nav a::before, .topicNav a::before, .viewSwitch a::before { margin: 0; width: 15px; height: 15px; }
/* With its frame, the switch is as tall as the 38px fields and buttons it sits beside. */
.viewSwitch a { min-height: 32px; padding-block: 4px; }
.topicNav a:hover, .viewSwitch a:hover { background: #edf3f8; color: #003e75; }
#sidebar nav a:is(:hover, :focus-visible) { background: #285d94; color: white; }
#sidebar nav a[aria-current], .topicNav a[aria-current="page"], .viewSwitch a[aria-current="page"] {
  background: var(--blue);
  color: white;
  font-weight: 600;
}
#sidebar nav a:focus-visible, .topicNav a:focus-visible, .viewSwitch a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: -2px;
}
#sidebar nav a:focus-visible, .topicNav a[aria-current]:focus-visible, .viewSwitch a[aria-current]:focus-visible {
  outline-color: white;
  outline-offset: -3px;
}
.viewSwitch {
  width: fit-content;
  max-width: 100%;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}
.headingWithNav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.headingWithNav .viewSwitch, #datesFilter .viewSwitch { margin: 0; }
@media (max-width: 700px) {
  #datesFilter select { width: 100%; min-width: 0; }
}
.headingWithNav .viewSwitch a { justify-content: center; }
@media (max-width: 820px), (pointer: coarse) {
  #sidebar nav a, .topicNav a, .viewSwitch a { min-height: 44px; }
  nav.topicNav[aria-label="Administration sections"] a { min-height: 44px; }
}
@media (forced-colors: active) {
  #sidebar nav a[aria-current], .topicNav a[aria-current], .viewSwitch a[aria-current] {
    outline: 1px solid Highlight;
    color: Highlight;
  }
}

.reviewedEntries { padding: 0; margin: .65rem 0; list-style: none; }
.reviewedEntries li { padding: .55rem 0; border-bottom: 1px solid #dce4eb; }
.reviewedEntries small { display: block; }
.reviewedEntries dl { margin: .4rem 0; }
.reviewedEntries dt { font-weight: 600; }
.reviewedEntries dd { margin: 0 0 .5rem; overflow-wrap: anywhere; }

#discussionMentions { margin:2px 0; }
#discussionMentions summary { padding:5px 10px; cursor:pointer; font-weight:600; }
#discussionMentions nav { margin-left:7px; }
#discussionMentions a { font-size:.86rem; }

@media (max-width:540px) {
  .recordTrail .row #showDiscussion > span { display:none; }
  .recordTrail .row #showDiscussion { min-width:44px; padding-inline:10px; }
}
@media (max-width:390px) {
  .recordTrail .row > :is(button, a.recordLegal, a.readerNewTab) { width:44px; min-height:44px; padding:0; justify-content:center; gap:0; }
  .recordTrail .row > :is(button, a.recordLegal, a.readerNewTab) > span { display:none; }
}

.dealMembership { display:inline-flex; align-items:center; gap:3px; margin-inline-end:6px; }
.dealCard a { text-decoration:none; }
.dealCard:hover, .dealCard:focus-within { border-color:var(--blue); }
.dealCard a:hover, .dealCard a:focus-visible { text-decoration:underline; }
#modal:has(#shareSurface) .modalHead { display:grid; grid-template-columns:1fr auto 1fr; }
#modal:has(#shareSurface) .modalHead h2 { grid-column:2; }
#modal:has(#shareSurface) .modalHead button { justify-self:end; }
#modal [data-close=modal] { width:36px; min-height:36px; padding:0; font-size:1.4rem; line-height:1; }
#shareSurface h3:first-of-type { border-top:1px solid var(--line); padding-top:16px; }
.reviewDisclosure { margin:12px 0; }
.expandedTable > #filters { flex:none; margin:0 0 8px; }
#extraFilters > [hidden] { display:none; }

#sidebar nav .navCount { margin-left:auto; color:var(--sub); font-size:.78rem; font-variant-numeric:tabular-nums; }
#sidebar nav a:is(:hover, :focus-visible, [aria-current]) .navCount { color: inherit; }
a.typeDirectoryCard { text-decoration:none; color:inherit; }

#modal:has(#shareSurface) .shareMailProvider { display:flex; flex-flow:row wrap; align-items:center; gap:8px; margin-block:8px; }
.shareMailProvider select { width:auto; }

.expandedTable .tableBox[hidden] { display:none; }

/* ---- Desktop alignment pass, November 22: shared edges, heights and gaps ---- */

/* A field reads the same wherever it sits: 14px regular text and the height of a button,
   whatever the size and weight of the label around it. */
input, select, textarea { font-size: 14px; font-weight: 400; }
input, select { padding-block: 7px; }
:where(input:not([type="checkbox"], [type="radio"], [type="file"], [type="range"], [type="color"]), select:not([multiple], [size])) { min-height: 38.5px; }
.pager select { min-height: 0; }
/* A date field's inner parts make it half a pixel taller than a text field, so it takes a set height. */
:where(input:is([type="date"], [type="time"], [type="datetime-local"], [type="month"])) { height: 38.5px; }

/* Quick actions keep the navigation's icon column and label edge. */
#sidebar .quickActions button { gap: 7px; padding: 8px 9px; border-radius: 5px; font: 500 14px/20px system-ui, sans-serif; }
#sidebar .quickActions svg, #sidebar .quickActions .ico-bug::before { width: 15px; height: 15px; }

/* Status arrows share the column's trailing edge whatever the width of the word before them. */
@media (min-width: 651px) {
  td > .tableStatus > summary { width: 100%; }
}

/* Align the sibling view switches with the date controls below their labels. */
@media (min-width: 701px) {
  #obligationTools { padding-top: 22px; }
}

/* Icon buttons in a table take the header's height and the row's weight. */
.dealTableControls { gap: 6px; margin-block: -6px; }
.dealTableControls .iconAction, .tableBox td > .iconAction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  vertical-align: middle;
}
.tableBox td > .iconAction { border-color: transparent; background: transparent; }
.tableBox td > .iconAction:hover { background: #eaf2f9; }
/* A deal's row actions sit under the header buttons that share their column. */
table[aria-label="Agreements in this deal"] td > .taskQuick { width: 30px; height: 30px; padding: 0; vertical-align: middle; }
table[aria-label="Agreements in this deal"] td > .taskQuick + .iconAction { margin-inline-start: 2px; }
.dealTitle .iconAction { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; }
@media (max-width: 650px), (pointer: coarse) {
  .dealTableControls { margin-block: 0; }
  .dealTableControls .iconAction, .tableBox td > .iconAction, .dealTitle .iconAction,
  table[aria-label="Agreements in this deal"] td > .taskQuick { width: 44px; height: 44px; }
}
#dealDelete { margin-top: 16px; }

/* A heading that follows a card or a field starts a new group. */
#main :is(.panel, form, .tableFrame, label) + h3 { margin-top: 18px; }
#main :not(.sectionHead, .modalHead) > h3 { margin-bottom: 8px; }

/* Forms outside a filter row: fields, buttons and the lines under them keep a gap. */
#categoryEditor + [role="status"] + .check { margin-block: 10px; }
.guideCards > .row { align-items: flex-end; gap: 8px; margin-bottom: 8px; }
#main .sectionHead > a { margin: 0; }

/* The agreement title keeps one line while it fits; a longer one takes the row and the actions
   move under it, still ending at the reader's right edge. */
@media (min-width: 821px) {
  .recordTrail .recordIdentity { flex: 1 1 auto; }
  .recordTrail > .row { margin-inline-start: auto; }
}

/* Agreement facts keep one row height with or without an edit button, and each group of cited
   terms carries the same heading, rule and list indent. */
.docMeta > div { min-height: 34px; }
.agreementTerms .commercialTerms + .sectionHead { margin: 10px 0 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.agreementTerms .commercialTerms + .sectionHead h2 { font-size: 1rem; font-weight: 650; }
.agreementTerms .list { margin: 0; padding-inline-start: 1.2rem; }
.agreementTerms .list li + li { margin-top: 4px; }
.agreementTerms .list .quiet { margin-inline-start: 8px; padding: 0; }

/* Activity times stay on one line, and so do a user's two actions once the table has room for them. */
@media (min-width: 901px) {
  table[aria-label="Activity"] td:first-child { white-space: nowrap; }
}
@media (min-width: 1400px) {
  table[aria-label="Users"] td:last-child { white-space: nowrap; }
  table[aria-label="Users"] td:last-child > button + button { margin-inline-start: 10px; }
}
@media (min-width: 1400px) and (pointer: fine) {
  table[aria-label="Users"] td:last-child > button { padding-block: 0; }
}
table[aria-label="Users"] td > input[type="checkbox"] { margin-inline-start: 0; }

/* The provider list: refresh, search and results each keep a gap. */
input[aria-label="Find a provider model"] { margin-inline-start: 8px; }
select[aria-label="Provider model directory"] { display: block; margin-top: 8px; }

/* Links revealed under "More filing options" keep a gap; the disclosure element cannot space its own content. */
.filingLinks > button { margin-inline-end: 12px; }

/* A dialog form's errors and Save button stay in view while a long form scrolls behind them. The footer
   takes over the dialog's bottom padding so it can sit flush against the dialog's lower edge. */
#modal:has(.formFooter) { padding-bottom: 0; }
.formFooter {
  position: sticky;
  bottom: 0;
  z-index: 1;
  display: flow-root;
  margin-inline: -18px;
  padding: 0 18px 18px;
  background: linear-gradient(#fff0, #fff 12px);
}
.formFooter > .primary { margin-top: 14px; }

.guideDemo { margin: 0 0 1rem; }
.guideDemo media-controller { display: block; width: 100%; background: #101820; border-radius: 8px; overflow: hidden; }
.guideDemo video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; }
.guideDemo media-controller:not(:defined) > :not(video) { display: none; }
.guideDemo media-control-bar { width: 100%; }
.guideDemo media-time-range { min-width: 32px; flex: 1; }
.guideDemo media-volume-range { max-width: 70px; }
@media (max-width: 850px) {
  .guideDemo media-volume-range, .guideDemo media-pip-button { display: none; }
  .guideDemo { --media-control-padding: 7px; }
}
@media (max-width: 480px) {
  .guideDemo media-time-display { display: none; }
}

/* ---- Phone and tablet alignment pass, November 22 ---- */

/* On narrow and touch screens a table whose only tool is full screen carries it in the header's
   corner, as wide screens do, instead of spending a row on it. The header scrolls beneath it. */
@media (max-width: 650px), (pointer: coarse) {
  .tableFrame > .tableActions:not(:has(.columnMenu, .tableRowSearch:not([hidden]))) {
    position: absolute;
    top: var(--header-center, 30px);
    transform: translateY(-50%);
    right: 5px;
    z-index: 2;
    padding: 0;
  }
  .tableFrame > .tableActions:not(:has(.columnMenu, .tableRowSearch:not([hidden]))) .iconAction {
    border-color: #ffffff55;
    background: #224463;
    color: #fff;
  }
  .tableFrame > .tableActions:not(:has(.columnMenu, .tableRowSearch:not([hidden]))) + .tableBox thead th:last-child { padding-inline-end: 58px; }
}

/* Touch sizes: the drawer's close button, every agreement action including the two that are links,
   and text actions that stand alone. A link inside a sentence keeps the text's line. */
@media (max-width: 820px), (pointer: coarse) {
  #navClose { min-width: 44px; }
}
@media (pointer: coarse) {
  .recordTrail .row > :is(button, a.recordLegal, a.readerNewTab) { min-height: 44px; }
}
@media (max-width: 650px), (pointer: coarse) {
  #dealDelete, .docMeta dd > .linkBtn, .agreementRelated .sectionHead .linkBtn, button[data-disable-link] {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  #dealDelete { margin-top: 4px; }
}

/* On a tablet the view switch shares a row with 44px fields and buttons, so its frame is drawn
   inside that height instead of adding to it. */
@media (pointer: coarse) and (min-width: 651px) {
  .viewSwitch { padding: 0; border: 0; box-shadow: inset 0 0 0 1px var(--line); }
}
/* A narrow window with a mouse keeps the switch at the height of its 38px fields. */
@media (min-width: 651px) and (max-width: 820px) and (pointer: fine) {
  .viewSwitch a { min-height: 32px; }
}

/* The key dates search starts narrow so the filters stay on its row at tablet width, then takes
   the room that is left, up to a readable limit. */
#datesFilter input[type="search"] { flex: 1 1 150px; min-width: 150px; max-width: 360px; }

/* A search field above an administration table keeps a gap from it. */
#adminContent > input[type="search"] { margin-bottom: 8px; }

/* Developer sections in two columns line up by row when a name wraps. */
@media (max-width: 820px) {
  nav[aria-label="Developer sections"] { align-items: stretch; }
}

/* A full-screen button placed in a table header centers its icon like the ones in a toolbar. */
th .iconAction { display: inline-flex; align-items: center; justify-content: center; padding: 0; }

@media (max-width: 500px) {
  .pageHead:has([data-view-choice], #newActionItem, #datesCalendar, + .typeDirectory) { align-items: center; }
  .pageHead:has(#datesCalendar, + .typeDirectory) [data-action="ask"] span,
  #datesCalendar span { display: none; }
  .pageHead:has(#datesCalendar, + .typeDirectory) [data-action="ask"], #datesCalendar { width: 44px; min-height: 44px; padding: 0; justify-content: center; }
  .pageHead:has(#datesCalendar, + .typeDirectory) [data-action="ask"]::before, #datesCalendar::before { margin: 0; }
}
@media (max-width: 370px) {
  #newActionItem .actionObject { display: none; }
  #dealNew { width: 44px; min-height: 44px; padding: 0; justify-content: center; }
  #dealNew span { display: none; }
  #dealNew::before { margin: 0; }
}

@media (max-width: 650px), (pointer: coarse) {
  .dealCardHead { min-height: 44px; align-items: center; }
  .dealCard deal-member-links { pointer-events: none; align-items: center; }
  .dealCard deal-member-links a { min-height: 44px; align-content: center; pointer-events: auto; }
  tr:has(a[data-party-key]) { position: relative; }
  td:has(a[data-party-key]) { padding-block: 0; }
  a[data-party-key] { display: inline-flex; align-items: center; min-height: 44px; }
  a[data-party-key]::after { content: ""; position: absolute; inset: 0; }
}

.dealRecap { margin: 1.25rem 0; }
.dealRecap h2, .dealRecap h3 { margin: .65rem 0; }
.dealRecap h3 { font-size: 1rem; }
.dealRecap label { display: grid; gap: .35rem; max-width: 34rem; }
.dealRecap details { margin-block: .75rem; }
.dealRecap summary { cursor: pointer; font-weight: 600; }
#deal-agreements { scroll-margin-top: 4rem; }
.dealRecap .recapTerms { list-style: none; padding: 0; }
.recapTerms li { margin-block: .9rem; overflow-wrap: anywhere; }
.recapTerms li p { margin: .2rem 0; white-space: pre-line; }
#dealReviewImport pre { white-space: pre-wrap; overflow-wrap: anywhere; }

.outstandingItems { max-width: 52rem; }
.outstandingList { display:grid; gap:12px; }
.outstandingList article { min-width:0; overflow-wrap:anywhere; }
.outstandingList article[hidden] { display:none; }
.outstandingList article > p { margin:0 0 4px; }
.outstandingList article h2 { margin:0 0 14px; font-size:1.12rem; }
.outstandingList dl { margin:0; }
.outstandingList dt { margin-top:10px; font-weight:600; }
.outstandingList dd { margin:3px 0 0; white-space:pre-line; }
.outstandingList dd small { display:block; color:var(--sub); }
.outstandingList details { margin-top:14px; border-top:1px solid var(--line); padding-top:8px; }
.outstandingList summary { cursor:pointer; font-weight:600; color:var(--blue); }
.outstandingList form label { display:grid; gap:5px; margin:8px 0; }
.outstandingList textarea { width:100%; max-width:100%; resize:vertical; }
.outstandingItems [role=status]:empty { margin:0; }


.reviewUpload { max-width: 56rem; }
.reviewUploadPicker { padding: 1.25rem; }
.reviewUploadPicker p { margin: .65rem 0 0; }
.reviewUpload #progress:empty, .reviewUpload #receipts:empty { display: none; }
.reviewUpload #progress { font-weight: 600; }
.reviewUpload #receipts { list-style: none; padding: 0; }
.reviewUpload #receipts li {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: .4rem 1rem; flex-wrap: wrap; padding: .65rem 0; border-bottom: 1px solid var(--line);
}
.reviewUpload #receipts li > span { min-width: 0; overflow-wrap: anywhere; }

.sharePackage { min-width: 0; margin: .5rem 0 1rem; max-height: 15rem; overflow-y: auto; }
.sharePackage label.check { min-height: 2.3rem; align-items: center; }
.sharePackage label span { min-width: 0; overflow-wrap: anywhere; }
