@font-face {
  font-family: "Roboto";
  src: url("/assets/brand/roboto-regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("/assets/brand/roboto-bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --navy: #0e2a50;
  --navy-deep: #071a32;
  --electric: #1f02e9;
  --white: #ffffff;
  --mist: #f2f5fa;
  --muted: rgba(255, 255, 255, 0.64);
  --line: rgba(255, 255, 255, 0.14);
  --display: Helvetica, "Helvetica Neue", Arial, sans-serif;
  --sans: "Roboto", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--navy-deep);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--white);
  background:
    radial-gradient(circle at 84% 2%, rgba(31, 2, 233, 0.36), transparent 27%),
    radial-gradient(circle at 10% 58%, rgba(31, 2, 233, 0.14), transparent 24%),
    linear-gradient(155deg, #06172c, var(--navy) 56%, #071a32);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 54px 54px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: -80px;
  left: 12px;
  padding: 12px 18px;
  color: var(--navy);
  background: var(--white);
}

.skip-link:focus {
  top: 12px;
}

button,
input {
  font: inherit;
}

.library-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(20px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 20, 40, 0.82);
  backdrop-filter: blur(20px);
}

.library-header img {
  width: clamp(98px, 9vw, 138px);
  height: 52px;
  object-fit: contain;
}

.library-header span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2.2px;
  text-transform: uppercase;
}

.library-main {
  width: min(1440px, 100%);
  margin: auto;
  padding: clamp(58px, 8vw, 112px) clamp(20px, 4vw, 64px) 90px;
}

.library-hero {
  max-width: 970px;
  margin-bottom: clamp(42px, 6vw, 82px);
}

.library-eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 18px;
  color: #a89cf7;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.7px;
  text-transform: uppercase;
}

.library-eyebrow::before {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background: url("/assets/brand/star-electric-blue.svg") center / contain no-repeat;
  content: "";
}

.library-hero h1 {
  max-width: 900px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(46px, 7vw, 104px);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.library-hero h1 em {
  color: #b3a8ff;
  font-style: normal;
}

.library-hero-copy {
  max-width: 720px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.5vw, 20px);
  line-height: 1.65;
}

.library-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.library-stats span {
  padding: 10px 13px;
  border: 1px solid var(--line);
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.04);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.library-section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.library-section-header h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(28px, 3.4vw, 48px);
  font-weight: 400;
}

.library-section-header span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.deck-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 28px);
}

.deck-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #081a31;
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.deck-card:hover,
.deck-card:focus-within {
  border-color: rgba(169, 156, 255, 0.72);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.3);
  transform: translateY(-3px);
}

.deck-card-link {
  height: 100%;
  display: flex;
  flex-direction: column;
  color: inherit;
  background: rgba(255, 255, 255, 0.025);
}

.deck-card-link:focus-visible {
  outline: 3px solid #a99cff;
  outline-offset: -3px;
}

.deck-card-preview {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #061421;
}

.deck-card-media {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.deck-card-link:hover .deck-card-media,
.deck-card-link:focus-visible .deck-card-media {
  transform: scale(1.025);
}

.deck-card-number {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 34px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: var(--white);
  background: rgba(4, 15, 29, 0.78);
  backdrop-filter: blur(10px);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
}

.deck-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(20px, 2.2vw, 30px);
}

.deck-card-topline {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}

.deck-card-topline b {
  color: #c0b8ff;
}

.deck-card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(26px, 2.3vw, 38px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.deck-card-meta {
  margin: 13px 0 24px;
  color: rgba(255, 255, 255, 0.67);
  font-size: 10px;
  line-height: 1.55;
}

.deck-card-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #bcb3ff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.deck-card-link:hover .deck-card-cta,
.deck-card-link:focus-visible .deck-card-cta {
  color: var(--white);
}

.library-loading,
.library-noscript {
  grid-column: 1 / -1;
  margin: 0;
  padding: 28px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  line-height: 1.6;
}

.library-footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 32px clamp(20px, 4vw, 64px);
  border-top: 1px solid var(--line);
  color: rgba(255, 255, 255, 0.45);
  background: rgba(5, 20, 40, 0.68);
  font-size: 10px;
  line-height: 1.6;
}

