/* Orbis Field Guide
   Original code-native visual system for an unofficial DragonSword: Awakening guide. */

:root {
  color-scheme: dark;
  --canvas: #070d1c;
  --canvas-soft: #0b1428;
  --surface: #101d35;
  --surface-raised: #172744;
  --surface-paper: #f4eddd;
  --ink: #f7f1e5;
  --ink-strong: #fffaf0;
  --ink-dark: #111a2c;
  --muted: #b8c5d8;
  --muted-dark: #4d5a6d;
  --sky: #77d1ff;
  --sky-strong: #31b9ff;
  --sky-deep: #087db8;
  --gold: #e7c171;
  --gold-soft: #f3d99f;
  --success: #72dfb1;
  --warning: #f2ca78;
  --danger: #ff9a9a;
  --line: rgba(174, 205, 239, 0.22);
  --line-strong: rgba(174, 205, 239, 0.38);
  --paper-line: rgba(13, 31, 54, 0.14);
  --shadow-soft: 0 16px 48px rgba(0, 4, 14, 0.28);
  --shadow-lift: 0 22px 64px rgba(0, 4, 14, 0.38);
  --radius-sm: 0.65rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-pill: 999px;
  --page: 74rem;
  --reading: 70ch;
  --font-body: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  --focus: #ffd985;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
  text-size-adjust: 100%;
}

body {
  min-width: 18rem;
  min-height: 100vh;
  margin: 0;
  overflow-wrap: break-word;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% -8%, rgba(49, 185, 255, 0.14), transparent 32rem),
    var(--canvas);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(119, 209, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(119, 209, 255, 0.025) 1px, transparent 1px);
  background-size: 4rem 4rem;
  mask-image: linear-gradient(to bottom, black, transparent 76%);
}

::selection {
  color: var(--ink-dark);
  background: var(--gold-soft);
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

p,
ul,
ol,
dl,
blockquote {
  margin-block: 0 1.15rem;
}

ul,
ol {
  padding-inline-start: 1.35rem;
}

li + li {
  margin-block-start: 0.35rem;
}

h1,
h2,
h3,
h4 {
  max-width: 24ch;
  margin-block: 0 0.75rem;
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-weight: 650;
  line-height: 1.12;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.45rem, 6vw, 4.4rem);
  letter-spacing: -0.035em;
}

h2 {
  margin-block-start: 2.75rem;
  font-size: clamp(1.75rem, 3.8vw, 2.75rem);
  letter-spacing: -0.02em;
}

h3 {
  margin-block-start: 1.75rem;
  font-size: clamp(1.25rem, 2.6vw, 1.65rem);
}

h4 {
  margin-block-start: 1.4rem;
  font-size: 1.1rem;
}

hr {
  height: 1px;
  margin-block: 2.5rem;
  border: 0;
  background: var(--line);
}

