:root {
  --sun: #ffe8a8;
  --peach: #ffc39d;
  --coral: #ff8e8d;
  --ink: #181514;
  --muted: #6f5c56;
  --cream: #fffdf8;
  --white: rgba(255, 255, 255, .88);
  --line: rgba(87, 48, 37, .14);
  --shadow: 0 22px 60px rgba(137, 67, 49, .15);
  --gutter: clamp(1rem, 4vw, 3.25rem);
  --measure: 82rem;
  --round: ui-rounded, "SF Pro Rounded", "Avenir Next Rounded", "Trebuchet MS", sans-serif;
  --body: "Avenir Next", Avenir, "Gill Sans", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  overflow-x: clip;
  scroll-behavior: smooth;
  background: var(--sun);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 9% 18%, rgba(255, 255, 255, .72), transparent 24rem),
    radial-gradient(circle at 88% 12%, rgba(255, 107, 122, .34), transparent 31rem),
    linear-gradient(132deg, var(--sun) 0%, var(--peach) 52%, var(--coral) 110%);
  background-attachment: fixed;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(2px);
  pointer-events: none;
}

.ambient-one {
  top: 12rem;
  left: -7rem;
  width: 18rem;
  height: 18rem;
  background: rgba(255, 255, 255, .22);
}

.ambient-two {
  right: -8rem;
  bottom: 5rem;
  width: 23rem;
  height: 23rem;
  background: rgba(255, 228, 154, .28);
}

a {
  color: inherit;
  text-decoration-thickness: .1em;
  text-underline-offset: .2em;
}

a:hover { text-decoration-color: var(--coral); }

main {
  width: min(100%, var(--measure));
  min-height: calc(100vh - 5rem);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.75rem) var(--gutter);
}

.home {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(350px, 1.1fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 7rem);
  min-height: min(710px, calc(100vh - 11rem));
}

.mascot-stage {
  position: relative;
  animation: rise-in .75s both cubic-bezier(.2, .8, .2, 1);
}

.mascot-stage::before {
  position: absolute;
  inset: 15% 4% 2%;
  z-index: -1;
  border-radius: 48% 52% 44% 56%;
  background: rgba(255, 255, 255, .45);
  content: "";
  filter: blur(28px);
}

.mascot-stage img {
  display: block;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: clamp(2rem, 6vw, 5rem);
  box-shadow: var(--shadow);
  animation: gentle-float 7s ease-in-out 1s infinite;
}

.hero-copy {
  padding-bottom: 2rem;
  animation: rise-in .75s .12s both cubic-bezier(.2, .8, .2, 1);
}

.home h1,
.page-head h1 {
  margin: .25rem 0 1.25rem;
  max-width: 58rem;
  font-family: var(--round);
  font-size: clamp(4rem, 8vw, 7.7rem);
  font-weight: 900;
  letter-spacing: -.065em;
  line-height: .92;
}

.lede {
  max-width: 35rem;
  margin: 1.6rem 0 0;
  color: #4a3935;
  font-size: clamp(1.1rem, 1.8vw, 1.45rem);
  font-weight: 520;
  line-height: 1.55;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 2rem;
}

.hero-links a {
  padding: .72rem 1rem;
  border: 1px solid rgba(24, 21, 20, .16);
  border-radius: 999px;
  font-family: var(--round);
  font-size: .83rem;
  font-weight: 800;
  text-decoration: none;
}

.hero-links .primary-link {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.contact-link {
  display: inline-block;
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 650;
}

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

.catalog-hero {
  display: grid;
  grid-template-columns: minmax(8rem, 13rem) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.4rem, 4vw, 3rem);
  margin-bottom: clamp(3rem, 7vw, 6rem);
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: clamp(2rem, 5vw, 4rem);
  background: rgba(255, 255, 255, .5);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: rise-in .65s both cubic-bezier(.2, .8, .2, 1);
}

