/*
  TownPost Silverton Forest Publication Pack

  Active community: Silverton
  Theme direction: Silver Falls / forest creek / civic magazine

  Scope:
  - public-facing color system
  - public heroes, cards, room headers, profile polish
  - reusable token structure for future communities

  Out of scope:
  - Admin behavior
  - routing
  - scraping/source automation
  - database/schema work
  - weather/roads data logic
*/

:root{
  --tp-forest-900:#102d24;
  --tp-forest-800:#163a2f;
  --tp-forest-700:#214a35;
  --tp-forest-600:#345a3e;
  --tp-fern-500:#6a8f58;
  --tp-fern-300:#b6c7a6;
  --tp-creek-700:#244d5c;
  --tp-creek-600:#2f5e6e;
  --tp-creek-300:#9fbfc2;
  --tp-bark-600:#7a5a3a;
  --tp-larch-500:#caa56a;
  --tp-sage-100:#e9efe6;
  --tp-mist-100:#f3f5ee;
  --tp-paper-000:#fffdf7;
  --tp-paper-100:#f6f3ec;
  --tp-stone-500:#667064;
  --tp-slate-700:#203142;

  --tp-ink:var(--tp-slate-700);
  --tp-text:#2e4252;
  --tp-muted:#657365;
  --tp-line:rgba(155,178,143,.62);
  --tp-paper:var(--tp-paper-000);
  --tp-cream:var(--tp-paper-100);
  --tp-green:var(--tp-forest-700);
  --tp-blue:var(--tp-creek-600);
  --tp-gold:var(--tp-larch-500);

  --tp-shadow-soft:0 12px 30px rgba(16,45,36,.075);
  --tp-shadow-card:0 8px 22px rgba(16,45,36,.052);
  --tp-shadow-tight:0 3px 10px rgba(16,45,36,.08);
}