.access-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.access-panel {
  width: min(560px, 100%);
  padding: clamp(30px, 6vw, 64px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(5, 20, 40, 0.84);
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(22px);
}

.access-logo {
  width: 130px;
  margin-bottom: 50px;
}

.access-panel h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(42px, 8vw, 72px);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.access-copy {
  margin: 20px 0 34px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.access-form label {
  display: block;
  margin-bottom: 9px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.access-field {
  display: grid;
  grid-template-columns: 1fr auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
}

.access-field input {
  min-width: 0;
  height: 58px;
  padding: 0 18px;
  border: 0;
  outline: 0;
  color: var(--white);
  background: transparent;
  font-size: 16px;
}

.access-field:focus-within {
  border-color: #9e91ff;
  box-shadow: 0 0 0 3px rgba(31, 2, 233, 0.18);
}

.access-field button {
  min-width: 128px;
  border: 0;
  color: var(--white);
  background: var(--electric);
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.access-field button:disabled {
  opacity: 0.62;
  cursor: wait;
}

.access-status {
  min-height: 22px;
  margin: 12px 0 0;
  color: #ffb8bd;
  font-size: 12px;
  line-height: 1.5;
}

.access-note {
  margin: 36px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  line-height: 1.6;
}

@media (max-width: 1100px) {
  .deck-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .deck-grid {
    grid-template-columns: 1fr;
  }

  .library-header span {
    display: none;
  }

  .library-footer {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .library-main {
    padding-inline: 14px;
  }

  .access-page {
    padding: 14px;
  }

  .access-panel {
    padding-inline: 24px;
  }

  .access-field {
    grid-template-columns: 1fr;
  }

  .access-field button {
    height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Public library: the shared website shell surrounds a compact editorial index.
   Scope these rules so the retained access and internal library pages keep their styling. */
.library-page {
  --library-header-height: 144px;
  padding-top: var(--library-header-height);
  color-scheme: light;
  color: var(--brand-navy, #0e2a50);
  background: #f4f5f3;
}
.library-page::before { content: none; }
.library-page > .content-site-header {
  position: fixed;
  background: #071a32;
}
.library-page [hidden] { display: none !important; }
.library-page .library-main {
  width: min(1440px, 100%);
  padding: 44px clamp(20px, 4vw, 64px) 72px;
}
.library-page .library-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 24px 48px;
  max-width: none;
  margin-bottom: 36px;
}
.library-page .library-eyebrow {
  margin-bottom: 14px;
  color: #465773;
  font-size: 11px;
  letter-spacing: .15em;
}
.library-page .library-hero h1 {
  color: #0e2a50;
  font-size: clamp(36px, 4.2vw, 58px);
  line-height: 1.1;
  letter-spacing: -.045em;
}
.library-page .library-hero-copy {
  max-width: 680px;
  margin: 16px 0 0;
  color: #4e5e72;
  font-size: 16px;
  line-height: 1.6;
}
.library-page .library-advisor-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  max-width: 100%;
  min-height: 48px;
  margin-top: 24px;
  padding: 14px 22px;
  border: 1px solid #1f02e9;
  background: #1f02e9;
  color: #fff;
  font: 700 14px/1.4 var(--sans);
  text-align: center;
}
.library-page .library-advisor-link:hover { background: #1801b5; }
.library-page .library-advisor-link:focus-visible { outline: 3px solid #1f02e9; outline-offset: 4px; }
.library-page .library-stats {
  grid-column: 1 / -1;
  gap: 24px;
  margin: 0;
}
.library-page .library-stats span {
  padding: 0;
  border: 0;
  background: none;
  color: #59687b;
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.library-page .library-stats b { color: #0e2a50; }
.library-page #presentation-library,
.library-page main :is(a, button, input, select) {
  scroll-margin-top: calc(var(--library-header-height) + 20px);
}
.library-page .library-section-header {
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-color: #cbd2d9;
}
.library-page .library-section-header h2 { font-size: clamp(25px, 2.5vw, 32px); }
.library-page .library-section-header a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 700;
}
.library-page .library-filters {
  display: grid;
  grid-template-columns: minmax(200px, 1.8fr) minmax(125px, .6fr) minmax(150px, .8fr) auto;
  align-items: end;
  gap: 16px;
}
.library-page .library-filters > div { min-width: 0; }
.library-page .library-filters label {
  display: block;
  margin-bottom: 7px;
  color: #3d4e66;
  font-size: 12px;
  font-weight: 700;
}
.library-page .library-filters input,
.library-page .library-filters select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #aeb9c6;
  border-radius: 0;
  color: #0e2a50;
  background: #fff;
  font-family: var(--sans);
  font-size: 16px;
}
.library-page .library-filters input::placeholder { color: #68788b; opacity: 1; }
.library-page .library-reset {
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid #aeb9c6;
  background: transparent;
  color: #0e2a50;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.library-page .library-reset:hover:not(:disabled) { background: #e5eaf0; }
.library-page .library-reset:disabled { color: #64748a; border-color: #d0d6de; cursor: default; }
.library-page .library-results-summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin: 18px 0;
  color: #526277;
  font-size: 12px;
  line-height: 1.5;
}
.library-page .library-results-summary p { margin: 0; overflow-wrap: anywhere; }
.library-page .library-results-summary > span { flex-shrink: 0; }
.library-page .library-fallback-note {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-left: 3px solid #7b8a9d;
  background: #e8edf2;
  color: #3d4e66;
  font-size: 14px;
  line-height: 1.6;
}
.library-page .library-fallback-note a { text-decoration: underline; }
.library-page .deck-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.library-page .deck-card {
  display: grid;
  grid-template-columns: minmax(100px, 30%) minmax(0, 1fr);
  align-content: start;
  gap: 14px 20px;
  padding: 20px;
  border: 1px solid #ced6df;
  color: #0e2a50;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.library-page .deck-card:hover,
.library-page .deck-card:focus-within {
  border-color: #7588a2;
  box-shadow: 0 4px 14px rgba(14, 42, 80, .06);
  transform: none;
}
.library-page .deck-card-preview {
  align-self: start;
  width: 100%;
  margin-top: 2px;
  aspect-ratio: 16 / 9;
  border: 1px solid #e3e7ec;
  background: #0e2a50;
}
.library-page .deck-card-media { object-fit: contain; transition: none; }
.library-page .deck-card-content { display: block; min-width: 0; padding: 0; }
.library-page .deck-card-topline {
  flex-wrap: wrap;
  gap: 3px 12px;
  margin: 0 0 9px;
  color: #5b6a7d;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .035em;
  text-transform: none;
}
.library-page .deck-card-topline b { color: #4d6382; }
.library-page .deck-card h3 {
  color: #0e2a50;
  font-family: var(--sans);
  font-size: clamp(18px, 1.4vw, 21px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
.library-page .deck-card-date {
  margin: 12px 0 6px;
  color: #334a68;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}
.library-page .deck-card-location {
  margin: 0;
  color: #506279;
  font-size: 13px;
  line-height: 1.5;
}
.library-page .deck-card-location span { display: block; color: #697789; font-size: 12px; }
.library-page .deck-card-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
  padding-top: 12px;
  border-top: 1px solid #e2e7ed;
}
.library-page .deck-card-actions a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: #26456d;
  font-size: 12px;
  font-weight: 700;
  text-underline-offset: 4px;
}
.library-page .deck-card-actions a:hover { text-decoration: underline; }
.library-page .deck-card-actions .deck-presentation-link {
  padding: 8px 12px;
  background: #0e2a50;
  color: #fff;
}
.library-page .deck-card-actions .deck-presentation-link:hover { background: #193d6b; }
.library-page .library-empty {
  padding: 32px;
  border: 1px solid #cbd2d9;
  background: #fff;
  color: #526277;
  line-height: 1.6;
}
.library-page .library-empty h3 { margin: 0; color: #0e2a50; font-size: 23px; }
.library-page .library-empty a { display: inline-block; margin: 12px; color: #26456d; text-decoration: underline; }
.library-page .library-fallback-navigation { display: flex; flex-wrap: wrap; gap: 20px; padding: 20px; }
.library-page :is(a, button, input, select):focus-visible {
  outline: 3px solid #6346dc;
  outline-offset: 3px;
}
@media (max-width: 1050px) {
  .library-page .deck-grid { grid-template-columns: 1fr; }
  .library-page .deck-card { grid-template-columns: minmax(140px, 22%) minmax(0, 1fr); }
  .library-page .deck-card-actions { grid-column: 2; }
  .library-page .deck-card-preview { grid-row: 1 / 3; }
}
@media (max-width: 980px) {
  .library-page { --library-header-height: 84px; }
}
@media (max-width: 700px) {
  .library-page { --library-header-height: 72px; }
}
@media (max-width: 760px) {
  .library-page .library-main { padding-top: 30px; }
  .library-page .library-hero { grid-template-columns: 1fr; gap: 18px; margin-bottom: 30px; }
  .library-page .library-filters { grid-template-columns: 1fr 1fr; gap: 14px; }
  .library-page .library-search-field { grid-column: 1 / -1; }
  .library-page .library-filters .library-reset { grid-column: 1 / -1; justify-self: start; }
  .library-page .deck-card { grid-template-columns: 110px minmax(0, 1fr); gap: 14px; padding: 16px; }
  .library-page .deck-card-preview { grid-row: auto; }
  .library-page .deck-card-actions { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .library-page .library-main { padding-inline: 16px; }
  .library-page .library-section-header { align-items: start; flex-direction: column; gap: 2px; }
  .library-page .library-results-summary { align-items: start; flex-direction: column; gap: 3px; }
  .library-page .deck-card { grid-template-columns: 82px minmax(0, 1fr); padding: 14px; gap: 12px; }
  .library-page .deck-card h3 { font-size: 18px; }
  .library-page .deck-card-date { grid-column: 1 / -1; font-size: 12px; }
  .library-page .deck-card-actions { gap: 5px 16px; }
  .library-page .deck-card-actions a { font-size: 12px; }
}
