/* OmegleChat Medi — medi.omeglechat.online */
:root {
  --bg: #0f1419;
  --bg-card: #1a222d;
  --bg-elevated: #232d3b;
  --text: #e8edf4;
  --text-muted: #9aa8b8;
  --accent: #5eb8a8;
  --accent-soft: rgba(94, 184, 168, 0.16);
  --accent-romance: #e8a4b8;
  --accent-advice: #7ec8a3;
  --accent-guide: #5eb8a8;
  --border: #2d3a4d;
  --serif: "Lora", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --radius: 12px;
  --max: 720px;
  --wide: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--wide); margin: 0 auto; padding: 0 1.25rem; }
.container-wide { max-width: var(--wide); margin: 0 auto; padding: 0 1.25rem; }
.content-wrap { max-width: var(--max); }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(15, 20, 25, 0.9);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
}

.brand:hover { text-decoration: none; opacity: 0.92; }

.brand-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; gap: 0.1rem; }
.brand-text strong { font-size: 1.05rem; letter-spacing: -0.01em; }
.brand-text small {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.9rem;
}

.site-nav a { color: var(--text-muted); }
.site-nav a:hover { color: var(--text); text-decoration: none; }
.site-nav .nav-cta {
  color: var(--accent);
  font-weight: 600;
}

/* Main */
.site-main { flex: 1; padding: 2.5rem 0 4rem; }

.content-wrap { max-width: var(--max); }

/* Home */
.hero {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.hero-lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 36em;
}

.featured-serial {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 2.5rem;
}

.featured-serial .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.featured-serial h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.featured-serial p { color: var(--text-muted); margin-bottom: 1rem; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #0f1419;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.section-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
}

.post-list { list-style: none; }

.post-list li {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.post-list a.title {
  font-weight: 600;
  color: var(--text);
  font-size: 1.05rem;
}

.post-list .meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Post page */
.post-kicker {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.post-header h1 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.post-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.post-meta .sep { margin: 0 0.35rem; }

.post-deck {
  font-size: 1.125rem;
  color: var(--text-muted);
  font-style: italic;
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin-bottom: 2rem;
}

.prose {
  font-size: 1.0625rem;
}

.prose h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  margin: 2rem 0 0.75rem;
  color: var(--text);
}

.prose h3 { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; }

.prose p, .prose ul, .prose ol { margin-bottom: 1.15rem; }

.prose ul, .prose ol { padding-left: 1.5rem; }

.prose li { margin-bottom: 0.35rem; }

.prose strong { color: #fff; font-weight: 600; }

.prose em { color: var(--text-muted); }

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.prose th, .prose td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.prose th { background: var(--bg-elevated); }

.serial-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.5rem 0 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}

.serial-nav-next { margin-left: auto; text-align: right; }

.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.cta-chat {
  background: var(--accent-soft);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
}

/* Static pages (article.page-static inside main — not body) */
article.page-static h1 {
  font-family: var(--serif);
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 0.6rem;
}

article.page-static h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
}

article.page-static > p { margin-bottom: 1rem; color: var(--text-muted); }
article.page-static .prose p { color: var(--text); }

article.page-static > table,
article.page-static .toc-table {
  width: 100%;
  margin: 1.25rem 0 1.75rem;
  border-collapse: collapse;
  font-size: 0.95rem;
}

article.page-static > table th,
article.page-static > table td,
article.page-static .toc-table th,
article.page-static .toc-table td {
  border: 1px solid var(--border);
  padding: 0.65rem 0.85rem;
  text-align: left;
}

article.page-static > table th,
article.page-static .toc-table th {
  background: var(--bg-elevated);
  color: var(--text);
}

.author-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
  width: 100%;
}

.toc-table { width: 100%; margin: 1rem 0; }

/* Ads */
.blog-ad {
  margin: 1.5rem 0;
  text-align: center;
  clear: both;
}

.blog-ad-leaderboard {
  width: 100%;
  max-width: 728px;
  margin-left: auto;
  margin-right: auto;
  min-height: 90px;
}

.continue-meta {
  font-size: 0.9rem;
  color: var(--accent-romance);
  margin: 0 0 0.75rem;
}

.read-next-prompt {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  background: var(--accent-soft);
  border-radius: 8px;
  font-size: 0.95rem;
}

.related-next a {
  color: var(--accent);
  font-weight: 600;
}

.related-series-link {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: auto;
  background: var(--bg-card);
}

.footer-inner {
  display: grid;
  gap: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .site-nav { font-size: 0.8rem; }
  .header-inner { padding: 0.5rem 0; }
}

/* === UI refresh 2026-07 — cards, sidebar, media === */

.hero-sub {
  font-size: 0.9rem;
  color: var(--accent-romance);
  font-weight: 600;
  margin-top: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.pill {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
}

.pill:hover, .pill.active {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-soft);
  text-decoration: none;
}

.featured-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.featured-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.featured-card.featured-primary {
  border-color: rgba(232, 164, 184, 0.35);
  background: linear-gradient(145deg, var(--bg-card) 0%, rgba(232, 164, 184, 0.06) 100%);
}

.featured-card h2 {
  font-family: var(--serif);
  font-size: 1.45rem;
  margin-bottom: 0.5rem;
}

.featured-card p { color: var(--text-muted); margin-bottom: 1rem; }

.featured-card .btn { margin-right: 0.5rem; margin-top: 0.25rem; }

.home-section { margin-top: 1rem; }

.section-more { margin-top: 1.5rem; }

