:root {
  color-scheme: light;
  --bg: #f5fbff;
  --panel: #ffffff;
  --line: #d8dee8;
  --text: #17202f;
  --muted: #5c6878;
  --blue: #1557b0;
  --green: #0f7b58;
  --amber: #a35f00;
  --red: #b42318;
  --shadow: 0 8px 22px rgba(23, 32, 47, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

.app-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.brand-heading {
  display: grid;
  min-width: 0;
  justify-items: start;
  gap: 6px;
}

.brand-logo {
  display: block;
  width: min(304.2px, 100%);
  height: auto;
  aspect-ratio: 468 / 88;
  object-fit: contain;
  object-position: left center;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  font-weight: 750;
  letter-spacing: 0;
}

h2 {
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0;
}

#subtitle {
  color: var(--muted);
  margin-top: 2px;
}

.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

button,
.toggle {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
}

button {
  padding: 0 12px;
  cursor: pointer;
}

button:hover {
  border-color: var(--blue);
}

.auth-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--blue);
  border-radius: 6px;
  background: var(--blue);
  color: #ffffff;
  font-weight: 750;
  padding: 0 12px;
  text-decoration: none;
}

.auth-button:hover {
  background: #10478f;
  color: #ffffff;
  text-decoration: none;
}

.auth-button[hidden] {
  display: none;
}

.auth-button.admin-button {
  border-color: #17202f;
  background: #17202f;
}

.auth-button.admin-button:hover {
  border-color: #000000;
  background: #000000;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
}

.toggle:has(input:checked) {
  border-color: var(--blue);
}

.toggle input {
  width: 16px;
  height: 16px;
}