a {
  color: var(--sky);
  text-decoration-color: rgba(119, 209, 255, 0.45);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

a:hover {
  color: #b7e9ff;
  text-decoration-color: currentColor;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

code,
kbd,
samp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.92em;
}

code {
  padding: 0.15em 0.35em;
  color: var(--gold-soft);
  border: 1px solid rgba(231, 193, 113, 0.22);
  border-radius: 0.35rem;
  background: rgba(231, 193, 113, 0.08);
}

/* Accessibility and shared layout */

.skip-link {
  position: fixed;
  z-index: 1000;
  inset-block-start: 0.75rem;
  inset-inline-start: 0.75rem;
  min-height: 2.75rem;
  padding: 0.6rem 1rem;
  color: var(--ink-dark);
  border-radius: var(--radius-sm);
  background: var(--focus);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden,
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.container,
.site-shell,
.page-shell,
.header-inner,
.nav-shell,
.footer-inner,
.footer-shell {
  width: min(100% - 2rem, var(--page));
  margin-inline: auto;
}

main {
  display: block;
}

main:focus {
  outline: 0;
}

.page-main,
.article-page {
  padding-block: clamp(2rem, 5vw, 4.5rem);
}

.prose,
.article-body,
.page-copy {
  max-width: var(--reading);
}

.prose > :first-child,
.article-body > :first-child {
  margin-block-start: 0;
}

.lede,
.hero-summary,
.page-intro {
  max-width: 66ch;
  color: #d8e2ef;
  font-size: clamp(1.08rem, 2vw, 1.25rem);
  line-height: 1.65;
}

.section,
.content-section,
main > section[aria-labelledby] {
  padding-block: clamp(2.5rem, 7vw, 5.5rem);
}

.section + .section,
.content-section + .content-section {
  border-block-start: 1px solid var(--line);
}

.section-heading {
  max-width: 48rem;
  margin-block-end: 1.75rem;
}

.section-heading h2 {
  margin-block-start: 0;
}

.section-kicker,
.eyebrow,
.kicker {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-block: 0 0.75rem;
  color: var(--gold-soft);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  line-height: 1.4;
  text-transform: uppercase;
}

.section-kicker::before,
.eyebrow::before,
.kicker::before {
  width: 1.55rem;
  height: 1px;
  flex: 0 0 auto;
  content: "";
  background: var(--gold);
}

/* Header, brand, and navigation */

.site-header,
body > header {
  position: sticky;
  z-index: 100;
  inset-block-start: 0;
  border-block-end: 1px solid var(--line);
  background: rgba(7, 13, 28, 0.92);
  backdrop-filter: blur(16px);
}

.header-inner,
.nav-shell {
  display: flex;
  min-height: 4.75rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand,
.site-brand {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.brand:hover,
.site-brand:hover {
  color: var(--ink-strong);
  text-decoration: none;
}

.brand img,
.brand-mark,
.site-brand img {
  width: 2.6rem;
  height: 2.6rem;
  flex: 0 0 auto;
}

.brand-copy,
.brand-text,
.brand > span,
.site-brand > span {
  display: grid;
  gap: 0.08rem;
}

.brand-copy small,
.brand-text small,
.brand > span small,
.site-brand > span small {
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.site-nav,
.primary-nav,
nav[aria-label^="Primary"] {
  min-width: 0;
}

.site-nav ul,
.primary-nav ul,
nav[aria-label^="Primary"] ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-nav li,
.primary-nav li,
nav[aria-label^="Primary"] li {
  margin: 0;
}

.site-nav a,
.primary-nav a,
nav[aria-label^="Primary"] a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  padding-inline: 0.8rem;
  color: #dbe7f4;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"],
.primary-nav a:hover,
.primary-nav a[aria-current="page"],
nav[aria-label^="Primary"] a:hover,
nav[aria-label^="Primary"] a[aria-current="page"] {
  color: var(--ink-strong);
  background: rgba(119, 209, 255, 0.11);
}

.site-nav a[aria-current="page"],
.primary-nav a[aria-current="page"],
nav[aria-label^="Primary"] a[aria-current="page"] {
  box-shadow: inset 0 0 0 1px rgba(119, 209, 255, 0.26);
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 9vw, 7.5rem);
  border-block-end: 1px solid var(--line);
}

.hero::after {
  position: absolute;
  z-index: -1;
  width: min(45vw, 34rem);
  aspect-ratio: 1;
  inset-block-start: 8%;
  inset-inline-end: -12%;
  border: 1px solid rgba(119, 209, 255, 0.13);
  border-radius: 50%;
  content: "";
  box-shadow:
    0 0 0 4rem rgba(119, 209, 255, 0.018),
    0 0 0 8rem rgba(119, 209, 255, 0.012);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(18rem, 0.82fr);
  align-items: center;
  gap: clamp(2.25rem, 7vw, 6rem);
}

.hero-copy {
  max-width: 48rem;
}

.hero h1 {
  margin-block-end: 1.15rem;
}

.hero-actions,
.button-row,
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-block-start: 1.75rem;
}

.hero-art,
.hero-panel,
.motif-panel {
  position: relative;
  display: grid;
  min-height: 24rem;
  place-items: center;
  overflow: hidden;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(23, 39, 68, 0.92), rgba(9, 18, 36, 0.96));
  box-shadow: var(--shadow-lift);
  isolation: isolate;
}

.hero-art::before,
.hero-panel::before,
.motif-panel::before {
  position: absolute;
  z-index: -1;
  width: 76%;
  aspect-ratio: 1;
  border: 1px solid rgba(119, 209, 255, 0.28);
  border-block-start-color: transparent;
  border-radius: 50%;
  content: "";
  transform: rotate(-28deg);
}

.hero-art::after,
.hero-panel::after,
.motif-panel::after {
  position: absolute;
  z-index: -1;
  width: 48%;
  height: 1px;
  content: "";
  background: var(--gold);
  box-shadow: 0 0 24px rgba(231, 193, 113, 0.7);
  transform: rotate(-55deg);
}

.hero-art img,
.hero-panel img,
.motif-panel img {
  width: min(72%, 15rem);
  filter: drop-shadow(0 0 2rem rgba(49, 185, 255, 0.28));
}

.hero-panel {
  min-height: 0;
  align-content: start;
  place-items: stretch;
}

.panel-label {
  margin-block: 0 0.85rem;
  color: var(--gold-soft);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}

.fact-item {
  min-width: 0;
  padding: 0.9rem;
  border-block-start: 1px solid var(--line);
}

.fact-item:nth-child(odd) {
  padding-inline-start: 0;
  border-inline-end: 1px solid var(--line);
}

.fact-item:nth-child(even) {
  padding-inline-end: 0;
}

.fact-item dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 820;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.fact-item dd {
  margin: 0.2rem 0 0;
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

/* Badges, buttons, and metadata */

.badge,
.pill,
.source-type,
.source-badge {
  display: inline-flex;
  min-height: 1.8rem;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  color: #dce9f6;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: rgba(184, 197, 216, 0.08);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  line-height: 1.25;
  text-transform: uppercase;
}

.badge::before,
.source-type::before,
.source-badge::before {
  width: 0.42rem;
  height: 0.42rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  content: "";
  box-shadow: 0 0 0.65rem currentColor;
}

.badge--official,
.badge.official,
.source-official,
[data-source-type="official"] {
  color: var(--success);
  border-color: rgba(114, 223, 177, 0.35);
  background: rgba(114, 223, 177, 0.09);
}

.badge--interview,
.badge.interview,
.source-interview,
[data-source-type="interview"] {
  color: var(--sky);
  border-color: rgba(119, 209, 255, 0.35);
  background: rgba(119, 209, 255, 0.09);
}

.badge--report,
.badge.report,
.source-report,
.source-hands-on,
[data-source-type="report"],
[data-source-type="hands-on"] {
  color: var(--gold-soft);
  border-color: rgba(231, 193, 113, 0.38);
  background: rgba(231, 193, 113, 0.09);
}

.badge--unverified,
.source-unverified,
[data-source-type="unverified"] {
  color: var(--danger);
  border-color: rgba(255, 154, 154, 0.34);
  background: rgba(255, 154, 154, 0.08);
}

.button,
.btn,
a.button,
a.btn,
button.button,
button.btn {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  color: var(--ink-dark);
  border: 1px solid var(--sky);
  border-radius: 0.8rem;
  background: var(--sky);
  font-weight: 820;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(49, 185, 255, 0.16);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.button:hover,
.btn:hover,
a.button:hover,
a.btn:hover,
button.button:hover,
button.btn:hover {
  color: #060d19;
  background: #a1e2ff;
  box-shadow: 0 12px 30px rgba(49, 185, 255, 0.23);
  transform: translateY(-1px);
}

.button-secondary,
.button.secondary,
.btn-secondary,
.button--secondary,
.button-ghost {
  color: var(--ink);
  border-color: var(--line-strong);
  background: rgba(16, 29, 53, 0.72);
  box-shadow: none;
}

.button-secondary:hover,
.button.secondary:hover,
.btn-secondary:hover,
.button--secondary:hover,
.button-ghost:hover {
  color: var(--ink-strong);
  border-color: rgba(119, 209, 255, 0.58);
  background: var(--surface-raised);
}

.meta-row,
.page-meta,
.article-meta,
.status-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1.2rem;
  margin-block: 1.15rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.meta-row > *,
.page-meta > *,
.article-meta > *,
.status-meta > * {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.meta-row > * + *::before,
.page-meta > * + *::before,
.article-meta > * + *::before {
  width: 0.24rem;
  height: 0.24rem;
  margin-inline-end: 0.6rem;
  border-radius: 50%;
  background: var(--gold);
  content: "";
}

/* Cards and status surfaces */

.card-grid,
.guide-grid,
.status-grid,
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
}

.card,
.guide-card,
.status-card,
.related-card,
.link-card,
.source-principle {
  position: relative;
  min-width: 0;
  padding: clamp(1.2rem, 3vw, 1.6rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(16, 29, 53, 0.76);
  box-shadow: var(--shadow-soft);
}

.card::before,
.guide-card::before,
.status-card::before,
.related-card::before,
.link-card::before,
.source-principle::before {
  position: absolute;
  width: 4rem;
  height: 2px;
  inset-block-start: 0;
  inset-inline-start: 1.5rem;
  content: "";
  background: var(--sky);
  box-shadow: 0 0 1.2rem rgba(49, 185, 255, 0.72);
}

.card h2,
.card h3,
.guide-card h2,
.guide-card h3,
.status-card h2,
.status-card h3,
.related-card h2,
.related-card h3,
.link-card h2,
.link-card h3,
.source-principle h2,
.source-principle h3 {
  margin-block-start: 0;
}

.card p:last-child,
.guide-card p:last-child,
.status-card p:last-child,
.related-card p:last-child,
.link-card p:last-child,
.source-principle p:last-child {
  margin-block-end: 0;
}

.guide-card,
.related-card,
.link-card {
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background-color 160ms ease;
}

.guide-card:hover,
.related-card:hover,
.link-card:hover {
  border-color: rgba(119, 209, 255, 0.45);
  background: rgba(23, 39, 68, 0.9);
  transform: translateY(-2px);
}

.guide-card > a:first-of-type,
.related-card > a:first-of-type,
.link-card h3 a,
a.card-link {
  font-weight: 800;
}

.status-card {
  min-height: 9rem;
  background: rgba(11, 20, 40, 0.86);
}

.status-card::before {
  width: 0.45rem;
  height: 0.45rem;
  inset-block-start: 1.35rem;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0.8rem rgba(114, 223, 177, 0.75);
}

.status-card .value,
.status-value,
.fact-value {
  display: block;
  margin-block: 0.25rem 0.45rem;
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 700;
  line-height: 1.18;
}

.status-card .label,
.status-label,
.fact-label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 820;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.card-grid.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Fact tables */

.table-wrap,
.table-scroll,
.facts-table-wrap {
  max-width: 100%;
  margin-block: 1.5rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(11, 20, 40, 0.78);
  -webkit-overflow-scrolling: touch;
}

table,
.facts-table,
.fact-table {
  width: 100%;
  border-spacing: 0;
  border-collapse: collapse;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.table-wrap table,
.table-scroll table,
.facts-table,
.fact-table {
  min-width: 36rem;
}

caption {
  padding: 1rem 1.15rem;
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  text-align: start;
}

th,
td {
  padding: 0.85rem 1rem;
  border-block-end: 1px solid var(--line);
  text-align: start;
  vertical-align: top;
}

th {
  color: #cfe5f5;
  background: rgba(119, 209, 255, 0.07);
  font-size: 0.76rem;
  font-weight: 820;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

tbody tr:last-child > * {
  border-block-end: 0;
}

tbody tr:hover {
  background: rgba(119, 209, 255, 0.04);
}

.facts-table th[scope="row"],
.fact-table th[scope="row"] {
  width: 33%;
  color: var(--muted);
  background: transparent;
}

/* Breadcrumb and editorial layouts */

.breadcrumb,
.breadcrumbs,
nav[aria-label="Breadcrumb"] {
  padding-block: 1rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.breadcrumb ol,
.breadcrumbs ol,
nav[aria-label="Breadcrumb"] ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.breadcrumb li,
.breadcrumbs li,
nav[aria-label="Breadcrumb"] li {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.breadcrumb li + li::before,
.breadcrumbs li + li::before,
nav[aria-label="Breadcrumb"] li + li::before {
  margin-inline: 0.35rem 0.7rem;
  color: var(--gold);
  content: "›";
}

.breadcrumb a,
.breadcrumbs a,
nav[aria-label="Breadcrumb"] a {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  color: #c9d9e8;
}

.content-layout,
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 18rem);
  align-items: start;
  gap: clamp(2rem, 6vw, 5rem);
}

.content-layout > *,
.article-layout > * {
  min-width: 0;
}

.article-body {
  width: 100%;
}

.article-body h2 {
  padding-block-start: 0.4rem;
}

.article-body h2::after {
  display: block;
  width: 3.5rem;
  height: 2px;
  margin-block-start: 0.65rem;
  content: "";
  background: var(--gold);
}

.article-body blockquote {
  padding: 0.9rem 1.15rem;
  color: #dce8f4;
  border-inline-start: 3px solid var(--gold);
  background: rgba(231, 193, 113, 0.07);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(16rem, 0.9fr);
  align-items: start;
  gap: clamp(1.5rem, 5vw, 4rem);
}

.split-section > * {
  min-width: 0;
}

.content-aside,
.article-aside,
aside[aria-label*="contents" i] {
  position: sticky;
  inset-block-start: 6.5rem;
}

.toc,
.table-of-contents,
aside[aria-label*="contents" i] {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(11, 20, 40, 0.84);
}

.toc-title,
.table-of-contents > h2,
.table-of-contents > h3,
aside[aria-label*="contents" i] > h2 {
  margin: 0 0 0.55rem;
  color: var(--gold-soft);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.toc ul,
.table-of-contents ul,
aside[aria-label*="contents" i] ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.toc li,
.table-of-contents li,
aside[aria-label*="contents" i] li {
  margin: 0;
}

.toc a,
.table-of-contents a,
aside[aria-label*="contents" i] a {
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  padding: 0.45rem 0.65rem;
  color: #cddbea;
  border-inline-start: 2px solid transparent;
  text-decoration: none;
}

.toc a:hover,
.toc a[aria-current="true"],
.table-of-contents a:hover,
.table-of-contents a[aria-current="true"],
aside[aria-label*="contents" i] a:hover {
  color: var(--ink-strong);
  border-inline-start-color: var(--sky);
  background: rgba(119, 209, 255, 0.07);
}

/* Steps and callouts */

.steps,
.step-list {
  padding: 0;
  margin-block: 1.5rem;
  list-style: none;
  counter-reset: guide-step;
}

.steps > li,
.step-list > li {
  position: relative;
  min-height: 4rem;
  padding: 0.15rem 0 1.5rem 4rem;
  margin: 0;
  counter-increment: guide-step;
}

.steps > li::before,
.step-list > li::before {
  position: absolute;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  inset-block-start: 0;
  inset-inline-start: 0;
  place-items: center;
  color: var(--ink-dark);
  border-radius: 50%;
  background: var(--sky);
  content: counter(guide-step);
  font-weight: 900;
  box-shadow: 0 0 0 0.35rem rgba(119, 209, 255, 0.08);
}

.step-list > li:has(> .step-number)::before {
  content: none;
}

.step-number {
  position: absolute;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  inset-block-start: 0;
  inset-inline-start: 0;
  place-items: center;
  color: var(--ink-dark);
  border-radius: 50%;
  background: var(--sky);
  font-weight: 900;
  box-shadow: 0 0 0 0.35rem rgba(119, 209, 255, 0.08);
}

.steps > li:not(:last-child)::after,
.step-list > li:not(:last-child)::after {
  position: absolute;
  width: 1px;
  inset-block: 3.15rem 0.4rem;
  inset-inline-start: 1.35rem;
  content: "";
  background: var(--line-strong);
}

.steps h3,
.step-list h3 {
  margin: 0 0 0.35rem;
}

.callout,
.note,
.notice,
.disclosure,
.editorial-note {
  position: relative;
  padding: 1rem 1.15rem 1rem 1.35rem;
  margin-block: 1.5rem;
  color: #dce8f5;
  border: 1px solid rgba(119, 209, 255, 0.28);
  border-inline-start: 4px solid var(--sky);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: rgba(119, 209, 255, 0.075);
}

.callout > :last-child,
.note > :last-child,
.notice > :last-child,
.disclosure > :last-child,
.editorial-note > :last-child {
  margin-block-end: 0;
}

.callout-title,
.note-title,
.notice-title,
.disclosure-title {
  margin-block-end: 0.3rem;
  color: var(--ink-strong);
  font-weight: 850;
}

.callout--warning,
.callout.warning,
.note--warning {
  border-color: rgba(242, 202, 120, 0.35);
  border-inline-start-color: var(--warning);
  background: rgba(242, 202, 120, 0.08);
}

.callout--official,
.callout.official {
  border-color: rgba(114, 223, 177, 0.34);
  border-inline-start-color: var(--success);
  background: rgba(114, 223, 177, 0.075);
}

.source-boundary {
  border-color: rgba(242, 202, 120, 0.35);
  border-inline-start-color: var(--warning);
  background: rgba(242, 202, 120, 0.08);
}

.report-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
  border-color: rgba(231, 193, 113, 0.35);
  border-inline-start-color: var(--gold);
  background: rgba(231, 193, 113, 0.07);
}

.report-notice h2 {
  margin-block-start: 0;
}

.check-list {
  display: grid;
  gap: 0.65rem;
  padding: 0;
  margin: 1rem 0;
  list-style: none;
}

.check-list > li {
  position: relative;
  padding-inline-start: 1.75rem;
  margin: 0;
}

.check-list > li::before {
  position: absolute;
  display: grid;
  width: 1.15rem;
  height: 1.15rem;
  inset-block-start: 0.28rem;
  inset-inline-start: 0;
  place-items: center;
  color: var(--ink-dark);
  border-radius: 50%;
  background: var(--success);
  content: "✓";
  font-size: 0.72rem;
  font-weight: 950;
}

.verification-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-block: 1.25rem 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.status-dot {
  width: 0.52rem;
  height: 0.52rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0.8rem rgba(114, 223, 177, 0.72);
}

.text-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.4rem;
  font-weight: 800;
}

.text-link::after {
  color: var(--gold);
  content: "→";
}

.paper-panel {
  padding: clamp(1.25rem, 4vw, 2rem);
  color: var(--ink-dark);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-md);
  background-color: var(--surface-paper);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 1.75rem,
    var(--paper-line) calc(1.75rem + 1px),
    transparent calc(1.75rem + 2px)
  );
  box-shadow: var(--shadow-soft);
}

.paper-panel h2,
.paper-panel h3,
.paper-panel h4 {
  color: var(--ink-dark);
}

.paper-panel a {
  color: #006a9e;
  text-decoration-color: rgba(0, 106, 158, 0.45);
}

/* Sources and attribution */

.sources,
.source-panel,
.source-section,
.sources-section {
  margin-block: 2rem;
  padding: clamp(1.2rem, 3vw, 1.65rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(11, 20, 40, 0.9);
}

.sources > h2,
.source-panel > h2,
.source-section > h2,
.sources-section > h2 {
  margin-block-start: 0;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
}

.source-list {
  display: grid;
  gap: 0.8rem;
  padding: 0;
  margin: 1rem 0 0;
  list-style: none;
}

.source-list > li,
.source-card {
  display: grid;
  min-width: 0;
  gap: 0.45rem;
  padding: 1rem;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(23, 39, 68, 0.54);
}

.source-list a,
.source-card a {
  width: fit-content;
  max-width: 100%;
  font-weight: 760;
}

.source-note,
.source-meta,
.verified-note,
.last-verified,
.version-note {
  color: var(--muted);
  font-size: 0.84rem;
}

.disclosure {
  border-color: rgba(231, 193, 113, 0.35);
  border-inline-start-color: var(--gold);
  background: rgba(231, 193, 113, 0.07);
}

/* FAQ and related guides */

.faq,
.faq-list {
  display: grid;
  gap: 0.75rem;
  margin-block: 1.5rem;
}

.faq-section .section-heading {
  margin-block-end: 1rem;
}

.faq details,
.faq-list details,
details.faq-item {
  overflow: clip;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(16, 29, 53, 0.72);
}

.faq summary,
.faq-list summary,
details.faq-item summary {
  position: relative;
  display: flex;
  min-height: 3.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 3.2rem 0.8rem 1rem;
  color: var(--ink-strong);
  font-weight: 780;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker,
.faq-list summary::-webkit-details-marker,
details.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq summary::after,
.faq-list summary::after,
details.faq-item summary::after {
  position: absolute;
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  inset-inline-end: 0.85rem;
  place-items: center;
  color: var(--sky);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  content: "+";
  font-size: 1.15rem;
  line-height: 1;
}

.faq details[open] summary::after,
.faq-list details[open] summary::after,
details.faq-item[open] summary::after {
  content: "−";
}

.faq details[open] summary,
.faq-list details[open] summary,
details.faq-item[open] summary {
  border-block-end: 1px solid var(--line);
  background: rgba(119, 209, 255, 0.055);
}

.faq details > :not(summary),
.faq-list details > :not(summary),
details.faq-item > :not(summary) {
  margin-inline: 1rem;
}

.faq details > :last-child,
.faq-list details > :last-child,
details.faq-item > :last-child {
  margin-block-end: 1rem;
}

.related-links {
  padding-block: clamp(2rem, 6vw, 4rem);
  border-block-start: 1px solid var(--line);
}

.related-links h2 {
  margin-block-start: 0;
}

.related-links ul:not(.related-grid) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0;
  list-style: none;
}

.related-links li {
  margin: 0;
}

.related-links li > a {
  display: flex;
  min-height: 3.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(16, 29, 53, 0.58);
  font-weight: 760;
  text-decoration: none;
}

.related-links li > a::after {
  color: var(--gold);
  content: "↗";
}

.related-links li > a:hover {
  border-color: rgba(119, 209, 255, 0.45);
  background: rgba(23, 39, 68, 0.78);
}

/* Footer and 404 */

.site-footer,
body > footer {
  padding-block: 2.5rem;
  color: var(--muted);
  border-block-start: 1px solid var(--line);
  background: #050a15;
  font-size: 0.86rem;
}

.footer-inner,
.footer-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(14rem, 0.8fr);
  align-items: start;
  gap: 2rem;
}

.footer-brand {
  max-width: 38rem;
}

.footer-nav ul,
nav[aria-label="Footer"] ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.footer-nav li,
nav[aria-label="Footer"] li {
  margin: 0;
}

.footer-nav a,
nav[aria-label="Footer"] a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  color: #d4dfeb;
}

.site-footer nav,
body > footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1rem;
}

.site-footer nav > a,
body > footer nav > a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  color: #d4dfeb;
}

.legal,
.footer-note {
  margin-block-start: 1rem;
  color: #93a5ba;
  font-size: 0.78rem;
}

.error-page,
.not-found,
.page-404 {
  display: grid;
  min-height: calc(100vh - 12rem);
  place-items: center;
  padding-block: 4rem;
  text-align: center;
}

.error-content,
.not-found-content {
  width: min(100%, 42rem);
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(16, 29, 53, 0.76);
  box-shadow: var(--shadow-lift);
}

.error-code,
.not-found-code {
  display: block;
  margin-block-end: 0.25rem;
  color: var(--sky);
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 12vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.9;
  text-shadow: 0 0 2rem rgba(49, 185, 255, 0.28);
}

.error-content h1,
.not-found-content h1 {
  max-width: none;
  font-size: clamp(2rem, 5vw, 3.25rem);
}

.error-content .actions,
.not-found-content .actions {
  justify-content: center;
}

/* Small utilities */

.stack > * {
  margin-block: 0;
}

.stack > * + * {
  margin-block-start: var(--stack-space, 1rem);
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--cluster-space, 0.75rem);
}

