/* Sator Academy 0.14 — compact application interface
   Loaded after the legacy and beta layers. It changes presentation only. */

:root {
  --app-bg:#080808;
  --app-surface:#111110;
  --app-surface-raised:#171614;
  --app-surface-active:#201b16;
  --app-separator:rgba(255,255,255,.075);
  --app-separator-strong:rgba(219,169,108,.2);
  --app-text:#f5f2ed;
  --app-secondary:#aaa49c;
  --app-tertiary:#747069;
  --app-bronze:#c99053;
  --app-bronze-bright:#e5b879;
  --app-radius:16px;
  --app-radius-small:12px;
  --app-shadow:0 16px 48px rgba(0,0,0,.28);
  --app-page:min(1180px,100%);
  --app-reading:min(760px,100%);
}

html { background:var(--app-bg); }
body {
  background:var(--app-bg);
  color:var(--app-text);
  font-family:Inter,-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",sans-serif;
  font-size:15px;
  line-height:1.42;
}
body::before { display:none; }

/* Compact primitives */
.content { max-width:1320px; padding:20px; }
.mode-user .content { max-width:1320px; }
.panel {
  padding:20px;
  border:0;
  border-radius:var(--app-radius);
  background:var(--app-surface);
  box-shadow:none;
}
.panel+.panel { margin-top:12px; }
.panel-head { gap:14px; margin-bottom:16px; }
.panel-head h1,.panel-head h2,.panel-head p { margin-block:0; }
.panel h1,.forum-hero h1,.wiki-hero h1,.commerce-hero h1,.forge-hero h1,.hero h1,
.mode-user .panel h1,.mode-user .courses-intro h1,.mode-user .commerce-hero h1,.mode-user .forge-hero h1,
.mode-user .wiki-hero h1,.mode-user .wiki-article-hero h1,.mode-user .forum-hero h1,
.mode-user .forum-thread-copy h1,.mode-user .post-reader>h1 {
  font-family:Inter,-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",sans-serif;
  font-weight:720;
  letter-spacing:-.035em;
}
.panel h1 { font-size:clamp(25px,3vw,34px); line-height:1.08; }
.panel h2 { font-size:20px; line-height:1.16; }
.panel h3 { font-size:16px; line-height:1.22; }
.eyebrow { font-size:9px; letter-spacing:.12em; }
.muted { color:var(--app-secondary); }