.status-band {
  min-height: 38px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 6px;
  background: var(--panel);
  padding: 8px 10px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.status-band.demo {
  border-left-color: var(--amber);
}

.status-band.error {
  border-left-color: var(--red);
}

.recipients-panel {
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.recipients-panel > summary {
  min-height: 38px;
  padding: 8px 12px;
  color: #17345f;
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
}

.recipients-panel[open] > summary {
  border-bottom: 1px solid var(--line);
}

.recipients-panel.auth-locked {
  background: #eef2f6;
  box-shadow: none;
  opacity: 0.68;
}

.recipients-panel.auth-locked > summary {
  color: #6f7a88;
  cursor: not-allowed;
}

.recipients-workspace {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
}

.recipient-editor {
  grid-column: 1;
}

.recipient-editor,
.recipient-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfe;
  padding: 12px;
}

.recipient-fields,
.recipient-card-fields {
  display: grid;
  gap: 8px;
}

.recipient-card-fields {
  grid-template-columns: 1fr;
}

.recipient-field {
  display: grid;
  min-width: 0;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.recipient-field input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 400;
  padding: 6px 8px;
}

.recipient-field input:focus {
  border-color: var(--blue);
  outline: 2px solid rgba(21, 87, 176, 0.2);
  outline-offset: 1px;
}

.recipient-card-field input[readonly] {
  background: #f2f6fb;
}

.recipient-channel-disabled {
  color: #8a96a8;
}

.recipient-channel-disabled input:disabled {
  border-color: #d8dee8;
  background: #e9edf3;
  color: #8a96a8;
  cursor: not-allowed;
  opacity: 1;
}

.recipient-editor-controls,
.recipient-card-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.recipient-channel-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.recipient-channel-note a {
  color: inherit;
}

.recipient-telegram-link-button {
  border-color: #2aabee;
  color: #126f9f;
  font-weight: 750;
}

.recipient-telegram-link-button:hover {
  border-color: #126f9f;
}

.recipient-telegram-link-button:disabled,
.recipient-telegram-link-button:disabled:hover {
  border-color: #d8dee8;
  background: #e9edf3;
  color: #8a96a8;
  cursor: not-allowed;
  opacity: 1;
}

.recipient-status {
  min-height: 18px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.recipient-status[data-state="error"] {
  color: var(--red);
}

.recipient-status[data-state="success"] {
  color: var(--green);
}

.recipient-add-button,
.recipient-remove-button {
  min-height: 34px;
  border-radius: 6px;
  font-weight: 750;
}

.recipient-add-button {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.recipient-remove-button {
  border-color: #e4aaa5;
  color: var(--red);
}

.recipient-list {
  display: grid;
  grid-column: 2 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.recipient-card {
  animation: recipient-arrive 160ms ease-out;
}

.recipient-card.active {
  border-left: 4px solid var(--green);
}

.recipient-card-header {
  margin-bottom: 8px;
}

.recipient-card-number {
  color: #17345f;
  font-size: 14px;
}

.recipient-active-toggle {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.recipient-active-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

[data-requires-auth="true"]:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.auth-page {
  min-height: 100vh;
  background: var(--bg);
}

.auth-shell {
  width: min(100% - 32px, 930px);
  margin: 0 auto;
  padding: 30px 0;
}

.auth-home-link,
.auth-logo {
  display: block;
  width: min(304.2px, 100%);
  height: auto;
}

.auth-home-link {
  margin: 0 auto 18px;
}

.auth-card {
  width: min(100%, 465px);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin-bottom: 14px;
}

.auth-card h2 {
  margin: 18px 0 6px;
  font-size: 20px;
}

.auth-card hr {
  margin: 20px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.auth-form {
  display: grid;
  gap: 9px;
}

.auth-form label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  padding: 7px 10px;
}

.auth-form button {
  width: 100%;
}

#login-form button[type="submit"]:hover {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

#register-form button[type="submit"]:hover {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

#login-form button[type="submit"]:active,
#register-form button[type="submit"]:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 4px rgba(23, 32, 47, 0.28);
}

.auth-note,
.auth-status {
  color: var(--muted);
  font-size: 13px;
}

.auth-status {
  min-height: 20px;
}

.auth-status[data-state="error"] {
  color: var(--red);
}

.auth-status[data-state="success"] {
  color: var(--green);
}

.admin-page {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(39, 114, 168, 0.08), transparent 42%),
    var(--bg);
}

.admin-shell {
  width: min(100% - 32px, 1180px);
}

.admin-card {
  width: 100%;
}

.admin-heading,
.admin-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-kicker {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.admin-summary {
  margin: 10px 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-table-wrap {
  overflow-x: auto;
  margin: 12px 0 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.admin-account-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-account-table th,
.admin-account-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.admin-account-table th {
  background: #eef3f9;
  color: #273244;
  font-weight: 800;
}

.admin-account-table tr:last-child td {
  border-bottom: 0;
}

.admin-email-cell {
  font-weight: 750;
}

.admin-password-cell {
  color: #9b2c2c;
  font-family: "Courier New", monospace;
  font-weight: 750;
  letter-spacing: 0.03em;
}

.admin-secondary-button,
.admin-home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.admin-test-button {
  border-color: #c65a00;
  background: #fff4e6;
  color: #8a3e00;
  font-weight: 800;
}

.admin-test-button:hover {
  border-color: #a94800;
  background: #ffe8cc;
}

@media (max-width: 680px) {
  .admin-heading,
  .admin-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@keyframes recipient-arrive {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.eliasse-current-signal {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: -6px 0 7px;
  color: #17202f;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.eliasse-current-signal input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #c65a00;
}

.eliasse-organe-shortcuts {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.eliasse-shortcut-row {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.eliasse-shortcut-label {
  flex: 0 0 auto;
  color: #17202f;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0;
  white-space: nowrap;
}

.eliasse-shortcut-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.eliasse-shortcut-button {
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: #17202f;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  padding: 0 10px;
  cursor: pointer;
  white-space: nowrap;
}

.eliasse-shortcut-button:hover,
.eliasse-shortcut-button:focus-visible {
  border-color: rgba(21, 87, 176, 0.55);
  outline: none;
}

.eliasse-shortcut-button.active {
  border-color: rgba(21, 87, 176, 0.75);
  background: #e7effb;
  color: #123f7c;
}

.eliasse-shortcut-button.in-progress {
  border-color: #c65a00;
}

.eliasse-shortcut-button.active.in-progress {
  border-color: #c65a00;
  color: #c65a00;
}

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

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0 7px;
}

.section-head:first-child {
  margin-top: 0;
}

.eliasse-calendar-history-section {
  margin-top: 14px;
}

.work-statistics-section {
  margin-top: 14px;
}

.work-statistics-explanation {
  display: grid;
  gap: 1px;
  margin: -2px 0 8px;
  color: var(--text);
  font: inherit;
  font-weight: 400;
}

.work-statistics {
  display: grid;
  gap: 8px;
}

.work-statistics-day {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafbfc;
  padding: 8px;
}

.work-statistics-day > summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 750;
}

.work-statistics-events {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.work-statistics-event {
  border: 1px solid #d7e0eb;
  border-radius: 6px;
  background: var(--panel);
  padding: 9px;
}

.work-statistics-event h3 {
  margin: 0;
  color: #17202f;
  font-size: 14px;
}

.work-statistics-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.work-statistics-number {
  color: var(--blue);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pill.work-statistics-fact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-color: currentColor;
  background: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.work-statistics-fact .work-statistics-number {
  color: inherit;
}

.work-statistics-average-choice {
  width: 15px;
  min-width: 15px;
  height: 15px;
  margin: 0 0 0 2px;
  accent-color: var(--blue);
  cursor: pointer;
}

.work-statistics-average-choice:disabled {
  cursor: not-allowed;
}

.work-statistics-fact-duration {
  color: #1557b0;
}

.work-statistics-fact-amendments {
  color: #0f7b58;
}

.work-statistics-fact-passage {
  color: #7b4591;
}

.work-statistics-fact-speech {
  color: #b45309;
}

.work-statistics-fact-passage .work-statistics-average-choice {
  accent-color: #7b4591;
}

.work-statistics-fact-speech .work-statistics-average-choice {
  accent-color: #b45309;
}

.work-statistics-selection {
  margin-top: 9px;
  color: #17202f;
  font-size: 12px;
  font-weight: 700;
}

.work-statistics-note {
  color: var(--muted);
  font-size: 12px;
}

.work-statistics-error {
  color: #8a241c;
}

.list {
  display: grid;
  gap: 8px;
}

.live-direct-panel {
  margin-bottom: 14px;
}

.live-direct-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.7fr);
  gap: 10px;
}

.live-video-frame,
.live-summary-frame {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.live-video-frame {
  padding: 10px;
}

.live-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border-radius: 6px;
  background: #101820;
}

.live-video-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  font-weight: 750;
}

.live-video-actions .disabled {
  color: var(--muted);
  pointer-events: none;
}

.live-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.live-summary-frame {
  max-height: 430px;
  overflow: auto;
  padding: 10px;
}

.live-summary-active {
  border-left: 4px solid var(--line);
  border-radius: 6px;
  background: #fafbfc;
  padding: 8px 10px;
  color: var(--muted);
  font-weight: 750;
}

.live-summary-active.has-active {
  border-left-color: var(--red);
  color: var(--red);
}

.live-summary-list {
  display: grid;
  gap: 3px;
  margin-top: 8px;
}

.summary-row {
  min-height: 24px;
  border-left: 3px solid transparent;
  padding: 2px 6px;
  font-size: 13px;
  line-height: 1.28;
}

.summary-row.level-1 {
  margin-left: 16px;
}

.summary-row.level-2 {
  margin-left: 30px;
}

.summary-row.level-3 {
  margin-left: 44px;
}

.summary-row.active {
  border-left-color: var(--red);
  color: var(--red);
  font-weight: 750;
}

.live-summary-empty {
  padding: 10px;
}

.item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px;
  box-shadow: var(--shadow);
}

.item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.item-title {
  font-weight: 750;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 7px;
  background: #fafbfc;
}

.amendment-menu-item .pill,
.eliasse-amendment-row .pill {
  color: #17202f;
  font-weight: 700;
}

.pill.pill-rejected {
  border-color: rgba(180, 35, 24, 0.45);
  color: #b42318;
}

.pill.pill-adopted {
  border-color: rgba(15, 123, 88, 0.45);
  color: #0f7b58;
}

.pill.pill-fallen {
  border-color: rgba(21, 87, 176, 0.45);
  color: #1557b0;
}

.pill.pill-group,
.amendment-menu-item .pill.pill-group,
.eliasse-amendment-row .pill.pill-group {
  border-color: rgb(var(--group-color));
  background: rgb(var(--group-color));
  color: var(--group-text-color);
  font-weight: 700;
}

.pill.pill-discussion,
.amendment-menu-item .pill.pill-discussion,
.eliasse-amendment-row .pill.pill-discussion {
  background: #ffffff;
  font-weight: 700;
}

.pill.pill-discussion-common {
  border-color: rgba(123, 69, 145, 0.55);
  color: #7b4591;
}

.pill.pill-discussion-identical {
  border-color: rgba(15, 123, 88, 0.55);
  color: #0f7b58;
}

.state {
  color: var(--green);
  border-color: rgba(15, 123, 88, 0.35);
}

.item-text {
  margin-top: 7px;
  color: #273244;
}

.event-list {
  display: grid;
  gap: 5px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.event-list li {
  border-left: 3px solid var(--line);
  padding: 3px 0 3px 8px;
  color: #273244;
  overflow-wrap: anywhere;
}

.event-list a,
.event-list span {
  font-weight: 650;
}

.compact-list .item {
  padding: 9px;
}

.amendments-details {
  margin-top: 9px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.amendments-details summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 750;
}

.passage-details {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  overflow-x: auto;
}

.passage-details summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 750;
}

.passage-table {
  width: 100%;
  min-width: 820px;
  margin-top: 8px;
  border-collapse: collapse;
  font-size: 12px;
}

.passage-table th,
.passage-table td {
  border: 1px solid var(--line);
  padding: 5px 6px;
  vertical-align: top;
}

.passage-table th {
  background: #eef3f9;
  color: #273244;
  text-align: left;
  font-weight: 750;
}

.passage-table td:first-child,
.passage-table th:first-child {
  width: 38px;
  text-align: center;
}

.passage-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.passage-table select {
  min-width: 54px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
}

.passage-monitored {
  background: #fff9db;
}

.passage-active {
  background: #fff1f0;
}

.passage-active td {
  border-color: rgba(180, 35, 24, 0.35);
}

.passage-alert-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(23, 32, 47, 0.55);
}

.passage-alert-panel {
  width: min(520px, 100%);
  border: 2px solid var(--red);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
  box-shadow: 0 18px 60px rgba(23, 32, 47, 0.35);
}

.passage-alert-panel h2 {
  color: var(--red);
  font-size: 22px;
}

.passage-alert-speaker {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 750;
}

.passage-alert-panel p + p {
  margin-top: 8px;
}

.passage-alert-panel button {
  margin-top: 14px;
}

.amendments-menu {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.eliasse-panel {
  margin-bottom: 14px;
}

.eliasse-card {
  border-left: 4px solid var(--green);
}

.eliasse-current {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

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

.eliasse-derouleur summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 750;
}

.eliasse-derouleur-list {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.eliasse-amendment-menu-item.current {
  border-color: rgba(180, 35, 24, 0.38);
  background: #fff1f0;
}

.eliasse-amendment-row {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafbfc;
  padding: 8px;
}

.eliasse-amendment-row.current {
  border-color: rgba(180, 35, 24, 0.38);
  background: #fff1f0;
}

.text-amendments-menu {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.text-amendments-group {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafbfc;
  padding: 8px;
}

.text-amendments-group summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 750;
}

.text-source-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.text-source-token,
.text-source-link,
.text-source-separator {
  font-size: 12px;
  font-weight: 700;
}

.text-source-token {
  color: #17202f;
}

.text-source-separator {
  color: var(--muted);
}

.text-tlp-block {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  border: 1px solid #d7e0eb;
  border-radius: 6px;
  background: #f7fafc;
  padding: 8px;
}

.text-tlp-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #17202f;
  font-size: 12px;
}

.text-tlp-header strong {
  font-weight: 750;
}

.text-tlp-fields {
  display: grid;
  grid-template-columns: repeat(13, minmax(54px, 1fr));
  align-items: start;
  gap: 5px;
}

.text-tlp-field {
  display: grid;
  grid-template-rows: 24px 28px;
  align-items: center;
  justify-items: center;
  gap: 3px;
  min-width: 0;
}

.text-tlp-field-title {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.14;
  min-height: 24px;
  text-align: center;
  white-space: nowrap;
}

.text-tlp-field .pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 20px;
  padding: 1px 6px;
  font-size: 10.5px;
  line-height: 1.1;
}

.text-tlp-group-field .text-tlp-field-title {
  width: auto;
}

.text-tlp-total-field .text-tlp-field-title {
  display: grid;
  align-content: center;
  color: #17202f;
  font-weight: 700;
}

.text-tlp-title-note {
  font-size: 10px;
  font-weight: 400;
  line-height: 1;
}

.text-tlp-field input {
  width: 58px;
  max-width: 100%;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: center;
}

.text-tlp-field input:focus {
  outline: 2px solid rgba(21, 87, 176, 0.28);
  outline-offset: 1px;
  border-color: var(--blue);
}

.text-tlp-group-field span {
  text-transform: none;
}

.text-amendments-empty {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.text-amendments-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.text-amendments-filter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #17202f;
  font-size: 12px;
  font-weight: 750;
}

.text-amendments-filter select,
.text-amendments-filter input {
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: #17202f;
  font: inherit;
  font-weight: 750;
  padding: 0 8px;
}

.text-amendments-name-filter {
  margin-left: 10px;
}

.text-amendments-name-filter input {
  width: 184px;
}

.text-amendments-undiscussed-filter {
  white-space: nowrap;
}

.text-amendments-filter input[type="checkbox"] {
  width: 14px;
  min-height: 14px;
  height: 14px;
  border-radius: 3px;
  accent-color: #0f7b58;
  padding: 0;
}

.text-amendments-pager {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: 2px;
}

.text-amendments-page-size {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #17202f;
  font-size: 12px;
  font-weight: 750;
}

.text-amendments-page-size select {
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: #17202f;
  font: inherit;
  font-weight: 750;
  padding: 0 8px;
}

.an-pagination-bar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid #d7e0eb;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f2f6fb 100%);
  box-shadow: 0 1px 3px rgba(16, 35, 63, 0.06);
}

.an-page-numbers {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.32rem;
}

.an-page-btn.btn,
.an-page-number-btn.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: #17202f;
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.1;
  white-space: nowrap;
}

.an-page-btn.btn {
  min-width: 30px;
  font-weight: 600;
  padding: 0 7px;
}

.an-page-number-btn.btn {
  min-width: 2.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 0 0.65rem;
}

.an-page-number-btn.btn.active,
.an-page-number-btn.btn:disabled {
  border-color: var(--blue);
  background: #e7effb;
  color: #123f7c;
  cursor: default;
}

.an-page-btn.btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.text-pager-refresh-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.text-pager-refresh-button.btn {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  padding: 0 12px;
  white-space: nowrap;
}

.text-pager-refresh-button.btn:hover {
  border-color: var(--blue);
}

.text-pager-refresh-button.btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.text-pager-auto-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  padding: 0 9px;
  white-space: nowrap;
  cursor: pointer;
}

.text-pager-auto-toggle:has(input:checked) {
  border-color: var(--blue);
  color: var(--blue);
}

.text-pager-auto-toggle input {
  margin: 0;
  accent-color: var(--blue);
}

.amendment-menu-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafbfc;
  padding: 8px;
}

.amendment-menu-item.amendment-menu-item-studied {
  border-color: rgba(15, 123, 88, 0.18);
  background: #f7fff9;
}

.amendment-menu-item.amendment-menu-item-current {
  border-color: rgba(180, 35, 24, 0.38);
  background: #fff1f0;
}

.amendment-menu-item summary {
  cursor: pointer;
}

.amendment-menu-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(620px, 650px);
  align-items: start;
  gap: 10px;
  list-style: none;
}

