/* Shared surfaces follow the selected site or messenger theme. */
body {
  --surface-radius: 1.15rem;
  --brand-cover: radial-gradient(ellipse at 12% 0%, #397e7852, transparent 60%),
    linear-gradient(115deg, #123f44, #112b34 70%, #132631);
}
html body.site-shell {
  --cover: var(--brand-cover);
  --surface-edge: color-mix(in srgb, var(--mint) 20%, var(--line));
  --surface-fill: linear-gradient(145deg, color-mix(in srgb, var(--soft) 72%, var(--card)), var(--card) 55%);
}
html body.site-shell {
  background-image: radial-gradient(ellipse at 82% 0%, color-mix(in srgb, var(--soft) 68%, transparent), transparent 44rem);
  background-size: auto;
}
.site-shell :is(.panel,.login-card,.notice-list,.terms-chapter,.service-benefit,.landing-news,.footer-support,.offline-screen) {
  border-color: var(--surface-edge);
  border-radius: var(--surface-radius);
  background: var(--surface-fill);
}
.site-shell :is(.page-head,.login-layout,.project-page .profile-identity,.ac-hero,.au-hero) {
  background: var(--brand-cover);
  border-color: var(--surface-edge);
}
.site-shell .section-head h2 { font-size:clamp(1.25rem,2.4vw,1.8rem); line-height:1.55; margin:0; }
.site-shell :is(.section-head h2,.panel > h2,.terms-chapter h2) { text-align:start; }
html .site-shell :is(.button.primary,.login-submit,.project-page .profile-start button) {
  background:var(--mint); border-color:var(--mint); color:#102d2c;
}
.site-shell :is(.button,input,textarea,select,summary,a):focus-visible {
  outline:2px solid var(--pine); outline-offset:3px;
}
.site-shell .button:disabled { opacity:.58; }
.site-shell .faq-list details[open] { border-color:var(--mint); }
.site-shell .faq-list details summary { color:var(--ink); }
.site-shell .faq-list details p { color:var(--muted); }
.site-shell .management-menu a[aria-current] { box-shadow:inset -3px 0 var(--mint); }
.management :is(.report-metrics > *, .admin-services > details) { border-radius:var(--surface-radius); }
.management :is(.au-metrics,.report-metrics) > * { background:var(--surface-fill); border:1px solid var(--surface-edge); }
.management :is(.ac-row,.au-row):focus-within { outline:2px solid var(--pine); outline-offset:2px; }

/* Project cards always lead with identity, then effort and estimated reward. */
[data-page=home] #campaigns .project-tile {
  --tile-accent:var(--mint);
  padding:0; overflow:hidden; min-width:0; isolation:isolate;
  border:1px solid var(--surface-edge); border-radius:var(--surface-radius);
  background:var(--card); box-shadow:0 6px 18px #04171b24;
}
[data-page=home] .project-tile[data-kind=telegram] { --tile-accent:#9ad9ef; }
[data-page=home] .project-tile[data-kind=other] { --tile-accent:#c7c0eb; }
.tile-identity {
  display:flex; align-items:center; gap:.85rem; padding:1.05rem 1.15rem; min-width:0;
  background:linear-gradient(110deg, transparent 5%,var(--card) 85%),url("chat-pattern.png") left center / 230px auto,
    color-mix(in srgb,var(--tile-accent) 15%,var(--card));
  border-block-end:1px solid var(--line);
}
.tile-identity > div { min-width:0; }
.tile-identity .campaign-logo { width:3.1rem; height:3.1rem; line-height:1; border-radius:50%; font-size:1.4rem; border:2px solid var(--card); outline:1px solid var(--surface-edge); }
.tile-category { color:var(--tile-accent); font-size:.75rem; font-weight:650; }
.project-tile .tile-identity h3 { margin:.15rem 0 0; font-size:1.13rem; line-height:1.45; overflow-wrap:anywhere; }
.tile-body { padding:.9rem 1.15rem; display:grid; gap:.7rem; }
.tile-description { line-height:1.85; font-size:.9rem; color:var(--ink); display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.project-tile :is(p,dl,dd) { margin:0; }
.tile-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.55rem; }
.tile-facts > div { padding:.5rem .7rem; border:1px solid var(--line); border-radius:.72rem; background:var(--soft); }
.tile-facts dt,.tile-source,.tile-footer small,.tile-news small { color:var(--muted); font-size:.76rem; }
.tile-facts dd { font-weight:750; font-size:1rem; overflow-wrap:anywhere; }
.tile-facts > div:last-child dd { color:var(--mint); }
.project-tile .tile-estimate { background:none; border:0; padding:0; }
.project-tile .tile-estimate summary { font-size:.78rem; color:var(--pine); cursor:pointer; }
.project-tile .tile-estimate p { padding:.4rem 0; font-size:.82rem; color:var(--muted); }
.tile-news { display:grid; gap:.15rem; padding-inline-start:.6rem; border-inline-start:2px solid var(--tile-accent); }
.tile-news a { font-size:.84rem; line-height:1.75; overflow-wrap:anywhere; }
.tile-footer { display:flex; align-items:center; justify-content:space-between; gap:.5rem; flex-wrap:wrap; margin-block-start:auto; padding:.7rem 1.15rem; border-block-start:1px solid var(--line); }
.tile-footer a { display:inline-flex; align-items:center; gap:.6rem; min-height:44px; padding:.4rem .8rem; border-radius:.7rem; color:var(--mint); background:color-mix(in srgb,var(--mint) 10%,var(--card)); font-weight:700; font-size:.84rem; }
.tile-footer a:hover { background:var(--mint); color:#102d2c; }
[data-page=home] .feed-count { display:inline-grid; place-items:center; min-width:1.5em; padding:0 .2em; border-radius:.4rem; background:#82999c26; font-size:.79em; font-variant-numeric:tabular-nums; }
[data-page=home] .feed-nav a { gap:.4rem; }
[data-page=home] #campaigns .upcoming-preview { border-style:dashed; box-shadow:none; background:var(--card); }

/* Plan artwork represents discovery, research and full access across both entry points. */
.site-shell .paid-tiers .plan-card {
  overflow:hidden; padding:0 clamp(1rem,2vw,1.5rem) 1.15rem;
  border-radius:var(--surface-radius); background:var(--surface-fill);
}
.site-shell .tier-cover {
  position:relative; isolation:isolate; display:grid; align-self:stretch; align-content:end; overflow:hidden;
  margin:0 clamp(-1.5rem,-2vw,-1rem) .9rem; padding:.85rem 1.1rem;
  min-height:8rem; aspect-ratio:3 / 1; background:#16363a;
}
.site-shell .tier-cover img { position:absolute; inset:0; z-index:-2; width:100%; height:100%; object-fit:cover; object-position:50% 45%; }
.site-shell .tier-cover h3 { margin:0; color:white; font-size:1.45rem; }
.site-shell .tier-cover .tag { position:absolute; inset-block-start:.6rem; inset-inline-end:.65rem; background:#102831ed; color:white; }
.site-shell .paid-tiers .plan-price { color:var(--mint); }

/* The messenger retains its day/night palette and task-state colors. */
:is(.messenger-profile,.tg-channel) :is(.profile-card,.settings-list,.profile-plan,.overview-project,.ops-option,.membership-pass) {
  border-radius:var(--surface-radius);
}
.messenger-profile .profile-hero { background:url("chat-pattern.png") left center / 250px auto,var(--brand-cover); }
.tg-channel :is(.overview-project-head,.ops-card-meta),.settings-list .setting-icon { color:var(--tg-accent); }
.chat-overview .overview-project { border-color:color-mix(in srgb,var(--tg-accent) 22%,var(--tg-rule)); }
.chat-overview .overview-project .overview-open { color:var(--tg-accent); }
.support-room .from-bot,.support-faq .faq-list details,.tg-channel .ops-project {
  border-color:color-mix(in srgb,var(--tg-accent) 24%,var(--tg-rule));
  box-shadow:0 2px 6px #0f292b0e;
}
.support-room .from-bot {
  border-inline-start:3px solid color-mix(in srgb,var(--tg-accent) 55%,var(--tg-rule));
}
.support-faq .faq-list details[open] { background:var(--tg-bar); border-color:var(--tg-accent); }
.tg-channel .ops-project { border-radius:var(--surface-radius); }
.tg-channel .ops-project:focus-within { outline:2px solid var(--tg-accent); outline-offset:2px; }

@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  [data-page=home] #campaigns .project-tile:hover { transform:translateY(-3px); border-color:var(--tile-accent); }
}
@media (max-width:40rem) {
  .tile-identity,.tile-body,.tile-footer { padding-inline:.95rem; }
  [data-page=home] .feed-nav { display:flex; flex-wrap:wrap; }
  .site-shell .tier-cover { min-height:6.25rem; }
  .site-shell .paid-tiers { gap:.85rem; }
}
@media (prefers-reduced-motion:reduce) {
  [data-page=home] #campaigns .card:hover { transform:none; }
}
