:root {
  --bg: #f6f2ea;
  --panel: #fffaf2;
  --text: #2f2926;
  --muted: #6f6761;
  --line: #ded2c3;
  --accent: #9f452d;
  --accent-dark: #75321f;
  --danger: #9a1f1f;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, sans-serif; background: var(--bg); color: var(--text); }
.page { max-width: 1180px; margin: 0 auto; padding: 32px 20px 60px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; color: var(--accent); font-weight: 700; margin: 0 0 8px; }
h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.4rem); }
h2 { margin: 0; }
.lede { max-width: 760px; color: var(--muted); line-height: 1.5; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-top: 18px; box-shadow: 0 8px 24px rgba(40, 30, 20, 0.06); }
.controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; }
label { display: grid; gap: 6px; font-weight: 650; color: var(--muted); }
select, input, button { font: inherit; }
select, input { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: white; color: var(--text); }
button { border: 0; border-radius: 10px; padding: 10px 14px; background: var(--accent); color: white; font-weight: 700; cursor: pointer; }
button:hover { background: var(--accent-dark); }
button.secondary { background: #e8ddd0; color: var(--text); }
button.secondary:hover { background: #dbccba; }
.hidden { display: none !important; }
.toolbar, .actions { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 14px; }
.actions { justify-content: flex-start; margin-top: 16px; margin-bottom: 0; }
.tableWrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-size: 0.9rem; border-bottom: 1px solid var(--line); padding: 10px; }
td { border-bottom: 1px solid var(--line); padding: 10px; vertical-align: top; }
.amountCol { width: 160px; }
.resultCol { width: 220px; }
.actionCol { width: 120px; }
.fundSearch { width: 100%; }
.searchBox { position: relative; }
.results { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; background: white; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 12px 28px rgba(40, 30, 20, 0.16); }
.resultItem { width: 100%; display: grid; gap: 3px; text-align: left; background: white; color: var(--text); border-radius: 0; border-bottom: 1px solid var(--line); padding: 11px 12px; }
.resultItem:hover { background: #f7efe3; color: var(--text); }
.resultItem span, .resultHint { color: var(--muted); font-size: 0.87rem; }
.resultHint { padding: 9px 12px; background: #fbf7ef; }
.selectedFund, .rowResult { margin-top: 8px; line-height: 1.35; }
.muted { color: var(--muted); }
.error { color: var(--danger) !important; }
pre { margin: 0; white-space: pre-wrap; background: #2f2926; color: #fffaf2; padding: 14px; border-radius: 10px; overflow-x: auto; }


/* v4.1: floating autocomplete layer attached to document body.
   This avoids clipping by table, panel, or overflow containers. */
.floatingResults {
  position: absolute;
  z-index: 9999;
  max-height: 320px;
  overflow-y: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 38px rgba(40, 30, 20, 0.22);
}

.selectedCard {
  border: 1px solid #d7c6b4;
  background: #fffdf8;
  border-radius: 12px;
  padding: 10px 12px;
}

.selectedLabel {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.selectedMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 4px;
}


/* v4.2: selected fund replaces the search box after selection. */
.fundPicker {
  min-width: 360px;
}

.selectedCardTop {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.changeFundBtn {
  padding: 7px 10px;
  white-space: nowrap;
}


/* v4.2.1: ensure hidden floating UI cannot intercept clicks/focus. */
.hidden {
  display: none !important;
}

.floatingResults {
  pointer-events: none;
}

.floatingResults.is-open {
  pointer-events: auto;
}

.searchBox.hidden {
  display: none !important;
}

.selectedFund.hidden {
  display: none !important;
}


/* v4.3: explicit row state badges and safer calculate affordance. */
.rowStatus {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  border: 1px solid transparent;
}

.status-empty {
  color: #6f6761;
  background: #f0e7dc;
  border-color: #ded2c3;
}

.status-searching {
  color: #4b6576;
  background: #edf4f7;
  border-color: #c9dce5;
}

.status-selected {
  color: #7a5a1f;
  background: #fbf0d0;
  border-color: #efd99b;
}

.status-ready {
  color: #2f6b3d;
  background: #e4f3e8;
  border-color: #b9d9c0;
}

.status-calculated {
  color: #2f6b3d;
  background: #d8eddf;
  border-color: #9fcca9;
}

.status-error {
  color: #9a1f1f;
  background: #f8dddd;
  border-color: #e5a9a9;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

button:disabled:hover {
  background: var(--accent);
}


/* v4.4: report/workpaper button. */
#reportBtn:not(.hidden) {
  display: inline-flex;
}

.actions button {
  min-height: 40px;
}


/* v4.6: row status now lives in the result column. */
.resultCol {
  min-width: 260px;
}

td .rowStatus {
  margin-top: 8px;
}

.rowResult + .rowStatus {
  display: inline-flex;
}


/* v4.7: client ID, row numbers, totals, and disabled-button clarity. */
.clientIdWrap {
  min-width: 230px;
}

.helpIcon {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  background: #e8ddd0;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 900;
  margin-left: 4px;
  cursor: help;
}

.rowNumCol,
.rowNum {
  width: 48px;
  text-align: center;
}

.rowNum {
  color: var(--muted);
  font-weight: 800;
  padding-top: 20px;
}

.totalsPanel {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
}

.totalsPanel div {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  padding: 10px 14px;
  display: grid;
  gap: 2px;
  min-width: 220px;
}

.totalsPanel span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.totalsPanel strong {
  font-size: 1.15rem;
}

button:disabled {
  position: relative;
}


/* v4.8: client ID gets its own panel and totals align with row columns. */
.clientPanel {
  display: grid;
  gap: 8px;
}

.clientIdWrap {
  max-width: 460px;
}

.clientIdWrap input {
  width: 100%;
}

.clientIdWrap input.needsValue {
  border-color: #c97b4b;
  background: #fff5e6;
  box-shadow: 0 0 0 3px rgba(201, 123, 75, 0.18);
}

.fieldNote {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.totalsPanel {
  display: grid;
  grid-template-columns: 48px minmax(360px, 1fr) 160px 260px 120px;
  gap: 0;
  align-items: stretch;
  margin-top: 12px;
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  background: #fffdf8;
}

.totalsPanel.hidden {
  display: none !important;
}

.totalsPanel > div {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 10px;
  min-width: 0;
}

.totalsLabel {
  grid-column: 1 / span 2;
  color: var(--muted);
  font-weight: 900;
  text-align: right;
  align-self: center;
}

.totalsInput {
  grid-column: 3;
}

.totalsCalculated {
  grid-column: 4;
}

.totalsPanel span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.totalsPanel strong {
  font-size: 1rem;
}

@media (max-width: 820px) {
  .totalsPanel {
    grid-template-columns: 1fr;
  }

  .totalsLabel,
  .totalsInput,
  .totalsCalculated {
    grid-column: 1;
    text-align: left;
  }
}


/* v5.1: clearer table column separation in the browser UI. */
table.dataTable th,
table.dataTable td {
  border-right: 1px solid var(--line);
}

table.dataTable th:last-child,
table.dataTable td:last-child {
  border-right: 0;
}


/* v5.2: Clear Worksheet is deliberately separated from Calculate. */
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.clearWorksheetBtn {
  margin-left: auto;
  border-color: #b89a83;
}

.clearWorksheetBtn:hover {
  background: #f4e8dc;
}

@media (max-width: 700px) {
  .actions {
    flex-wrap: wrap;
  }

  .clearWorksheetBtn {
    margin-left: 0;
    flex-basis: 100%;
  }
}


/* v5.3: workpaper summary includes fund company above fund name. */


/* v5.4: municipal options for territories and extra states. */
.muniOptions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: end;
}

.muniOptions.hidden {
  display: none !important;
}

.territoryOption {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
}

.territoryOption input {
  width: auto;
}


/* v5.5: modal for secondary municipal jurisdiction choices. */
.muniMainOptions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}

.muniMainOptions.hidden {
  display: none !important;
}

.jurisdictionSummary {
  color: var(--muted);
  font-size: 0.88rem;
  padding-bottom: 9px;
}

.modalOverlay {
  position: fixed;
  inset: 0;
  background: rgba(35, 28, 22, 0.45);
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modalCard {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: white;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 28px 70px rgba(30, 20, 12, 0.35);
  padding: 18px;
}

.modalHeader {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.modalHeader h2 {
  margin: 0;
}

.iconButton {
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.7rem;
  line-height: 1;
  padding: 4px 8px;
}

.modalHelp,
.territoryCodes {
  color: var(--muted);
  font-size: 0.9rem;
}

.modalSection {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0;
  background: #fffdf8;
}

.modalSectionTitle {
  font-weight: 900;
  margin-bottom: 8px;
}

.primaryStateMirror {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.primaryStateMirror span {
  color: var(--muted);
  font-weight: 700;
}

.primaryStateMirror strong {
  font-size: 1.25rem;
}

.stateGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}

.stateChoice {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 8px;
  background: white;
  font-weight: 800;
}

.stateChoice input {
  width: auto;
}

.stateChoice:has(input:disabled) {
  opacity: 0.45;
}

.modalActions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.primaryResult {
  font-weight: 900;
}

.jurisdictionResultGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 6px;
  margin-top: 6px;
}

.jurisdictionResultGrid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  background: #fffdf8;
}

.jurisdictionResultGrid span,
.jurisdictionResultGrid em {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

.totalResult {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 800;
}


/* v5.6: government obligation category modal and compact breakdown output. */
.obligationMainOptions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}

.obligationMainOptions.hidden {
  display: none !important;
}

.obligationGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
}

.obligationChoice {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px;
  background: white;
}

.obligationChoice input {
  width: auto;
  margin-top: 3px;
}

.obligationChoice span {
  display: grid;
  gap: 2px;
}

.obligationChoice em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.82rem;
  line-height: 1.25;
}

.obligationResultGrid div {
  background: #fffdf8;
}


/* v5.14: readable row-level result tables. */
.resultCard {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf8;
  padding: 10px;
  min-width: 480px;
}

.resultSummaryLine {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.resultFundName {
  font-weight: 900;
  color: var(--text);
  line-height: 1.2;
}

.resultMeta {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 2px;
}

.resultTotalBox {
  text-align: right;
  white-space: nowrap;
}

.resultTotalBox span,
.resultTotalBox em {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-style: normal;
}

.resultTotalBox strong {
  display: block;
  font-size: 1.05rem;
}

.resultSummaryGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 6px;
  margin: 8px 0;
}

.resultSummaryGrid div {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 6px 8px;
}

.resultSummaryGrid span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.resultSummaryGrid strong {
  display: block;
  margin-top: 2px;
}

.componentResultTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  background: white;
  border-radius: 10px;
  overflow: hidden;
}

.componentResultTable th,
.componentResultTable td {
  padding: 5px 7px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  vertical-align: top;
}

.componentResultTable th:last-child,
.componentResultTable td:last-child {
  border-right: 0;
}

.componentResultTable th {
  color: var(--muted);
  background: #f7efe6;
  font-weight: 900;
  text-align: left;
}

.componentResultTable .num {
  text-align: right;
  white-space: nowrap;
}

.componentResultTable tfoot td {
  font-weight: 900;
  background: #fff8ee;
  border-top: 2px solid var(--line);
}

.componentResultTable .mutedRow td {
  color: var(--muted);
}

@media (max-width: 800px) {
  .resultCard {
    min-width: 0;
  }

  .resultSummaryLine {
    display: block;
  }

  .resultTotalBox {
    text-align: left;
    margin-top: 6px;
  }

  .resultSummaryGrid {
    grid-template-columns: 1fr;
  }
}


/* v5.15: full-width calculated detail rows. */
.entryRow.calculatedRow > td {
  border-bottom: 0;
}

.detailRow > td {
  background: #fffaf2;
  border-top: 0;
  padding: 0 10px 14px 10px;
}

.detailRow.hidden {
  display: none !important;
}

.rowResultCompact {
  min-width: 110px;
  line-height: 1.2;
}

.rowResultCompact strong {
  font-size: 1rem;
}

.rowResultCompact span {
  color: var(--muted);
  font-size: 0.82rem;
}

.detailRow .resultCard {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
}

@media (max-width: 900px) {
  .detailRow > td {
    padding-left: 4px;
    padding-right: 4px;
  }
}


/* v5.16.1: collapsible row breakdowns, startup-safe. */
.breakdownToggle {
  margin: 8px 0;
  padding: 7px 10px;
  font-size: 0.88rem;
}

.detailRow .rowResult.hidden {
  display: none !important;
}

.detailRow .rowResult {
  margin-top: 6px;
}

.detailRow.hidden {
  display: none !important;
}


/* v5.17: basis amount in header and simpler component tables. */
.resultBasis {
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 4px;
}

.resultBasis strong {
  color: var(--text);
}


/* v5.18: selected obligation category chips on main form. */
.obligationMainOptions {
  align-items: center;
}

.jurisdictionSummary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding-bottom: 0;
  min-height: 34px;
}