body{
  color:var(--tp-text)!important;
  background:
    radial-gradient(circle at 0% 0%,rgba(22,58,47,.13),transparent 27%),
    radial-gradient(circle at 98% 3%,rgba(47,94,110,.10),transparent 25%),
    linear-gradient(180deg,#ede8d9 0%,#f9f7ef 31%,#f4f5ed 68%,#e7efe4 100%)!important;
}

/* Header / navigation */
.topbar{
  background:rgba(255,253,247,.965)!important;
  border-color:rgba(106,143,88,.34)!important;
  box-shadow:0 8px 24px rgba(16,45,36,.07)!important;
}
.logo{
  background:linear-gradient(145deg,var(--tp-forest-900),var(--tp-forest-700) 58%,var(--tp-larch-500))!important;
}
.brand b{color:#182b3b!important}
.brand small{color:#667064!important}
.main-nav button,.account-chip,.pill{
  border-color:rgba(144,169,134,.62)!important;
  color:#142235!important;
  background:rgba(255,253,247,.88)!important;
}
.main-nav button.active,.main-nav button:hover,.account-chip.active,.account-chip:hover,.pill.active{
  background:#e8f0e1!important;
  border-color:rgba(52,90,62,.62)!important;
  color:var(--tp-forest-700)!important;
}
.main-nav button.active,.pill.active{
  box-shadow:inset 0 0 0 1px rgba(255,253,247,.72),0 4px 10px rgba(16,45,36,.07)!important;
}

/* Today hero */
.hero.tp-hero-with-weather{
  border:1px solid rgba(106,143,88,.42)!important;
  background:
    linear-gradient(90deg,rgba(255,253,247,.02) 0%,rgba(255,253,247,.08) 29%,rgba(255,253,247,.58) 45%,rgba(255,253,247,.92) 62%,#fffdf7 100%),
    linear-gradient(135deg,#d7e2cf 0%,#fff4db 100%)!important;
  box-shadow:0 18px 44px rgba(16,45,36,.095)!important;
}
.hero.tp-hero-with-weather:before{
  filter:saturate(1.08) contrast(1.06) brightness(.98)!important;
}
.hero.tp-hero-with-weather:after{
  background:linear-gradient(90deg,rgba(255,253,247,0) 0%,rgba(255,253,247,.04) 36%,rgba(255,253,247,.30) 52%,rgba(255,253,247,.78) 75%,#fffdf7 100%)!important;
}
.hero.tp-hero-with-weather>div:before{
  background:rgba(237,244,230,.72)!important;
  border-color:rgba(52,90,62,.24)!important;
  color:var(--tp-forest-700)!important;
}
.hero.tp-hero-with-weather .eyebrow{
  color:#6f806d!important;
  opacity:.95!important;
}
.hero.tp-hero-with-weather h1{
  color:#173044!important;
}
.hero.tp-hero-with-weather p:not(.eyebrow){
  color:#2f4557!important;
}
.tp-hero-weather strong,.tp-hero-weather a{
  color:var(--tp-forest-700)!important;
}
.tp-hero-weather p{color:#243a4b!important}

/* Route heroes */
.hero.tp-route-hero-art{
  background:
    linear-gradient(90deg,rgba(255,253,247,.92),rgba(255,253,247,.98)),
    linear-gradient(135deg,rgba(22,58,47,.11),rgba(47,94,110,.08))!important;
  border-color:rgba(106,143,88,.38)!important;
  box-shadow:var(--tp-shadow-soft)!important;
}
.hero.tp-route-hero-art:before{
  filter:saturate(1.05) contrast(1.04) brightness(.99)!important;
}
.hero.tp-route-hero-art:after{
  background:linear-gradient(90deg,rgba(255,253,247,.04) 0%,rgba(255,253,247,.18) 24%,rgba(255,253,247,.76) 40%,#fffdf7 100%)!important;
}
.hero.tp-route-hero-art>div:before{
  background:rgba(237,244,230,.75)!important;
  border-color:rgba(52,90,62,.22)!important;
  color:var(--tp-forest-700)!important;
}
.hero.tp-route-hero-art h1{color:#173044!important}
.hero.tp-route-hero-art p{color:#31495a!important}

/* Main content surfaces */
.panel,.card,.post,.ad,.tp-card,.tp-row-card,.tp-calendar-card,.tp-roads-card,.tp-community-strip,.room-composer.tp-composer,.portal-create-panel,.portal-note{
  background:rgba(255,253,247,.97)!important;
  border-color:rgba(156,179,145,.62)!important;
  box-shadow:var(--tp-shadow-card)!important;
}
.tp-row-card,.card,.panel,.post{
  border-radius:15px!important;
}
.tp-row-card:hover,.card:hover,.panel:hover{
  box-shadow:0 14px 34px rgba(16,45,36,.075)!important;
}
.tp-card h3,.card h3,.post h3,.panel h3,.ad h3{
  color:#173044!important;
}
.tp-card-summary,.post p,.card p,.panel p,.ad p{
  color:#344b5e!important;
}
.tp-card-date,.tp-card-label,.badge{
  color:var(--tp-forest-700)!important;
}
.tp-card-label b,.badge{
  background:#e6efe0!important;
  color:var(--tp-forest-700)!important;
  border:1px solid rgba(106,143,88,.18)!important;
}
.tp-card-details{
  border-top-color:rgba(202,165,106,.28)!important;
}
.tp-card-details summary,
.tp-text-link,a{
  color:#145139!important;
}
.tp-card-actions button,.tp-card-actions a,.buttonlike,.actions button,.controls button{
  background:#fffef9!important;
  border-color:rgba(144,169,134,.70)!important;
  color:#12243a!important;
  box-shadow:0 2px 0 rgba(16,45,36,.045)!important;
}
.tp-card-actions button:hover,.tp-card-actions a:hover,.buttonlike:hover,.actions button:hover,.controls button:hover{
  background:#eef5e9!important;
}
button.primary,.actions button.primary,.controls button.primary,.tp-composer-actions .primary{
  background:var(--tp-forest-900)!important;
  border-color:var(--tp-forest-900)!important;
  color:#fffdf7!important;
}

/* Art framing */
.tp-card-image.real.tp-card-art,.tp-row-card .tp-card-image,.tp-card-art-map{
  background:#dfe9d9!important;
  border-radius:12px!important;
  box-shadow:inset 0 0 0 1px rgba(255,253,247,.52),0 9px 18px rgba(16,45,36,.07)!important;
}
.tp-card-image.real.tp-card-art img,.tp-card-art-map img,.tp-card-image.real img{
  filter:saturate(1.02) contrast(1.02) brightness(1.0)!important;
}
.tp-card-art:after{
  background:
    linear-gradient(180deg,rgba(255,253,247,.01),rgba(16,45,36,.06)),
    radial-gradient(circle at 20% 15%,rgba(255,253,247,.14),transparent 30%)!important;
}

/* Calendar / roads / utility modules */
.tp-calendar-card,.tp-roads-card{
  border-left:6px solid var(--tp-forest-600)!important;
}
.tp-calendar-row>div:first-child{
  background:#e5efdb!important;
  color:var(--tp-forest-700)!important;
}
.tp-section-title h3,.tp-community-strip b{
  color:var(--tp-forest-700)!important;
}

/* Room headers */
.tp-room-themed-banner,.room-banner,.tp-room-banner,.head{
  background:
    linear-gradient(90deg,rgba(237,244,230,.88),rgba(255,253,247,.96) 36%,#fffdf7),
    linear-gradient(135deg,rgba(22,58,47,.11),rgba(202,165,106,.05))!important;
  border-color:rgba(106,143,88,.38)!important;
  box-shadow:var(--tp-shadow-card)!important;
}
.tp-room-themed-banner:after{
  background:linear-gradient(90deg,rgba(52,90,62,.12),transparent 42%)!important;
}
.tp-room-kicker,.room-banner h2,.tp-room-banner h2,.head h2{
  color:var(--tp-forest-700)!important;
}
.tp-room-link-art,.tp-room-mini-art{
  filter:saturate(1.02) contrast(1.02)!important;
}

/* Composer */
.room-composer.tp-composer{
  background:linear-gradient(135deg,#fffdf7,#f4f8ee)!important;
  border-radius:16px!important;
}
.tp-composer-badge{
  background:#e5efdb!important;
  color:var(--tp-forest-700)!important;
}
.tp-composer-box,input,textarea,select{
  background:#fffef9!important;
  border-color:rgba(144,169,134,.72)!important;
}
textarea:focus,input:focus,select:focus,.tp-composer-input:focus{
  outline-color:rgba(47,94,110,.22)!important;
  border-color:rgba(47,94,110,.54)!important;
}

/* Sponsor rail */
.sidebar .card,.sidebar .ad,.ad{
  background:linear-gradient(180deg,#fbf4df,#f4ead3)!important;
  border-color:rgba(202,165,106,.42)!important;
}
.sidebar .ad small,.ad small{
  color:#687890!important;
}
.sidebar .ad h3,.ad h3{
  color:#173044!important;
}
.sidebar .buttonlike,.sidebar button,.ad .buttonlike,.ad button{
  background:#fffdf7!important;
  border-color:rgba(144,169,134,.72)!important;
}

/* Account / profile */
.portal-goodmorning,.portal-card,.portal-create-panel{
  background:#fffdf7!important;
}
.portal-community-art{
  background-image:url('/assets/heroes/silverton-lower-south-falls-hero.webp')!important;
  filter:saturate(1.03) contrast(1.02)!important;
}
.portal-community-art:before{
  background:linear-gradient(180deg,rgba(16,45,36,.02),rgba(16,45,36,.18) 42%,rgba(16,45,36,.78) 100%)!important;
}
.portal-town-badge{
  background:linear-gradient(180deg,#fffdf7,#e8efd8)!important;
  border-color:rgba(52,90,62,.78)!important;
  color:var(--tp-forest-700)!important;
}
.portal-bottom{background:#fffdf7!important}
.portal-card h2,.portal-bottom b{color:#173044!important}
.portal-field-label,.portal-check{color:#173a2a!important}
.portal-church-panel,.portal-church-section,.account-summary-grid .portal-note{
  background:#f6f9f0!important;
  border-color:rgba(144,169,134,.62)!important;
}

/* Trust/legal/footer */
.site-legal{
  color:#405365!important;
}
.site-legal a{color:#145139!important}

/* Admin guard: do not theme canonical Admin internals. */
.admin-route-canonical,
.admin-route-canonical *{
  --tp-forest-900:initial;
  --tp-forest-800:initial;
  --tp-forest-700:initial;
  --tp-forest-600:initial;
  --tp-fern-500:initial;
  --tp-creek-600:initial;
  box-shadow:revert;
  border-radius:revert;
}

@media(max-width:900px){
  .hero.tp-hero-with-weather:after{background:linear-gradient(90deg,rgba(255,253,247,0),rgba(255,253,247,.24) 46%,#fffdf7 92%)!important}
}

@media(max-width:640px){
  .topbar{border-radius:0 0 12px 12px!important}
  .hero.tp-hero-with-weather:after{background:linear-gradient(180deg,rgba(255,253,247,0) 0%,rgba(255,253,247,.30) 42%,#fffdf7 86%)!important}
  .hero.tp-route-hero-art:after{background:linear-gradient(180deg,rgba(255,253,247,.03),rgba(255,253,247,.36) 45%,#fffdf7 82%)!important}
}