.catalog-hero img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: clamp(1.5rem, 4vw, 3rem);
  box-shadow: 0 15px 40px rgba(137, 67, 49, .16);
  object-fit: cover;
}

.catalog-hero h1 {
  margin: 0;
  font-family: var(--round);
  font-size: clamp(3.5rem, 8vw, 7.5rem);
  font-weight: 900;
  letter-spacing: -.065em;
  line-height: .92;
}

.catalog-hero p {
  max-width: 42rem;
  margin: 1.1rem 0 0;
  color: #4a3935;
  font-size: clamp(1rem, 1.7vw, 1.3rem);
}

.catalog-hero-content {
  min-width: 0;
}

.hero-verify {
  display: grid;
  grid-template-columns: minmax(13rem, .75fr) minmax(18rem, 1.25fr);
  grid-column: 2;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(87, 48, 37, .12);
  border-radius: 1.35rem;
  background: rgba(255, 253, 248, .58);
}

.hero-verify .eyebrow {
  display: block;
  margin-bottom: .1rem;
}

.hero-verify strong {
  font-family: var(--round);
  font-size: 1rem;
  font-weight: 850;
}

.hero-verify p {
  margin: .25rem 0 0;
  font-size: .82rem;
  line-height: 1.45;
}

.hero-verify pre {
  min-width: 0;
  margin: 0;
  padding: .8rem;
  font-size: clamp(.58rem, .8vw, .72rem);
}

.catalog-heading {
  max-width: 58rem;
  margin-bottom: 1.5rem;
}

.catalog-heading h2,
.verify-panel h2 {
  margin: .1rem 0 .65rem;
  font-family: var(--round);
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -.05em;
  line-height: .98;
}

.catalog-heading > p:last-child,
.verify-panel p {
  max-width: 48rem;
  margin: 0;
  color: var(--muted);
}

.catalog-tools {
  position: sticky;
  top: .75rem;
  z-index: 5;
  display: grid;
  gap: .85rem;
  margin-bottom: 1.25rem;
  padding: .9rem;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 1.6rem;
  background: rgba(255, 248, 234, .82);
  box-shadow: 0 16px 34px rgba(137, 67, 49, .12);
  backdrop-filter: blur(22px);
}

.type-tabs {
  display: flex;
  gap: .42rem;
  overflow-x: auto;
  padding-bottom: .08rem;
  scrollbar-width: none;
}

.type-tabs::-webkit-scrollbar { display: none; }

.type-tabs button,
.clear-filters {
  flex: 0 0 auto;
  padding: .58rem .78rem;
  border: 1px solid rgba(24, 21, 20, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .58);
  color: #543d38;
  font: 800 .72rem/1 var(--round);
  cursor: pointer;
}

.type-tabs button:hover,
.clear-filters:hover {
  background: rgba(255, 255, 255, .9);
}

.type-tabs button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.catalog-fields {
  display: grid;
  grid-template-columns: minmax(14rem, 1.5fr) minmax(12rem, 1fr) minmax(10rem, .8fr) auto;
  align-items: end;
  gap: .65rem;
}

.catalog-fields label {
  display: grid;
  gap: .25rem;
  color: var(--muted);
  font-family: var(--round);
  font-size: .61rem;
  font-weight: 850;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.catalog-fields input,
.catalog-fields select {
  width: 100%;
  min-width: 0;
  appearance: none;
  padding: .72rem .82rem;
  border: 1px solid rgba(24, 21, 20, .14);
  border-radius: .95rem;
  outline: none;
  background: rgba(255, 253, 248, .94);
  color: var(--ink);
  font: 750 .8rem/1.2 var(--round);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .82),
    0 5px 13px rgba(137, 67, 49, .06);
}

.catalog-fields input {
  padding-right: .82rem;
}

.catalog-fields input:focus,
.catalog-fields select:focus {
  border-color: rgba(24, 21, 20, .42);
  box-shadow: 0 0 0 3px rgba(255, 177, 132, .28);
}

.catalog-fields .select-shell::after {
  right: .85rem;
}

