@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&display=swap");

:root {
  color-scheme: light;
  --paper: #faf9f6;
  --white: #fffefa;
  --ink: #142337;
  --ink-soft: #233750;
  --muted: #50596a;
  --gold: #8a5e22;
  --gold-soft: #f5ede0;
  --gold-bright: #ecd8b2;
  --rule: #ded9ce;
  --sans: Geist, system-ui, -apple-system, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  font: 1rem/1.6 var(--sans);
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }
a { color: inherit; }
img { display: block; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
[id] { scroll-margin-top: 4.75rem; }

.container {
  width: min(100% - 3rem, 76rem);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 50;
  inset: .75rem auto auto .75rem;
  padding: .5rem 1rem;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: .375rem;
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 2rem;
  min-height: 4rem;
}
.header-inner { min-height: 3.5rem; }
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--serif);
  font-size: 1.85rem;
  line-height: 1;
  letter-spacing: -.01em;
  text-decoration: none;
}
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.75rem;
}
.site-header nav a, .site-footer a:not(.wordmark) {
  font-size: .875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}
.site-header nav a:hover, .site-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: .25em;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: .65rem;
}
.lang-select {
  min-height: 2.65rem;
  padding: .45rem .65rem;
  border: 1px solid #cbbda7;
  border-radius: .375rem;
  background: var(--white);
  color: var(--ink);
  font: 500 .85rem/1.3 var(--sans);
  cursor: pointer;
}
.lang-select:hover { border-color: #9e8a6b; }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 2.65rem;
  width: fit-content;
  padding: .6rem 1.1rem;
  border: 1px solid transparent;
  border-radius: .375rem;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.button-outline { border-color: #b7a68b; color: var(--ink); }
.button-outline:hover { background: #f1ece2; }
.button-primary { color: var(--ink); background: var(--gold-bright); }
.button-primary:hover { background: #f6e4c1; }
.button-ghost {
  color: #e4ebf5;
  border-color: rgba(215, 223, 235, 0.35);
  background: rgba(255, 255, 255, 0.04);
}
.button-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(215, 223, 235, 0.6);
}

/* Typography */
h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: .96;
  letter-spacing: -.015em;
}
h1 { font-size: clamp(3.3rem, 7vw, 6.25rem); }
h2 { font-size: clamp(2.5rem, 4.8vw, 4.25rem); }
h3 { font-size: 1.08rem; line-height: 1.35; font-weight: 600; }

/* Retain the illustrated hero’s established height across languages. */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-block-size: clamp(38.1875rem, calc(19.875rem + 29.75vw), 45.3125rem);
  color: var(--white);
  background:
    radial-gradient(ellipse 22% 95% at 50% 44%, rgba(246, 224, 180, 0.11) 0%, rgba(236, 216, 178, 0.05) 48%, transparent 78%),
    radial-gradient(ellipse 58% 36% at 50% 106%, rgba(236, 216, 178, 0.14) 0%, rgba(236, 216, 178, 0.05) 45%, transparent 74%),
    linear-gradient(180deg, #142337 0%, #101c2d 100%);
  border-bottom: 1px solid #233750;
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 40% 34% at 50% -2%, rgba(255, 242, 210, 0.45), transparent 72%),
    radial-gradient(ellipse 72% 62% at 50% -8%, rgba(246, 224, 180, 0.39) 0%, rgba(236, 216, 178, 0.18) 38%, rgba(236, 216, 178, 0.04) 64%, transparent 80%);
}

/* Static dithering softens bands in the animated light on 8-bit displays. */
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background-image: url("./hero-light-dither.png");
  mask-image: linear-gradient(#000 5%, transparent 46%);
}

.hero::before {
  animation: hero-light-breathe 15s ease-in-out -1.4s infinite;
}

@keyframes hero-light-breathe {
  0%, 90%, 100% { opacity: .40; }
  30% { opacity: 1; }
}

@media (forced-colors: active) {
  .hero::before, .hero::after { display: none; }
}

.hero-light-canvas {
  position: absolute;
  z-index: -1;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  pointer-events: none;
}
.hero[data-light-renderer="canvas"]::before,
.hero[data-light-renderer="canvas"]::after {
  display: none;
}

.hero-inner {
  max-width: 68rem;
  padding-block: clamp(3.5rem, 7vw, 6rem) clamp(3rem, 6vw, 4.75rem);
  text-align: center;
}
.hero-eyebrow {
  display: inline-block;
  margin-bottom: 1.15rem;
  padding: .28rem .8rem;
  border: 1px solid rgba(236, 216, 178, 0.32);
  border-radius: 999px;
  color: var(--gold-bright);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 15ch;
  margin-inline: auto;
  text-wrap: balance;
}
.hero-title-continuation:empty, .hero-lead-continuation:empty { display: none; }
.hero h1:is(:lang(ja), :lang(zh)) {
  max-width: 100%;
  font-size: clamp(1.9rem, 6.2vw, 4.75rem);
  line-height: 1.08;
  letter-spacing: normal;
  line-break: strict;
}
.hero h1:is(:lang(ja), :lang(zh)) > span { display: block; }
.hero-lead {
  color: #d7dfeb;
  max-width: 52ch;
  margin: 1.25rem auto 0;
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  text-wrap: pretty;
}
.hero-lead:is(:lang(ja), :lang(zh)) { max-width: 34em; line-break: strict; }
.hero-lead:is(:lang(ja), :lang(zh)) > span { display: block; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: .75rem;
}
.hero-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 1.6rem 0 0;
  margin: 2.5rem 0 0;
  border-top: 1px solid rgba(215, 223, 235, 0.16);
  text-align: left;
}
.hero-pillars li {
  padding: .9rem 1rem;
  border-radius: .5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(215, 223, 235, 0.1);
  color: #cbd5e3;
  font-size: .88rem;
  line-height: 1.5;
}
.hero-pillars strong {
  display: block;
  margin-bottom: .2rem;
  color: var(--gold-bright);
  font-size: .92rem;
}