.selectionChip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff8ee;
  color: var(--text);
  border-radius: 999px;
  padding: 5px 9px;
  font-weight: 800;
  font-size: 0.82rem;
  line-height: 1;
  white-space: nowrap;
}

.emptySelection {
  color: var(--muted);
  font-size: 0.88rem;
}

#obligationOptionsBtn {
  white-space: nowrap;
}


/* v5.19: print-oriented workpaper preview style support. */
.record-id-line {
  color: var(--muted);
  font-size: 0.72rem;
}


/* v5.20: PIQGO default workflow and caution note. */
.piqgoChoice {
  grid-column: 1 / -1;
  background: #fff8ee;
  border-width: 2px;
}

.calculationCaution {
  border: 1px solid var(--line);
  border-left: 4px solid #b89a83;
  border-radius: 8px;
  background: #fffaf2;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.25;
  padding: 7px 9px;
  margin: 8px 0;
}


/* v5.21 modal warning and PIQGO label refinements. */
.modalWarning {
  margin: 0 0 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-left: 4px solid #b89a83;
  border-radius: 10px;
  background: #fff8ee;
  color: var(--text);
  line-height: 1.3;
}

.selectionChip {
  max-width: 100%;
}


/* v5.21.1 direct USGO selection modal text patch. */
.modalWarning {
  margin: 0 0 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-left: 4px solid #b89a83;
  border-radius: 10px;
  background: #fff8ee;
  color: var(--text);
  line-height: 1.3;
}


