/* ============================================================
   Wicket — application styles (layered on brand tokens)
   ============================================================ */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg1);
  font-family: var(--font-body);
  overflow: hidden;
}

/* density tuning via data attribute on .app */
.app { --row-pad: 9px; --feed-gap: var(--sp-5); --card-pad: var(--sp-5); }
.app[data-density="compact"] { --row-pad: 6px; --feed-gap: var(--sp-4); --card-pad: var(--sp-4); }
.app[data-density="spacious"] { --row-pad: 12px; --feed-gap: var(--sp-6); --card-pad: var(--sp-6); }

/* accent override hook */
.app { --wk-accent: var(--tfe-olive); --wk-accent-hover: var(--accent-hover); --wk-accent-soft: var(--accent-soft); }

button { font-family: inherit; cursor: pointer; }
::selection { background: var(--wk-accent-soft); }

.lc { line-height: 0; align-items: center; justify-content: center; }
.lc svg { display: block; width: 100%; height: 100%; }

/* ---- League Gothic heading helper ---- */
.lg {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  font-weight: 400;
  line-height: 1.02;
}
.eyb {
  font-family: var(--font-subheading);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w, 264px) 1fr;
  height: 100vh;
  width: 100vw;
}
.app[data-rail="hidden"] { grid-template-columns: 0 1fr; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  background: var(--tfe-slate);
  color: var(--fg-on-dark);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  overflow: hidden;
  border-right: 1px solid rgba(0,0,0,0.2);
}
/* rooftop watermark bleeding off the bottom */
.sidebar__watermark {
  position: absolute;
  bottom: 64px; right: -34px;
  color: rgba(251,248,239,0.045);
  pointer-events: none;
  z-index: 0;
}
.sidebar > * { position: relative; z-index: 1; }

.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 20px 18px;
}
.brand__mark {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  color: var(--tfe-cream);
  background: rgba(251,248,239,0.06);
  border: 1px solid rgba(251,248,239,0.12);
  border-radius: 11px 11px 11px 3px;
  flex-shrink: 0;
}
.brand__name { display: flex; flex-direction: column; gap: 1px; line-height: 1; }
.brand__name .wk { font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.16em; font-size: 24px; color: var(--tfe-cream); }
.brand__name .sub { font-family: var(--font-subheading); font-size: 9.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--tfe-sage); }

.nav { flex: 1; overflow-y: auto; padding: 4px 12px 16px; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: rgba(251,248,239,0.12); border-radius: 3px; }
.nav::-webkit-scrollbar-track { background: transparent; }

.navgroup { margin-top: 14px; }
.navgroup__label {
  font-family: var(--font-heading); text-transform: uppercase;
  letter-spacing: 0.18em; font-size: 11px;
  color: var(--tfe-sage); opacity: 0.85;
  padding: 0 10px 7px; display: flex; align-items: center; gap: 8px;
}
.navgroup__label::after { content: ""; flex: 1; height: 1px; background: rgba(251,248,239,0.08); }

.navitem {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  width: 100%;
  padding: var(--row-pad) 11px;
  margin: 1px 0;
  border: 0; background: transparent;
  color: rgba(251,248,239,0.74);
  font-size: 13.5px; font-weight: 400;
  border-radius: var(--r-md);
  text-align: left;
  transition: background var(--dur-fast) var(--ease-standard),
              color var(--dur-fast) var(--ease-standard),
              padding-left var(--dur-base) var(--ease-out);
}
.navitem .lc { color: rgba(251,248,239,0.6); transition: color var(--dur-fast); }
.navitem:hover { background: rgba(251,248,239,0.07); color: var(--tfe-cream); }
.navitem:hover .lc { color: var(--tfe-cream); }
.navitem:hover { padding-left: 14px; }

