.ttmun-browser-wrap,
.ttmun-detail-wrap {
  max-width: 1366px;
  margin: 12px auto;
  color: #1f2937;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.ttmun-controls-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}

.ttmun-code-form {
  display: flex;
  gap: 10px;
}

.ttmun-code-input {
  width: 240px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 20px;
}

.ttmun-help {
  color: #64748b;
  font-style: italic;
  margin: 10px 0 12px;
}

.ttmun-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.ttmun-filter {
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 12px;
  min-height: 50px;
  font-size: 17px;
  background: #fff;
}

.ttmun-table-wrap {
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  overflow: hidden;
  background: #f8fafc;
}

.ttmun-resolution-table {
  width: 100%;
  border-collapse: collapse;
}

.ttmun-resolution-table thead th {
  background: #eff6ff;
  color: #6382a5;
  text-align: left;
  padding: 10px;
  font-size: 15px;
  cursor: pointer;
}

.ttmun-resolution-table tbody td {
  padding: 10px 10px;
  border-top: 1px solid #dbe3ee;
  font-size: 16px;
  vertical-align: middle;
}

.ttmun-code {
  font-weight: 600;
  color: #111827;
}

.ttmun-status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 3px;
  font-size: 16px;
  font-weight: 600;
  padding: 1px 5px;
  white-space: nowrap;
  line-height: 1.2;
}

.ttmun-status-approved {
  background: #dcfce7;
  color: #15803d;
}

.ttmun-status-waiting {
  background: #dcdee1;
  color: #2f8fff;
}

.ttmun-status-failed {
  background: #e5e4e4;
  color: #b91c1c;
}

.ttmun-status-pending {
  background: transparent;
  color: #c2410c;
  border: 1px solid rgba(194, 65, 12, 0.25);
}

.ttmun-resolution-table thead th:nth-child(5),
.ttmun-resolution-table tbody td:nth-child(5) {
  white-space: nowrap;
}