/* v5.22: page-level calculation caution under totals. */
.pageCalculationCaution {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-left: 4px solid #b89a83;
  border-radius: 9px;
  background: #fffaf2;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.3;
  padding: 8px 10px;
  margin-top: 4px;
}


/* v5.24: not-in-database placeholder rows. */
.placeholderCard {
  border-left: 5px solid #b8792c;
  background: #fffaf2;
}

.notCalculatedBadge,
.notCalculatedText {
  color: #8a5a1f;
  font-weight: 800;
}

.status-placeholder {
  background: #fff8ee;
  color: #8a5a1f;
  border-color: #e5c99e;
}

.placeholderResultItem {
  border-top: 1px solid var(--line);
  background: #fffaf2;
}

.placeholderResultCard,
.placeholderWorkpaperCard {
  border-left: 5px solid #b8792c;
}

.placeholderWarning {
  border: 1px solid #e5c99e;
  border-left: 4px solid #b8792c;
  border-radius: 8px;
  background: #fffaf2;
  color: #5f4526;
  padding: 8px 10px;
  margin-top: 8px;
  font-size: 0.88rem;
  line-height: 1.3;
}


/* v5.27: AMT preference item is separate from municipal jurisdiction totals. */
.amtInfoSection {
  border: 1px solid var(--line);
  border-left: 5px solid #7a6b9a;
  border-radius: 10px;
  background: #fbf9ff;
  margin-top: 10px;
  padding: 9px 10px;
}

