/* ─────────────────────────────────────────────────────────────────
   UMD AI Resources — shared design system
   Light page / dark hero, brand-locked to brand.umd.edu/colors
   WCAG 2 AA pairings only.
   ───────────────────────────────────────────────────────────────── */

:root {
  /* Brand */
  --umd-red:     #e21833;
  --umd-gold:    #ffd200;
  --umd-bronze:  #ad7231;
  --umd-dark:    #454545;
  --umd-mid:     #7f7f7f;
  --umd-light:   #e6e6e6;

  /* Light surfaces */
  --bg:            #ffffff;
  --bg-elev-1:     #f4f3ef;
  --bg-elev-2:     #fafaf7;
  --border:        #e6e6e6;
  --border-strong: #cfcfcf;

  /* Text on light — AAA-compliant (UMD Dark Gray; #5a5a5a was 6.9:1, just under the 7:1 enhanced threshold) */
  --text:   #000000;
  --text-2: #454545;
  --text-3: #454545;

  /* Hero (dark) */
  --hero-bg:     #000000;
  --hero-text:   #ffffff;
  --hero-text-2: rgba(255,255,255,0.78);
  --hero-text-3: rgba(255,255,255,0.58);
  --hero-border: rgba(255,255,255,0.18);
  --hero-glass:  rgba(255,255,255,0.04);

  /* Fonts */
  --heading: 'Source Sans 3', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --serif:   'Crimson Text', Georgia, 'Times New Roman', Times, serif;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--heading);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
