/* Extra glue for the Python pages. Main visual style comes from legacy RSFEED tstyles.css. */
@font-face {
  font-family: "Sarabun";
  src: url("/fonts/Sarabun-Regular.ttf?v=2026080510") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Sarabun";
  src: url("/fonts/Sarabun-Medium.ttf?v=2026080510") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Sarabun";
  src: url("/fonts/Sarabun-Bold.ttf?v=2026080510") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --app-font: "Sarabun", Tahoma, Arial, Helvetica, sans-serif;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--app-font);
  overflow-x: hidden;
}

.shell {
  width: min(1280px, 100%) !important;
}

.top-shell {
  position: relative;
  background: #028CAE;
}

.brand-cell {
  padding: 10px 14px;
}

.brand-row {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 16px;
}

.brand-lockup,
.brand-lockup:visited {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  text-decoration: none;
}

.brand-logo {
  width: 54px;
  height: 54px;
  box-sizing: border-box;
  padding: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
}

.brand-title {
  color: #ffffff;
  font-family: var(--app-font);
  font-size: 46px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.header-active-users {
  display: flex;
  min-width: 0;
  max-width: 420px;
  flex: 1 1 280px;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
  color: #ffffff;
  font-size: 12px;
  line-height: 1.25;
  text-align: right;
  text-shadow: 0 1px 1px rgba(0, 55, 70, 0.42);
}

.header-active-users-count {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  gap: 6px;
  font-size: 13px;
  white-space: nowrap;
}

.header-active-users-count strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-active-indicator {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #62e59b;
  box-shadow: 0 0 0 2px rgba(98, 229, 155, 0.2);
}

.header-active-users-names {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-user-name.is-employee {
  color: #ffffff;
}

.active-user-name.is-stinger {
  color: #ffe36e;
  font-weight: 700;
}

.top-user-cell {
  padding: 10px 14px;
}

.top-header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  height: 56px;
  gap: 18px;
  overflow: visible;
}

.top-user-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%;
  margin-left: auto;
}

.top-header-right .top-user-stack {
  width: auto;
  flex: 0 0 auto;
  margin-left: 0;
}

.top-user-stack > table {
  width: auto !important;
  margin-left: auto;
}

.top-user-stack .Topuser {
  text-align: right !important;
}

.theme-toggle-wrap {
  display: flex;
  justify-content: flex-end;
  width: 52px;
  margin-top: 4px;
  margin-left: auto;
}

.theme-switch {
  position: relative;
  display: inline-flex;
  width: 52px;
  height: 28px;
  flex: 0 0 52px;
  cursor: pointer;
}

.theme-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.theme-switch-track {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: background-color 180ms ease, border-color 180ms ease;
}

.theme-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.28);
  transition: transform 180ms ease, background-color 180ms ease;
}

.theme-sun-icon,
.theme-moon-icon {
  display: block;
  width: 14px;
  height: 14px;
}

.theme-sun-icon {
  color: #c87800;
}

.theme-moon-icon {
  display: none;
  color: #17627a;
}

.theme-switch input:checked + .theme-switch-track {
  border-color: #8dd2e3;
  background: #14232d;
}

.theme-switch input:checked + .theme-switch-track .theme-switch-thumb {
  transform: translateX(24px);
  background: #eaf7fa;
}

.theme-switch input:checked + .theme-switch-track .theme-sun-icon {
  display: none;
}

.theme-switch input:checked + .theme-switch-track .theme-moon-icon {
  display: block;
}