.amendment-menu-summary::marker {
  content: "";
}

.amendment-menu-summary::-webkit-details-marker {
  display: none;
}

.amendment-menu-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.amendment-menu-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.amendment-order {
  flex: 0 0 auto;
  min-width: 58px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.amendment-click-title {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid #9bb9e8;
  border-radius: 999px;
  background: #e7effb;
  color: #123f7c;
  font-weight: 700;
  padding: 1px 9px;
  text-decoration: none;
}

.amendment-report-link {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fafbfc;
  color: #17202f;
  font-size: 12px;
  font-weight: 700;
  padding: 1px 9px;
  text-decoration: none;
  white-space: nowrap;
}

.amendment-report-link:hover,
.amendment-report-link:focus-visible {
  border-color: #9bb9e8;
  background: #ffffff;
  color: #123f7c;
}

.amendment-menu-summary:hover .amendment-click-title,
.amendment-menu-summary:focus-visible .amendment-click-title {
  border-color: var(--blue);
  background: #d8e8ff;
  color: #0f3a73;
}

.amendment-menu-item[open] .amendment-click-title {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.amendment-timing-controls {
  display: grid;
  grid-template-columns: repeat(8, minmax(58px, 1fr));
  gap: 8px;
  justify-self: stretch;
  cursor: default;
}

.amendment-timing-controls-with-examination-date {
  grid-template-columns: minmax(90px, 1.4fr) repeat(8, minmax(57px, 1fr));
}

.amendment-examination-date-input[readonly] {
  background: #f7f9fc;
  cursor: default;
}

.amendment-examination-date-input::placeholder {
  color: var(--blue);
  opacity: 1;
}

.amendment-timing-controls-disabled {
  opacity: 0.58;
}

.amendment-timing-field {
  display: grid;
  grid-template-rows: minmax(26px, auto) 30px;
  gap: 4px;
  min-width: 0;
}

.amendment-timing-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.12;
  text-align: center;
  white-space: pre-line;
}

.amendment-timing-examination-date .amendment-timing-title,
.amendment-timing-examination-date .amendment-timing-input,
.amendment-timing-actual-speaking-time .amendment-timing-title,
.amendment-timing-actual-speaking-time .amendment-timing-input {
  color: var(--blue);
  font-weight: 700;
}

.amendment-timing-alert .amendment-timing-title,
.amendment-timing-intervention .amendment-timing-title,
.amendment-timing-time-minutes .amendment-timing-title {
  color: var(--text);
}

.amendment-timing-input,
.amendment-intervention-select {
  width: 100%;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.amendment-timing-field-disabled .amendment-timing-title {
  color: #9aa5b1;
}

.amendment-timing-field-disabled .amendment-timing-input,
.amendment-timing-field-disabled .amendment-intervention-select {
  border-color: #d6dde6;
  background: #eef2f6;
  color: #6f7a88;
  cursor: not-allowed;
}

.amendment-timing-input:focus,
.amendment-intervention-select:focus,
.amendment-timing-checkbox:focus-visible {
  outline: 2px solid rgba(21, 87, 176, 0.28);
  outline-offset: 1px;
  border-color: var(--blue);
}

.amendment-timing-checkbox {
  width: 18px;
  height: 18px;
  margin: 6px 0 0;
  justify-self: center;
  accent-color: var(--blue);
}

.amendment-timing-field-disabled .amendment-timing-checkbox {
  accent-color: #9aa5b1;
  cursor: not-allowed;
}

.amendment-detail-body {
  display: grid;
  gap: 9px;
  margin-top: 9px;
  border-top: 1px solid var(--line);
  padding-top: 9px;
}

.amendment-detail-section h3 {
  color: #17202f;
  font-size: 12px;
  font-weight: 800;
}

.amendment-detail-text {
  margin-top: 4px;
  color: #273244;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.amendment-detail-empty {
  color: var(--muted);
  font-size: 12px;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.65);
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.legal-footer {
  width: min(100%, 1280px);
  margin: 32px auto 0;
  border-top: 1px solid var(--line);
  padding: 18px 16px 22px;
  color: var(--muted);
  font-size: 13px;
}

.legal-footer-inner {
  display: grid;
  gap: 8px;
}

.legal-footer-brand {
  width: fit-content;
  color: #17345f;
  font-weight: 800;
}

.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
}

.legal-footer-link {
  color: #0d346f;
}

.legal-document-body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.legal-page-shell {
  width: 100%;
  flex: 1 0 auto;
}

.legal-page-header {
  margin-bottom: 14px;
}

.legal-home-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  font-weight: 750;
}