/* Sections */
.section-kicker {
  color: var(--gold);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}
.services-section {
  padding-block: clamp(1.65rem, 5vw, 4.25rem);
  border-top: 1px solid var(--rule);
  background: var(--paper);
}
.services-panel {
  padding: clamp(1.25rem, 3.5vw, 3.25rem);
  border: 1px solid #d8c9b0;
  border-radius: 1rem;
  background: linear-gradient(110deg, #faf6ed, #f2eadc);
  box-shadow: 0 .85rem 2.5rem rgba(20, 35, 55, .065);
}
/* Both views set the shared grid row height, even while one is inactive. */
.services-views { display: grid; }
.services-view {
  --services-offset: 1.5rem;
  grid-area: 1 / 1;
  align-self: start;
  min-inline-size: 0;
  opacity: 0;
  visibility: hidden;
}
.services-view:first-child { --services-offset: -1.5rem; }
.services-view.is-current {
  opacity: 1;
  visibility: visible;
}

.services-section.has-scroll-roadmap {
  padding-block: var(--services-center-gap) max(var(--services-center-gap), clamp(1.65rem, 5vw, 4.25rem));
  scroll-margin-top: var(--services-header);
}
.has-scroll-roadmap .services-panel {
  position: sticky;
  top: calc(var(--services-header) + var(--services-center-gap));
}
/* This space keeps the panel centered as the document continues scrolling. */
.services-section.has-scroll-roadmap::after {
  content: "";
  display: block;
  block-size: var(--services-pin-distance);
}
.is-animated-switch .services-view.is-current {
  animation: services-arrive 340ms cubic-bezier(.2, .75, .3, 1);
}
@keyframes services-arrive {
  from { opacity: 0; transform: translateY(calc(var(--services-offset) / 2)); }
  to { opacity: 1; transform: none; }
}
.services-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: .35rem 2rem;
}
.services-intro h2 { font-size: clamp(3rem, 6vw, 5rem); }
.services-intro h2:is(:lang(ja), :lang(zh)) {
  font-size: clamp(1.65rem, 7.1vw, 3.45rem);
  line-height: 1.12;
  letter-spacing: normal;
  line-break: strict;
}
.services-lead {
  max-width: 53ch;
  margin-top: .8rem;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  text-wrap: pretty;
}
.services-link {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  min-block-size: 2.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gold);
  font: 600 .875rem/1.35 var(--sans);
  text-align: start;
  text-decoration: none;
  cursor: pointer;
}
.services-intro > .services-link { margin-top: .28rem; }
.services-link-label {
  text-decoration: underline;
  text-underline-offset: .23em;
}
.services-link-arrow { font-size: 1.05rem; }
.services-link:hover { color: var(--ink); }

