:root {
  color-scheme: dark;
  --bg: #050917;
  --topbar: #0f1728;
  --panel: #121d31;
  --panel-2: #0c1527;
  --panel-3: #0b1223;
  --field: #0c1527;
  --text: #f8fbff;
  --muted: #aebbd0;
  --muted-2: #7f8da5;
  --line: #2b3d5c;
  --line-strong: #344763;
  --primary: #3169f4;
  --cyan: #1bb9d2;
  --cyan-bright: #33ddff;
  --cyan-dark: #0b4864;
  --green: #0ea66d;
  --green-soft: #0c2a28;
  --gold: #a88624;
  --gold-soft: #332b09;
  --danger: #d77980;
  --danger-soft: #2a1823;
  --radius: 8px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  touch-action: manipulation;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  min-height: 108px;
  padding: 22px clamp(18px, 3vw, 42px);
  border-bottom: 1px solid var(--line);
  background: var(--topbar);
}

.topbar-brand {
  display: grid;
  justify-items: start;
  gap: 8px;
}

.topbar-credit-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.brand-control-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 100%;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.35rem, 2.3vw, 2rem);
  font-weight: 760;
  letter-spacing: 0;
}

.topbar p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  align-self: flex-end;
  gap: 10px;
  margin-bottom: 2px;
}

.footer-credit-pill.topbar-credit-pill {
  min-width: 0;
  width: fit-content;
  min-height: 24px;
  padding: 0 10px;
  font-size: 0.72rem;
}

.footer-link-pill.topbar-return-link {
  min-height: 24px;
  padding: 0 10px;
  font-size: 0.72rem;
}

.auth-button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 760;
}

.ghost-button.topbar-auth-button {
  min-width: 186px;
  border-color: rgba(96, 218, 255, 0.96);
  background: linear-gradient(180deg, #1da7ff, #0875db);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(29, 167, 255, 0.28);
}

.ghost-button.topbar-auth-button:hover:not(:disabled) {
  border-color: rgba(105, 232, 255, 0.98);
  background: linear-gradient(180deg, #1ba6f4, #1176d2);
}

.state-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #101b30;
  color: #d8e2f2;
  font-size: 0.92rem;
  font-weight: 700;
  max-width: 100%;
}

.state-selector span {
  color: var(--muted);
}

.state-selector select {
  flex: 1 1 auto;
  min-width: 128px;
  border: 0;
  background: transparent;
  color: #f8fbff;
  font: inherit;
  outline: 0;
}

.state-selector option {
  background: #101b30;
  color: #f8fbff;
}

.source-pill {
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
  padding: 5px 10px;
  border: 1px solid rgba(40, 116, 184, 0.58);
  border-radius: 999px;
  background: rgba(6, 24, 52, 0.98);
  color: #c6e5ff;
  font-size: 0.72rem;
  font-weight: 760;
  white-space: nowrap;
}

.exit-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #16223a;
  color: #f8fbff;
  font-weight: 760;
  cursor: pointer;
}

.support-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(245, 91, 91, 0.82);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(194, 40, 40, 0.98), rgba(137, 18, 18, 0.98));
  color: #ffffff;
  font-weight: 760;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(88, 10, 18, 0.28);
}

.support-button:hover,
.support-button.active {
  border-color: rgba(255, 166, 166, 0.96);
  background: linear-gradient(180deg, rgba(213, 55, 55, 1), rgba(155, 21, 21, 1));
}

.topbar-support-button {
  min-width: 186px;
}

.exit-button:hover {
  border-color: #536b91;
  background: #1d2d4c;
}

.app-shell {
  display: grid;
  grid-template-columns: clamp(360px, 25vw, 440px) minmax(0, 1fr);
  gap: clamp(22px, 2vw, 34px);
  width: calc(100% - clamp(32px, 4vw, 72px));
  margin: 28px auto;
}

.support-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
}

.support-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 20, 0.72);
  backdrop-filter: blur(6px);
}

.support-modal-card {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid rgba(31, 192, 218, 0.34);
  border-radius: 22px;
  background: #121b31;
  box-shadow: 0 36px 80px rgba(3, 8, 18, 0.48);
}

.support-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 28px;
  background: linear-gradient(180deg, #17b8d8, #119fbe);
}

.support-modal-header h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.65rem, 2vw, 2.2rem);
  line-height: 1.05;
}

.support-close-button {
  border: 0;
  background: transparent;
  color: rgba(240, 250, 255, 0.96);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.support-modal-body {
  display: grid;
  gap: 18px;
  padding: 34px 34px 28px;
  justify-items: center;
  text-align: center;
}

.support-icon-shell {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: rgba(16, 169, 211, 0.14);
}

.support-icon-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
}

.support-icon-mark svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #21c8ea;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.support-lead {
  max-width: 430px;
  margin: 0;
  color: #dce8f8;
  font-size: 1rem;
  line-height: 1.6;
}

