:root {
  color-scheme: light;
  --ink-950: #071a2d;
  --ink-900: #0d2740;
  --ink-800: #173d5c;
  --ink: #183047;
  --muted: #526476;
  --muted-strong: #3f5367;
  --paper: #ffffff;
  --paper-blue: #f4f7fb;
  --canvas: #eaf0f5;
  --line: #ced9e3;
  --line-strong: #aebdca;
  --cobalt: #2d5bff;
  --cobalt-dark: #2144c7;
  --cyan: #4ed5d1;
  --teal: #22a49b;
  --teal-dark: #08766f;
  --saffron: #f5b841;
  --saffron-dark: #765307;
  --coral: #f26b5e;
  --coral-dark: #a93d34;
  --violet: #7956d9;
  --focus: #1f55ff;
  --shadow-sm: 0 12px 30px rgba(7, 26, 45, 0.08);
  --shadow-lg: 0 30px 80px rgba(7, 26, 45, 0.18);
  --radius-xl: 1.8rem;
  --radius-lg: 1.25rem;
  --radius-md: 0.85rem;
  --max-width: 82rem;
  font-family: "Manrope", Aptos, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
}

body {
  min-width: 20rem;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  text-rendering: optimizeLegibility;
}

body.dialog-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

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

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

.skip-link {
  position: fixed;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 100;
  transform: translateY(-150%);
  padding: 0.75rem 1rem;
  border-radius: 0.7rem;
  color: white;
  background: var(--cobalt);
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease;
}

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

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px white;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 5.4rem;
  padding: 0.85rem max(1.25rem, calc((100vw - var(--max-width)) / 2));
  color: white;
  background: rgba(7, 26, 45, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px) saturate(130%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(3, 0.26rem);
  align-items: end;
  gap: 0.22rem;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 0.72rem;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.brand-mark span {
  display: block;
  border-radius: 1rem 1rem 0.25rem 0.25rem;
  background: var(--saffron);
}

.brand-mark span:nth-child(1) { height: 48%; }
.brand-mark span:nth-child(2) { height: 84%; background: var(--cyan); }
.brand-mark span:nth-child(3) { height: 66%; background: var(--coral); }

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-copy strong {
  color: var(--saffron);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.brand-copy span {
  margin-top: 0.25rem;
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
}

.site-header nav {
  display: flex;
  gap: 0.3rem;
}

.site-header nav a {
  position: relative;
  padding: 0.68rem 0.88rem;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.site-header nav a::after {
  content: "";
  position: absolute;
  right: 0.85rem;
  bottom: 0.42rem;
  left: 0.85rem;
  height: 2px;
  transform: scaleX(0);
  transform-origin: right;
  background: var(--cyan);
  transition: transform 180ms ease;
}

.site-header nav a:hover {
  color: white;
}

.site-header nav a:hover::after,
.site-header nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(21rem, 0.95fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6.5rem);
  width: 100%;
  min-height: min(48rem, calc(100vh - 5.4rem));
  padding: clamp(4.2rem, 8vw, 7.8rem) max(1.25rem, calc((100vw - var(--max-width)) / 2));
  overflow: hidden;
  color: white;
  background: var(--ink-950);
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  opacity: 0.3;
  background-image:
    linear-gradient(rgba(120, 171, 215, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 171, 215, 0.18) 1px, transparent 1px);
  background-size: 3.5rem 3.5rem;
  mask-image: linear-gradient(90deg, black, transparent 76%);
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -16rem;
  right: -12rem;
  width: 50rem;
  height: 50rem;
  border: 8rem solid rgba(45, 91, 255, 0.17);
  border-radius: 50%;
  box-shadow:
    0 0 0 5rem rgba(78, 213, 209, 0.07),
    inset 0 0 0 4rem rgba(245, 184, 65, 0.035);
}

.hero-copy,
.featured-card {
  position: relative;
  z-index: 2;
}

.hero-copy {
  animation: hero-copy-in 700ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.hero-topics {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
}

.hero-topics span {
  position: absolute;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.72rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.hero-topics span:nth-child(1) { top: 12%; left: 48%; }
.hero-topics span:nth-child(2) { top: 22%; right: 4%; }
.hero-topics span:nth-child(3) { right: 43%; bottom: 9%; }
.hero-topics span:nth-child(4) { right: 3%; bottom: 17%; }

.eyebrow,
.section-index {
  margin: 0 0 1rem;
  color: var(--cobalt-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.015em;
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1.4rem;
  color: rgba(255, 255, 255, 0.72);
}

.eyebrow span {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.eyebrow span + span::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  transform: rotate(45deg);
  background: var(--saffron);
}

.hero h1 {
  max-width: 11ch;
  margin: 0;
  font-family: "Manrope", Aptos, "Segoe UI", sans-serif;
  font-size: clamp(3.8rem, 7.1vw, 7rem);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero-intro {
  max-width: 38rem;
  margin: 1.7rem 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: clamp(1.02rem, 1.55vw, 1.18rem);
  line-height: 1.72;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 3.25rem;
  margin-top: 2rem;
  padding: 0.45rem 0.55rem 0.45rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.07);
  font-weight: 800;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.hero-cta span {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  color: var(--ink-950);
  background: var(--saffron);
  transition: transform 180ms ease;
}

.hero-cta:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
}

.hero-cta:hover span {
  transform: translateY(2px);
}

.featured-card {
  width: min(100%, 34rem);
  justify-self: end;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: var(--radius-xl);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.34);
  transform: rotate(1.35deg);
  animation: featured-in 780ms 120ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.featured-card::before,
.featured-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0.65rem;
  border-radius: var(--radius-xl);
  pointer-events: none;
}

.featured-card::before {
  transform: translate(-1.1rem, 1.15rem) rotate(-4.5deg);
  background: var(--cyan);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.18);
}

.featured-card::after {
  transform: translate(1.2rem, 0.9rem) rotate(3.4deg);
  border: 2px solid var(--saffron);
  background: rgba(245, 184, 65, 0.17);
}

.featured-kicker,
.featured-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.featured-kicker {
  padding: 0.3rem 0.45rem 0.8rem;
  color: var(--muted-strong);
  font-size: 0.75rem;
  font-weight: 700;
}

.featured-kicker span:first-child {
  color: var(--coral-dark);
  font-weight: 800;
}

.featured-preview {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10;
  padding: 0;
  border: 1px solid #d4dce3;
  border-radius: 1.15rem;
  background: #e7edf2;
  cursor: pointer;
}

.featured-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.32) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 600ms ease;
}

.featured-preview:hover::after,
.featured-preview:focus-visible::after {
  transform: translateX(120%);
}

.featured-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 300ms ease;
}

