/* Core page styles (door, join, dashboard, members, me, admin) + element colors.
   Feature agents: put your CSS in public/css/features/<name>.css and load it with
   loadCss('features/<name>.css') from your feature module. */

[data-el="fire"] { --c: var(--el-fire); }
[data-el="earth"] { --c: var(--el-earth); }
[data-el="water"] { --c: var(--el-water); }
[data-el="wind"] { --c: var(--el-wind); }
[data-el="ice"] { --c: var(--el-ice); }
[data-el="lightning"] { --c: var(--el-lightning); }
[data-el="light"] { --c: var(--el-light); }
[data-el="dark"] { --c: var(--el-dark); }
.vclock__day { color: var(--c, var(--text-2)); }
.el-text { color: var(--c); }

.sidebar__nav .list > li + li { border-top: 0; }
.sidebar__nav .list > li { margin: 1px 0; }

/* ---------------- door (public landing) ---------------- */
.door { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; position: relative; }
.door__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-5) clamp(16px, 5vw, 64px); }
.door__brand { display: flex; align-items: center; gap: var(--s-3); font-family: var(--font-display); font-size: 1.3rem; }
.door__hero {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: clamp(24px, 5vw, 72px);
  padding: var(--s-6) clamp(16px, 5vw, 64px) var(--s-10); max-width: 1240px; width: 100%; margin: 0 auto;
}
.door__eyebrow { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: var(--s-4); }
.door__eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.door__title { font-family: var(--font-display); font-size: clamp(3rem, 9vw, 6.5rem); line-height: .92; margin: 0 0 var(--s-4); letter-spacing: -.01em; overflow-wrap: anywhere; }
.door__title .nacre-text { background: var(--nacre); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="light"] .door__title .nacre-text { background: none; color: var(--text); }
.door__tagline { font-size: var(--fs-lg); color: var(--text-2); max-width: 40ch; margin-bottom: var(--s-6); }
.door__cta { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; margin-bottom: var(--s-8); }
.door__features { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; margin: 0; padding: 0; }
.door__art { position: relative; aspect-ratio: 1; max-width: 460px; width: 100%; justify-self: center; }
.door__art .pearl-logo--xl { position: absolute; inset: 14% 14% auto auto; width: 72%; height: 72%; filter: drop-shadow(0 30px 60px rgba(120, 150, 230, .35)); }
@media (prefers-reduced-motion: no-preference) {
  .door__art .pearl-logo--xl { animation: bob 7s ease-in-out infinite; }
}
@keyframes bob { 50% { transform: translateY(-10px) rotate(-2deg); } }
.door__waves { position: absolute; left: -10%; right: -10%; bottom: 0; height: 38%; color: var(--sea); opacity: .55; }
.door__teaser { max-width: 420px; }
.door__teaser:not(:empty) { margin-bottom: var(--s-5); }
.door__teasers { display: flex; flex-direction: column; gap: var(--s-3); }
.door__teasers h4 { margin: 0 0 var(--s-2); }
.door__droplist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.door__droplist li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s-2); min-width: 0; overflow-wrap: anywhere; }
.door__teaser .countdown { font-size: var(--fs-xl); }
.door__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); padding: var(--s-5) clamp(16px, 5vw, 64px); border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--text-3); }
@media (max-width: 860px) {
  .door__hero { grid-template-columns: minmax(0, 1fr); }
  .door__art { order: -1; max-width: 240px; }
}

/* ---------------- join ---------------- */
.join { min-height: 100vh; display: grid; place-items: center; padding: var(--s-8) var(--s-4); }
.join__card { width: min(560px, 100%); }
.join__head { display: flex; gap: var(--s-4); align-items: center; margin-bottom: var(--s-5); }
.join__head h1 { font-size: var(--fs-2xl); margin: 0; }

/* ---------------- dashboard ---------------- */
.hello { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; }
.hello h1 { font-size: var(--fs-3xl); margin: 0; }
.vcard__time { font-family: var(--font-mono); font-size: 2.6rem; line-height: 1; font-weight: 700; }
.vcard__week { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: var(--s-4) 0 0; padding: 0; list-style: none; }
.vcard__day { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--line); font-size: var(--fs-xs); min-width: 0; }
.vcard__day::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.vcard__day b { color: var(--text); font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vcard__day.is-today { border-color: var(--c); }
.vcard__day .t { color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.quick { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.quick a { display: flex; gap: var(--s-3); align-items: center; padding: var(--s-3) var(--s-4); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 700; font-size: var(--fs-sm); }
.quick a:hover { border-color: var(--line-strong); }
.quick svg { width: 20px; height: 20px; color: var(--accent); flex: none; }

/* ---------------- members ---------------- */
.filters { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; margin-bottom: var(--s-5); }
.filters .input, .filters .select { width: auto; min-height: 36px; padding: 6px 12px; }
.filters .input { flex: 1; min-width: 160px; max-width: 320px; }
a.card.mcard, .mcard { display: flex; gap: var(--s-3); align-items: center; }
.mcard__main { min-width: 0; flex: 1; }
.mcard__name { font-weight: 700; font-size: var(--fs-lg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcard__title { font-size: var(--fs-sm); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: italic; min-height: 1.4em; }
.mcard__jobs { display: flex; gap: 6px; margin-top: var(--s-2); flex-wrap: wrap; align-items: center; }

.profile-head { display: flex; gap: var(--s-5); align-items: center; flex-wrap: wrap; margin-bottom: var(--s-6); }
.profile-head h1 { font-size: var(--fs-3xl); margin: 0; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: var(--s-4); }
.facts dt { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); font-weight: 700; }
.facts dd { margin: 2px 0 0; }

/* ---------------- admin ---------------- */
.invite-box { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
.role-select { min-height: 32px; padding: 4px 8px; width: auto; }
.audit-detail { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-3); overflow-wrap: anywhere; }
.mcard__name, .mcard__title, .list-row__title, .list-row__sub { display: block; }
