.public-hero,
.hub-hero,
.lesson-stage,
.profile-hero,
.event-card,
.story-card,
.lesson-card,
.metric-card,
.action-card,
.user-row-card,
.comment-card,
.file-row,
.agenda-item {
  position: relative;
  overflow: hidden;
}
.agenda-title{
  display:flex;
  align-items:center;
  gap:6px;
}

.agenda-title svg{
  opacity:0.85;
}
.public-hero::before,
.hub-hero::before,
.lesson-stage::before,
.profile-hero::before,
.event-card::before,
.story-card::before,
.lesson-card::before,
.metric-card::before,
.action-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(320px 180px at 0% 0%, rgba(224,188,122,.12), transparent 72%),
    radial-gradient(260px 160px at 100% 0%, rgba(122,49,56,.16), transparent 70%);
  pointer-events: none;
}
.public-hero,
.hub-hero,
.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: var(--space-7);
  align-items: stretch;
}
.hero-user,
.profile-hero-body,
.story-card-body,
.lesson-card-body {
  position: relative;
  z-index: 1;
}
.hero-eyebrow,
.public-kicker,
.lesson-kicker,
.profile-kicker,
.metric-k,
.event-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-accent);
  background: rgba(255,255,255,.03);
  color: var(--accent-strong);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 800;
}
.hero-title,
.public-title,
.profile-hero-title,
.lesson-stage-title {
  margin-top: 12px;
  font-size: clamp(2rem, 3.2vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.hero-sub,
.public-sub,
.profile-hero-text,
.lesson-stage-sub {
  margin-top: 14px;
  color: var(--text-soft);
  max-width: 56ch;
  font-size: 1.02rem;
}
.hero-stats,
.public-stats,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.mini-stat,
.metric-card {
  min-height: 114px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.035);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), var(--shadow-1);
}
.mini-stat-k,
.metric-k { color: var(--text-faint); font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; }
.mini-stat-v,
.metric-v {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.6vw, 2.4rem);
  line-height: 1;
}
.action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.action-grid.compact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.action-card,
.story-card,
.lesson-card,
.event-card,
.user-row-card,
.comment-card {
  padding: 20px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  box-shadow: var(--shadow-1);
  transition: transform var(--motion-fast) var(--ease-snappy), border-color var(--motion-fast) var(--ease-standard), box-shadow var(--motion-fast) var(--ease-standard), background var(--motion-fast) var(--ease-standard);
}
.action-card:hover,
.story-card:hover,
.lesson-card:hover,
.event-card:hover,
.user-row-card:hover,
.tweet:hover,
.chat-item:hover,
.msg-item:hover,
.link-card:hover,
.file-chip:hover,
.attachment-chip:hover {
  transform: translateY(-2px);
  border-color: var(--line-accent);
  box-shadow: var(--shadow-2), var(--glow-gold);
}
.action-title,
.story-card-title,
.lesson-card-title,
.event-card-title,
.link-card-title,
.chat-title,
.msg-item-title,
.user-row-name {
  position: relative;
  z-index: 1;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.action-text,
.story-card-body,
.lesson-card-summary,
.event-card-note,
.link-card-body,
.chat-last,
.msg-item-sub,
.user-row-sub,
.file-name-sub { color: var(--text-muted); font-size: var(--text-small); }
.story-card-meta,
.lesson-card-meta,
.event-card-meta,
.file-name-strong,
.msg-item-time { color: var(--text-soft); font-size: var(--text-small); }
.lesson-card-actions,
.story-card-actions,
.event-card-actions,
.tweet-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.feed { display: flex; flex-direction: column; gap: 16px; }
.tweet,
.post-card-single {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  box-shadow: var(--shadow-1);
}
.post-card-single { grid-template-columns: 1fr; }
.tweet-head,
.msg-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.tweet-author,
.msg-title,
.chat-title { font-weight: 800; color: var(--text); }
.tweet-meta { color: var(--text-faint); font-size: var(--text-small); }
.tweet-title { display: inline-block; margin-top: 4px; font-size: 1.34rem; color: var(--text); }
.tweet-text,
.tweet-body,
.post-content {
  margin-top: 12px;
  color: var(--text-soft);
  line-height: 1.75;
  white-space: pre-line;
}
.post-content.small-body { font-size: .94rem; }
.tweet-cover,
.media-thumb {
  display: block;
  margin-top: 16px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.24);
}
.tweet-cover img,
.media-thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform var(--motion-base) var(--ease-standard), filter var(--motion-base) var(--ease-standard);
}
.tweet-cover:hover img,
.media-thumb:hover img { transform: scale(1.03); }
.message-attachments,
.media-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.media-grid.compact { gap: 10px; }
.attachment-chip,
.file-chip { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.comment-card { padding: 16px 18px; }

.link-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
}

