/* THESIS: the third supplied composition, in the first two references' dawn light.
 * WORLD: champagne fog, slate mountains, warm glass and living golden trees.
 * FLOW: collection evidence -> cognitive practice -> explorable theme trees.
 * FIRST VIEW: editorial hero, live statistics strip, full-width connected forest.
 * FORM: user-pinned reference; no invented stats, growth or inferred connections.
 */
:root {
  --mist-image: url('/assets/dawn-mountain-forest.png');
  --bg: #eee8dc;
  --paper: #fbf8ef;
  --paper-soft: #eee9de;
  --text: #17243a;
  --muted: #485c6a;
  --text-2: #485c6a;
  --line: #c8c5ba;
  --mist-shadow: 0 12px 32px #3c433815;
  --ice-fill: linear-gradient(165deg, #fffef8e6, #fffaf1b3 42%, #e1e5dfaa 55%, #f9f9f1d6);
  --ice-edge: #fffaf0db;
}
body::before {
  background: linear-gradient(105deg, #f9f3e2cf, #f5efe48c 48%, #d7e0e23d),
    var(--mist-image) center / cover no-repeat;
}
.sidebar { height: 90px; padding-inline: max(28px, calc((100vw - 1440px) / 2)); background: linear-gradient(100deg, #fffaf0e8, #edf0ece3) !important; border-color: #deddd254 !important; gap: 24px; }
.brand { margin-right: 28px; font-size: 23px; flex-shrink: 0; }
.brand-mark { width: 40px; height: 44px; }
.brand small { font-size: 8px; letter-spacing: 2px; }
.sidebar nav { gap: 14px; }
.nav-item { font-size: 15px; padding: 14px 18px; }
.header-tools { margin-left: auto; display: flex; gap: 16px; align-items: center; }
.header-tools > span { height: 25px; border-left: 1px solid #b6bdbb; }
#app .header-tools button.icon-btn { width: 40px; height: 40px; border-radius: 50%; }
.app-body { padding-top: 90px; }
.app-body main { max-width: 1500px; padding-top: 0; }
.page-heading {
  background: linear-gradient(90deg, #fcf8efd9, #f8f3e6bb 40%, #eee9dc21 74%),
    var(--mist-image) 60% 43% / cover;
  padding-top: 46px;
}
.page-heading p { color: #445b6c; }
.page-tree-orb .page-tree-orb-art { filter: drop-shadow(0 18px 14px #3c45322b); }
.page-tree-orb::before { background: radial-gradient(ellipse, #fff3cf45, transparent 68%); }
.atlas-hero {
  min-height: 360px;
  padding: 56px 440px 84px 30px;
  margin-bottom: -24px;
  overflow: hidden;
  mask-image: linear-gradient(#000 84%, transparent);
}
.atlas-hero .page-heading-copy { max-width: none; }
.atlas-hero h1 { font-size: clamp(44px, 5.6vw, 82px); line-height: 1.18; margin: 22px 0 18px; white-space: nowrap; font-weight: 650; }
.atlas-hero p { font-size: clamp(15px, 1.7vw, 24px); line-height: 1.7; max-width: 42em; }
.atlas-hero .eyebrow { font-size: 11px; letter-spacing: 4px; color: #345978; }
.atlas-hero .page-tree-orb { width: 350px; height: 312px; right: 134px; top: 53%; }
.atlas-hero .page-tree-orb > .tree-art { display: block; }
.atlas-hero-note { position: absolute; right: 24px; top: 128px; color: #243b4e; font-size: 14px; line-height: 1.9; }
.atlas-hero-note span { display: block; margin-top: 19px; padding-top: 15px; border-top: 1px solid #57728670; font-size: 9px; letter-spacing: 3px; line-height: 1.8; }
.atlas-summary {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(260px, 1.12fr);
  align-items: center;
  gap: 0;
  padding: 26px 28px;
  border-radius: 22px;
  background: linear-gradient(120deg, #fffef8ee, #fffdf4d9 65%, #edf2eee6);
  box-shadow: 0 14px 34px #394c4f13;
  margin-bottom: 22px;
  backdrop-filter: blur(14px);
}
.atlas-stat { display: grid; gap: 6px; padding-inline: 20px; border-right: 1px solid #a7afa52e; }
.atlas-stat > span { color: #4a6072; font-size: 15px; }
.atlas-stat > strong { font: 600 48px/1.1 Georgia, 'Songti SC', serif; color: #142238; font-variant-numeric: tabular-nums; }
.atlas-stat > small { color: #485d6e; font-size: 12px; line-height: 1.6; }
#app button.atlas-review { display: flex; align-items: center; justify-content: space-between; gap: 14px; text-align: left; margin-left: 24px; padding: 20px; min-height: 104px; border-radius: 18px; }
.atlas-review > span:nth-child(2) { display: grid; gap: 8px; flex: 1; }
.atlas-review strong { font-size: 21px; letter-spacing: 1px; }
.atlas-review small { font-size: 12px; color: #405b70; font-weight: 400; }
.atlas-review-icon { width: 48px; height: 52px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: #52748a; }
.atlas-review-icon .icon { width: 27px; height: 27px; }
.atlas-explore { overflow: hidden; border: 1px solid #ffffffe0; border-radius: 24px; background: #f6f3eb8c; box-shadow: 0 16px 44px #273e491a; }
.atlas-explore-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 28px 32px 0; position: relative; z-index: 3; background: linear-gradient(#fffcf1f2, #fbf8ed8c, transparent); }
.atlas-explore-heading h2 { font-family: 'Songti SC', SimSun, serif; font-size: 28px; margin: 8px 0; line-height: 1.3; color: #172c42; }
.atlas-explore-heading h2 i { display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: #577b91; box-shadow: 0 0 0 6px #92b7c72b; vertical-align: middle; }
.atlas-explore-heading p { color: #445b6c; margin: 0; font-size: 14px; line-height: 1.7; }
.atlas-tools { display: flex; gap: 16px; align-items: center; }
.atlas-mode { display: flex; gap: 4px; padding: 5px; border: 1px solid #b5c0c23b; border-radius: 14px; background: #ebeee899; }
#app .atlas-mode button { width: 42px; height: 38px; min-width: 38px; }
#app .atlas-mode button.selected { --ice-fill: linear-gradient(#fffef9, #f6f7f1); --ice-edge: #90a6b8; }
.atlas-explore .theme-forest-shell { margin-top: -110px; padding-top: 110px; border: 0 !important; border-radius: 0; min-height: 740px; background-image: linear-gradient(180deg, #fffaf1b8, #efede51a 40%, #e7e5dc47 85%, #f1eee2bf), var(--mist-image) !important; background-position: center, 55% 65% !important; box-shadow: none !important; }
.atlas-explore .theme-forest-shell::before, .atlas-explore .theme-forest-shell::after { content: none; }
.theme-forest-stage.atlas-map { display: block; padding: 0; min-height: 680px; }
.atlas-map .theme-tree { width: 23%; height: 260px; padding: 0 12px 15px; }
.atlas-map .theme-tree:nth-child(1) { left: 1%; top: 64px; transform: none; }
.atlas-map .theme-tree:nth-child(2) { left: 27%; top: 4px; transform: none; }
.atlas-map .theme-tree:nth-child(3) { left: 60%; top: 42px; transform: none; }
.atlas-map .theme-tree:nth-child(4) { left: 76%; top: 285px; transform: none; }
.atlas-map .theme-tree:nth-child(5) { left: 40%; top: 350px; transform: none; }
.atlas-map .theme-tree:nth-child(6) { left: 11%; top: 310px; transform: none; }
.atlas-map .theme-tree .tree-art-3d { width: 88%; height: 210px; transform: none; filter: drop-shadow(0 16px 14px #59432b35); }
.theme-tree-stage { background: #344b4bcc; color: #fff0d1; border-color: #f6e7bf66; }
.theme-tree-copy { background: linear-gradient(150deg, #fffcf2eb, #edece2c9 50%, #faf7eced); border-color: #fff9e8e0; }
.theme-tree-copy strong { font-size: 17px; color: #213647; }
.theme-tree-copy small { color: #425764; }
.theme-tree.selected { background: #fff7dc1f; border-color: #fff6d88c; }
.atlas-connections { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.atlas-connections path { fill: none; stroke: #fce1a7; stroke-width: 1.5; filter: drop-shadow(0 1px 3px #76553380); }
.atlas-connections circle { fill: #fff5d9; stroke: #c89e60; stroke-width: 2; }
.atlas-map-note { padding: 12px 30px 22px; display: flex; gap: 8px; align-items: center; font-size: 11px; color: #344d60; line-height: 1.6; background: #fbf7eb94; }
.atlas-map-note .icon { flex-shrink: 0; width: 15px; }
.theme-forest-stage.atlas-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); min-height: 0; padding: 18px 30px; gap: 12px; }
.atlas-list .theme-tree:nth-child(n) { position: relative; inset: auto; width: 100%; height: auto; min-height: 115px; transform: none; display: grid; grid-template-columns: 95px minmax(0,1fr); align-items: center; padding: 12px; background: #fffaf1ba; border: 1px solid #fff6e6; border-radius: 16px; }
.atlas-list .theme-tree .tree-art-3d { width: 95px; height: 100px; transform: none; }
.atlas-list .theme-tree-copy { text-align: left; padding: 6px 10px; background: none; border: 0; box-shadow: none; backdrop-filter: none; }
.atlas-list .theme-tree-stage { position: static; grid-column: 2; justify-self: start; margin-left: 10px; margin-top: -18px; }
.atlas-list .forest-haze { display: none; }
.atlas-detail-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; margin-top: 26px; }
.theme-guide-card, .atlas-growth-note { padding: 30px 34px; background: linear-gradient(125deg, #fdfaf1f2, #f7f3e5d4 58%, #edeaddb8), var(--mist-image) center / cover; border: 1px solid #fff9ed; border-radius: 20px; box-shadow: var(--mist-shadow); }
.theme-guide-card > p { min-height: 0; }
.theme-guide-card h3 { font-size: 30px; }
.atlas-growth-note h2 { font: 500 30px/1.5 'Songti SC', SimSun, serif; color: #24394c; margin: 14px 0; }
.atlas-growth-note p { font-size: 14px; line-height: 1.8; color: #485c6a; max-width: 36em; }
.atlas-growth-note > small { display: block; font-size: 11px; color: #485c6a; margin-top: 20px; line-height: 1.8; }
.atlas-growth-note .growth-mini { display: flex; justify-content: space-between; width: 100%; max-width: 420px; margin-top: 22px; background: #faf8eea6; box-shadow: none; }
.atlas-growth-note .growth-mini > span { flex: 1; }
.atlas-growth-note .growth-mini .tree-art-3d { overflow: hidden; }

/* Warm reading layers extend to collection, practice, social and modal states. */
.identity-strip, .basket-group, .source-card, .evidence-list, .collection-panel, .achievement-panel, .notice, .bottom-callout,
.practice-summary, .practice-card, .social-banner, .sharing-card, .peer-card, .learning-pulse {
  background-image: linear-gradient(110deg, #fcf9eef0, #f9f5e5d6 52%, #dee4df99), var(--mist-image) !important;
}
:is(#app, #modal-root) :is(.theme-card, .catalog-theme) {
  --ice-fill: linear-gradient(140deg, #fffaf1ed, #f5f1e2c2 42%, #e1e6de87 64%, #f9f4e4bc), var(--mist-image) var(--crop, center) / auto 155%;
}
:is(#app, #modal-root) :is(.secondary-btn, .account-btn, .icon-btn, .text-btn) {
  --ice-fill: linear-gradient(160deg, #fffef6eb, #f5f3e8b5 43%, #e1e5deae 55%, #fffff7dc);
}
:is(#app, #modal-root) :is(.primary-btn, .nav-item.active) {
  --ice-fill: linear-gradient(160deg, #eff7f5ed, #d6e3e5cc 42%, #b1c8d4c9 55%, #eaf3efe6);
  --ice-edge: #f9f8e9;
}
.modal { background: linear-gradient(115deg, #fffcf5fa, #f9f7eef2 58%, #e7e9dfdf), var(--mist-image) 70% center / cover !important; border-color: #fff9ef !important; }
.modal-backdrop { background: #27364169; }
.modal .example-box, .modal .source-link { background: #f6f3e9 !important; border-color: #b9c1ba !important; }
.pulse-card, .recall-answer { background: #fffaf0ba; border-color: #bdc3b680; }
.library-search-field { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid #a8b9bd; border-radius: 14px; background: #fffdf5; margin: 22px 0 12px; color: #365b76; }
.library-search-field input { width: 100%; min-width: 0; border: 0; outline: 0; font: inherit; background: transparent; color: #24394b; padding: 3px; }
.library-search-field:focus-within { outline: 2px solid #396d91; outline-offset: 2px; }
.library-result-count { color: #4d6070; font-size: 12px; }
#library-results .catalog-results { max-height: 48vh; overflow-y: auto; padding: 3px; }
.catalog-results article, .catalog-scene, .account-option { background: linear-gradient(110deg, #fffaf2dc, #eaece0ba); }
.page-footer { color: #3a5263; }

@media (max-width: 1180px) {
  .sidebar { gap: 14px; padding-inline: 24px; }
  .brand { font-size: 19px; margin-right: 4px; }
  .sidebar nav { gap: 8px; }
  .nav-item { font-size: 13px; padding: 12px; }
  .header-tools { gap: 8px; }
  .atlas-hero { padding-right: 340px; }
  .atlas-hero .page-tree-orb { width: 300px; height: 275px; right: 32px; }
  .atlas-hero-note { display: none; }
  .atlas-summary { grid-template-columns: repeat(3, minmax(0,1fr)) 260px; padding: 22px 16px; }
  .atlas-stat { padding-inline: 12px; }
  .atlas-stat > small { font-size: 11px; }
  #app button.atlas-review { margin-left: 14px; padding: 16px; gap: 10px; }
}
@media (max-width: 900px) {
  .header-tools > span { display: none; }
  .brand small { font-size: 6px; letter-spacing: 1px; }
  .atlas-summary { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px 0; }
  .atlas-stat:nth-child(3) { border: 0; }
  #app button.atlas-review { grid-column: 1 / -1; margin: 0; min-height: 76px; }
  .atlas-review-icon { height: 40px; width: 42px; }
  .atlas-hero { min-height: 330px; padding-bottom: 60px; }
  .atlas-hero h1 { font-size: 48px; white-space: normal; }
  .atlas-detail-layout { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { height: auto; min-height: 115px; padding: 14px 16px 10px; display: grid; grid-template-columns: 1fr auto; gap: 10px; }
  .brand { font-size: 18px; width: auto; }
  .brand-mark { width: 32px; height: 32px; }
  .sidebar nav { grid-row: 2; grid-column: 1 / -1; width: 100%; justify-content: space-between; margin: 0; gap: 4px; overflow: visible; }
  .sidebar .nav-item { flex: 1; padding: 10px 5px; justify-content: center; font-size: 11px; margin: 0; white-space: nowrap; }
  .header-tools { grid-column: 2; grid-row: 1; }
  #app .header-tools button.icon-btn { width: 32px; height: 32px; min-height: 32px; min-width: 32px; }
  .app-body { padding-top: 0; }
  .app-body main#main-content { padding-top: 0; }
  .page-heading { background-image: linear-gradient(90deg, #fcf8efe8, #f8f3e6b8 50%, #eae5d743 85%), var(--mist-image); }
  .atlas-hero { padding: 34px 115px 42px 16px; min-height: 290px; margin-bottom: -8px; }
  .atlas-hero h1 { font-size: clamp(31px, 7vw, 48px); line-height: 1.24; margin: 16px 0; white-space: normal; }
  .atlas-hero p { font-size: 14px; line-height: 1.8; }
  .atlas-hero .eyebrow { font-size: 8px; letter-spacing: 2px; }
  .atlas-hero .page-tree-orb { width: 160px; height: 168px; right: -20px; top: 56%; opacity: .85; }
  .atlas-summary { padding: 18px 12px; border-radius: 18px; gap: 18px 0; }
  .atlas-stat { padding-inline: 9px; gap: 8px; }
  .atlas-stat > span { font-size: 12px; }
  .atlas-stat > strong { font-size: 34px; }
  .atlas-stat > small { font-size: 10px; }
  #app button.atlas-review { padding: 14px; }
  .atlas-review strong { font-size: 18px; }
  .atlas-explore-heading { padding: 22px 18px 12px; flex-wrap: wrap; gap: 18px; }
  .atlas-explore-heading h2 { font-size: 24px; }
  .atlas-explore-heading p { font-size: 12px; }
  .atlas-tools { width: 100%; justify-content: space-between; gap: 8px; }
  .atlas-explore .theme-forest-shell { margin-top: -130px; padding-top: 130px; min-height: 0; }
  .theme-forest-stage.atlas-map { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); min-height: 0; padding: 0 8px 16px; gap: 12px 2px; }
  .atlas-map .theme-tree:nth-child(n) { position: relative; inset: auto; width: 100%; height: 225px; transform: none; padding: 10px 0; }
  .atlas-map .theme-tree .tree-art-3d { width: 95%; height: 164px; }
  .theme-tree-copy { padding: 7px 8px; }
  .theme-tree-copy strong { font-size: 14px; }
  .theme-tree-copy small { font-size: 9px; }
  .theme-tree-stage { font-size: 8px; right: 6px; top: 4px; }
  .atlas-connections { display: none; }
  .atlas-map-note { font-size: 10px; padding: 10px 18px 18px; }
  .theme-forest-stage.atlas-list { grid-template-columns: 1fr; padding: 10px 14px; }
  .atlas-list .theme-tree:nth-child(n) { min-height: 110px; }
  .theme-guide-card, .atlas-growth-note { padding: 24px; }
  .atlas-growth-note h2 { font-size: 25px; }
  .atlas-growth-note .growth-mini .tree-art-3d { width: 55px; }
}
@media (prefers-reduced-motion: reduce) {
  .atlas-map .theme-tree:hover { transform: none; }
}