.support-mode-switch {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(47, 62, 90, 0.92);
}

.support-mode-option {
  min-width: 112px;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #b8c6dc;
  font-size: 0.98rem;
  font-weight: 760;
  cursor: pointer;
}

.support-mode-option.active {
  background: rgba(86, 105, 134, 0.7);
  color: #1ec9ea;
}

.support-primary-button {
  width: min(100%, 480px);
  min-height: 68px;
  padding: 0 22px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, #19b6d5, #119fc0);
  color: #ffffff;
  font-size: 1.02rem;
  font-weight: 800;
  cursor: pointer;
}

.support-primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.support-monthly-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: min(100%, 480px);
}

.support-amount-button {
  min-height: 62px;
  padding: 0 18px;
  border: 0;
  border-radius: 16px;
  background: rgba(39, 52, 77, 0.96);
  color: #eef5ff;
  font-size: 0.98rem;
  font-weight: 800;
  cursor: pointer;
}

.support-amount-button:hover {
  background: rgba(61, 77, 108, 0.96);
}

.support-availability {
  margin: -2px 0 0;
  color: #dbe7f6;
  font-size: 0.92rem;
}

.support-processing-note {
  margin: 6px 0 0;
  color: #d8e2f2;
  font-size: 0.96rem;
}

.support-manage-link {
  color: #8fa3c3;
  font-size: 0.96rem;
}

.support-manage-link:hover {
  color: #d8e2f2;
}

.support-fine-print {
  max-width: 430px;
  margin: 2px 0 0;
  color: #8a97ae;
  font-size: 0.78rem;
  line-height: 1.45;
}

body.support-modal-open,
body.modal-open {
  overflow: hidden;
}

.legal-modal-card {
  position: relative;
  width: min(840px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border: 1px solid rgba(88, 101, 130, 0.44);
  border-radius: 22px;
  background: #121b31;
  box-shadow: 0 36px 80px rgba(3, 8, 18, 0.48);
}

.legal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px;
  border-bottom: 1px solid rgba(174, 187, 208, 0.16);
  background: #202b40;
}

.legal-modal-header h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.5rem, 2vw, 2rem);
}

.legal-modal-body {
  display: grid;
  gap: 22px;
  max-height: calc(100vh - 150px);
  padding: 30px;
  overflow-y: auto;
}

.auth-modal-card {
  position: relative;
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border: 1px solid rgba(31, 192, 218, 0.34);
  border-radius: 22px;
  background: #121b31;
  box-shadow: 0 36px 80px rgba(3, 8, 18, 0.48);
}

.auth-modal-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 28px;
  border-bottom: 1px solid rgba(174, 187, 208, 0.16);
  background: linear-gradient(180deg, rgba(10, 67, 97, 0.98), rgba(9, 45, 67, 0.98));
}

.auth-modal-header h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.5rem, 2vw, 1.95rem);
}

.auth-modal-header p {
  margin: 8px 0 0;
  color: #d9edf7;
  font-size: 0.98rem;
  line-height: 1.45;
  max-width: 54ch;
}

.auth-modal-body {
  display: grid;
  gap: 20px;
  max-height: calc(100vh - 150px);
  padding: 28px 28px 58px;
  overflow-y: auto;
}

.auth-identity-card,
.auth-benefits-section,
.auth-profile-section,
.auth-disclosure-section {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid rgba(60, 79, 110, 0.68);
  border-radius: 16px;
  background: rgba(10, 19, 36, 0.94);
}

.auth-step-card {
  border-color: rgba(30, 201, 234, 0.34);
}

.auth-flow-box {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(30, 201, 234, 0.42);
  border-radius: 18px;
  background: rgba(8, 18, 34, 0.96);
}

.auth-request-flow-box {
  border-color: rgba(33, 186, 131, 0.38);
  background: rgba(8, 22, 32, 0.96);
}

.auth-nested-section {
  padding: 16px;
  border-color: rgba(60, 79, 110, 0.54);
  border-radius: 14px;
  background: rgba(10, 19, 36, 0.74);
}

.auth-step-instruction {
  margin: -4px 0 0;
}

.auth-step-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.auth-step-title h3 {
  margin: 0;
}

.auth-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(30, 201, 234, 0.72);
  border-radius: 999px;
  background: rgba(5, 61, 90, 0.9);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 900;
}

.auth-step-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(79, 103, 139, 0.92);
  border-radius: 999px;
  background: rgba(18, 36, 64, 0.9);
  color: #cbd7e8;
  font-size: 0.78rem;
  font-weight: 800;
}

.auth-step-status.complete {
  border-color: rgba(33, 186, 131, 0.8);
  background: rgba(10, 60, 40, 0.92);
  color: #9ef3ca;
}

.auth-signed-in-summary,
.auth-submission-confirmation {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid rgba(33, 186, 131, 0.72);
  border-radius: 12px;
  background: rgba(7, 49, 35, 0.88);
  color: #d9ffec;
  line-height: 1.45;
}

