:root {
  --ink: #2e3140;
  --muted: #6f7282;
  --paper: #fffdfa;
  --cream: #fbf3e8;
  --mint: #d7eadf;
  --mint-deep: #6f9f88;
  --lavender: #e3dcf4;
  --lavender-deep: #8373a6;
  --blush: #f5d9d0;
  --sky: #d8e9f2;
  --gold: #eac97b;
  --line: rgba(46, 49, 64, 0.14);
  --shadow: 0 20px 60px rgba(63, 63, 79, 0.12);
  --radius: 8px;
  --content: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 0 24px;
  background: rgba(255, 253, 250, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #44584d;
  background: linear-gradient(135deg, var(--mint), var(--lavender));
  border: 1px solid rgba(46, 49, 64, 0.08);
  border-radius: 50%;
  font-size: 0.82rem;
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  min-width: 72px;
  padding: 10px 12px;
  color: var(--muted);
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
}

.nav-auth-button {
  min-height: 39px;
  padding: 9px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 750;
  cursor: pointer;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--mint);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
  border-radius: 999px;
}

.hero {
  position: relative;
  min-height: clamp(560px, 82vh, 760px);
  overflow: hidden;
  display: grid;
  align-items: center;
  padding: 72px 24px 92px;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(rgba(255, 253, 250, 0.76), rgba(255, 253, 250, 0.82)),
    url("assets/images/sacred-space-hero.png") center / cover;
}

.auth-panel {
  display: grid;
  gap: 22px;
  width: min(100%, 480px);
  padding: 28px;
  background: rgba(255, 253, 250, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-panel h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.1rem);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  font-weight: 800;
}

.auth-message {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.hero-image {
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(255, 253, 250, 0.95) 0%, rgba(255, 253, 250, 0.74) 45%, rgba(255, 253, 250, 0.16) 100%),
    linear-gradient(0deg, rgba(255, 253, 250, 0.82), rgba(255, 253, 250, 0.08));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(100%, var(--content));
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 12px;
  color: #6b866f;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.12;
}

h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 5.5vw, 4.5rem);
  font-weight: 500;
}

h2 {
  margin-bottom: 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  font-weight: 500;
}

.page-hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
}

h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
}

.hero-copy {
  max-width: 580px;
  margin: 0 0 30px;
  color: #4f5363;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  color: #26352e;
  background: var(--mint);
  border-color: rgba(52, 88, 68, 0.15);
}

.button.primary:hover {
  background: #c6e3d2;
}

.button.secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--line);
}

.button.secondary:hover {
  background: #ffffff;
}

.button.danger {
  color: #8e3e3e;
  border-color: rgba(142, 62, 62, 0.28);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.text-link {
  color: #537963;
  font-weight: 800;
  text-decoration-color: rgba(83, 121, 99, 0.34);
  text-underline-offset: 4px;
}

.section {
  width: min(100% - 32px, var(--content));
  margin: 0 auto;
  padding: 76px 0;
}

.section.tinted {
  width: 100%;
  max-width: none;
  padding: 76px max(16px, calc((100vw - var(--content)) / 2));
  background: linear-gradient(135deg, rgba(216, 233, 242, 0.72), rgba(227, 220, 244, 0.58) 52%, rgba(215, 234, 223, 0.66));
}

.section-heading {
  max-width: 720px;
  margin: 0 auto 34px;
  text-align: center;
}

.section-heading.align-left {
  margin-right: 0;
  margin-left: 0;
  text-align: left;
}

.intro-grid,
.two-column,
.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
  gap: 32px;
  align-items: start;
}

.quiet-panel,
.profile-panel,
.journal-surface,
.room-list,
.chat-window {
  padding: 28px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature-grid,
.prompt-grid,
.answer-grid,
.study-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: min(100%, var(--content));
  margin: 0 auto;
}

.feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature-card,
.study-card,
.prompt-card,
.answer-card {
  min-height: 100%;
  padding: 24px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.feature-card:nth-child(2),
.answer-card:nth-child(2) {
  background: rgba(245, 217, 208, 0.54);
}

.feature-card:nth-child(3),
.answer-card:nth-child(3) {
  background: rgba(216, 233, 242, 0.62);
}

.feature-icon,
.prompt-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  color: #4d6458;
  background: var(--mint);
  border-radius: 50%;
  font-weight: 850;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.timeline li {
  padding: 22px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.timeline strong,
.timeline span {
  display: block;
}

.timeline strong {
  margin-bottom: 8px;
}

.page-hero {
  width: min(100% - 32px, var(--content));
  margin: 0 auto;
  padding: 78px 0 34px;
}

.page-hero.compact {
  max-width: 860px;
}

.page-hero p:not(.eyebrow) {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.12rem;
}

.study-detail-hero {
  padding-bottom: 58px;
}

.study-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.study-meta span,
.tag-row span,
.status-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 10px;
  color: #4f5363;
  background: rgba(227, 220, 244, 0.7);
  border: 1px solid rgba(46, 49, 64, 0.08);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 750;
}

.featured-study {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(215, 234, 223, 0.86), rgba(255, 253, 250, 0.92));
}

.download-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: min(100%, var(--content));
  margin: 0 auto;
}

.download-list a {
  display: flex;
  min-height: 96px;
  flex-direction: column;
  justify-content: center;
  padding: 22px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
}

.download-list span {
  color: var(--muted);
}

.check-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 30px;
}

.check-list li::before {
  position: absolute;
  left: 0;
  top: 0.18em;
  width: 20px;
  height: 20px;
  content: "";
  background: radial-gradient(circle at 50% 50%, var(--mint-deep) 0 35%, transparent 38%), var(--mint);
  border-radius: 50%;
}

.detail-list {
  display: grid;
  gap: 14px;
  margin: 22px 0;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.detail-list dt {
  color: var(--muted);
  font-weight: 700;
}

.detail-list dd {
  margin: 0;
  font-weight: 750;
  text-align: right;
}

.video-shell {
  width: min(100%, 920px);
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.video-shell iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.reflection-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  gap: 28px;
}

.prompt-grid,
.answer-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.chat-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
}

.room-list {
  display: grid;
  align-content: start;
  gap: 12px;
}

.room {
  display: grid;
  gap: 2px;
  padding: 14px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
}

.room.active,
.room:hover {
  color: var(--ink);
  background: var(--mint);
}

.chat-window {
  min-height: 520px;
  display: grid;
  grid-template-rows: auto auto auto minmax(240px, 1fr) auto;
  gap: 22px;
}

.chat-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.message-list {
  display: grid;
  align-content: start;
  gap: 16px;
}

.empty-state {
  margin: 0;
  padding: 18px;
  color: var(--muted);
  background: rgba(255, 253, 250, 0.72);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.meeting-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.meeting-actions .button {
  min-height: 40px;
  padding: 9px 14px;
}

.live-study-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.25fr);
  gap: 16px;
}