.theme-switch input:focus-visible + .theme-switch-track {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.top-logo-cell img {
  max-width: 100%;
  height: auto;
}

.top-logo-cell img.brand-logo {
  width: 54px;
  height: 54px;
}

.content-cell {
  width: calc(100% - 180px);
}

@media (min-width: 901px) {
  .main-shell,
  .main-shell > tbody {
    display: block;
  }

  .main-shell > tbody > .main-row {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    align-items: stretch;
  }

  .main-shell > tbody > .main-row > .sidebar-cell,
  .main-shell > tbody > .main-row > .content-cell {
    display: block;
    width: auto !important;
    height: auto !important;
  }

  .main-shell > tbody > .main-row > .content-cell {
    min-width: 0;
  }

  .sidebar-sticky {
    position: sticky;
    top: 8px;
    max-height: calc(100vh - 16px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
}

.legacy-menu ul,
.arrowlistcalendar ul {
  margin: 0;
  padding-left: 18px;
}

.legacy-menu li {
  line-height: 22px;
}

.legacy-menu ul li a,
.legacy-menu ul li a:visited {
  position: relative;
  padding-left: 22px;
  background-image: none !important;
}

.legacy-menu ul li a::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 7px;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: 0.82;
  transform: translateY(-50%) rotate(-45deg);
  transition: transform 150ms ease, opacity 150ms ease;
}

.legacy-menu ul li a:hover::before,
.legacy-menu ul li a:focus-visible::before {
  opacity: 1;
  transform: translate(2px, -50%) rotate(-45deg);
}

.sidebar-action-row {
  margin: 8px 0 4px;
  text-align: center;
}

.sidebar-action-row form {
  margin: 0;
}

.sidebar-action-button,
.calendar-search button {
  display: inline-block;
  min-width: 86px;
  width: auto;
  min-height: 28px;
  border: solid 1px #5977B3;
  border-radius: 4px;
  background: #F9FAFA;
  color: #0063AF;
  font-family: var(--app-font);
  font-size: 13px;
  font-weight: 500;
  line-height: 24px;
  padding: 2px 10px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.legacy-menu .sidebar-action-row .sidebar-action-button {
  width: auto !important;
  min-width: 86px;
  max-width: 130px;
  box-sizing: border-box;
}

.sidebar-action-row .sidebar-action-button {
  border-color: #9f231b;
  background: #b92b22;
  color: #ffffff !important;
}

.sidebar-action-row .sidebar-action-button:hover,
.sidebar-action-row .sidebar-action-button:focus-visible {
  border-color: #781811;
  background: #8f2018;
  color: #ffffff !important;
}

.sidebar-action-row .sidebar-action-button:focus-visible {
  outline: 2px solid #f1a29c;
  outline-offset: 2px;
}

.calendar-search button {
  display: block;
  margin: 6px auto 2px;
}

.link-button,
.image-submit {
  border: 0;
  background: transparent;
  color: #0063AF;
  cursor: pointer;
  font: 13px Tahoma, Arial, Helvetica;
  padding: 0;
}

.image-submit img {
  border: 0;
}

.alert-small {
  color: #D10202;
  font-weight: bold;
}

.login-page .sidebar-cell {
  display: none !important;
}

.login-page .content-cell {
  width: 100%;
}

@media (min-width: 901px) {
  body.login-page .main-shell > tbody > .main-row {
    grid-template-columns: minmax(0, 1fr);
  }

  body.login-page .main-shell > tbody > .main-row > .content-cell {
    grid-column: 1;
    width: 100% !important;
  }
}

.login-layout {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 100%;
  min-height: max(440px, calc(100vh - 145px));
  padding: 32px 20px;
}

.login-panel {
  box-sizing: border-box;
  width: 100%;
  max-width: 390px;
  border: 1px solid #c9d7df;
  border-radius: 8px;
  background: #ffffff;
  padding: 24px 26px 26px;
  box-shadow: 0 10px 28px rgba(31, 62, 78, 0.12);
}

.login-panel h1 {
  margin: 0 0 16px;
  color: #174f66;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.login-form {
  display: grid;
  gap: 8px;
}

.login-form label {
  margin-top: 4px;
  color: #314d5c;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
}

.login-form input[type="text"],
.login-form input[type="password"] {
  width: 100%;
  min-height: 42px;
  border: 1px solid #9eb4c1;
  border-radius: 6px;
  background: #ffffff;
  color: #1f3541;
  font-size: 16px;
  line-height: 1.3;
  padding: 8px 10px;
}

.login-form input:focus {
  border-color: #0575d1;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(5, 117, 209, 0.18);
}

.login-message {
  min-height: 22px;
  margin-bottom: 2px;
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
}

.login-submit {
  width: 100%;
  min-height: 42px;
  margin-top: 12px;
  border: 1px solid #0575d1;
  border-radius: 6px;
  background: #0575d1;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
}

.login-submit:hover,
.login-submit:focus-visible {
  border-color: #045fa9;
  background: #045fa9;
}

.content-pad {
  padding: 6px;
}

.admin-active-users {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 9px 12px;
  border-bottom: 1px solid #064f61;
  background: #075f73;
  color: #ffffff;
}

.admin-active-users-count {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 7px;
}

.admin-active-indicator {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #16834a;
  box-shadow: 0 0 0 2px rgba(22, 131, 74, 0.16);
}

.admin-active-users-names {
  min-width: 0;
  color: #ffffff;
  overflow-wrap: anywhere;
}

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  .admin-active-users {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

.toolbar {
  padding: 4px;
}

.toolbar h1 {
  font: bold 13px Tahoma, Arial, Helvetica;
  color: #FFFFFF;
  margin: 0;
}

.search {
  margin: 4px 0;
}

.search input {
  width: 260px;
}

.button,
.button:visited,
button {
  border: solid 1px #5977B3;
  background-color: #F9FAFA;
  color: #0063AF;
  font: 13px Tahoma, Arial, Helvetica;
  padding: 2px 6px;
  cursor: pointer;
}

.table-wrap {
  padding: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

.table-wrap th {
  border: solid 1px #B2AEAE;
  background-color: #F0F0F0;
  font-weight: bold;
  padding: 2px;
}

.table-wrap td {
  border-bottom: dotted 1px #cccccc;
  padding: 2px;
  vertical-align: top;
}

.nowrap {
  white-space: nowrap;
}

.empty {
  text-align: center;
  color: #999999;
  padding: 20px;
}

.pager,
.actions {
  padding: 6px;
}

.pager {
  line-height: 24px;
}

.pager-link,
.pager-current,
.pager-gap {
  display: inline-block;
  min-width: 18px;
  margin: 0 2px;
  text-align: center;
}

.pager-link,
.pager-link:visited {
  color: #0063AF;
  text-decoration: underline;
}

.pager-current {
  color: #d10202;
  font-weight: 700;
}

.pager-arrows {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  vertical-align: middle;
}

.pager-arrows img {
  vertical-align: middle;
}

.form-panel,
.detail,
.script-body {
  padding: 6px;
}

.grid-form {
  width: 100%;
}

.grid-form label {
  display: block;
  margin: 4px 0;
  font-weight: bold;
}

.grid-form input,
.grid-form textarea,
.grid-form select {
  border: solid 1px #999999;
  background-color: #F9FAFA;
  color: #000099;
  font: 13px Tahoma, Arial, Helvetica;
}

.grid-form input,
.grid-form select {
  height: 22px;
}

.grid-form textarea {
  width: 96%;
}

.grid-form input,
.grid-form textarea,
.grid-form select {
  max-width: 100%;
}

.upload-panel {
  padding: 14px;
}

.upload-form {
  max-width: 760px;
}

.upload-form label {
  margin: 0 0 12px;
  color: #243746;
  font-weight: 700;
}

.upload-form textarea,
.upload-form select,
.upload-form input[type="text"],
.upload-form input[type="password"],
.upload-form input[type="email"],
.upload-form input[type="file"] {
  width: min(100%, 640px);
  min-height: 36px;
  height: auto;
  border: solid 1px #b7c4d0;
  border-radius: 6px;
  background: #ffffff;
  color: #243746;
  font-family: var(--app-font);
  font-size: 14px;
  line-height: 1.35;
  padding: 7px 10px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.upload-form textarea {
  min-height: 82px;
  resize: vertical;
}

.upload-form select {
  width: min(100%, 300px);
  cursor: pointer;
}

.upload-form textarea:focus,
.upload-form select:focus,
.upload-form input[type="file"]:focus {
  border-color: #0575D1;
  outline: none;
  box-shadow: 0 0 0 2px rgba(5, 117, 209, 0.16);
}

.upload-form input[type="file"] {
  padding: 5px;
  background: #f8fbfd;
}

.upload-form input[type="file"]::file-selector-button {
  min-height: 28px;
  margin-right: 10px;
  border: solid 1px #5977B3;
  border-radius: 6px;
  background: #eef7fb;
  color: #0063AF;
  font-family: var(--app-font);
  font-weight: 700;
  padding: 4px 12px;
  cursor: pointer;
}

.upload-form input[type="file"]::file-selector-button:hover {
  background: #dff1f8;
}

.upload-form .file-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(100%, 640px);
  margin: 6px 0;
  padding: 6px 8px;
  border: solid 1px #e2e9ef;
  border-radius: 6px;
  background: #ffffff;
}

.upload-form .file-row input[type="file"] {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

.upload-form .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px 0 6px;
}

.upload-form .actions .button,
.upload-form .actions button,
.upload-abort-button {
  min-height: 34px;
  border-radius: 6px;
  font-family: var(--app-font);
  font-weight: 700;
  padding: 6px 14px;
}

.upload-form .actions button[type="submit"] {
  border-color: #0575D1;
  background: #0575D1;
  color: #ffffff;
}

.upload-form .actions .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: #aebdca;
  background: #f8fbfd;
  color: #36566d;
  text-decoration: none;
}

.meta {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0;
}

.meta div {
  display: inline-block;
  min-width: 150px;
  margin-right: 10px;
}

.meta dt {
  display: inline;
  color: #666666;
}

.meta dd {
  display: inline;
  margin: 0;
  font-weight: bold;
}

.script-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 4px;
  border-bottom: dotted 1px #cccccc;
  padding: 5px;
}

.script-item span {
  display: inline-block;
  width: 30px;
  font-weight: bold;
  color: #666666;
}

.description,
.script-text {
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.feed-calendar {
  border-collapse: collapse;
  margin: 4px 0;
}

.feed-calendar td {
  padding: 2px;
}

.feed-calendar .calendar {
  background: #EFEFEF;
}

.feed-calendar .cal-has-data {
  background: #08D5E1;
}

.feed-calendar .cal-today {
  background: #FFFF00;
}

.feed-calendar .cal-selected {
  background: #CCCCCC;
  font-weight: bold;
}

.calendar-search {
  padding: 2px;
  font: 12px Tahoma, Arial, Helvetica;
}

.calendar-search.is-submitting {
  cursor: progress;
  opacity: 0.72;
  pointer-events: none;
}

.calendar-search label {
  display: block;
  margin: 3px 0;
}

.feed-table td {
  padding: 2px;
  vertical-align: top;
}

.feed-table tbody tr.feed-stripe-even > td,
.feed-table tbody tr.feed-stripe-even .attachment-table,
.feed-table tbody tr.feed-stripe-even .attachment-table td {
  background-color: #FFFFFF !important;
}

.feed-table tbody tr.feed-stripe-odd > td,
.feed-table tbody tr.feed-stripe-odd .attachment-table,
.feed-table tbody tr.feed-stripe-odd .attachment-table td {
  background-color: #F2F2F2 !important;
}

.feed-table .feed-heading,
.feed-table .feed-news-cell,
.feed-table .feed-fid-col,
.feed-table .feed-meta-col {
  vertical-align: middle !important;
}

.feed-table .feed-heading {
  text-align: center !important;
}

.feed-table .feed-news-cell {
  text-align: left !important;
}

.feed-table .feed-meta-col {
  text-align: center !important;
}

.feed-table .feed-fid-col {
  text-align: center !important;
}

.feed-table .feed-fid {
  color: #0063AF;
  font-weight: 600;
}

.copy-to-clipboard {
  display: inline-block;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1.2;
  padding: 1px 3px;
  cursor: pointer;
  text-decoration: none;
}

.feed-title-copy-button {
  max-width: calc(100% - 16px);
  color: #0063AF;
  text-align: left;
}

.fid-copy-button {
  color: #0063AF;
  font-weight: 700;
}

.province-copy-button,
.reporter-copy-button {
  max-width: 100%;
  overflow: hidden;
  color: #0063AF;
  font-weight: 600;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-to-clipboard:hover,
.copy-to-clipboard:focus {
  color: #D10202;
  outline: none;
}

.copy-to-clipboard:focus-visible {
  outline: solid 2px #0575D1;
  outline-offset: 2px;
}

.copy-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1000;
  min-width: 120px;
  max-width: min(320px, calc(100vw - 32px));
  border: solid 1px #0575D1;
  background: #0F91F9;
  color: #FFFFFF;
  font: bold 13px var(--app-font);
  text-align: center;
  overflow-wrap: anywhere;
  padding: 9px 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.copy-toast[hidden] {
  display: none;
}

.feed-fid {
  color: #0063AF;
  font-weight: 600;
}

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

.attachment-table {
  border-collapse: collapse;
  background: #FFFFFF;
}

.attachment-table td {
  padding: 2px;
}

.attachment-name {
  font-weight: bold;
}

.attachment-link {
  text-decoration: none;
}

.attachment-link.unread,
.attachment-link.unread:visited {
  color: #D10202;
}

.attachment-link.read,
.attachment-link.read:visited {
  color: #009900;
}

.attachment-link.missing,
.attachment-link.missing:visited {
  color: #999999;
}

.file-actions {
  white-space: nowrap;
}

.media-play-button,
.media-play-button:visited,
.image-view-button,
.image-view-button:visited,
.document-view-button,
.document-view-button:visited {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 54px;
  justify-content: center;
  border: solid 1px #1d75b9;
  background: #e9f6ff;
  color: #004f87;
  font: bold 12px Tahoma, Arial, Helvetica;
  text-decoration: none;
  padding: 2px 6px;
  margin-left: 3px;
}

.play-symbol {
  font-size: 11px;
  line-height: 1;
}

.image-view-button,
.image-view-button:visited {
  border-color: #2f7f4f;
  background: #ecfff3;
  color: #145b30;
}

.document-view-button,
.document-view-button:visited {
  border-color: #65727c;
  background: #f2f5f7;
  color: #374955;
}

.media-play-button:hover,
.image-view-button:hover,
.document-view-button:hover {
  background: #cdefff;
}

.media-play-button:hover,
.media-play-button:visited:hover {
  color: #004f87;
}

.image-view-button:hover,
.image-view-button:visited:hover {
  color: #145b30;
}

.document-view-button:hover,
.document-view-button:visited:hover {
  color: #263943;
}

.media-play-disabled {
  display: inline-block;
  min-width: 54px;
  border: solid 1px #cccccc;
  color: #999999;
  background: #eeeeee;
  font: 12px Tahoma, Arial, Helvetica;
  padding: 2px 6px;
}

body.media-viewer-open {
  overflow: hidden;
}

.media-viewer-modal {
  position: fixed;
  z-index: 6000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 20px;
  background: rgba(8, 15, 20, 0.76);
}

.media-viewer-modal[hidden],
.media-viewer-body video[hidden],
.media-viewer-body audio[hidden],
.media-viewer-body img[hidden],
.media-viewer-document[hidden],
.media-viewer-download[hidden],
.media-viewer-image-stage[hidden],
.media-viewer-zoom-controls[hidden],
.media-viewer-nav[hidden] {
  display: none;
}

.media-viewer-dialog {
  position: relative;
  width: min(960px, 100%);
  max-height: calc(100vh - 40px);
  overflow: hidden;
  border: 1px solid #8ca3b2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

.media-viewer-dialog.image-viewer-mode {
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr) 50px;
  height: min(700px, calc(100vh - 40px));
}

.media-viewer-dialog.image-viewer-mode .media-viewer-header,
.media-viewer-dialog.image-viewer-mode .media-viewer-actions {
  min-height: 0;
}

.media-viewer-dialog.image-viewer-mode .media-viewer-body.image-mode {
  display: block;
  height: 100%;
  min-height: 0;
  max-height: none;
}

.media-viewer-header {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 8px 0 16px;
  border-bottom: 1px solid #c7d4dc;
  background: #f4f7f9;
}

.media-viewer-header h2 {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #243746;
  font: 600 16px var(--app-font);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-viewer-close {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #3f5361;
  font: 400 30px/1 var(--app-font);
}

.media-viewer-close:hover {
  background: #e2e9ed;
  color: #b42318;
}

.media-viewer-nav {
  position: absolute;
  top: 50%;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  min-width: 46px;
  height: 58px;
  min-height: 58px;
  padding: 0 0 5px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 6px;
  background: rgba(8, 15, 20, 0.72);
  color: #ffffff;
  font: 400 44px/1 Arial, sans-serif;
  transform: translateY(-50%);
  cursor: pointer;
}

.media-viewer-nav:hover,
.media-viewer-nav:focus-visible {
  border-color: #ffffff;
  background: rgba(0, 116, 135, 0.92);
  color: #ffffff;
}

.media-viewer-nav-previous {
  left: 10px;
}

.media-viewer-nav-next {
  right: 10px;
}

.media-viewer-body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  max-height: calc(100vh - 154px);
  overflow: auto;
  background: #080d10;
}

.media-viewer-body.image-mode {
  min-height: min(560px, calc(100vh - 154px));
}

.media-viewer-status {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #ffffff;
  font: 500 17px/1.5 var(--app-font);
  text-align: center;
  pointer-events: none;
}

.media-viewer-status[hidden] {
  display: none;
}

.media-viewer-status.is-error {
  color: #ffaaa5;
}

.media-viewer-body video {
  display: block;
  width: 100%;
  max-height: calc(100vh - 154px);
  aspect-ratio: 16 / 9;
  background: #000000;
}

.media-viewer-body audio {
  width: min(680px, calc(100% - 32px));
  margin: 42px 16px;
}

.media-viewer-image-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 100%;
  height: 100%;
  min-height: 100%;
}

.media-viewer-image-stage.is-wide {
  justify-content: flex-start;
  width: max-content;
}

.media-viewer-image-stage.is-tall {
  align-items: flex-start;
  height: max-content;
}

.media-viewer-image-stage img {
  display: block;
  flex: 0 0 auto;
  max-width: 100%;
  max-height: calc(100vh - 154px);
  object-fit: contain;
}

.media-viewer-image-stage.is-pannable img {
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}

.media-viewer-image-stage.is-dragging img {
  cursor: grabbing;
}

.media-viewer-body.document-mode {
  align-items: flex-start;
  justify-content: flex-start;
  background: #ffffff;
}

.media-viewer-document {
  display: block;
  flex: 0 0 100%;
  box-sizing: border-box;
  width: 100%;
  min-width: 100%;
  min-height: min(560px, calc(100vh - 154px));
  margin: 0;
  padding: 24px 28px;
  border: 0;
  background: #ffffff;
  color: #1f2f38;
  font: 16px/1.65 var(--app-font);
  letter-spacing: 0;
  overflow-wrap: anywhere;
  tab-size: 4;
  white-space: pre-wrap;
}

.media-viewer-document.is-loading {
  color: #526773;
}

.media-viewer-document.is-error {
  color: #a61b14;
}

.media-viewer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 50px;
  box-sizing: border-box;
  padding: 7px 12px;
  border-top: 1px solid #c7d4dc;
  background: #f4f7f9;
}

.media-viewer-zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: auto;
}

.media-viewer-zoom-button,
.media-viewer-zoom-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  box-sizing: border-box;
  padding: 0 9px;
  border: 1px solid #8da5b4;
  border-radius: 5px;
  background: #ffffff;
  color: #284858;
  font-family: var(--app-font);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.media-viewer-zoom-reset {
  min-width: 64px;
  font-size: 13px;
  font-weight: 600;
}

.media-viewer-zoom-button:hover,
.media-viewer-zoom-button:focus-visible,
.media-viewer-zoom-reset:hover,
.media-viewer-zoom-reset:focus-visible {
  border-color: #087da4;
  background: #e8f5f9;
  color: #075f73;
}

.media-viewer-zoom-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.media-viewer-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  border-color: #087f3c;
  background: #087f3c;
  color: #ffffff;
}

.media-viewer-download:hover {
  border-color: #056630;
  background: #056630;
  color: #ffffff;
}

.upload-progress {
  margin: 8px 6px;
}

.upload-progress-bar {
  display: inline-block;
  width: 320px;
  height: 16px;
  border: solid 1px #5977B3;
  border-radius: 8px;
  background: #F0F0F0;
  vertical-align: middle;
  overflow: hidden;
}

.upload-progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: #08A6C7;
}