.auth-submission-confirmation {
  display: grid;
  gap: 10px;
}

.auth-submission-confirmation h3,
.auth-submission-confirmation p {
  margin: 0;
}

.auth-preview-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(168, 134, 36, 0.72);
  border-radius: 999px;
  background: rgba(51, 43, 9, 0.95);
  color: #ffe08a;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.auth-lead {
  margin: 0;
  color: #f3f8ff;
  font-size: 1rem;
  line-height: 1.55;
}

.auth-provider-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.auth-provider-actions.single-provider {
  grid-template-columns: 1fr;
}

.auth-provider-button {
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(80, 100, 136, 0.88);
  border-radius: 10px;
  background: #15233c;
  color: #f8fbff;
  font-weight: 760;
  cursor: pointer;
}

.auth-provider-button:hover {
  border-color: rgba(122, 157, 209, 0.9);
  background: #1a2d4f;
}

.auth-provider-primary {
  border-color: rgba(27, 185, 210, 0.72);
  background: linear-gradient(180deg, rgba(20, 172, 208, 0.96), rgba(11, 104, 137, 0.96));
}

.auth-provider-primary:hover {
  border-color: rgba(141, 236, 255, 0.86);
  background: linear-gradient(180deg, rgba(37, 187, 223, 1), rgba(14, 119, 156, 1));
}

.auth-preview-status {
  margin: 0;
}

.auth-fine-print {
  max-width: none;
  margin: -6px 2px 18px;
  font-size: 0.74rem;
  line-height: 1.55;
}

.auth-admin-console-link {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(69, 81, 105, 0.86);
  border-radius: 999px;
  background: rgba(14, 21, 41, 0.92);
  color: #bac8dd;
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
}

.auth-admin-console-link:hover {
  border-color: rgba(30, 201, 234, 0.58);
  color: #ffffff;
}

.auth-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-section-heading h3 {
  margin: 0;
  font-size: 1.03rem;
  color: #ffffff;
}

.auth-benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.auth-benefit-card {
  display: grid;
  gap: 6px;
  padding: 16px 14px;
  border: 1px solid rgba(43, 61, 92, 0.92);
  border-radius: 12px;
  background: #0e1728;
}

.auth-benefit-card strong {
  color: #ffffff;
  font-size: 0.95rem;
}

.auth-benefit-card span {
  color: #dbe7f6;
  font-size: 0.88rem;
  line-height: 1.35;
}

.auth-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.auth-profile-grid .field {
  gap: 8px;
}

.auth-profile-grid input:disabled {
  color: #9bb1cf;
  opacity: 1;
}

.auth-optional-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.auth-optional-grid .field {
  gap: 8px;
}

.auth-optional-grid input:disabled {
  color: #9bb1cf;
  opacity: 1;
}

.auth-optional-grid textarea:disabled {
  color: #9bb1cf;
  opacity: 1;
}

.auth-span-all {
  grid-column: 1 / -1;
}

.auth-disclosure-list {
  margin: 0;
}

.legal-alert,
.legal-section {
  display: grid;
  gap: 14px;
}

.legal-alert {
  padding: 20px;
  border: 1px solid rgba(123, 76, 56, 0.72);
  border-radius: 16px;
  background: rgba(50, 35, 40, 0.9);
}

.legal-alert h3,
.legal-section h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1rem;
}

.legal-alert h3 {
  color: #ffdf80;
}

.legal-alert p,
.legal-section p,
.legal-list {
  margin: 0;
  color: #dbe4f3;
  line-height: 1.55;
}

.legal-list {
  display: grid;
  gap: 12px;
  padding-left: 22px;
}

.legal-list li {
  color: #dbe4f3;
}

.legal-list strong,
.legal-section strong {
  color: #ffffff;
}

.operator-page {
  min-height: 100vh;
}

.operator-shell {
  width: calc(100% - clamp(32px, 4vw, 72px));
  margin: 28px auto 36px;
}

.operator-panel {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 2vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.operator-login-panel,
.operator-review-content {
  display: grid;
  gap: 16px;
}

.operator-login-panel {
  max-width: 560px;
  padding: 20px;
  border: 1px solid rgba(43, 61, 92, 0.92);
  border-radius: var(--radius);
  background: #0e1728;
}

.operator-login-panel h3,
.operator-login-panel p {
  margin: 0;
}

.operator-login-panel p {
  color: #cbd7e8;
}

.operator-google-admin-panel,
.operator-passcode-panel {
  display: grid;
  gap: 12px;
}

.operator-admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  text-decoration: none;
}

.operator-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(180px, 220px) minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: end;
}

.operator-toolbar .field {
  gap: 6px;
}

.operator-toolbar .ghost-button,
.operator-toolbar .primary-button {
  min-height: 48px;
}

.operator-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.operator-settings-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid rgba(43, 61, 92, 0.92);
  border-radius: 12px;
  background: #0e1728;
}