.ttmun-button {
  display: inline-block;
  border: 0;
  border-radius: 4px;
  padding: 5px 15px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.ttmun-button-go {
  background: #2f8fff;
  color: #fff;
}

.ttmun-button-approve {
  background: #16a34a;
  color: #fff;
}

.ttmun-button-muted {
  background: #e2e8f0;
  color: #334155;
}

.ttmun-button-danger {
  background: #dc2626;
  color: #fff;
}

.ttmun-inline-form {
  margin: 0;
}

.ttmun-muted {
  color: #64748b;
}

.ttmun-error {
  color: #b91c1c;
  font-weight: 600;
}

.ttmun-success {
  color: #166534;
  font-weight: 600;
}

.ttmun-back-link {
  display: inline-block;
  margin-bottom: 18px;
  color: #334155;
  text-decoration: none;
  font-weight: 600;
}

.ttmun-detail-hero {
  background: radial-gradient(circle at 50% 35%, #2f8fff 0%, #1868d9 48%, #0d4fb7 100%);
  color: #fff;
  padding: 28px 28px 30px;
  border-radius: 16px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.ttmun-detail-hero h2 {
  margin: 0 0 8px;
  font-size: 50px;
  line-height: 1.05;
  font-weight: 500;
}

.ttmun-detail-hero h3 {
  margin: 0 0 20px;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 500;
}

.ttmun-detail-hero p {
  margin: 12px 0;
  font-size: 18px;
  line-height: 1.35;
}

.ttmun-detail-hero-target .ttmun-hero-grid {
  display: flex;
  align-items: flex-start;
  gap: 26px;
  margin-bottom: 12px;
}

.ttmun-detail-hero-target .ttmun-hero-text {
  flex: 1;
  min-width: 0;
}

.ttmun-detail-hero-target .ttmun-hero-title-box {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.ttmun-detail-hero-target .ttmun-hero-title-box h2,
.ttmun-detail-hero-target .ttmun-hero-title-box h3 {
  color: #ffffff;
  margin-top: 0;
  margin-bottom: 10px;
}

.ttmun-detail-hero-target .ttmun-hero-title-box h3 {
  margin-bottom: 0;
}

.ttmun-detail-hero-target .ttmun-hero-flag-wrap {
  width: 160px;
  flex: 0 0 160px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  padding: 2px;
}

.ttmun-detail-hero-target .ttmun-hero-flag {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.ttmun-detail-hero-target .ttmun-hero-meta-line {
  margin: 8px 0;
  font-size: 18px;
  line-height: 1.45;
  color: #f4f9ff;
}

.ttmun-detail-hero-target .ttmun-hero-meta-line strong {
  font-weight: 700;
  color: #ffffff;
}

.ttmun-detail-hero-target .ttmun-hero-divider {
  border-top: 2px solid rgba(255, 255, 255, 0.75);
  margin: 8px -28px 14px;
}

.ttmun-detail-hero-target .ttmun-hero-meta-block {
  margin-left: 0;
  padding-left: 0;
}

.ttmun-detail-section {
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 14px;
}

.ttmun-detail-section h4 {
  margin: 0 0 12px;
  font-size: 23px;
}

.ttmun-status-box {
  background: #ffffff;
  border-radius: 10px;
  padding: 12px;
}

.ttmun-milestone {
  background: #ecfdf3;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 1px;
  font-size: 16px;
}

.ttmun-decision-title {
  margin: 0 0 15px;
  font-size: 24px;
  font-weight: 600;
  color: #1f2937;
}

.ttmun-decision-grid {
  display: inline-flex;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 25px;
  margin-bottom: 10px;
}

.ttmun-decision-form {
  width: 100%;
}

.ttmun-decision-button {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #1f2937;
  min-height: 50px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ttmun-decision-button:hover {
  border-color: #2f8fff;
  box-shadow: 0 0 0 3px rgba(34, 187, 255, 0.15);
  transform: translateY(-1px);
}

.ttmun-decision-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 4px solid #2f8fff;
  color: #000000;
  font-size: 30px;
  line-height: 1;
}

.ttmun-decision-label {
  font-size: 30px;
  font-weight: 400;
}

.ttmun-decision-danger .ttmun-decision-icon {
  border-color: #2f8fff;
  color: #000000;
}

.ttmun-journey-section {
  padding: 10;
  overflow: hidden;
}

.ttmun-journey-toggle {
  width: 100%;
  border: 0;
  background: #ffffff;
  color: #1f2937;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 23px;
  font-weight: 700;
  padding: 16px 18px;
}

.ttmun-journey-toggle-icon {
  color: #334155;
  transition: transform 0.2s ease;
}

.ttmun-journey-toggle[aria-expanded="true"] .ttmun-journey-toggle-icon {
  transform: rotate(180deg);
}

.ttmun-journey-content {
  border-top: 1px solid #dbe3ee;
  padding: 14px 18px 16px;
  background: #fff;
}

.ttmun-journey-track {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ttmun-journey-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px 14px;
  background: #f8fafc;
}

.ttmun-journey-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
}

.ttmun-journey-item-label {
  font-size: 18px;
  line-height: 1.35;
}

.ttmun-journey-done .ttmun-journey-item-icon {
  background: #dbeafe;
  color: #1d4ed8;
}

.ttmun-journey-current {
  border-color: #22bbff;
  box-shadow: 0 0 0 1px #22bbff;
  background: #e0f7ff;
}

.ttmun-journey-current .ttmun-journey-item-icon {
  background: #22bbff;
  color: #ffffff;
}

.ttmun-journey-failed {
  border-color: #ef4444;
  box-shadow: 0 0 0 1px #ef4444;
  background: #fef2f2;
}

.ttmun-journey-failed .ttmun-journey-item-icon {
  background: #ef4444;
  color: #ffffff;
}

.ttmun-journey-pending .ttmun-journey-item-icon {
  background: #e2e8f0;
  color: #64748b;
}

.ttmun-journey-arrow {
  text-align: center;
  color: #000000;
  font-size: 21px;
}

.ttmun-resolution-text {
  font-size: 11pt;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

.ttmun-resolution-doc {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 11pt;
  line-height: 1.5;
  color: #1f2937;
}

.ttmun-resolution-doc p {
  margin: 0 0 8px;
}

.ttmun-meta-line strong {
  font-weight: 700;
}

.ttmun-main-clause {
  margin-left: 0;
}

.ttmun-sub-clause {
  margin-left: 32px;
}

.ttmun-subsub-clause {
  margin-left: 64px;
}

.ttmun-main-clause .ttmun-marker,
.ttmun-sub-clause .ttmun-marker,
.ttmun-subsub-clause .ttmun-marker {
  font-weight: 400;
}

.ttmun-plain-line {
  margin-left: 0;
}

.ttmun-blank-line {
  height: 8px;
}

.ttmun-google-doc-frame {
  width: 100%;
  min-height: 700px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
}

.ttmun-rollcall-wrap .ttmun-help {
  margin-bottom: 14px;
}

.ttmun-rollcall-filters {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.ttmun-rollcall-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ttmun-rollcall-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border: 1px solid #dbe3ee;
  border-radius: 3px;
  background: #ffffff;
  padding: 16px 18px;
}

.ttmun-rollcall-card-main {
  min-width: 0;
}

.ttmun-rollcall-card-main h3 {
  margin: 0 0 6px;
  font-size: 26px;
  color: #1f2937;
}

.ttmun-rollcall-card-meta {
  margin: 4px 0;
  color: #64748b;
  font-size: 18px;
}

.ttmun-rollcall-card-stats {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 20px;
  font-weight: 600;
}

.ttmun-rollcall-present-count {
  color: #16a34a;
}

.ttmun-rollcall-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ttmun-rollcall-detail-wrap {
  max-width: 1366px;
  margin: 12px auto;
  color: #1f2937;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.ttmun-rollcall-hero h2 {
  margin-bottom: 4px;
}

.ttmun-rollcall-hero h3 {
  margin-bottom: 14px;
}

.ttmun-rollcall-section h4 {
  margin: 0 0 10px;
  font-size: 26px;
}

.ttmun-rollcall-members {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}

.ttmun-rollcall-member {
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 17px;
  line-height: 1.35;
}

.ttmun-rollcall-member-present {
  background: #ecfdf3;
  border-color: #bbf7d0;
  color: #166534;
}

.ttmun-rollcall-member-absent {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.ttmun-pv-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  border-radius: 50%;
  background: #22bbff;
  color: #ffffff;
  font-size: 10px;
  line-height: 1;
  vertical-align: middle;
}

.ttmun-rollcall-edit-section h3 {
  margin: 0 0 8px;
}

.ttmun-rollcall-edit-form {
  display: block;
}

.ttmun-rollcall-edit-label {
  display: block;
  margin: 8px 0 6px;
  font-weight: 700;
  color: #1f2937;
}

.ttmun-rollcall-description-input {
  width: 100%;
  margin-bottom: 14px;
}

.ttmun-rollcall-edit-actions {
  display: flex;
  gap: 10px;
  margin: 0 0 12px;
}

.ttmun-rollcall-edit-table-wrap {
  overflow-x: auto;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
}

.ttmun-rollcall-edit-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.ttmun-rollcall-edit-table th,
.ttmun-rollcall-edit-table td {
  padding: 10px 12px;
  border-top: 1px solid #dbe3ee;
  vertical-align: middle;
}

.ttmun-rollcall-edit-table th {
  background: #eff6ff;
  color: #6382a5;
  border-top: 0;
  text-align: left;
}

.ttmun-rollcall-edit-flag-cell {
  width: 58px;
}

.ttmun-rollcall-mini-flag {
  width: 34px;
  height: 22px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid #dbe3ee;
}

.ttmun-rollcall-no-flag {
  color: #94a3b8;
}

.ttmun-rollcall-status-select {
  min-width: 230px;
}

.ttmun-rollcall-edit-submit-wrap {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.ttmun-speech-page-title {
  margin: 0 0 14px;
  font-size: 32px;
  line-height: 1.08;
  color: #1f2937;
}

.ttmun-speech-page-title span {
  color: #22bbff;
}

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

.ttmun-speech-card {
  border: 1px solid #dbe3ee;
  border-radius: 5px;
  overflow: hidden;
  background: #ffffff;
}

.ttmun-speech-card-head {
  background: radial-gradient(circle at 50% 35%, #22bbff 0%, #1868d9 48%, #0d4fb7 100%);
  color: #ffffff;
  font-size: 24px;
  font-weight: 500;
  padding: 14px 16px;
}

.ttmun-speech-card-body {
  padding: 15px 16px;
}

.ttmun-speech-card .wpforms-container {
  margin: 0;
}

.ttmun-speech-card .wpforms-container .wpforms-field,
.ttmun-speech-card .wpforms-container .wpforms-submit-container {
  margin-bottom: 10px;
}

.ttmun-speech-manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.ttmun-speech-table-wrap {
  overflow-x: auto;
}

.ttmun-speech-table {
  width: 100%;
  border-collapse: collapse;
}

.ttmun-speech-table th,
.ttmun-speech-table td {
  border-top: 1px solid #dbe3ee;
  text-align: left;
  padding: 10px 10px;
  font-size: 15px;
  vertical-align: middle;
}

.ttmun-speech-table th {
  border-top: 0;
  color: #64748b;
  font-size: 16px;
  font-weight: 700;
}

.ttmun-speech-delegation {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ttmun-speech-mini-flag {
  width: 28px;
  height: 18px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid #dbe3ee;
}

.ttmun-speech-score-table th:not(:first-child),
.ttmun-speech-score-table td:not(:first-child) {
  text-align: center;
}

.ttmun-speech-score-table th:last-child,
.ttmun-speech-score-table td:last-child {
  font-weight: 700;
}

.ttmun-speech-score-total {
  font-size: 18px;
}

.ttmun-amendment-wrap .ttmun-code-input {
  width: 220px;
}

.ttmun-amendment-filters {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.ttmun-amendment-submit-wrap .ttmun-detail-section {
  max-width: 980px;
}

.ttmun-amendment-form {
  display: grid;
  gap: 10px;
}

.ttmun-amendment-label {
  display: block;
  margin-top: 4px;
  font-weight: 700;
  color: #1f2937;
}

.ttmun-amendment-textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 12px;
  font-size: 16px;
  line-height: 1.5;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  resize: vertical;
  min-height: 170px;
}

.ttmun-amendment-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.ttmun-amendment-text-block {
  background: #f8fafc;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  padding: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.ttmun-amendment-table th[data-amendment-sort="resolution"],
.ttmun-amendment-table td:nth-child(4) {
  min-width: 260px;
}

.ttmun-amendment-table td:nth-child(3),
.ttmun-amendment-table td:nth-child(5),
.ttmun-amendment-table td:nth-child(6) {
  white-space: nowrap;
}

@media (max-width: 1024px) {
  .ttmun-filters {
    grid-template-columns: 1fr 1fr;
  }

  .ttmun-rollcall-filters {
    grid-template-columns: 1fr 1fr;
  }

  .ttmun-amendment-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ttmun-detail-hero {
    padding: 20px;
  }

  .ttmun-detail-hero h2 {
    font-size: 46px;
  }

  .ttmun-detail-hero h3 {
    font-size: 34px;
  }

  .ttmun-detail-hero-target .ttmun-hero-grid {
    gap: 18px;
  }

  .ttmun-detail-hero-target .ttmun-hero-divider {
    margin-left: -20px;
    margin-right: -20px;
  }

  .ttmun-detail-hero-target .ttmun-hero-flag-wrap {
    width: 120px;
    flex-basis: 120px;
  }

  .ttmun-rollcall-card-main h3 {
    font-size: 25px;
  }

  .ttmun-rollcall-card-meta,
  .ttmun-rollcall-card-stats {
    font-size: 18px;
  }

  .ttmun-rollcall-edit-table {
    min-width: 620px;
  }

  .ttmun-decision-title {
    font-size: 28px;
  }

  .ttmun-decision-icon {
    width: 78px;
    height: 78px;
    font-size: 38px;
  }

  .ttmun-decision-label {
    font-size: 20px;
  }

  .ttmun-speech-page-title {
    font-size: 40px;
  }

  .ttmun-speech-card-head {
    font-size: 28px;
  }
}

@media (max-width: 700px) {
  .ttmun-filters {
    grid-template-columns: 1fr;
  }

  .ttmun-rollcall-filters {
    grid-template-columns: 1fr;
  }

  .ttmun-amendment-filters {
    grid-template-columns: 1fr;
  }

  .ttmun-resolution-table thead {
    display: none;
  }

  .ttmun-resolution-table,
  .ttmun-resolution-table tbody,
  .ttmun-resolution-table tr,
  .ttmun-resolution-table td {
    display: block;
    width: 100%;
  }

  .ttmun-resolution-table tr {
    border-top: 1px solid #dbe3ee;
    padding: 8px 0;
  }

  .ttmun-resolution-table td {
    border-top: 0;
    padding: 8px 14px;
  }

  .ttmun-code-input {
    width: 180px;
    font-size: 16px;
  }

  .ttmun-detail-hero h2 {
    font-size: 36px;
  }

  .ttmun-detail-hero h3 {
    font-size: 26px;
  }

  .ttmun-detail-hero-target .ttmun-hero-grid {
    flex-direction: column;
  }

  .ttmun-detail-hero-target .ttmun-hero-flag-wrap {
    width: 112px;
    flex: none;
  }

  .ttmun-detail-hero-target .ttmun-hero-meta-line {
    font-size: 16px;
  }

  .ttmun-detail-hero-target .ttmun-hero-title-box {
    width: 100%;
  }

  .ttmun-rollcall-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .ttmun-rollcall-card-main h3 {
    font-size: 22px;
  }

  .ttmun-rollcall-card-actions {
    width: 100%;
  }

  .ttmun-rollcall-card-actions .ttmun-button {
    width: 100%;
    text-align: center;
  }

  .ttmun-rollcall-members {
    grid-template-columns: 1fr;
  }

  .ttmun-rollcall-edit-actions {
    flex-direction: column;
  }

  .ttmun-rollcall-edit-actions .ttmun-button {
    width: 100%;
    text-align: center;
  }

  .ttmun-rollcall-edit-submit-wrap {
    flex-direction: column;
  }

  .ttmun-rollcall-edit-submit-wrap .ttmun-button {
    width: 100%;
    text-align: center;
  }

  .ttmun-decision-grid {
    grid-template-columns: 1fr;
  }

  .ttmun-decision-button {
    min-height: 152px;
  }

  .ttmun-journey-toggle {
    font-size: 20px;
  }

  .ttmun-speech-page-title {
    font-size: 34px;
  }

  .ttmun-speech-layout {
    grid-template-columns: 1fr;
  }
}
