.doc-page {
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 80% 5%, rgba(144, 95, 41, .12), transparent 30rem),
    radial-gradient(circle at 12% 40%, rgba(30, 48, 79, .13), transparent 34rem),
    var(--bg);
}

.doc-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(5, 7, 10, .94);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.doc-header-inner {
  width: min(1320px, calc(100% - 48px));
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 34px);
}

.doc-nav {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.6vw, 24px);
}

.doc-nav a {
  position: relative;
  padding: 29px 0 27px;
  color: rgba(244, 240, 233, .76);
  white-space: nowrap;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .045em;
  transition: color .2s ease;
}

.doc-nav a:hover,
.doc-nav a[aria-current="page"] {
  color: var(--gold-bright);
}

.doc-account-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(229, 194, 124, .52);
  border-radius: 4px;
  color: var(--gold-bright);
  background: rgba(214, 177, 105, .08);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.doc-account-link:hover {
  color: #110e09;
  background: var(--gold-bright);
}

.doc-main {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 58px 0 100px;
}

.doc-hero {
  position: relative;
  overflow: hidden;
  min-height: 310px;
  display: flex;
  align-items: center;
  padding: clamp(34px, 6vw, 76px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(110deg, rgba(9, 11, 15, .98) 8%, rgba(9, 11, 15, .88) 62%, rgba(9, 11, 15, .55));
  box-shadow: var(--shadow);
  isolation: isolate;
}

.doc-hero::before {
  position: absolute;
  z-index: -2;
  inset: 0 0 0 45%;
  content: "";
  background: url("/assets/hero-poster.webp") center 42% / cover no-repeat;
  opacity: .28;
  mask-image: linear-gradient(90deg, transparent, #000 38%);
}

.doc-hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(5, 7, 10, .55), transparent 55%);
}

.doc-hero-copy {
  max-width: 760px;
}

.doc-kicker {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.doc-hero h1 {
  max-width: 780px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 4.25rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: .015em;
  text-wrap: balance;
}

.doc-lead {
  max-width: 700px;
  margin: 18px 0 0;
  color: rgba(244, 240, 233, .78);
  font-size: clamp(.95rem, 1.5vw, 1.08rem);
  line-height: 1.8;
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 27px;
}

.doc-actions .button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.doc-section {
  margin-top: 58px;
  scroll-margin-top: 100px;
}

.doc-section-heading {
  max-width: 740px;
  margin-bottom: 24px;
}

.doc-section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.65rem, 3vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
}

.doc-section-heading p:not(.doc-kicker) {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.doc-grid {
  display: grid;
  gap: 16px;
}

.doc-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.doc-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.doc-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.doc-card,
.doc-panel {
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: linear-gradient(145deg, rgba(18, 22, 29, .96), rgba(10, 12, 16, .96));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .2);
}

.doc-card {
  min-height: 176px;
  padding: 23px;
}

.doc-card-index {
  display: inline-block;
  margin-bottom: 19px;
  color: var(--gold);
  font-family: var(--serif);
  font-size: .8rem;
  letter-spacing: .12em;
}

.doc-card h3,
.doc-panel h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 600;
}

.doc-card p,
.doc-panel p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.7;
}

.doc-card a,
.doc-panel a,
.doc-inline-link {
  color: var(--gold-bright);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(240, 210, 142, .42);
  text-underline-offset: 4px;
}

.class-guide-card {
  position: relative;
  overflow: hidden;
  min-height: 255px;
  display: flex;
  align-items: end;
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #11141a;
  isolation: isolate;
}

.class-guide-card::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  content: "";
  background: var(--class-image) center 28% / cover no-repeat;
  opacity: .58;
  transition: transform .35s ease, opacity .35s ease;
}

.class-guide-card::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(5, 7, 10, .98), rgba(5, 7, 10, .14) 75%);
}

.class-guide-card:hover::before {
  opacity: .76;
  transform: scale(1.035);
}

.class-guide-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.35rem;
}

.class-guide-card p {
  max-width: 290px;
  margin: 8px 0 0;
  color: rgba(244, 240, 233, .78);
  font-size: .83rem;
  line-height: 1.6;
}

.doc-callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 22px;
  padding: 20px 22px;
  border: 1px solid rgba(210, 173, 103, .28);
  border-left: 3px solid var(--gold-deep);
  border-radius: 4px;
  background: rgba(210, 173, 103, .055);
}

.doc-callout-mark {
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 1.1rem;
}

.doc-callout strong { color: var(--text); }
.doc-callout p { margin: 0; color: var(--muted); line-height: 1.7; }

.doc-link-card {
  min-height: 0;
}

.doc-link-card a {
  display: inline-flex;
  margin-top: 16px;
}

.status-panel {
  padding: clamp(24px, 4vw, 38px);
  border-color: rgba(210, 173, 103, .27);
  background:
    radial-gradient(circle at 100% 0, rgba(210, 173, 103, .09), transparent 18rem),
    linear-gradient(145deg, #12161d, #090b10);
}

.status-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.status-panel-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.3rem);
}

.doc-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gold-bright);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.doc-status-badge::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  content: "";
  background: var(--muted-2);
}

.doc-status-badge[data-state="online"]::before {
  background: #65d79a;
  box-shadow: 0 0 11px rgba(101, 215, 154, .68);
}

.doc-status-badge[data-state="offline"]::before,
.doc-status-badge[data-state="unavailable"]::before {
  background: #d47567;
}