.services-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(2rem, 5vw, 4rem);
  margin-top: 1.35rem;
  padding: 0;
  list-style: none;
}
.services-list li {
  padding-block: .85rem .8rem;
  border-top: 1px solid #d5c7b0;
}
.services-list h3 {
  margin-bottom: .3rem;
  font: 400 clamp(1.42rem, 2.15vw, 1.85rem)/1.12 var(--serif);
  text-wrap: pretty;
}
.services-list p {
  max-width: 51ch;
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.5;
  text-wrap: pretty;
}
.services-preview-note {
  display: block;
  margin-top: .32rem;
  color: var(--gold);
  font-size: .78rem;
  font-weight: 600;
}
.services-panel-footer {
  display: flex;
  align-items: center;
  min-block-size: 2.75rem;
  padding-top: .4rem;
  border-top: 1px solid #d5c7b0;
  color: var(--muted);
  font-size: .84rem;
}

.invite-section {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: var(--ink);
  color: var(--white);
}
.invite-ribbon {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 6px;
  z-index: -1;
  inline-size: 100%;
  block-size: clamp(34px, 4vw, 58px);
  pointer-events: none;
  fill: none;
}
.invite-ribbon-glow, .invite-ribbon-line { stroke: url(#invite-gold); }
.invite-ribbon-glow { stroke-width: 10; opacity: .25; filter: blur(4px); }
.invite-ribbon-line { stroke-width: 1.65; vector-effect: non-scaling-stroke; }
.invite-ribbon-glint { stroke: url(#invite-glint); }
.invite-glint-outer { stroke-width: 13; opacity: .06; }
.invite-glint-middle { stroke-width: 8; opacity: .12; }
.invite-glint-inner { stroke-width: 4.5; opacity: .24; }
.invite-glint-core { stroke-width: 1.65; opacity: .80; }
.invite-ribbon-glint use { vector-effect: non-scaling-stroke; }
@media (forced-colors: active) {
  .invite-ribbon { display: none; }
}

.invite-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  padding-block: clamp(2.75rem, 5vw, 4.25rem);
}
.invite-inner h2 { font-size: clamp(2.4rem, 4.5vw, 4rem); }
.invite-inner p { color: #d5deeb; margin-top: .6rem; max-width: 54ch; }
.invite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  flex-shrink: 0;
  align-items: center;
}
.invite-suggestion {
  min-height: 2.65rem;
  padding: .25rem 0;
  border: 0;
  color: #d5deeb;
  background: transparent;
  font: 500 .875rem/1.4 var(--sans);
  text-decoration: underline;
  text-underline-offset: .24em;
  cursor: pointer;
}
.invite-suggestion:hover { color: var(--white); }
.invite-section .button-primary:focus-visible { outline-color: var(--gold-bright); }

.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--rule);
}

/* Contact dialog */
.contact-dialog {
  width: min(100% - 2rem, 34rem);
  margin: auto;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: .85rem;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(16, 28, 45, 0.28);
}
.contact-dialog::backdrop {
  background: rgba(16, 28, 45, 0.58);
  backdrop-filter: blur(4px);
}
.contact-dialog-card {
  padding: 1.5rem 1.65rem 1.65rem;
}
.contact-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.contact-dialog-head h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.4rem);
  line-height: 1.05;
}
.contact-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--rule);
  border-radius: .375rem;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.contact-close:hover { background: #f1ece2; }
.contact-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem;
  margin-top: 1.15rem;
  padding: .28rem;
  border: 1px solid var(--rule);
  border-radius: .5rem;
  background: var(--paper);
}
.contact-mode-btn {
  padding: .5rem .75rem;
  border: 0;
  border-radius: .35rem;
  background: transparent;
  color: var(--muted);
  font: 600 .84rem/1.3 var(--sans);
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}
.contact-mode-btn.is-active {
  background: var(--ink);
  color: var(--white);
}
.contact-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.15rem;
}
.contact-field {
  display: grid;
  gap: .4rem;
}
.contact-field label {
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
}
.contact-field input,
.contact-field textarea {
  width: 100%;
  padding: .65rem .8rem;
  border: 1px solid #cbbda7;
  border-radius: .45rem;
  background: var(--paper);
  color: var(--ink);
  font: 400 .95rem/1.5 var(--sans);
}
.contact-field textarea {
  resize: vertical;
  min-height: 7rem;
}
.contact-field input:focus,
.contact-field textarea:focus {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
  background: var(--white);
}
.contact-status {
  padding: .85rem 1rem;
  border-radius: .5rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  font-size: .88rem;
  line-height: 1.5;
}
.contact-status.is-info {
  border-color: #e4d4b7;
  background: var(--gold-soft);
}
.contact-status.is-success {
  border-color: #c2d6c7;
  background: #edf5ef;
  color: #275835;
}
.contact-status.is-error {
  border-color: #e3b8b8;
  background: #fdf2f2;
}
.contact-status p {
  margin-top: .3rem;
  color: var(--ink-soft);
}
.contact-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .75rem;
}
.contact-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: .65rem;
  margin-top: .25rem;
}
.footer-note {
  color: var(--muted);
  font-size: .85rem;
}