.navitem--active { background: rgba(251,248,239,0.10); color: var(--tfe-cream); font-weight: 500; }
.navitem--active .lc { color: var(--wk-accent-bright, #c2cf94); }
.navitem--active::before {
  content: ""; position: absolute; left: -12px; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 22px;
  background: var(--wk-accent-bright, #aebb78);
  border-radius: 0 4px 4px 0;
}
.navitem__label { flex: 1; }
.navitem__badge {
  font-family: var(--font-subheading);
  font-size: 10.5px; font-weight: 600;
  min-width: 18px; height: 18px; padding: 0 5px;
  display: grid; place-items: center;
  background: var(--wk-accent); color: var(--tfe-cream);
  border-radius: var(--r-full);
}
.navitem--active .navitem__badge { background: var(--tfe-cream); color: var(--tfe-slate); }

/* user chip */
.userchip {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 16px;
  border-top: 1px solid rgba(251,248,239,0.1);
  background: rgba(0,0,0,0.12);
}
.userchip__meta { flex: 1; line-height: 1.25; min-width: 0; }
.userchip__name { font-size: 13.5px; font-weight: 500; color: var(--tfe-cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userchip__role { font-size: 11px; color: var(--tfe-sage); }
.userchip__gear { color: rgba(251,248,239,0.5); display: grid; place-items: center; background: none; border: 0; border-radius: var(--r-md); padding: 6px; transition: all var(--dur-fast); }
.userchip__gear:hover { color: var(--tfe-cream); background: rgba(251,248,239,0.08); }

/* avatar */
.avatar {
  flex-shrink: 0;
  display: grid; place-items: center;
  font-family: var(--font-subheading); font-weight: 600;
  color: var(--tfe-cream);
  border-radius: 50% 50% 50% 4px; /* gate-arched corner */
  letter-spacing: 0.02em;
}
.avatar--olive { background: var(--tfe-olive); }
.avatar--slate { background: #46595b; }
.avatar--sage  { background: var(--tfe-sage); color: var(--tfe-slate); }

/* ============================================================
   MAIN COLUMN
   ============================================================ */
.main { display: flex; flex-direction: column; height: 100vh; overflow: hidden; min-width: 0; }

.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px var(--sp-7) 13px;
  background: rgba(251,248,239,0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 5;
}
.topbar__titlewrap { min-width: 0; }
.topbar__eyebrow { display: flex; align-items: center; gap: 7px; }
.topbar__eyebrow .crumb { color: var(--fg-muted); }
.topbar__title { font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.06em; font-size: 30px; line-height: 1; color: var(--tfe-slate); margin-top: 2px; }
.topbar__spacer { flex: 1; }

.iconbtn {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg2);
  border-radius: var(--r-md);
  position: relative;
  transition: all var(--dur-fast) var(--ease-standard);
}
.iconbtn:hover { border-color: var(--border-strong); color: var(--tfe-slate); box-shadow: var(--sh-sm); }
.iconbtn__dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; background: var(--danger); border-radius: 50%; border: 1.5px solid var(--surface); }

.menubtn { display: none; }

/* search */
.search {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 8px 13px;
  width: 240px;
  color: var(--fg-muted);
  transition: all var(--dur-fast);
}
.search:focus-within { border-color: var(--wk-accent); box-shadow: 0 0 0 3px var(--wk-accent-soft); }
.search input { border: 0; outline: 0; background: none; font-family: var(--font-body); font-size: 13.5px; color: var(--fg1); width: 100%; }
.search input::placeholder { color: var(--fg-muted); }
.search kbd { font-family: var(--font-mono); font-size: 10px; color: var(--fg-muted); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; }

/* scroll region */
.canvas { flex: 1; overflow-y: auto; scroll-behavior: smooth; }
.canvas::-webkit-scrollbar { width: 10px; }
.canvas::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; border: 3px solid var(--bg); }
.canvas__inner { padding: var(--sp-6) var(--sp-7) var(--sp-9); max-width: 1240px; margin: 0 auto; }

/* page grid: feed + rail */
.pagegrid { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: var(--sp-6); align-items: start; }

/* ============================================================
   GREETING / GATE HERO
   ============================================================ */
.gate {
  position: relative;
  background: var(--tfe-slate);
  color: var(--tfe-cream);
  border-radius: 90px 90px var(--r-lg) var(--r-lg);
  padding: 34px 38px 28px;
  overflow: hidden;
  margin-bottom: var(--feed-gap);
  box-shadow: var(--sh-md);
}
.gate::before { /* keystone line of the arch */
  content: ""; position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 46px; height: 3px; border-radius: 2px; background: rgba(251,248,239,0.25);
}
.gate__watermark { position: absolute; top: -10px; right: 22px; color: rgba(251,248,239,0.06); }
.gate__eyebrow { font-family: var(--font-subheading); font-size: 11px; letter-spacing: var(--tracking-wider); text-transform: uppercase; color: var(--tfe-sage); }
.gate__hello { font-family: var(--font-title); font-size: clamp(30px, 4vw, 46px); line-height: 1.02; margin: 8px 0 4px; color: var(--tfe-cream); }
.gate__sub { font-size: 14px; color: rgba(251,248,239,0.78); max-width: 52ch; }
.gate__verse { margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(251,248,239,0.14); display: flex; gap: 12px; align-items: flex-start; }
.gate__verse .lc { color: var(--tfe-sage); margin-top: 2px; }
.gate__verse p { font-size: 13.5px; font-style: italic; color: rgba(251,248,239,0.85); margin: 0; line-height: 1.55; }
.gate__verse cite { display: block; font-style: normal; font-family: var(--font-subheading); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tfe-sage); margin-top: 5px; }

/* ============================================================
   CARDS / FEED
   ============================================================ */
.feed { display: flex; flex-direction: column; gap: var(--feed-gap); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
  transition: box-shadow var(--dur-base) var(--ease-standard), transform var(--dur-base) var(--ease-standard);
}
.post { padding: var(--card-pad); }
.post--pinned { border-color: var(--wk-accent); box-shadow: 0 0 0 1px var(--wk-accent), var(--sh-md); }

.post__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.post__author { line-height: 1.3; flex: 1; min-width: 0; }
.post__name { font-size: 14px; font-weight: 600; color: var(--fg1); }
.post__meta { font-size: 12px; color: var(--fg-muted); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.post__meta .dot { width: 3px; height: 3px; background: var(--fg-muted); border-radius: 50%; }

.kind {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-subheading); font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 9px; border-radius: var(--r-full);
}
.kind--announcement { background: var(--accent-soft); color: var(--accent-press); }
.kind--story { background: #e7ddcb; color: #7a5a2e; }
.kind--snapshot { background: #d9e3e3; color: var(--tfe-slate); }
.kind .lc { width: 13px; height: 13px; }

.pin {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--wk-accent); font-weight: 500;
}
.pin .lc { width: 13px; height: 13px; }

.post__title { font-family: var(--font-subheading); font-size: 21px; font-weight: 600; line-height: 1.2; color: var(--fg1); margin: 0 0 8px; letter-spacing: -0.01em; }
.post__body { font-size: 14.5px; line-height: 1.62; color: var(--fg2); margin: 0; text-wrap: pretty; }

/* photo placeholder */
.photo {
  margin-top: 16px;
  position: relative;
  aspect-ratio: 16 / 8.5;
  border-radius: var(--r-md);
  display: grid; place-items: center;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(50,68,70,0.025) 0 14px, transparent 14px 28px),
    var(--tfe-bone);
  border: 1px solid var(--border);
}
.photo__inner { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--tfe-sage); }
.photo__inner .lc { width: 26px; height: 26px; }
.photo__cap { font-family: var(--font-subheading); font-size: 11.5px; letter-spacing: 0.06em; color: var(--fg3); }

/* stat row */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.stat { background: var(--surface-sunken); border-radius: var(--r-md); padding: 16px 14px; text-align: center; }
.stat__v { font-family: var(--font-heading); text-transform: uppercase; font-size: 32px; line-height: 0.95; color: var(--tfe-olive); letter-spacing: 0.02em; }
.stat__l { font-size: 11px; color: var(--fg2); margin-top: 6px; line-height: 1.25; }

.scripture-tag { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-family: var(--font-subheading); font-size: 11.5px; letter-spacing: 0.06em; color: var(--tfe-olive); }
.scripture-tag .lc { width: 14px; height: 14px; }

/* post footer */
.post__foot { display: flex; align-items: center; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--divider); }
.react {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--fg2); font-weight: 500;
  background: none; border: 0; padding: 7px 11px; border-radius: var(--r-md);
  transition: all var(--dur-fast);
}
.react:hover { background: var(--surface-sunken); color: var(--tfe-slate); }
.react.is-on { color: var(--wk-accent); }
.react.is-on .lc { fill: var(--wk-accent); }
.react .lc { width: 16px; height: 16px; }
.post__foot .grow { flex: 1; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 500; font-size: 13.5px;
  padding: 9px 16px; border-radius: var(--r-md);
  border: 1px solid transparent; transition: all var(--dur-fast) var(--ease-standard);
}
.btn .lc { width: 16px; height: 16px; }
.btn { white-space: nowrap; flex-shrink: 0; }
.btn--primary { background: var(--wk-accent); color: var(--tfe-cream); }
.btn--primary:hover { background: var(--wk-accent-hover); transform: translateY(-1px); box-shadow: var(--sh-sm); }
.btn--primary:active { transform: translateY(0); }
.btn--ghost { background: transparent; color: var(--fg2); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--border-strong); background: var(--surface-sunken); }
.btn--soft { background: var(--wk-accent-soft); color: var(--accent-press); }
.btn--soft:hover { filter: brightness(0.97); }