.amtInfoHeader {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 6px;
}

.amtInfoHeader strong {
  color: var(--text);
}

.amtInfoHeader span,
.amtInfoNote {
  color: var(--muted);
  font-size: 0.82rem;
}

.amtInfoTable {
  margin-top: 4px;
}

.compactAmtInfo {
  padding: 6px 8px;
  margin-top: 6px;
}

.compactAmtInfo .amtInfoNote {
  font-size: 0.72rem;
}


/* v5.28: clearer municipal checkbox controls and main-form AMT option. */
.checkboxCard,
.territoryOption,
.stateChoice,
.mainAmtOption {
  cursor: pointer;
}

.checkboxCard {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}

.checkboxCard input,
.stateChoice input,
.mainAmtOption input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.checkboxCard span,
.stateChoice span,
.mainAmtOption span {
  display: grid;
  gap: 2px;
}

.checkboxCard strong,
.stateChoice strong,
.mainAmtOption span {
  font-weight: 850;
}

.checkboxCard em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.84rem;
}

.stateGrid {
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
}

.stateChoice {
  align-items: flex-start;
  gap: 9px;
  padding: 10px 10px;
}

.mainAmtOption {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbf9ff;
  padding: 8px 10px;
  max-width: 320px;
}


/* v5.29: AMT summary and territory display refinements. */
.muniMainOptions {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.muniPrimaryControls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}

.mainAmtOption {
  margin-left: auto;
  align-self: flex-start;
  box-shadow: 0 1px 0 rgba(0,0,0,0.03);
}

.amtCompactLine {
  color: #6b5a8f;
  font-weight: 800;
}

.amtSummaryTile {
  border-color: #d8cfee;
  background: #fbf9ff;
}

.totalsAmt {
  display: grid;
  gap: 2px;
}

@media (max-width: 760px) {
  .muniMainOptions {
    display: grid;
  }

  .mainAmtOption {
    margin-left: 0;
  }
}


/* v5.30: AMT selector placement and compact result formatting. */
#stateWrap.muniMainOptions {
  flex: 1 1 100%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-top: 2px;
}

#stateWrap .muniPrimaryControls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  min-width: 0;
}