.post-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  border-color: rgba(108, 158, 255, 0.4);
}

.post-card-image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-elevated);
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-body { padding: 1.1rem 1.25rem 1.25rem; flex: 1; display: flex; flex-direction: column; }

.post-card-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.tag-romance { color: var(--accent-romance); }
.tag-advice { color: var(--accent-advice); }
.tag-guide { color: var(--accent-guide); }
.tag-essay { color: var(--accent); }

.post-card-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.post-card-title a { color: var(--text); text-decoration: none; }
.post-card-title a:hover { color: var(--accent); }

.post-card-excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  flex: 1;
  line-height: 1.5;
}

.post-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.post-card-meta .sep { margin: 0 0.3rem; }

.reading-time { white-space: nowrap; }

/* Post layout: reading column + narrow TOC, centered as one group */
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 1.5rem;
  align-items: start;
  width: 100%;
  max-width: 980px;
  margin-inline: auto;
}

.post-main { min-width: 0; max-width: none; }

.post-sidebar {
  position: sticky;
  top: 80px;
  width: 180px;
}

.sidebar-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.post-toc, .post-toc-mobile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.78rem;
  line-height: 1.35;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.post-toc strong, .post-toc-mobile strong {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 600;
}

.post-toc ol, .post-toc-mobile ol {
  margin: 0.4rem 0 0;
  padding-left: 1rem;
}

.post-toc li, .post-toc-mobile li { margin-bottom: 0.25rem; }

.post-toc a, .post-toc-mobile a { color: var(--text-muted); }
.post-toc a:hover, .post-toc-mobile a:hover { color: var(--accent); }

.related-posts {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  margin-bottom: 1rem;
}

.related-list { list-style: none; }
.related-list li { margin-bottom: 0.4rem; font-size: 0.8rem; line-height: 1.35; }
.related-list a { color: var(--text); }

.sidebar-cta {
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 0.85rem;
  font-size: 0.85rem;
}

.sidebar-cta .text-muted { padding: 0; background: transparent; font-size: 0.8rem; }
.sidebar-cta .btn { margin-top: 0.65rem; width: 100%; text-align: center; font-size: 0.85rem; padding: 0.45rem 0.6rem; }

.chat-cta-box {
  margin: 1.75rem 0 0.5rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--accent-soft);
}
.chat-cta-box--strong {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}
.chat-cta-box--soft {
  background: transparent;
  padding: 0.85rem 0 0;
  border: none;
  border-top: 1px solid var(--border);
}
.opener-tool {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem 1.5rem;
  margin: 0 0 2rem;
}
.opener-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.opener-select {
  display: block;
  width: 100%;
  max-width: 28rem;
  margin-bottom: 0.9rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
}
.opener-output {
  margin: 1rem 0;
  padding: 1rem 1.1rem;
  background: var(--bg-elevated);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.45;
}
.opener-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
}

.chat-cta-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.chat-cta-lead { margin: 0 0 0.75rem; }
.chat-cta-actions { margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }

.post-hero {
  margin: 0 0 1.75rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.post-hero img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 420px;
  object-fit: cover;
}

.post-hero figcaption {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  background: var(--bg-card);
}

.media-embed {
  margin: 0 0 1.75rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}

.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}

.video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

.media-caption, .text-muted {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  background: var(--bg-card);
  margin: 0;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.25rem 0;
  border: 1px solid var(--border);
}

.prose figure {
  margin: 1.5rem 0;
}

.prose figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  text-align: center;
}

.audio-player-wrap, .audio-player {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0 1.75rem;
}

.audio-player-wrap audio, .audio-player audio {
  width: 100%;
  margin-top: 0.5rem;
}

.serial-progress {
  margin: 2rem 0 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.serial-progress-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.serial-progress-bar {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.serial-progress-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-romance), var(--accent));
  border-radius: 3px;
}

.serial-progress-link { font-size: 0.85rem; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.footer-grid p { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.35rem; }

/* Mobile nav */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0;
  margin-top: 0.35rem;
  z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: 0.45rem 1rem;
  color: var(--text-muted);
}
.nav-dropdown-menu a:hover { background: var(--bg-elevated); color: var(--text); text-decoration: none; }

.page-home .content-wrap,
.page-home .container-wide,
.page-archive .container-wide { max-width: var(--wide); }

.page-archive .archive-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.page-archive .archive-header h1 {
  font-family: var(--serif);
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 0.6rem;
}

.page-archive .archive-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 40em;
}

.page-archive .category-pills { margin-bottom: 2rem; }

.page-archive .archive-listing { margin-top: 0; }

/* Only the article shell — never body (body.page-static used to shrink the whole site) */
article.page-static {
  max-width: none;
  width: 100%;
}

body.page-default,
body.page-home,
body.page-archive,
body.page-post {
  max-width: none;
  width: 100%;
}

@media (max-width: 960px) {
  .featured-grid { grid-template-columns: 1fr; }
  .post-card-grid { grid-template-columns: repeat(2, 1fr); }
  .post-layout {
    grid-template-columns: 1fr;
    max-width: var(--wide);
  }
  .post-sidebar { position: static; width: auto; }
  .post-toc { display: none; }
  .post-main { max-width: none; }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
    gap: 0.75rem;
  }
  .site-nav.is-open { display: flex; }
  .header-inner { position: relative; }
  .nav-dropdown-menu {
    position: static;
    display: block;
    border: none;
    padding-left: 0.75rem;
    margin-top: 0;
    background: transparent;
  }
  .post-card-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