.operator-settings-card h3,
.operator-settings-card p {
  margin: 0;
}

.operator-settings-card h3 {
  color: #ffffff;
  font-size: 1rem;
}

.operator-settings-card p {
  margin-top: 6px;
  color: #cbd7e8;
  line-height: 1.5;
}

.operator-settings-card.disabled {
  opacity: 0.72;
}

.operator-test-settings-card {
  border-color: rgba(168, 134, 36, 0.62);
  background: rgba(31, 26, 12, 0.72);
}

.operator-test-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 250px;
}

.operator-test-controls .ghost-button {
  min-height: 38px;
  justify-content: center;
  white-space: normal;
}

.operator-setting-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  color: #ffe9a8;
  font-weight: 760;
}

.operator-setting-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #d0a728;
}

.operator-summary-card {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(43, 61, 92, 0.92);
  border-radius: 12px;
  background: #0e1728;
}

.operator-summary-card strong {
  font-size: 1.4rem;
  color: #ffffff;
}

.operator-summary-card span {
  color: #cbd7e8;
  font-size: 0.88rem;
}

.operator-activity-log {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(43, 61, 92, 0.92);
  border-radius: 12px;
  background: rgba(10, 19, 36, 0.94);
}

.operator-activity-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) minmax(180px, 1fr) repeat(5, minmax(132px, 0.75fr)) auto auto;
  gap: 12px;
  align-items: end;
}

.operator-activity-toolbar .field {
  gap: 6px;
}

.operator-activity-toolbar .ghost-button,
.operator-activity-toolbar .primary-button {
  min-height: 48px;
}

.operator-activity-table-wrap {
  overflow: auto;
  border: 1px solid rgba(43, 61, 92, 0.92);
  border-radius: 12px;
  background: #0e1728;
}

.operator-activity-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
}

.operator-activity-table th,
.operator-activity-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(43, 61, 92, 0.74);
  color: #dbe7f6;
  text-align: left;
  vertical-align: top;
}

.operator-activity-table th {
  color: #ffffff;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.operator-activity-table td {
  font-size: 0.86rem;
  line-height: 1.4;
  word-break: break-word;
}

.operator-activity-table tbody tr:last-child td {
  border-bottom: 0;
}

.operator-accounts {
  display: grid;
  gap: 16px;
}

.operator-empty {
  padding: 18px 20px;
  border: 1px solid rgba(43, 61, 92, 0.92);
  border-radius: 12px;
  background: #0e1728;
  color: #cbd7e8;
}

.operator-account-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(10, 19, 36, 0.94);
}

.operator-account-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.operator-account-heading {
  display: grid;
  gap: 4px;
}

.operator-account-heading h2,
.operator-account-heading h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1.15rem;
}

.operator-account-heading p,
.operator-account-heading a {
  margin: 0;
  color: #cbd7e8;
}

.operator-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.operator-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(79, 103, 139, 0.92);
  background: rgba(18, 36, 64, 0.9);
  color: #dbe7f6;
  font-size: 0.78rem;
  font-weight: 760;
}

.operator-badge.pending {
  border-color: rgba(214, 173, 43, 0.88);
  background: rgba(77, 58, 10, 0.92);
  color: #ffe08a;
}

.operator-badge.approved {
  border-color: rgba(33, 186, 131, 0.8);
  background: rgba(10, 60, 40, 0.92);
  color: #9ef3ca;
}

.operator-badge.denied {
  border-color: rgba(201, 85, 85, 0.82);
  background: rgba(72, 19, 19, 0.92);
  color: #ffc3c3;
}

.operator-badge.incomplete {
  border-color: rgba(79, 103, 139, 0.92);
  background: rgba(18, 36, 64, 0.9);
  color: #cbd7e8;
}

.operator-account-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.operator-account-field {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(43, 61, 92, 0.92);
  border-radius: 12px;
  background: #0e1728;
}

.operator-account-field.operator-span-all {
  grid-column: 1 / -1;
}

.operator-account-field strong {
  color: #ffffff;
  font-size: 0.88rem;
}

.operator-account-field span,
.operator-account-field p {
  margin: 0;
  color: #dbe7f6;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.operator-account-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.operator-request-history {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(49, 84, 123, 0.78);
  border-radius: 14px;
  background: rgba(8, 16, 31, 0.62);
}

.operator-request-history h4,
.operator-request-card h5 {
  margin: 0;
  color: #ffffff;
}

.operator-request-history h4 {
  font-size: 1rem;
}

.operator-request-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(43, 61, 92, 0.92);
  border-radius: 12px;
  background: rgba(11, 22, 41, 0.92);
}

.operator-request-card h5 {
  font-size: 0.92rem;
}

.operator-review-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.operator-review-buttons button {
  min-height: 42px;
}

.operator-meta-note {
  margin: 0;
  color: #a6b8d3;
  font-size: 0.86rem;
  line-height: 1.5;
}