.clear-filters {
  min-height: 2.72rem;
  padding-inline: .9rem;
}

.catalog-list {
  display: grid;
  gap: 1rem;
}

.catalog-list .content-card {
  min-height: 0;
  padding: clamp(1.35rem, 3vw, 2rem);
}

.catalog-list .content-card h2 {
  max-width: 64rem;
}

.catalog-list .card-math {
  min-height: 0;
  padding-block: 1.15rem;
}

.catalog-list .content-card > p {
  max-width: 64rem;
}

.catalog-list .card-kicker {
  color: #75463d;
}

.catalog-list .content-card[data-type="paper"] .card-kicker {
  color: #8c5f20;
}

.catalog-list .content-card[data-type="correction"] .card-kicker {
  color: #a23f42;
}

.citation-line {
  margin: -.25rem 0 .45rem;
  color: var(--muted) !important;
  font-family: var(--round);
  font-size: .72rem;
  font-weight: 800;
}

.empty-state {
  padding: 2rem;
  border: 1px dashed rgba(24, 21, 20, .22);
  border-radius: 1.6rem;
  background: rgba(255, 255, 255, .42);
  color: var(--muted);
  text-align: center;
}

.verify-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, .8fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  margin-top: clamp(4rem, 8vw, 7rem);
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: clamp(2rem, 5vw, 3.5rem);
  background: rgba(255, 255, 255, .58);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.verify-panel h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.verify-panel pre {
  margin: 0;
}

.eyebrow,
.record-id,
.paper-meta,
.author-line {
  color: var(--muted);
  font-family: var(--round);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .045em;
}

.eyebrow { margin: 0 0 .7rem; }

.record-id {
  opacity: .72;
  font-size: .62rem;
  text-transform: uppercase;
}

.item-flags,
.result-flags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
}

.result-flags { margin-top: 1rem; }

.category-tag {
  display: inline-flex;
  width: fit-content;
  padding: .27rem .5rem;
  border-radius: 999px;
  background: rgba(255, 225, 166, .72);
  color: #69433b;
  font-family: var(--round);
  font-size: .6rem;
  font-weight: 850;
  letter-spacing: .025em;
}

.interest-badge {
  display: inline-grid;
  justify-items: start;
  gap: .26rem;
  width: fit-content;
  margin-top: .68rem;
  padding: 0;
  color: #704139;
  font-family: var(--round);
  line-height: 1;
}

.result-flags .interest-badge { margin-top: 0; }

.interest-stars {
  display: inline-flex;
  gap: .06rem;
  padding: .35rem .52rem .38rem;
  border-radius: 999px;
  background: var(--ink);
  color: #ffd27b;
  font-size: .74rem;
  letter-spacing: -.04em;
  box-shadow: 0 5px 13px rgba(24, 21, 20, .12);
}

.interest-stars .empty { color: rgba(255, 240, 202, .32); }

.interest-label {
  padding-left: .18rem;
  color: var(--muted);
  font-size: .58rem;
  font-weight: 850;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.page-head {
  max-width: 66rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  padding: clamp(1.5rem, 4vw, 3.25rem);
  border: 1px solid rgba(255, 255, 255, .68);
  border-radius: clamp(1.6rem, 4vw, 3.5rem);
  background: rgba(255, 255, 255, .5);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: rise-in .65s both cubic-bezier(.2, .8, .2, 1);
}

.page-head h1 {
  max-width: 56rem;
  font-size: clamp(3rem, 6vw, 5.6rem);
}

.page-head > p:last-child {
  max-width: 49rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.06rem;
}

[hidden] { display: none !important; }

.collection-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 1rem;
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 1.45rem;
  background: rgba(255, 255, 255, .58);
  box-shadow: 0 12px 30px rgba(137, 67, 49, .08);
  backdrop-filter: blur(16px);
}

.tool-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: .75rem;
}

