:root {
  --rs500-ink: #173a35;
  --rs500-muted: #6f837e;
  --rs500-line: #dce6e2;
  --rs500-brand: #0f5a4e;
  --rs500-brand-dark: #0b433b;
  --rs500-soft: #f7faf9;
  --rs500-panel: #eef6f3;
  --rs500-coral: #e86f50;
  --rs500-amber: #f5b33b;
}

body.rs500-page,
body.rs500-page *,
body.rs500-page *::before,
body.rs500-page *::after {
  box-sizing: border-box;
}

body.rs500-page {
  margin: 0;
  min-height: 100vh;
  color: var(--rs500-ink);
  background:
    linear-gradient(145deg, rgba(247, 240, 236, 0.72), rgba(239, 247, 244, 0.94) 42%, rgba(248, 250, 249, 1));
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.rs-error-topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(23, 58, 53, 0.08);
  padding: 0 38px;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(14px);
}

.rs-error-brand,
.rs-error-help-link {
  display: inline-flex;
  align-items: center;
  color: var(--rs500-ink);
  text-decoration: none;
}

.rs-error-brand {
  gap: 12px;
  font-size: 18px;
}

.rs-error-brand span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--rs500-brand);
  color: #fff;
  font-size: 10px;
  font-weight: 850;
  box-shadow: 0 10px 20px rgba(15, 90, 78, 0.20);
}

.rs-error-brand strong,
.rs-error-help-link {
  font-weight: 800;
}

.rs-error-help-link {
  min-height: 34px;
  gap: 8px;
  font-size: 13px;
}

.rs-error-help-link::before {
  content: "?";
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  line-height: 1;
}

.rs-error-help-link:hover,
.rs-error-help-link:focus {
  color: var(--rs500-brand);
}

.rs500-main {
  width: min(1210px, calc(100% - 48px));
  min-height: calc(100vh - 68px);
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 64px 0 36px;
}

.rs500-shell {
  width: 100%;
  min-height: 660px;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(390px, 0.97fr);
  overflow: hidden;
  border: 1px solid rgba(23, 58, 53, 0.09);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 72px rgba(23, 58, 53, 0.12);
}

.rs500-content {
  min-width: 0;
  padding: 70px 76px 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.rs500-eyebrow {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #ffd7cb;
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff1eb;
  color: #a3442f;
  font-size: 13px;
  line-height: 1;
}

.rs500-eyebrow span,
.rs500-status span {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--rs500-coral);
}

.rs500-eyebrow strong {
  font-weight: 750;
}

.rs500-content h1 {
  max-width: 560px;
  margin: 24px 0 16px;
  color: var(--rs500-ink);
  font-size: 60px;
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: 0;
}

.rs500-content > p {
  max-width: 590px;
  margin: 0;
  color: #31564f;
  font-size: 18px;
  line-height: 1.65;
}

.rs500-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.rs500-actions a {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 0 20px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
}

.rs500-primary {
  border: 1px solid var(--rs500-brand);
  background: var(--rs500-brand);
  color: #fff;
  box-shadow: 0 14px 28px rgba(15, 90, 78, 0.18);
}

.rs500-primary:hover,
.rs500-primary:focus {
  background: var(--rs500-brand-dark);
  color: #fff;
}

.rs500-secondary {
  border: 1px solid var(--rs500-line);
  background: #fff;
  color: var(--rs500-ink);
}

.rs500-secondary:hover,
.rs500-secondary:focus {
  border-color: #b7cbc5;
  color: var(--rs500-brand-dark);
}

.rs500-support-block {
  margin-top: 40px;
  padding-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border-top: 1px solid var(--rs500-line);
}

.rs500-support-block strong,
.rs500-support-block span {
  display: block;
}

.rs500-support-block strong {
  font-size: 14px;
}

.rs500-support-block span {
  max-width: 420px;
  margin-top: 6px;
  color: var(--rs500-muted);
  font-size: 13px;
  line-height: 1.55;
}

.rs500-support-block code {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--rs500-line);
  border-radius: 10px;
  padding: 0 16px;
  background: var(--rs500-soft);
  color: #31564f;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.rs500-details {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--rs500-line);
  border-radius: 12px;
  background: var(--rs500-soft);
}

.rs500-details summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  cursor: pointer;
  color: var(--rs500-ink);
  font-size: 13px;
  font-weight: 750;
}

.rs500-details pre {
  margin: 0;
  overflow-x: auto;
  border-top: 1px solid var(--rs500-line);
  padding: 14px 16px;
  color: var(--rs500-muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.rs500-art {
  position: relative;
  min-width: 0;
  min-height: 660px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-left: 1px solid rgba(23, 58, 53, 0.07);
  background:
    linear-gradient(145deg, rgba(232, 242, 239, 0.92), rgba(255, 248, 242, 0.88)),
    var(--rs500-panel);
}

.rs500-art::before,
.rs500-art::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.rs500-art::before {
  top: 0;
  right: 0;
  width: 46%;
  height: 28%;
  background: rgba(245, 179, 59, 0.12);
  border-bottom-left-radius: 100%;
}

.rs500-art::after {
  bottom: 0;
  left: 0;
  width: 36%;
  height: 20%;
  background: rgba(232, 111, 80, 0.09);
  border-top-right-radius: 100%;
}

.rs500-status {
  position: absolute;
  z-index: 2;
  top: 28px;
  right: 28px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(23, 58, 53, 0.11);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--rs500-ink);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(23, 58, 53, 0.08);
}

.rs500-status span {
  background: #28b978;
}

.rs500-illustration {
  position: relative;
  z-index: 1;
  width: min(88%, 520px);
  max-height: 500px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 18px 26px rgba(23, 58, 53, 0.10));
}