.hub-layout,
.files-grid,
.profile-grid,
.stage-grid,
.schedule-grid,
.meeting-grid,
.lessons-library {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .9fr);
  gap: var(--space-6);
}
.quick-panel { padding: 20px; }
.chat-list,
.agenda-list { display: flex; flex-direction: column; gap: 12px; }
.chat-item,
.agenda-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
}
.agenda-item { grid-template-columns: 1fr; }
.agenda-title { font-weight: 700; }
.agenda-sub { color: var(--text-muted); font-size: var(--text-small); }

.messenger,
.messenger-shell {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  min-height: 72vh;
}
.msg-list,
.msg-panel {
  min-height: 72vh;
  padding: 18px;
}
.msg-items,
.msg-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  min-height: 0;
}
.msg-list { display: flex; flex-direction: column; }
.msg-panel { display: flex; flex-direction: column; }
.msg-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid transparent;
  background: rgba(255,255,255,.025);
}
.msg-item.active {
  border-color: var(--line-accent);
  background: linear-gradient(180deg, rgba(197,162,96,.12), rgba(122,49,56,.1));
  box-shadow: var(--glow-gold);
}
.msg-item-main,
.chat-body { min-width: 0; }
.msg-item-sub,
.chat-last { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-body {
  flex: 1;
  margin: 0 -4px;
  padding: 4px;
  scroll-behavior: smooth;
}
.bubble-row { display: flex; }
.bubble-row.me { justify-content: flex-end; }
.bubble-row.them { justify-content: flex-start; }
.bubble {
  max-width: min(84%, 680px);
  padding: 14px 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  box-shadow: var(--shadow-1);
}
.bubble.me {
  border-color: rgba(197,162,96,.26);
  background: linear-gradient(180deg, rgba(197,162,96,.18), rgba(122,49,56,.14));
}
.bubble-author { margin-bottom: 6px; color: var(--accent-strong); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.bubble-text { white-space: pre-line; color: var(--accent-ivory); }
.bubble-time { margin-top: 10px; color: var(--text-faint); font-size: .76rem; }
.bubble-tools,
.emoji-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.emoji-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text-soft);
  min-width: 34px;
  min-height: 34px;
  border-radius: 999px;
  cursor: pointer;
}
.msg-compose {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.compose-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}
.compose-stack { display: flex; flex-direction: column; gap: 10px; }
.msg-textarea { min-height: 92px; }
.compact-file { margin-top: 0; }

.file-upload,
.file-list { padding: 20px; }
.file-upload-head,
.side-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.file-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}
.file-ico {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(197,162,96,.12);
  border: 1px solid var(--line-accent);
}
.file-name-strong { font-weight: 700; color: var(--text); }

.alert {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(180,99,93,.24);
  background: rgba(180,99,93,.12);
  color: var(--text);
}
.auth-card {
  position: relative;
  padding: 26px;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(25,18,15,.84), rgba(11,8,7,.94));
  box-shadow: var(--shadow-2);
}
html[data-theme="light"] .auth-card {
  background: linear-gradient(180deg, rgba(255,252,247,.9), rgba(245,234,220,.96));
}
.auth-card-wide { width: min(100%, 620px); justify-self: end; }
.auth-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.auth-tab {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text-soft);
  font-weight: 700;
}
.auth-tab.is-active { background: linear-gradient(180deg, rgba(197,162,96,.18), rgba(122,49,56,.12)); color: var(--accent-ivory); }
.auth-body { margin-top: 20px; }
.auth-pane h1 { font-size: 2rem; }
.form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.seg {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
}
.seg-btn {
  appearance: none;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-soft);
  font-weight: 700;
  cursor: pointer;
}
.seg-btn.is-active {
  border-color: var(--line-accent);
  color: var(--accent-ivory);
  background: linear-gradient(180deg, rgba(197,162,96,.16), rgba(122,49,56,.12));
}