.legal-card {
  max-width: 880px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 22px;
}

.legal-card h1 {
  margin-bottom: 20px;
}

.legal-content {
  display: grid;
  gap: 10px;
}

.legal-content h2 {
  margin: 12px 0 0;
  color: #17345f;
}

.legal-content p,
.legal-content ul {
  margin: 0;
}

.legal-content ul {
  display: grid;
  gap: 5px;
  padding-left: 22px;
}

@media (max-width: 1060px) {
  .amendment-menu-summary {
    grid-template-columns: 1fr;
  }

  .amendment-timing-controls {
    grid-template-columns: repeat(3, minmax(88px, 1fr));
  }

  .amendment-timing-controls-with-examination-date {
    grid-template-columns: repeat(3, minmax(88px, 1fr));
  }
}

@media (max-width: 820px) {
  .app-shell {
    padding: 10px;
  }

  .topbar,
  .layout,
  .live-direct-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .topbar {
    align-items: stretch;
  }

  .toolbar {
    justify-content: stretch;
  }

  .recipients-workspace {
    grid-template-columns: 1fr;
  }

  .recipient-editor,
  .recipient-list {
    grid-column: 1;
  }

  .recipient-list {
    grid-template-columns: 1fr;
  }

  button,
  .toggle,
  .auth-button {
    flex: 1;
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .legal-card {
    padding: 16px;
  }

  .legal-footer-links {
    flex-direction: column;
    align-items: flex-start;
  }

  .amendment-timing-controls {
    grid-template-columns: repeat(2, minmax(88px, 1fr));
  }

  .amendment-timing-controls-with-examination-date {
    grid-template-columns: repeat(2, minmax(88px, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .recipient-card {
    animation: none;
  }
}