/* ============================================================
   RIGHT RAIL
   ============================================================ */
.rail { display: flex; flex-direction: column; gap: var(--sp-5); position: sticky; top: 0; }
.railcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-sm); overflow: hidden; }
.railcard__head { display: flex; align-items: center; gap: 8px; padding: 13px 16px 11px; border-bottom: 1px solid var(--divider); }
.railcard__head .lc { width: 16px; height: 16px; color: var(--tfe-olive); }
.railcard__head h3 { font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.1em; font-size: 15px; color: var(--tfe-slate); margin: 0; }
.railcard__body { padding: 14px 16px; }

.meeting-when { display: flex; align-items: baseline; gap: 8px; }
.meeting-when .d { font-family: var(--font-subheading); font-size: 17px; font-weight: 600; color: var(--fg1); }
.meeting-when .t { font-size: 13px; color: var(--fg2); }
.meeting-place { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--fg2); margin-top: 8px; }
.meeting-place .lc { width: 14px; height: 14px; color: var(--fg-muted); }
.rsvp { display: flex; gap: 6px; margin-top: 14px; }
.rsvp__seg { flex: 1; text-align: center; padding: 8px 4px; border-radius: var(--r-sm); background: var(--surface-sunken); }
.rsvp__seg .n { font-family: var(--font-heading); font-size: 19px; color: var(--tfe-slate); }
.rsvp__seg .l { font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); }
.rsvp__seg.yes .n { color: var(--success); }