.legal-section a,
.legal-alert a {
  color: #9ddcff;
}

.legal-section a:hover,
.legal-alert a:hover {
  color: #ffffff;
}

.search-panel,
.results-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.search-panel {
  align-self: start;
  width: 100%;
  padding: 24px;
}

.results-panel {
  min-width: 0;
  padding: clamp(24px, 2vw, 34px);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: 0;
}

.panel-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.search-auth-note {
  max-width: 32ch;
}

.operator-test-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(27, 185, 210, 0.82);
  border-radius: var(--radius);
  background: rgba(8, 52, 76, 0.86);
}

.operator-test-panel strong {
  display: block;
  color: #ffffff;
}

.operator-test-panel p {
  margin: 5px 0 0;
  color: #d8f6ff;
  line-height: 1.45;
}

.operator-test-panel.safety-suspended {
  border-color: rgba(255, 200, 90, 0.88);
  background: rgba(61, 43, 8, 0.88);
}

.operator-test-panel .ghost-button {
  flex: 0 0 auto;
  min-height: 36px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-3);
}

.segmented label {
  min-width: 0;
}

.segmented input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.segmented span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 8px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 760;
  cursor: pointer;
  white-space: nowrap;
}

.segmented input:checked + span {
  border: 1px solid var(--cyan);
  background: #132f4e;
  color: #ffffff;
}

.segmented label.disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.segmented label.disabled span {
  cursor: not-allowed;
}

.search-form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

label,
summary {
  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 760;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--field);
  color: var(--text);
}

input:focus {
  outline: 3px solid rgba(27, 185, 210, 0.18);
  border-color: var(--cyan);
}

input::placeholder {
  color: #8292ad;
}

textarea {
  width: 100%;
  min-height: 108px;
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--field);
  color: var(--text);
  font: inherit;
  resize: vertical;
}

textarea:focus {
  outline: 3px solid rgba(27, 185, 210, 0.18);
  border-color: var(--cyan);
}

textarea::placeholder {
  color: #8292ad;
}

.date-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.advanced,
.advanced-settings {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.advanced summary,
.advanced-settings summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.advanced .date-grid,
.advanced-settings .date-grid {
  margin-top: 12px;
}

.cache-compact-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(27, 185, 210, 0.5);
  border-radius: 999px;
  background: rgba(11, 72, 100, 0.58);
  color: #dffbff;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.advanced-settings-body {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.cache-section,
.fec-settings,
.filing-folder-settings {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(174, 187, 208, 0.16);
}

.cache-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.cache-section h3,
.fec-settings h3,
.filing-folder-settings h3 {
  margin: 0;
  color: #ffffff;
  font-size: 0.98rem;
}

.cache-section p,
.fec-settings p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.inline-setting {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.cache-limit-inline-setting {
  grid-template-columns: minmax(0, 138px) auto;
  justify-content: start;
  max-width: 250px;
}

.cache-limit-input {
  text-align: right;
}

.setting-note {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.clear-cache-button {
  min-height: 36px;
  padding: 0 12px;
  white-space: nowrap;
}

.cache-meter {
  display: grid;
  gap: 7px;
}

.cache-meter-bar {
  height: 10px;
  overflow: hidden;
  border: 1px solid rgba(27, 185, 210, 0.34);
  border-radius: 999px;
  background: #071024;
}

.cache-meter-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--cyan);
}

#cacheUsageText {
  color: var(--muted);
  font-size: 0.86rem;
}

.cache-restart-prompt {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(168, 134, 36, 0.72);
  border-radius: 6px;
  background: var(--gold-soft);
  color: #fff0b4;
}

.cache-restart-prompt strong {
  color: #ffffff;
  font-size: 0.9rem;
}

.cache-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cache-options {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.cache-options legend {
  margin-bottom: 2px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 760;
}

.cache-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 680;
}

.cache-options input {
  width: 16px;
  min-height: 16px;
  padding: 0;
  accent-color: var(--cyan);
}

.search-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
}

.primary-button,
.ghost-button,
.stop-button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 6px;
  font-weight: 780;
  cursor: pointer;
}

.primary-button {
  border: 1px solid #26cdea;
  background: var(--cyan);
  color: #ffffff;
}

.primary-button:hover {
  background: #11a8c0;
}

.primary-button:disabled,
.ghost-button:disabled,
.stop-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.ghost-button {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: #dbe7f6;
}

.ghost-button:hover:not(:disabled) {
  border-color: #536b91;
  background: #17243a;
}

.ghost-button.danger-button {
  border-color: rgba(215, 121, 128, 0.62);
  background: rgba(120, 31, 35, 0.54);
  color: #ffd3d6;
}

.ghost-button.danger-button:hover:not(:disabled) {
  border-color: rgba(255, 154, 160, 0.84);
  background: rgba(150, 38, 44, 0.68);
}

