.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 3px;
  color: rgba(111, 67, 46, 0.78);
  font-weight: 680;
  font-size: 0.82rem;
  transition: color 0.16s ease;
}

.text-link::after {
  content: "→";
  opacity: 0;
  transform: translate(-2px, -1px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.text-link:hover {
  color: var(--v2-accent-deep);
}

.text-link:hover::after {
  opacity: 1;
  transform: translate(2px, -1px);
}

.featured-label,
.meta,
.theme-examples-title,
.feature-panel-meta,
.search-results-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--v2-accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.95rem;
}

.featured-label::before,
.meta::before,
.theme-examples-title::before,
.feature-panel-meta::before,
.search-results-meta::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.feature-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(1.7rem, 3vw, 2.6rem);
  border: 1px solid rgba(221, 210, 195, 0.95);
  border-radius: var(--v2-radius-lg);
  background: rgba(255, 253, 248, 0.82);
  box-shadow: var(--v2-shadow-card);
}

.home-stack,
.theme-focus,
.single-note,
.search-page-shell,
.search-panel,
.single-note-header {
  margin-top: 0;
  margin-block-start: 0;
  padding-top: 0;
}

.feature-panel::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(221, 210, 195, 0.48);
  border-radius: 18px;
  pointer-events: none;
}

.feature-panel-copy,
.feature-panel-visual {
  position: relative;
  z-index: 1;
}

.feature-panel h2,
.note-title {
  margin-bottom: 1rem;
  font-family: var(--v2-font-body);
  font-weight: 760;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.summary {
  color: #4a4036;
  font-size: 1rem;
  line-height: 1.72;
  margin-bottom: 1.5rem;
  max-width: 62ch;
}

.feature-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.note-image {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid rgba(221, 210, 195, 0.88);
  border-radius: var(--v2-radius-md);
  background: var(--v2-surface);
  box-shadow: var(--v2-shadow-panel);
}

.note-image--article {
  max-width: 900px;
  margin: 0 auto;
}

.note-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--v2-rule-soft);
}

.note-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 1.75rem;
  padding: 1.45rem 0;
  border-bottom: 1px solid var(--v2-rule-soft);
}

.note-row--home,
.note-row--index,
.note-row--theme,
.note-row--related,
.note-row--search-result {
  align-items: start;
}

.note-row-body {
  min-width: 0;
}

.note-row-footer {
  margin-top: 0.7rem;
}

.note-row-meta-wrap {
  color: var(--v2-soft);
}

.note-row-meta {
  color: var(--v2-soft);
  font-size: 0.83rem;
  line-height: 1.45;
}

