:root {
  color-scheme: light;
  --navy-950: #081522;
  --navy-900: #10243e;
  --paper: #f5f0e7;
  --paper-deep: #ebe3d6;
  --surface: #fffdf8;
  --surface-raised: #ffffff;
  --text: #10243e;
  --text-soft: #4d6072;
  --line: #d9d2c7;
  --coral: #f36f56;
  --coral-soft: #ffe4dc;
  --pinned-tint: #ffd27a;
  --green-soft: #dfeee7;
  --blue-soft: #dfeaf3;
  --focus: #e64e35;
  --shadow: 0 18px 50px rgba(16, 36, 62, 0.10);
  --shadow-small: 0 7px 24px rgba(16, 36, 62, 0.08);
  --radius-large: 24px;
  --radius: 16px;
  --shell: 1160px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #07111c;
  --paper-deep: #0c1927;
  --surface: #102033;
  --surface-raised: #14273d;
  --text: #f5f0e7;
  --text-soft: #b4c0cb;
  --line: #2a4056;
  --coral: #ff866f;
  --coral-soft: #4a2728;
  --pinned-tint: #5a3a12;
  --green-soft: #17352f;
  --blue-soft: #18334c;
  --focus: #ff9c89;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --shadow-small: 0 7px 24px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

button,
input {
  font: inherit;
}

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

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.shell {
  width: min(calc(100% - 40px), var(--shell));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--surface-raised);
  color: var(--text);
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

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

.hero {
  position: relative;
  min-height: 400px;
  overflow: hidden;
  color: #ffffff;
  isolation: isolate;
}

.hero__backdrop {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 13, 24, 0.80) 0%, rgba(4, 13, 24, 0.60) 54%, rgba(4, 13, 24, 0.72) 100%),
    url("../images/evans-hall.jpg") center 52% / cover no-repeat;
  transform: scale(1.015);
}

.hero__content {
  position: relative;
  display: flex;
  min-height: 400px;
  flex-direction: column;
  padding-block: 20px 30px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #ffffff;
  font-size: 1.06rem;
  font-weight: 760;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.wordmark__mark {
  display: block;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  object-fit: contain;
}

.topbar__actions {
  display: flex;
  gap: 8px;
}

.button {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 720;
}

.button--glass {
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(5, 16, 28, 0.42);
  color: #ffffff;
  backdrop-filter: blur(12px);
}

.button--glass:hover {
  background: rgba(5, 16, 28, 0.64);
}

.button--solid {
  padding: 0 18px;
  background: var(--navy-900);
  color: #ffffff;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle__indicator {
  width: 11px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

.hero__intro {
  position: absolute;
  top: calc(50% + 43px);
  right: 0;
  left: 0;
  margin: 0;
  transform: translateY(-50%);
}

.eyebrow,
.sponsor-label {
  margin: 0 0 8px;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  color: #ffd7cd;
}

.hero h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(1.85rem, 5.2vw, 4rem);
  font-weight: 740;
  letter-spacing: -0.05em;
  line-height: 1;
  white-space: nowrap;
}

.hero__cta {
  margin: 32px 0 0;
  color: #e8eef7;
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
  font-weight: 500;
  text-shadow: 0 1px 8px rgba(6, 18, 34, 0.55);
}

.hero--legal,
.hero--legal .hero__content {
  min-height: 300px;
}

.hero--legal .hero__intro {
  top: calc(50% + 10px);
}

.filter-search {
  display: grid;
  min-height: 40px;
  max-width: 350px;
  flex: 1 1 280px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--text);
}

.filter-search:focus-within {
  border-color: var(--coral);
  outline: 3px solid color-mix(in srgb, var(--coral) 28%, transparent);
  outline-offset: 2px;
}

.filter-search__symbol {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: var(--text-soft);
}

.filter-search__symbol svg {
  display: block;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.filter-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 620;
}

.filter-search input::placeholder {
  color: var(--text-soft);
  opacity: 1;
}

.filter-search kbd {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text-soft);
  font: 700 0.78rem/1 ui-monospace, monospace;
}

main.shell {
  padding-block: 32px 84px;
}

.legal-page {
  max-width: 860px;
}