.stop-button {
  border: 1px solid rgba(215, 121, 128, 0.42);
  background: var(--danger-soft);
  color: var(--danger);
}

.stop-button:hover:not(:disabled) {
  border-color: rgba(215, 121, 128, 0.72);
  background: #391c27;
}

.status {
  min-height: 48px;
  margin-top: 18px;
  padding: 13px;
  border-radius: var(--radius);
  background: #101c32;
  color: #b7c8ff;
  font-size: 0.96rem;
}

.status-line {
  display: grid;
  grid-template-columns: minmax(120px, 0.42fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.status-line + .status-line {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(183, 200, 255, 0.16);
}

.status-label {
  color: #dffbff;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.progress-line span:last-child {
  color: #dbe7f6;
  font-weight: 760;
}

.eta-line span:last-child {
  color: #ffffff;
  font-size: 1.02rem;
  font-weight: 780;
}

.status.error {
  background: var(--danger-soft);
  color: var(--danger);
}

.status.success {
  background: var(--green-soft);
  color: #7cffbd;
}

.status.warning {
  border: 1px solid rgba(168, 134, 36, 0.62);
  background: var(--gold-soft);
  color: #ffe08a;
}

.committee-matches {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 10px;
  border: 1px solid rgba(27, 185, 210, 0.5);
  border-radius: var(--radius);
  background: #0b1729;
}

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

.committee-match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
}

.selected-committee {
  grid-template-columns: 1fr;
  border-color: rgba(14, 166, 109, 0.78);
  background: #0b3029;
}

.committee-match-text {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.committee-match-text strong,
.committee-match-text span {
  overflow-wrap: anywhere;
}

.committee-match-text strong {
  color: #ffffff;
  font-size: 1.02rem;
  line-height: 1.25;
}

.committee-match-text span {
  color: #b6c6d9;
  font-size: 0.9rem;
}

.committee-source-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  text-decoration: none;
  white-space: nowrap;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 18px;
  margin: 10px 0 24px;
}

.summary-card {
  min-height: 92px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-3);
}

.summary-card strong,
.summary-card span {
  display: block;
}

.summary-card strong {
  color: #ffffff;
  font-size: clamp(1.6rem, 2vw, 2.1rem);
  line-height: 1.1;
}

.summary-card span {
  margin-top: 6px;
  color: #d1d9e8;
  font-size: 0.95rem;
}

.summary-state {
  border-color: var(--cyan);
  background: #082338;
}

.summary-state strong {
  color: var(--cyan-bright);
}

.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.duplicate-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #17243a;
  color: #f3f8ff;
  font-size: 0.95rem;
  font-weight: 720;
}

.duplicate-toggle input {
  width: 17px;
  min-height: 17px;
  padding: 0;
  accent-color: var(--cyan);
}

.duplicate-toggle:has(input:disabled) {
  opacity: 0.52;
}

.column-button {
  border-color: rgba(27, 185, 210, 0.72);
  background: var(--cyan-dark);
  color: #ffffff;
}

.retry-button:not(:disabled) {
  border-color: rgba(168, 134, 36, 0.72);
  background: #302a10;
  color: #ffe08a;
}

.search-warnings {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(168, 134, 36, 0.72);
  border-radius: var(--radius);
  background: var(--gold-soft);
  color: #fff0b4;
}

.search-warnings strong {
  color: #ffffff;
}

.search-warnings p,
.search-warnings ul {
  margin: 0;
}

.search-warnings ul {
  display: grid;
  gap: 5px;
  padding-left: 20px;
}

