:root {
  --paper: #f7f1e5;
  --paper-deep: #eee3d0;
  --surface: #fffaf0;
  --ink: #183027;
  --ink-soft: #637069;
  --forest: #123f31;
  --forest-light: #d9e7de;
  --gold: #b38332;
  --focus: #81500a;
  --line: #ddd1bd;
  --shadow: 0 22px 60px rgb(37 47 39 / 12%);
  --shadow-soft: 0 10px 32px rgb(37 47 39 / 8%);
  --body-glow: rgb(255 255 255 / 55%);
  --header-surface: rgb(255 250 240 / 92%);
  --panel-strong: rgb(255 250 240 / 86%);
  --panel: rgb(255 250 240 / 78%);
  --panel-soft: rgb(255 253 248 / 55%);
  --panel-faint: rgb(255 253 248 / 48%);
  --card-border: rgb(221 209 189 / 88%);
  --support-surface: rgb(229 218 193 / 28%);
  --intro-ink: #45564e;
  --primary-ink: white;
  --primary-hover: #102f25;
  --footer-ink: #dfe8e2;
  --footer-soft: #aebbb4;
  --radius-sm: 0.6rem;
  --radius-md: 1rem;
  --radius-lg: 1.45rem;
  --shell: min(100% - 2rem, 78rem);
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia,
    "Times New Roman", serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #101915;
  --paper-deep: #18251f;
  --surface: #1d2a24;
  --ink: #f3ecde;
  --ink-soft: #b6c0b9;
  --forest: #d8c28e;
  --forest-light: #243a30;
  --gold: #c99b4d;
  --focus: #efc56f;
  --line: #35483f;
  --shadow: 0 22px 60px rgb(0 0 0 / 28%);
  --shadow-soft: 0 10px 32px rgb(0 0 0 / 20%);
  --body-glow: rgb(74 111 92 / 16%);
  --header-surface: rgb(15 24 20 / 92%);
  --panel-strong: rgb(27 40 34 / 94%);
  --panel: rgb(28 42 35 / 88%);
  --panel-soft: rgb(34 50 42 / 82%);
  --panel-faint: rgb(26 39 33 / 72%);
  --card-border: rgb(68 89 78 / 88%);
  --support-surface: rgb(111 84 38 / 18%);
  --intro-ink: #c7d0ca;
  --primary-ink: #fffaf0;
  --primary-hover: #326b55;
  --footer-ink: #e9e1d2;
  --footer-soft: #aebbb4;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 0%, var(--body-glow), transparent 34rem),
    var(--paper);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
  border-radius: 0.2rem;
}

#main-content {
  scroll-margin-top: 1rem;
}

#main-content:focus {
  outline: none;
}

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.6rem 0.9rem;
  color: white;
  background: var(--forest);
  transform: translateY(-180%);
}

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

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid rgb(18 63 49 / 12%);
  background: var(--header-surface);
  box-shadow: 0 3px 18px rgb(37 47 39 / 4%);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5rem;
  gap: 1.25rem;
  min-width: 0;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.42rem;
  text-decoration: none;
  letter-spacing: 0.06em;
  min-width: 0;
}

.wordmark__primary {
  color: var(--forest);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
}

.wordmark__secondary {
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 4vw, 2.25rem);
  font-size: 0.9rem;
  font-weight: 650;
}

.site-nav a {
  position: relative;
  padding-block: 0.45rem;
  color: var(--ink-soft);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--forest);
}

.site-nav a[aria-current="page"]::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--gold);
  content: "";
}

.preview-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  color: #321d00;
  background: #f3c875;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-banner a {
  padding: 0.3rem 0.55rem;
  border: 1px solid rgb(50 29 0 / 35%);
  border-radius: 999px;
  color: inherit;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-decoration: none;
  text-transform: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(24rem, 1.14fr);
  min-height: clamp(38rem, 72vh, 49rem);
  margin-block: clamp(1.25rem, 3vw, 2.5rem);
  overflow: hidden;
  border: 1px solid rgb(18 63 49 / 13%);
  border-radius: var(--radius-lg);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.hero__copy {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: clamp(3rem, 6vw, 6rem);
}

.hero h1,
.page-header h1,
.note-detail__header h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.hero h1 {
  max-width: 12ch;
  color: var(--forest);
  font-size: clamp(3.4rem, 6.8vw, 6.25rem);
  letter-spacing: -0.055em;
  line-height: 0.9;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--forest);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero__intro {
  max-width: 31rem;
  margin: 1.65rem 0 0;
  color: var(--intro-ink);
  font-size: clamp(1rem, 1.6vw, 1.16rem);
}

.hero__accent {
  width: 3.2rem;
  height: 2px;
  margin-top: 1.7rem;
  background: var(--gold);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  margin-top: 2rem;
  gap: 0.75rem;
}

.hero__seal {
  display: flex;
  align-items: center;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  gap: 0.65rem;
  color: var(--forest);
}

.hero__seal strong {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
}

.hero__seal span {
  padding-top: 0.25rem;
  border-top: 1px solid var(--gold);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.26em;
}