.btn {
  min-height:40px;
  padding:9px 14px;
  border-color:transparent;
  border-radius:11px;
  background:#242321;
  color:#eeeae4;
  font-size:13px;
  font-weight:680;
  box-shadow:none;
}
.btn:hover { transform:none; border-color:transparent; background:#302e2b; }
.btn:active { transform:scale(.975); }
.btn.primary {
  border-color:transparent;
  background:var(--app-bronze);
  color:#160f09;
  box-shadow:none;
}
.btn.primary:hover { border-color:transparent; background:var(--app-bronze-bright); box-shadow:none; }
.btn.small { min-height:32px; padding:6px 10px; border-radius:9px; }
.btn.large { min-height:44px; padding:11px 17px; border-radius:12px; font-size:14px; }
.link-button { color:var(--app-secondary); }
.link-button:hover { color:var(--app-bronze-bright); }

input,textarea,select {
  min-height:42px;
  padding:9px 11px;
  border-color:var(--app-separator);
  border-radius:10px;
  background:#0b0b0a;
  box-shadow:none;
}
textarea { min-height:88px; }
input:hover,textarea:hover,select:hover { border-color:rgba(255,255,255,.14); }
input:focus,textarea:focus,select:focus {
  border-color:rgba(221,166,101,.62);
  background:#0d0d0c;
  box-shadow:0 0 0 3px rgba(201,144,83,.1);
}

.card,.list-row,.stat,.notification-row {
  border-color:transparent;
  border-radius:var(--app-radius-small);
  background:var(--app-surface-raised);
  box-shadow:none;
}
.card { padding:15px; }
.card:hover,.list-row:hover { transform:none; border-color:transparent; background:#1b1a18; box-shadow:none; }
.list { gap:1px; overflow:hidden; border-radius:var(--app-radius-small); background:var(--app-separator); }
.list-row { min-height:58px; padding:11px 13px; border-radius:0; background:var(--app-surface-raised); }
.notice { padding:12px 14px; border:0; border-radius:12px; }
.empty { min-height:96px; padding:24px; border:0; border-radius:14px; background:rgba(255,255,255,.018); }
.tag,.status,.status-pill,.chip,.locked-chip { border-color:transparent; background:#242321; }
.toolbar { gap:7px; }

/* Public and management bars behave like application chrome. */
.topbar {
  height:58px;
  padding-inline:18px;
  border-bottom:1px solid var(--app-separator);
  background:rgba(8,8,8,.86);
  box-shadow:none;
  backdrop-filter:blur(22px) saturate(150%);
}
.topbar::after { display:none; }
.public-brand { gap:9px; }
.public-brand .logo-mark { width:34px; height:34px; flex-basis:34px; font-size:17px; }
.public-brand strong { font-size:14px; }
.public-brand small { margin-top:2px; }
.public-toolbar { gap:4px; }
.public-toolbar>a { padding:8px 10px; color:var(--app-secondary); font-size:13px; font-weight:650; }
.mode-switch { border:0; background:#131312; }
.mode-switch a { min-height:32px; display:grid; place-items:center; }
.mode-switch a.active { background:#292724; box-shadow:none; }

.side-menu { gap:12px; padding:12px 10px max(12px,env(safe-area-inset-bottom)); }
.brand { min-height:48px; padding-bottom:8px; }
.menu-items { gap:2px; }
.menu-link { position:relative; min-height:42px; padding:7px 9px; border:0; border-radius:11px; }
.menu-link.active { border:0; background:#211b16; box-shadow:none; }
.menu-link.active::before { position:absolute; left:-1px; top:50%; width:3px; height:16px; border-radius:0 3px 3px 0; background:var(--app-bronze); content:""; transform:translateY(-50%); }
.side-menu-foot { padding-top:9px; }

/* User shell */
.mode-user .content {
  width:100%;
  padding-right:20px;
  padding-bottom:max(28px,env(safe-area-inset-bottom));
  padding-left:20px;
}
.mode-user .content::before { display:none; }
.mode-user .panel {
  border:0;
  background:var(--app-surface);
  box-shadow:none;
}
.mode-user .panel-head { border:0; }
.mode-user .card,.mode-user .list-row,.mode-user .notification-row {
  border-color:transparent;
  background:var(--app-surface-raised);
}
.mode-user .btn:not(.primary) { border-color:transparent; background:#242321; }
.mode-user input,.mode-user select,.mode-user textarea { border-color:var(--app-separator); background:#0b0b0a; }

/* Landing page */
.hero {
  min-height:min(680px,calc(100dvh - 58px));
  max-width:var(--app-page);
  margin-inline:auto;
  padding:clamp(42px,8vw,92px) clamp(20px,6vw,70px);
  border-radius:0;
}
.hero h1 { max-width:780px; font-size:clamp(48px,8vw,86px); line-height:.94; }
.hero p { max-width:610px; font-size:clamp(16px,2vw,20px); }
.hero-actions { margin-top:22px; }
.hero-notes { margin-top:22px; }
.hero-orb { filter:saturate(.82); }

/* Learning */
.courses-dashboard { width:var(--app-page); }
.courses-intro {
  padding:18px 2px 16px;
  border:0;
  border-radius:0;
  background:transparent;
  text-align:left;
}
.courses-intro h1 { margin:0 0 6px; font-size:clamp(27px,4vw,38px); }
.courses-intro p { max-width:720px; font-size:14px; }
.skill-tree-wrap { overflow:hidden; border:0; border-radius:18px; background:#0d0d0c; }
.skill-tree-board { border-radius:18px; }
.courses-dashboard-actions { padding:10px; border:0; border-radius:0 0 18px 18px; background:#121211; }
.course-grid { grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:10px; }
.course-card {
  border:0;
  border-radius:16px;
  background:var(--app-surface-raised);
  box-shadow:none;
}
.course-cover { min-height:158px; }
.course-card-body { padding:15px; }
.course-card-body h3 { margin-block:0 5px; font-size:18px; }
.course-card-body p { margin-block:0 12px; display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.course-post-list .list-row { padding-left:14px; }
.course-post-list .list-row::before { display:none; }
.post-reader { max-width:860px; padding:clamp(20px,4vw,42px); }
.post-reader>h1 { max-width:720px; margin:5px 0 26px; font-size:clamp(30px,5vw,48px); }
.post-block.text-block { font-size:17px; line-height:1.72; }
.post-block { margin-bottom:24px; }
.media-block img,.media-block video,.audio-block { border:0; border-radius:16px; }
.post-finish { border:0; border-radius:16px; }
.test-runner { max-width:760px; margin-inline:auto; }

/* Social discovery, people, groups, channels */
.social-hub,.notification-center,.chat-page,.channel-page { width:var(--app-page); }
.subsection { margin-top:14px; padding-top:14px; }
.search-bar { gap:7px; margin:12px 0; }
.chat-list { gap:1px; overflow:hidden; border-radius:14px; background:var(--app-separator); }
.chat-list-row {
  min-height:62px;
  padding:8px 10px;
  border:0;
  border-radius:0;
  background:var(--app-surface-raised);
}
.chat-list-row:hover { border:0; background:#1c1b19; }
.user-avatar { width:42px; height:42px; }
.group-grid { grid-template-columns:repeat(auto-fit,minmax(245px,1fr)); gap:10px; }
.group-card { grid-template-rows:118px auto auto; border:0; border-radius:16px; background:var(--app-surface-raised); }
.group-card:hover { transform:none; border:0; background:#1b1a18; }
.group-card>div:not(.group-cover) { padding:12px 14px; }
.voice-list { gap:1px; overflow:hidden; border-radius:14px; background:var(--app-separator); }
.voice-item { padding:13px; border:0; border-radius:0; background:var(--app-surface-raised); }
.voice-item.unheard { border:0; box-shadow:inset 3px 0 var(--app-bronze); }
.channel-image,.voice-item video { border-radius:14px; }

/* Messenger */
.chat-page {
  min-height:calc(100dvh - var(--user-menu-offset,254px) - 28px);
  grid-template-rows:auto minmax(300px,1fr) auto;
  border:0;
  border-radius:18px;
  background:#0c0c0b;
}
.chat-head { min-height:60px; padding:9px 12px; background:#141412; }
.chat-head h1 { font-size:17px; }
.chat-head p { font-size:11px; }
.connection-state { border:0; background:transparent; }
.chat-messages {
  min-height:420px;
  max-height:none;
  padding:16px;
  background:#0b0b0a;
}
.chat-message { max-width:min(78%,620px); }
.message-bubble {
  padding:8px 11px;
  border:0;
  border-radius:5px 15px 15px 15px;
  background:#20201e;
  box-shadow:none;
}
.chat-message.mine .message-bubble { border:0; border-radius:15px 5px 15px 15px; background:#3a2c1f; }
.chat-compose { padding:9px 10px max(9px,env(safe-area-inset-bottom)); border-color:var(--app-separator); background:#141412; }
.chat-compose textarea { min-height:42px; max-height:120px; border-radius:12px; }
.compose-actions { align-items:center; }

/* Services and forge */
.commerce-front,.forge-front,.services-front { width:var(--app-page); }
.commerce-hero,.forge-hero {
  margin:0 0 14px;
  padding:18px 2px;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.commerce-hero::after,.forge-hero::after { display:none; }
.commerce-hero h1,.forge-hero h1 { margin:4px 0 6px; font-size:clamp(28px,4vw,38px); }
.commerce-hero p,.forge-hero p { max-width:720px; margin:0; font-size:14px; }
.commerce-section-head { margin-bottom:10px; padding-bottom:8px; }
.service-grid,.forge-grid { grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:10px; }
.service-card,.forge-card { border:0; border-radius:16px; background:var(--app-surface-raised); box-shadow:none; }
.service-card:hover,.forge-card:hover { transform:none; border:0; box-shadow:none; background:#1b1a18; }
.service-visual,.forge-card-visual { min-height:150px; }
.service-card-body,.forge-card-body { padding:14px; }
.forge-tabs {
  position:sticky;
  top:8px;
  z-index:5;
  display:flex;
  gap:4px;
  overflow:auto;
  padding:4px;
  border:0;
  border-radius:12px;
  background:rgba(18,18,17,.92);
  backdrop-filter:blur(18px);
  scrollbar-width:none;
}
.forge-tabs::-webkit-scrollbar { display:none; }
.forge-tabs button { flex:0 0 auto; min-height:36px; white-space:nowrap; }
.forge-tabs button.active { background:#302a23; }

/* Forum */
.forum-shell { width:var(--app-page); gap:12px; }
.forum-hero {
  grid-template-columns:minmax(0,1fr) minmax(280px,420px);
  gap:20px;
  padding:20px;
  border:0;
  border-radius:18px;
  background:var(--app-surface);
  box-shadow:none;
}
.forum-hero h1 { margin:4px 0 5px; font-size:clamp(27px,4vw,38px); line-height:1.05; }
.forum-hero p { margin:0; font-size:14px; }
.forum-search { padding:4px; border:0; border-radius:12px; background:#080808; box-shadow:none; }
.forum-layout { gap:12px; }
.forum-category-board { gap:8px; }
.forum-category-card,.forum-section-card,.forum-topic-card,.forum-thread-head,.forum-aside>section {
  border:0;
  border-radius:14px;
  background:var(--app-surface-raised);
  box-shadow:none;
}
.forum-category-card:hover,.forum-section-card:hover,.forum-topic-card:hover { border:0; background:#1c1b19; }
.forum-category-card-head { padding:13px; }
.forum-category-mark { width:42px; height:42px; border-radius:12px; }
.forum-category-sections { padding:4px 8px 8px; }
.forum-section-card { padding:12px; }
.forum-feed-head { margin-top:4px; }
.forum-sort-tabs { display:flex; overflow:auto; padding:3px; border:0; background:#111110; scrollbar-width:none; }
.forum-sort-tabs::-webkit-scrollbar { display:none; }
.forum-sort-tabs a { flex:0 0 auto; min-height:34px; display:grid; place-items:center; white-space:nowrap; }
.forum-topic-feed { gap:1px; overflow:hidden; border-radius:14px; background:var(--app-separator); }
.forum-topic-card { border-radius:0; background:var(--app-surface-raised); }
.forum-topic-card.pinned { border:0; background:#1e1914; }
.forum-vote-column { border-color:var(--app-separator); background:transparent; }
.forum-topic-main { padding:12px; }
.forum-topic-main h3 { font-size:16px; }
.forum-breadcrumbs { margin:0 2px; padding:7px 0; }
.forum-section-hero,.forum-section-title { padding:16px; border:0; border-radius:14px; background:var(--app-surface); }
.forum-thread-head { grid-template-columns:52px minmax(0,1fr); }
.forum-thread-copy { padding:18px; }
.forum-thread-copy h1 { margin:5px 0 12px; font-size:clamp(27px,4vw,42px); }
.forum-comment-card { padding:11px 13px; border:0; border-radius:13px; background:var(--app-surface-raised); }
.forum-comment-line::before { width:1px; }
.forum-compose,.forum-compose-login,.forum-compose-locked { padding:14px; border:0; border-radius:14px; background:var(--app-surface-raised); }
.forum-aside { gap:8px; }
.forum-aside>section { padding:13px; }

/* Wiki */
.wiki-shell,.wiki-article { width:var(--app-page); }
.wiki-hero {
  grid-template-columns:minmax(0,1fr) minmax(280px,420px);
  gap:20px;
  padding:20px;
  border:0;
  border-radius:18px;
  background:var(--app-surface);
  box-shadow:none;
}
.wiki-hero h1 { margin:4px 0 5px; font-size:clamp(27px,4vw,38px); line-height:1.05; }
.wiki-hero p { font-size:14px; }
.wiki-search { padding:4px; border:0; border-radius:12px; background:#080808; box-shadow:none; }
.wiki-category-grid { gap:8px; margin:12px 0 24px; }
.wiki-category-card {
  grid-template-columns:86px minmax(0,1fr);
  min-height:124px;
  border:0;
  border-radius:14px;
  background:var(--app-surface-raised);
}
.wiki-category-card:hover { transform:none; border:0; background:#1c1b19; }
.wiki-category-card>img,.wiki-category-glyph { width:86px; }
.wiki-category-card>div { padding:13px; }
.wiki-category-card h2 { font-size:18px; }
.wiki-category-card p { margin:5px 0 8px; display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.wiki-subcategory-links { gap:4px; }
.wiki-subcategory-links a { padding:4px 7px; border:0; background:#242321; }
.wiki-breadcrumbs { margin:12px 2px; }
.wiki-list-head { margin:20px 2px 10px; }
.wiki-list-head h2 { font-size:25px; }
.wiki-article-grid { gap:8px; }
.wiki-article-card { border:0; border-radius:14px; background:var(--app-surface-raised); }
.wiki-article-card:hover { transform:none; border:0; box-shadow:none; background:#1c1b19; }
.wiki-article-card>a { grid-template-rows:140px minmax(0,1fr); }
.wiki-article-card img,.wiki-card-placeholder { height:140px; }
.wiki-article-card>a>div { padding:13px; }
.wiki-article-card h3 { margin:4px 0 5px; font-size:18px; }
.wiki-article-card p { margin-bottom:10px; display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.wiki-article-hero {
  grid-template-columns:minmax(0,1.2fr) minmax(240px,.8fr);
  gap:28px;
  padding:24px;
  border:0;
  border-radius:18px;
  background:var(--app-surface);
  box-shadow:none;
}
.wiki-article-hero h1 { margin:5px 0 10px; font-size:clamp(31px,5vw,52px); }
.wiki-article-hero p { font-size:16px; }
.wiki-article-hero>img { max-height:360px; border-radius:14px; box-shadow:none; }
.wiki-reading-layout { grid-template-columns:180px minmax(0,760px); gap:28px; margin-top:28px; }
.wiki-toc { padding:10px 12px; }
.wiki-article-body { font-size:17px; line-height:1.74; }
.wiki-rich-text,.wiki-single-image,.wiki-video,.wiki-quote,.wiki-gallery { margin-bottom:26px; }
.wiki-rich-text h2,.wiki-gallery h2 { font-size:clamp(25px,4vw,34px); }
.wiki-rich-text h3 { font-size:clamp(20px,3vw,25px); }
.wiki-single-image img,.wiki-video video,.wiki-video-frame,.wiki-gallery-slide { border-radius:14px; }
.wiki-quote { padding:17px 20px; border-radius:0 12px 12px 0; }
.wiki-related { margin-top:42px; padding-top:22px; }

/* Notifications and profile */
.notification-filters {
  flex-wrap:nowrap;
  overflow:auto;
  margin:10px 0 12px;
  scrollbar-width:none;
}
.notification-filters::-webkit-scrollbar { display:none; }
.notification-filters .chip { flex:0 0 auto; min-height:34px; padding:7px 11px; white-space:nowrap; }
.notification-list { gap:1px; overflow:hidden; border-radius:14px; background:var(--app-separator); }
.notification-row { padding:11px 12px; border:0; border-radius:0; background:var(--app-surface-raised); }
.notification-row.unread { border:0; background:#1e1914; }
.identity-grid { gap:8px; }
.identity-grid .card { min-height:0; }
.workspace-entry { margin-top:16px; padding:14px; border:0; border-radius:14px; background:var(--app-surface-raised); }
.profile-session-actions { margin-top:14px; padding-top:12px; }

/* Dialogs become sheets on small screens. */
.modal-backdrop { background:rgba(0,0,0,.72); backdrop-filter:blur(7px); }
.modal-card,.manager-editor-dialog,.post-settings-sheet,.post-content-sheet,.forum-new-topic-dialog,.commerce-dialog,.wiki-link-dialog {
  border:1px solid var(--app-separator);
  border-radius:18px;
  background:#151513;
  box-shadow:0 30px 90px rgba(0,0,0,.58);
}
.modal-card { padding:20px; }
.modal-close { background:#242321; }
.auth-tabs { padding:3px; border-radius:11px; background:#0d0d0c; }
.auth-tabs button { min-height:36px; border-radius:9px; }

/* Management interfaces use the same compact rhythm without changing workflows. */
.mode-manager .content,.mode-developer .content { max-width:1440px; }
.manager-workspace { background:var(--app-surface); }
.manager-page-head { padding-bottom:14px; }
.manager-settings-card { margin-top:10px; padding:16px; border:0; border-radius:14px; background:var(--app-surface-raised); }
.settings-card-title { gap:10px; }
.settings-card-title>span { width:26px; height:26px; }
.settings-card-title h2 { font-size:18px; }
.settings-card-title p { margin-top:2px; font-size:12px; }
.manager-save-bar,.sheet-save-bar { padding:10px 14px; border-color:var(--app-separator); background:rgba(17,17,16,.9); }
.table-wrap { border:0; border-radius:12px; }
th { background:#171614; }
th,td { padding:9px 11px; border-color:var(--app-separator); }
.catalog-editor,.medal-catalog-card,.user-data-tabs details { border-color:var(--app-separator); border-radius:12px; }

/* Menu editor: preview, live controls, pendant, mapping. */
.menu-manager-form { gap:10px; }
.menu-preview-card { padding-bottom:12px; }
.arcane-manager-preview { min-height:310px; margin-top:12px; border:0; border-radius:14px; }
.menu-motion-card { padding-bottom:10px; }
.menu-control-group { margin-top:10px; padding-top:10px; border-top:1px solid var(--app-separator); }
.menu-control-group>header { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:7px; }
.menu-control-group>header small { color:var(--app-tertiary); font-size:10px; }
.menu-motion-switch { margin:12px 0 2px; padding:10px; border:0; border-radius:12px; background:#111110; }
.menu-range-grid { gap:5px; margin-top:0; }
.menu-range { grid-template-columns:minmax(120px,.95fr) minmax(130px,1.35fr) 48px; gap:9px; padding:9px 10px; border:0; border-radius:10px; background:#111110; }
.menu-range input[type="range"] { min-height:18px; }
.menu-color-grid { gap:5px; margin-top:5px; }
.menu-color-grid label { padding:8px 10px; border:0; border-radius:10px; background:#111110; }
.menu-amulet-control { margin-top:10px; }
.menu-position-grid { gap:8px; margin-top:10px; }
.menu-position-column { border:0; border-radius:12px; }
.menu-position-column>header { padding:10px 12px; }
.menu-position-card { padding:9px 10px; }

@media (max-width:900px) {
  .content { padding:14px; }
  .mode-user .content { padding-inline:14px; }
  .forum-layout { grid-template-columns:1fr; }
  .forum-aside { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .wiki-reading-layout { grid-template-columns:1fr; }
  .wiki-toc { display:none; }
  .wiki-article-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .menu-range-grid { grid-template-columns:1fr; }
}

@media (max-width:700px) {
  body { font-size:14px; }
  .topbar { height:54px; padding-inline:10px; }
  .content { padding:0 0 max(14px,env(safe-area-inset-bottom)); }
  .app-shell:not(.mode-user) .content { padding:10px; }
  .mode-user .content { padding-right:0; padding-left:0; }
  .mode-user .panel,.panel { padding:14px; border-radius:0; }
  .mode-user .content>.panel:first-child,.is-public .content>.panel:first-child { border-top:0; }
  .panel+.panel { margin-top:8px; }
  .panel-head { flex-direction:row; align-items:center; gap:10px; margin-bottom:13px; }
  .panel-head>div:first-child { flex:1; }
  .panel-head p { display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
  .panel-head>.btn { width:auto; flex:0 0 auto; }
  .panel h1 { font-size:25px; }
  .panel h2 { font-size:18px; }
  .btn { min-height:42px; }
  .cards,.identity-grid,.course-grid,.group-grid,.service-grid,.forge-grid { gap:7px; padding-inline:10px; }
  .card { padding:13px; }
  .list { border-radius:0; }
  .list-row { padding:11px 14px; }
  .table-wrap { margin-inline:-14px; }

  .courses-intro,.commerce-hero,.forge-hero { margin:0; padding:15px 14px 12px; }
  .courses-intro h1,.commerce-hero h1,.forge-hero h1 { font-size:27px; }
  .courses-intro p,.commerce-hero p,.forge-hero p { display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
  .skill-tree-wrap { border-radius:0; }
  .skill-tree-board { border-radius:0; }
  .courses-dashboard-actions { border-radius:0; }
  .course-grid { grid-template-columns:1fr 1fr; }
  .course-cover { min-height:112px; }
  .course-card-body { padding:11px; }
  .course-card-body h3 { font-size:16px; }
  .course-card-body p { font-size:12px; }
  .post-reader { margin:0; padding:22px 16px; }
  .post-reader>h1 { margin-bottom:22px; font-size:32px; }
  .post-block.text-block { font-size:16px; }

  .social-hub,.notification-center,.channel-page { margin:0; }
  .search-bar { padding-inline:10px; }
  .group-grid { grid-template-columns:1fr 1fr; }
  .group-card { grid-template-rows:92px auto auto; border-radius:13px; }
  .group-card p { display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
  .chat-page {
    min-height:calc(100dvh - var(--user-menu-mobile-offset,132px));
    margin:0;
    border-radius:0;
  }
  .chat-head { position:sticky; top:0; z-index:3; min-height:56px; }
  .chat-messages { min-height:calc(100dvh - var(--user-menu-mobile-offset,132px) - 168px); padding:12px 8px; }
  .chat-message { max-width:88%; }
  .chat-compose { position:sticky; bottom:0; z-index:4; }
  .compose-actions { display:flex; }

  .forge-tabs { top:4px; margin-inline:10px; }
  .service-grid,.forge-grid { grid-template-columns:1fr 1fr; }
  .service-visual,.forge-card-visual { min-height:110px; }
  .service-card-body,.forge-card-body { padding:11px; }

  .forum-shell,.wiki-shell,.wiki-article { width:100%; }
  .forum-hero,.wiki-hero {
    grid-template-columns:1fr;
    gap:12px;
    margin:0;
    padding:15px 14px;
    border-radius:0;
  }
  .forum-hero h1,.wiki-hero h1 { font-size:27px; }
  .forum-hero p,.wiki-hero p { display:none; }
  .forum-search,.wiki-search { display:flex; flex-direction:row; }
  .forum-search input,.wiki-search input { min-width:0; }
  .forum-search .btn,.wiki-search .btn { width:auto; }
  .forum-layout { gap:7px; }
  .forum-aside { grid-template-columns:1fr; padding:0 10px; }
  .forum-category-board,.forum-section-grid { padding-inline:10px; }
  .forum-category-card-head { padding:11px; }
  .forum-topic-feed { border-radius:0; }
  .forum-topic-card { grid-template-columns:40px minmax(0,1fr); }
  .forum-topic-main { padding:10px; }
  .forum-topic-body { display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
  .forum-breadcrumbs { padding-inline:12px; }
  .forum-section-hero,.forum-section-title { border-radius:0; }
  .forum-thread-head { margin:0; border-radius:0; }
  .forum-thread-copy { padding:15px 12px; }
  .forum-thread-copy h1 { font-size:28px; }
  .forum-comments { padding-inline:8px; }
  .forum-comment { margin-left:calc(min(var(--comment-depth),2) * 7px); }
  .forum-compose,.forum-compose-login,.forum-compose-locked { border-radius:0; }

  .wiki-category-grid { grid-template-columns:1fr; gap:1px; margin:8px 0 18px; border-radius:0; background:var(--app-separator); }
  .wiki-category-card { min-height:102px; border-radius:0; }
  .wiki-category-card>img,.wiki-category-glyph { width:76px; }
  .wiki-breadcrumbs,.wiki-list-head { margin-inline:12px; }
  .wiki-article-grid { grid-template-columns:1fr; gap:1px; margin-inline:0; background:var(--app-separator); }
  .wiki-article-card { border-radius:0; }
  .wiki-article-card>a { grid-template-columns:94px minmax(0,1fr); grid-template-rows:auto; min-height:122px; }
  .wiki-article-card img,.wiki-card-placeholder { width:94px; height:100%; min-height:122px; }
  .wiki-article-hero { grid-template-columns:1fr; gap:14px; padding:17px 14px; border-radius:0; }
  .wiki-article-hero h1 { font-size:32px; }
  .wiki-article-hero p { font-size:15px; }
  .wiki-article-hero>img { order:-1; aspect-ratio:16/9; max-height:240px; border-radius:12px; }
  .wiki-reading-layout { margin-top:20px; }
  .wiki-article-body { padding-inline:16px; font-size:16px; }
  .wiki-gallery { width:100vw; margin-left:-16px; }
  .wiki-gallery-slide { flex-basis:88vw; border-radius:0; }
  .wiki-related { margin-inline:12px; }

  .notification-filters { padding-inline:10px; }
  .notification-list { border-radius:0; }
  .workspace-entry { align-items:stretch; flex-direction:column; margin:12px -4px 0; }

  .modal { align-items:end; }
  .modal-card,.manager-editor-dialog,.post-settings-sheet,.post-content-sheet,.forum-new-topic-dialog,.commerce-dialog,.wiki-link-dialog {
    width:100%;
    max-width:none;
    max-height:min(92dvh,900px);
    margin:0;
    border-width:1px 0 0;
    border-radius:20px 20px 0 0;
  }
  .modal-card { padding:18px 16px max(18px,env(safe-area-inset-bottom)); }

  .manager-workspace { margin:0; border-radius:0; }
  .manager-settings-card { padding:13px; }
  .manager-save-bar { margin-inline:-13px; }
  .menu-manager { margin:0; }
  .menu-preview-card { padding-inline:8px; }
  .arcane-manager-preview { min-height:260px; margin-top:8px; border-radius:12px; }
  .menu-control-group>header { align-items:flex-start; flex-direction:column; gap:2px; }
  .menu-range { grid-template-columns:minmax(105px,1fr) minmax(100px,1.1fr) 44px; }
  .menu-position-grid { grid-template-columns:1fr; }
}

@media (max-width:430px) {
  .course-grid,.group-grid,.service-grid,.forge-grid { grid-template-columns:1fr; }
  .course-card,.group-card,.service-card,.forge-card { border-radius:0; }
  .cards,.identity-grid,.course-grid,.group-grid,.service-grid,.forge-grid { padding-inline:0; }
  .service-card,.forge-card { display:grid; grid-template-columns:108px minmax(0,1fr); }
  .service-visual,.forge-card-visual { min-height:126px; height:100%; }
  .forum-search .btn,.wiki-search .btn { padding-inline:12px; }
  .menu-range { grid-template-columns:1fr 46px; }
  .menu-range>span { grid-column:1/-1; }
}

@media (hover:none) {
  .btn:hover,.card:hover,.course-card:hover,.group-card:hover,.service-card:hover,.forge-card:hover,
  .forum-category-card:hover,.forum-section-card:hover,.forum-topic-card:hover,.wiki-category-card:hover,.wiki-article-card:hover { transform:none; }
}

@media (prefers-reduced-transparency:reduce) {
  .topbar,.forge-tabs,.manager-save-bar,.sheet-save-bar { backdrop-filter:none; background:#111110; }
}

@media print {
  .topbar { display:none!important; }
  .panel,.forum-hero,.wiki-hero,.wiki-article-hero,.forum-thread-head { background:#fff; color:#111; }
}

/* 0.15 — компактные рабочие экраны и CRM */
.tree-front-tabs {
  display:flex; gap:6px; width:min(100%,720px); margin:0 auto 8px; padding:3px;
  overflow-x:auto; scrollbar-width:none; border-radius:12px; background:#11110f;
}
.tree-front-tabs::-webkit-scrollbar { display:none; }
.tree-front-tabs a {
  flex:0 0 auto; padding:8px 13px; border-radius:9px; color:var(--app-muted);
  font-size:13px; font-weight:650; text-decoration:none;
}
.tree-front-tabs a.active { color:#f4e8d7; background:#29231b; box-shadow:inset 0 0 0 1px rgba(191,145,86,.22); }
.courses-dashboard-actions { display:grid!important; grid-template-columns:1fr 1fr!important; gap:8px; }

.manager-tree-list { display:grid; gap:6px; }
.manager-tree-row {
  display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:12px; align-items:center;
  min-height:58px; padding:8px 10px; border-radius:12px; background:#151513;
  box-shadow:inset 0 0 0 1px var(--app-separator);
}
.manager-tree-row.dragging { opacity:.45; }
.manager-tree-row>div:nth-child(2) { display:grid; gap:3px; min-width:0; }
.manager-tree-row strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.manager-tree-row span { color:var(--app-muted); font-size:12px; }
.manager-tree-actions { display:flex; gap:6px; }
.tree-order-note { margin:10px 2px 0; font-size:12px; }
.animation-prompt-actions { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }

.medal-manager-tabs {
  display:flex; gap:5px; margin:0 0 12px; padding:3px; overflow-x:auto; scrollbar-width:none;
  border-radius:12px; background:#11110f;
}
.medal-manager-tabs::-webkit-scrollbar { display:none; }
.medal-manager-tabs button {
  flex:0 0 auto; min-height:34px; padding:0 12px; border:0; border-radius:9px;
  background:transparent; color:var(--app-muted); font:650 13px/1 inherit; cursor:pointer;
}
.medal-manager-tabs button.active { color:#f5e8d4; background:#29231b; }
.medal-tab-panels { margin-top:10px; }
.medal-catalog-card[hidden] { display:none!important; }
.medal-catalog-card summary { display:flex; gap:10px; align-items:center; }
.medal-catalog-card summary>span:not(.medal-manager-avatar) { display:grid; gap:2px; }
.medal-manager-avatar { width:38px; height:38px; flex:0 0 38px; border-radius:50%; object-fit:cover; }
.medal-manager-avatar.empty { display:grid; place-items:center; background:#27231d; color:#c79a60; }
.system-medal-card { display:grid; grid-template-columns:auto minmax(0,1fr); gap:10px; }
.medal-category-editor { margin-top:14px; }

.auth-card { width:min(440px,calc(100vw - 24px)); padding:24px; }
.auth-card-head { display:flex; gap:12px; align-items:center; padding-right:30px; margin-bottom:18px; }
.auth-card-head .logo-mark { width:42px; height:42px; flex:0 0 42px; }
.auth-card-head h2 { margin:0; font-size:22px; }
.auth-card>h2 { margin:0 0 18px; font-size:22px; }
.auth-page .standalone-card { width:min(440px,100%); padding:26px; }
.auth-page h1 { margin:0 0 16px; font-size:26px; letter-spacing:-.025em; }
.auth-card-head p { margin:3px 0 0; color:var(--app-muted); font-size:13px; }
.auth-card .auth-tabs { display:grid; grid-template-columns:1fr 1fr; padding:3px; border-radius:11px; background:#11110f; }
.auth-card .auth-tabs button { min-height:36px; border-radius:8px; }
.auth-card .auth-form { gap:12px; margin-top:14px; }
.auth-card .auth-form label { gap:6px; font-size:13px; }
.password-field { display:grid; grid-template-columns:minmax(0,1fr) auto; border:1px solid var(--app-separator); border-radius:10px; background:#0d0d0c; }
.password-field:focus-within { border-color:rgba(191,145,86,.58); }
.password-field input { border:0!important; background:transparent!important; }
.password-field button { padding:0 11px; border:0; background:transparent; color:#c49a67; cursor:pointer; font-size:12px; }
.auth-form-note { color:var(--app-muted); font-size:11px; line-height:1.45; }

.crm-live-dot { display:flex; align-items:center; gap:7px; color:var(--app-muted); font-size:12px; }
.crm-live-dot::before { content:""; width:7px; height:7px; border-radius:50%; background:#77b38b; box-shadow:0 0 0 4px rgba(119,179,139,.1); }
.crm-stats { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:7px; margin-bottom:10px; }
.crm-stats article { min-width:0; padding:14px; border-radius:13px; background:#151513; box-shadow:inset 0 0 0 1px var(--app-separator); }
.crm-stats strong { display:block; overflow:hidden; font-size:clamp(19px,2.5vw,28px); text-overflow:ellipsis; }
.crm-stats span { display:block; margin-top:3px; color:var(--app-muted); font-size:11px; }
.crm-dashboard-grid { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(280px,.75fr); gap:10px; margin-bottom:10px; }
.crm-card { padding:14px; border-radius:14px; background:#151513; box-shadow:inset 0 0 0 1px var(--app-separator); }
.crm-card+.crm-card { margin-top:10px; }
.crm-dashboard-grid>.crm-card { margin-top:0; }
.crm-card-head { display:flex; justify-content:space-between; gap:12px; align-items:center; margin-bottom:12px; }
.crm-card-head h2 { margin:0; font-size:17px; }
.crm-card-head>span,.crm-card-head>strong { color:var(--app-muted); font-size:12px; }
.crm-bars { display:flex; align-items:end; gap:5px; height:184px; padding-top:12px; border-bottom:1px solid var(--app-separator); }
.crm-bar-day { position:relative; display:flex; flex:1; justify-content:center; align-items:end; gap:2px; height:100%; }
.crm-bar { width:min(9px,38%); min-height:3px; border-radius:4px 4px 1px 1px; }
.crm-bar.views { background:#bb8950; }
.crm-bar.time { background:#68645d; }
.crm-bar-day small { position:absolute; bottom:-19px; color:#716d67; font-size:9px; }
.crm-chart-legend { display:flex; gap:14px; margin-top:26px; color:var(--app-muted); font-size:11px; }
.crm-chart-legend i { display:inline-block; width:7px; height:7px; margin-right:5px; border-radius:2px; }
.crm-chart-legend i.views { background:#bb8950; }.crm-chart-legend i.time { background:#68645d; }
.crm-top-list { display:grid; gap:1px; }
.crm-top-list>div { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:9px 2px; border-bottom:1px solid var(--app-separator); }
.crm-top-list>div:last-child { border-bottom:0; }
.crm-top-list span { display:grid; gap:2px; min-width:0; }
.crm-top-list strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.crm-top-list small { color:var(--app-muted); font-size:10px; }
.crm-top-list b { flex:0 0 auto; font-size:13px; }
.crm-filter-form { display:grid; grid-template-columns:1.2fr repeat(5,minmax(120px,.8fr)) auto; gap:7px; align-items:end; margin-bottom:10px; }
.crm-filter-form label,.crm-compose-grid label { display:grid; gap:5px; color:var(--app-muted); font-size:11px; }
.crm-filter-form input,.crm-filter-form select { min-width:0; height:38px; }
.crm-user-list { display:grid; gap:1px; }
.crm-user-row { display:grid; grid-template-columns:auto minmax(150px,1fr) minmax(100px,.45fr) minmax(120px,.5fr) auto; gap:10px; align-items:center; min-height:58px; padding:7px; border-radius:10px; color:inherit; text-decoration:none; }
.crm-user-row:hover { background:#1d1c19; }
.crm-user-row>span:not(.profile-avatar) { display:grid; gap:2px; min-width:0; }
.crm-user-row strong,.crm-user-row b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.crm-user-row small { color:var(--app-muted); font-size:10px; }
.crm-user-row>i { color:#8c8377; font-style:normal; font-size:20px; }
.crm-campaign-compose>summary { cursor:pointer; font-size:17px; font-weight:700; }
.crm-compose-grid { display:grid; grid-template-columns:1.1fr .9fr; gap:18px; margin-top:16px; }
.crm-compose-grid>div { display:grid; gap:10px; align-content:start; }
.crm-compose-grid h3 { margin:0; font-size:14px; }
.crm-channel-picks { display:flex; gap:14px; }
.crm-channel-picks label { display:flex; grid-template-columns:auto 1fr; align-items:center; }
.crm-confirm { margin-top:5px; }
.crm-campaign-list { display:grid; gap:1px; }
.crm-campaign-list article { display:flex; justify-content:space-between; gap:12px; padding:10px 2px; border-bottom:1px solid var(--app-separator); }
.crm-campaign-list article>span { display:grid; gap:2px; }
.crm-campaign-list small { color:var(--app-muted); font-size:10px; }
.crm-timeline { display:grid; }
.crm-timeline article { display:grid; grid-template-columns:145px minmax(0,1fr); gap:12px; padding:10px 0; border-bottom:1px solid var(--app-separator); }
.crm-timeline time { color:var(--app-muted); font-size:11px; }
.crm-timeline article>span { display:grid; gap:3px; }
.crm-timeline small { color:var(--app-muted); font-size:10px; overflow-wrap:anywhere; }

@media (max-width:900px) {
  .crm-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .crm-dashboard-grid,.crm-compose-grid { grid-template-columns:1fr; }
  .crm-filter-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .crm-filter-form .btn { grid-column:1/-1; }
}

@media (max-width:680px) {
  .page-courses .content { padding-top:6px!important; padding-bottom:6px!important; }
  .page-courses .courses-dashboard { display:flex; flex-direction:column; min-height:calc(100dvh - var(--user-menu-mobile-offset,104px) - 14px); }
  .tree-front-tabs { flex:0 0 auto; margin-bottom:5px; border-radius:10px; }
  .tree-front-tabs a { padding:7px 11px; font-size:12px; }
  .page-courses .skill-tree-wrap {
    display:block;
    flex:0 0 auto;
    width:min(100%,430px);
    max-width:100%;
    min-height:1px;
    margin-inline:auto;
  }
  .page-courses .skill-tree-board {
    display:block;
    width:100%;
    max-width:100%;
    height:160vw;
    min-height:1px!important;
    max-height:688px;
    margin-inline:0;
    aspect-ratio:auto;
  }
  .courses-dashboard-actions { flex:0 0 auto; padding:7px 8px 0!important; }
  .courses-dashboard-actions .btn { min-height:40px; padding:8px 10px; font-size:12px; }
  .commerce-hero,.forge-hero { min-height:54px; padding:12px 14px!important; align-items:center; }
  .commerce-hero h1,.forge-hero h1 { margin:0!important; font-size:24px!important; }
  .manager-tree-row { grid-template-columns:auto minmax(0,1fr); }
  .manager-tree-actions { grid-column:2; }
  .auth-card { border-radius:20px 20px 0 0; }
  .crm-live-dot { display:none; }
  .crm-stats { gap:5px; }
  .crm-stats article { padding:11px; }
  .crm-filter-form { grid-template-columns:1fr; }
  .crm-filter-form .btn { grid-column:auto; }
  .crm-user-row { grid-template-columns:auto minmax(0,1fr) auto; }
  .crm-user-row>span:nth-child(3) { display:none; }
  .crm-user-row>span:nth-child(4) { text-align:right; }
  .crm-bars { height:150px; }
  .crm-timeline article { grid-template-columns:1fr; gap:3px; }
}
/* Compact account and team work views. */
[hidden] { display:none!important; }
.auth-card-head { padding:10px 0; text-align:center; }
.auth-card-head h2 { margin:0; font-size:22px; }
.work-filters { display:flex; flex-wrap:wrap; gap:10px; align-items:end; margin:16px 0; }
.work-filters label { flex:1; min-width:150px; margin:0; }
.work-board { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(210px,1fr); gap:12px; overflow-x:auto; padding-bottom:12px; max-width:100%; }
.work-lane.drag-over { background:rgba(189,147,109,.13); }
.work-case-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:12px; }
.work-case-card { display:flex; flex-direction:column; gap:8px; padding:16px; border-radius:14px; background:rgba(255,255,255,.035); color:var(--text); text-decoration:none; }
.work-case-card small { color:var(--muted); }
.work-lane { min-width:0; background:rgba(255,255,255,.025); border-radius:16px; padding:12px; }
.work-lane h2 { font-size:15px; margin:0 0 12px; display:flex; justify-content:space-between; }
.work-task-card { display:flex; flex-direction:column; gap:6px; padding:14px; margin-bottom:9px; border-radius:12px; background:var(--surface,#191715); color:var(--text); text-decoration:none; box-shadow:0 2px 8px #0002; }
.work-task-card strong { font-size:15px; overflow-wrap:anywhere; }
.work-task-card small,.work-task-card span { color:var(--muted); font-size:12px; }
.work-task-card.priority-urgent { box-shadow:inset 3px 0 #d88a73; }
.work-task-card.priority-high { box-shadow:inset 3px 0 var(--accent,#bd936d); }
.work-task-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:12px; }
.work-detail { max-width:1100px; margin-inline:auto; }
.work-detail .form-grid { margin:16px 0 24px; }
.work-detail textarea { resize:vertical; }
.work-check { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:8px 0; }
.work-check label { flex:1; margin:0; min-width:180px; }
.work-timeline article { padding:16px 0; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.work-timeline time,.work-timeline small { color:var(--muted); font-size:12px; }
.work-timeline p { margin:8px 0 0; }
.danger-text { color:#e39b85!important; }
.insight-comparison { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.insight-rate { display:block; font-size:42px; line-height:1.2; margin:14px 0; }
.insight-meter { height:9px; border-radius:9px; background:#ffffff0c; overflow:hidden; }
.insight-meter span { display:block; height:100%; background:var(--accent,#bd936d); }
.insight-difference { font-size:19px; margin:20px 0; }
@media(max-width:650px) {
  .work-board { grid-auto-columns:minmax(245px,80vw); scroll-snap-type:x proximity; }
  .work-lane { scroll-snap-align:start; }
  .work-filters { gap:8px; }
  .work-filters label { min-width:calc(50% - 8px); }
  .insight-comparison { grid-template-columns:1fr; }
  .work-detail .panel-head { align-items:start; }
}
