@import url("https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700&family=Noto+Serif:wght@400;500;600;700&display=swap");

:root {
  --bg: #f7fbfd;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --lotus-pink: #d97a9a;
  --chrysanthemum-yellow: #e7c85f;
  --lotus-leaf-green: #6f9a76;
  --light-blue: #cfe4f1;
  --light-blue-deep: #a9cfe3;
  --ink: #302924;
  --muted: #6f6761;
  --border: rgba(111, 154, 118, 0.18);
  --shadow: 0 18px 48px rgba(109, 129, 140, 0.14);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 999px;
  --content-width: 76rem;
  --reading-width: 44rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Noto Serif", "Source Serif 4", "Literata", "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  line-height: 1.75;
  background:
    radial-gradient(circle at top left, rgba(217, 122, 154, 0.18), transparent 28rem),
    radial-gradient(circle at top right, rgba(231, 200, 95, 0.2), transparent 24rem),
    linear-gradient(180deg, #f4fbff 0%, var(--bg) 24%, #fefdf9 100%);
}

a {
  color: inherit;
}

.page-shell {
  width: min(calc(100% - 2rem), var(--content-width));
  margin: 0 auto;
  padding: 1.5rem 0 4rem;
}

.site-header {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0 1.75rem;
}

.header-actions,
.locale-switcher {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.site-brand-icon {
  width: 2.4rem;
  height: 2.4rem;
  object-fit: contain;
  flex: 0 0 auto;
}

.site-brand-copy {
  display: flex;
  align-items: center;
  min-width: 0;
}

.site-brand-mark {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8e4366;
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.site-nav a,
.ghost-link,
.search-form button,
.back-link {
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  text-decoration: none;
  padding: 0.72rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(217, 122, 154, 0.18);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 10px 24px rgba(100, 114, 122, 0.08);
}

.site-nav a:hover,
.ghost-link:hover,
.search-form button:hover,
.back-link:hover {
  background: rgba(255, 246, 250, 0.95);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(16rem, 0.8fr);
  gap: 1.5rem;
  align-items: stretch;
  margin-bottom: 2rem;
}

.hero-card,
.panel,
.entry-card,
.search-result,
.feature-card,
.content-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-card {
  padding: 2rem;
}

.hero-card h1 {
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  font-size: clamp(2.3rem, 4vw, 4.2rem);
  line-height: 1.04;
  margin: 0 0 1rem;
  color: #6c3451;
}

.hero-card p {
  margin: 0 0 1rem;
  max-width: 38rem;
  color: #514740;
  font-size: 1.05rem;
}

.hero-accent {
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
  background:
    linear-gradient(160deg, rgba(231, 200, 95, 0.42), rgba(207, 228, 241, 0.74)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.65));
}

.hero-accent::before,
.hero-accent::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  opacity: 0.82;
}

.hero-accent::before {
  width: 14rem;
  height: 14rem;
  right: -2rem;
  top: -1.5rem;
  background: radial-gradient(circle, rgba(217, 122, 154, 0.45), rgba(217, 122, 154, 0) 66%);
}

.hero-accent::after {
  width: 16rem;
  height: 16rem;
  left: -4rem;
  bottom: -4rem;
  background: radial-gradient(circle, rgba(111, 154, 118, 0.34), rgba(111, 154, 118, 0) 64%);
}

.hero-accent-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  color: #7d6250;
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.74rem;
}

.hero-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.25rem;
}

.hero-random {
  margin-top: 1.5rem;
  padding: 1.1rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(111, 154, 118, 0.2);
  background: rgba(255, 255, 255, 0.58);
}

.hero-random h2 {
  margin: 0.85rem 0 0.55rem;
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.2;
  color: #5f3147;
}

.hero-random p {
  margin: 0;
  max-width: 34rem;
}

.random-trigger {
  cursor: pointer;
  font: inherit;
}

.primary-link {
  text-decoration: none;
  padding: 0.82rem 1.2rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--lotus-pink), #b86484);
  color: #fffdfd;
  box-shadow: 0 14px 28px rgba(184, 100, 132, 0.24);
}

.secondary-link {
  text-decoration: none;
  padding: 0.82rem 1.2rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #fff8d9, rgba(231, 200, 95, 0.45));
  color: #654a14;
  border: 1px solid rgba(231, 200, 95, 0.4);
}

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

.feature-grid {
  margin-top: 1.85rem;
}

.panel,
.feature-card,
.entry-card {
  padding: 1.2rem 1.25rem;
}

.panel h2,
.feature-card h2,
.list-header h1,
.content-header h1 {
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  margin-top: 0;
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.feature-card h3,
.entry-card h3 {
  margin: 0;
  font-size: 1.15rem;
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
}

.feature-card p,
.entry-card p,
.panel p {
  margin: 0;
  color: var(--muted);
}

.entry-card {
  position: relative;
  overflow: hidden;
}

.entry-card .source-icon-button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.35rem;
  height: 2.35rem;
  z-index: 2;
}

.entry-card .meta-row {
  padding-right: 3rem;
}

.entry-card::after {
  content: "";
  position: absolute;
  inset: auto 1.25rem 0.85rem;
  height: 3px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--lotus-pink), rgba(231, 200, 95, 0.92), rgba(111, 154, 118, 0.85));
}