.hero__visual {
  position: relative;
  min-width: 0;
  min-height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 13%, rgb(255 255 255 / 90%), transparent 24rem),
    linear-gradient(136deg, #eee3ce 0%, #ded0b6 52%, #b5b195 100%);
  isolation: isolate;
}

.hero__visual::before,
.hero__visual::after {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.site-header__actions {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.85rem;
}

.site-nav .site-nav__support {
  min-height: 2.4rem;
  padding: 0.38rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--forest);
  background: var(--panel-soft);
}

.site-nav .site-nav__support:hover {
  border-color: var(--gold);
  background: var(--paper-deep);
}

.theme-toggle {
  display: inline-grid;
  flex: 0 0 2.75rem;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--forest);
  background: var(--panel-soft);
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease,
    transform 160ms ease;
}

.theme-toggle:hover {
  border-color: var(--gold);
  background: var(--paper-deep);
  transform: translateY(-1px);
}

.theme-toggle__sun {
  display: none;
}

html[data-theme="dark"] .theme-toggle__sun {
  display: inline;
}

html[data-theme="dark"] .theme-toggle__moon {
  display: none;
}

.hero__visual::before {
  top: -18%;
  right: -16%;
  width: 68%;
  aspect-ratio: 1;
  background: rgb(18 63 49 / 88%);
  box-shadow: 0 18px 50px rgb(18 63 49 / 22%);
}

.hero__visual::after {
  bottom: -18%;
  left: -8%;
  width: 52%;
  aspect-ratio: 1;
  border: 1px solid rgb(179 131 50 / 48%);
  background: rgb(255 250 240 / 28%);
}

.hero__visual-label {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 5;
  padding: 0.4rem 0.65rem;
  border: 1px solid rgb(255 255 255 / 54%);
  border-radius: 999px;
  color: white;
  background: rgb(18 63 49 / 76%);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.hero__note {
  position: absolute;
  z-index: 3;
  width: 54%;
  aspect-ratio: 1;
  margin: 0;
  overflow: hidden;
  border: 0.55rem solid rgb(255 250 240 / 94%);
  border-radius: 0.45rem;
  background: var(--surface);
  box-shadow: 0 24px 55px rgb(30 40 33 / 28%);
}

.hero__note img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f1eadc;
}

.hero__note--1 {
  top: 10%;
  left: 23%;
  transform: rotate(-1.5deg);
}

.hero__note--2 {
  bottom: 4%;
  left: 2%;
  z-index: 2;
  width: 38%;
  transform: rotate(-7deg);
}

.hero__note--3 {
  right: -2%;
  bottom: 8%;
  z-index: 4;
  width: 35%;
  transform: rotate(7deg);
}

.hero__mark {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: min(68%, 28rem);
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid rgb(18 63 49 / 17%);
  border-radius: 50%;
  color: var(--forest);
  background:
    radial-gradient(circle at 35% 30%, rgb(255 255 255 / 78%), transparent 40%),
    var(--paper-deep);
  box-shadow: inset 0 0 0 1.25rem var(--paper);
  transform: translate(-50%, -50%);
}

.hero__mark span {
  font-family: var(--font-serif);
  font-size: clamp(4rem, 9vw, 7.5rem);
  transform: rotate(-4deg);
}

.home-support {
  display: none;
}

.home-discovery {
  display: grid;
  grid-template-columns: minmax(7rem, 10rem) minmax(0, 1fr);
  align-items: center;
  margin-block: clamp(1.25rem, 3vw, 2.5rem) 0;
  padding: clamp(0.8rem, 2vw, 1.15rem);
  gap: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.home-discovery__image {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--paper-deep);
}

.home-discovery__image img {
  width: 100%;
  height: 100%;
  padding: 0.4rem;
  object-fit: contain;
}

.home-discovery__content {
  min-width: 0;
}

.home-discovery__content .eyebrow {
  margin-bottom: 0.45rem;
}