#stateWrap .mainAmtOption {
  margin-left: auto;
  align-self: flex-start;
  display: inline-flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  padding: 10px 12px;
  box-shadow: 0 4px 12px rgba(40, 30, 20, 0.05);
  max-width: 340px;
  min-width: 280px;
}

#stateWrap .mainAmtOption input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

#stateWrap .mainAmtOption span {
  line-height: 1.25;
  font-weight: 800;
}

.compactResultLine {
  white-space: nowrap;
}

.compactResultLine span {
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 850px) {
  #stateWrap.muniMainOptions {
    display: grid;
    justify-content: stretch;
  }

  #stateWrap .mainAmtOption {
    margin-left: 0;
    min-width: 0;
    max-width: none;
  }
}


/* v5.32: standard PIQGO calculation modal and custom override controls. */
.obligationInfoModal .modalHelp,
.standardCalcInfo p {
  color: var(--text);
  line-height: 1.45;
}

.standardCalcInfo {
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.standardCalcInfo p:first-child {
  margin-top: 0;
}

.standardCalcInfo p:last-child {
  margin-bottom: 0;
}

.customCalculationToggle {
  background: #fbf9ff;
}

.customCalculationToggle em {
  line-height: 1.35;
}

.customObligationSection.hidden {
  display: none !important;
}

.calcBasisLine {
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 5px;
}

.calcBasisLine strong {
  color: var(--text);
}

.workpaperCalcBasis {
  margin: 4px 0 8px;
}


/* v5.33: tuck USGO info control away from mandatory settings. */
.tuckedObligationInfo {
  flex: 1 1 100%;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: -4px;
}

.tuckedObligationInfo .jurisdictionSummary {
  display: none;
}

.subtleInfoButton {
  background: transparent !important;
  color: var(--muted) !important;
  border: 1px solid var(--line);
  padding: 7px 10px;
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: none;
}

.subtleInfoButton:hover {
  background: #f6f0e8 !important;
  color: var(--text) !important;
}


/* v5.34: client worksheet shell and pill-style calculator selector. */
.worksheetShell {
  display: grid;
  gap: 14px;
}

.worksheetHeader {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
}

.worksheetHeader h2 {
  margin: 0;
}

.worksheetSharedFields {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: end;
  gap: 14px;
}

.worksheetTabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.worksheetTab {
  border: 1px solid var(--line);
  background: #f6f0e8;
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  box-shadow: none;
}

.worksheetTab:hover:not(:disabled) {
  background: #ece1d4;
}

.worksheetTab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.worksheetTab.futureTab {
  opacity: 0.55;
  cursor: not-allowed;
}

.calculatorControls {
  display: grid;
  gap: 10px;
}

.visuallyHidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  white-space: nowrap !important;
}

@media (max-width: 760px) {
  .worksheetHeader {
    display: grid;
    align-items: stretch;
  }

  .worksheetSharedFields {
    justify-content: stretch;
  }
}


/* v5.35: split calculator controls into section-specific panels. */
.calculatorControls {
  display: grid;
  gap: 12px;
}

.calculatorControlPanel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf9;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.calculatorControlPanel.hidden {
  display: none !important;
}

.controlPanelHeader {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.controlPanelHeader h3 {
  margin: 0 0 4px;
  color: var(--text);
}

.controlPanelHeader p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.usgoControlPanel .tuckedObligationInfo {
  margin-top: 0;
  justify-content: flex-end;
}

.municipalControlPanel #stateWrap.muniMainOptions {
  margin-top: 0;
}

.futureControlPanel {
  background: #fbf8f2;
  color: var(--muted);
}


/* v5.36: scoped Worksheet ID note and details cleanup. */
.clientIdWrap {
  max-width: 360px;
}

.clientIdNote {
  display: block;
  max-width: 340px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
  font-weight: 500;
}

.usgoControlPanel .controlPanelHeader p {
  max-width: 1102px;
}


/* v5.37: combined U.S. Territories source explanation. */
.componentSourceNote {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 500;
}

.territoryDetailDisclosure {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.territoryDetailDisclosure summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 800;
}

.compactDetailTable {
  margin-top: 8px;
}


/* v5.40: listed-but-unavailable USGO/PIQGO records. */
.availabilityBadge {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  background: #fbf8f2;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.unavailableResultNotice {
  margin: 10px 0;
  border: 1px solid #ded2c3;
  border-radius: 10px;
  background: #fbf8f2;
  color: var(--text);
  padding: 10px 12px;
  line-height: 1.35;
}

.workpaperUnavailableNotice {
  margin-top: 8px;
}