.featured-preview:hover img,
.featured-preview:focus-visible img {
  transform: scale(1.025);
}

.preview-action,
.card-preview-label {
  position: absolute;
  z-index: 2;
  right: 0.85rem;
  bottom: 0.85rem;
  min-height: 2.35rem;
  padding: 0.58rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: white;
  background: rgba(7, 26, 45, 0.92);
  font-size: 0.76rem;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(7, 26, 45, 0.22);
  backdrop-filter: blur(10px);
}

.featured-footer {
  padding: 1rem 0.45rem 0.4rem;
}

.featured-footer h2 {
  margin: 0;
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
  font-size: 1.28rem;
  letter-spacing: -0.025em;
}

.featured-footer p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.featured-number,
.card-number {
  color: rgba(13, 39, 64, 0.16);
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.08em;
}

.library-section {
  padding: clamp(4.5rem, 9vw, 8rem) max(1.25rem, calc((100vw - var(--max-width)) / 2));
  background:
    linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(45, 91, 255, 0.055) calc(50% - 0.5px), rgba(45, 91, 255, 0.055) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    var(--paper-blue);
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr minmax(20rem, 0.62fr);
  align-items: end;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.section-heading h2,
.about-copy h2 {
  max-width: 15ch;
  margin: 0;
  color: var(--ink-950);
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
  font-size: clamp(2.5rem, 4.7vw, 4.5rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.section-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.72;
}

.library-toolbar {
  position: sticky;
  top: 6.15rem;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(17rem, 0.72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem;
  border: 1px solid rgba(160, 177, 191, 0.75);
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 40px rgba(7, 26, 45, 0.1);
  backdrop-filter: blur(18px) saturate(140%);
}

.search-field {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  min-height: 3.35rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: white;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-field:focus-within {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 4px rgba(45, 91, 255, 0.13);
}

.search-field svg {
  flex: 0 0 auto;
  width: 1.18rem;
  fill: none;
  stroke: var(--cobalt-dark);
  stroke-linecap: round;
  stroke-width: 1.9;
}

.search-field input {
  width: 100%;
  min-width: 0;
  padding: 0.35rem 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 0.98rem;
}

.search-field input::placeholder {
  color: #718093;
}

.filters {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.1rem 0.15rem;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.filter-button {
  flex: 0 0 auto;
  min-height: 2.8rem;
  padding: 0.62rem 0.88rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted-strong);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 800;
  scroll-snap-align: start;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.filter-button:hover {
  color: var(--ink-950);
  background: #edf2ff;
}

.filter-button:active {
  transform: scale(0.97);
}

.filter-button[aria-pressed="true"] {
  color: white;
  background: var(--cobalt);
  box-shadow: 0 7px 18px rgba(45, 91, 255, 0.24);
}

.results-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
  padding: 0 0.25rem;
}

.results-row p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

.clear-button {
  min-height: 2.75rem;
  border: 0;
  color: var(--cobalt-dark);
  background: none;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.25rem;
  cursor: pointer;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.guide-card {
  --card-accent: var(--teal);
  --card-accent-text: var(--teal-dark);
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: white;
  box-shadow: var(--shadow-sm);
  animation: card-arrive 420ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
  animation-delay: calc(var(--card-index, 0) * 45ms);
}

.guide-card::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: 0;
  right: 0;
  left: 0;
  height: 0.32rem;
  transform: scaleX(0.24);
  transform-origin: left;
  background: var(--card-accent);
  transition: transform 240ms ease;
}

.accent-blue { --card-accent: #3f6df6; --card-accent-text: #2448b3; }
.accent-gold { --card-accent: var(--saffron); --card-accent-text: var(--saffron-dark); }
.accent-coral { --card-accent: var(--coral); --card-accent-text: var(--coral-dark); }
.accent-teal { --card-accent: var(--teal); --card-accent-text: var(--teal-dark); }

.card-preview {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 1.15rem;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #eef3f7;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--card-accent) 12%, white), #eaf0f5),
    #eef3f7;
  cursor: pointer;
}

.card-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: radial-gradient(rgba(7, 26, 45, 0.18) 0.75px, transparent 0.75px);
  background-size: 10px 10px;
  pointer-events: none;
}

.card-preview img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  border: 1px solid rgba(7, 26, 45, 0.1);
  border-radius: 0.45rem;
  background: white;
  filter: drop-shadow(0 12px 20px rgba(7, 26, 45, 0.16));
  transition: transform 260ms ease, filter 260ms ease;
}

.card-preview-label {
  opacity: 0;
  transform: translateY(0.4rem);
  transition: opacity 180ms ease, transform 180ms ease;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.35rem;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.95rem;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--card-accent-text);
  font-size: 0.74rem;
  font-weight: 800;
}

.category-pill::before {
  content: "";
  width: 0.58rem;
  height: 0.22rem;
  border-radius: 99px;
  background: var(--card-accent);
}

.page-label {
  color: #5d6c7d;
  font-size: 0.74rem;
  font-weight: 700;
}

.card-body h3 {
  margin: 0;
  color: var(--ink-950);
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.card-summary {
  margin: 0.72rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.62;
}

.card-source {
  margin: 0.78rem 0 0;
  color: #5f6e7e;
  font-size: 0.77rem;
  font-weight: 700;
}

.alternate-file {
  align-self: flex-start;
  margin-top: 0.7rem;
  color: var(--cobalt-dark);
  font-size: 0.78rem;
  font-weight: 800;
  text-underline-offset: 0.22rem;
}

.card-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1.35rem;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.68rem 0.95rem;
  border: 0;
  border-radius: 0.75rem;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  color: white;
  background: var(--ink-950);
  box-shadow: 0 8px 20px rgba(7, 26, 45, 0.18);
  transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.button-primary:hover {
  transform: translateY(-2px);
  background: var(--cobalt-dark);
  box-shadow: 0 10px 25px rgba(33, 68, 199, 0.24);
}

.download-link,
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--cobalt-dark);
  font-size: 0.8rem;
  font-weight: 800;
  text-underline-offset: 0.23rem;
}

.empty-state {
  grid-column: 1 / -1;
  padding: clamp(3rem, 8vw, 6rem) 1.5rem;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-xl);
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
}

