/**
 * Higher Mind Notes — clean editorial reading surface.
 * Loaded only on /notes/ pages.
 */

.page--notes {
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(199, 157, 50, 0.09), transparent 58%),
    linear-gradient(180deg, #faf8f3 0%, var(--bg) 28%, var(--bg) 100%);
}

.notes-shell {
  width: min(100% - 2rem, 38rem);
  margin: 0 auto;
  padding: var(--space-6) 0 var(--space-8);
}

.notes-shell--index {
  width: min(100% - 2rem, 40rem);
}

.notes-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

.notes-back {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--color-text-muted);
}

.notes-back:hover,
.notes-back:focus-visible {
  color: var(--gold-mid);
}

.notes-header {
  animation: notes-rise 0.85s var(--ease) both;
}

.notes-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  margin: 0 0 var(--space-3);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-mid);
}

.notes-kicker__dot,
.notes-meta__dot {
  color: var(--color-text-subtle);
}

.notes-kicker__num {
  color: var(--color-text-muted);
}

.notes-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  margin: 0 0 var(--space-5);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.notes-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5.5vw, 2.85rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.notes-title--index {
  font-size: clamp(2.15rem, 6vw, 3.1rem);
}

.notes-subtitle {
  margin: var(--space-4) 0 0;
  max-width: 34rem;
  font-family: var(--font-serif);
  font-size: clamp(1.28rem, 2.7vw, 1.52rem);
  font-weight: 700;
  font-style: italic;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.notes-hero {
  margin: var(--space-6) 0 0;
}

.notes-hero img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-soft);
}

.notes-index-header {
  margin-bottom: var(--space-7);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border);
}

.notes-body {
  margin-top: var(--space-7);
  animation: notes-rise 0.95s var(--ease) 0.08s both;
  font-family: var(--editorial-prose-font);
  font-size: var(--editorial-prose-size);
  line-height: var(--editorial-prose-line);
}

.notes-body p {
  margin: 0 0 1.2em;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: var(--text);
}

.notes-body p:last-child {
  margin-bottom: 0;
}

.notes-body em,
.notes-body i {
  font-style: italic;
}

.notes-body strong {
  font-weight: 600;
  color: var(--text);
}

/* —— Editorial accents —— */
.notes-section {
  margin: var(--space-7) 0 var(--space-5);
}

.notes-section__title {
  margin: 0 0 var(--space-4);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-mid);
}

.notes-react {
  margin: var(--space-5) 0 !important;
  font-size: clamp(1.08rem, 2.3vw, 1.22rem) !important;
  font-style: italic;
  color: var(--text);
}

.notes-mark {
  background: linear-gradient(180deg, transparent 62%, rgba(199, 157, 50, 0.28) 62%);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.notes-term {
  font-style: italic;
  white-space: nowrap;
}

.notes-pause {
  margin: var(--space-6) 0;
  padding: var(--space-5) var(--space-5) var(--space-5) var(--space-4);
  border-left: 2px solid rgba(199, 157, 50, 0.55);
  background: rgba(241, 235, 224, 0.55);
}

.notes-pause > p:last-child {
  margin-bottom: 0;
}

.notes-pause__label {
  display: block;
  margin: 0 0 var(--space-3);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-mid);
}

.notes-contrast {
  margin: 0;
  padding: 0;
}

.notes-contrast__but {
  margin: 0 0 var(--space-3) !important;
  font-size: clamp(1.04rem, 2.1vw, 1.16rem) !important;
  font-style: italic;
  color: var(--text);
}

/* —— Long-form essay notes —— */
.notes-shell--essay {
  width: min(100% - 2rem, 47rem);
}

.notes-shell--essay-cols {
  width: min(100% - 2rem, 56rem);
}

.notes-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(11.5rem, 16.5rem);
  gap: clamp(1.25rem, 4vw, 2.75rem);
  align-items: start;
  margin-top: var(--space-6);
}