strong, b { font-weight: 700; color: var(--text); }
::selection { background: var(--umd-gold); color: #000; }
/* Two-tone focus ring: black inner ring + gold outer ring stays ≥3:1 against
   light, dark, and Maryland-red surfaces alike (WCAG 1.4.11). The element
   selectors re-assert the ring over component box-shadows of equal specificity. */
:focus-visible {
  outline: 2px solid var(--umd-gold);
  outline-offset: 3px;
  border-radius: 4px;
  box-shadow: 0 0 0 3px #000;
}
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, [tabindex]:focus-visible {
  box-shadow: 0 0 0 3px #000;
}

a { color: var(--umd-red); text-decoration: none; font-weight: 700; }
a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ── Skip link ── */
.skip-link {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  left: 16px; top: 16px; width: auto; height: auto;
  padding: 12px 16px; background: var(--umd-gold); color: #000;
  border-radius: 8px; z-index: 999; font-weight: 700;
}

.umdheader-main {
  display:block!important;
  background-color:#e21833!important;
  margin:0!important
}
.umdheader-main__container {
  border:0!important;
  padding:0!important;
  font-family:Source Sans,Source Sans Pro,sans-serif!important;
  font-size:13px!important;
  line-height:1.3!important;
  display:flex!important;
  justify-content:space-between!important;
  align-items:center!important;
  height:56px!important;
  margin:0 auto!important
}
.umdheader-main__logo {
  border:0!important;
  margin:1px 0 0!important;
  padding:0 0 0 10px!important;
  font-family:Source Sans,Source Sans Pro,sans-serif!important;
  font-size:13px!important;
  line-height:1.3!important;
  color:#fff!important;
  font-family:Crimson,serif!important;
  font-size:1.076923076923077em!important;
  font-weight:400!important
}
.umdheader-main__container--centered .umdheader-main__logo {
  padding-left:0!important
}
.umdheader-main__logo a {
  font-family:Source Sans,Source Sans Pro,sans-serif!important;
  font-size:13px!important;
  line-height:1.3!important;
  font-family:Crimson,serif!important;
  font-size:100%!important;
  color:#fff!important;
  text-decoration:none!important;
  padding:10px 0!important;
  display:inline-block!important;
  text-transform:uppercase!important;
  letter-spacing:1px!important
}
.umdheader-main__logo a:hover {
  color:#fff!important;
  text-decoration:none!important
}
.umdheader-main__nav-container {
  position:absolute!important;
  left:0!important;
  top:100%!important;
  background-color:#fff!important;
  border-bottom:1px solid #ccc!important;
  transform:scaleY(0)!important;
  transition-duration:.2s!important;
  transform-origin:50% 0!important;
  will-change:transform!important
}
.umdheader-nav {
  height:100%!important;
  font-family:Source Sans,Source Sans Pro,sans-serif!important;
  font-size:13px!important;
  line-height:1.3!important;
  border:0!important;
  margin:0!important;
  padding:0!important;
  display:none
}
.umdheader-nav__items {
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  height:100%!important;
  list-style:none!important;
  font-size:100%!important;
  font-family:Source Sans,Source Sans Pro,sans-serif!important;
  font-size:13px!important;
  line-height:1.3!important;
  border:0!important;
  margin:0!important;
  padding:0!important
}
.umdheader-nav__item {
  display:block!important;
  position:relative!important;
  height:100%!important;
  width:100%!important;
  text-transform:uppercase!important;
  list-style:none!important;
  font-family:Source Sans,Source Sans Pro,sans-serif!important;
  font-size:13px!important;
  line-height:1.3!important;
  border:0!important;
  margin:0!important;
  padding:0!important;
  border-top:1px solid #ccc!important
}
.umdheader-nav__item--parent {
  gap:0.25rem
}
.umdheader-nav__link {
  display:inline-block!important;
  color:#222!important;
  text-decoration:none!important;
  font-weight:400!important;
  font-family:Source Sans,Source Sans Pro,sans-serif!important;
  font-size:13px!important;
  line-height:1.3!important;
  border:0!important;
  margin:0!important;
  padding:0!important
}
.umdheader-nav__link:hover {
  color:#951022!important;
  background:transparent;
  text-decoration:none
}
.umdheader-nav__link--button {
  color:#e21833!important;
  font-weight:700!important;
  cursor: pointer;
  display:block!important;
  padding:10px 16px 8px!important;
  text-decoration:none!important
}
.umdheader-nav__icon {
  fill:#e21833!important;
  max-width:15px!important;
  vertical-align:middle!important;
  padding-right:10px!important;
  box-sizing:content-box!important;
  margin-top:-2px!important;
  pointer-events:none!important;
  overflow: visible;
}
.umdheader-nav__icon path {
  fill:#e21833!important
}
.umdheader-nav__search {
  border-top:none!important;
  padding:30px 10px!important;
  transform:scaleY(1)!important;
  transform-origin:50% 0!important;
  background:#fff!important;
  display:flex
}
.umdheader-nav__item--search.umdheader-nav__item--active .umdheader-nav__search {
  display:flex
}
.umdheader-input {
  -webkit-appearance:none!important;
  background:none!important;
  border-radius:0!important;
  margin:0!important
}
.umdheader-input::placeholder {
  color:rgba(255,255,255,0.58)
}
.umdheader-input:focus {
  outline: 2px solid var(--umd-gold);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px #000;
}
.umdheader-nav__search-button {
  font-weight:700!important;
  background-color:#951022!important;
  color:#fff!important;
  width:80px!important;
  box-shadow:none!important;
  height:auto!important;
  text-shadow:none!important;
  border:0!important;
  margin:0!important;
  padding:0 18px!important;
  font-family:Source Sans,Source Sans Pro,sans-serif!important;
  font-size:13px!important;
  line-height:1.3!important
}
@media (min-width: 1100px) {
  .umdheader-nav__search-button {
    width:auto!important
  }
}
.umdheader-nav__search-button:hover {
  background:#951022!important;
  color:#fff!important
}
.umdheader-main__mobile-trigger {
  padding:16px 20px!important;
  cursor:pointer!important;
  background-color: transparent;
  border: none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: auto;
  height: auto;
  color:#fff;
}
@media (min-width: 1100px) {
  .umdheader-main__mobile-trigger {
    display:none!important
  }
}
.umdheader-main__mobile-trigger svg {
  width:20px!important;
  fill:#fff!important
}
.umdheader-wrap {
  display: block !important;
  position: relative !important;
  /* Above the sticky site-nav (100) and its dropdowns (200), but below the
     search dialog (300) and the skip link (999), which must paint on top. */
  z-index: 250 !important;
  font-family: Source Sans, Source Sans Pro, sans-serif !important;
  font-size: 13px !important;
  line-height: 1.3 !important;
}
.umdheader-wrap--sticky {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: auto !important;
  width: 100% !important;
}
.umdheader-wrap .ext {
  display: none;
}
.umdheader-nav__item--search .umdheader-nav__link--button {
  display: none !important;
}
@media (min-width: 1100px) {
  .umdheader-nav__item--search .umdheader-nav__link--button {
    display: block !important;
  }
  .umdheader-nav {
    display: flex !important;
  }
  .umdheader-main__nav-container {
    position: static !important;
    background-color: transparent !important;
    border-bottom: none !important;
    transform: scaleY(1) !important;
  }
  .umdheader-nav__icon {
    fill: #fff !important;
  }
  .umdheader-nav__item {
    width: auto !important;
    color: #e21833 !important;
    border-top: 0 !important;
  }
  .umdheader-nav__link {
    color: #fff !important;
    font-size: 91.66666666666667% !important;
  }
  .umdheader-nav__link--button:active,
  .umdheader-nav__link--button:focus,
  .umdheader-nav__link--button:hover,
  .umdheader-nav__item--active .umdheader-nav__link--button {
    background: #951022 !important;
    color: #fff !important;
  }
  .umdheader-nav__item--search {
    order: 0 !important;
  }
  .umdheader-nav__search {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    padding: 30px !important;
    border: 1px solid #ccc !important;
    transform: scaleY(0) !important;
    display: none;
  }
  .umdheader-nav__item--active .umdheader-nav__search {
    display: flex !important;
    transform: scaleY(1) !important;
  }
.umdheader-input--text {
  width: 300px !important;
}
.umdheader-main__container {
  height: 44px !important;
}
}
.umdheader-input--text {
  width: calc(100% - 80px) !important;
  display: block !important;
  height: auto !important;
  border: 0 !important;
  margin: 0 !important;
  padding: 10px !important;
  font-family: Source Sans, Source Sans Pro, sans-serif !important;
  font-size: 13px !important;
  line-height: 1.3 !important;
  border: 1px solid #ccc !important;
}
@media (max-width: 1099px) {
  .umdheader-nav__search {
    display: flex !important;
  }
  .umdheader-nav__item--search .umdheader-nav__link--button {
    display: none !important;
  }
  .umdheader-main__nav-container.umdheader-nav-visible-mobile .umdheader-nav {
    display: block !important;
  }
}
@media (max-width: 720px) {
  .umdheader-main__container {
    padding: 0 1.25rem;
    position: relative;
    flex-wrap: wrap;
  }
  .umdheader-main__mobile-trigger {
    display: inline-flex;
  }
  .umdheader-main__nav-container {
    display: block;
    width: 100%;
    margin-left: 0;
    padding: 0;
  }
  .umdheader-main__nav-container:not(.umdheader-nav-visible-mobile) {
    transform: scaleY(0) !important;
  }
  .umdheader-nav {
    width: 100%;
  }
  .umdheader-nav__items {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .umdheader-nav__item {
    width: 100%;
    flex-wrap: wrap;
  }
  .umdheader-nav__search {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.5rem;
    padding-top: 30px;
  }
  .umdheader-nav__item--search.umdheader-nav__item--active .umdheader-nav__search {
    display: flex;
  }
}
.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;
}

/* ── Sticky nav (black, matches licensing site) ── */
.site-nav {
  background: #000;
  border-bottom: 4px solid var(--umd-red);
  padding: 0 2.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
  position: sticky; top: 0; z-index: 100;
}
.logo-lockup { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-mark {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--umd-red);
  display: grid; place-items: center;
  color: #fff; font-weight: 900; font-size: 13px; letter-spacing: 0.02em;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 4px 14px rgba(226,24,51,0.35);
}
.site-wordmark { font-size: 16px; font-weight: 700; color: #fff; letter-spacing: 0.01em; }
.site-wordmark .dim { color: rgba(255,255,255,0.58); font-weight: 400; }

.header-nav { display: flex; align-items: center; gap: 0.25rem; }
.header-nav-link {
  font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.78);
  letter-spacing: 0.04em; padding: 8px 14px; border-radius: 999px;
  transition: color 0.15s, background 0.15s;
}
.header-nav-link:hover { color: #fff; background: rgba(255,255,255,0.06); text-decoration: none; }
.header-nav-link.active { color: #000; background: var(--umd-gold); }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; background: none; border: none; cursor: pointer; padding: 8px;
}
.hamburger span {
  display: block; width: 22px; height: 2px; background: #fff;
  border-radius: 2px; transition: transform 0.2s, opacity 0.2s;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Re-assert mobile nav behavior. The base .header-nav / .hamburger rules
   above are defined *after* the max-width:720px block (lines ~431-432), so by
   source order they were overriding the responsive display values — leaving
   the nav permanently expanded (a ~228px panel pinned below the sticky header)
   and the hamburger hidden on phones. Restating the mobile rules here lets
   them win by source order without moving the existing blocks. */
@media (max-width: 720px) {
  .site-nav { padding: 0 1.25rem; }
  .hamburger {
    display: flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
  }
  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    /* 120px ≈ UMD banner + site header at top-of-page (the menu's worst-case
       offset). Page scroll closes the menu, so the open menu must fit the
       viewport and scroll internally on short landscape screens. */
    max-height: calc(100dvh - 120px);
    overflow-y: auto;
    background: rgba(10,10,11,0.96);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    z-index: 150;
  }
  .header-nav.open { display: flex; }
  .header-nav-link { padding: 0.85rem 1rem; border-radius: 8px; }
}

/* ── Nav section dropdowns (nav-menus.js) ──
   Desktop-only disclosure panels under Services / Guidelines / Prompt
   Library. Hidden entirely at phone widths — the hamburger flow above is
   the mobile experience and must not change. */
.nav-drop-btn, .nav-drop-panel { display: none; }
@media (min-width: 721px) {
  .header-nav { position: relative; }
  .nav-drop-btn {
    display: inline-flex; align-items: center; justify-content: center;
    /* 44x44 hit area for touch (landscape phones/tablets); the glyph stays
       small and the negative margin tucks it against its link visually. */
    width: 44px; height: 44px;
    margin: 0 -10px 0 -12px;
    background: none; border: none; border-radius: 50%;
    color: rgba(255,255,255,0.78);
    cursor: pointer;
  }
  .nav-drop-btn:hover { color: #fff; }
  .nav-drop-btn:focus-visible { outline: 2px solid var(--umd-gold); outline-offset: -8px; }
  .nav-drop-btn svg { transition: transform 0.15s var(--ease); }
  .nav-drop-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
  .nav-drop-panel {
    position: absolute;
    top: calc(100% + 14px);
    z-index: 200;
    width: 320px;
    background: var(--bg-elev-1, #fff);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 18px 44px rgba(0,0,0,0.18);
    padding: 0.5rem;
  }
  .nav-drop-panel.open { display: block; animation: nav-drop-in 0.18s var(--ease); }
  .nav-drop-panel ul { list-style: none; margin: 0; padding: 0; }
  .nav-drop-panel a {
    display: block;
    padding: 0.6rem 0.75rem;
    border-radius: 9px;
    color: inherit;
  }
  .nav-drop-panel a:hover { background: rgba(226,24,51,0.06); text-decoration: none; }
  .nav-drop-panel a:focus-visible { outline: 2px solid #000; outline-offset: -2px; box-shadow: none; }
  .nav-drop-title { display: block; font-weight: 600; font-size: 13.5px; color: var(--text); }
  .nav-drop-desc { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 1px; }
  @keyframes nav-drop-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* ── Hero ──
   Hard rules — DO NOT override per-page:
   - min-height locks every hero to the same overall size
   - flex-start anchors content to the top so the eyebrow pill
     always sits at the same vertical position across pages
   - padding-top defines the eyebrow's vertical anchor distance
   - Eyebrow → H1 → desc spacing is fixed via element margins
*/
.hero {
  position: relative;
  padding: 4.5rem 0 3.5rem;
  min-height: 26rem;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
  isolation: isolate;
  background: var(--hero-bg);
  color: var(--hero-text);
}
.hero-inner { width: 100%; }
.hero a { color: var(--umd-gold); }
.aurora {
  position: absolute; inset: -20% -10%;
  z-index: -1;
  background:
    radial-gradient(40% 50% at 18% 30%, rgba(255,210,0,0.22), transparent 60%),
    radial-gradient(45% 55% at 82% 20%, rgba(226,24,51,0.28), transparent 60%),
    radial-gradient(60% 60% at 50% 90%, rgba(173,114,49,0.18), transparent 60%);
  filter: blur(40px);
  animation: aurora 22s ease-in-out infinite alternate;
}
.aurora-grid {
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
}
@keyframes aurora {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(2%,-1%,0) scale(1.06); }
  100% { transform: translate3d(-1%,1%,0) scale(1.02); }
}

/* Generative hero (home page) — canvas particle field injected by
   hero-motion.js. .hero-live dims the aurora to a base glow under the
   particles; without JS or with reduced motion the aurora stands alone. */
.hero-canvas {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
}
.hero.hero-live .aurora { opacity: 0.5; }

/* Subtle grain over the hero — SVG turbulence tile, barely-there */
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

/* Hero animation pause/play toggle (hero-motion.js, WCAG 2.2.2) */
.hero-pause {
  position: absolute;
  right: 1rem; bottom: 1rem;
  z-index: 2;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.45);
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.hero-pause:hover {
  background: rgba(0,0,0,0.8);
  border-color: var(--umd-gold);
}
.hero-pause:focus-visible {
  outline: 2px solid var(--umd-gold);
  outline-offset: 2px;
}

/* Typed headline caret (hero-motion.js) */
.typed-caret {
  display: inline-block;
  width: 0.06em; height: 0.82em;
  margin-left: 0.06em;
  background: var(--umd-gold);
  transform: translateY(0.08em);
  animation: caret-blink 1s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

.hero-inner {
  max-width: 1320px; margin: 0 auto; padding: 0 2.5rem;
  position: relative; z-index: 1;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--hero-border);
  border-radius: 999px;
  background: var(--hero-glass);
  color: var(--hero-text);
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.hero-eyebrow::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--umd-gold);
  box-shadow: 0 0 12px var(--umd-gold);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.9); }
  50%      { opacity: 1; transform: scale(1.15); }
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 600; color: var(--hero-text);
  font-size: clamp(40px, 5.5vw, 76px);
  letter-spacing: -0.02em; line-height: 1.02;
  margin-bottom: 1.25rem;
  max-width: 100%;
  /* Modern typography rule:
     - Default: text-wrap: balance distributes lines evenly without manual
       line breaks. Works for any headline length up to the hero width.
     - Editorial pattern: add class="tight" on SHORT headlines (~< 36 chars)
       to force the narrow-column wrap style (Linear / Stripe / Vercel feel).
       Don't use .tight on long headlines — it produces ugly 3-4 line wraps. */
  text-wrap: balance;
}
.hero h1.tight { max-width: 28ch; }
.hero h1 .accent {
  background: linear-gradient(120deg, var(--umd-gold), var(--umd-bronze) 60%, var(--umd-red));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: italic;
  padding-inline-end: 0.12em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hero-desc {
  color: var(--hero-text-2); max-width: 92ch;
  font-size: 18px; line-height: 1.6;
  /* Modern typography: text-wrap: pretty avoids leaving a single orphan
     word on the last line of a paragraph. Cheap polish, zero downside. */
  text-wrap: pretty;
}
.hero-desc strong { color: var(--hero-text); }

/* ── Main / sections ── */
main { padding: 4rem 2.5rem 5rem; max-width: 1320px; margin: 0 auto; }
.section { margin-top: 4rem; scroll-margin-top: 90px; }
.section:first-child { margin-top: 0; }
.section-head { margin-bottom: 1.75rem; max-width: 80ch; }
.section-kicker {
  display: inline-block;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--umd-red); font-weight: 700;
  margin-bottom: 0.75rem;
}
.section h2 {
  font-family: var(--serif);
  font-weight: 700; font-size: clamp(32px, 3.5vw, 48px);
  letter-spacing: -0.02em; line-height: 1.1; color: var(--text);
  margin-bottom: 0.75rem;
  text-wrap: balance;
}
.section .lede {
  color: var(--text-2); font-size: 17px; line-height: 1.6;
  text-wrap: pretty;
}

/* ── Grids ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

/* ── Tiles ── */
.tile {
  position: relative;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.2s, box-shadow 0.3s;
  will-change: transform;
}
.tile::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent, var(--umd-gold));
  opacity: 0.85;
}
.tile::after {
  /* Cursor-tracked spotlight; --mx / --my are set by micro.js on pointermove */
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), var(--accent-glow, rgba(255,210,0,0.10)), transparent 50%);
  opacity: 0; transition: opacity 0.3s;
  pointer-events: none;
}
.tile:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 14px 36px rgba(0,0,0,0.10);
}
.tile:hover::after { opacity: 1; }
.tile-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 0.75rem;
}
.tile-name {
  font-weight: 700; font-size: 22px;
  color: var(--text); letter-spacing: -0.01em; line-height: 1.2;
  text-wrap: balance;
}
.tile-kicker {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-3); font-weight: 600; margin-bottom: 4px;
}
.tile-desc {
  color: var(--text-2); font-size: 14.5px; line-height: 1.55;
  margin-bottom: 1rem; flex: 1;
  text-wrap: pretty;
}
.tile ul { list-style: none; padding: 0; margin: 0 0 1rem; }
.tile li {
  color: var(--text-2); font-size: 14px;
  padding: 4px 0 4px 18px; position: relative;
  line-height: 1.5;
}
.tile li::before {
  content: ''; position: absolute; left: 0; top: 13px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent, var(--umd-gold));
}
.tile-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* Card-as-link (whole tile clickable on home page) */
a.tile {
  text-decoration: none; color: inherit;
}
a.tile:hover { text-decoration: none; }
a.tile .tile-name { color: var(--text); }