.tool-fields label {
  display: grid;
  gap: .28rem;
  color: var(--muted);
  font-family: var(--round);
  font-size: .65rem;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.tool-fields select {
  width: 100%;
  min-width: 13rem;
  appearance: none;
  padding: .74rem 2.5rem .74rem .86rem;
  border: 1px solid rgba(24, 21, 20, .14);
  border-radius: 1rem;
  background: rgba(255, 253, 248, .92);
  color: var(--ink);
  font: 750 .82rem/1.2 var(--round);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .8),
    0 6px 16px rgba(137, 67, 49, .07);
  cursor: pointer;
}

.select-shell {
  position: relative;
  display: block;
}

.select-shell::after {
  position: absolute;
  top: 50%;
  right: .95rem;
  width: .42rem;
  height: .42rem;
  border-right: 2px solid #754b42;
  border-bottom: 2px solid #754b42;
  content: "";
  pointer-events: none;
  transform: translateY(-70%) rotate(45deg);
}

.collection-count {
  align-self: center;
  padding: .55rem .78rem;
  border-radius: 999px;
  background: rgba(255, 231, 169, .72);
  color: #6e4238;
  font-family: var(--round);
  font-size: .72rem;
  font-weight: 850;
}

.interest-guide {
  width: min(100%, 22rem);
  color: var(--muted);
  font-size: .78rem;
}

.interest-guide summary {
  padding: .65rem .8rem;
  border-radius: .9rem;
  background: rgba(255, 255, 255, .64);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--round);
  font-weight: 800;
}

.interest-guide ol {
  margin: .7rem 0 0;
  padding-left: 1.5rem;
}

.interest-guide li { margin: .28rem 0; }

.record-list {
  display: grid;
  gap: 1rem;
}

.record-card {
  padding: clamp(1.3rem, 3vw, 2rem);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 2rem;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 14px 35px rgba(137, 67, 49, .1);
  backdrop-filter: blur(18px);
  animation: rise-in .65s .08s both cubic-bezier(.2, .8, .2, 1);
}

.record-card-head,
.record-card-footer,
.record-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.record-card-head .interest-badge { margin-top: 0; }

.record-formula {
  max-width: 65rem;
  margin: 1.25rem 0 1.1rem;
  font-size: clamp(1.16rem, 2vw, 1.45rem);
  font-weight: 540;
  line-height: 1.48;
}

.record-comparison {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  background: rgba(255, 252, 244, .58);
}

.record-comparison section {
  min-width: 0;
  padding: 1rem 1.1rem 1.15rem;
  color: #4f3f3a;
}

.record-comparison section + section {
  border-left: 1px solid var(--line);
}

.record-comparison .new-record {
  background: rgba(255, 228, 170, .28);
  color: var(--ink);
}