.legal-card {
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.legal-card p.legal-card__updated {
  margin: 0 0 48px;
  color: var(--text-soft);
  font-size: 0.85rem;
  font-weight: 700;
}

.legal-card section + section {
  margin-top: 36px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.legal-card h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.legal-card p,
.legal-card ul {
  margin: 12px 0 0;
}

.legal-card ul {
  padding-left: 1.25rem;
}

.legal-card li + li {
  margin-top: 8px;
}

.legal-card a,
.site-footer__links a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legal-card a {
  color: var(--text);
  font-weight: 720;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.filter-chip {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 720;
}

.filter-chip:hover {
  background: var(--paper-deep);
  color: var(--text);
}

.filter-chip.is-active {
  background: var(--navy-900);
  color: #ffffff;
}

.notice {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 32px;
  padding: 16px 18px;
  border-radius: 14px;
}

.notice--error {
  border: 1px solid #c95543;
  background: var(--coral-soft);
}

.resource-section {
  margin-top: 58px;
}

.pinned-section {
  margin-top: 34px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  background: color-mix(in srgb, var(--pinned-tint) 48%, var(--surface));
}

.pinned-section__marker {
  display: flex;
  width: 28px;
  height: 28px;
  align-items: center;
  margin-bottom: 14px;
  color: var(--focus);
}

.pinned-section__marker svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transform: rotate(-35deg);
  transform-origin: center;
}

.section-heading {
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.section-heading--blue {
  background: var(--blue-soft);
}

.section-heading--green {
  background: var(--green-soft);
}

.section-heading--coral {
  background: var(--coral-soft);
}

.section-heading h2,
.empty-state h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.section-heading p {
  max-width: 600px;
  margin: 7px 0 0;
  color: var(--text-soft);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.resource-card {
  position: relative;
  display: flex;
  min-height: 154px;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-small);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.resource-card:hover {
  border-color: color-mix(in srgb, var(--coral) 60%, var(--line));
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.favorite-button {
  position: absolute;
  z-index: 1;
  top: 12px;
  right: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 1.1rem;
}

.favorite-button:hover,
.favorite-button[aria-pressed="true"] {
  border-color: var(--coral);
  background: var(--coral-soft);
  color: var(--focus);
}

.resource-card__link {
  display: block;
  padding-right: 38px;
  text-decoration: none;
}

.resource-card__link::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  content: "";
}

.resource-card__title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  font-size: 1.12rem;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.resource-card__arrow {
  color: var(--coral);
  font-weight: 900;
}

.resource-card__description {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.resource-card__footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  color: var(--text-soft);
  font-size: 0.72rem;
}

.resource-card__status {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-button {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-weight: 720;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
}

.report-button:hover {
  color: var(--text);
  text-decoration-color: currentColor;
}

.sponsor-section {
  margin-top: 60px;
  padding: 22px;
  border: 2px dashed var(--coral);
  border-radius: var(--radius);
  background: var(--surface);
}

.sponsor-card a {
  font-weight: 800;
}

.empty-state {
  margin: 58px 0 0;
  padding: 54px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-large);
  text-align: center;
}

.empty-state__mark {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 16px;
  background: var(--coral-soft);
  color: var(--focus);
  font: 800 1.6rem/1 ui-monospace, monospace;
}

.empty-state p {
  margin: 10px 0 22px;
  color: var(--text-soft);
}

.site-footer {
  padding-block: 42px;
  border-top: 1px solid var(--line);
  background: var(--navy-950);
  color: #ffffff;
}

.site-footer__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 48px;
}

.site-footer__brand,
.site-footer__legal {
  display: grid;
  grid-template-rows: 26px auto;
  gap: 8px;
}

.wordmark--footer {
  color: #ffffff;
}

.wordmark--footer .wordmark__mark {
  width: 24px;
  height: 24px;
}

.wordmark--footer + p,
.site-footer__notice {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.83rem;
}

.wordmark--footer + p {
  margin: 0;
}

.site-footer__notice {
  max-width: 590px;
  margin: 0;
  text-align: right;
}

.site-footer__legal {
  width: min(100%, 590px);
  justify-items: end;
}

.site-footer__links {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  font-size: 0.83rem;
  font-weight: 400;
}

.site-footer__links a:hover {
  color: var(--coral);
}

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

[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero,
  .hero__content {
    min-height: 380px;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(calc(100% - 28px), var(--shell));
  }

  .hero,
  .hero__content {
    min-height: 350px;
  }

  .hero__content {
    padding-block: 16px 24px;
  }

  .hero__backdrop {
    background-position: 58% center;
  }

  .wordmark {
    gap: 8px;
    font-size: 0.95rem;
  }

  .wordmark__mark {
    width: 24px;
    height: 24px;
  }

  .button--glass {
    padding-inline: 11px;
  }

  #installButton {
    display: none !important;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 8.7vw, 2.55rem);
  }

  .hero--legal,
  .hero--legal .hero__content {
    min-height: 280px;
  }

  .filter-search {
    width: 100%;
    max-width: none;
    flex-basis: auto;
  }

  .filter-search kbd {
    display: none;
  }

  main.shell {
    padding-top: 18px;
  }

  .filter-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-list {
    width: 100%;
    justify-content: flex-start;
  }

  .filter-chip {
    flex: 1 0 auto;
  }

  .resource-section {
    margin-top: 44px;
  }

  .pinned-section {
    padding: 16px;
  }

  .section-heading {
    padding: 16px;
  }

  .resource-grid {
    grid-template-columns: 1fr;
  }

  .resource-card {
    min-height: 144px;
  }

  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }

  .site-footer__notice {
    text-align: left;
  }

  .site-footer__legal {
    justify-items: start;
  }

  .site-footer__links {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
