:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #607087;
  --paper: #fffdf9;
  --canvas: #f4f6fb;
  --line: #dce3ed;
  --brand: #243e8e;
  --accent: #f0b34f;
  --shadow: 0 18px 55px rgba(30, 47, 77, 0.1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.65;
}

.update-banner {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .8rem;
  padding: .55rem 1rem;
  background: #17245f;
  color: white;
  font-size: .86rem;
  font-weight: 700;
}

.update-banner button {
  border: 1px solid rgba(255,255,255,.7);
  border-radius: .35rem;
  padding: .25rem .55rem;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.welcome-modal[hidden],
.update-banner[hidden] { display: none; }

.welcome-modal {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.welcome-modal__backdrop { position: absolute; inset: 0; background: rgba(9, 16, 46, .72); backdrop-filter: blur(5px); }
.welcome-modal__panel { position: relative; width: min(100%, 535px); padding: 2.2rem; border-radius: 1rem; background: var(--paper); box-shadow: 0 24px 70px rgba(0,0,0,.3); }
.welcome-modal__panel .eyebrow { color: #5a67a0; }
.welcome-modal__panel h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.7rem, 5vw, 2.35rem); line-height: 1.15; }
.welcome-modal__panel p:not(.eyebrow) { color: #45536a; }
.mobile-note { padding: .8rem; border-radius: .5rem; background: #fff4d7; }
.welcome-modal__actions { display: flex; flex-wrap: wrap; gap: .65rem; margin: 1rem 0; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 2.7rem; border: 0; border-radius: .5rem; padding: .6rem .9rem; background: var(--brand); color: white; font: inherit; font-size: .9rem; font-weight: 800; text-decoration: none; cursor: pointer; }
.button:hover { color: white; background: #172b77; }
.button--secondary { border: 1px solid #cbd4e2; background: white; color: var(--brand); }
.button--secondary:hover { color: #172b77; background: #f3f6fc; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #101f61; }

.site-header {
  background: radial-gradient(circle at 77% 20%, rgba(98, 126, 219, 0.55), transparent 29%), linear-gradient(125deg, #111d52, #263f96 72%, #385ebd);
  color: white;
}

.header-inner, .content-shell, .contributors, .site-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.header-inner {
  min-height: 250px;
  padding-top: 3.25rem;
  padding-bottom: 2.7rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.brand { max-width: 650px; }
.eyebrow { margin: 0 0 .55rem; color: #d6defb; font-size: .73rem; font-weight: 800; letter-spacing: .14em; }
.brand h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.15rem, 4vw, 3.5rem); line-height: 1.08; letter-spacing: -.035em; }
.brand > p:last-child { max-width: 560px; margin: .85rem 0 0; color: #e6eaff; font-size: 1.04rem; }

.header-actions { width: min(100%, 300px); display: grid; gap: .85rem; }
.star-link { display: flex; justify-content: space-between; align-items: center; color: #161f3f; background: #fff; border-radius: .65rem; padding: .7rem .85rem; font-size: .88rem; font-weight: 800; text-decoration: none; box-shadow: 0 8px 18px rgba(7, 12, 44, .22); }
.star-link:hover { color: #161f3f; background: #fff5d9; }

.guide-picker { display: grid; gap: .35rem; color: #e3e9ff; font-size: .77rem; font-weight: 800; letter-spacing: .05em; }
.guide-picker select { width: 100%; appearance: auto; border: 1px solid rgba(255,255,255,.45); border-radius: .5rem; background: rgba(10, 22, 70, .5); color: white; padding: .72rem; font: inherit; letter-spacing: 0; cursor: pointer; }
.guide-picker option { color: var(--ink); background: white; }

.content-shell { padding-top: 2.2rem; padding-bottom: 2rem; }
.content { background: var(--paper); border: 1px solid var(--line); border-radius: 1rem; box-shadow: var(--shadow); overflow: hidden; }
.document-heading { padding: 2.35rem 2.8rem 1.8rem; border-bottom: 1px solid var(--line); background: linear-gradient(120deg, #fffdf9, #f8f9fe); }
.document-heading .eyebrow { color: #5a67a0; }
.document-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.75rem, 3vw, 2.55rem); line-height: 1.18; letter-spacing: -.025em; }

#doc-content { padding: 2.2rem 2.8rem 3.25rem; overflow-wrap: break-word; font-size: 1rem; }
#doc-content > :first-child { margin-top: 0; }
#doc-content h1, #doc-content h2, #doc-content h3, #doc-content h4 { color: #16245c; line-height: 1.25; margin: 2.4rem 0 .9rem; }
#doc-content h1 { font-family: Georgia, "Times New Roman", serif; font-size: 2rem; }
#doc-content h2 { font-size: 1.48rem; padding-top: .35rem; border-top: 1px solid #e4e8f0; }
#doc-content h3 { font-size: 1.18rem; }
#doc-content p, #doc-content li { max-width: 78ch; }
#doc-content li + li { margin-top: .32rem; }
#doc-content blockquote { margin: 1.4rem 0; padding: .6rem 1rem; border-left: 4px solid var(--accent); color: #3d4960; background: #fff8e9; }
#doc-content pre { overflow: auto; background: #18213a; color: #f8fbff; border-radius: .6rem; padding: 1rem 1.15rem; }
#doc-content code { background: #edf0f8; color: #273b83; border-radius: .22rem; padding: .1rem .28rem; font-size: .9em; }
#doc-content pre code { background: transparent; color: inherit; padding: 0; }
#doc-content table { display: block; width: 100%; overflow-x: auto; border-collapse: separate; border-spacing: 0; margin: 1.35rem 0 1.8rem; border: 1px solid var(--line); border-radius: .55rem; font-size: .91rem; }
#doc-content th, #doc-content td { min-width: 135px; padding: .72rem .82rem; vertical-align: top; text-align: left; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
#doc-content th { background: #e9edfb; color: #1b2c72; font-size: .8rem; font-weight: 800; letter-spacing: .025em; }
#doc-content tr:last-child td { border-bottom: 0; }
#doc-content th:last-child, #doc-content td:last-child { border-right: 0; }
#doc-content tbody tr:nth-child(even) { background: #fafbfe; }

.contributors { margin-bottom: 2.5rem; padding-top: .4rem; }
.contributors h2 { margin: 0; font-size: 1.1rem; }
.hint { margin: .15rem 0 0; color: var(--muted); }
#contributors-list { display: flex; flex-wrap: wrap; gap: .55rem; list-style: none; margin: .8rem 0 0; padding: 0; }
#contributors-list a { display: flex; align-items: center; gap: .45rem; border: 1px solid var(--line); background: rgba(255,255,255,.6); border-radius: 999px; padding: .28rem .6rem .28rem .3rem; text-decoration: none; font-size: .85rem; }
#contributors-list img { width: 26px; height: 26px; border-radius: 50%; }

.site-footer { display: flex; justify-content: space-between; gap: 1rem; padding-top: 1.35rem; padding-bottom: 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }

@media (max-width: 720px) {
  .header-inner { min-height: 0; padding-top: 2.5rem; padding-bottom: 2rem; display: grid; }
  .header-actions { width: 100%; }
  .header-inner, .content-shell, .contributors, .site-footer { padding-left: 1rem; padding-right: 1rem; }
  .document-heading, #doc-content { padding-left: 1.2rem; padding-right: 1.2rem; }
  #doc-content { font-size: .96rem; }
  .site-footer { display: grid; }
  .welcome-modal__panel { padding: 1.5rem; }
  .update-banner { align-items: flex-start; text-align: left; }
}