.status-panel-message {
  max-width: 800px;
  margin: 20px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.status-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 28px 0 0;
  border-top: 1px solid var(--line-soft);
}

.status-facts > div {
  display: grid;
  gap: 7px;
  padding: 18px 14px 0 0;
}

.status-facts dt {
  color: var(--muted-2);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.status-facts dd {
  margin: 0;
  color: var(--text);
  font-size: .9rem;
  font-weight: 700;
}

.rate-card {
  min-height: 164px;
  padding: 23px;
}

.rate-card-label {
  display: block;
  color: var(--muted-2);
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.rate-card strong {
  display: block;
  margin-top: 12px;
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 600;
}

.rate-card p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.55;
}

.rate-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(12, 14, 18, .86);
}

.rate-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  text-align: left;
}

.rate-table th,
.rate-table td {
  padding: 16px 19px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

.rate-table th {
  color: var(--gold-bright);
  background: rgba(210, 173, 103, .055);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.rate-table td {
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.55;
}

.rate-table td:first-child {
  color: var(--text);
  font-weight: 700;
}

.rate-table tr:last-child td { border-bottom: 0; }

.doc-footer {
  border-top: 1px solid var(--line-soft);
  background: rgba(3, 4, 6, .7);
}

.doc-footer-inner {
  width: min(1180px, calc(100% - 48px));
  min-height: 98px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted-2);
  font-size: .75rem;
}

.doc-footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.doc-footer a { color: var(--muted); }
.doc-footer a:hover { color: var(--gold-bright); }

.guide-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.guide-toc a,
.guide-chip {
  display: inline-flex;
  align-items: center;
  min-height: 35px;
  padding: 7px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  color: var(--muted);
  background: rgba(18, 22, 29, .88);
  font-size: .76rem;
  font-weight: 700;
}

.guide-toc a:hover,
.guide-toc a:focus-visible {
  color: var(--gold-bright);
  border-color: rgba(210, 173, 103, .48);
}

.guide-search,
.guide-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
  margin: 23px 0 16px;
}

.guide-filters > div {
  min-width: 150px;
  flex: 1;
}

.guide-search label,
.guide-filters label {
  display: block;
  margin-bottom: 7px;
  color: var(--gold);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.guide-search input,
.guide-filters input,
.guide-filters select {
  width: min(100%, 430px);
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--text);
  background: #10141b;
  font: inherit;
}

.guide-filters input,
.guide-filters select { width: 100%; }
.guide-search input:focus,
.guide-filters input:focus,
.guide-filters select:focus { outline: 2px solid var(--gold); outline-offset: 2px; }
.guide-search span { color: var(--muted-2); font-size: .78rem; }
.guide-chip-list { display: flex; flex-wrap: wrap; gap: 7px; }
.guide-chip { font-weight: 500; }
.guide-subtitle { margin: 36px 0 7px; font-family: var(--serif); font-size: 1.35rem; }
.guide-muted { color: var(--muted-2); font-size: .8rem; line-height: 1.65; }
.guide-data-table { min-width: 610px; }
#sources .guide-data-table { min-width: 820px; }
.guide-data-table details summary {
  color: var(--gold-bright);
  cursor: pointer;
  white-space: nowrap;
}
.guide-data-table details p {
  max-width: 300px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.55;
}
.guide-top-gap { margin-top: 24px; }
.guide-more {
  display: block;
  margin: 20px auto;
  padding: 10px 20px;
  border: 1px solid var(--gold-deep);
  border-radius: 3px;
  color: var(--gold-bright);
  background: rgba(210, 173, 103, .08);
  font: inherit;
  font-size: .8rem;
  font-weight: 800;
  cursor: pointer;
}
.guide-more[hidden] { display: none; }
.guide-faq { display: grid; gap: 10px; }
.guide-faq details {
  padding: 18px 20px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: #10141b;
}
.guide-faq summary { color: var(--text); font-weight: 700; cursor: pointer; }
.guide-faq p { margin: 14px 0 0; color: var(--muted); line-height: 1.7; }
.guide-faq a { color: var(--gold-bright); }

@media (max-width: 980px) {
  .doc-header-inner {
    width: min(100% - 32px, 760px);
    min-height: 0;
    flex-wrap: wrap;
    gap: 0 16px;
    padding: 10px 0;
  }

  .doc-header-inner .brand { min-height: 48px; }
  .doc-account-link { margin-left: auto; }
  .doc-nav {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    gap: 22px;
    margin-top: 5px;
    scrollbar-width: thin;
  }

  .doc-nav a { padding: 10px 0 9px; }
  .doc-main { padding-top: 30px; }
  .doc-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .doc-header-inner,
  .doc-main,
  .doc-footer-inner { width: calc(100% - 28px); }

  .doc-hero {
    min-height: 0;
    padding: 31px 23px;
  }

  .doc-hero::before { left: 15%; opacity: .2; }
  .doc-hero h1 { font-size: clamp(1.9rem, 10vw, 3rem); }
  .doc-grid.two,
  .doc-grid.three,
  .doc-grid.four { grid-template-columns: 1fr; }
  .doc-card { min-height: 0; }
  .class-guide-card { min-height: 225px; }
  .doc-section { margin-top: 42px; }
  .status-panel-head { align-items: flex-start; flex-direction: column; }
  .status-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; padding: 22px 0; }
  .guide-toc { gap: 6px; }
  .guide-toc a { font-size: .7rem; }
  .guide-search input { width: 100%; }
  .guide-search span { flex-basis: 100%; }
}