@media (max-width: 56rem) {
  .hero { min-block-size: 43.875rem; }
  .hero-pillars { grid-template-columns: 1fr; }
  .header-inner { flex-wrap: wrap; padding-block: .65rem; }
  .site-header nav { order: 1; flex-basis: 100%; gap: .45rem 1.15rem; }
}

/* Use the available browser height before deciding whether to pin the panel. */
@media (min-width: 48.01rem) and (max-height: 48rem) and (hover: hover) and (pointer: fine) {
  .services-panel {
    padding-block: clamp(1rem, 3.2svh, 2rem);
    padding-inline: clamp(1rem, 2.6vw, 2.5rem);
  }
  .services-intro { gap: .25rem 1rem; }
  .services-intro h2 { font-size: clamp(2.65rem, 8.5svh, 4.5rem); }
  .services-intro h2:is(:lang(ja), :lang(zh)) { font-size: clamp(1.65rem, 7svh, 3.45rem); }
  .services-lead {
    margin-top: .45rem;
    font-size: 1rem;
    line-height: 1.5;
  }
  .services-list {
    column-gap: clamp(1.25rem, 3vw, 3rem);
    margin-top: clamp(.65rem, 2svh, 1rem);
  }
  .services-list li { padding-block: clamp(.45rem, 1.4svh, .75rem); }
  .services-list h3 {
    margin-bottom: .2rem;
    font-size: clamp(1.33rem, 3.6svh, 1.75rem);
  }
}

@media (max-width: 40rem) {
  .services-intro, .services-list { grid-template-columns: 1fr; }
  .services-list { margin-top: .65rem; }
  .services-list li { padding-block: .76rem; }
  .services-intro > .services-link { margin: 0; }
}

@media (max-width: 36rem) {
  .hero { min-block-size: clamp(43.875rem, max(calc(74rem - 82vw), calc(84.25rem - 120vw)), 55rem); }
  .container { width: calc(100% - 2rem); }
  .header-inner { gap: .15rem 1rem; padding-block: .55rem .2rem; }
  .site-header nav a { display: inline-flex; align-items: center; min-block-size: 2.75rem; }
  .hero-actions { margin-block-start: .5rem; row-gap: .5rem; }
  .hero-pillars { margin-block-start: 1.5rem; }
  .invite-inner { align-items: flex-start; flex-direction: column; gap: 1.15rem; }
  .invite-inner h2 { text-wrap: balance; }
  .invite-actions { gap: .45rem 1rem; }
  .invite-actions .button, .invite-suggestion { min-block-size: 2.75rem; }
  .footer-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .5rem .75rem;
    padding-block: 1rem;
  }
  .footer-inner .footer-note { grid-column: 1 / -1; grid-row: 2; }
  .footer-inner a[href^="mailto:"] { justify-self: end; overflow-wrap: anywhere; }
}

