/* =====================================================
   MH Theme — Phase 77 default page content foundation
   Scope: standard/default pages and legal/editor content.
   No header, dock, modal, utility, or homepage-section ownership.
   ===================================================== */

.mht-page-content {
  position: relative;
}

.mht-page-content__body {
  width: min(820px, calc(100% - var(--site-gutter, 24px)));
  margin-inline: auto;
  padding-block: clamp(36px, 6vw, 84px);
  color: var(--text-secondary, #AFA4B8);
}

.mht-page-content__body > *:first-child { margin-top: 0; }
.mht-page-content__body > *:last-child { margin-bottom: 0; }

.mht-page-content__body :where(p, ul, ol) {
  font-family: var(--font-sans, "Blauer Nue", system-ui, sans-serif);
  font-size: clamp(.98rem, .94rem + .18vw, 1.08rem);
  line-height: 1.78;
  color: var(--text-secondary, #AFA4B8);
  margin: 0 0 1.15em;
}

.mht-page-content__body :where(h2, h3, h4) {
  font-family: var(--font-display, "Migra", "Playfair Display", Georgia, serif);
  color: var(--text-primary, #F6F2F7);
  letter-spacing: -.035em;
  line-height: 1.08;
  margin: 1.65em 0 .55em;
}

.mht-page-content__body h2 { font-size: clamp(1.85rem, 3.2vw, 3rem); }
.mht-page-content__body h3 { font-size: clamp(1.45rem, 2.4vw, 2.1rem); }
.mht-page-content__body h4 {
  font-family: var(--font-sans, "Blauer Nue", system-ui, sans-serif);
  font-size: .88rem;
  font-weight: 800;
  letter-spacing: .14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.mht-page-content__body :where(a) {
  color: var(--accent-glow, #B78CFF);
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

.mht-page-content__body :where(strong, b) {
  color: var(--text-primary, #F6F2F7);
}

.mht-page-content__body :where(ul, ol) {
  padding-left: 1.25em;
}

.mht-page-content__body li + li {
  margin-top: .48em;
}

.mht-page-content__body :where(blockquote) {
  margin: clamp(28px, 4vw, 44px) 0;
  padding: clamp(22px, 3vw, 32px);
  border-left: 2px solid rgba(183, 140, 255, .46);
  border-radius: 18px;
  background: rgba(255, 255, 255, .035);
  color: var(--text-primary, #F6F2F7);
}

.mht-page-content__body :where(hr) {
  border: 0;
  height: 1px;
  margin: clamp(34px, 5vw, 56px) 0;
  background: linear-gradient(90deg, transparent, rgba(221, 214, 227, .22), transparent);
}

.mht-page-content__body :where(img, video, iframe) {
  max-width: 100%;
  height: auto;
  border-radius: 18px;
}

.mht-page-content__body :where(table) {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 16px;
}

.mht-page-content__body :where(th, td) {
  padding: .9rem 1rem;
  border: 1px solid rgba(221, 214, 227, .12);
  text-align: left;
  vertical-align: top;
}

.mht-page-content__body :where(th) {
  color: var(--text-primary, #F6F2F7);
  background: rgba(255, 255, 255, .045);
}

html[data-mht-theme-effective="light"] .mht-page-content__body,
html[data-mht-theme="light"] .mht-page-content__body {
  color: #4C345D;
}

html[data-mht-theme-effective="light"] .mht-page-content__body :where(p, ul, ol),
html[data-mht-theme="light"] .mht-page-content__body :where(p, ul, ol) {
  color: rgba(47, 31, 58, .78);
}

html[data-mht-theme-effective="light"] .mht-page-content__body :where(h2, h3, h4, strong, b),
html[data-mht-theme="light"] .mht-page-content__body :where(h2, h3, h4, strong, b) {
  color: #2F1F3A;
}

html[data-mht-theme-effective="light"] .mht-page-content__body :where(blockquote),
html[data-mht-theme="light"] .mht-page-content__body :where(blockquote) {
  background: rgba(255, 255, 255, .62);
  color: #2F1F3A;
  border-left-color: rgba(142, 99, 163, .46);
  box-shadow: 0 18px 48px rgba(47, 31, 58, .06);
}

html[data-mht-theme-effective="light"] .mht-page-content__body :where(th, td),
html[data-mht-theme="light"] .mht-page-content__body :where(th, td) {
  border-color: rgba(76, 52, 93, .14);
}

html[data-mht-theme-effective="light"] .mht-page-content__body :where(th),
html[data-mht-theme="light"] .mht-page-content__body :where(th) {
  background: rgba(230, 216, 255, .34);
}

@media (max-width: 640px) {
  .mht-page-content__body {
    padding-block: clamp(30px, 8vw, 54px);
  }
}

/* =====================================================
   Phase 151M — public search/archive/index fallback rhythm
   Scope: safe public query routes only. Keeps fallback routes out of blank-shell
   state while reusing the established card/image-loading language.
   ===================================================== */

.mht-query-list {
  padding-block: clamp(42px, 6vw, 84px) clamp(68px, 9vw, 124px);
}

.mht-query-list__inner {
  width: var(--site-w);
  max-width: var(--site-max);
  margin-inline: auto;
}

.mht-query-list__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 30px);
}

.mht-query-card {
  min-width: 0;
}

.mht-query-card__link {
  display: grid;
  grid-template-columns: minmax(140px, 34%) minmax(0, 1fr);
  min-height: 100%;
  overflow: hidden;
  border: 1px solid rgba(197, 166, 211, .12);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(246, 242, 247, .055), rgba(246, 242, 247, .025)),
    rgba(27, 22, 32, .82);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 28px 62px -38px rgba(0, 0, 0, .56);
  transition:
    transform 280ms var(--ease-soft, cubic-bezier(.4,0,.2,1)),
    border-color 280ms var(--ease-soft, cubic-bezier(.4,0,.2,1)),
    box-shadow 280ms var(--ease-soft, cubic-bezier(.4,0,.2,1));
}

.mht-query-card__link:hover {
  transform: translateY(-2px);
  border-color: rgba(183, 140, 255, .30);
  box-shadow: 0 30px 70px -34px rgba(0, 0, 0, .62);
}

.mht-query-card__link:focus-visible {
  outline: 2px solid var(--accent-glow, #B78CFF);
  outline-offset: 4px;
}

.mht-query-card__media {
  position: relative;
  display: block;
  min-height: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 24% 20%, rgba(183, 140, 255, .25), transparent 34%),
    radial-gradient(circle at 78% 78%, rgba(197, 166, 211, .14), transparent 38%),
    linear-gradient(135deg, rgba(27, 22, 32, .95), rgba(20, 16, 23, .98) 58%, rgba(47, 31, 58, .90));
  border-right: 1px solid rgba(221, 214, 227, .10);
}

.mht-query-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 720ms var(--ease-soft, cubic-bezier(.4,0,.2,1));
}

.mht-query-card__link:hover .mht-query-card__image {
  transform: scale(1.025);
}

.mht-query-card__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(246, 242, 247, .34);
  font-family: var(--font-display, "Migra", Georgia, serif);
  font-size: clamp(2rem, 5vw, 4.5rem);
  letter-spacing: -.08em;
}

.mht-query-card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(22px, 2.8vw, 32px);
  min-width: 0;
}

.mht-query-card__meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--text-muted, #AFA4B8);
  font-family: var(--font-sans, "Blauer Nue", system-ui, sans-serif);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .13em;
  line-height: 1.35;
  text-transform: uppercase;
}

.mht-query-card__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(197, 166, 211, .42);
}

.mht-query-card__title {
  margin: 0;
  color: var(--text-primary, #F6F2F7);
  font-family: var(--font-display, "Migra", Georgia, serif);
  font-size: clamp(1.35rem, 1.05rem + 1vw, 2rem);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.mht-query-card__excerpt {
  color: var(--text-secondary, #DDD6E3);
  font-family: var(--font-sans, "Blauer Nue", system-ui, sans-serif);
  font-size: .96rem;
  line-height: 1.68;
  opacity: .88;
}

.mht-query-card__read {
  margin-top: auto;
  color: var(--accent-glow, #B78CFF);
  font-family: var(--font-sans, "Blauer Nue", system-ui, sans-serif);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.mht-query-list .navigation.pagination {
  margin: clamp(28px, 5vw, 52px) auto 0;
  color: var(--text-secondary, #DDD6E3);
  font-family: var(--font-sans, "Blauer Nue", system-ui, sans-serif);
}

.mht-query-list .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.mht-query-list .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding-inline: 12px;
  border: 1px solid rgba(221, 214, 227, .14);
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
}

.mht-query-list .page-numbers.current,
.mht-query-list .page-numbers:hover,
.mht-query-list .page-numbers:focus-visible {
  border-color: rgba(183, 140, 255, .38);
  color: #E6D8FF;
  background: rgba(183, 140, 255, .08);
}

.mht-query-list__empty {
  max-width: 720px;
  margin-inline: auto;
  padding: clamp(30px, 5vw, 54px);
  border-radius: 24px;
  text-align: left;
}

.mht-query-list__empty h2 {
  margin: 0 0 12px;
  color: var(--text-primary, #F6F2F7);
  font-family: var(--font-display, "Migra", Georgia, serif);
  font-size: clamp(1.65rem, 3vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.mht-query-list__empty p {
  max-width: 56ch;
  margin: 0 0 24px;
  color: var(--text-secondary, #DDD6E3);
  font-family: var(--font-sans, "Blauer Nue", system-ui, sans-serif);
  line-height: 1.72;
}

html[data-mht-theme-effective="light"] .mht-query-card__link,
html[data-mht-theme="light"] .mht-query-card__link {
  border-color: rgba(76, 52, 93, .13);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .74), rgba(246, 242, 247, .70)),
    rgba(251, 248, 253, .84);
  box-shadow: 0 24px 60px -42px rgba(47, 31, 58, .32);
}

html[data-mht-theme-effective="light"] .mht-query-card__link:hover,
html[data-mht-theme="light"] .mht-query-card__link:hover {
  border-color: rgba(142, 99, 163, .24);
  box-shadow: 0 28px 68px -42px rgba(47, 31, 58, .38);
}

html[data-mht-theme-effective="light"] .mht-query-card__media,
html[data-mht-theme="light"] .mht-query-card__media {
  border-right-color: rgba(76, 52, 93, .10);
  background:
    radial-gradient(circle at 24% 20%, rgba(183, 140, 255, .18), transparent 35%),
    radial-gradient(circle at 78% 78%, rgba(142, 99, 163, .10), transparent 38%),
    linear-gradient(135deg, rgba(251, 248, 253, .96), rgba(246, 242, 247, .98) 52%, rgba(230, 216, 255, .72));
}

html[data-mht-theme-effective="light"] .mht-query-card__placeholder,
html[data-mht-theme="light"] .mht-query-card__placeholder {
  color: rgba(76, 52, 93, .30);
}

html[data-mht-theme-effective="light"] .mht-query-card__meta,
html[data-mht-theme="light"] .mht-query-card__meta,
html[data-mht-theme-effective="light"] .mht-query-card__excerpt,
html[data-mht-theme="light"] .mht-query-card__excerpt,
html[data-mht-theme-effective="light"] .mht-query-list .navigation.pagination,
html[data-mht-theme="light"] .mht-query-list .navigation.pagination {
  color: rgba(47, 31, 58, .70);
}

html[data-mht-theme-effective="light"] .mht-query-card__title,
html[data-mht-theme="light"] .mht-query-card__title,
html[data-mht-theme-effective="light"] .mht-query-list__empty h2,
html[data-mht-theme="light"] .mht-query-list__empty h2 {
  color: #2F1F3A;
}

html[data-mht-theme-effective="light"] .mht-query-list__empty p,
html[data-mht-theme="light"] .mht-query-list__empty p {
  color: rgba(47, 31, 58, .72);
}

html[data-mht-theme-effective="light"] .mht-query-list .page-numbers,
html[data-mht-theme="light"] .mht-query-list .page-numbers {
  border-color: rgba(76, 52, 93, .13);
}

html[data-mht-theme-effective="light"] .mht-query-list .page-numbers.current,
html[data-mht-theme-effective="light"] .mht-query-list .page-numbers:hover,
html[data-mht-theme-effective="light"] .mht-query-list .page-numbers:focus-visible,
html[data-mht-theme="light"] .mht-query-list .page-numbers.current,
html[data-mht-theme="light"] .mht-query-list .page-numbers:hover,
html[data-mht-theme="light"] .mht-query-list .page-numbers:focus-visible {
  color: #4C345D;
  border-color: rgba(142, 99, 163, .28);
  background: rgba(230, 216, 255, .42);
}

@media (max-width: 900px) {
  .mht-query-list__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .mht-query-card__link {
    grid-template-columns: 1fr;
  }

  .mht-query-card__media {
    border-right: 0;
    border-bottom: 1px solid rgba(221, 214, 227, .10);
  }

  html[data-mht-theme-effective="light"] .mht-query-card__media,
  html[data-mht-theme="light"] .mht-query-card__media {
    border-bottom-color: rgba(76, 52, 93, .10);
  }
}
