html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.5rem white, 0 0 0 1rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 4rem;
}

.container {
  padding-left: 1rem;
  padding-right: 1rem;
}

.downloads-page {
  --ink: #0d1b1e;
  --paper: #f6f2e8;
  --accent: #f5a524;
  --accent-dark: #c97811;
  --sea: #1f6e7a;
  --slate: #2a3940;
  --glass: rgba(255, 255, 255, 0.65);
  color: var(--ink);
  font-family: "Gill Sans", "Trebuchet MS", "Lucida Grande", Tahoma, sans-serif;
  position: relative;
  padding: 2.5rem 2rem 3.5rem;
}

.downloads-page::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 60%;
  background: radial-gradient(circle at 20% 20%, rgba(245, 165, 36, 0.25), transparent 60%),
              radial-gradient(circle at 70% 40%, rgba(31, 110, 122, 0.25), transparent 55%);
  z-index: -1;
}

.downloads-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 2rem;
  align-items: start;
  background: linear-gradient(120deg, #fdf7ec, #eef6f5);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 18px 40px rgba(15, 33, 38, 0.12);
  overflow: hidden;
  position: relative;
}

.downloads-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 280px;
  height: 280px;
  background: rgba(31, 110, 122, 0.12);
  border-radius: 50%;
}

.downloads-hero h1 {
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1.05;
  margin: 0 0 1rem;
  color: var(--ink);
}

.downloads-hero .lead {
  font-size: 1rem;
  color: var(--slate);
  margin-bottom: 1.5rem;
}

.eyebrow {
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.5rem;
  font-weight: 700;
  color: var(--sea);
  margin-bottom: 0.5rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.download-details {
  background: rgba(255, 255, 255, 0.75);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid rgba(31, 110, 122, 0.2);
  margin-bottom: 1.5rem;
  display: grid;
  gap: 1rem;
}

.detail-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: space-between;
}

.detail-label {
  font-weight: 700;
  color: var(--ink);
}

.detail-hash code {
  background: rgba(13, 27, 30, 0.08);
  padding: 0.5rem;
  border-radius: 8px;
  font-size: 1rem;
}