.upload-progress-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 5px;
  color: #596b78;
  font: 12px Tahoma, Arial, Helvetica;
}

.upload-abort-button {
  min-width: 96px;
  margin-left: 8px;
  padding: 2px 8px;
  border-color: #bd6b6b;
  border-radius: 6px;
  color: #a60000;
  background: #fff8f8;
}

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

body.upload-request-active {
  cursor: progress;
}

body.upload-request-active .upload-form :disabled:not(.upload-abort-button),
body.upload-request-active a[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.58;
}

body.upload-request-active .upload-abort-button {
  cursor: pointer;
  opacity: 1;
}

.upload-size-summary {
  width: min(520px, 100%);
  margin: 8px 0 4px;
  padding: 8px;
  border: 1px solid #b8c8d8;
  border-radius: 8px;
  background: #f8fbfd;
  color: #243746;
}

.upload-size-meter {
  height: 12px;
  border: 1px solid #7d9ab6;
  border-radius: 999px;
  background: #ffffff;
  overflow: hidden;
}

.upload-size-meter span {
  display: block;
  width: 0;
  height: 100%;
  background: #08A6C7;
}

.upload-size-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.upload-size-files {
  margin-top: 6px;
  color: #596b78;
}

.upload-size-file {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #e2e9ef;
  border-radius: 6px;
  padding: 2px 0;
}

.upload-size-file-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.upload-size-file-size {
  white-space: nowrap;
}

.upload-file-cancel {
  min-width: 58px;
  padding: 1px 6px;
  border-color: #bd6b6b;
  border-radius: 6px;
  color: #a60000;
  background: #fff8f8;
}

.upload-file-cancel:disabled,
.upload-abort-button:disabled,
.button.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.upload-size-summary.over-limit {
  border-color: #d10202;
  background: #fff5f5;
}

.upload-size-summary.over-limit .upload-size-meter span {
  background: #d10202;
}

.upload-size-summary.over-limit .upload-size-numbers {
  color: #d10202;
}

body.upload-modal-open {
  overflow: hidden;
}

.upload-warning-modal {
  position: fixed;
  z-index: 5000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 18px;
  background: rgba(15, 25, 32, 0.58);
}

.upload-warning-modal[hidden] {
  display: none;
}

.upload-warning-dialog {
  width: min(460px, 100%);
  overflow: hidden;
  border: 1px solid #b8c8d8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.24);
}

.upload-warning-head {
  padding: 13px 17px;
  background: #b42318;
  color: #ffffff;
  font: 700 18px var(--app-font);
}

.upload-warning-body {
  padding: 18px 17px;
  color: #243746;
  font: 15px var(--app-font);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.upload-warning-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 17px 17px;
}