.muted {
  color: var(--muted);
}

.text-center {
  text-align: center;
}

.measure {
  max-width: var(--reading);
}

[hidden] {
  display: none !important;
}

/* Responsive */

@media (max-width: 60rem) {
  .hero,
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.7fr);
    gap: 2rem;
  }

  .hero-art,
  .motif-panel {
    min-height: 19rem;
  }

  .card-grid,
  .guide-grid,
  .status-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-grid.three-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .content-layout,
  .article-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .content-aside,
  .article-aside,
  aside[aria-label*="contents" i] {
    position: static;
    grid-row: 1;
  }

  .toc ul,
  .table-of-contents ul,
  aside[aria-label*="contents" i] ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.15rem 0.75rem;
  }
}

@media (max-width: 42.5rem) {
  :root {
    --reading: 100%;
  }

  html {
    scroll-padding-top: 9rem;
  }

  .container,
  .site-shell,
  .page-shell,
  .header-inner,
  .nav-shell,
  .footer-inner,
  .footer-shell {
    width: min(100% - 1.25rem, var(--page));
  }

  .header-inner,
  .nav-shell {
    min-height: 4.25rem;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    padding-block: 0.45rem 0.35rem;
  }

  .brand-copy small,
  .brand-text small,
  .brand > span small,
  .site-brand > span small {
    display: none;
  }

  .site-nav,
  .primary-nav,
  nav[aria-label^="Primary"] {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .site-nav ul,
  .primary-nav ul,
  nav[aria-label^="Primary"] ul {
    width: max-content;
    min-width: 100%;
  }

  .site-nav a,
  .primary-nav a,
  nav[aria-label^="Primary"] a {
    padding-inline: 0.72rem;
  }

  .hero {
    padding-block: 3rem;
  }

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

  .hero-art,
  .motif-panel {
    min-height: 16rem;
  }

  .card-grid,
  .guide-grid,
  .status-grid,
  .related-grid,
  .related-links ul:not(.related-grid),
  .footer-inner,
  .footer-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .card-grid.three-up {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .fact-item:nth-child(odd),
  .fact-item:nth-child(even) {
    padding-inline: 0;
    border-inline-end: 0;
  }

  .report-notice {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-nav ul,
  nav[aria-label="Footer"] ul,
  .site-footer nav,
  body > footer nav {
    justify-content: flex-start;
  }

  .meta-row > * + *::before,
  .page-meta > * + *::before,
  .article-meta > * + *::before {
    display: none;
  }

  .table-wrap,
  .table-scroll,
  .facts-table-wrap {
    width: calc(100vw - 1.25rem);
    margin-inline: calc((100vw - min(100vw - 1.25rem, var(--page))) / -2);
    border-inline: 0;
    border-radius: 0;
  }

  main table:not(.facts-table):not(.fact-table) {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .toc ul,
  .table-of-contents ul,
  aside[aria-label*="contents" i] ul {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps > li,
  .step-list > li {
    padding-inline-start: 3.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  :root {
    color-scheme: light;
  }

  body {
    color: #111827;
    background: #fff;
    font-size: 11pt;
  }

  body::before,
  .site-header,
  body > header,
  .site-footer,
  body > footer,
  .hero-art,
  .hero-panel,
  .motif-panel,
  .site-nav,
  .primary-nav,
  nav[aria-label^="Primary"],
  .toc,
  .table-of-contents,
  aside[aria-label*="contents" i],
  .skip-link,
  .button-row,
  .hero-actions {
    display: none !important;
  }

  .container,
  .site-shell,
  .page-shell,
  .header-inner,
  .nav-shell,
  .footer-inner,
  .footer-shell {
    width: 100%;
  }

  .hero,
  .section,
  .content-section,
  main > section[aria-labelledby],
  .page-main,
  .article-page {
    padding-block: 1rem;
    border: 0;
  }

  .hero,
  .hero-grid,
  .content-layout,
  .article-layout,
  .card-grid,
  .guide-grid,
  .status-grid,
  .related-grid {
    display: block;
  }

  h1,
  h2,
  h3,
  h4,
  .status-card .value,
  .status-value,
  .fact-value {
    color: #111827;
  }

  p,
  li,
  td,
  th,
  .muted,
  .meta-row,
  .page-meta,
  .article-meta,
  .source-note,
  .source-meta {
    color: #243047;
  }

  a {
    color: #075985;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    overflow-wrap: anywhere;
  }

  .card,
  .guide-card,
  .status-card,
  .related-card,
  .link-card,
  .source-principle,
  .sources,
  .source-panel,
  .source-section,
  .callout,
  .note,
  .notice,
  .disclosure,
  .editorial-note,
  details {
    margin-block: 0.75rem;
    color: #111827;
    border: 1px solid #bac3cf;
    background: #fff;
    box-shadow: none;
    break-inside: avoid;
  }

  details > * {
    display: block !important;
  }

  .badge,
  .pill,
  .source-type,
  .source-badge {
    color: #111827;
    border-color: #6b7280;
    background: #fff;
  }

  .table-wrap,
  .table-scroll,
  .facts-table-wrap {
    overflow: visible;
    border-color: #bac3cf;
    background: #fff;
  }

  table,
  .facts-table,
  .fact-table {
    min-width: 0;
    color: #111827;
  }

  th,
  td {
    border-color: #bac3cf;
  }

  th {
    color: #111827;
    background: #eef2f7;
  }
}