.notes-intro-grid__aside {
  position: sticky;
  top: 1.25rem;
}

.notes-intro-grid__aside-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.notes-intro-grid__aside-link:focus-visible {
  outline: 2px solid rgba(199, 157, 50, 0.55);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.notes-intro-grid__aside img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  box-shadow: 0 14px 42px rgba(42, 34, 24, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.notes-intro-grid__aside-link:hover img,
.notes-intro-grid__aside-link:focus-visible img {
  transform: translateY(-2px);
  box-shadow: 0 18px 48px rgba(42, 34, 24, 0.14);
}

.notes-intro-grid__caption {
  margin: var(--space-3) 0 0;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: var(--color-text-muted);
}

.notes-intro-grid__main p:last-child {
  margin-bottom: 0;
}

.notes-intro-grid__main p {
  margin: 0 0 1.35em;
  font-family: var(--editorial-prose-font);
  font-size: var(--editorial-prose-size);
  line-height: var(--editorial-prose-line);
  color: var(--text);
}

.notes-intro-grid__main .notes-standout,
.notes-intro-grid__main .notes-quote {
  margin: clamp(1.75rem, 4vw, 2.5rem) 0;
}

.notes-quote,
.notes-standout,
.notes-whisper,
.notes-pivot,
.notes-body blockquote.notes-quote {
  margin: clamp(2.25rem, 5.5vw, 3rem) 0;
  padding: var(--space-5) var(--space-5) var(--space-5) calc(var(--space-4) + 2px);
  border: 1px solid rgba(199, 157, 50, 0.34);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(135deg, rgba(241, 235, 224, 0.62) 0%, rgba(249, 247, 242, 0.92) 58%),
    var(--bg-raised);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 10px 28px rgba(42, 34, 24, 0.05);
}

.notes-quote p,
.notes-standout p {
  margin: 0 !important;
  font-family: var(--editorial-prose-font);
  font-size: clamp(1.02rem, 2.1vw, 1.14rem) !important;
  font-style: italic;
  font-weight: 500;
  line-height: 1.58 !important;
  text-align: center;
  color: var(--text);
}

.notes-standout p:last-child {
  margin-bottom: 0 !important;
}

.notes-whisper,
.notes-pivot {
  display: block;
  font-family: var(--editorial-prose-font);
  font-size: clamp(1.02rem, 2.1vw, 1.14rem) !important;
  font-style: italic;
  font-weight: 500;
  line-height: 1.58 !important;
  text-align: center;
  color: var(--text);
}

.notes-pivot {
  font-style: normal;
  font-weight: 600;
}

.notes-quote--pivot p {
  font-style: normal;
  font-weight: 600;
}

.notes-shell--essay .notes-body p {
  line-height: var(--editorial-prose-line);
  margin-bottom: 1.35em;
}

.notes-section__heading {
  margin: var(--space-7) 0 var(--space-4);
  font-family: var(--editorial-prose-font);
  font-size: clamp(1.72rem, 3.6vw, 2.12rem);
  font-weight: 800;
  line-height: 1.26;
  letter-spacing: -0.015em;
  color: var(--text);
}

.notes-list {
  margin: var(--space-4) 0 var(--space-5);
  padding: 0;
  list-style: none;
}

.notes-list li {
  margin: 0 0 0.55em;
  padding-left: 1.1em;
  position: relative;
  font-family: var(--editorial-prose-font);
  font-size: var(--editorial-prose-size);
  line-height: var(--editorial-prose-line);
  color: var(--text);
}

.notes-list li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--gold-mid);
  font-weight: 700;
}

.notes-defs {
  margin: var(--space-5) 0;
  padding: var(--space-4) var(--space-4);
  border-left: 2px solid rgba(199, 157, 50, 0.45);
  background: rgba(241, 235, 224, 0.35);
}