.upload-warning-actions button {
  min-width: 82px;
  min-height: 36px;
}

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  center {
    width: 100%;
  }

  .top-shell,
  .main-shell,
  .footer-shell {
    width: 100% !important;
  }

  .top-shell > tbody > tr > td {
    display: block;
    width: 100% !important;
    height: auto !important;
    text-align: left !important;
  }

  .top-shell {
    table-layout: fixed;
  }

  .top-user-cell table {
    width: 100% !important;
  }

  .brand-cell,
  .top-user-cell {
    padding: 8px 12px;
  }

  .brand-title {
    font-size: 38px;
  }

  .top-user-cell {
    border-top: solid 1px rgba(255, 255, 255, 0.22);
  }

  .top-user-cell .Topuser {
    text-align: right !important;
    white-space: normal !important;
  }

  .main-shell > tbody > tr,
  .main-shell > tbody > tr > td {
    display: block;
    width: 100% !important;
    height: auto !important;
  }

  .sidebar-cell {
    border-bottom: solid 1px #cccccc;
    padding-bottom: 6px;
  }

  .legacy-menu ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    padding: 6px 10px !important;
  }

  .legacy-menu li {
    line-height: 20px;
  }

  .legacy-menu li a {
    display: inline-block;
  }

  .sidebar-action-row {
    width: 100%;
  }

  .content-cell {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .feed-calendar {
    width: 100% !important;
    max-width: 360px;
  }

  .arrowlistcalendar > div,
  .calendar-search {
    padding: 4px 8px;
  }

  .calendar-search select,
  .calendar-search input,
  .search input {
    width: min(100%, 260px) !important;
  }

  .feed-table,
  .table-wrap table {
    min-width: 760px;
  }

  .attachment-table {
    min-width: 0 !important;
    width: 100% !important;
  }

  .attachment-table,
  .attachment-table tbody,
  .attachment-table tr,
  .attachment-table td {
    display: block;
  }

  .attachment-table tr {
    padding: 4px 0;
    border-bottom: dotted 1px #cccccc;
  }

  .attachment-table td {
    width: 100% !important;
    border-bottom: 0 !important;
    box-sizing: border-box;
  }

  .attachment-name {
    overflow-wrap: anywhere;
  }

  .file-actions {
    text-align: left !important;
    white-space: normal;
    padding-left: 18px !important;
  }

  .attachment-table td[align="right"] {
    text-align: left !important;
    padding-left: 18px !important;
    color: #666666;
  }

  .media-play-button,
  .image-view-button,
  .document-view-button {
    margin: 4px 4px 2px 0;
  }

  .pager {
    white-space: normal;
  }

  .grid-form textarea,
  .grid-form input[type="file"] {
    width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 520px) {
  body {
    min-width: 0;
  }

  .brand-lockup {
    gap: 9px;
  }

  .top-logo-cell img.brand-logo {
    width: 44px;
    height: 44px;
  }

  .brand-title {
    font-size: 34px;
  }

  .brand-cell,
  .top-user-cell {
    padding: 8px 10px;
  }

  .login-layout {
    min-height: calc(100vh - 112px);
    padding: 20px 14px;
  }

  .login-panel {
    padding: 22px 18px 24px;
  }

  .legacy-menu ul {
    gap: 4px 8px;
    padding: 5px 8px !important;
  }

  .legacy-menu li {
    max-width: 100%;
  }

  .content-pad,
  .form-panel,
  .detail,
  .script-body {
    padding: 4px;
  }

  .button,
  button,
  .sidebar-action-button,
  .calendar-search button,
  .media-play-button,
  .image-view-button,
  .document-view-button,
  .media-play-disabled {
    min-height: 30px;
  }

  .grid-form table,
  .grid-form tbody,
  .grid-form tr,
  .grid-form td {
    display: block;
    width: 100% !important;
  }

  .grid-form td[align="right"] {
    text-align: left !important;
    padding-top: 6px;
  }

  .grid-form input:not([type="radio"]),
  .grid-form textarea,
  .grid-form select {
    width: 100% !important;
  }

  .meta div {
    display: block;
    min-width: 0;
    margin: 3px 0;
  }

  .file-actions {
    white-space: normal;
  }

  .upload-progress-bar {
    width: calc(100% - 54px);
  }
}

body,
table,
td,
th,
input,
textarea,
select,
button,
a,
div,
span,
p,
label {
  font-family: var(--app-font) !important;
}

@media (display-mode: standalone) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    background: #ffffff;
  }
}

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    background: #ffffff;
  }

  body > center {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .shell,
  .top-shell,
  .main-shell,
  .footer-shell,
  .main-shell > tbody,
  .main-shell > tbody > .main-row,
  .sidebar-cell,
  .content-cell,
  .content-pad {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .top-shell {
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  }

  .brand-title {
    font-size: 30px;
  }

  .brand-row {
    gap: 0;
  }

  .header-active-users {
    max-width: none;
    flex-basis: auto;
    font-size: 11px;
  }

  .header-active-users-count {
    font-size: 12px;
  }

  .header-active-users-names {
    font-size: 11px;
  }

  .top-logo-cell img.brand-logo {
    width: 40px;
    height: 40px;
  }

  .top-user-cell {
    position: absolute;
    top: 10px;
    right: 10px;
    left: 154px;
    display: block !important;
    width: auto !important;
    padding: 0;
    border-top: 0;
  }

  .top-user-stack > table {
    display: none;
  }

  .top-header-right {
    min-width: 0;
    max-width: 100%;
    height: 40px;
    gap: 8px;
  }

  .header-active-users-count {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .theme-toggle-wrap {
    margin: 0;
  }

  .sidebar-cell {
    background: #f7fbfd !important;
  }

  .arrowlistmenu,
  .arrowlistcalendar {
    width: 100%;
  }

  .arrowlistmenu h3,
  .arrowlistcalendar h3 {
    min-height: 32px;
    line-height: 32px !important;
    padding-left: 10px !important;
  }

  .legacy-menu ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px !important;
  }

  .legacy-menu li {
    list-style: none;
    margin: 0;
  }

  .legacy-menu li a,
  .sidebar-action-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    width: 100% !important;
    max-width: none !important;
    border: 1px solid #c5d7e2;
    border-radius: 6px;
    background: #ffffff;
    color: #035c88 !important;
    text-align: center;
    text-decoration: none;
    padding: 6px 8px;
  }

  .sidebar-action-row {
    margin: 0;
  }

  .sidebar-action-row form {
    width: 100%;
  }

  .calendar-search label,
  .calendar-search select,
  .calendar-search input,
  .calendar-search button,
  input,
  textarea,
  select,
  button {
    font-size: 16px !important;
  }

  .calendar-search button,
  .button,
  button,
  .media-play-button,
  .image-view-button,
  .document-view-button {
    min-height: 38px;
    border-radius: 6px;
  }

  .feed-calendar {
    max-width: none;
  }

  .feed-calendar td {
    height: 34px;
  }

  .feed-calendar a {
    display: block;
    line-height: 30px;
  }

  .content-cell {
    overflow-x: hidden;
  }

  .content-pad {
    width: 100%;
    padding: 8px;
    overflow-x: hidden;
  }

  .content-pad > table:first-child td {
    display: block;
    width: 100%;
    text-align: left !important;
    padding: 2px 0;
  }

  .feed-table {
    min-width: 0;
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0 8px;
  }

  .feed-table thead {
    display: none;
  }

  .feed-table,
  .feed-table tbody,
  .feed-table tr,
  .feed-table td {
    display: block;
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .feed-table td[nowrap],
  .feed-table .feed-meta-col {
    white-space: normal !important;
  }

  .feed-table tbody tr {
    border-right: 1px solid #d8e3eb;
    border-left: 1px solid #d8e3eb;
  }

  .feed-table tbody tr:first-child,
  .feed-table tbody tr.feed-stripe-even,
  .feed-table tbody tr.feed-stripe-odd {
    border-top: 1px solid #d8e3eb;
    border-radius: 8px 8px 0 0;
  }

  .feed-table td {
    padding: 6px 8px;
  }

  .feed-news-cell {
    font-size: 16px;
  }

  .feed-title-copy-button,
  .fid-copy-button,
  .feed-news-cell,
  .feed-fid-col,
  .feed-meta-col,
  .detail,
  .attachment-name,
  .attachment-link {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .feed-table .feed-summary-row > td:nth-child(2)::before {
    content: "FID: ";
    color: #596b78;
    font-weight: 500;
  }

  .feed-table .feed-summary-row > td:nth-child(3)::before {
    content: "เวลา: ";
    color: #596b78;
    font-weight: 500;
  }

  .feed-table .feed-summary-row > td:nth-child(4)::before {
    content: "ผู้สื่อข่าว: ";
    color: #596b78;
    font-weight: 500;
  }

  .feed-table .feed-summary-row > td:nth-child(5)::before {
    content: "ภาค: ";
    color: #596b78;
    font-weight: 500;
  }

  .feed-table .feed-summary-row > td:nth-child(6)::before {
    content: "จังหวัด: ";
    color: #596b78;
    font-weight: 500;
  }

  .detail {
    line-height: 1.55;
  }

  .attachment-table tr {
    border: 1px solid #e1ebf1;
    border-radius: 8px;
    margin: 6px 0;
    padding: 7px;
    background: #ffffff !important;
  }

  .attachment-table td {
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 3px 0 !important;
  }

  .attachment-name {
    font-size: 15px;
  }

  .file-actions {
    padding-left: 0 !important;
  }

  .attachment-table td[align="right"] {
    padding-left: 0 !important;
  }

  .media-play-button,
  .image-view-button,
  .document-view-button {
    width: auto;
    max-width: 140px;
    min-height: 30px;
    font-size: 13px !important;
    line-height: 1.1;
    padding: 5px 10px;
    margin: 6px 0 0;
  }

  .pager-link,
  .pager-current,
  .pager-gap {
    min-width: 32px;
    min-height: 32px;
    line-height: 30px;
    border-radius: 6px;
  }

  .pager-link {
    border: 1px solid #c5d7e2;
    text-decoration: none;
  }

  .pager-current {
    border: 1px solid #d10202;
    background: #fff4f4;
  }

  .upload-panel {
    padding: 10px;
  }

  .upload-form {
    max-width: none;
  }

  .upload-form .file-row {
    display: block;
    width: 100%;
  }

  .upload-form .file-row input[type="file"] {
    width: 100%;
    margin-top: 5px;
  }

  .upload-size-file {
    grid-template-columns: minmax(0, 1fr);
  }

  .upload-file-cancel {
    width: 100%;
    min-height: 34px;
  }

  .upload-progress {
    margin: 10px 0;
  }

  .upload-progress-bar {
    display: block;
    width: 100%;
    height: 18px;
    margin-bottom: 6px;
  }

  .upload-abort-button {
    display: block;
    width: 100%;
    margin: 8px 0 0;
  }

  .media-viewer-modal {
    width: 100vw;
    width: 100dvw;
    max-width: 100vw;
    max-width: 100dvw;
    padding: 8px;
    overflow: hidden;
  }

  .media-viewer-dialog {
    width: 100%;
    min-width: 0;
    max-width: calc(100vw - 16px);
    max-width: calc(100dvw - 16px);
  }

  .media-viewer-header {
    position: relative;
    width: 100%;
    min-width: 0;
    padding: 0 50px 0 12px;
  }

  .media-viewer-header h2 {
    display: block;
    width: 100%;
    max-width: 100%;
  }

  .media-viewer-close {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 2;
    margin: 0;
  }

  .media-viewer-nav {
    width: 44px;
    min-width: 44px;
    height: 52px;
    min-height: 52px;
    font-size: 38px;
  }

  .media-viewer-nav-previous {
    left: 4px;
  }

  .media-viewer-nav-next {
    right: 4px;
  }

  .media-viewer-body,
  .media-viewer-actions,
  .media-viewer-document {
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 380px) {
  .legacy-menu ul {
    grid-template-columns: 1fr;
  }

  .brand-title {
    font-size: 27px;
  }
}

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .footer-shell {
  background: #0d141a !important;
  color: #d7e1e8;
}

html[data-theme="dark"] body,
html[data-theme="dark"] table,
html[data-theme="dark"] td,
html[data-theme="dark"] th,
html[data-theme="dark"] .Text,
html[data-theme="dark"] .ParamTbl,
html[data-theme="dark"] .ParamTitle {
  color: #d7e1e8;
}

html[data-theme="dark"] .top-shell {
  background: #075f73;
}

html[data-theme="dark"] .Topuser,
html[data-theme="dark"] .brand-title,
html[data-theme="dark"] .brand-lockup,
html[data-theme="dark"] .brand-lockup:visited {
  color: #ffffff;
}

html[data-theme="dark"] .main-shell,
html[data-theme="dark"] .sidebar-cell,
html[data-theme="dark"] .content-cell,
html[data-theme="dark"] .pagestyletd,
html[data-theme="dark"] .MainBack,
html[data-theme="dark"] .ParamBack,
html[data-theme="dark"] .form-panel,
html[data-theme="dark"] .detail,
html[data-theme="dark"] .script-body {
  border-color: #36505f;
  background: #121c24 !important;
  color: #d7e1e8;
}

html[data-theme="dark"] a,
html[data-theme="dark"] a:link,
html[data-theme="dark"] a:visited,
html[data-theme="dark"] .pager-link,
html[data-theme="dark"] .feed-fid,
html[data-theme="dark"] .fid-copy-button,
html[data-theme="dark"] .feed-table .feed-fid {
  color: #76cbea;
}

html[data-theme="dark"] a:hover,
html[data-theme="dark"] a:focus {
  color: #b7e8f7;
}

html[data-theme="dark"] .arrowlistmenu .menuheader,
html[data-theme="dark"] .arrowlistmenu .openheader,
html[data-theme="dark"] .opencalendar,
html[data-theme="dark"] .barpagestyle {
  border-color: #3b7284;
  background: #24414e !important;
  background-image: none !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .legacy-menu ul,
html[data-theme="dark"] .arrowlistcalendar > div,
html[data-theme="dark"] .calendar-search {
  background: #121c24;
}

html[data-theme="dark"] .arrowlistmenu ul li a,
html[data-theme="dark"] .arrowlistmenu ul li a:visited {
  border-color: #2c414d;
  color: #76cbea;
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .txtboxpagestyle,
html[data-theme="dark"] .grid-form input,
html[data-theme="dark"] .grid-form textarea,
html[data-theme="dark"] .grid-form select,
html[data-theme="dark"] .upload-form textarea,
html[data-theme="dark"] .upload-form select,
html[data-theme="dark"] .upload-form input[type="text"],
html[data-theme="dark"] .upload-form input[type="password"],
html[data-theme="dark"] .upload-form input[type="email"],
html[data-theme="dark"] .upload-form input[type="file"] {
  border-color: #496271;
  background: #192731 !important;
  color: #edf4f7 !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #91a3ae;
}

html[data-theme="dark"] button,
html[data-theme="dark"] .button,
html[data-theme="dark"] .button:visited,
html[data-theme="dark"] .buttonpagestyle,
html[data-theme="dark"] .calendar-search button {
  border-color: #567687;
  background: #203440;
  color: #a9e0f1;
}

html[data-theme="dark"] .copy-to-clipboard {
  border: 0;
  background: transparent !important;
  box-shadow: none;
}

html[data-theme="dark"] .feed-title-copy-button,
html[data-theme="dark"] .fid-copy-button,
html[data-theme="dark"] .province-copy-button,
html[data-theme="dark"] .reporter-copy-button {
  color: #63c8ed;
}

html[data-theme="dark"] .copy-to-clipboard:hover,
html[data-theme="dark"] .copy-to-clipboard:focus {
  background: transparent !important;
  color: #ff8580;
}

html[data-theme="dark"] .sidebar-action-row .sidebar-action-button {
  border-color: #c74e45;
  background: #a92c24;
  color: #ffffff !important;
}

html[data-theme="dark"] .table-wrap th,
html[data-theme="dark"] .barinnerstyle,
html[data-theme="dark"] .headtable td,
html[data-theme="dark"] .ParamTblTitle {
  border-color: #4a606c;
  background: #263944 !important;
  color: #f0f5f7 !important;
}

html[data-theme="dark"] .table-wrap td,
html[data-theme="dark"] .rowtd-1,
html[data-theme="dark"] .rowtd-2,
html[data-theme="dark"] .rowtd-t2,
html[data-theme="dark"] .script-item {
  border-color: #344954;
}

html[data-theme="dark"] .row2td-1,
html[data-theme="dark"] .row2td-2,
html[data-theme="dark"] .ParamTblCell {
  background: #17242d !important;
  color: #d7e1e8;
}

html[data-theme="dark"] .feed-table tbody tr.feed-stripe-even > td,
html[data-theme="dark"] .feed-table tbody tr.feed-stripe-even .attachment-table,
html[data-theme="dark"] .feed-table tbody tr.feed-stripe-even .attachment-table td {
  background-color: #16222b !important;
}

html[data-theme="dark"] .feed-table tbody tr.feed-stripe-odd > td,
html[data-theme="dark"] .feed-table tbody tr.feed-stripe-odd .attachment-table,
html[data-theme="dark"] .feed-table tbody tr.feed-stripe-odd .attachment-table td {
  background-color: #1c2a34 !important;
}

html[data-theme="dark"] .attachment-table,
html[data-theme="dark"] .attachment-table tr {
  border-color: #36505f;
  background: #182630 !important;
}

html[data-theme="dark"] .attachment-link.unread,
html[data-theme="dark"] .attachment-link.unread:visited,
html[data-theme="dark"] .alert,
html[data-theme="dark"] .alert-small {
  color: #ff8580;
}

html[data-theme="dark"] .answer {
  color: #70d890;
}

html[data-theme="dark"] .attachment-link.read,
html[data-theme="dark"] .attachment-link.read:visited {
  color: #70d890;
}

html[data-theme="dark"] .detail,
html[data-theme="dark"] .meta dt,
html[data-theme="dark"] .script-item span,
html[data-theme="dark"] .upload-progress-meta,
html[data-theme="dark"] .upload-size-files,
html[data-theme="dark"] .empty,
html[data-theme="dark"] .copyrightTd {
  color: #9fb0ba;
}

html[data-theme="dark"] .feed-calendar .calendar {
  background: #1b2a34;
  color: #d7e1e8;
}

html[data-theme="dark"] .feed-calendar .calendar a {
  color: #c6d8e1;
}

html[data-theme="dark"] .feed-calendar .cal-has-data {
  background: #086f7c;
}

html[data-theme="dark"] .feed-calendar .cal-today {
  background: #aa8b16;
}

html[data-theme="dark"] .feed-calendar .cal-selected {
  background: #405866;
}

html[data-theme="dark"] .media-play-button,
html[data-theme="dark"] .media-play-button:visited {
  border-color: #4387ad;
  background: #17394b;
  color: #9fdcff;
}

html[data-theme="dark"] .image-view-button,
html[data-theme="dark"] .image-view-button:visited {
  border-color: #478263;
  background: #173a28;
  color: #a9e7bd;
}

html[data-theme="dark"] .document-view-button,
html[data-theme="dark"] .document-view-button:visited {
  border-color: #607482;
  background: #263640;
  color: #d5e1e7;
}

html[data-theme="dark"] .media-viewer-body.document-mode,
html[data-theme="dark"] .media-viewer-document {
  background: #111b22;
  color: #e1eaee;
}

html[data-theme="dark"] .media-viewer-document.is-loading {
  color: #a7bac4;
}

html[data-theme="dark"] .media-viewer-document.is-error {
  color: #ffaaa5;
}

html[data-theme="dark"] .media-viewer-dialog {
  border-color: #496271;
  background: #182630;
}

html[data-theme="dark"] .media-viewer-header,
html[data-theme="dark"] .media-viewer-actions {
  border-color: #405865;
  background: #182630;
}

html[data-theme="dark"] .media-viewer-header h2 {
  color: #edf4f7;
}

html[data-theme="dark"] .media-viewer-zoom-button,
html[data-theme="dark"] .media-viewer-zoom-reset {
  border-color: #526c7b;
  background: #22323c;
  color: #e1ebf0;
}

html[data-theme="dark"] .media-viewer-zoom-button:hover,
html[data-theme="dark"] .media-viewer-zoom-button:focus-visible,
html[data-theme="dark"] .media-viewer-zoom-reset:hover,
html[data-theme="dark"] .media-viewer-zoom-reset:focus-visible {
  border-color: #3aa6ca;
  background: #294552;
  color: #ffffff;
}

html[data-theme="dark"] .media-viewer-close {
  color: #d7e1e8;
}

html[data-theme="dark"] .media-viewer-close:hover {
  background: #2a3e49;
  color: #ffaaa5;
}

html[data-theme="dark"] .admin-active-users {
  border-color: #355f4a;
  background: #172b22;
  color: #d8eee1;
}

html[data-theme="dark"] .admin-active-users-names {
  color: #b8d8c5;
}

html[data-theme="dark"] .admin-active-indicator {
  background: #43c77c;
  box-shadow: 0 0 0 2px rgba(67, 199, 124, 0.2);
}

html[data-theme="dark"] .upload-form label,
html[data-theme="dark"] .upload-size-summary {
  color: #d7e1e8;
}

html[data-theme="dark"] .upload-form .file-row,
html[data-theme="dark"] .upload-size-summary,
html[data-theme="dark"] .upload-size-meter,
html[data-theme="dark"] .notice-dialog {
  border-color: #405865;
  background: #17242d !important;
  color: #d7e1e8;
}

html[data-theme="dark"] .upload-warning-dialog {
  border-color: #496271;
  background: #182630;
}

html[data-theme="dark"] .upload-warning-body {
  color: #edf4f7;
}

html[data-theme="dark"] .pager-current {
  border-color: #d96862;
  background: #492522;
  color: #ffaaa5;
}

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  html[data-theme="dark"] .sidebar-cell {
    background: #101a22 !important;
  }

  html[data-theme="dark"] .legacy-menu li a {
    border-color: #38515f;
    background: #192731;
    color: #9bd9ed !important;
  }
}

html[data-theme="dark"] .login-panel {
  border-color: #405865;
  background: #17242d;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] .login-panel h1 {
  color: #b8e7f4;
}

html[data-theme="dark"] .login-form label {
  color: #c8d7df;
}

html[data-theme="dark"] .login-submit {
  border-color: #1687b0;
  background: #087da4;
  color: #ffffff;
}

html[data-theme="dark"] .login-submit:hover,
html[data-theme="dark"] .login-submit:focus-visible {
  border-color: #23a2cf;
  background: #096d8d;
}

@media (max-width: 600px) {
  .media-viewer-modal {
    padding: 10px;
  }

  .media-viewer-dialog {
    max-height: calc(100vh - 20px);
  }

  .media-viewer-dialog.image-viewer-mode {
    height: calc(100vh - 20px);
  }

  .media-viewer-body,
  .media-viewer-body video,
  .media-viewer-body img {
    max-height: calc(100vh - 134px);
  }

  .media-viewer-body.image-mode {
    min-height: calc(100vh - 134px);
  }

  .media-viewer-dialog.image-viewer-mode .media-viewer-body.image-mode {
    min-height: 0;
    max-height: none;
  }

  .media-viewer-header h2 {
    font-size: 14px;
  }

  .media-viewer-document {
    min-height: calc(100vh - 134px);
    padding: 18px 16px;
    font-size: 15px;
  }
}

/* Compact news cards for phone and touch layouts. */
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  .feed-table {
    border-spacing: 0;
  }

  .feed-table .feed-summary-row {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.8fr) minmax(0, 0.9fr);
    gap: 5px 8px;
    margin-top: 9px;
    padding: 8px 9px 7px;
    border: 1px solid #d8e3eb;
    border-radius: 8px 8px 0 0;
  }

  .feed-table .feed-summary-row > td {
    display: flex;
    align-items: center;
    width: auto !important;
    padding: 0;
    border: 0;
  }

  .feed-table .feed-summary-row > .feed-news-cell {
    grid-column: 1 / -1;
    gap: 5px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(119, 143, 157, 0.28);
    font-size: 16px;
  }

  .feed-table .feed-summary-row > .feed-fid-col {
    grid-column: 1 / 3;
  }

  .feed-table .feed-summary-row > td:nth-child(3) {
    grid-column: 3;
    justify-content: flex-end;
  }

  .feed-table .feed-summary-row > td:nth-child(4) {
    grid-column: 1;
  }

  .feed-table .feed-summary-row > td:nth-child(5) {
    grid-column: 2;
  }

  .feed-table .feed-summary-row > td:nth-child(6) {
    grid-column: 3;
  }

  .feed-title-copy-button {
    display: -webkit-box;
    min-width: 0;
    overflow: hidden;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .feed-table .feed-summary-row > td[data-label] {
    min-width: 0;
    gap: 4px;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.25;
  }

  .feed-table .feed-summary-row > td[data-label]::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: #596b78;
    font-size: 10px;
    font-weight: 600;
  }

  .feed-table .feed-summary-row .feed-meta-value,
  .feed-table .feed-summary-row .fid-copy-button {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .feed-table .feed-detail-row,
  .feed-table .feed-attachments-row {
    border-top: 0;
    border-right: 1px solid #d8e3eb;
    border-left: 1px solid #d8e3eb;
    border-radius: 0;
  }

  .feed-table .feed-detail-row > td {
    padding: 6px 9px 5px !important;
    border-top: 1px dashed rgba(119, 143, 157, 0.3);
  }

  .feed-table .feed-detail-row .detail {
    font-size: 13px;
    line-height: 1.4;
  }

  .feed-table .feed-attachments-row {
    margin-bottom: 9px;
    border-bottom: 1px solid #d8e3eb;
    border-radius: 0 0 8px 8px;
  }

  .feed-table .feed-attachments-row > td {
    padding: 4px 8px 7px !important;
  }

  .feed-table .attachment-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content max-content;
    align-items: center;
    gap: 6px;
    margin: 4px 0;
    padding: 5px 6px;
    border: 1px solid #e1ebf1;
    border-radius: 6px;
    background: #ffffff !important;
  }

  .feed-table .attachment-table td {
    display: block;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  .feed-table .attachment-table .attachment-name {
    grid-column: 1;
    grid-row: 1;
    display: flex !important;
    align-items: center;
    gap: 5px;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.25;
  }

  .feed-table .attachment-status-icon {
    flex: 0 0 auto;
  }

  .feed-table .attachment-name .attachment-link {
    display: -webkit-box;
    min-width: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .feed-table .attachment-table .file-actions {
    grid-column: 3;
    grid-row: 1;
    width: auto !important;
    padding: 0 !important;
    white-space: nowrap;
  }

  .feed-table .attachment-table .attachment-size {
    grid-column: 2;
    grid-row: 1;
    width: auto !important;
    padding: 0 !important;
    color: #596b78;
    font-size: 11px;
    text-align: right !important;
    white-space: nowrap !important;
  }

  .feed-table .attachment-table .empty {
    grid-column: 1 / -1;
  }

  .feed-table .attachment-table .media-play-button,
  .feed-table .attachment-table .image-view-button,
  .feed-table .attachment-table .document-view-button {
    width: auto;
    max-width: 96px;
    min-height: 30px;
    margin: 0;
    padding: 4px 7px;
    font-size: 12px !important;
    line-height: 1.1;
  }

  html[data-theme="dark"] .feed-summary-row > td[data-label]::before,
  html[data-theme="dark"] .attachment-table .attachment-size {
    color: #a9bbc6;
  }

  html[data-theme="dark"] .feed-table .attachment-table tr {
    border-color: #36505f;
    background: #182630 !important;
  }
}

/* Keep touch layouts consistent in Safari and remove desktop zebra fills. */
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  .sidebar-sticky {
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
  }

  .top-shell,
  .top-shell > tbody {
    display: block !important;
  }

  .top-shell > tbody > tr {
    display: grid !important;
    grid-template-columns: minmax(140px, auto) minmax(60px, 1fr);
    align-items: center;
    width: 100%;
    min-height: 60px;
  }

  .top-shell > tbody > tr > .top-logo-cell,
  .top-shell > tbody > tr > .top-user-cell {
    display: block !important;
    width: auto !important;
    min-width: 0;
    height: auto !important;
  }

  .top-shell > tbody > tr > .top-logo-cell {
    grid-column: 1;
  }

  .top-shell > tbody > tr > .top-user-cell {
    position: static;
    grid-column: 2;
    inset: auto;
    z-index: 2;
    padding: 0 10px 0 4px;
    overflow: visible;
  }

  .top-header-right {
    position: relative;
    width: 100%;
    min-width: 0;
    height: 40px;
    padding-right: 60px;
    overflow: visible;
  }

  .top-header-right .top-user-stack {
    position: absolute;
    top: 6px;
    right: 0;
    z-index: 3;
    display: flex !important;
    width: 52px;
    min-width: 52px;
    height: 28px;
    overflow: visible;
  }

  .theme-toggle-wrap,
  .theme-switch {
    display: flex !important;
    width: 52px;
    min-width: 52px;
    height: 28px;
    margin: 0;
    opacity: 1;
    visibility: visible;
  }

  .header-active-users {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .arrowlistcalendar,
  .arrowlistcalendar > div {
    display: block !important;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    visibility: visible;
  }

  .feed-calendar {
    display: table !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: fixed;
  }

  .feed-calendar > tbody {
    display: table-row-group !important;
  }

  .feed-calendar tr {
    display: table-row !important;
  }

  .feed-calendar td {
    display: table-cell !important;
    width: auto !important;
    min-width: 0 !important;
  }

  .feed-table tbody tr.feed-stripe-even > td,
  .feed-table tbody tr.feed-stripe-odd > td,
  .feed-table tbody tr.feed-stripe-even .attachment-table,
  .feed-table tbody tr.feed-stripe-odd .attachment-table,
  .feed-table tbody tr.feed-stripe-even .attachment-table td,
  .feed-table tbody tr.feed-stripe-odd .attachment-table td,
  .feed-table .feed-summary-row,
  .feed-table .feed-detail-row,
  .feed-table .feed-attachments-row {
    background-color: #ffffff !important;
  }

  html[data-theme="dark"] .feed-table tbody tr.feed-stripe-even > td,
  html[data-theme="dark"] .feed-table tbody tr.feed-stripe-odd > td,
  html[data-theme="dark"] .feed-table tbody tr.feed-stripe-even .attachment-table,
  html[data-theme="dark"] .feed-table tbody tr.feed-stripe-odd .attachment-table,
  html[data-theme="dark"] .feed-table tbody tr.feed-stripe-even .attachment-table td,
  html[data-theme="dark"] .feed-table tbody tr.feed-stripe-odd .attachment-table td,
  html[data-theme="dark"] .feed-table .feed-summary-row,
  html[data-theme="dark"] .feed-table .feed-detail-row,
  html[data-theme="dark"] .feed-table .feed-attachments-row {
    background-color: #16222b !important;
  }
}

.calendar-month-title {
  color: #24485d;
  font-size: 13px;
  white-space: nowrap;
}

.feed-calendar td.barpagestyle {
  text-align: center !important;
  vertical-align: middle;
}

.feed-calendar td.barpagestyle > b {
  display: block;
  width: 100%;
  text-align: center;
}

.feed-calendar td.calendar > a,
.feed-calendar td.calendar > a:visited {
  display: block;
  color: inherit;
  font-family: var(--app-font);
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
  text-align: center;
}

.feed-calendar td.cal-selected > a,
.feed-calendar td.cal-selected > a:visited {
  font-weight: 700;
}

.feed-calendar .calendar-nav-cell {
  width: 30px !important;
  padding: 2px !important;
}

.feed-calendar .calendar-month-nav,
.feed-calendar .calendar-month-nav:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid #a9c2d1;
  border-radius: 6px;
  background: #ffffff;
  color: #035f89;
  font: 700 18px/1 var(--app-font);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(22, 64, 86, 0.1);
}

.feed-calendar .calendar-month-nav:hover,
.feed-calendar .calendar-month-nav:focus-visible {
  border-color: #028cae;
  background: #eaf8fc;
  color: #004f73;
  outline: none;
  box-shadow: 0 0 0 2px rgba(2, 140, 174, 0.18);
}

.feed-calendar .calendar-month-nav img {
  display: block;
  width: 16px;
  height: 16px;
  max-width: none;
}

.calendar-search {
  padding: 8px;
  color: #324f60;
  font: 13px var(--app-font);
}

.calendar-search label {
  display: block;
  margin: 0 0 8px;
  color: #324f60;
  font-weight: 600;
}

.calendar-search select,
.calendar-search input[type="text"] {
  display: block;
  width: 100% !important;
  min-width: 0;
  min-height: 36px;
  margin-top: 4px;
  border: 1px solid #b8cbd7;
  border-radius: 7px;
  background: #ffffff;
  color: #183b50;
  font: 13px/1.3 var(--app-font);
  padding: 7px 9px;
  box-shadow: inset 0 1px 2px rgba(18, 57, 78, 0.05);
}

.calendar-search select {
  cursor: pointer;
}

.calendar-search select:focus,
.calendar-search input[type="text"]:focus {
  border-color: #028cae;
  outline: none;
  box-shadow: 0 0 0 3px rgba(2, 140, 174, 0.16);
}

.calendar-search select:disabled {
  background: #edf2f5;
  color: #526b79;
  cursor: default;
  opacity: 1;
}

.calendar-search button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
  margin: 2px 0 0;
  border: 1px solid #047899;
  border-radius: 7px;
  background: #028cae;
  color: #ffffff;
  font: 600 13px/1.2 var(--app-font);
  box-shadow: 0 2px 5px rgba(0, 78, 103, 0.15);
}

.calendar-search button:hover,
.calendar-search button:focus-visible {
  border-color: #005f7c;
  background: #007b9d;
  color: #ffffff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(2, 140, 174, 0.18);
}

html[data-theme="dark"] .calendar-month-title,
html[data-theme="dark"] .calendar-search label {
  color: #d6e5ec;
}

html[data-theme="dark"] .feed-calendar .calendar-month-nav,
html[data-theme="dark"] .feed-calendar .calendar-month-nav:visited {
  border-color: #456473;
  background: #1b2d37;
  color: #9bd9ed;
}

html[data-theme="dark"] .feed-calendar .calendar-month-nav:hover,
html[data-theme="dark"] .feed-calendar .calendar-month-nav:focus-visible {
  border-color: #3aa6ca;
  background: #294552;
  color: #ffffff;
}

html[data-theme="dark"] .calendar-search {
  color: #cbdbe3;
}

html[data-theme="dark"] .calendar-search select,
html[data-theme="dark"] .calendar-search input[type="text"] {
  border-color: #405d6c;
  background: #172832;
  color: #edf5f8;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .calendar-search select:disabled {
  background: #223640;
  color: #a8bac4;
}

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  .feed-calendar td.calendar > a,
  .feed-calendar td.calendar > a:visited {
    font-size: 18px;
    line-height: 30px;
  }

  .feed-calendar .calendar-nav-cell {
    width: 38px !important;
  }

  .feed-calendar .calendar-month-nav,
  .feed-calendar .calendar-month-nav:visited {
    width: 34px;
    height: 34px;
    font-size: 20px !important;
    line-height: 1;
  }

  .calendar-search {
    padding: 9px 10px 10px;
  }

  .calendar-search select,
  .calendar-search input[type="text"],
  .calendar-search button {
    min-height: 42px;
  }
}

/* Strong outer news cards with quiet separators inside each card. */
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  .feed-table .feed-summary-row {
    margin-top: 12px;
    border-width: 2px 2px 0;
    border-style: solid;
    border-color: #789bad;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -2px 7px rgba(33, 71, 91, 0.08);
  }

  .feed-table .feed-summary-row > .feed-news-cell {
    border-bottom-color: rgba(66, 97, 113, 0.13);
  }

  .feed-table .feed-detail-row,
  .feed-table .feed-attachments-row {
    border-right: 2px solid #789bad;
    border-left: 2px solid #789bad;
  }

  .feed-table .feed-detail-row > td {
    border-top: 1px solid rgba(66, 97, 113, 0.1);
  }

  .feed-table .feed-attachments-row {
    margin-bottom: 0;
    border-bottom: 2px solid #789bad;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 5px 9px rgba(33, 71, 91, 0.11);
  }

  .feed-table .feed-attachments-row > td {
    border-top: 1px solid rgba(66, 97, 113, 0.1);
  }

  .feed-table .attachment-table tr {
    margin: 0;
    padding: 7px 2px;
    border: 0;
    border-radius: 0;
    background: transparent !important;
  }

  .feed-table .attachment-table tr + tr {
    border-top: 1px solid rgba(66, 97, 113, 0.12);
  }

  html[data-theme="dark"] .feed-table .feed-summary-row {
    border-color: #527d90;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.22);
  }

  html[data-theme="dark"] .feed-table .feed-summary-row > .feed-news-cell {
    border-bottom-color: rgba(194, 221, 232, 0.11);
  }

  html[data-theme="dark"] .feed-table .feed-detail-row,
  html[data-theme="dark"] .feed-table .feed-attachments-row {
    border-right-color: #527d90;
    border-left-color: #527d90;
  }

  html[data-theme="dark"] .feed-table .feed-detail-row > td,
  html[data-theme="dark"] .feed-table .feed-attachments-row > td {
    border-top-color: rgba(194, 221, 232, 0.08);
  }

  html[data-theme="dark"] .feed-table .feed-attachments-row {
    border-bottom-color: #527d90;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.28);
  }

  html[data-theme="dark"] .feed-table .attachment-table tr {
    background: transparent !important;
  }

  html[data-theme="dark"] .feed-table .attachment-table tr + tr {
    border-top-color: rgba(194, 221, 232, 0.1);
  }
}