/* Tile accents per section family */
.tile[data-accent="red"]    { --accent: var(--umd-red);    --accent-glow: rgba(226,24,51,0.14); }
.tile[data-accent="gold"]   { --accent: var(--umd-gold);   --accent-glow: rgba(255,210,0,0.12); }
.tile[data-accent="bronze"] { --accent: var(--umd-bronze); --accent-glow: rgba(173,114,49,0.14); }

/* ── Pills ── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  white-space: nowrap; min-height: 24px;
}
.pill.solid-red    { background: var(--umd-red);    color: #fff; }
.pill.solid-gold   { background: var(--umd-gold);   color: #000; }
.pill.solid-black  { background: #000;              color: #fff; border: 1px solid var(--border-strong); }
.pill.solid-bronze { background: var(--umd-bronze); color: #000; }
.pill.outline      { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }

/* ── External links inside cards ── */
.external {
  color: var(--umd-red); font-weight: 700; font-size: 14px;
  display: inline-flex; align-items: center; gap: 4px;
  transition: gap 0.15s var(--ease);
}
.external::after { content: '↗'; transition: transform 0.15s var(--ease); }
.external:hover { gap: 7px; text-decoration: none; }
.external:hover::after { transform: translate(2px, -2px); }

/* Red text fails contrast on cream (--bg-elev-1) panels (~4.29:1); use
   Dark Gray there instead — still approved-palette, computes to ~8.6:1. */