.note-row-question {
  margin-top: 0.55rem;
  color: var(--v2-muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.note-row-title {
  font-family: var(--v2-font-body);
  font-size: 1.28rem;
  font-weight: 760;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 0.45rem;
  color: var(--v2-ink);
}

.note-row-title a {
  color: inherit;
}

.note-row:hover .note-row-title {
  color: var(--v2-accent-deep);
}

.note-row-summary {
  color: var(--v2-muted);
  max-width: 720px;
  line-height: 1.65;
}

.note-row-visual {
  display: block;
}

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

.theme-card {
  display: grid;
  gap: 0.95rem;
  padding: 1.5rem;
  border: 1px solid rgba(221, 210, 195, 0.92);
  border-radius: var(--v2-radius-md);
  background: rgba(255, 254, 250, 0.68);
  box-shadow: var(--v2-shadow-panel);
}

.theme-card-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.theme-card-count,
.theme-card-reference {
  color: var(--v2-soft);
  font-size: 0.77rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.theme-card-title {
  font-family: var(--v2-font-body);
  font-size: 1.32rem;
  font-weight: 760;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.theme-card-title a {
  color: inherit;
}

.theme-card-description {
  color: var(--v2-muted);
  line-height: 1.64;
}

.theme-card-examples {
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.theme-card-examples li {
  position: relative;
  padding-left: 1rem;
  color: var(--v2-text);
  font-size: 0.94rem;
}

.theme-card-examples li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 12px;
  height: 1px;
  background: rgba(138, 101, 63, 0.34);
}

.theme-card-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
}

.theme-focus {
  max-width: 760px;
}

.theme-detail-title {
  font-family: var(--v2-font-body);
  font-weight: 720;
  max-width: 12ch;
  font-size: clamp(1.65rem, 2.4vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 0.7rem;
}

.theme-description--focus {
  margin-top: 0;
  max-width: 60ch;
}

.theme-examples-block {
  margin-top: var(--v2-space-lg);
}

.theme-pill-list--calm {
  margin-top: 0.85rem;
}

.theme-pill-list--calm li {
  background: rgba(255, 253, 248, 0.64);
}

.theme-overview,
.search-panel,
.taxonomy {
  max-width: 900px;
  padding: 1.7rem 1.8rem;
  border: 1px solid rgba(221, 210, 195, 0.9);
  border-radius: var(--v2-radius-md);
  background: rgba(255, 253, 248, 0.74);
  box-shadow: var(--v2-shadow-panel);
}

.theme-overview p,
.search-panel p {
  color: var(--v2-muted);
}

.search-panel--page {
  max-width: 920px;
}

.search-panel-head {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}

.search-input--page {
  min-height: 56px;
  font-size: 1.05rem;
}

.search-helper,
.search-query-summary {
  margin-top: 0;
  font-size: 0.94rem;
}

.search-query-summary {
  color: var(--v2-soft);
}

.search-empty {
  color: var(--v2-muted);
}

#static-search-results {
  display: grid;
  gap: 1rem;
}

#static-search-results .note-list {
  border-top: 1px solid var(--v2-rule-soft);
}

.single-note {
  max-width: 940px;
}

.single-note-header {
  max-width: 780px;
  margin-bottom: var(--v2-space-xl);
}

.single-note-figure {
  margin: 0 0 var(--v2-space-2xl);
}

.note-carousel {
  --note-carousel-slide-max-height: calc(88vh - 12rem);
  display: grid;
  gap: 1rem;
  margin: 0 0 var(--v2-space-2xl);
}

@supports (height: 1svh) {
  .note-carousel {
    --note-carousel-slide-max-height: calc(88svh - 12rem);
  }
}

@supports (height: 1dvh) {
  .note-carousel {
    --note-carousel-slide-max-height: calc(88dvh - 12rem);
  }
}

.note-carousel__viewer,
.note-carousel__meta {
  max-width: 900px;
  margin: 0 auto;
}

.note-carousel__viewer {
  position: relative;
  touch-action: pan-y pinch-zoom;
}

.note-carousel.splide {
  visibility: visible;
}

.note-carousel .splide__track {
  overflow: hidden;
  position: relative;
}

.note-carousel .splide__list {
  display: flex;
  height: 100%;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
  align-items: center;
}

.note-carousel .splide__slide {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 100%;
  min-width: 0;
  box-sizing: border-box;
  list-style: none;
  position: relative;
}

.note-carousel__slide {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
}

.note-carousel__image {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: var(--note-carousel-slide-max-height);
  display: block;
  margin: 0 auto;
  border: 1px solid rgba(221, 210, 195, 0.88);
  border-radius: var(--v2-radius-md);
  background: var(--v2-surface);
  box-shadow: var(--v2-shadow-panel);
  object-fit: contain;
}

.note-carousel__controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin-bottom: 0.6rem;
}

.note-carousel__arrow {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(221, 210, 195, 0.96);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.96);
  color: rgba(52, 44, 37, 0.92);
  box-shadow: 0 6px 18px rgba(41, 31, 22, 0.06);
  opacity: 1;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.note-carousel__arrow span {
  font-size: 2rem;
  line-height: 1;
}

.note-carousel__arrow:hover:not(:disabled):not(.is-disabled),
.note-carousel__arrow:focus-visible {
  background: rgba(255, 250, 241, 0.98);
  border-color: rgba(138, 101, 63, 0.4);
  color: var(--v2-accent-deep);
  box-shadow: 0 8px 20px rgba(41, 31, 22, 0.1);
}

.note-carousel__arrow:disabled,
.note-carousel__arrow.is-disabled {
  opacity: 0.22;
  cursor: default;
  pointer-events: none;
}

.note-carousel__meta {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
}

.note-carousel__status {
  color: var(--v2-soft);
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.note-carousel__footer {
  margin: 0 auto;
}

.body-text {
  max-width: 780px;
  margin-bottom: var(--v2-space-2xl);
}

.body-text p,
.body-text li {
  color: var(--v2-text);
  font-size: 1rem;
  line-height: 1.76;
}

.body-text p {
  margin-bottom: 1.35rem;
}

.body-text .note-inline-link {
  color: #0b63ce;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
  transition: color 0.16s ease, text-decoration-color 0.16s ease;
}

.body-text .note-inline-link:hover,
.body-text .note-inline-link:focus-visible {
  color: #084c9d;
  text-decoration-color: currentColor;
}

.body-text .note-inline-link:focus-visible {
  outline: 2px solid rgba(11, 99, 206, 0.3);
  outline-offset: 2px;
  border-radius: 2px;
}

.body-text h3,
.body-text h4 {
  font-family: var(--v2-font-body);
  font-weight: 720;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 2rem 0 0.85rem;
}

.body-text ul,
.body-text ol {
  padding-left: 1.25rem;
  margin: 0 0 1.25rem;
}

.note-sources {
  max-width: 780px;
  margin: 2.4rem 0 2rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--v2-rule-soft);
}

.note-sources__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--v2-accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.95rem;
}

.note-sources__eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.note-sources__entries {
  display: grid;
  gap: 0.7rem;
}

.note-sources__citation {
  margin: 0;
  color: var(--v2-muted);
  font-size: 1rem;
  line-height: 1.76;
}

.note-sources__link {
  font-size: inherit;
  line-height: inherit;
}

.taxonomy--article {
  display: grid;
  gap: 0.8rem;
  margin: 2.25rem 0;
  border-left: 1px solid rgba(138, 101, 63, 0.44);
  background: linear-gradient(90deg, rgba(138,101,63,0.035), transparent 58%);
  color: var(--v2-muted);
  font-size: 0.96rem;
}

.taxonomy strong {
  color: var(--v2-ink);
  font-weight: 650;
}

.related-notes-block {
  margin-top: var(--v2-space-2xl);
}

.related .section-heading .eyebrow {
  font-family: var(--v2-font-body);
}

.empty-state,
.error-state {
  color: var(--v2-muted);
}

@media (max-width: 1020px) {
  .feature-panel,
  .theme-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .note-carousel {
    --note-carousel-slide-max-height: calc(74vh - 9rem);
  }

  @supports (height: 1svh) {
    .note-carousel {
      --note-carousel-slide-max-height: calc(74svh - 9rem);
    }
  }

  @supports (height: 1dvh) {
    .note-carousel {
      --note-carousel-slide-max-height: calc(74dvh - 9rem);
    }
  }

  .feature-panel,
  .search-panel,
  .theme-overview,
  .taxonomy {
    padding: 1.25rem;
  }

  .note-row {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .theme-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