.upload-form .file-row {
  position: relative;
}

.file-row-index {
  flex: 0 0 24px;
  color: #405866;
  font-weight: 600;
  text-align: right;
}

.upload-form .upload-file-input {
  position: absolute !important;
  width: 1px !important;
  min-width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  border: 0 !important;
  opacity: 0;
  pointer-events: none;
}

.upload-form .upload-file-picker {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #b7c4d0;
  border-radius: 7px;
  background: #f8fbfd;
  color: #405866;
  font-weight: 400;
  cursor: pointer;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.upload-file-picker-button {
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  padding: 6px 12px;
  border-right: 1px solid #9db7c7;
  background: #e8f5fa;
  color: #035f89;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.upload-file-picker-name {
  min-width: 0;
  padding: 6px 10px;
  overflow: hidden;
  color: #667b87;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-file-picker-name.has-file {
  color: #183b50;
  font-weight: 600;
}

.upload-file-picker:hover {
  border-color: #6e9bb2;
}

.upload-file-input:focus-visible + .upload-file-picker {
  border-color: #028cae;
  outline: none;
  box-shadow: 0 0 0 3px rgba(2, 140, 174, 0.16);
}

body.upload-request-active .upload-file-picker {
  cursor: not-allowed;
  opacity: 0.58;
  pointer-events: none;
}

html[data-theme="dark"] .file-row-index {
  color: #b7c8d1;
}

html[data-theme="dark"] .upload-form .upload-file-picker {
  border-color: #496271;
  background: #192731;
  color: #dce8ed;
}

html[data-theme="dark"] .upload-file-picker-button {
  border-right-color: #4b6c7d;
  background: #24404d;
  color: #9bd9ed;
}

html[data-theme="dark"] .upload-file-picker-name {
  color: #a9bbc5;
}

html[data-theme="dark"] .upload-file-picker-name.has-file {
  color: #edf5f8;
}

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  .upload-form .file-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
  }

  .upload-form .upload-file-picker {
    min-height: 42px;
  }

  .upload-file-picker-button,
  .upload-file-picker-name {
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: 14px !important;
  }
}