.rs500-footer {
  width: min(1210px, calc(100% - 48px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #6f837e;
  font-size: 12px;
}

.rs500-footer nav {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.rs500-footer a {
  color: var(--rs500-ink);
  font-weight: 700;
  text-decoration: none;
}

.rs500-footer a:hover,
.rs500-footer a:focus {
  color: var(--rs500-brand);
}

.rs404-page .rs500-main {
  min-height: calc(100vh - 132px);
  padding-top: 50px;
}

.rs404-shell {
  min-height: 625px;
}

.rs404-page .rs500-content {
  padding-top: 58px;
  padding-bottom: 48px;
}

.rs404-eyebrow {
  border-color: #f8d28c;
  background: #fff8e9;
  color: #8a5a0f;
}

.rs404-eyebrow span {
  background: var(--rs500-amber);
}

.rs404-message {
  max-width: 590px;
  margin: 20px 0 0;
  border: 1px solid #cfe1dc;
  border-radius: 12px;
  padding: 13px 15px;
  background: var(--rs500-soft);
  color: #31564f;
  font-size: 14px;
  line-height: 1.5;
}

.rs404-support-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rs500-line);
  border-radius: 10px;
  padding: 0 16px;
  background: var(--rs500-soft);
  color: var(--rs500-ink);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.rs404-support-link::before {
  content: "?";
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 10px;
  line-height: 1;
}

.rs404-support-link:hover,
.rs404-support-link:focus {
  border-color: #b7cbc5;
  color: var(--rs500-brand-dark);
}

.rs404-art {
  min-height: 625px;
}

.rs404-status {
  color: var(--rs500-ink);
}

.rs404-status span {
  background: var(--rs500-amber);
}

.rs404-illustration {
  width: min(86%, 500px);
}

@media (max-width: 980px) {
  .rs-error-topbar {
    padding: 0 24px;
  }

  .rs500-main {
    width: min(760px, calc(100% - 32px));
    padding-top: 32px;
  }

  .rs500-shell {
    grid-template-columns: 1fr;
  }

  .rs500-content {
    order: 2;
    padding: 46px 38px 42px;
  }

  .rs500-content h1 {
    font-size: 48px;
  }

  .rs500-art {
    order: 1;
    min-height: 360px;
    border-left: 0;
    border-bottom: 1px solid rgba(23, 58, 53, 0.07);
  }

  .rs500-illustration {
    width: min(78%, 410px);
    max-height: 300px;
  }

  .rs500-footer {
    width: min(760px, calc(100% - 32px));
  }

  .rs404-page .rs500-main {
    min-height: calc(100vh - 132px);
    padding-top: 32px;
  }
}

@media (max-width: 560px) {
  .rs-error-topbar {
    min-height: 58px;
    padding: 0 16px;
  }

  .rs-error-brand {
    gap: 9px;
    font-size: 16px;
  }

  .rs-error-brand span {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }

  .rs-error-help-link {
    font-size: 0;
  }

  .rs-error-help-link::before {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }

  .rs500-main {
    width: calc(100% - 24px);
    padding: 16px 0 24px;
  }

  .rs500-shell {
    min-height: auto;
    border-radius: 18px;
  }

  .rs500-content {
    padding: 34px 24px 30px;
  }

  .rs500-content h1 {
    font-size: 40px;
  }

  .rs500-content > p {
    font-size: 16px;
  }

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

  .rs500-actions {
    display: grid;
  }

  .rs500-actions a,
  .rs500-support-block code {
    width: 100%;
  }

  .rs500-support-block {
    display: grid;
  }

  .rs500-art {
    min-height: 310px;
  }

  .rs500-status {
    top: 18px;
    right: 18px;
  }

  .rs500-illustration {
    width: 86%;
    max-height: 245px;
  }

  .rs500-footer {
    width: calc(100% - 24px);
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 18px;
  }

  .rs404-support-link {
    width: 100%;
  }
}

/* Compact, premium-looking error card used by generated form feedback. */
.site-error-card {
  border-left: 6px solid rgba(220, 53, 69, 1);
  border-radius: 12px;
  background: rgba(220, 53, 69, 0.06);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.site-error-header {
  padding: 0.75rem 1rem;
}

.site-error-title {
  font-weight: 600;
  line-height: 1.15;
}

.site-error-sub {
  font-size: 0.9rem;
  opacity: 0.85;
}

.site-error-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.site-error-body {
  padding: 0.5rem 1rem 1rem 1rem;
}

.site-error-list {
  margin: 0;
  padding-left: 1.15rem;
}

.site-error-list li {
  margin: 0.25rem 0;
}

[data-role="collapser"] {
  cursor: pointer;
}