.search-warnings a {
  color: #8fefff;
  font-weight: 760;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  max-height: 46vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

table {
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.96rem;
}

th,
td {
  padding: 12px 18px;
  border-bottom: 1px solid #253650;
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 48px;
  background: var(--panel-3);
  color: #dfe9ff;
  font-size: 0.82rem;
  font-weight: 820;
  text-transform: uppercase;
}

th span {
  display: block;
  overflow: hidden;
  padding-right: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-resizer {
  position: absolute;
  top: 10px;
  right: -5px;
  z-index: 2;
  width: 12px;
  height: calc(100% - 20px);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: col-resize;
}

.column-resizer::after {
  position: absolute;
  top: 2px;
  right: 5px;
  width: 3px;
  height: calc(100% - 4px);
  border-radius: 999px;
  background: #6b7890;
  content: "";
}

.column-resizer:hover::after,
.column-resizer.active::after {
  background: var(--cyan-bright);
}

body.resizing-columns {
  cursor: col-resize;
  user-select: none;
}

td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

th.detail-column,
td.detail-column,
col.detail-column {
  display: none;
}

table.show-detail-columns th.detail-column,
table.show-detail-columns td.detail-column {
  display: table-cell;
}

table.show-detail-columns col.detail-column {
  display: table-column;
}

.donor-detail-button {
  display: inline;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cyan-bright);
  font-weight: 760;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.donor-detail-button:hover,
.donor-detail-button:focus-visible {
  color: #8fefff;
}

tbody tr {
  cursor: pointer;
}

tbody tr:nth-child(odd) {
  background: #111c30;
}

tbody tr:nth-child(even) {
  background: #0f1a2d;
}

tbody tr:hover,
tbody tr.selected {
  background: #172a47;
}

.empty-row td {
  color: var(--muted);
  text-align: center;
  cursor: default;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(154, 168, 188, 0.28);
  border-radius: 999px;
  background: #18243a;
  color: #dbe7f6;
  font-size: 0.8rem;
  font-weight: 800;
}

.status-badge.unique {
  border-color: var(--green);
  background: #10392e;
  color: #7cffbd;
}

.status-badge.possible-duplicate {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: #ffe08a;
}

.status-badge.latest-matching-record {
  border-color: var(--cyan);
  background: #102f4d;
  color: #8fefff;
}

.detail-panel {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  background: var(--gold-soft);
}

.detail-panel h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
}

.detail-panel p {
  margin: 0;
  color: #fff0b4;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 20px;
}

.detail-grid div {
  min-width: 0;
}

.detail-label {
  display: block;
  margin-bottom: 3px;
  color: #eac861;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-value {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.detail-actions a,
.detail-actions button,
.fec-source-links a,
.fec-source-links button,
.fec-table a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #3a4b68;
  border-radius: 6px;
  background: var(--panel-2);
  color: #eaf2ff;
  font-weight: 760;
  text-decoration: none;
}

.fec-source-links button {
  cursor: pointer;
}

.fec-source-links button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.donor-research-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(234, 200, 97, 0.3);
}

.donor-research-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.donor-research-heading h4 {
  margin: 0;
  color: #ffffff;
  font-size: 1rem;
}

.donor-research-heading p,
.research-message,
.research-disclaimer {
  margin: 4px 0 0;
  color: #fff0b4;
}

.research-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #26cdea;
  border-radius: 6px;
  background: var(--cyan-dark);
  color: #ffffff;
  font-weight: 780;
  cursor: pointer;
  white-space: nowrap;
}

.research-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.research-error {
  color: var(--danger);
}

.research-disclaimer {
  color: #c9b673;
  font-size: 0.78rem;
  line-height: 1.35;
}

.fec-results {
  display: grid;
  gap: 12px;
  overflow-x: auto;
}

.fec-summary {
  color: #ffffff;
  font-weight: 760;
}

.fec-source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fec-table {
  min-width: 980px;
  width: 100%;
  table-layout: auto;
  border: 1px solid rgba(234, 200, 97, 0.2);
  border-radius: 6px;
}

.fec-table th,
.fec-table td {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.fec-table th {
  position: static;
}

.fec-table tbody tr {
  cursor: default;
}

.fec-row-details {
  min-width: 150px;
}

.fec-row-details summary {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #3a4b68;
  border-radius: 6px;
  background: var(--panel-2);
  color: #eaf2ff;
  font-weight: 760;
  cursor: pointer;
}

.fec-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  min-width: 520px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(174, 187, 208, 0.16);
  border-radius: 6px;
  background: #0d182b;
}

.fec-detail-label {
  display: block;
  margin-bottom: 3px;
  color: #eac861;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.fec-detail-value {
  overflow-wrap: anywhere;
}

.fec-match-checks {
  display: grid;
  gap: 8px;
  min-width: 520px;
  margin-top: 10px;
}

.fec-check {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid rgba(154, 168, 188, 0.28);
  border-radius: 6px;
  background: #101c32;
}

.fec-check strong {
  color: #ffffff;
  font-size: 0.84rem;
}

.fec-check span {
  color: var(--muted);
  font-size: 0.84rem;
}

.fec-check.yes,
.fec-check.strong {
  border-color: rgba(14, 166, 109, 0.62);
  background: #0b3029;
}

.fec-check.no,
.fec-check.needs-review {
  border-color: rgba(215, 121, 128, 0.5);
  background: var(--danger-soft);
}

.fec-check.partial,
.fec-check.not-compared,
.fec-check.unavailable {
  border-color: rgba(168, 134, 36, 0.5);
  background: var(--gold-soft);
}

.fec-reasons {
  min-width: 520px;
  margin: 10px 0 0;
  color: #fff0b4;
  font-size: 0.9rem;
}

.site-footer {
  width: calc(100% - clamp(32px, 4vw, 72px));
  margin: 0 auto 18px;
}

.site-footer-credit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  margin: 0 0 20px;
}

.site-footer-credit-left {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.site-footer-credit-right {
  display: grid;
  justify-items: end;
}

.footer-support-button {
  min-width: 188px;
}

.footer-credit-pill,
.footer-link-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 0.96rem;
  font-weight: 760;
  line-height: 1;
  text-decoration: none;
}

.footer-credit-pill {
  border: 1px solid rgba(30, 201, 234, 0.72);
  background: rgba(8, 24, 51, 0.4);
  color: #e8fbff;
}