.profile-panel {
  width: min(760px, calc(100% - 24px));
  margin: 12px auto;
  padding: 18px 20px;
  border: 1px solid #c7d7e0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(31, 69, 89, 0.08);
}

.profile-form {
  max-width: 680px;
  margin: 0 auto;
}

.profile-table {
  border-collapse: separate;
  border-spacing: 0 8px;
}

.profile-table td {
  padding: 2px 5px;
  vertical-align: middle;
}

.profile-table td:first-child {
  width: 190px;
  padding-right: 14px;
  color: #3e5665;
  font-size: 13px;
  font-weight: 600;
}

.profile-form input[type="text"],
.profile-form input[type="tel"],
.profile-form input[type="email"],
.profile-form input[type="password"],
.profile-form select {
  width: min(100%, 430px);
  min-height: 38px;
  height: auto;
  border: 1px solid #b7c9d4;
  border-radius: 7px;
  background: #ffffff;
  color: #193c50;
  font: 14px/1.35 var(--app-font);
  padding: 8px 10px;
  box-shadow: inset 0 1px 2px rgba(26, 65, 86, 0.05);
}

.profile-form select {
  cursor: pointer;
}

.profile-form input:focus,
.profile-form select:focus {
  border-color: #028cae;
  outline: none;
  box-shadow: 0 0 0 3px rgba(2, 140, 174, 0.16);
}