.deadline { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--divider); }
.deadline:last-child { border-bottom: 0; padding-bottom: 0; }
.deadline:first-child { padding-top: 0; }
.deadline__date { flex-shrink: 0; width: 46px; text-align: center; font-family: var(--font-heading); font-size: 13px; letter-spacing: 0.04em; color: var(--tfe-slate); background: var(--surface-sunken); border-radius: var(--r-sm); padding: 5px 2px; line-height: 1.1; }
.deadline__date.urgent { background: #f1e2dc; color: var(--danger); }
.deadline__label { font-size: 12.5px; color: var(--fg2); line-height: 1.35; }

.prayerrow { padding: 11px 0; border-bottom: 1px solid var(--divider); }
.prayerrow:last-child { border-bottom: 0; padding-bottom: 0; }
.prayerrow:first-child { padding-top: 0; }
.prayerrow__who { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--fg1); margin-bottom: 3px; }
.prayerrow__who .tag { font-family: var(--font-subheading); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tfe-cream); background: var(--tfe-sage); padding: 1px 6px; border-radius: var(--r-full); }
.prayerrow__text { font-size: 12.5px; color: var(--fg2); line-height: 1.4; }
.prayerrow__time { font-size: 10.5px; color: var(--fg-muted); margin-top: 3px; }

.verse-card { background: var(--tfe-bone); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 18px 16px; position: relative; overflow: hidden; }
.verse-card .lc.q { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; color: rgba(114,126,78,0.12); }
.verse-card__text { font-size: 14px; font-style: italic; line-height: 1.6; color: var(--tfe-slate); position: relative; }
.verse-card__ref { display: block; font-style: normal; font-family: var(--font-subheading); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tfe-olive); margin-top: 12px; }

/* ============================================================
   GENERIC / OTHER PAGES
   ============================================================ */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: var(--sp-6); }
.tab { font-family: var(--font-subheading); font-size: 14px; font-weight: 500; color: var(--fg-muted); background: none; border: 0; padding: 11px 16px; position: relative; transition: color var(--dur-fast); }
.tab:hover { color: var(--fg2); }
.tab--active { color: var(--tfe-slate); }
.tab--active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2.5px; background: var(--wk-accent); border-radius: 2px; }
.tab__count { font-size: 11px; color: var(--fg-muted); margin-left: 6px; }

.sectionhead { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: var(--sp-5); gap: 16px; }
.sectionhead h2 { font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.06em; font-size: 26px; color: var(--tfe-slate); margin: 0; }
.sectionhead p { font-size: 13px; color: var(--fg2); margin: 4px 0 0; }

/* agenda */
.agenda { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-md); overflow: hidden; }
.agenda__row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--divider); transition: background var(--dur-fast); }
.agenda__row:last-child { border-bottom: 0; }
.agenda__row:hover { background: var(--surface-sunken); }
.agenda__n { width: 26px; height: 26px; flex-shrink: 0; display: grid; place-items: center; font-family: var(--font-heading); font-size: 14px; color: var(--tfe-cream); background: var(--tfe-olive); border-radius: 50% 50% 50% 3px; }
.agenda__item { flex: 1; font-size: 14.5px; font-weight: 500; color: var(--fg1); }
.agenda__who { font-size: 12.5px; color: var(--fg-muted); }
.agenda__min { font-family: var(--font-heading); font-size: 13px; color: var(--fg2); width: 56px; text-align: right; }

.tilegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-4); }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-sm); padding: 18px; transition: all var(--dur-base) var(--ease-standard); }
.tile:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }
.tile__date { font-family: var(--font-heading); font-size: 13px; color: var(--fg-muted); letter-spacing: 0.06em; }
.tile__title { font-family: var(--font-subheading); font-size: 17px; font-weight: 600; color: var(--fg1); margin: 6px 0 12px; }
.tile__foot { display: flex; gap: 14px; font-size: 12px; color: var(--fg2); }
.tile__foot span { display: inline-flex; align-items: center; gap: 5px; }
.tile__foot .lc { width: 14px; height: 14px; color: var(--tfe-olive); }

/* prayer full card */
.pcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-sm); padding: var(--card-pad); transition: all var(--dur-base); }
.pcard:hover { box-shadow: var(--sh-md); }
.pcard--answered { background: var(--surface-sunken); border-color: var(--border-strong); }
.pcard__head { display: flex; align-items: center; gap: 11px; margin-bottom: 11px; }
.pcard__who { font-size: 13.5px; font-weight: 600; color: var(--fg1); }
.pcard__time { font-size: 11.5px; color: var(--fg-muted); }
.pcard__text { font-size: 15px; line-height: 1.55; color: var(--fg2); margin: 0; }
.pcard__foot { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.answered-badge { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-subheading); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--success); background: #e3ecd6; padding: 4px 10px; border-radius: var(--r-full); }
.answered-badge .lc { width: 13px; height: 13px; }
.lift { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--fg2); background: var(--surface-sunken); border: 1px solid var(--border); padding: 7px 13px; border-radius: var(--r-full); transition: all var(--dur-fast); }
.lift:hover { border-color: var(--wk-accent); color: var(--wk-accent); }
.lift.is-on { background: var(--wk-accent-soft); border-color: var(--wk-accent); color: var(--accent-press); }
.lift .lc { width: 15px; height: 15px; }

.col2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); align-items: start; }

/* empty placeholder for generic pages */
.placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: var(--sp-9) var(--sp-6); background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--r-lg); color: var(--fg-muted); gap: 14px; }
.placeholder__mark { color: var(--tfe-sage); opacity: 0.6; }
.placeholder h2 { font-family: var(--font-heading); letter-spacing: 0.06em; color: var(--tfe-slate); margin: 0; font-size: 24px; }
.placeholder p { max-width: 44ch; font-size: 13.5px; color: var(--fg2); margin: 0; }

/* ============================================================
   ENTRANCE ANIMATION
   ============================================================ */
/* ============================================================
   ENTRANCE ANIMATION
   Resting state is fully visible; entrance only nudges transform,
   so content is never hidden if the animation clock doesn't run
   (print, PDF, reduced-motion, synthetic capture).
   ============================================================ */
.rise { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: riseUp var(--dur-slow) var(--ease-out) backwards; }
  @keyframes riseUp { from { transform: translateY(12px); } }
}

/* ============================================================
   MOBILE OVERLAY
   ============================================================ */
.scrim { display: none; }

@media (max-width: 1080px) {
  .pagegrid { grid-template-columns: 1fr; }
  .rail { position: static; flex-direction: row; flex-wrap: wrap; }
  .rail > * { flex: 1 1 280px; }
  .canvas__inner { padding: var(--sp-5) var(--sp-6) var(--sp-8); }
}

@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 280px; z-index: 50;
    transform: translateX(-100%);
    transition: transform var(--dur-base) var(--ease-out);
    box-shadow: var(--sh-lg);
  }
  .app[data-mobileopen="true"] .sidebar { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(50,68,70,0.5); z-index: 40; opacity: 0; pointer-events: none; transition: opacity var(--dur-base); }
  .app[data-mobileopen="true"] .scrim { opacity: 1; pointer-events: auto; }
  .menubtn { display: grid; }
  .topbar { padding: 12px var(--sp-5); }
  .topbar__title { font-size: 24px; }
  .search { display: none; }
  .canvas__inner { padding: var(--sp-5) var(--sp-5) var(--sp-8); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .col2 { grid-template-columns: 1fr; }
  .rail { flex-direction: column; }
}
