/* CONE SUPREME Modern UI — additive visual layer, Cloudflare Pages / no build step. */
:root {
  color-scheme: dark;
  --bg: #110e0b;
  --panel: #1a1714;
  --panel2: #211e1b;
  --line: #34312e;
  --line2: #4a4744;
  --orange: #ff884d;
  --gold: #ffc16e;
  --text: #faf7f4;
  --muted: #b8b5b2;
  --fine: #918e8b;
  --focus: #ffd3a2;
  --good: #4ed6a0;
  --warn: #f5c46a;
  --bad: #ff7c83;
  --chart: #ff884d;
  --r: 18px;
  --r-sm: 12px;
  --shadow: 0 18px 50px rgba(0,0,0,.24);
  --ring: #ff884d;
  --surface-0: #110e0b;
  --surface-1: #1a1714;
  --surface-2: #211e1b;
  --surface-3: #2d2a27;
  --text-1: #faf7f4;
  --text-2: #b8b5b2;
  --text-3: #918e8b;
  --accent: #ff884d;
  --accent-soft: rgba(255,136,77,.13);
  --radius-card: 20px;
  --ease: cubic-bezier(.2,.75,.2,1);
}
html { background: var(--bg); scroll-behavior: smooth; }
body { background: radial-gradient(900px 620px at 90% -15%, rgba(94,91,88,.14), transparent 64%), var(--bg); color: var(--text); }
::selection { background: rgba(255,136,77,.32); color: #fff; }

/* App shell */
.shell { grid-template-columns: 252px minmax(0,1fr); background: transparent; }
.side { padding: 20px 13px; gap: 8px; background: rgba(19,16,13,.96); border-right: 1px solid rgba(171,168,165,.13); box-shadow: 12px 0 34px rgba(0,0,0,.08); }
.brand { color: #fff; letter-spacing: .2px; gap: 10px; padding: 4px 10px 16px; }
.brand img { filter: drop-shadow(0 5px 14px rgba(255,136,77,.2)); }
.brand small { color: var(--orange); letter-spacing: 3.4px; text-align: left; font-size: 8px; }
.nav { display: grid; gap: 3px; }
.nav .nav-group { margin: 16px 10px 5px; color: #878481; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.15px; }
.nav a { min-height: 43px; color: #c5c2bf; padding: 9px 12px; border: 1px solid transparent; border-radius: 12px; transition: background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease); }
.nav a .ico { flex: 0 0 22px; color: #999693; font-size: 17px; }
.nav a:hover { background: rgba(255,255,255,.045); border-color: rgba(173,170,167,.12); color: var(--text); transform: translateX(1px); }
.nav a[aria-current="page"] { color: #fff; background: linear-gradient(100deg, rgba(255,136,77,.17), rgba(255,136,77,.045)); border-color: rgba(255,136,77,.24); box-shadow: inset 3px 0 0 var(--orange); }
.nav a[aria-current="page"] .ico { color: var(--orange); }
.side .who { margin: auto 0 0; padding: 14px 11px 3px; border-top: 1px solid rgba(171,168,165,.14); color: #9e9b98; }
main.view { max-width: 1540px; padding: 30px clamp(20px,3.2vw,52px) 110px; }
.topbar { background: rgba(17,14,11,.92); border-bottom-color: rgba(171,168,165,.15); backdrop-filter: blur(18px); }
.topbar .brand { color: #fff; }
.tabbar { background: rgba(19,16,13,.95); border-top-color: rgba(171,168,165,.16); backdrop-filter: blur(22px); box-shadow: 0 -12px 34px rgba(0,0,0,.2); }
.tabbar a { color: #999693; }
.tabbar a[aria-current="page"] { color: var(--orange); background: rgba(255,136,77,.1); }
.tabbar .center-cone { background: linear-gradient(145deg,#ffb86d,#ff7b45); box-shadow: 0 5px 22px rgba(255,136,77,.26); border: 2px solid rgba(255,255,255,.14); }
.view-head { margin-bottom: 24px; align-items: center; }
.view-head h1 { letter-spacing: -.035em; }
.view-head p { max-width: 68ch; line-height: 1.6; }

/* Surfaces and controls */
.card { background: linear-gradient(145deg, rgba(29,26,23,.96), rgba(23,20,17,.96)); border-color: rgba(170,167,164,.13); border-radius: var(--radius-card); box-shadow: 0 10px 30px rgba(0,0,0,.08); padding: 20px; }
.card:hover { border-color: rgba(170,167,164,.2); }
.card h2 { letter-spacing: -.02em; }
.btn { background: linear-gradient(125deg,#ff9c62,#ffc16e); color: #20130d; box-shadow: 0 8px 20px rgba(255,136,77,.14); transition: transform .16s var(--ease), box-shadow .16s var(--ease), filter .16s var(--ease); }
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(255,136,77,.22); filter: saturate(1.04); }
.btn.ghost { background: rgba(255,255,255,.025); color: var(--text); border-color: rgba(177,174,171,.22); box-shadow: none; }
.btn.ghost:hover:not(:disabled) { background: rgba(255,255,255,.06); border-color: rgba(255,136,77,.42); }
.icon-btn { border: 1px solid rgba(170,167,164,.15); background: rgba(255,255,255,.025); }
input:not([type=checkbox]):not([type=radio]), select, textarea { border-color: rgba(170,167,164,.22); background-color: #15120f; border-radius: 12px; }
input:focus, select:focus, textarea:focus { border-color: rgba(255,136,77,.72) !important; box-shadow: 0 0 0 3px rgba(255,136,77,.12); }
.pill { border-color: rgba(170,167,164,.2); background: rgba(255,255,255,.025); color: #d2cfcc; }
.list .item { border-bottom-color: rgba(170,167,164,.11); }
.empty, .muted { color: var(--muted); }
.fine { color: var(--fine); }
.divider, hr { border-color: rgba(170,167,164,.14); }
.menu-pop { background: #1d1a17; border-color: rgba(170,167,164,.19); box-shadow: var(--shadow); border-radius: 14px; }
.menu-pop a:hover, .menu-pop button:hover { background: rgba(255,255,255,.06); }
.xpchip { background: rgba(255,136,77,.08); border-color: rgba(255,136,77,.28); color: var(--gold); }

/* Command center: calmer, more spacious, clear hierarchy and honest states. */
.mc-hero { position: relative; overflow: hidden; border-radius: 24px; border: 1px solid rgba(255,255,255,.1); background: radial-gradient(460px 300px at 100% -20%, rgba(255,136,77,.23), transparent 70%), radial-gradient(400px 260px at 70% 120%, rgba(109,120,222,.12), transparent 70%), linear-gradient(135deg,#24211e,#1a1714 70%); box-shadow: 0 22px 60px rgba(0,0,0,.18); }
.mc-hero:after { content: ""; position:absolute; inset:0; pointer-events:none; opacity:.15; background-image: linear-gradient(rgba(255,255,255,.08) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.08) 1px,transparent 1px); background-size:42px 42px; mask-image:linear-gradient(100deg,transparent 10%,#000 100%); }
.mc-hero-copy,.mc-hero-actions { position: relative; z-index: 1; }
.mc-hero h2 { font-size: clamp(28px,3.5vw,42px); letter-spacing: -.045em; }
.mc-hero p { color: #c5c2bf; line-height: 1.65; }
.mc-hero .eyebrow,.mc-next-move .eyebrow { color: var(--orange); letter-spacing: .12em; }
.mc-stats { gap: 12px; }
.mc-stats .card,.mc-stat { border: 1px solid rgba(170,167,164,.13); border-radius: 16px; background: linear-gradient(145deg,#201d1a,#1a1714); }
.mc-stat b,.mc-stats b { letter-spacing: -.025em; }
.mc-next-move { background: linear-gradient(120deg,rgba(255,136,77,.08),rgba(110,125,189,.055) 48%,rgba(29,26,23,.96)); border-color: rgba(255,136,77,.23); }
.mc-search input { min-height: 48px; }
.mc-search-results { border-radius: 14px; }
.mc-search-result { background: rgba(255,255,255,.025); border-color: rgba(170,167,164,.12); border-radius: 12px; }
.mc-search-result:hover { background: rgba(255,136,77,.06); border-color: rgba(255,136,77,.34); }
.mc-project,.mc-connector,.mc-usage-metric,.mc-handoff { background: rgba(255,255,255,.022); border-color: rgba(170,167,164,.13); border-radius: 15px; }
.mc-task-list .item,.ms-item { border-color: rgba(170,167,164,.14); border-radius: 12px; background: rgba(255,255,255,.018); }
.mc-task-list .item:hover,.ms-item:hover { border-color: rgba(255,136,77,.32); background: rgba(255,255,255,.035); }
.mc-progress::-webkit-progress-value { background: linear-gradient(90deg,#ff884d,#ffc16e); }
.mc-progress::-moz-progress-bar { background: linear-gradient(90deg,#ff884d,#ffc16e); }
.mc-activity-dot { background: var(--orange); box-shadow: 0 0 0 4px rgba(255,136,77,.1); }
.ms-banner { background: rgba(255,255,255,.025); border-color: rgba(170,167,164,.15); border-radius: 14px; }
.ms-text,.ms-pre { background: #13100d; border-color: rgba(170,167,164,.14); border-radius: 12px; }

/* Mobile quality: safe-area spacing, readable touch targets, no accidental horizontal overflow. */
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0,1fr); } /* phones: one column, same as app.css (this file loads after it) */
  main.view { padding: 22px 15px calc(106px + env(safe-area-inset-bottom)); }
  .card { padding: 16px; border-radius: 17px; }
  .view-head { align-items: flex-start; margin-bottom: 18px; }
  .mc-hero { border-radius: 20px; }
  .mc-hero h2 { font-size: clamp(27px,7vw,36px); }
  .mc-stats { gap: 8px; }
  .tabbar { padding-bottom: calc(5px + env(safe-area-inset-bottom)); }
}
@media (max-width: 420px) {
  .tabbar a { font-size: 10px; }
  .tabbar .ico svg { width: 20px; height: 20px; }
  .row.wrap { gap: 7px; }
  .mc-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Revenue / conversion workflow: low-noise prompts based on the user's saved records. */
.income-coach { border-color: color-mix(in srgb, var(--accent, #ef9e47) 28%, var(--line, #322f2c)); }
.income-coach .eyebrow { margin: 0 0 .3rem; font-size: .68rem; letter-spacing: .12em; opacity: .75; }
.income-coach-metrics .stat, .income-coach-action { min-width: 0; }
.income-coach-actions .income-coach-action { background: color-mix(in srgb, var(--panel, #1a1714) 78%, transparent); }
.income-coach-action p { overflow-wrap: anywhere; }
.income-economics-warning { margin: .8rem 0; padding: .85rem; border: 1px solid color-mix(in srgb, #df9f4c 55%, var(--line, #322f2c)); border-radius: .85rem; background: color-mix(in srgb, #df9f4c 8%, transparent); }
.income-economics-warning p { margin: .35rem 0; }
.income-offer-card { min-width: 0; }
.income-offer-card > * { overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .income-coach .card-head { align-items: flex-start; }
  .income-coach-actions { grid-template-columns: minmax(0, 1fr); }
}