.home-discovery__content h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 550;
  letter-spacing: -0.03em;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.home-discovery__content > p:not(.eyebrow) {
  max-width: 48rem;
  margin: 0.65rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.home-discovery__actions {
  display: flex;
  flex-wrap: wrap;
  margin-top: 0.8rem;
  gap: 0.65rem 1.25rem;
  font-size: 0.86rem;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(12rem, 0.55fr) minmax(0, 1fr);
  align-items: end;
  margin-block: clamp(1.25rem, 3vw, 2.5rem) 0;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  gap: clamp(1.5rem, 5vw, 4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.search-panel h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
  gap: 0.65rem;
}

.search-form input[type="search"] {
  min-width: 0;
  min-height: 3.2rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.72rem;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
}

.search-form input[type="search"]::placeholder {
  color: var(--ink-soft);
}

.page-header .search-form {
  max-width: 48rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.2rem;
  padding: 0.75rem 1.3rem;
  gap: 0.75rem;
  border: 1px solid var(--forest);
  border-radius: 0.72rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 7px 18px rgb(18 63 49 / 8%);
  transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgb(18 63 49 / 15%);
}

.button--primary {
  color: var(--primary-ink);
  background: var(--forest);
}

.button--primary:hover {
  background: var(--primary-hover);
}

.button--secondary {
  color: var(--forest);
  background: var(--panel-soft);
}

.section {
  padding-block: clamp(3.5rem, 8vw, 7rem);
  border-top: 1px solid var(--line);
}

.collection-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: clamp(1rem, 4vw, 3rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.collection-values article {
  display: flex;
  align-items: flex-start;
  min-width: 0;
  padding: clamp(1.35rem, 3vw, 2rem);
  gap: 1rem;
}

.collection-values article + article {
  border-left: 1px solid var(--line);
}

.collection-values article > span {
  display: grid;
  flex: 0 0 2.6rem;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border: 1px solid rgb(179 131 50 / 50%);
  border-radius: 50%;
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 0.78rem;
}

.collection-values h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.35;
}

.collection-values p {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.5;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 2rem;
}

.section-heading h2,
.empty-state h2 {
  max-width: 20ch;
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.text-link {
  color: var(--forest);
  font-weight: 700;
  white-space: nowrap;
}

.page-header {
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2.25rem, 5vw, 3.75rem);
}

.page-header h1 {
  font-size: clamp(3rem, 5vw, 4.6rem);
}

.note-detail__header h1 {
  font-size: clamp(2.85rem, 4.6vw, 4.45rem);
}

.page-header > p:last-child {
  max-width: 42rem;
  margin: 1.4rem 0 0;
  color: var(--ink-soft);
  font-size: 1.1rem;
}

.library {
  min-height: 24rem;
  padding-bottom: clamp(5rem, 12vw, 9rem);
}

.library__meta {
  display: flex;
  align-items: center;
  min-height: 3.4rem;
  margin-bottom: 1.25rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-results .library__meta {
  justify-content: space-between;
  gap: 1.5rem;
}

.search-results .library__meta h2 {
  min-width: 0;
  margin: 0;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.search-results .library__meta p {
  flex: 0 0 auto;
}

.library__meta p {
  margin: 0;
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.1rem, 2.5vw, 2rem);
}

.note-grid--home {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.note-card {
  min-width: 0;
  padding: 0.58rem 0.58rem 0.9rem;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.note-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.note-card__image-link {
  display: block;
  text-decoration: none;
}

.note-card__image-frame {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--paper-deep);
  box-shadow: none;
  transition: box-shadow 180ms ease;
}

.note-card__image-link:hover .note-card__image-frame {
  box-shadow: inset 0 0 0 1px rgb(18 63 49 / 14%);
}

.note-card__image-frame img {
  width: 100%;
  height: 100%;
  padding: clamp(0.45rem, 1.4vw, 0.75rem);
  object-fit: contain;
}

.note-card__body {
  padding: 0.9rem 0.28rem 0.1rem;
}

.note-card__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.note-card__title a {
  display: inline;
  text-decoration: none;
}

.note-card__title a:hover {
  text-decoration: underline;
}

.note-card__description {
  margin: 0.7rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.draft-label {
  display: inline-block;
  margin-bottom: 0.55rem;
  padding: 0.12rem 0.4rem;
  border: 1px solid #b87400;
  border-radius: 999px;
  color: #6e4300;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.preview-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 2rem;
  color: var(--ink-soft);
  background:
    linear-gradient(135deg, transparent 49.6%, var(--line) 50%, transparent 50.4%),
    var(--paper-deep);
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-align: center;
  text-transform: uppercase;
}

.chip-list,
.tag-list,
.external-links,
.pagination__pages {
  padding: 0;
  list-style: none;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  margin: 0.75rem 0 0;
  gap: 0.4rem;
}

.chip-list a,
.tag-list li {
  display: inline-flex;
  padding: 0.28rem 0.58rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--panel-soft);
  font-size: 0.72rem;
  line-height: 1.35;
  text-decoration: none;
}

.chip-list a:hover {
  border-color: var(--forest);
  color: var(--forest);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  margin: 0.7rem 0 0;
  gap: 0.4rem;
}

.tag-list li::before {
  content: "#";
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 24rem;
  padding: clamp(2rem, 6vw, 4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-faint);
}

.empty-state--wide {
  min-height: 20rem;
}

.empty-state p:last-child {
  max-width: 38rem;
  margin: 1.2rem 0 0;
  color: var(--ink-soft);
}

.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: clamp(3rem, 7vw, 5rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  gap: 1rem;
}

.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.pagination a:hover {
  background: var(--paper-deep);
}

.pagination a[aria-current="page"] {
  color: white;
  background: var(--forest);
}

.pagination__pages {
  display: flex;
  align-items: center;
  margin: 0;
  gap: 0.15rem;
}

.pagination__ellipsis {
  display: grid;
  min-width: 2rem;
  min-height: 2.75rem;
  place-items: center;
}

.pagination__edge--next {
  justify-self: end;
}

.breadcrumb {
  display: inline-flex;
  margin-bottom: 2rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 700;
}

.note-detail {
  padding-block: clamp(2rem, 6vw, 5rem) clamp(2.5rem, 6vw, 4rem);
}

.note-detail__header {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  gap: 1.5rem;
}

.note-detail__header h1 {
  width: 100%;
  max-width: 15ch;
  overflow-wrap: anywhere;
}

.note-detail__header > div {
  min-width: 0;
}

.note-detail__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(20rem, 0.88fr);
  align-items: start;
  column-gap: clamp(2rem, 5vw, 4.5rem);
  row-gap: 0;
}

.note-detail__header {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.note-detail__preview {
  display: grid;
  min-height: 20rem;
  padding: clamp(0.6rem, 2vw, 1.5rem);
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper-deep);
  box-shadow: var(--shadow);
  grid-column: 1;
  grid-row: 1 / span 2;
}

.note-detail__preview-trigger {
  display: grid;
  width: 100%;
  place-items: center;
  cursor: zoom-in;
  text-decoration: none;
}

.note-detail__preview-frame {
  position: relative;
  width: 100%;
}

.note-detail__preview img {
  width: 100%;
  height: auto;
  max-height: 78rem;
  object-fit: contain;
}

.note-detail__image-actions {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.55rem;
  pointer-events: none;
}

.note-detail__image-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 0.8rem;
  gap: 0.45rem;
  border: 1px solid rgb(255 255 255 / 45%);
  border-radius: var(--radius-sm);
  color: white;
  background: rgb(23 36 31 / 88%);
  box-shadow: 0 4px 18px rgb(0 0 0 / 18%);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
}

.note-lightbox {
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: #f4f1e8;
  background: rgb(12 19 16 / 97%);
  overscroll-behavior: none;
}

.note-lightbox::backdrop {
  background: rgb(6 10 8 / 80%);
  backdrop-filter: blur(5px);
}

.note-lightbox__inner {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  min-width: 0;
}

.note-lightbox__header,
.note-lightbox__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  max-width: 100%;
  padding: 0.85rem clamp(0.85rem, 3vw, 2rem);
  gap: 1rem;
  border-color: rgb(255 255 255 / 15%);
}

.note-lightbox__header {
  border-bottom: 1px solid rgb(255 255 255 / 15%);
}

.note-lightbox__header > div {
  min-width: 0;
}

.note-lightbox__header form {
  flex: 0 0 auto;
}

.note-lightbox a:focus-visible,
.note-lightbox button:focus-visible {
  outline-color: #f3c875;
}

.note-lightbox__eyebrow,
.note-lightbox__header h2,
.note-lightbox__header p,
.note-lightbox__footer {
  margin: 0;
}

.note-lightbox__eyebrow {
  color: #c9d8cf;
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.note-lightbox__header h2 {
  overflow: hidden;
  max-width: min(64vw, 52rem);
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-lightbox__header p:last-child,
.note-lightbox__footer {
  color: #aebbb4;
  font-size: 0.74rem;
}

.note-lightbox__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.45rem 0.7rem 0.45rem 0.9rem;
  gap: 0.65rem;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: var(--radius-sm);
  color: white;
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.note-lightbox__close:hover {
  background: rgb(255 255 255 / 10%);
}

.note-lightbox__close span:last-child {
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
}

.note-lightbox__stage {
  display: grid;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  overflow: auto;
  padding: clamp(0.5rem, 2vw, 1.25rem);
  place-items: center;
  overscroll-behavior: contain;
}

.note-lightbox__stage img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 18px 60px rgb(0 0 0 / 38%);
}

.note-lightbox__footer {
  border-top: 1px solid rgb(255 255 255 / 15%);
}

.note-lightbox__footer a {
  color: white;
  font-weight: 700;
}

.preview-fallback--detail {
  min-height: 30rem;
}

.note-detail__meta {
  padding: 0 clamp(1.1rem, 2.5vw, 1.7rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  grid-column: 2;
  grid-row: 2;
}

.related-notes {
  padding-top: clamp(3rem, 8vw, 6rem);
}

.note-detail__meta section {
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}

.note-detail__meta section:last-child {
  border-bottom: 1px solid var(--line);
}

.note-detail__meta h2 {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.note-detail__meta p {
  margin: 0.7rem 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.external-links {
  margin: 0.8rem 0 0;
}

.external-links li + li {
  margin-top: 0.55rem;
}

.external-links a {
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
  text-decoration: none;
}

.external-links a > span:first-child {
  grid-column: 1 / -1;
  color: var(--ink-soft);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.external-links strong {
  overflow: hidden;
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-topics-compact {
  display: flex;
  align-items: center;
  max-width: 58rem;
  margin: 1rem auto 0;
  padding: 0.65rem 0;
  gap: 0.8rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.note-topics-compact h2 {
  flex: 0 0 auto;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.note-topics-compact .chip-list {
  margin: 0;
}

.support-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 58rem;
  margin: clamp(1.5rem, 4vw, 2.5rem) auto 0;
  padding: clamp(1.25rem, 3vw, 1.8rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  gap: 1.5rem;
  background: var(--support-surface);
}

.support-card h2 {
  margin: 0.25rem 0 0;
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 500;
}

.support-card p:last-child {
  max-width: 42rem;
  margin: 0.65rem 0 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.support-card .button {
  flex: 0 0 auto;
}

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

.topic-strip a,
.topic-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  gap: 1rem;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease;
}

.topic-strip a:nth-child(even),
.topic-card:nth-child(even) {
  border-right: 1px solid var(--line);
}

.topic-strip a:hover,
.topic-card:hover {
  background: var(--paper-deep);
  transform: translateY(-2px);
}

.topic-strip span {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
}

.topic-strip small,
.topic-card > span {
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 700;
}

.topic-grid {
  border-left: 0;
}

.topic-card {
  align-items: end;
  min-height: 12rem;
}

.topic-card h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.error-page {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: calc(100vh - 14rem);
  padding-block: clamp(4rem, 12vw, 9rem);
}

.error-page h1 {
  max-width: 16ch;
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 8vw, 6rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.error-page > p:not(.eyebrow) {
  max-width: 40rem;
  margin: 1.5rem 0 2rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.topic-card p {
  max-width: 34rem;
  margin: 0.65rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.site-footer {
  color: var(--footer-ink);
  background: var(--forest);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 9rem;
  gap: 2rem;
  font-size: 0.82rem;
}

.site-footer__inner span:first-child {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
}

.site-footer__inner span:last-child {
  color: var(--footer-soft);
}

html[data-theme="dark"] .site-header {
  border-bottom-color: rgb(105 132 117 / 28%);
  box-shadow: 0 3px 18px rgb(0 0 0 / 16%);
}

html[data-theme="dark"] .skip-link,
html[data-theme="dark"] .button--primary,
html[data-theme="dark"] .pagination a[aria-current="page"] {
  border-color: #4f816b;
  color: #fffaf0;
  background: #275844;
}

html[data-theme="dark"] .button--primary:hover {
  background: var(--primary-hover);
}

html[data-theme="dark"] .hero__visual {
  background:
    radial-gradient(circle at 18% 13%, rgb(88 118 102 / 24%), transparent 24rem),
    linear-gradient(136deg, #26372f 0%, #1b2a23 52%, #111c17 100%);
}

html[data-theme="dark"] .hero__visual::before {
  background: rgb(30 74 56 / 88%);
  box-shadow: 0 18px 50px rgb(0 0 0 / 30%);
}

html[data-theme="dark"] .hero__visual::after {
  border-color: rgb(201 155 77 / 48%);
  background: rgb(216 194 142 / 8%);
}

html[data-theme="dark"] .hero__visual-label {
  border-color: rgb(239 228 204 / 38%);
  color: #fffaf0;
  background: rgb(15 38 29 / 82%);
}

html[data-theme="dark"] .hero__note {
  border-color: #d8cdb8;
}

html[data-theme="dark"] .hero__note img,
html[data-theme="dark"] .note-card__image-frame img,
html[data-theme="dark"] .note-detail__preview img,
html[data-theme="dark"] .note-lightbox__stage img {
  filter: none;
}

html[data-theme="dark"] .note-card__image-frame,
html[data-theme="dark"] .home-discovery__image,
html[data-theme="dark"] .note-detail__preview {
  background: #2a332f;
}

html[data-theme="dark"] .note-card__image-frame img,
html[data-theme="dark"] .home-discovery__image img {
  background: #f1eadc;
}

html[data-theme="dark"] .draft-label {
  border-color: #d7a85d;
  color: #f0c983;
}

html[data-theme="dark"] .site-footer {
  color: var(--footer-ink);
  background: #0b130f;
}

@media (max-width: 62rem) {
  .hero {
    grid-template-columns: minmax(0, 0.9fr) minmax(20rem, 1.1fr);
  }

  .hero__copy {
    padding: clamp(2.5rem, 5vw, 4rem);
  }

  .note-grid,
  .note-grid--home {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .note-detail__layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.95fr);
  }
}

@media (max-width: 48rem) {
  .site-nav__support {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero__copy {
    min-height: 34rem;
  }

  .hero__visual {
    min-height: 31rem;
  }

  .home-support {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 3.25rem;
    margin-top: 1rem;
    padding: 0.6rem 0.85rem;
    gap: 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--ink-soft);
    background: var(--support-surface);
    font-size: 0.78rem;
  }

  .home-support a {
    flex: 0 0 auto;
    color: var(--forest);
    font-weight: 750;
    text-decoration: none;
  }

  .home-discovery {
    grid-template-columns: 7rem minmax(0, 1fr);
  }

  .search-panel {
    grid-template-columns: 1fr;
    align-items: start;
  }

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

  .collection-values article + article {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

  .note-detail__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .note-detail__layout {
    grid-template-columns: 1fr;
  }

  .note-detail__header,
  .note-detail__preview,
  .note-detail__meta {
    grid-column: 1;
    grid-row: auto;
  }

  .topic-strip,
  .topic-grid {
    grid-template-columns: 1fr;
  }

  .topic-strip a,
  .topic-card,
  .topic-strip a:nth-child(even),
  .topic-card:nth-child(even) {
    border-right: 1px solid var(--line);
  }
}

@media (max-width: 34rem) {
  :root {
    --shell: min(100% - 1.25rem, 78rem);
  }

  .site-header__inner {
    min-height: 4.5rem;
    gap: 0.45rem;
  }

  .wordmark__primary {
    font-size: 1.1rem;
  }

  .wordmark__secondary {
    display: none;
  }

  .site-nav {
    gap: clamp(0.5rem, 2.5vw, 0.8rem);
    font-size: 0.78rem;
  }

  .site-header__actions {
    gap: 0.4rem;
  }

  .theme-toggle {
    position: relative;
    flex-basis: 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
    margin-inline-end: 0.125rem;
    border-color: transparent;
    background: transparent;
    font-size: 1rem;
    transform: none;
  }

  .theme-toggle::before {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2.05rem;
    height: 2.05rem;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--panel-soft);
    content: "";
    transform: translate(-50%, -50%);
    transition: border-color 160ms ease, background-color 160ms ease;
  }

  .theme-toggle:hover {
    border-color: transparent;
    background: transparent;
    transform: none;
  }

  .theme-toggle:hover::before {
    border-color: var(--gold);
    background: var(--paper-deep);
  }

  .theme-toggle > span {
    position: relative;
    z-index: 1;
  }

  .hero h1 {
    font-size: clamp(3rem, 15vw, 4.5rem);
  }

  .hero__copy {
    min-height: 31rem;
    padding: 2.4rem 1.35rem 2.6rem;
  }

  .hero__visual {
    min-height: 24rem;
  }

  .home-support {
    align-items: flex-start;
  }

  .home-discovery {
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: 0.8rem;
  }

  .home-discovery__content h2 {
    font-size: 1.35rem;
  }

  .home-discovery__content > p:not(.eyebrow) {
    display: none;
  }

  .home-discovery__actions {
    gap: 0.35rem 0.8rem;
    font-size: 0.78rem;
  }

  .hero__note {
    border-width: 0.35rem;
  }

  .hero__visual-label {
    top: 0.8rem;
    right: 0.8rem;
    font-size: 0.56rem;
  }

  .page-header h1 {
    font-size: clamp(2.5rem, 13vw, 3.4rem);
    overflow-wrap: anywhere;
  }

  .note-detail__header h1 {
    max-width: 100%;
    padding-inline-end: 0.08em;
    font-size: clamp(2.35rem, 10.5vw, 3rem);
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
  }

  .search-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .search-form .button {
    width: 100%;
  }

  .search-results .library__meta {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
  }

  .note-grid,
  .note-grid--home {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

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

  .pagination__pages {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-content: center;
  }

  .pagination__edge {
    grid-row: 2;
  }

  .pagination__edge--next {
    grid-column: 2;
  }

  .preview-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }

  .note-detail__image-actions {
    right: 0.75rem;
    left: 0.75rem;
    bottom: 0.75rem;
  }

  .note-detail__image-control {
    min-height: 2.75rem;
    padding: 0.5rem;
    font-size: 0.75rem;
  }

  .note-topics-compact {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.45rem;
  }

  .note-lightbox__header {
    align-items: flex-start;
  }

  .note-lightbox__header p:last-child {
    display: none;
  }

  .note-lightbox__header h2 {
    max-width: 55vw;
  }

  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
  }
}

.site-footer__inner > div,
.site-footer__links {
  display: flex;
  gap: 1rem;
}

.site-footer__links a {
  color: inherit;
  text-underline-offset: 0.2em;
}

.legal-page {
  min-height: 60vh;
  padding-block: clamp(4rem, 9vw, 8rem);
}

.legal-page h1 {
  margin: 0.4rem 0 2rem;
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 500;
}

.legal-content {
  max-width: 48rem;
  padding: clamp(1.4rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
}

.legal-content--wide {
  max-width: 62rem;
}

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

.legal-content h2 {
  margin-top: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 500;
}

.legal-content p {
  color: var(--ink-soft);
  line-height: 1.75;
}

.legal-content p:last-child {
  margin-bottom: 0;
}

.legal-content a {
  color: var(--forest);
  font-weight: 700;
  text-underline-offset: 0.2em;
}

@media (max-width: 680px) {
  .support-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .support-card .button {
    width: 100%;
  }
}

/* Module 7: compact knowledge-first note detail and universal feedback. */
.note-detail {
  padding-block: clamp(1.5rem, 4vw, 3.25rem) clamp(2rem, 5vw, 3.25rem);
}

.note-detail > .breadcrumb {
  margin-bottom: clamp(1.15rem, 2.5vw, 1.75rem);
}

.note-detail__layout {
  grid-template-columns: minmax(0, 1.15fr) minmax(20rem, 0.85fr);
  column-gap: clamp(1.5rem, 3.5vw, 3rem);
}

.note-detail__header {
  margin-bottom: 0.85rem;
  gap: 0.35rem;
}

.note-detail__header .eyebrow,
.note-detail__header h1 {
  margin-block: 0;
}

.note-detail__header h1 {
  max-width: 16ch;
  font-size: clamp(2.55rem, 4.7vw, 4.5rem);
  line-height: 0.98;
}

.note-detail__preview {
  padding: clamp(0.65rem, 1.2vw, 1rem);
}

.note-detail__image-control {
  min-height: 2.75rem;
  border-color: rgb(255 255 255 / 42%);
  background: rgb(28 69 56 / 76%);
  box-shadow: 0 5px 18px rgb(14 31 25 / 18%);
  backdrop-filter: blur(9px) saturate(120%);
}

html[data-theme="dark"] .note-detail__image-control {
  border-color: rgb(242 233 214 / 28%);
  background: rgb(42 64 54 / 76%);
}

.note-detail__sidebar {
  display: grid;
  min-width: 0;
  gap: 0.75rem;
  grid-column: 2;
  grid-row: 2;
}

.tiktok-panel {
  min-width: 0;
}

.tiktok-cta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 4rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  gap: 0.75rem;
  background: var(--panel-strong);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
}

.tiktok-cta:hover {
  border-color: color-mix(in srgb, var(--forest) 48%, var(--line));
  background: var(--panel);
}

.tiktok-cta__mark {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 0.7rem;
  color: var(--primary-ink);
  background: var(--forest);
  font-size: 1.45rem;
  font-weight: 800;
}

.tiktok-cta small,
.tiktok-cta strong {
  display: block;
}

.tiktok-cta small {
  color: var(--ink-soft);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tiktok-cta strong {
  overflow: hidden;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.additional-videos {
  margin-top: 0.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
}

.additional-videos summary {
  min-height: 2.75rem;
  padding: 0.65rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
}

.additional-videos ul {
  margin: 0;
  padding: 0 0.8rem 0.7rem 1.9rem;
}

.additional-videos li + li {
  margin-top: 0.4rem;
}

.additional-videos a {
  font-size: 0.8rem;
}

.note-detail__meta {
  padding-inline: clamp(0.9rem, 2vw, 1.25rem);
  grid-column: auto;
  grid-row: auto;
}

.note-detail__meta section {
  padding-block: 0.9rem;
}

.note-detail__meta section:first-child {
  border-top: 0;
}

.note-detail__meta section:last-child {
  border-bottom: 0;
}

.note-detail__meta h2 {
  font-size: 0.66rem;
}

.note-detail__meta p {
  margin-top: 0.55rem;
  font-size: 0.82rem;
  line-height: 1.55;
}

.editorial-intro__remainder p {
  margin-top: 0;
}

.editorial-intro__toggle {
  display: none;
  min-height: 2.5rem;
  margin-top: 0.7rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--forest);
  background: var(--panel-soft);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.editorial-intro-js .editorial-intro__remainder {
  display: none;
}

.editorial-intro-js .editorial-intro__remainder:not([hidden]) {
  display: block;
}

.editorial-intro-js .editorial-intro__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.editorial-intro__toggle:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--gold) 70%, transparent);
  outline-offset: 2px;
}

.source-pills {
  display: flex;
  flex-wrap: wrap;
  margin: 0.65rem 0 0;
  padding: 0;
  gap: 0.4rem;
  list-style: none;
}

.source-pills a {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
}

.source-pills a:hover {
  border-color: var(--forest);
  background: var(--forest-light);
}

.source-group {
  margin-top: 0.85rem;
}

.source-group + .source-group {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.source-group h3 {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.source-list {
  display: grid;
  margin: 0.65rem 0 0;
  padding: 0;
  gap: 0.55rem;
  list-style: none;
}

.source-entry {
  padding: 0.75rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
}

.source-entry__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.8rem;
  flex-wrap: wrap;
}

.source-entry__heading strong {
  color: var(--ink);
  font-size: 0.84rem;
}

.source-entry__heading span {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.note-detail__meta .source-entry p {
  margin-top: 0.45rem;
  font-size: 0.76rem;
  line-height: 1.5;
}

.note-detail__meta .source-entry__grade,
.note-detail__meta .source-entry .knowledge-qualifier {
  display: inline-flex;
  margin-right: 0.35rem;
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  color: var(--ink);
  background: var(--forest-light);
  font-weight: 700;
}

.note-detail__meta .source-entry__notice {
  padding-left: 0.6rem;
  border-left: 2px solid var(--line-strong);
}

.note-detail__meta .source-entry__notice--correction {
  border-left-color: var(--gold);
}

.source-entry > a {
  display: inline-flex;
  margin-top: 0.55rem;
  color: var(--forest);
  gap: 0.3rem;
  font-size: 0.76rem;
  font-weight: 750;
}

.source-editorial-note {
  display: grid;
  margin-top: 0.55rem;
  padding: 0.6rem 0.7rem;
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  gap: 0.2rem;
  color: var(--ink-soft);
  background: var(--panel-faint);
  font-size: 0.72rem;
  line-height: 1.45;
}

.source-editorial-note strong {
  color: var(--ink);
}

.further-reading {
  margin-top: 0.55rem;
}

.further-reading details {
  border-bottom: 1px solid var(--line);
}

.further-reading summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 2.75rem;
  padding-block: 0.45rem;
  gap: 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}

.further-reading summary::-webkit-details-marker {
  display: none;
}

.further-reading details[open] summary span:last-child {
  transform: rotate(180deg);
}

.further-reading__body {
  padding: 0.1rem 0 0.8rem;
}

.further-reading__body p {
  margin: 0 0 0.45rem;
  font-size: 0.76rem;
}

.further-reading__body > a,
.feedback-link {
  color: var(--forest);
  font-size: 0.77rem;
  font-weight: 750;
}

.knowledge-qualifier {
  display: inline-flex;
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  color: var(--ink);
  background: var(--forest-light);
  font-weight: 700;
}

.knowledge-transparency p {
  margin-top: 0;
  font-size: 0.72rem;
}

.support-card--compact {
  max-width: none;
  margin: 0;
  padding: 0.85rem 1rem;
  gap: 0.8rem;
}

.support-card--compact h2 {
  margin-top: 0.1rem;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
}

.support-card--compact p:last-child {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  line-height: 1.45;
}

.support-card--compact .button {
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.72rem;
}

.note-topics-compact--sidebar {
  align-items: flex-start;
  flex-direction: column;
  max-width: none;
  margin: 0;
  padding: 0.65rem 0.2rem;
  gap: 0.45rem;
}

.note-sequence {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  padding-top: clamp(1rem, 2vw, 1.4rem);
  gap: 0.8rem;
  border-top: 1px solid var(--line);
}

.note-sequence__link {
  display: flex;
  min-width: 0;
  min-height: 4rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  background: var(--panel-soft);
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease,
    transform 160ms ease;
}

.note-sequence__link:hover {
  border-color: var(--gold);
  background: var(--paper-deep);
  transform: translateY(-2px);
}

.note-sequence__link span {
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.note-sequence__link strong {
  overflow-wrap: anywhere;
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.25;
}

.note-sequence__link--next {
  align-items: flex-end;
  grid-column: 2;
  text-align: right;
}

.related-notes {
  padding-top: clamp(2rem, 4vw, 3.5rem);
}

.contact-page {
  max-width: 52rem;
  min-height: 65vh;
  padding-block: clamp(3rem, 7vw, 6rem);
}

.contact-page h1 {
  max-width: 12ch;
  margin: 0.35rem 0 1rem;
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 500;
  line-height: 1;
}

.contact-page__intro {
  max-width: 42rem;
  margin-bottom: 1.5rem;
  color: var(--ink-soft);
}

.feedback-context,
.feedback-form,
.form-success {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.feedback-context,
.form-success {
  margin-bottom: 1rem;
  padding: 1rem 1.15rem;
}

.feedback-context {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.2rem 1rem;
}

.feedback-context .eyebrow {
  margin: 0;
  grid-column: 1 / -1;
}

.feedback-context a,
.form-success a {
  color: var(--forest);
  font-weight: 750;
}

.form-success h2,
.form-success p {
  margin: 0;
}

.form-success h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 500;
}

.form-success p {
  margin-top: 0.35rem;
  color: var(--ink-soft);
}

.feedback-form {
  position: relative;
  padding: clamp(1.15rem, 3vw, 2rem);
}

.feedback-form__honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-field + .form-field {
  margin-top: 1.1rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  font-weight: 750;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--surface);
  font: inherit;
}

.form-field textarea {
  min-height: 10rem;
  resize: vertical;
}

.form-field--error input,
.form-field--error select,
.form-field--error textarea {
  border-color: #9a492e;
}

.form-help,
.feedback-form__privacy {
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.form-help {
  margin: 0.35rem 0 0;
}

.feedback-form__privacy {
  max-width: 44rem;
  margin: 1.2rem 0;
}

.errorlist {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  color: #8b3d25;
  font-size: 0.78rem;
  font-weight: 700;
}

html[data-theme="dark"] .errorlist {
  color: #f2a98f;
}

.form-error-summary {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid #9a492e;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, #9a492e 9%, var(--panel));
}

.form-error-summary h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
}

@media (max-width: 48rem) {
  .note-detail__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .note-detail__header,
  .note-detail__preview,
  .note-detail__sidebar {
    grid-column: 1;
    grid-row: auto;
  }

  .note-detail__header {
    margin-bottom: 1.1rem;
  }

  .note-detail__preview {
    margin-bottom: 0.9rem;
  }

  .note-detail__sidebar {
    gap: 0.75rem;
  }

  .note-detail__meta {
    padding-inline: 1rem;
  }

  .support-card--compact {
    align-items: center;
    flex-direction: row;
  }

  .support-card--compact .button {
    width: auto;
  }
}

@media (max-width: 34rem) {
  .note-detail {
    padding-top: 1.25rem;
  }

  .note-detail__header h1 {
    font-size: clamp(2.35rem, 11vw, 3.1rem);
  }

  .tiktok-cta {
    padding-inline: 0.7rem;
  }

  .tiktok-cta__mark {
    width: 2.35rem;
    height: 2.35rem;
  }

  .support-card--compact {
    align-items: flex-start;
    flex-direction: column;
  }

  .support-card--compact .button {
    width: 100%;
  }

  .note-sequence {
    grid-template-columns: minmax(0, 1fr);
  }

  .note-sequence__link--next {
    grid-column: 1;
  }

  .feedback-context {
    grid-template-columns: 1fr;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