.pinned-study,
.meeting-panel,
.live-panel {
  padding: 20px;
  background: rgba(255, 253, 250, 0.84);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.meeting-panel {
  display: grid;
  gap: 14px;
}

.meeting-room-form {
  display: grid;
  gap: 10px;
}

.meeting-room-form label {
  font-weight: 800;
}

.pinned-study h3 {
  font-size: 1.2rem;
}

.presenter-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.presenter-tools button {
  min-height: 34px;
  padding: 7px 11px;
  color: #4f5363;
  background: rgba(227, 220, 244, 0.68);
  border: 1px solid rgba(46, 49, 64, 0.1);
  border-radius: 999px;
  font-weight: 800;
}

.study-markup-text {
  margin-top: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.study-markup-text p {
  margin: 0;
}

mark {
  padding: 0 3px;
  background: rgba(234, 201, 123, 0.42);
  border-radius: 4px;
}

.underlined-text {
  text-decoration: underline;
  text-decoration-color: var(--lavender-deep);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

.live-video-surface {
  display: grid;
  min-height: 230px;
  place-items: center;
  padding: 24px;
  color: #4f5363;
  background:
    linear-gradient(135deg, rgba(215, 234, 223, 0.74), rgba(227, 220, 244, 0.72)),
    #ffffff;
  border: 1px dashed rgba(46, 49, 64, 0.24);
  border-radius: var(--radius);
  text-align: center;
}

.participant-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.participant-row span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 10px;
  color: #4f5363;
  background: rgba(216, 233, 242, 0.62);
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 750;
}

.full-window-room {
  display: grid;
  gap: 16px;
  padding: 18px;
  background: #2f3340;
  border-radius: var(--radius);
  color: #fffdfa;
}

.full-window-topbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.full-window-topbar h3,
.full-window-topbar p {
  margin: 0;
}

.meeting-actions.compact {
  padding-bottom: 0;
  border-bottom: 0;
}

.meeting-actions.compact .button.secondary {
  color: #fffdfa;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}

.full-window-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 14px;
}

.full-window-main {
  display: grid;
  min-height: clamp(340px, 58vh, 620px);
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(216, 233, 242, 0.22), rgba(227, 220, 244, 0.2)),
    #20242f;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  text-align: center;
}

.full-window-side {
  display: grid;
  align-content: start;
  gap: 12px;
}

.mini-pinned-study,
.mini-chat-message {
  padding: 14px;
  color: var(--ink);
  background: rgba(255, 253, 250, 0.94);
  border-radius: var(--radius);
}

.mini-pinned-study p,
.mini-chat-message p {
  margin: 6px 0 0;
}

.message-form.compact {
  grid-template-columns: 1fr;
}

.message {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  background: rgba(255, 253, 250, 0.84);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.message h3,
.message p {
  margin: 0;
}

.message h3 {
  font-size: 0.98rem;
}

.message-note {
  background: rgba(216, 233, 242, 0.55);
}

.avatar,
.profile-avatar {
  display: grid;
  place-items: center;
  color: #44584d;
  background: var(--avatar-color, var(--mint));
  border-radius: 50%;
  font-weight: 850;
}

.avatar {
  width: 42px;
  height: 42px;
}

.avatar.lavender {
  color: #51436c;
  background: var(--lavender);
}

.avatar.green {
  color: #44584d;
  background: #cfe7d8;
}

.message-form,
.journal-form {
  display: grid;
  gap: 12px;
}

.message-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

input,
select,
textarea {
  width: 100%;
  padding: 13px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

textarea {
  resize: vertical;
}

.profile-layout {
  grid-template-columns: 320px minmax(0, 1fr);
}

.profile-panel {
  display: grid;
  justify-items: start;
}

.profile-switcher-label {
  display: block;
  margin-top: 16px;
  margin-bottom: 8px;
  font-weight: 800;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  font-size: 1.3rem;
}

.profile-edit {
  width: 100%;
  margin: 14px 0 4px;
}

.profile-edit summary {
  cursor: pointer;
  font-weight: 850;
}

.profile-edit-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.field-label {
  font-weight: 800;
}

.choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.swatch-choice,
.icon-choice {
  position: relative;
  display: inline-grid;
  place-items: center;
}

.swatch-choice input,
.icon-choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.swatch-choice span,
.icon-choice span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid transparent;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
}

.swatch-choice span {
  background: var(--swatch-color);
}

.icon-choice span {
  font-weight: 850;
}

.swatch-choice input:checked + span,
.icon-choice input:checked + span {
  border-color: var(--mint-deep);
  box-shadow: 0 0 0 3px rgba(111, 159, 136, 0.22);
}

.journal-surface {
  box-shadow: none;
}

.answer-grid {
  width: min(100%, var(--content));
  margin: 0 auto;
}

.saved-study-grid,
.study-notes-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: min(100%, var(--content));
  margin: 0 auto;
}

.study-notes-layout {
  align-items: start;
}

.saved-study-card,
.study-note-form {
  padding: 24px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.study-note-form {
  display: grid;
  gap: 12px;
}

.feed-layout,
.study-builder {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.study-builder {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.feed-sidebar,
.composer,
.feed-post,
.builder-form {
  padding: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.feed-sidebar,
.composer,
.feed-post,
.builder-form {
  box-shadow: var(--shadow);
}

.feed-sidebar {
  display: grid;
  gap: 14px;
}

.feed-sidebar h2,
.feed-post h2 {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 850;
}

.mini-stat {
  display: grid;
  gap: 2px;
  padding: 14px;
  background: rgba(215, 234, 223, 0.58);
  border-radius: var(--radius);
}

.mini-stat span,
.feed-post header p {
  color: var(--muted);
  font-size: 0.92rem;
}

.feed-main {
  display: grid;
  gap: 18px;
}

.composer {
  display: grid;
  gap: 12px;
}

.composer label,
.builder-form label,
.journal-form label {
  font-weight: 800;
}

.composer-actions,
.reaction-row,
.builder-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feeling-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  border: 0;
}

.feeling-picker legend {
  width: 100%;
  margin-bottom: 2px;
  font-weight: 800;
}

.feeling-picker label {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  color: #4f5363;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
}

.feeling-picker label.selected {
  color: #315944;
  background: rgba(215, 234, 223, 0.92);
  border-color: rgba(111, 159, 136, 0.48);
}

.feeling-picker input {
  width: auto;
  margin: 0;
}

.composer-actions .button {
  min-height: 40px;
  padding: 9px 14px;
}

.image-button {
  cursor: pointer;
}

.feed-post header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.feed-post header > div:nth-child(2) {
  min-width: 0;
}

.post-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.post-menu button {
  min-height: 32px;
  padding: 6px 10px;
  color: #4f5363;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
}

.feed-post h2,
.feed-post header p {
  margin: 0;
}

.reaction-row span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 5px 10px;
  color: #4f5363;
  background: rgba(245, 217, 208, 0.58);
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 750;
}

.post-image {
  margin: 18px 0;
}

.post-image div {
  min-height: 190px;
  background:
    linear-gradient(135deg, rgba(215, 234, 223, 0.72), rgba(245, 217, 208, 0.58)),
    linear-gradient(45deg, rgba(255, 255, 255, 0.5) 25%, transparent 25% 50%, rgba(255, 255, 255, 0.5) 50% 75%, transparent 75%);
  background-size: auto, 28px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.post-image figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.comment-thread {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.comment-thread article {
  padding: 12px 14px;
  background: rgba(216, 233, 242, 0.46);
  border-radius: var(--radius);
}

.comment-thread p {
  margin: 4px 0 0;
}

.comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.add-study-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
}

.builder-form {
  display: grid;
  gap: 12px;
}

.builder-options {
  padding: 12px 0;
}

.builder-options label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(227, 220, 244, 0.52);
  border-radius: 999px;
  font-size: 0.92rem;
}

.builder-options input {
  width: auto;
}

.study-content {
  max-width: 820px;
}

.study-content h2 {
  margin-top: 34px;
}

.study-content h2:first-child {
  margin-top: 0;
}

.study-callout {
  margin-top: 34px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(215, 234, 223, 0.82), rgba(227, 220, 244, 0.62));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.presenter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin-top: 34px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.presenter-panel h2 {
  font-size: clamp(1.7rem, 3vw, 2.45rem);
}

.settings-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.settings-card {
  padding: 24px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.member-list,
.permission-list {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.member-list div,
.permission-list label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  background: rgba(215, 234, 223, 0.5);
  border-radius: var(--radius);
}

.member-list span {
  color: var(--muted);
  font-weight: 750;
}

.permission-list label {
  justify-content: flex-start;
  font-weight: 750;
}

.permission-list input {
  width: auto;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 30px 24px;
  color: var(--muted);
  background: #ffffff;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
  font-weight: 800;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer a {
  text-decoration-color: rgba(111, 114, 130, 0.4);
  text-underline-offset: 4px;
}

.not-found {
  min-height: 100vh;
  display: grid;
  align-content: center;
  justify-items: start;
  width: min(100% - 32px, 720px);
  margin: 0 auto;
}

@media (max-width: 880px) {
  .site-header {
    min-height: 68px;
    padding: 0 16px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: calc(100% + 8px);
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    background: rgba(255, 253, 250, 0.98);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .site-header.nav-open .site-nav {
    display: flex;
  }

  .site-nav a {
    min-height: 44px;
    text-align: left;
  }

  .hero {
    min-height: 620px;
    align-items: end;
    padding: 72px 16px 54px;
  }

  .hero-overlay {
    background:
      linear-gradient(0deg, rgba(255, 253, 250, 0.96) 0%, rgba(255, 253, 250, 0.78) 58%, rgba(255, 253, 250, 0.28) 100%);
  }

  .section,
  .page-hero {
    width: min(100% - 32px, var(--content));
    padding: 54px 0;
  }

  .section.tinted {
    padding: 54px 16px;
  }

  .intro-grid,
  .two-column,
  .reflection-section,
  .chat-layout,
  .profile-layout,
  .feed-layout,
  .study-builder,
  .add-study-panel,
  .live-study-grid,
  .full-window-grid,
  .settings-layout,
  .presenter-panel {
    grid-template-columns: 1fr;
  }

  .full-window-topbar {
    flex-direction: column;
  }

  .full-window-main {
    min-height: 320px;
  }

  .feature-grid,
  .study-list,
  .download-list,
  .prompt-grid,
  .answer-grid,
  .saved-study-grid,
  .study-notes-layout,
  .timeline {
    grid-template-columns: 1fr;
  }

  .featured-study {
    grid-column: span 1;
  }

  .quiet-panel,
  .profile-panel,
  .journal-surface,
  .room-list,
  .chat-window {
    padding: 22px;
  }

  .chat-window {
    min-height: auto;
  }

  .message-form {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 520px) {
  h1 {
    font-size: 2.2rem;
  }

  .hero-actions,
  .form-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .detail-list div,
  .chat-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-list dd {
    text-align: left;
  }
}

/* ── Text selection ──────────────────────────────────────────── */
::selection {
  background: var(--lavender);
  color: var(--ink);
}

/* ── Focus ring ──────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--mint-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Button transitions ──────────────────────────────────────── */
.button {
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.14s ease;
}

.button:active {
  transform: scale(0.97);
}

/* ── Input / textarea focus ring ─────────────────────────────── */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--mint-deep);
  box-shadow: 0 0 0 3px rgba(111, 159, 136, 0.18);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

/* ── Card hover lift ─────────────────────────────────────────── */
.feature-card,
.study-card,
.saved-study-card,
.answer-card,
.download-list a {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.feature-card:hover,
.study-card:hover,
.saved-study-card:hover,
.answer-card:hover,
.download-list a:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 72px rgba(63, 63, 79, 0.16);
}

/* ── Reading progress bar ────────────────────────────────────── */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--mint-deep), var(--lavender-deep));
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ── Scroll reveal ───────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.55s ease var(--reveal-delay, 0ms),
    transform 0.55s ease var(--reveal-delay, 0ms);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Evening mode toggle ─────────────────────────────────────── */
.evening-toggle {
  display: grid;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  place-items: center;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.05rem;
  transition: background 0.18s ease, color 0.18s ease;
}

.evening-toggle:hover,
body.evening .evening-toggle {
  color: var(--ink);
  background: var(--cream);
}

/* ── Evening mode palette ────────────────────────────────────── */
body.evening {
  --paper: #fef9ee;
  --cream: #f2e6ca;
  --mint: #d8e4c8;
  --mint-deep: #7a9470;
  --lavender: #e6d8cc;
  --lavender-deep: #9e7a5c;
  --sky: #e2dac8;
  --blush: #f0c8b4;
  --gold: #d4a853;
  --line: rgba(46, 35, 20, 0.12);
  --shadow: 0 20px 60px rgba(80, 60, 30, 0.10);
}

body.evening .site-header {
  background: rgba(254, 249, 238, 0.92);
}

body.evening .section.tinted {
  background: linear-gradient(135deg, rgba(226, 218, 200, 0.72), rgba(230, 216, 204, 0.58) 52%, rgba(216, 228, 200, 0.66));
}

body.evening .hero-overlay {
  background:
    linear-gradient(90deg, rgba(254, 249, 238, 0.95) 0%, rgba(254, 249, 238, 0.74) 45%, rgba(254, 249, 238, 0.16) 100%),
    linear-gradient(0deg, rgba(254, 249, 238, 0.82), rgba(254, 249, 238, 0.08));
}

@media (max-width: 880px) {
  body.evening .hero-overlay {
    background: linear-gradient(0deg, rgba(254, 249, 238, 0.96) 0%, rgba(254, 249, 238, 0.78) 58%, rgba(254, 249, 238, 0.28) 100%);
  }
}

/* ── Circled text (presenter tool) ───────────────────────────── */
.circled-text {
  display: inline;
  padding: 1px 4px;
  border: 2px solid var(--mint-deep);
  border-radius: 999px;
}

/* ── Message timestamps ──────────────────────────────────────── */
.msg-time {
  margin-left: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}

/* ── Online presence dot ─────────────────────────────────────── */
.online-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  background: var(--mint-deep);
  border-radius: 50%;
  vertical-align: middle;
}

/* ── Active presenter tool ───────────────────────────────────── */
.presenter-tools button.active-tool {
  background: rgba(111, 159, 136, 0.28);
  border-color: rgba(111, 159, 136, 0.4);
  color: #2e3140;
}