.tile a, .callout a, .detail-sidecard a { color: var(--umd-dark); }
/* When the whole card is the <a> (a.tile), .tile a above doesn't match —
   the link text lives in a child .external span with its own explicit
   color, so it needs its own override for the same cream-panel reason. */
a.tile .external { color: var(--umd-dark); }

/* ── Callouts ── */
.callout {
  border-left: 4px solid var(--umd-gold);
  background: var(--bg-elev-1);
  border-radius: 0 12px 12px 0;
  padding: 1.1rem 1.25rem;
  color: var(--text);
}
.callout strong { color: var(--text); }
.callout.critical { border-color: var(--umd-red); }
.callout p { color: var(--text-2); }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 2.5rem;
  color: var(--text-3);
  font-size: 13px;
  text-align: center;
}
.site-footer p + p { margin-top: 0.4rem; }

/* ── Reveal animation ── */
@keyframes reveal {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
[data-reveal] { opacity: 0; }
[data-reveal].in-view { animation: reveal 0.5s var(--ease) forwards; }

/* Staggered reveal — micro.js adds .stagger to multi-child [data-reveal]
   grids and sets --stagger-d per child; the container stops animating and
   the children cascade in instead. */
[data-reveal].stagger { opacity: 1; }
[data-reveal].stagger > * { opacity: 0; }
[data-reveal].stagger.in-view { animation: none; }
[data-reveal].stagger.in-view > * {
  animation: reveal 0.5s var(--ease) forwards;
  animation-delay: var(--stagger-d, 0ms);
}

/* Magnetic buttons — micro.js adds .magnet and drives an inline transform
   toward the cursor; this transition provides the spring-back on leave. */
.magnet {
  transition: transform 0.18s var(--ease), border-color 0.15s, color 0.15s, background 0.15s;
  will-change: transform;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .aurora { animation: none; }
  [data-reveal] { opacity: 1; }
  [data-reveal].stagger > * { opacity: 1 !important; animation: none !important; }
  .typed-caret { animation: none; }
}

/* ════════════════════════════════════════════════════════════════
   Prompt Library — detail page framework
   Applies to every prompt detail page at /prompt-library/<slug>/.
   Single source of truth; no per-page CSS required.

   Convention for new prompt detail pages:
   - Link /styles.css only (no per-page <style> block, no detail-page.css).
   - Hero section uses .crumbs + <h1 class="tight"> + <p class="hero-desc">
     + .detail-meta pills. Do NOT include .hero-eyebrow — prompt detail
     pages omit the eyebrow tag since it duplicates the breadcrumb.
   - Body uses .detail-section (Overview) and .detail-layout (prompt panel
     + .detail-sidecard aside).
   ════════════════════════════════════════════════════════════════ */
.crumbs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.25rem;
  color: var(--hero-text-2);
  font-size: 13px;
  font-weight: 600;
}
.crumbs a { color: var(--umd-gold); }
.crumbs span[aria-hidden="true"] { color: var(--hero-text-3); }
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.5rem;
}
.detail-meta .pill.outline {
  background: rgba(244, 243, 239, 0.96);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.24);
}
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 1.25rem;
}
.prompt-panel,
.detail-sidecard {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.35rem;
}
.prompt-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.prompt-panel-title {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 700;
}
.copy-btn {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text-2);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.copy-btn:hover {
  color: var(--umd-red);
  border-color: var(--umd-red);
  background: rgba(226,24,51,0.04);
}
/* Copied state — morphs to a gold checkmark with a spring (detail-page.js) */
.copy-btn.copied {
  background: var(--umd-gold);
  border-color: var(--umd-gold);
  color: #000;
  animation: spring-pop 0.45s var(--ease);
}
@keyframes spring-pop {
  0%   { transform: scale(0.72); }
  55%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}