.footer-link-pill {
  border: 1px solid rgba(69, 81, 105, 0.86);
  background: rgba(14, 21, 41, 0.92);
  color: #d8e3f5;
}

.footer-link-pill:hover {
  border-color: rgba(30, 201, 234, 0.56);
  color: #ffffff;
}

.footer-legal-link-row {
  margin: 0 0 10px;
}

.footer-legal-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: #b9d8ff;
  font-size: 0.82rem;
  font-weight: 760;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.footer-legal-link:hover,
.footer-legal-link:focus-visible {
  color: #ffffff;
}

.support-footer-note,
.footer-contact-note,
.site-disclaimer {
  color: #67758e;
  font-size: 0.7rem;
  line-height: 1.35;
}

.support-footer-note {
  margin: 0 0 8px;
}

.footer-contact-note {
  margin: 0 0 10px;
  font-size: 0.82rem;
  color: #8fa2c2;
}

.footer-contact-note a {
  color: #b9d8ff;
}

.footer-contact-note a:hover {
  color: #ffffff;
}

.site-disclaimer {
  margin: 0;
}

.hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .search-panel {
    max-width: none;
  }

  .table-wrap {
    max-height: none;
  }
}

@media (max-width: 780px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .results-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: stretch;
  }

  .state-selector {
    justify-content: space-between;
  }

  .actions {
    width: 100%;
  }

  .actions > button {
    flex: 1 1 auto;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .operator-settings-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .operator-test-controls {
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: calc(100% - 24px);
  }

  .topbar {
    gap: 16px;
    padding: 18px 18px 20px;
  }

  .topbar-brand,
  .top-actions,
  .brand-control-row,
  .topbar-credit-row {
    width: 100%;
  }

  .brand-control-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .topbar-credit-row {
    display: flex;
  }

  .search-panel,
  .results-panel {
    padding: 18px;
  }

  .panel-heading {
    align-items: stretch;
  }

  .panel-heading .ghost-button {
    width: 100%;
  }

  .advanced summary,
  .advanced-settings summary {
    align-items: stretch;
    flex-direction: column;
  }

  .cache-compact-status {
    align-self: flex-start;
  }

  .state-selector,
  .source-pill {
    width: 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

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

  .topbar-credit-pill,
  .topbar-auth-button,
  .topbar-support-button,
  .exit-button {
    width: 100%;
    min-width: 0;
  }

  .state-selector select {
    min-width: 0;
  }

  .date-grid,
  .detail-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .search-actions {
    grid-template-columns: 1fr;
  }

  .search-actions > button {
    width: 100%;
  }

  .committee-match {
    grid-template-columns: 1fr;
  }

  .inline-setting,
  .donor-research-heading {
    grid-template-columns: 1fr;
  }

  .duplicate-toggle,
  .actions,
  .actions > button {
    width: 100%;
  }

  .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ghost-button.retry-button {
    grid-column: 1 / -1;
  }

  .support-modal {
    padding: 16px;
  }

  .support-modal-header {
    padding: 22px 22px 20px;
  }

  .support-modal-body {
    padding: 28px 22px 24px;
  }

  .auth-modal-card {
    width: min(100%, calc(100vw - 24px));
    max-height: calc(100vh - 32px);
  }

  .auth-modal-header {
    padding: 20px 22px;
  }

  .auth-modal-body {
    max-height: calc(100vh - 128px);
    padding: 22px 22px 50px;
  }

  .auth-provider-actions,
  .auth-benefits-grid,
  .auth-profile-grid,
  .auth-optional-grid {
    grid-template-columns: 1fr;
  }

  .operator-toolbar,
  .operator-activity-toolbar,
  .operator-summary-grid,
  .operator-account-grid,
  .operator-account-actions {
    grid-template-columns: 1fr;
  }

  .legal-modal-card {
    width: min(100%, calc(100vw - 24px));
    max-height: calc(100vh - 32px);
  }

  .legal-modal-header {
    padding: 20px 22px;
  }

  .legal-modal-body {
    max-height: calc(100vh - 124px);
    padding: 22px;
  }

  .support-mode-switch {
    width: 100%;
    max-width: 280px;
  }

  .support-mode-option {
    min-width: 0;
    width: 100%;
  }

  .support-monthly-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .research-button {
    width: 100%;
  }

  .site-footer {
    width: calc(100% - 24px);
  }

  .site-footer-credit {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .site-footer-credit-right {
    justify-items: start;
  }

  .footer-support-button {
    width: 100%;
    min-width: 0;
  }

  .fec-detail-grid,
  .fec-match-checks,
  .fec-reasons {
    min-width: 0;
  }

  .fec-detail-grid {
    grid-template-columns: 1fr;
  }

  .status-line {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

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

  .actions,
  .support-monthly-grid {
    grid-template-columns: 1fr;
  }
}