.empty-state .empty-kicker {
  margin: 0;
  color: var(--coral-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.empty-state h3 {
  margin: 0.55rem 0;
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
  font-size: 1.75rem;
}

.empty-state p:last-child {
  margin: 0;
  color: var(--muted);
}

.no-script-card {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
  padding: 1.1rem;
  border: 1px solid #e4c66c;
  border-radius: 1rem;
  background: #fff8df;
}

.no-script-card p {
  width: 100%;
  margin: 0;
}

.about-section {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 8rem minmax(0, 1.2fr) minmax(18rem, 0.8fr);
  align-items: center;
  gap: clamp(1.8rem, 4vw, 4rem);
  padding: clamp(5rem, 10vw, 8.5rem) max(1.25rem, calc((100vw - var(--max-width)) / 2));
  overflow: hidden;
  color: white;
  background: var(--ink-900);
}

.about-section::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 34rem;
  height: 34rem;
  right: -10rem;
  bottom: -19rem;
  border: 5rem solid rgba(78, 213, 209, 0.1);
  border-radius: 50%;
}

.about-mark {
  display: grid;
  place-items: center;
  width: 8rem;
  height: 8rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 1.7rem 1.7rem 1.7rem 0.35rem;
  color: var(--ink-950);
  background: var(--saffron);
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
  font-size: 4rem;
  font-weight: 800;
  transform: rotate(-4deg);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.about-copy .section-index {
  color: var(--cyan);
}

.about-copy h2 {
  color: white;
}

.about-copy > p:last-child {
  max-width: 44rem;
  margin: 1.35rem 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  line-height: 1.75;
}

.about-section blockquote {
  position: relative;
  margin: 0;
  padding: 1.7rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 1.2rem;
  color: white;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.about-section blockquote::before {
  content: "“";
  position: absolute;
  top: -1.4rem;
  left: 1rem;
  color: var(--cyan);
  font-family: Georgia, serif;
  font-size: 5rem;
  line-height: 1;
}

.about-section blockquote p {
  margin: 0;
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
  font-size: clamp(1.35rem, 2.3vw, 2rem);
  font-weight: 600;
  line-height: 1.35;
}

.note-section {
  padding: 2.4rem max(1.25rem, calc((100vw - var(--max-width)) / 2));
  border-bottom: 1px solid var(--line);
  background: #e3eaf0;
}

.note-section p {
  max-width: 75rem;
  margin: 0;
  color: #526273;
  font-size: 0.82rem;
  line-height: 1.7;
}

.note-section strong {
  color: var(--ink-950);
}

footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  min-height: 8.5rem;
  padding: 1.5rem max(1.25rem, calc((100vw - var(--max-width)) / 2));
  color: white;
  background: #04111e;
}

.footer-brand {
  justify-self: start;
}

footer > p {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
}

footer > p:last-child {
  justify-self: end;
}

.guide-dialog {
  width: min(94vw, 82rem);
  height: min(92vh, 60rem);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 1.5rem;
  color: var(--ink);
  background: white;
  box-shadow: 0 36px 110px rgba(2, 10, 19, 0.58);
}

.guide-dialog::backdrop {
  background: rgba(2, 10, 19, 0.78);
  backdrop-filter: blur(9px);
}

.dialog-header,
.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.dialog-header {
  color: white;
  background: var(--ink-950);
}

.dialog-label {
  margin: 0 0 0.2rem;
  color: var(--cyan);
  font-size: 0.7rem;
  font-weight: 800;
}

.dialog-header h2 {
  margin: 0;
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
  font-size: 1.22rem;
}

.dialog-close {
  display: grid;
  place-items: center;
  width: 2.85rem;
  height: 2.85rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0.8rem;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}

.dialog-viewer {
  height: calc(100% - 9.8rem);
  min-height: 20rem;
  background: #d9e0e6;
}

.dialog-viewer iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.dialog-footer {
  min-height: 4.7rem;
  border-top: 1px solid var(--line);
}

.dialog-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.dialog-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

@keyframes hero-copy-in {
  from { opacity: 0; transform: translateY(1.5rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes featured-in {
  from { opacity: 0; transform: translateX(2rem) rotate(1.35deg); }
  to { opacity: 1; transform: translateX(0) rotate(1.35deg); }
}

@keyframes card-arrive {
  from { opacity: 0; transform: translateY(1rem); }
  to { opacity: 1; transform: translateY(0); }
}

@media (hover: hover) and (pointer: fine) {
  .guide-card {
    transition: transform 210ms ease, box-shadow 210ms ease, border-color 210ms ease;
  }

  .guide-card:hover {
    transform: translateY(-7px) rotate(-0.25deg);
    border-color: color-mix(in srgb, var(--card-accent) 44%, var(--line));
    box-shadow: var(--shadow-lg);
  }

  .guide-card:hover::before {
    transform: scaleX(1);
  }

  .card-preview:hover img,
  .card-preview:focus-visible img {
    transform: translateY(-4px) scale(1.015);
    filter: drop-shadow(0 18px 26px rgba(7, 26, 45, 0.22));
  }

  .card-preview:hover .card-preview-label,
  .card-preview:focus-visible .card-preview-label {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 68rem) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(19rem, 0.8fr);
  }

  .hero h1 {
    font-size: clamp(3.6rem, 8vw, 5.6rem);
  }

  .hero-topics span:nth-child(1),
  .hero-topics span:nth-child(3) {
    display: none;
  }

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

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

  .about-mark {
    width: 6rem;
    height: 6rem;
    font-size: 3rem;
  }

  .about-section blockquote {
    grid-column: 2;
  }
}

@media (max-width: 52rem) {
  .site-header {
    min-height: 4.8rem;
  }

  .site-header nav a {
    padding: 0.58rem;
    font-size: 0.82rem;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 4.5rem;
    padding-bottom: 5.5rem;
  }

  .hero::before {
    mask-image: linear-gradient(180deg, black, transparent 72%);
  }

  .hero::after {
    top: auto;
    right: -25rem;
    bottom: -22rem;
  }

  .hero h1 {
    font-size: clamp(3.5rem, 13vw, 5.2rem);
  }

  .hero-topics span {
    display: none;
  }

  .featured-card {
    width: min(92%, 34rem);
    justify-self: center;
    margin-top: 1.25rem;
    transform: rotate(0.75deg);
  }

  @keyframes featured-in {
    from { opacity: 0; transform: translateY(1.5rem) rotate(0.75deg); }
    to { opacity: 1; transform: translateY(0) rotate(0.75deg); }
  }

  .section-heading {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 1.25rem;
  }

  .library-toolbar {
    position: static;
    grid-template-columns: 1fr;
  }

  .filters {
    padding-bottom: 0.35rem;
    mask-image: linear-gradient(90deg, black calc(100% - 2rem), transparent);
  }

  .about-section {
    grid-template-columns: 1fr;
  }

  .about-mark {
    width: 4.8rem;
    height: 4.8rem;
    font-size: 2.5rem;
  }

  .about-section blockquote {
    grid-column: auto;
  }

  footer {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  footer > p:last-child {
    justify-self: start;
  }

  .guide-dialog {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    border-radius: 0;
  }

  .dialog-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .dialog-footer p {
    display: none;
  }

  .dialog-viewer {
    height: calc(100% - 10.7rem);
  }
}

@media (max-width: 42rem) {
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .guide-card {
    border-radius: 1.45rem;
  }

  .card-preview-label {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 28rem) {
  .site-header nav a:last-child {
    display: none;
  }

  .brand-copy strong {
    font-size: 0.68rem;
  }

  .brand-copy span {
    font-size: 0.82rem;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(3rem, 13vw, 3.5rem);
  }

  .featured-card {
    width: 100%;
  }

  .card-actions {
    gap: 0.55rem;
  }

  .button {
    padding-inline: 0.78rem;
  }
}

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

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