:root {
  --bg-deep: #0b090d;
  --bg-panel: #15111a;
  --bg-panel-2: #1f1927;
  --border-gold: #c9973e;
  --border-subtle: #332a3e;
  --text-main: #f4efe6;
  --text-dim: #b4a9be;
  --accent-gold: #f5b942;
  --accent-cyan: #5bc8f5;
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

/* Fluid root size: exactly 16px at the 1280px-wide reference viewport (e.g. a 4K TV at 300% scaling) and below,
   scaling every rem-based size up proportionally on larger viewports (bound by width or height, so the whole
   layout keeps the reference proportions). */
html {
  font-size: max(16px, min(1.25vw, 2.6vh));
  overflow-y: auto;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--text-main);
  line-height: 1.6;
  background:
    radial-gradient(circle at 50% 0%, rgba(168, 42, 42, 0.16), transparent 55%),
    radial-gradient(circle at 80% 100%, rgba(201, 151, 62, 0.1), transparent 45%),
    var(--bg-deep);
}

.container {
  max-width: 57.5rem;
  margin: 0 auto;
  padding: 1.125rem 1.25rem 4rem;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.875rem;
  margin-bottom: 1.75rem;
  border-bottom: 0.0625rem solid var(--border-subtle);
  flex-wrap: wrap;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.brand-seal {
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 0.375rem;
  background: linear-gradient(145deg, #c92b2b, #871616);
  border: 0.125rem solid var(--accent-gold);
  display: grid;
  place-items: center;
  font-size: 1.1875rem;
  font-weight: 800;
  color: #fff3d6;
  text-decoration: none;
  box-shadow: 0 0.125rem 0.625rem rgba(224, 60, 60, 0.35);
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-heading {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: 0.12em;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1.1;
}

.brand-heading a {
  color: inherit;
  text-decoration: none;
}

.brand-sub {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--text-dim);
}

.version-badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.125rem 0.4375rem;
  border-radius: 0.3125rem;
  background: rgba(245, 185, 66, 0.14);
  color: var(--accent-gold);
  border: 0.0625rem solid rgba(201, 151, 62, 0.45);
  text-decoration: none;
  line-height: 1.3;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.375rem 0.75rem;
  border-radius: 0.4375rem;
  background: var(--bg-panel-2);
  border: 0.0625rem solid var(--border-subtle);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
  border-color: var(--border-gold);
  color: var(--accent-gold);
}

.page-header {
  margin-bottom: 1.375rem;
}

.page-header h1 {
  margin: 0 0 0.375rem;
  font-size: 1.7rem;
  letter-spacing: 0.03em;
  color: var(--text-main);
}

.page-subtitle {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.92rem;
}

.tldr-box {
  background: rgba(91, 200, 245, 0.08);
  border: 0.0625rem solid rgba(91, 200, 245, 0.45);
  border-radius: 0.625rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.125rem;
}

.tldr-box strong.tldr-title {
  display: block;
  margin-bottom: 0.375rem;
  color: var(--accent-cyan);
  font-size: 0.96rem;
}

.tldr-box p {
  margin: 0;
  font-size: 0.92rem;
  color: #e4ddd1;
}

.entry {
  background: var(--bg-panel);
  border: 0.0625rem solid var(--border-subtle);
  border-radius: 0.625rem;
  padding: 1.125rem 1.375rem;
  margin-bottom: 1rem;
}

.entry h2 {
  margin: 0 0 0.625rem;
  font-size: 1.1rem;
  color: var(--accent-gold);
}

.entry p {
  margin: 0.375rem 0;
  font-size: 0.92rem;
  color: #e4ddd1;
}

.entry ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.92rem;
  color: #e4ddd1;
}

.entry li {
  margin-bottom: 0.375rem;
}

a {
  color: var(--accent-cyan);
  text-decoration: underline;
}

a:hover {
  opacity: 0.85;
}

code {
  font-family: var(--mono);
  font-size: 0.82rem;
  padding: 0.0625rem 0.3125rem;
  border-radius: 0.25rem;
  background: #271f31;
  border: 0.0625rem solid #4c3e5e;
  color: #fff3d6;
}

footer {
  margin-top: 1.75rem;
  padding-top: 0.875rem;
  border-top: 0.0625rem solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.625rem;
  font-size: 0.84rem;
  color: var(--text-dim);
}
