/* Navigation, reading, filters and recovery */
.page-heading {
  margin: 8px 0 32px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.page-heading h1 {
  font-size: clamp(2.4rem, 4vw, 4rem);
}
.page-heading p {
  max-width: 650px;
  color: var(--muted);
  margin-top: 16px;
}
.listing-toolbar {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  align-items: center;
}
.listing-toolbar .searchbox {
  flex: 1;
  max-width: 640px;
}
.listing-toolbar .btn {
  min-height: 58px;
}
.area-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0 24px;
}
.chip {
  padding: 11px 17px;
  border-radius: 100px;
  background: white;
  color: var(--muted);
  font-size: 0.9rem;
  min-height: 44px;
  border: 1px solid var(--line);
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.chip.active {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
.results-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 24px 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.results-bar select {
  background: transparent;
  border: 0;
  color: var(--ink);
  padding: 10px;
  max-width: 100%;
}
.filter-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  color: var(--ink);
}
.field textarea {
  min-height: 95px;
  resize: vertical;
}
.field.full {
  grid-column: 1/-1;
}
.field small {
  color: var(--muted);
  line-height: 1.5;
}
.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.form-error {
  color: #903116;
  background: #fff0e9;
  padding: 12px;
  border-radius: 12px;
  margin-top: 16px;
  font-size: 0.92rem;
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
}
.pagination button {
  min-width: 46px;
  min-height: 46px;
  border-radius: 50%;
  background: white;
  color: var(--blue);
}
.pagination button[aria-current] {
  background: var(--blue);
  color: white;
}
.pagination button:first-child,
.pagination button:last-child {
  border-radius: 100px;
  padding: 0 18px;
}
.breadcrumb {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 28px;
}
.breadcrumb a {
  color: var(--blue);
  padding: 6px 0;
}
.article-header {
  max-width: 960px;
  margin: 0 auto 34px;
  text-align: center;
}
.article-header .tags {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.article-header h1 {
  font-size: clamp(2.3rem, 4vw, 4rem);
  line-height: 1.08;
}
.article-summary {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 800px;
  margin: 22px auto;
}
.article-header .meta {
  justify-content: center;
  gap: 12px;
}
.article-image {
  margin: 0;
  border-radius: 24px;
  background: #e3eaf1;
  overflow: hidden;
}
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 800px) 300px;
  gap: 64px;
  max-width: 1164px;
  margin: 42px auto;
}
.prose {
  font-size: 1.12rem;
  line-height: 1.8;
}
.prose h2 {
  margin: 34px 0 16px;
  font-size: 1.75rem;
}
.prose h2:first-child {
  margin-top: 0;
}
.prose p {
  line-height: 1.85;
  margin: 0 0 20px;
}
.prose a {
  text-decoration: underline;
  color: var(--blue);
}
.article-aside {
  align-self: start;
  position: sticky;
  top: 24px;
  background: white;
  border-radius: 24px;
  padding: 26px;
}
.article-aside h2 {
  font-size: 1.2rem;
  margin-bottom: 20px;
}
.fact {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.fact dt {
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.fact dd {
  margin: 0;
  font-size: 0.96rem;
}
.article-aside .btn {
  width: 100%;
  margin-top: 18px;
}
.notice {
  background: #fff0d7;
  border: 1px solid #ecd3a7;
  color: #6a450a;
  padding: 18px 22px;
  border-radius: 18px;
  line-height: 1.6;
  font-size: 0.95rem;
  margin-bottom: 28px;
}
.notice a {
  text-decoration: underline;
}
.history-list {
  max-width: 900px;
  margin: 32px auto;
}
.version-card {
  padding: 28px;
  border-radius: 24px;
  background: white;
  margin-bottom: 18px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.version-num {
  background: var(--soft);
  border-radius: 16px;
  min-width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  color: var(--blue);
  font-size: 1.5rem;
}
.version-info {
  flex: 1;
}
.version-info h2 {
  font-size: 1.35rem;
  margin: 8px 0;
}
.version-info p {
  color: var(--muted);
  margin-bottom: 18px;
}
.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.resource-card {
  padding: 30px;
  background: white;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}
.resource-card .file-type {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  color: var(--muted);
  font-size: 0.8rem;
}
.file-icon {
  display: grid;
  place-items: center;
  min-width: 54px;
  height: 62px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  color: var(--blue);
}
.resource-card h2 {
  font-size: 1.5rem;
}
.resource-card p {
  color: var(--muted);
}
.resource-card .btn {
  margin-top: auto;
}
.catalog .platform {
  padding: 30px;
  min-height: 175px;
  align-items: center;
  gap: 20px;
}
.catalog .platform-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.catalog .platform-icon {
  border-radius: 18px;
  display: grid !important;
}
.catalog .platform strong {
  font-size: 1.35rem;
}
.catalog .platform small {
  font-size: 0.9rem;
}
.event-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.event-card {
  background: white;
  border-radius: 24px;
  padding: 28px;
  display: flex;
  gap: 24px;
}
.event-card h2 {
  font-size: 1.5rem;
  margin: 12px 0;
}
.event-card p {
  color: var(--muted);
  margin: 12px 0 20px;
}
.empty-state {
  padding: 64px 24px;
  text-align: center;
  border-radius: var(--radius);
  background: white;
  max-width: 100%;
  margin: 24px auto;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 18px;
}
.state-icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  background: var(--soft);
  border-radius: 22px;
  color: var(--blue);
}
.empty-state h2 {
  font-size: 1.85rem;
}
.empty-state p {
  max-width: 480px;
  color: var(--muted);
}
.empty-state .actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.about-content {
  max-width: 900px;
}
.about-content section {
  background: white;
  padding: 30px;
  border-radius: 24px;
  margin: 20px 0;
}
.about-content h2 {
  margin-bottom: 18px;
  font-size: 1.5rem;
}
.about-content p {
  margin: 12px 0;
}
.state-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 24px;
  overflow: hidden;
  margin: 24px 0;
}
.admin-table td,
.admin-table th {
  text-align: left;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
  font-size: 0.93rem;
}
.admin-table th {
  color: var(--muted);
  font-size: 0.8rem;
}
.admin-table td:first-child {
  width: 45%;
}
.admin-table .badge {
  background: var(--soft);
  color: var(--blue);
}
.admin-table .badge.warning {
  background: #fff0d7;
  color: #704200;
}
.admin-shortcut {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  background: white;
  padding: 20px;
  border-radius: 18px;
  margin-bottom: 10px;
}
.admin-shortcut small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
  overflow-wrap: anywhere;
}
.admin-shortcut .btn {
  white-space: nowrap;
}
.form-help {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 22px;
}
.status-message {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 16px 0;
}
.details-card {
  max-width: 850px;
  margin: 0 auto;
}
.details-card h1 {
  font-size: 3rem;
}
.details-card .panel {
  margin-top: 24px;
}
.details-card .panel .btn {
  margin-top: 22px;
}
@media (max-width: 1000px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .article-aside {
    position: static;
    display: block;
  }
  .article-aside dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
  .admin-table td,
  .admin-table th {
    padding: 16px;
  }
  .resource-grid {
    gap: 16px;
  }
}
@media (max-width: 760px) {
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 24px;
  }
  .page-heading h1 {
    font-size: 2.65rem;
  }
  .page-heading p {
    font-size: 1rem;
  }
  .listing-toolbar {
    flex-wrap: wrap;
  }
  .listing-toolbar .searchbox {
    width: 100%;
    flex-basis: 100%;
  }
  .listing-toolbar .btn {
    min-height: 46px;
  }
  .area-tabs {
    gap: 8px;
    margin-bottom: 16px;
  }
  .chip {
    padding: 10px 15px;
    font-size: 0.85rem;
  }
  .results-bar {
    align-items: flex-start;
    gap: 8px;
    flex-direction: column;
  }
  .filter-fields {
    grid-template-columns: 1fr;
  }
  .modal-actions {
    position: sticky;
    bottom: -24px;
    background: white;
    padding-bottom: 22px;
    margin-bottom: -24px;
  }
  .article-header {
    text-align: left;
  }
  .article-header .tags,
  .article-header .meta {
    justify-content: flex-start;
  }
  .article-header h1 {
    font-size: 2.35rem;
  }
  .article-summary {
    font-size: 1.1rem;
  }
  .article-image {
    border-radius: 18px;
  }
  .article-layout {
    margin-top: 28px;
  }
  .prose {
    font-size: 1.08rem;
  }
  .article-aside dl {
    grid-template-columns: 1fr 1fr;
  }
  .version-card {
    padding: 20px;
    gap: 16px;
  }
  .resource-grid,
  .event-grid {
    grid-template-columns: 1fr;
  }
  .resource-card {
    padding: 24px;
  }
  .catalog .platform-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .catalog .platform {
    min-height: 125px;
  }
  .event-card {
    padding: 22px;
    gap: 18px;
  }
  .empty-state {
    padding: 44px 22px;
  }
  .empty-state h2 {
    font-size: 1.5rem;
  }
  .about-content section {
    padding: 24px;
  }
  .admin-table,
  .admin-table tbody,
  .admin-table tr,
  .admin-table td {
    display: block;
    width: 100% !important;
  }
  .admin-table thead {
    display: none;
  }
  .admin-table tr {
    padding: 16px;
    border-bottom: 1px solid var(--line);
  }
  .admin-table td {
    padding: 8px;
    border: 0;
  }
  .admin-table td[data-label]:before {
    content: attr(data-label) ': ';
    color: var(--muted);
  }
  .admin-shortcut {
    align-items: flex-start;
    flex-direction: column;
  }
  .details-card h1 {
    font-size: 2.35rem;
  }
  .section-head.wrap {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* External actions stay separate from cards' reading links. */
.content-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.content-actions .btn {
  max-width: 100%;
  min-width: 0;
}
.share-action svg,
.calendar-action svg {
  width: 19px;
  height: 19px;
}
.news-card-actions {
  padding: 0 24px 24px;
}
.news-card-actions .btn {
  width: 100%;
  font-size: 0.875rem;
  padding-inline: 14px;
}
.article-actions {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.action-hint {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 580px;
}
.article-actions .action-hint {
  margin: 0;
}
.agenda-item {
  padding-bottom: 20px;
}
.agenda-item:last-child {
  padding-bottom: 0;
}
.agenda-item .calendar-action {
  font-size: 0.875rem;
  padding-inline: 16px;
}
.event-card > div:last-child {
  min-width: 0;
  flex: 1;
}
.event-card .content-actions .btn {
  font-size: 0.875rem;
  padding-inline: 16px;
}
.event-card .action-hint {
  margin: 12px 0 0;
}
.details-card .content-actions {
  margin-top: 24px;
}
.details-card .panel .content-actions .btn {
  margin-top: 0;
}
.details-card .action-hint {
  margin-top: 14px;
}
@media (max-width: 760px) {
  .article-actions {
    align-items: flex-start;
  }
  .article-actions .btn {
    width: 100%;
  }
  .event-card .content-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .event-card .content-actions .btn {
    width: 100%;
  }
}

/* One sharing dialog for news cards, highlights and article versions. */
dialog.share-dialog {
  max-width: min(540px, calc(100vw - 32px));
}
.share-dialog .modal-head {
  margin-bottom: 18px;
}
.share-story {
  padding: 16px 18px;
  background: var(--soft);
  border-radius: 16px;
  font-size: 1.1rem;
  line-height: 1.4;
  margin-bottom: 14px;
}
.share-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.share-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 18px;
  padding: 18px 12px;
  color: var(--ink);
  text-align: center;
  min-width: 0;
}
.share-option:hover:not(:disabled) {
  background: var(--bg);
  border-color: var(--blue);
}
.share-option:disabled {
  opacity: 1;
  background: var(--bg);
  color: var(--muted);
}
.share-option-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--blue);
}
.share-option-icon.whatsapp {
  color: #176b3a;
  background: #e6f5eb;
}
.share-option-icon.teams {
  color: #5157a5;
  background: #efeffa;
}
.share-option-label {
  font-size: 1rem;
}
.share-option small {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.35;
}
.share-native {
  width: 100%;
  margin-top: 14px;
}
.share-local-note {
  margin-top: 16px;
}
.share-status {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--blue);
}
.share-status:not(:empty) {
  margin-top: 16px;
}
.share-manual {
  margin-top: 16px;
}
@media (max-width: 400px) {
  dialog.share-dialog {
    padding: 18px;
  }
  .share-dialog .modal-head {
    gap: 12px;
    margin-bottom: 14px;
  }
  .share-dialog .modal-head h2 {
    font-size: 1.5rem;
  }
  .share-story {
    font-size: 1rem;
    padding: 12px;
    margin-bottom: 12px;
  }
  .share-option {
    padding: 14px 8px;
    gap: 8px;
  }
  .share-option-label {
    font-size: 0.9rem;
  }
  .share-option small {
    display: none;
  }
  .share-options {
    gap: 10px;
    margin-top: 14px;
  }
}