.prompt-code {
  margin: 0;
  padding: 1.1rem;
  border-radius: 14px;
  background: #111;
  color: #f7f7f2;
  border: 1px solid rgba(255,255,255,0.08);
  font: 500 14px/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
}
.detail-sidecard + .detail-sidecard { margin-top: 1rem; }
.detail-sidecard h3 {
  font-family: var(--heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.75rem;
}
.detail-sidecard p,
.detail-sidecard li {
  color: #1a1a1a;
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.6;
}
.detail-sidecard ul {
  margin: 0;
  padding-left: 1.1rem;
}
.detail-section { margin-top: 2.5rem; }
.detail-section h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 0.85rem;
}
.detail-section p {
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.7;
  max-width: 82ch;
}
@media (max-width: 900px) {
  .detail-layout { grid-template-columns: 1fr; }
}

/* ── Site search — header trigger + ⌘K command palette ──
   Markup is injected by site-search.js on every page. Dark glass styling
   mirrors the hero aesthetic. Results are always rendered with
   textContent / createElement — never innerHTML. */
.nav-search-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.78);
  border-radius: 999px;
  padding: 6px 12px;
  min-height: 36px;
  font-family: var(--heading);
  font-size: 13px; font-weight: 500; letter-spacing: 0.04em;
  cursor: pointer;
  margin-left: 0.75rem;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.nav-search-btn:hover {
  color: #fff; border-color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.10);
}
.nav-search-btn svg { flex-shrink: 0; }
.nav-search-btn kbd {
  font-family: var(--heading);
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 5px;
  padding: 1px 5px;
  line-height: 1.4;
}
@media (max-width: 900px) {
  .nav-search-btn .nav-search-label, .nav-search-btn kbd { display: none; }
  .nav-search-btn { padding: 6px 9px; margin-left: auto; margin-right: 0.75rem; }
}