.profile-form input[readonly],
.profile-form select:disabled {
  border-color: #d0dce3;
  background: #eef3f6;
  color: #526b79;
  cursor: default;
  opacity: 1;
  box-shadow: none;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 6px !important;
}

.profile-actions .btarchiverev {
  min-width: 94px;
  min-height: 36px;
  height: auto;
  margin: 0;
  border: 1px solid #9db2be;
  border-radius: 7px;
  background: #f3f7f9;
  color: #35576a;
  font: 600 13px/1.2 var(--app-font);
  padding: 7px 14px;
  cursor: pointer;
  box-shadow: none;
}

.profile-actions input[type="submit"].btarchiverev {
  border-color: #047899;
  background: #028cae;
  color: #ffffff;
}

.profile-actions .btarchiverev:hover,
.profile-actions .btarchiverev:focus-visible {
  border-color: #047899;
  outline: none;
  box-shadow: 0 0 0 3px rgba(2, 140, 174, 0.15);
}

.profile-actions input[type="submit"].btarchiverev:hover,
.profile-actions input[type="submit"].btarchiverev:focus-visible {
  background: #007b9d;
}

html[data-theme="dark"] .profile-panel {
  border-color: #3f5c6b;
  background: #16242d !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.26);
}

html[data-theme="dark"] .profile-table td:first-child {
  color: #c5d6de;
}

html[data-theme="dark"] .profile-form input[type="text"],
html[data-theme="dark"] .profile-form input[type="tel"],
html[data-theme="dark"] .profile-form input[type="email"],
html[data-theme="dark"] .profile-form input[type="password"],
html[data-theme="dark"] .profile-form select {
  border-color: #496674;
  background: #192b35 !important;
  color: #edf5f8 !important;
}

html[data-theme="dark"] .profile-form input[readonly],
html[data-theme="dark"] .profile-form select:disabled {
  border-color: #3a505c;
  background: #22343e !important;
  color: #a9bbc5 !important;
}

html[data-theme="dark"] .profile-actions .btarchiverev {
  border-color: #567687;
  background: #203440;
  color: #c6e8f3;
}

html[data-theme="dark"] .profile-actions input[type="submit"].btarchiverev {
  border-color: #1687b0;
  background: #087da4;
  color: #ffffff;
}

@media (max-width: 700px) {
  .profile-panel {
    width: calc(100% - 16px);
    margin: 8px auto;
    padding: 13px 12px;
  }

  .profile-table,
  .profile-table tbody,
  .profile-table tr,
  .profile-table td {
    display: block;
    width: 100% !important;
  }

  .profile-table {
    border-spacing: 0;
  }

  .profile-table tr {
    margin-bottom: 10px;
  }

  .profile-table td:first-child {
    padding: 0 0 4px;
    text-align: left !important;
  }

  .profile-table td:last-child {
    padding: 0;
  }

  .profile-form input[type="text"],
  .profile-form input[type="tel"],
  .profile-form input[type="email"],
  .profile-form input[type="password"],
  .profile-form select {
    width: 100%;
    min-height: 42px;
    font-size: 16px;
  }

  .profile-actions-row > td:first-child {
    display: none;
  }

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

  .profile-actions .btarchiverev {
    width: 100%;
    min-height: 40px;
  }
}

.script-editor-panel {
  width: min(920px, calc(100% - 24px));
  margin: 12px auto;
  padding: 18px 20px;
  border: 1px solid #c7d7e0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(31, 69, 89, 0.08);
}

.script-editor-form {
  max-width: 860px;
  margin: 0 auto;
}

.script-editor-form > label,
.script-editor-form .item-stack > label {
  display: block;
  margin: 0 0 13px;
  color: #344f5f;
  font-size: 13px;
  font-weight: 600;
}

.script-editor-form input:not([type="hidden"]),
.script-editor-form select,
.script-editor-form textarea {
  width: min(100%, 760px) !important;
  height: auto;
  margin-top: 4px;
  border: 1px solid #b7c9d4;
  border-radius: 7px;
  background: #ffffff;
  color: #193c50;
  font: 14px/1.45 var(--app-font);
  padding: 8px 10px;
  box-shadow: inset 0 1px 2px rgba(26, 65, 86, 0.05);
}

.script-editor-form input:not([type="hidden"]),
.script-editor-form select {
  min-height: 38px;
}

.script-editor-form select {
  width: min(100%, 360px) !important;
  cursor: pointer;
}

.script-editor-form input[type="date"] {
  width: min(100%, 220px) !important;
}

.script-editor-form textarea {
  display: block;
  min-height: 190px;
  resize: vertical;
}

.script-editor-form input:focus,
.script-editor-form select:focus,
.script-editor-form textarea:focus {
  border-color: #028cae;
  outline: none;
  box-shadow: 0 0 0 3px rgba(2, 140, 174, 0.16);
}

.script-editor-form .item-stack {
  display: grid;
  gap: 2px;
}

.script-editor-form .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 0;
}

.script-editor-form .actions button,
.script-editor-form .actions .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 94px;
  min-height: 36px;
  margin: 0;
  border-radius: 7px;
  font: 600 13px/1.2 var(--app-font);
  padding: 7px 14px;
  text-decoration: none;
}

.script-editor-form .actions button[type="submit"] {
  border-color: #047899;
  background: #028cae;
  color: #ffffff;
}

.script-editor-form .actions button[type="submit"]:hover,
.script-editor-form .actions button[type="submit"]:focus-visible {
  border-color: #005f7c;
  background: #007b9d;
  outline: none;
  box-shadow: 0 0 0 3px rgba(2, 140, 174, 0.15);
}

html[data-theme="dark"] .script-editor-panel {
  border-color: #3f5c6b;
  background: #16242d !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.26);
}

html[data-theme="dark"] .script-editor-form > label,
html[data-theme="dark"] .script-editor-form .item-stack > label {
  color: #c5d6de;
}

html[data-theme="dark"] .script-editor-form input:not([type="hidden"]),
html[data-theme="dark"] .script-editor-form select,
html[data-theme="dark"] .script-editor-form textarea {
  border-color: #496674;
  background: #192b35 !important;
  color: #edf5f8 !important;
}

html[data-theme="dark"] .script-editor-form .actions button[type="submit"] {
  border-color: #1687b0;
  background: #087da4;
  color: #ffffff;
}

@media (max-width: 700px) {
  .script-editor-panel {
    width: calc(100% - 16px);
    margin: 8px auto;
    padding: 13px 12px;
  }

  .script-editor-form input:not([type="hidden"]),
  .script-editor-form select,
  .script-editor-form textarea {
    width: 100% !important;
    font-size: 16px;
  }

  .script-editor-form input:not([type="hidden"]),
  .script-editor-form select {
    min-height: 42px;
  }

  .script-editor-form textarea {
    min-height: 220px;
  }

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

  .script-editor-form .actions button,
  .script-editor-form .actions .button {
    width: 100%;
    min-height: 40px;
  }
}