.btn-download {
  border-radius: 999px;
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.btn-download.btn-primary {
  background: var(--sea);
  border-color: var(--sea);
}

.btn-download.btn-outline-light {
  color: var(--sea);
  border-color: var(--sea);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.meta-card {
  background: var(--glass);
  border-radius: 16px;
  padding: 1rem;
  border: 1px solid rgba(31, 110, 122, 0.2);
  backdrop-filter: blur(6px);
}

.meta-title {
  font-size: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
  color: var(--sea);
}

.meta-value {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.meta-note {
  font-size: 1rem;
  color: var(--slate);
  margin: 0;
}

.hero-panel {
  background: rgba(13, 27, 30, 0.9);
  color: #f2efe9;
  border-radius: 24px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #cde3e0;
}

.pill {
  background: rgba(245, 165, 36, 0.2);
  color: #f5c57a;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 600;
}

.panel-body {
  display: grid;
  gap: 1rem;
}

.channel-card {
  background: rgba(255, 255, 255, 0.08);
  padding: 1rem;
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.channel-card h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.channel-card p {
  margin: 0;
  font-size: 1rem;
  color: #cde3e0;
}

.channel-action {
  text-align: right;
  display: grid;
  gap: 0.5rem;
}

.tag {
  font-size: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #f5c57a;
}

.link {
  color: #f6f2e8;
  text-decoration: underline;
}

.panel-footer {
  font-size: 1rem;
  color: #9fb7b4;
}

.downloads-section {
  margin-top: 3rem;
  padding: 0.5rem 0;
}

.section-header h2 {
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(1.5rem, 2.6vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--slate);
  margin-bottom: 1.5rem;
}

.steps {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem 1.5rem 1.5rem 2.5rem;
  box-shadow: 0 12px 24px rgba(15, 33, 38, 0.08);
}

.steps li {
  margin-bottom: 1rem;
}

.callout {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: 16px;
  background: #f2f7f6;
  border: 1px solid rgba(31, 110, 122, 0.2);
}

.callout pre {
  background: #0d1b1e;
  color: #f6f2e8;
  padding: 1rem;
  border-radius: 8px;
  margin: 0;
}

.notes-grid,
.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.note-card,
.support-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 12px 24px rgba(15, 33, 38, 0.08);
}

.note-card h3 {
  margin-bottom: 1rem;
}

.note-card ul {
  margin: 0;
  padding-left: 1rem;
}

.support {
  margin-bottom: 2rem;
}

.support-card .link {
  color: var(--sea);
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal-up 0.6s ease forwards;
  animation-delay: var(--delay, 0ms);
}

@keyframes reveal-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 992px) {
  .downloads-hero {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    order: 2;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 576px) {
  .downloads-hero {
    padding: 2rem;
  }

  .steps {
    padding-left: 1.5rem;
  }
}

.portal-shell-body {
  margin: 0;
  font-family: "Segoe UI", "Trebuchet MS", "Lucida Grande", Tahoma, sans-serif;
  color: #1d2a3a;
  background: #f2f5fb;
}

.portal-shell {
  --portal-nav-width: 260px;
  --portal-surface: #ffffff;
  --portal-border: #d9e2ef;
  --portal-ink: #1d2a3a;
  --portal-muted: #55657a;
  --portal-accent: #2e69c6;
  --portal-accent-soft: #e7f0ff;
  display: flex;
  min-height: 100vh;
  position: relative;
}

.portal-shell-nav {
  width: var(--portal-nav-width);
  background: linear-gradient(180deg, #0f2747 0%, #15365f 100%);
  color: #dce7f8;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.25rem 1rem;
  z-index: 30;
}

.portal-brand {
  border-bottom: 1px solid rgba(220, 231, 248, 0.18);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.portal-brand-link {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.portal-brand-link:hover {
  color: #ffffff;
}

.portal-brand-subtitle {
  margin-top: 0.25rem;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
}

.portal-menu {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.portal-menu-link {
  color: rgba(220, 231, 248, 0.92);
  text-decoration: none;
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font-size: 1rem;
  transition: background-color 120ms ease, color 120ms ease;
}

.portal-menu-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.portal-menu-link.is-active {
  color: #ffffff;
  background: rgba(78, 149, 255, 0.32);
  border: 1px solid rgba(143, 190, 255, 0.45);
}

.portal-nav-footer {
  border-top: 1px solid rgba(220, 231, 248, 0.18);
  margin-top: auto;
  padding-top: 1rem;
}

.portal-shell-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.portal-shell-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--portal-surface);
  border-bottom: 1px solid var(--portal-border);
  padding: 1rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 20;
}

.portal-topbar-title {
  margin: 0;
  color: var(--portal-ink);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 650;
}

.portal-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.portal-topbar-actions form {
  margin: 0;
}

.portal-content {
  padding: 1.5rem;
}

.portal-shell-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  border: 0;
  background: rgba(11, 20, 33, 0.42);
  z-index: 25;
}

.portal-page {
  color: #1f2d3d;
  padding: 0 0 2rem;
}

.portal-hero {
  background: linear-gradient(120deg, #f8fbff 0%, #edf3ff 52%, #f3f8ef 100%);
  border: 1px solid var(--portal-border);
  border-radius: 18px;
  padding: clamp(1.2rem, 3vw, 2rem);
  box-shadow: 0 10px 22px rgba(15, 33, 58, 0.08);
  margin-bottom: 1.25rem;
}

.portal-hero h1 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 0.75rem;
  color: #132136;
}

.portal-hero p {
  color: #4b5f76;
  max-width: 850px;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.portal-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.9rem;
}

.portal-kpi-card,
.portal-card {
  background: #ffffff;
  border: 1px solid var(--portal-border);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 8px 20px rgba(16, 30, 51, 0.06);
}

.portal-kpi-card h3,
.portal-card h3 {
  margin: 0 0 0.4rem;
  color: #16253b;
}

.portal-kpi-card p,
.portal-card p {
  color: var(--portal-muted);
  margin-bottom: 0.35rem;
}

.portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #1f4f9f;
  background: var(--portal-accent-soft);
  border: 1px solid #c8daf8;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
  font-weight: 700;
}

.portal-status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.portal-status-pill.status-active {
  color: #196336;
  background: #e8f8ef;
  border-color: #bde7cc;
}

.portal-status-pill.status-revoked {
  color: #9f1f1f;
  background: #fdeeed;
  border-color: #f4c1bd;
}

.portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.portal-actions .btn {
  border-radius: 10px;
  padding: 0.42rem 0.95rem;
  font-weight: 600;
}

.portal-mini-list {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.portal-mini-list-item {
  border: 1px solid #e4ecf6;
  border-radius: 10px;
  background: #f8fbff;
  padding: 0.5rem 0.6rem;
}

.portal-mini-list-title {
  font-weight: 600;
  color: #1b2d45;
}

.portal-mini-list-meta {
  color: #5a6b80;
  font-size: 0.85rem;
}

.portal-card .table th {
  color: #415870;
  font-size: 0.8rem;
  border-top: none;
  border-bottom-color: #e0e8f2;
}

.portal-card .table td {
  color: #1f2d3f;
  border-bottom-color: #edf2f8;
}

.portal-page .link,
.portal-page .link-primary {
  color: #1f5db6;
  text-decoration: underline;
}

@media (max-width: 991.98px) {
  .portal-shell-nav {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    transition: transform 160ms ease-out;
  }

  .portal-shell.portal-nav-open .portal-shell-nav {
    transform: translateX(0);
  }

  .portal-shell.portal-nav-open .portal-shell-backdrop {
    display: block;
  }

  .portal-content {
    padding: 1rem;
  }
}

@media (max-width: 575.98px) {
  .portal-shell-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-topbar-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .portal-hero {
    padding: 1rem;
  }
}

.mt-24 {
  margin-top: 1.5rem;
}

.mb-24 {
  margin-bottom: 1.5rem;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