.notes-defs p {
  margin: 0 0 var(--space-3) !important;
}

.notes-defs p:last-child {
  margin-bottom: 0 !important;
}

.notes-defs__term {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-mid);
}

.notes-stack {
  margin: var(--space-4) 0 var(--space-5);
}

.notes-stack p {
  margin: 0 0 0.65em !important;
}

.notes-sources {
  margin: var(--space-7) 0 0;
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}

.notes-sources__title {
  margin: 0 0 var(--space-4);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-mid);
}

.notes-sources__group {
  margin: 0 0 var(--space-5);
}

.notes-sources__group:last-child {
  margin-bottom: 0;
}

.notes-sources__label {
  margin: 0 0 var(--space-3);
  font-family: var(--editorial-prose-font);
  font-size: var(--editorial-h3-size);
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

.notes-sources__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.notes-sources__list li {
  margin: 0 0 0.75em;
  font-family: var(--editorial-prose-font);
  font-size: var(--editorial-prose-size);
  line-height: var(--editorial-prose-line);
}

.notes-sources__list a {
  color: var(--gold-mid);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.notes-sources__list a:hover,
.notes-sources__list a:focus-visible {
  color: var(--text);
}

.notes-body a {
  color: var(--gold-mid);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.notes-body a:hover,
.notes-body a:focus-visible {
  color: var(--text);
}

.notes-endmark {
  margin: var(--space-6) 0 0;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  color: var(--color-text-subtle);
}

.notes-question {
  margin: var(--space-7) 0 0;
  padding: var(--space-5) var(--space-4);
  border-left: 2px solid var(--gold);
  background: linear-gradient(90deg, rgba(199, 157, 50, 0.08), transparent 70%);
  animation: notes-rise 0.9s var(--ease) 0.16s both;
}

.notes-question__label {
  margin: 0 0 var(--space-3);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.notes-question__text {
  margin: 0;
  font-family: var(--editorial-prose-font);
  font-size: clamp(1.08rem, 2.3vw, 1.22rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.4;
  color: var(--text);
}

.notes-footer {
  margin-top: var(--space-7);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}

.notes-signoff {
  margin: 0 0 var(--space-6);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--color-text-muted);
}

.notes-cta__lead {
  margin: 0 0 var(--space-4);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.notes-cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.85rem;
  margin: 0;
}

.notes-cta__actions--solo {
  margin-top: var(--space-5);
}

.notes-cta__primary {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--cta-text);
  background: var(--gold);
  padding: 0.7rem 1.15rem;
  border-radius: var(--radius-btn);
  transition: background 0.2s ease, transform 0.2s ease;
}

.notes-cta__primary:hover,
.notes-cta__primary:focus-visible {
  background: var(--gold-mid);
  color: var(--cta-text);
  transform: translateY(-1px);
}

.notes-cta__or {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--color-text-subtle);
}

.notes-cta__secondary {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--gold-mid);
  border-bottom: 1px solid transparent;
}

.notes-cta__secondary:hover,
.notes-cta__secondary:focus-visible {
  color: var(--text);
  border-bottom-color: var(--gold);
}

.notes-empty {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--color-text-muted);
}