.cmdk-overlay {
  position: fixed; inset: 0; z-index: 300;
  display: none;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: clamp(1rem, 10vh, 7rem) 1rem 1rem;
  justify-content: center; align-items: flex-start;
}
.cmdk-overlay.open { display: flex; animation: cmdk-fade 0.18s var(--ease); }
@keyframes cmdk-fade { from { opacity: 0; } to { opacity: 1; } }

.cmdk {
  width: 100%; max-width: 620px;
  background: #0d0d0e;
  border: 1px solid rgba(255,255,255,0.14);
  border-top: 3px solid var(--umd-red);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.55);
  overflow: hidden;
  animation: cmdk-pop 0.22s var(--ease);
}
@keyframes cmdk-pop {
  from { opacity: 0; transform: translateY(-10px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.cmdk-input-row {
  display: flex; align-items: center; gap: 12px;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.cmdk-input-row svg { color: rgba(255,255,255,0.45); flex-shrink: 0; }
.cmdk-input {
  flex: 1;
  appearance: none; border: none; background: transparent;
  color: #fff;
  font-family: var(--heading);
  font-size: 17px; font-weight: 400;
  outline: none;
}
.cmdk-input::placeholder { color: rgba(255,255,255,0.40); }

.cmdk-list {
  list-style: none; margin: 0; padding: 0.5rem;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.cmdk-item {
  display: flex; align-items: center; gap: 12px;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  cursor: pointer;
}
.cmdk-item[aria-selected="true"] { background: rgba(255,255,255,0.09); }
.cmdk-item[aria-selected="true"] .cmdk-item-title { color: #fff; }
.cmdk-item-title {
  color: rgba(255,255,255,0.86);
  font-size: 14.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cmdk-item-hint {
  color: rgba(255,255,255,0.75);
  font-size: 12.5px; font-weight: 400;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1;
}
.cmdk-item .pill { flex-shrink: 0; font-size: 10px; min-height: 20px; padding: 2px 8px; }
.cmdk-item .pill.type-page    { background: var(--umd-gold); color: #000; }
.cmdk-item .pill.type-tool    { background: var(--umd-red); color: #fff; }
.cmdk-item .pill.type-prompt  { background: var(--umd-bronze); color: #fff; }
.cmdk-item .pill.type-guide   { background: #fff; color: #000; }
.cmdk-item .pill.type-action  { background: transparent; color: rgba(255,255,255,0.75); border: 1px solid rgba(255,255,255,0.35); }
.cmdk-item-enter {
  color: rgba(255,255,255,0.75); font-size: 11px; flex-shrink: 0;
  visibility: hidden;
}
.cmdk-item[aria-selected="true"] .cmdk-item-enter { visibility: visible; }

.cmdk-empty {
  padding: 1.5rem 1rem; text-align: center;
  color: rgba(255,255,255,0.75); font-size: 14px;
}
.cmdk-foot {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.6rem 1.15rem;
  border-top: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.75);
  font-size: 11.5px; letter-spacing: 0.03em;
}
.cmdk-foot kbd {
  font-family: var(--heading);
  font-size: 10px; font-weight: 700;
  color: rgba(255,255,255,0.80);
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: 4px;
  padding: 0 4px; margin-right: 4px;
}
body.cmdk-lock { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .cmdk-overlay.open, .cmdk { animation: none; }
}

/* Keep phone component overrides after every desktop component declaration. */
@media (max-width: 720px) {
  .hero { padding: 4rem 0 3rem; }
  .hero-inner { padding: 0 1.25rem; }
  .hero h1 { max-width: 100%; }
  main { padding: 2.5rem 1.25rem 3.5rem; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .section { margin-top: 3rem; }
  .tile, .panel { padding: 1.1rem; }
}