/* Beta polish: top navigation, user-facing status, info pages, and note blocks. */
.mainNav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  flex-wrap: nowrap;
  margin: 0 0 24px;
  padding: 12px 14px;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(40, 30, 20, 0.05);
}
.siteBrand {
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}
.siteBrand span {
  color: var(--accent);
}
.environmentIndicator {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--accent-dark);
  background: #fff4e8;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.navUtilities {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  margin-left: auto;
}

.sessionShell {
  display: inline-flex;
  align-items: center;
  max-width: 300px;
  min-width: 0;
  flex: 0 1 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--muted);
  background: #fff;
  font-size: 0.74rem;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
}
.sessionShell[data-session-state="authenticated"] {
  color: var(--accent-dark);
  background: #fffaf2;
}
.sessionShell[data-session-state="authentication_error"],
.sessionShell[data-session-state="session_expired"] {
  color: #7a2f26;
  background: #fff5f2;
}

.siteNavLinks {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  min-width: 0;
  gap: 6px;
  justify-content: center;
}
.siteNavLinks a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  border: 1px solid transparent;
}
.siteNavLinks a:hover {
  background: #f1e7db;
  border-color: var(--line);
}
.siteNavLinks a[aria-current="page"] {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.buttonLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 8px 12px;
  background: #e8ddd0;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  border: 1px solid var(--line);
}
.buttonLink:hover { background: #dbccba; }
.secondaryLink { background: #fffdf8; }
.recordIdBadge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  background: #fffdf8;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}
.recordIdBadge code,
.record-id-line code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .92em;
}
@media (max-width: 920px) {
  .mainNav { flex-wrap: wrap; }
  .siteBrand { order: 1; }
  .navUtilities { order: 2; }
  .siteNavLinks {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
  }
  .environmentIndicator { display: none; }
}
@media (max-width: 560px) {
  .mainNav { align-items: center; }
  .navUtilities { max-width: 58%; }
  .sessionIdentity {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .siteNavLinks a { padding-inline: 8px; }
}
.betaStatusBox {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.betaStatusGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.betaStatusGrid div {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 10px;
}
.betaStatusGrid span {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.betaStatusGrid strong {
  display: block;
  margin-top: 3px;
}
.statusHelp {
  color: var(--muted);
  margin: 10px 0 0;
  line-height: 1.35;
}
.betaStatusError {
  border: 1px solid #e5a9a9;
  border-left: 4px solid var(--danger);
  border-radius: 10px;
  background: #fff7f7;
  padding: 10px;
}
.betaStatusError code {
  display: inline-block;
  margin: 4px 0;
  padding: 4px 6px;
  border-radius: 6px;
  background: #f3e8e8;
}
.infoPage { max-width: 1180px; }
.infoPage > .mainNav,
.infoPage > .siteFooter {
  width: 100%;
  box-sizing: border-box;
}
.infoPage > header,
.infoPage > .infoPanel {
  width: min(100%, 960px);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
.infoPanel > p,
.infoPanel > ul,
.infoPanel > ol,
.infoPage > header .lede {
  max-width: 880px;
}
.infoPanel p,
.infoPanel li {
  line-height: 1.5;
}
.instructionList,
.infoPanel ul {
  margin-top: 10px;
}
.importantNotice {
  border-left: 5px solid var(--accent);
}
.feedbackLinks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.compactInstructionList {
  max-width: 760px;
  margin-bottom: 0;
}
.statusMeaningGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.statusMeaningCard {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf8;
  padding: 14px;
}
.statusMeaningCard h3 {
  margin: 0 0 7px;
  font-size: 1rem;
}
.statusMeaningCard p {
  margin: 0;
  color: var(--muted);
}
.statusMeaningNote {
  margin-bottom: 0;
}
@media (max-width: 700px) {
  .statusMeaningGrid {
    grid-template-columns: 1fr;
  }
}

.coverageTableWrap { overflow-x: auto; }
.coverageTable td:first-child { font-weight: 800; }
.siteFooter {
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.45;
  margin-top: 30px;
  padding: 18px 4px 0;
  border-top: 1px solid var(--line);
}
.siteFooterInner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.siteFooterCopy {
  max-width: 820px;
}
.siteFooterStatement,
.siteFooterDisclaimer {
  margin: 0;
}
.siteFooterDisclaimer {
  margin-top: 4px;
}
.siteFooterLinks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: flex-end;
}
.siteFooterLinks a {
  color: var(--accent-dark);
  font-weight: 800;
  text-underline-offset: 3px;
}
.siteFooterLinks a:hover,
.siteFooterLinks a:focus-visible {
  color: var(--accent);
  text-decoration-thickness: 2px;
}
@media (max-width: 700px) {
  .siteFooterInner {
    display: grid;
  }
  .siteFooterLinks {
    justify-content: flex-start;
  }
}
.resultNotesBlock {
  border: 1px solid var(--line);
  border-left: 4px solid #b89a83;
  border-radius: 10px;
  background: #fffdf8;
  padding: 9px 11px;
  margin-top: 12px;
}
.resultNotesBlock ul {
  margin: 6px 0 0 1.1rem;
  padding: 0;
}
.resultNotesBlock li { margin: 3px 0; }
.compactNotesList {
  font-size: .78rem;
  margin-top: 6px;
}

/* v5.43: themed confirmation dialogs and worksheet shared-field alignment. */
.worksheetSharedFields {
  align-items: start;
}

.worksheetSharedFields label {
  align-self: start;
}

.clientIdNote {
  margin-top: 1px;
}

.confirmDialogCard {
  width: min(520px, calc(100vw - 32px));
  background: var(--panel);
}

.confirmDialogBody p {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
}

.confirmDialogDetails {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.confirmDialogDetails div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf8;
  padding: 9px 10px;
}

.confirmDialogDetails span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.confirmDialogDetails strong {
  color: var(--text);
  text-align: right;
  overflow-wrap: anywhere;
}

.confirmDialogActions {
  justify-content: flex-end;
}

button.dangerButton {
  background: var(--danger);
}

button.dangerButton:hover {
  background: #731717;
}

/* Beta polish: no-results source coverage guidance. */
.noResultsNotice {
  gap: 6px;
  cursor: default;
}
.noResultsNotice:hover {
  background: white;
}
.noResultsNotice strong {
  color: var(--text);
}
.noResultsNotice span {
  line-height: 1.35;
}
.noResultsNotice a {
  color: var(--accent);
  font-weight: 800;
}

/* v5.46: USGO / PIQGO explanation and federal-law reference. */
.usgoControlPanel .legalReference,
.usgoControlPanel .controlHelp {
  margin-top: 7px;
}

.usgoControlPanel .legalReference {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.usgoControlPanel .legalReference a {
  color: var(--accent-strong);
  font-weight: 700;
}

/* v5.43/v5.44: worksheet toolbar actions and live base amount total. */
.worksheetToolbar {
  align-items: flex-start;
}

.worksheetToolbarActions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.baseTotalRow td {
  border-top: 2px solid var(--line);
  border-bottom: 0;
  background: #fbf6ed;
  vertical-align: middle;
}

.baseTotalLabel {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-align: right;
  text-transform: uppercase;
}

.worksheetBaseTotal {
  color: var(--text);
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.worksheetBaseTotal strong {
  display: block;
  font-size: 1.05rem;
}

@media (max-width: 700px) {
  .worksheetToolbar,
  .worksheetToolbarActions {
    align-items: stretch;
    flex-direction: column;
  }

  .worksheetToolbarActions {
    width: 100%;
    margin-left: 0;
  }

  .baseTotalLabel,
  .worksheetBaseTotal {
    text-align: left;
  }
}

.worksheetToolbarActions .clearWorksheetBtn,
.worksheetToolbarActions .addRowTopBtn {
  margin-left: 0;
}

/* v5.44: local browser draft notice and placeholder search option. */
.betaVersion {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: -0.5rem;
}

.placeholderResultItem strong {
  color: var(--accent-strong);
}

.placeholderResultFooter {
  display: block;
  width: calc(100% - 1rem);
  margin: 0.35rem 0.5rem 0.4rem;
  padding: 0.55rem 0.65rem;
  border: 1px dashed var(--line);
  border-radius: 0.7rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  font-size: 0.88rem;
}

.placeholderResultFooter:hover,
.placeholderResultFooter:focus-visible {
  border-color: var(--accent);
  color: var(--text);
  outline: none;
}

.placeholderResultFooter strong {
  color: var(--accent-strong);
  font-weight: 700;
}

/* v5.44 Part 1 search fallback: recognized but unavailable in selected worksheet. */
.recognizedFallbackHint {
  background: #fbf7ef;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
}

.recognizedFallbackItem {
  background: #fffdf8;
}

.recognizedFallbackItem:hover {
  background: #f8f1e8;
}

.recognizedUnavailableBadge {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  background: #fbf8f2;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.recognizedUnavailableCard,
.recognizedUnavailableResultCard,
.recognizedUnavailableWorkpaperCard {
  border-left: 5px solid #8c7a5b;
  background: #fffdf8;
}

.status-recognized {
  background: #f7f1e7;
  color: #66583e;
  border-color: #ded2c3;
}

/* v5.44 polish: keep placeholder fallback visually quieter than actual search results. */
.placeholderResultFooter:hover,
.placeholderResultFooter:focus-visible {
  background: #fbf8f2;
  border-color: var(--line);
  color: var(--muted);
  outline: none;
}

.placeholderResultFooter strong {
  color: inherit;
  font-weight: 650;
}

/* v6.0 advanced fund discovery search. */
.advancedSearchFooter,
.advancedSearchResultItem {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: #f7fbff;
  color: var(--accent-strong);
  padding: 0.75rem 0.9rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.advancedSearchFooter:hover,
.advancedSearchFooter:focus-visible,
.advancedSearchResultItem:hover,
.advancedSearchResultItem:focus-visible {
  background: #eef7ff;
  outline: none;
}

.advancedSearchFooter span,
.advancedSearchResultItem span {
  color: var(--muted);
  font-size: 0.84rem;
}

.advancedSearchModalCard {
  max-width: 980px;
  width: min(980px, calc(100vw - 2rem));
  max-height: calc(100vh - 3rem);
  overflow: auto;
}

.compactModalHelp {
  margin: 0.25rem 0 0;
}

.advancedSearchControls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 320px);
  gap: 1rem;
  margin: 1rem 0;
}

.advancedSearchControls label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 700;
  color: var(--text);
}

.advancedSearchControls input,
.advancedSearchControls select {
  font: inherit;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.advancedAvailabilityFilters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.advancedAvailabilityFilters label {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.advancedSearchSummary {
  margin: 0.35rem 0 0.85rem;
  font-size: 0.9rem;
}

.advancedSearchResults {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.advancedResultGroup {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.advancedGroupHeader {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  padding: 0.8rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.advancedGroupHeader h3 {
  margin: 0;
  font-size: 1rem;
}

.advancedGroupHeader span {
  color: var(--muted);
  font-size: 0.86rem;
}

.advancedResultCard {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  text-align: left;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  cursor: pointer;
}

.advancedResultCard:last-child {
  border-bottom: 0;
}

.advancedResultCard:hover,
.advancedResultCard:focus-visible {
  background: #f7fbff;
  outline: none;
}

.advancedResultCard strong {
  color: var(--text);
}

.advancedResultCard span {
  color: var(--muted);
  font-size: 0.88rem;
}

.advancedGroup-sec_reference .advancedResultCard {
  background: #fffdf8;
}

.advancedGroup-sec_reference .advancedResultCard:hover,
.advancedGroup-sec_reference .advancedResultCard:focus-visible {
  background: #f8f1e8;
}

.advancedEmptyState {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 1rem;
  color: var(--muted);
  background: #fff;
}

@media (max-width: 720px) {
  .advancedSearchControls {
    grid-template-columns: 1fr;
  }
}
.contextFeedbackLink {
  display: inline-flex;
  width: fit-content;
  color: var(--accent-strong, #6f4c2f);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.contextFeedbackLink:hover { text-decoration-thickness: 2px; }
.selectedMeta .contextFeedbackLink { margin-top: 2px; }

.sessionIdentity {
  min-width: 0;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sessionAction {
  appearance: none;
  border: 0;
  border-left: 1px solid var(--line);
  margin-left: 7px;
  padding: 1px 0 1px 7px;
  color: var(--accent-dark);
  background: transparent;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}
.sessionAction:hover,
.sessionAction:focus-visible {
  background: var(--accent-dark);
  color: #fff;
  text-decoration: none;
}
.sessionAction:focus-visible {
  outline: 3px solid #f0c8a8;
  outline-offset: 2px;
}
.sessionAction:active {
  background: #5f2819;
  color: #fff;
}
.sessionAction:disabled,
.sessionAction:disabled:hover,
.sessionAction:disabled:focus-visible {
  color: var(--muted);
  background: transparent;
  cursor: default;
  text-decoration: none;
  outline: none;
}


/* Authenticated release polish and signed-out calculator lock. */
.authenticationGateNotice {
  margin: 0 0 1rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-left: 4px solid var(--accent);
  border-radius: 0.55rem;
  background: #fffaf2;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}
.authenticationGateNotice strong {
  color: var(--text);
  font-weight: 900;
}

body.authenticationLocked #entryTable,
body.authenticationLocked .worksheetToolbar,
body.authenticationLocked .actions {
  opacity: 0.78;
}

body.authenticationLocked .authenticationGateNotice {
  opacity: 1;
}