.notes-index {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notes-index__item + .notes-index__item {
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}

.notes-index__link {
  display: grid;
  gap: var(--space-2);
  text-decoration: none;
  color: inherit;
}

.notes-index__num,
.notes-index__date,
.notes-index__read {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.notes-index__num {
  color: var(--gold-mid);
}

.notes-index__title {
  margin: var(--space-2) 0 0;
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
  transition: color 0.2s ease;
}

.notes-index__link:hover .notes-index__title,
.notes-index__link:focus-visible .notes-index__title {
  color: var(--gold-mid);
}

.notes-index__sub {
  margin: 0;
  font-family: var(--editorial-prose-font);
  font-size: var(--editorial-prose-size);
  font-style: italic;
  line-height: var(--editorial-prose-line);
  color: var(--color-text-muted);
}

/* ——— Lab form + Notes opt-in ——— */
.notes-lab,
.notes-optin {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}

.notes-index-cta {
  margin-top: var(--space-7);
}

.notes-lab__heading,
.notes-optin__heading {
  margin: 0 0 var(--space-2);
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
}

.notes-lab__lead,
.notes-optin__lead {
  margin: 0 0 var(--space-4);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.notes-lab__open {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--cta-text);
  background: var(--gold);
  border: 0;
  padding: 0.7rem 1.15rem;
  border-radius: var(--radius-btn);
  cursor: pointer;
}

.notes-lab__open:hover,
.notes-lab__open:focus-visible {
  background: var(--gold-mid);
}

.notes-lab__field {
  margin: 0 0 var(--space-4);
  border: 0;
  padding: 0;
  min-width: 0;
}

.notes-lab__label {
  display: block;
  margin: 0 0 var(--space-2);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
}

.notes-lab__input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
}

.notes-lab__input--area {
  resize: vertical;
  min-height: 5.5rem;
}

.notes-lab__input:focus {
  outline: 2px solid rgba(199, 157, 50, 0.45);
  outline-offset: 1px;
  border-color: var(--gold-mid);
}

.notes-lab__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.notes-lab__chip {
  display: inline-flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
}

.notes-lab__chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.notes-lab__chip span {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.7rem;
  background: var(--bg-raised);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.notes-lab__chip input:checked + span,
.notes-lab__chip:hover span {
  color: var(--text);
  border-color: var(--gold-mid);
  background: rgba(199, 157, 50, 0.1);
}

.notes-lab__chip input:focus-visible + span {
  outline: 2px solid rgba(199, 157, 50, 0.45);
  outline-offset: 1px;
}

.notes-lab__check {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  margin: 0 0 var(--space-4);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--text);
  cursor: pointer;
}

.notes-lab__check input {
  margin-top: 0.2rem;
  accent-color: var(--gold-mid);
}

.notes-lab__submit {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--cta-text);
  background: var(--gold);
  border: 0;
  padding: 0.7rem 1.15rem;
  border-radius: var(--radius-btn);
  cursor: pointer;
}

.notes-lab__submit:hover,
.notes-lab__submit:focus-visible {
  background: var(--gold-mid);
}

.notes-lab__submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.notes-lab__error {
  margin: 0 0 var(--space-3);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: #8a2f2f;
}

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

.notes-lab__thanks {
  margin: 0 0 var(--space-3);
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text);
}

.notes-lab__confirm {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--color-text-muted);
}

.notes-optin__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: stretch;
}

.notes-optin__email {
  flex: 1 1 12rem;
}

.notes-optin__submit {
  flex: 0 0 auto;
}

.notes-optin__done {
  margin: var(--space-3) 0 0;
  font-family: var(--font-serif);
  font-size: 1.08rem;
  color: var(--text);
}

.notes-footer__hmw {
  margin: var(--space-5) 0 0;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--color-text-muted);
}

.notes-footer__hmw .notes-cta__secondary {
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
}

@keyframes notes-rise {
  from {
    opacity: 0;
    transform: translateY(0.7rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .notes-intro-grid {
    grid-template-columns: 1fr;
  }

  .notes-intro-grid__aside {
    position: static;
    order: -1;
    max-width: 16.5rem;
    margin: 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .notes-header,
  .notes-body,
  .notes-question {
    animation: none;
  }

  .notes-intro-grid__aside img,
  .notes-intro-grid__aside-link:hover img,
  .notes-intro-grid__aside-link:focus-visible img {
    transition: none;
    transform: none;
  }

  .notes-cta__primary,
  .notes-index__title {
    transition: none;
  }

  .notes-cta__primary:hover,
  .notes-cta__primary:focus-visible {
    transform: none;
  }
}