.comparison-label {
  display: block;
  margin-bottom: .5rem;
  color: var(--muted);
  font-family: var(--round);
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.record-card-footer {
  align-items: flex-end;
  margin-top: 1rem;
}

.record-card-footer .caveat {
  max-width: 55rem;
  margin: 0;
}

.record-actions {
  flex: 0 0 auto;
  align-items: center;
}

.record-actions time {
  color: var(--muted);
  font-family: var(--round);
  font-size: .68rem;
  font-weight: 800;
}

.caveat { margin: .65rem 0 0; color: var(--muted); font-size: .82rem; line-height: 1.48; }

.download,
.text-link {
  display: inline-block;
  padding: .48rem .7rem;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-family: var(--round);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .015em;
  text-decoration: none;
}

.paper-grid,
.theorem-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.theorem-card,
.paper-card {
  display: flex;
  min-width: 0;
  min-height: 330px;
  flex-direction: column;
  padding: clamp(1.4rem, 3vw, 2.15rem);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 2rem;
  background: rgba(255, 255, 255, .7);
  box-shadow: 0 14px 35px rgba(137, 67, 49, .1);
  backdrop-filter: blur(16px);
  animation: rise-in .6s both cubic-bezier(.2, .8, .2, 1);
}

.theorem-card:nth-child(2n),
.paper-card:nth-child(2n) { animation-delay: .08s; }

.theorem-card:hover,
.paper-card:hover {
  border-color: rgba(255, 255, 255, .95);
  transform: translateY(-3px);
  transition: transform .2s ease, border-color .2s ease;
}

.theorem-card h2,
.paper-card h2 {
  margin: 1.1rem 0 .75rem;
  font-family: var(--round);
  font-size: 1.8rem;
  font-weight: 850;
  letter-spacing: -.025em;
  line-height: 1.12;
}

.theorem-card .download { align-self: flex-start; margin-top: auto; }

.theorem-meta,
.paper-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.theorem-statement { margin-bottom: .4rem; color: #4f3f3a; font-size: 1.01rem; }
.paper-card p { color: var(--muted); }

.badge,
.notice {
  display: inline-block;
  padding: .28rem .52rem;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-family: var(--round);
  font-size: .6rem;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.badge.draft,
.badge.working,
.notice {
  background: var(--coral);
  color: var(--ink);
}

.work-banner {
  display: block;
  margin: .6rem 0 0;
  padding: .6rem .85rem;
  border-radius: .8rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 650;
  font-size: .82rem;
  line-height: 1.45;
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: auto;
  font-family: var(--round);
  font-size: .76rem;
  font-weight: 750;
}

.paper-links a {
  padding: .38rem .6rem;
  border-radius: 999px;
  background: rgba(255, 224, 167, .54);
  text-decoration: none;
}

.author-line { margin: 1.5rem 0 0; color: var(--ink) !important; }

.correction-list {
  display: grid;
  max-width: 65rem;
  gap: 1rem;
}

.correction {
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 2rem;
  background: rgba(255, 255, 255, .7);
  box-shadow: 0 14px 35px rgba(137, 67, 49, .1);
}

.correction-top { display: flex; align-items: center; gap: .75rem; }

.correction h2 {
  max-width: 53rem;
  margin: .75rem 0;
  font-family: var(--round);
  font-size: 1.65rem;
  font-weight: 850;
  letter-spacing: -.02em;
  line-height: 1.18;
}

.correction p { max-width: 880px; color: #4f3f3a; }

.collection-tools {
  grid-template-columns: 1fr;
}

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

.content-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 330px;
  flex-direction: column;
  padding: clamp(1.4rem, 3vw, 2.15rem);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 2rem;
  background: rgba(255, 255, 255, .7);
  box-shadow: 0 14px 35px rgba(137, 67, 49, .1);
  backdrop-filter: blur(16px);
  animation: rise-in .6s both cubic-bezier(.2, .8, .2, 1);
}

.content-card:nth-child(2n) { animation-delay: .08s; }

.content-card[data-card-href] { cursor: pointer; }

.content-card:hover,
.content-card:focus-visible {
  border-color: rgba(255, 255, 255, .98);
  outline: none;
  transform: translateY(-3px);
  transition: transform .2s ease, border-color .2s ease;
}

.card-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-family: var(--round);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .035em;
}

.card-kicker {
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.card-meta time {
  flex: 0 0 auto;
  white-space: nowrap;
}

.content-card h2 {
  margin: 1.2rem 0 .8rem;
  font-family: var(--round);
  font-size: clamp(1.45rem, 2.4vw, 1.95rem);
  font-weight: 850;
  letter-spacing: -.028em;
  line-height: 1.12;
}

.content-card > p {
  color: #4f3f3a;
}

.card-math {
  display: grid;
  min-height: 7.5rem;
  place-items: center;
  overflow-x: auto;
  margin: .25rem 0 .6rem;
  padding: 1rem .4rem;
  border-block: 1px solid var(--line);
  font-size: clamp(.86rem, 1.4vw, 1.04rem);
}

.card-math .katex-display,
.math-hero .katex-display,
.math-block .katex-display {
  max-width: 100%;
  margin: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: .2rem 0;
}

.card-actions,
.certificate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: auto;
  padding-top: 1.2rem;
}

.read-link,
.soft-link,
.back-link {
  display: inline-block;
  padding: .48rem .72rem;
  border-radius: 999px;
  font-family: var(--round);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .015em;
  text-decoration: none;
}

.read-link {
  background: var(--ink);
  color: white;
}

.soft-link,
.back-link {
  border: 1px solid rgba(24, 21, 20, .12);
  background: rgba(255, 224, 167, .48);
}

.notice-line {
  font-family: var(--round);
  font-size: .72rem;
  font-weight: 800;
}

.certificate-page {
  min-width: 0;
  width: min(100%, 68rem);
  margin: 0 auto;
}

.history-page {
  min-width: 0;
  width: min(100%, 72rem);
  margin: 0 auto;
}

.back-link {
  margin-bottom: 1rem;
}

.certificate-hero,
.history-hero,
.certificate-box,
.scope-box,
.source-box,
.walkthrough-section {
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, .72);
  background: rgba(255, 255, 255, .7);
  box-shadow: 0 14px 35px rgba(137, 67, 49, .1);
  backdrop-filter: blur(16px);
}

.certificate-hero {
  padding: clamp(1.6rem, 5vw, 4rem);
  border-radius: clamp(2rem, 5vw, 4rem);
}

.history-hero {
  padding: clamp(1.6rem, 5vw, 4rem);
  border-radius: clamp(2rem, 5vw, 4rem);
}

.certificate-hero h1,
.history-hero h1 {
  margin: 1.2rem 0;
  font-family: var(--round);
  font-size: clamp(2.6rem, 6vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -.055em;
  line-height: .98;
}

.history-hero > p:not(.eyebrow) {
  max-width: 48rem;
  color: #4f3f3a;
  font-size: 1.05rem;
}

.history-hero .read-link {
  margin-top: 1rem;
}

.history-list,
.history-index-list {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.history-entry,
.history-index-card {
  min-width: 0;
  padding: clamp(1.35rem, 4vw, 2.6rem);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 2rem;
  background: rgba(255, 255, 255, .66);
  box-shadow: 0 14px 35px rgba(137, 67, 49, .1);
  backdrop-filter: blur(16px);
}

.history-entry.current {
  border-color: rgba(24, 21, 20, .24);
  background: rgba(255, 238, 195, .78);
}

.history-entry h2,
.history-index-card h2 {
  margin: 1rem 0 .7rem;
  font-family: var(--round);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 850;
  letter-spacing: -.025em;
  line-height: 1.14;
}

.history-entry > p,
.history-index-card > p {
  max-width: 60rem;
  color: #4f3f3a;
}

.history-path {
  overflow-wrap: anywhere;
  color: var(--muted) !important;
  font-family: var(--mono);
  font-size: .78rem;
}

.history-index-card .read-link {
  margin-top: .45rem;
}

.certificate-abstract {
  max-width: 53rem;
  color: #4f3f3a;
  font-size: 1.08rem;
}

.math-hero {
  overflow-x: auto;
  margin: 1.6rem 0 .5rem;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: rgba(255, 252, 244, .58);
  font-size: clamp(.95rem, 2vw, 1.25rem);
}

.walkthrough-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin: 1rem 0;
}

.walkthrough-section,
.certificate-box,
.scope-box,
.source-box {
  padding: clamp(1.35rem, 4vw, 2.6rem);
  border-radius: 2rem;
}

.walkthrough-section h2 {
  margin: 0 0 .8rem;
  font-family: var(--round);
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  font-weight: 850;
  letter-spacing: -.025em;
}

.walkthrough-section p,
.walkthrough-section li,
.certificate-box p,
.scope-box p {
  color: #463834;
}

.walkthrough-section ol {
  padding-left: 1.4rem;
}

.math-block {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  margin: 1.1rem 0;
  padding: 1rem;
  border-radius: 1.2rem;
  background: rgba(255, 235, 190, .35);
}

.file-list,
.source-box ul {
  display: grid;
  gap: .5rem;
  padding-left: 1.15rem;
}

.source-box li {
  display: grid;
  gap: .12rem;
}

.source-box code,
.file-list code {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: .72rem;
}

.source-box cite {
  color: #463834;
  font-style: normal;
}

.source-box li > a {
  width: fit-content;
  font-family: var(--round);
  font-size: .72rem;
  font-weight: 800;
}

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

.verify-steps article {
  min-width: 0;
  padding: 1.35rem;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 1.6rem;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 14px 35px rgba(137, 67, 49, .1);
}

.verify-steps span {
  color: #8f3f40;
  font-family: var(--round);
  font-size: .7rem;
  font-weight: 900;
}

.verify-steps h2 {
  font-family: var(--round);
  font-size: 1.15rem;
  font-weight: 850;
}

pre {
  overflow-x: auto;
  padding: 1rem;
  border-radius: 1rem;
  background: var(--ink);
  color: #fff8e9;
  font: .75rem/1.5 var(--mono);
}

.verify-note {
  max-width: 760px;
  padding: 1rem 1.2rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, .45);
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  width: min(100%, var(--measure));
  margin: 0 auto;
  padding: 1.1rem var(--gutter) 1.75rem;
  color: #5f4943;
  font-family: var(--round);
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .025em;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes gentle-float {
  0%, 100% { transform: translateY(0) rotate(-.25deg); }
  50% { transform: translateY(-8px) rotate(.25deg); }
}

@media (max-width: 900px) {
  .home { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 2rem; }
  .card-grid, .paper-grid, .theorem-grid, .verify-steps { grid-template-columns: 1fr; }
  .collection-tools { grid-template-columns: 1fr; }
  .interest-guide { width: 100%; }
  .catalog-fields { grid-template-columns: minmax(0, 1fr) minmax(11rem, .8fr); }
  .search-field { grid-column: 1 / -1; }
  .clear-filters { min-width: 7rem; }
  .hero-verify { grid-template-columns: 1fr; }
  .verify-panel { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  main { padding-top: 1.5rem; padding-bottom: 3rem; }
  .home { grid-template-columns: 1fr; min-height: auto; }
  .mascot-stage { width: min(88vw, 25rem); margin: 0 auto; }
  .hero-copy { order: -1; padding-bottom: 0; }
  .home h1 { font-size: clamp(3.7rem, 18vw, 6.2rem); }
  .page-head h1 { font-size: clamp(2.8rem, 14vw, 4.5rem); }
  .page-head { border-radius: 2rem; }
  .catalog-hero {
    grid-template-columns: 5.5rem minmax(0, 1fr);
    align-items: start;
    border-radius: 2rem;
  }
  .catalog-hero h1 { font-size: clamp(2.8rem, 13vw, 4.8rem); }
  .catalog-hero p { margin-top: .7rem; font-size: .92rem; }
  .catalog-hero .contact-link { margin-top: .8rem; }
  .hero-verify {
    grid-column: 1 / -1;
    margin-top: 1rem;
    padding: .85rem;
  }
  .hero-verify p { margin-top: .2rem; font-size: .78rem; }
  .hero-verify pre {
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    font-size: .57rem;
  }
  .catalog-tools { position: static; padding: .75rem; }
  .catalog-fields { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .clear-filters { width: 100%; }
  .theorem-meta { align-items: flex-start; flex-wrap: wrap; }
  .tool-fields { align-items: stretch; flex-direction: column; }
  .tool-fields label, .tool-fields select, .select-shell { width: 100%; }
  .record-card-head, .record-card-footer { flex-direction: column; }
  .record-comparison { grid-template-columns: 1fr; }
  .record-comparison section + section {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .record-actions { width: 100%; justify-content: space-between; }
  .content-card { min-height: 0; }
  .certificate-hero h1, .history-hero h1 { overflow-wrap: anywhere; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: .25rem; }
}

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