@media (max-width: 30rem) {
  .hero-actions { flex-direction: column; align-items: center; }
}

@media (max-width: 24rem) {
  .hero { min-block-size: clamp(55rem, calc(76rem - 76vw), 60.8125rem); }
}

@media (min-width: 56rem) and (max-height: 52rem) {
  .hero { min-block-size: clamp(31.875rem, 42.8vw, 34.25rem); }
  .hero-inner {
    padding-block: 2.25rem 1.75rem;
  }
  .hero-eyebrow {
    margin-bottom: .75rem;
  }
  .hero h1 {
    font-size: clamp(3.1rem, 5.6vw, 5.5rem);
  }
  .hero h1:is(:lang(ja), :lang(zh)) {
    font-size: clamp(1.9rem, 4.95vw, 4.75rem);
  }
  .hero-lead {
    margin-top: 1rem;
  }
  .hero-actions {
    margin-top: 1.3rem;
  }
  .hero-pillars {
    gap: .85rem;
    padding-top: 1.1rem;
    margin-top: 1.7rem;
  }
  .hero-pillars li {
    padding: .75rem .9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
  .services-section .services-view { --services-offset: 0px; }
}

/* Demo paper sources page */
.sources-page {
  padding-block: clamp(2.5rem, 5vw, 4rem) clamp(3.5rem, 6vw, 5rem);
}
.sources-container {
  width: min(100% - 3rem, 56rem);
  margin-inline: auto;
}
.sources-header {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}
.sources-header h1 {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  line-height: 1.02;
  text-wrap: balance;
}
.sources-lead {
  margin-top: 1.15rem;
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.65;
}
.sources-snapshot {
  display: inline-block;
  margin-top: 1.25rem;
  padding: .38rem .85rem;
  border: 1px solid #d5c7b0;
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  font-size: .82rem;
  font-weight: 500;
  line-height: 1.45;
}
.sources-snapshot strong {
  color: var(--ink);
  font-weight: 600;
}
.sources-list {
  list-style: none;
  padding: 0;
  margin-top: 2rem;
  display: grid;
  gap: 1.15rem;
  counter-reset: paper;
}
.source-card {
  counter-increment: paper;
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: .25rem 1rem;
  padding: 1.45rem 1.65rem;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: .75rem;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.source-card:hover {
  border-color: #c9bca6;
  box-shadow: 0 6px 20px rgba(20, 35, 55, 0.045);
}
.source-card::before {
  content: counter(paper, decimal-leading-zero);
  padding-top: .32rem;
  color: var(--gold);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
}
.source-body {
  min-width: 0;
}
.source-title {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.3vw, 1.8rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -.01em;
}
.source-title a {
  text-decoration: none;
  transition: color 140ms ease;
}
.source-title a:hover,
.source-title a:focus-visible {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: .18em;
  text-decoration-thickness: 1px;
}
.source-meta {
  margin-top: .55rem;
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.55;
}
.source-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .65rem 1rem;
  margin-top: 1rem;
  padding-top: .9rem;
  border-top: 1px solid var(--rule);
}
.source-doi {
  color: var(--muted);
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
}
.source-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem;
}
.source-pdf-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .36rem .78rem;
  border: 1px solid #cbbda7;
  border-radius: .375rem;
  background: var(--paper);
  color: var(--ink);
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 140ms ease, border-color 140ms ease;
}
.source-pdf-link:hover {
  background: #f1ece2;
  border-color: #9e8a6b;
}
.source-license-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .34rem .72rem;
  border: 1px solid #e4d4b7;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 140ms ease, border-color 140ms ease;
}
.source-license-badge:hover {
  background: var(--gold-bright);
  border-color: #cbb184;
}

@media (max-width: 36rem) {
  .sources-container {
    width: calc(100% - 2rem);
  }
  .sources-snapshot {
    border-radius: .6rem;
    padding: .5rem .85rem;
  }
  .sources-back-btn {
    min-height: 2.25rem;
    padding: .4rem .75rem;
    font-size: .8rem;
  }
  .source-card {
    grid-template-columns: 1fr;
    gap: .35rem;
    padding: 1.15rem 1.2rem;
  }
  .source-card::before {
    padding-top: 0;
  }
}