@media (max-width: 1120px) {
  .public-hero,
  .hub-hero,
  .profile-hero,
  .hub-layout,
  .files-grid,
  .profile-grid,
  .stage-grid,
  .schedule-grid,
  .meeting-grid,
  .lessons-library,
  .messenger,
  .messenger-shell { grid-template-columns: 1fr; }
  .hero-stats,
  .public-stats,
  .stats-grid,
  .action-grid,
  .action-grid.compact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .hero-title,
  .public-title,
  .profile-hero-title,
  .lesson-stage-title {
    margin-top: 10px;
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }

  .tweet,
  .compose-form { grid-template-columns: 1fr; }
  .hero-stats,
  .public-stats,
  .stats-grid,
  .action-grid,
  .action-grid.compact-grid,
  .seg { grid-template-columns: 1fr; }
  .bubble { max-width: 100%; }
  .msg-list,
  .msg-panel { min-height: 0; }
}


html[data-theme="light"] .public-hero::before,
html[data-theme="light"] .hub-hero::before,
html[data-theme="light"] .lesson-stage::before,
html[data-theme="light"] .profile-hero::before,
html[data-theme="light"] .event-card::before,
html[data-theme="light"] .story-card::before,
html[data-theme="light"] .lesson-card::before,
html[data-theme="light"] .metric-card::before,
html[data-theme="light"] .action-card::before {
  background:
    radial-gradient(320px 180px at 0% 0%, rgba(185,127,68,.08), transparent 72%),
    radial-gradient(260px 160px at 100% 0%, rgba(139,73,80,.1), transparent 70%);
}
html[data-theme="light"] .hero-eyebrow,
html[data-theme="light"] .public-kicker,
html[data-theme="light"] .lesson-kicker,
html[data-theme="light"] .profile-kicker,
html[data-theme="light"] .metric-kicker,
html[data-theme="light"] .metric-k,
html[data-theme="light"] .event-kicker {
  background: rgba(255,255,255,.62);
}
html[data-theme="light"] .mini-stat,
html[data-theme="light"] .metric-card {
  background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(249,242,233,.92));
  border-color: rgba(78, 50, 31, 0.09);
  box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255,255,255,.6);
}
html[data-theme="light"] .action-card,
html[data-theme="light"] .story-card,
html[data-theme="light"] .lesson-card,
html[data-theme="light"] .event-card,
html[data-theme="light"] .user-row-card,
html[data-theme="light"] .comment-card,
html[data-theme="light"] .tweet,
html[data-theme="light"] .post-card-single,
html[data-theme="light"] .link-card {
  background: linear-gradient(180deg, rgba(255,255,255,.84), rgba(248,240,230,.94));
  border-color: rgba(78, 50, 31, 0.09);
  box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255,255,255,.58);
}
html[data-theme="light"] .tweet-cover,
html[data-theme="light"] .media-thumb {
  background: rgba(104, 74, 47, 0.07);
}
html[data-theme="light"] .event-chip.lesson { background: rgba(91,140,106,.12); border-color: rgba(91,140,106,.22); color: #375a45; }
html[data-theme="light"] .event-chip.meeting { background: rgba(88,119,158,.12); border-color: rgba(88,119,158,.22); color: #2d4f74; }
html[data-theme="light"] .event-chip.task { background: rgba(157,106,53,.12); border-color: rgba(157,106,53,.22); color: #6f4b1b; }
html[data-theme="light"] .event-chip.reminder { background: rgba(159,107,63,.12); border-color: rgba(159,107,63,.22); color: #6b4522; }
html[data-theme="light"] .event-chip.personal { background: rgba(139,73,80,.12); border-color: rgba(139,73,80,.22); color: #6b3137; }
html[data-theme="light"] .status-chip.planned,
html[data-theme="light"] .status-chip.scheduled { background: rgba(157,106,53,.12); border-color: rgba(157,106,53,.22); color: #6f4b1b; }
html[data-theme="light"] .status-chip.live,
html[data-theme="light"] .status-chip.done { background: rgba(91,140,106,.12); border-color: rgba(91,140,106,.22); color: #375a45; }
html[data-theme="light"] .status-chip.cancelled,
html[data-theme="light"] .status-chip.archived,
html[data-theme="light"] .status-chip.ended { background: rgba(164,88,83,.12); border-color: rgba(164,88,83,.22); color: #733734; }