.entry-card a.card-link {
  text-decoration: none;
  color: inherit;
}

.entry-preview {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.45rem;
}

.entry-preview a {
  text-decoration: none;
  color: #7c3958;
}

.entry-preview .muted {
  font-size: 0.92rem;
}

.meta-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.meta-chip,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}

.meta-chip {
  background: rgba(207, 228, 241, 0.56);
  color: #355767;
}

.meta-chip-link {
  text-decoration: none;
}

.meta-chip-link:hover,
.meta-chip-link:focus-visible {
  background: rgba(207, 228, 241, 0.88);
}

.tag {
  background: rgba(111, 154, 118, 0.14);
  color: #44634a;
}

.list-header,
.content-header,
.search-hero {
  margin-bottom: 1.25rem;
}

.content-header {
  position: relative;
  padding-right: 0;
}

.content-shell {
  padding: 1.4rem;
}

.content-shell article {
  width: min(100%, var(--reading-width));
  margin: 0 auto;
}

.content-shell h1,
.content-shell h2,
.content-shell h3 {
  color: #65354d;
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
}

.content-shell p,
.content-shell li {
  font-size: 1.07rem;
}

.content-shell pre {
  white-space: pre-wrap;
  font-family: "Noto Serif", "Source Serif 4", "Literata", "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  font-size: 1.05rem;
  margin: 0;
}

.reading-prewrap {
  white-space: pre-wrap;
}

.content-shell blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--lotus-pink);
  background: rgba(217, 122, 154, 0.08);
  border-radius: 0 1rem 1rem 0;
}

.content-split {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

.content-split-main,
.content-split-main .content-shell {
  min-width: 0;
}

.content-split .content-shell article {
  width: 100%;
  margin: 0;
}

.page-media-card {
  display: grid;
  gap: 0.9rem;
}

.source-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(210, 45, 45, 0.16);
  background: #ffefef;
  color: #a32727;
  text-decoration: none;
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  font-size: 0.95rem;
  box-shadow: 0 10px 24px rgba(140, 44, 44, 0.12);
}

.source-link-button:hover,
.source-link-button:focus-visible {
  background: #ffe4e4;
}

.search-form {
  display: flex;
  gap: 0.8rem;
  margin: 1rem 0 1.25rem;
}

.search-form input {
  flex: 1;
  min-width: 0;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(111, 154, 118, 0.24);
  font: inherit;
  background: rgba(255, 255, 255, 0.92);
}

.search-result-list {
  display: grid;
  gap: 0.9rem;
}

.search-result {
  padding: 1rem 1.1rem;
}

.search-result h2 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}

.search-result p {
  margin: 0;
  color: var(--muted);
}

.question-series-list,
.qa-index-shell,
.collection-index-shell,
.question-nav {
  display: grid;
  gap: 1rem;
}

.qa-primary-header,
.qa-secondary-header,
.collection-primary-header,
.collection-secondary-header {
  margin-bottom: 0;
}

.question-series-group {
  padding: 1.2rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.question-series-group h2 {
  margin-top: 0;
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
}

.question-series-group ul {
  margin: 0.8rem 0 0;
  padding-left: 1.25rem;
}

.question-series-group li + li {
  margin-top: 0.65rem;
}

.question-series-group a {
  text-decoration: none;
  color: #7c3958;
}

.question-nav {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.5rem;
}

.question-nav a,
.question-nav .nav-empty {
  min-height: 100%;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(217, 122, 154, 0.18);
  background: rgba(255, 255, 255, 0.74);
}

.question-nav a {
  text-decoration: none;
}

.question-nav strong,
.question-nav span {
  display: block;
}

.question-nav span {
  color: var(--muted);
  margin-bottom: 0.2rem;
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  font-size: 0.86rem;
}

.question-video-shell {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1.25rem;
}

.question-video-frame {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.question-video-frame iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.source-icon-button {
  position: absolute;
  top: 0;
  right: 0;
  width: 2.85rem;
  height: 2.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ffefef;
  border: 1px solid rgba(210, 45, 45, 0.16);
  box-shadow: 0 10px 24px rgba(140, 44, 44, 0.12);
  color: #cf2f2f;
  text-decoration: none;
}

.source-icon-button:hover,
.source-icon-button:focus-visible {
  background: #ffe4e4;
}

.source-icon-button svg {
  width: 1.3rem;
  height: 1.3rem;
  fill: currentColor;
}

.nav-empty {
  visibility: hidden;
}

.muted {
  color: var(--muted);
}

.site-footer {
  padding: 2rem 0 0;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 900px) {
  .hero,
  .feature-grid,
  .list-grid,
  .question-nav {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (min-width: 980px) {
  .content-split {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  }

  .content-split-main .content-shell {
    min-height: 100%;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(calc(100% - 1rem), var(--content-width));
  }

  .hero-card,
  .hero-accent,
  .content-shell,
  .panel,
  .entry-card,
  .feature-card {
    padding: 1.1rem;
  }

  .hero-card h1 {
    font-size: 2.1rem;
  }

  .search-form {
    flex-direction: column;
  }
}