@media (max-width: 700px) {
  .profile-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
  }

  .profile-actions .btarchiverev {
    flex: 0 0 auto;
    width: auto !important;
    min-width: 92px;
    max-width: 44%;
    min-height: 36px;
    padding: 6px 12px;
  }
}

/* Personal files use compact cards on phones instead of a wide desktop table. */
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  .personal-files-wrap {
    width: 100%;
    max-width: 100%;
    padding: 0;
    overflow: visible;
  }

  .personal-files-wrap .personal-files-table,
  .personal-files-table tbody {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
  }

  .personal-files-table thead {
    display: none;
  }

  .personal-files-table .personal-file-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content max-content;
    gap: 6px 8px;
    width: 100%;
    margin: 9px 0;
    padding: 10px;
    border: 2px solid #789cac;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 2px 7px rgba(26, 69, 91, 0.08);
  }

  .personal-files-table .personal-file-row > td {
    display: flex;
    align-items: center;
    width: auto !important;
    min-width: 0;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    text-align: left !important;
  }

  .personal-files-table .personal-file-topic {
    grid-column: 1 / -1;
    display: -webkit-box;
    padding: 0 0 7px !important;
    border-bottom: 1px solid rgba(68, 108, 128, 0.24) !important;
    overflow: hidden;
    color: #163d51;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .personal-files-table .personal-file-fid {
    grid-column: 1 / 3;
    grid-row: 2;
    overflow: hidden;
    color: #006d9b;
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .personal-files-table .personal-file-time {
    grid-column: 3;
    grid-row: 2;
    justify-content: flex-end;
    font-size: 12px;
  }

  .personal-files-table .personal-file-fid::before,
  .personal-files-table .personal-file-time::before {
    content: attr(data-label);
    flex: none;
    margin-right: 4px;
    color: #687f8b;
    font-size: 11px;
    font-weight: 600;
  }

  .personal-files-table .personal-file-name {
    grid-column: 1;
    grid-row: 3;
    gap: 5px;
    overflow: hidden;
  }

  .personal-files-table .personal-file-name img {
    flex: none;
  }

  .personal-files-table .personal-file-name .attachment-link {
    display: -webkit-box;
    min-width: 0;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.3;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .personal-files-table .personal-file-size {
    grid-column: 2;
    grid-row: 3;
    justify-content: flex-end;
    color: #526b78;
    font-size: 11px;
  }

  .personal-files-table .personal-file-actions {
    grid-column: 3;
    grid-row: 3;
    justify-content: flex-end;
  }

  .personal-files-table .personal-file-actions .button {
    min-width: 48px;
    min-height: 32px;
    margin: 0;
    padding: 5px 9px;
    border-radius: 6px;
    font-size: 12px;
  }

  .personal-files-table .personal-file-empty-row,
  .personal-files-table .personal-file-empty-row td {
    display: block;
    width: 100% !important;
    min-width: 0;
  }

  .personal-files-table .personal-file-empty-row td {
    padding: 24px 10px;
    text-align: center !important;
  }

  html[data-theme="dark"] .personal-files-table .personal-file-row {
    border-color: #55798a;
    background: #172a34;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  }

  html[data-theme="dark"] .personal-files-table .personal-file-topic {
    border-bottom-color: rgba(157, 190, 205, 0.2) !important;
    color: #eef6f9;
  }

  html[data-theme="dark"] .personal-files-table .personal-file-fid {
    color: #63c8ed;
  }

html[data-theme="dark"] .personal-files-table .personal-file-fid::before,
  html[data-theme="dark"] .personal-files-table .personal-file-time::before,
  html[data-theme="dark"] .personal-files-table .personal-file-size {
    color: #a9bec8;
  }
}

/* RSScript list becomes compact, readable cards on phones and touch devices. */
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  .script-list-search {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    margin: 8px 0 10px;
  }

  .script-list-search input {
    grid-column: 1 / -1;
    width: 100% !important;
    min-width: 0;
    min-height: 42px;
    margin: 0;
    border: 1px solid #b8cbd7;
    border-radius: 7px;
    background: #ffffff;
    color: #183b50;
    font: 16px/1.3 var(--app-font);
    padding: 8px 10px;
  }

  .script-list-search button,
  .script-list-search .button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    margin: 0;
    border-radius: 7px;
    font: 600 13px/1.2 var(--app-font);
    text-align: center;
    text-decoration: none;
  }

  .script-list-search button {
    border-color: #047899;
    background: #028cae;
    color: #ffffff;
  }

  .script-list-wrap {
    width: 100%;
    max-width: 100%;
    padding: 0;
    overflow: visible;
  }

  .script-list-wrap .script-list-table,
  .script-list-table tbody {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
  }

  .script-list-table thead {
    display: none;
  }

  .script-list-table .script-list-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 12px;
    width: 100%;
    margin: 9px 0;
    padding: 10px;
    border: 2px solid #789cac;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 2px 7px rgba(26, 69, 91, 0.08);
  }

  .script-list-table .script-list-row > td {
    display: flex;
    align-items: baseline;
    width: auto !important;
    min-width: 0;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    color: #344f5f;
    font-size: 12px;
    text-align: left !important;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .script-list-table .script-list-topic {
    grid-column: 1 / -1;
    grid-row: 1;
    padding: 0 0 7px !important;
    border-bottom: 1px solid rgba(68, 108, 128, 0.24) !important;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
  }

  .script-list-table .script-list-topic a,
  .script-list-table .script-list-topic a:visited {
    display: -webkit-box;
    min-width: 0;
    overflow: hidden;
    color: #006d9b;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .script-list-table .script-list-date {
    grid-column: 1;
    grid-row: 2;
  }

  .script-list-table .script-list-type {
    grid-column: 2;
    grid-row: 2;
  }

  .script-list-table .script-list-status {
    grid-column: 1;
    grid-row: 3;
  }

  .script-list-table .script-list-author {
    grid-column: 2;
    grid-row: 3;
  }

  .script-list-table .script-list-row td[data-label]::before {
    content: attr(data-label);
    flex: none;
    margin-right: 5px;
    color: #687f8b;
    font-size: 11px;
    font-weight: 600;
  }

  .script-list-table .script-list-empty-row,
  .script-list-table .script-list-empty-row td {
    display: block;
    width: 100% !important;
    min-width: 0;
  }

  .script-list-table .script-list-empty-row td {
    padding: 24px 10px;
    text-align: center !important;
  }

  html[data-theme="dark"] .script-list-search input {
    border-color: #405d6c;
    background: #172832;
    color: #edf5f8;
  }

  html[data-theme="dark"] .script-list-table .script-list-row {
    border-color: #55798a;
    background: #172a34;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  }

  html[data-theme="dark"] .script-list-table .script-list-row > td {
    color: #d8e5eb;
  }

  html[data-theme="dark"] .script-list-table .script-list-topic {
    border-bottom-color: rgba(157, 190, 205, 0.2) !important;
  }

  html[data-theme="dark"] .script-list-table .script-list-topic a,
  html[data-theme="dark"] .script-list-table .script-list-topic a:visited {
    color: #63c8ed;
  }

html[data-theme="dark"] .script-list-table .script-list-row td[data-label]::before {
    color: #a9bec8;
  }
}

/* Keep copyable news metadata at the same scale as the region on mobile. */
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  .feed-table .feed-summary-row > .feed-news-cell,
  .feed-table .feed-summary-row .feed-title-copy-button,
  .feed-table .feed-summary-row .fid-copy-button,
  .feed-table .feed-summary-row .reporter-copy-button,
  .feed-table .feed-summary-row .province-copy-button {
    font-size: 13px !important;
  }

  .feed-table .feed-summary-row .copy-to-clipboard {
    min-height: 0;
    line-height: 1.25;
  }
}

/* Group every feed and its attachments into one clearly identifiable story. */
.feed-table tbody tr.feed-stripe-even {
  --feed-story-background: #fff8dc;
  --feed-story-border: #d5ad3c;
}

.feed-table tbody tr.feed-stripe-odd {
  --feed-story-background: #eef7fb;
  --feed-story-border: #79a9bd;
}

.feed-table tbody tr.feed-stripe-even > td,
.feed-table tbody tr.feed-stripe-odd > td,
.feed-table tbody tr.feed-stripe-even .attachment-table,
.feed-table tbody tr.feed-stripe-odd .attachment-table,
.feed-table tbody tr.feed-stripe-even .attachment-table td,
.feed-table tbody tr.feed-stripe-odd .attachment-table td {
  background-color: var(--feed-story-background) !important;
}

.feed-table .feed-summary-row > td {
  border-top: 2px solid var(--feed-story-border) !important;
}

.feed-table .feed-summary-row > td:first-child,
.feed-table .feed-detail-row > td:first-child,
.feed-table .feed-attachments-row > td:first-child {
  border-left: 2px solid var(--feed-story-border) !important;
}

.feed-table .feed-summary-row > td:last-child,
.feed-table .feed-detail-row > td:last-child,
.feed-table .feed-attachments-row > td:last-child {
  border-right: 2px solid var(--feed-story-border) !important;
}

.feed-table .feed-attachments-row > td {
  border-bottom: 2px solid var(--feed-story-border) !important;
}

.feed-table .feed-summary-row > td:first-child {
  border-top-left-radius: 6px;
}

.feed-table .feed-summary-row > td:last-child {
  border-top-right-radius: 6px;
}

.feed-table .feed-attachments-row > td:first-child {
  border-bottom-left-radius: 6px;
}

.feed-table .feed-attachments-row > td:last-child {
  border-bottom-right-radius: 6px;
}

html[data-theme="dark"] .feed-table tbody tr.feed-stripe-even {
  --feed-story-background: #3a321c;
  --feed-story-border: #d0a93d;
}

html[data-theme="dark"] .feed-table tbody tr.feed-stripe-odd {
  --feed-story-background: #173440;
  --feed-story-border: #62a5bd;
}

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  .feed-table .feed-summary-row,
  .feed-table .feed-detail-row,
  .feed-table .feed-attachments-row {
    background-color: var(--feed-story-background) !important;
  }

  .feed-table .feed-summary-row {
    border-color: var(--feed-story-border) !important;
    box-shadow: 0 -2px 7px rgba(62, 79, 89, 0.14);
  }

  .feed-table .feed-detail-row,
  .feed-table .feed-attachments-row {
    border-right-color: var(--feed-story-border) !important;
    border-left-color: var(--feed-story-border) !important;
  }

  .feed-table .feed-attachments-row {
    border-bottom-color: var(--feed-story-border) !important;
    box-shadow: 0 5px 9px rgba(62, 79, 89, 0.16);
  }

  html[data-theme="dark"] .feed-table .feed-summary-row {
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.24);
  }

  html[data-theme="dark"] .feed-table .feed-attachments-row {
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
  }
}
