:root {
  --bg: #f4f7fb;
  --card: rgba(255,255,255,0.9);
  --line: rgba(15, 23, 42, 0.08);
  --text: #0f172a;
  --muted: #5b6477;
  --accent: #0f9d58;
  --accent-2: #6c5ce7;
  --accent-3: #ff8a00;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: 'Inter', sans-serif; color: var(--text);
  background: radial-gradient(circle at top left, #eef8f1, #f6f4ff 40%, #f4f7fb 75%);
}
.app-shell { display: grid; grid-template-columns: 300px 1fr; min-height: 100vh; }
.sidebar {
  border-right: 1px solid var(--line); padding: 24px 18px; background: rgba(255,255,255,0.66); backdrop-filter: blur(16px);
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; gap: 14px; align-items: center; margin-bottom: 22px; }
.brand-mark {
  width: 48px; height: 48px; border-radius: 16px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  display:flex; align-items:center; justify-content:center; font-weight: 800; box-shadow: var(--shadow);
}
.brand-title { font-weight: 800; font-size: 18px; }
.brand-subtitle { color: var(--muted); font-size: 13px; line-height: 1.35; }
.menu { display: flex; flex-direction: column; gap: 8px; }
.menu-btn {
  width: 100%; border: 1px solid transparent; background: transparent; text-align: left; padding: 12px 14px; border-radius: 16px; color: var(--text);
  cursor: pointer; transition: 0.2s ease; font: inherit;
}
.menu-btn:hover { background: rgba(108,92,231,0.06); border-color: rgba(108,92,231,0.15); }
.menu-btn.active { background: linear-gradient(135deg, rgba(15,157,88,0.12), rgba(108,92,231,0.12)); border-color: rgba(15,157,88,0.18); }
.main-column { padding: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.topbar {
  min-height: 92px; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px;
}
.eyebrow, .meta-label { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 700; }
h1 { margin: 6px 0 6px; font-size: 30px; line-height: 1.05; }
.lead { margin: 0; color: var(--muted); max-width: 900px; }
.btn { border: 0; border-radius: 16px; padding: 14px 18px; font: inherit; font-weight: 700; cursor: pointer; }
.btn-primary { background: linear-gradient(135deg, var(--accent), #16c172); color: #fff; box-shadow: 0 10px 22px rgba(15,157,88,0.24); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr); gap: 18px; }
.stage, .comments { padding: 22px; }
.stage-head, .comments-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.stage-head h2, .comments-head h2 { margin: 4px 0 0; font-size: 22px; }
.badge { padding: 10px 12px; border-radius: 999px; background: rgba(255,138,0,0.12); color: #9a5b00; font-weight: 700; font-size: 13px; }
.stage-layout { display: grid; grid-template-columns: 390px minmax(0,1fr); gap: 24px; align-items: start; }
.phone-zone { position: sticky; top: 18px; display:flex; justify-content:center; }
.device-shadow { position:absolute; inset:auto auto 10px auto; width: 290px; height: 600px; border-radius: 56px; background: radial-gradient(circle, rgba(108,92,231,0.28), rgba(15,157,88,0.12), transparent 72%); filter: blur(24px); }
.iphone16 {
  position: relative; width: 286px; height: 610px; border-radius: 46px; padding: 14px; background: linear-gradient(145deg, #1e293b, #0f172a 55%, #344256);
  box-shadow: 0 30px 80px rgba(15,23,42,0.28), inset 0 0 0 1px rgba(255,255,255,0.08);
}
.dynamic-island { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 118px; height: 34px; background: #000; border-radius: 999px; z-index: 2; }
.screen {
  position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 34px; background: linear-gradient(180deg, #f7fafc, #edf3ff);
}
.canvas-area { min-height: 610px; display: grid; gap: 16px; align-content: start; }
.comment-block + .comment-block { margin-top: 18px; }
.comment-block h3 { margin: 0 0 8px; font-size: 16px; }
.comment-block p { margin: 0; color: var(--muted); line-height: 1.62; }
.phone-ui, .canvas-card, .insight-list, .heat-grid, .risk-stack, .logos-grid { animation: fadeUp .45s ease; }
.phone-ui { padding: 18px; display: grid; gap: 14px; height: 100%; }
.appbar { display:flex; justify-content:space-between; align-items:center; }
.appbar .mini { font-size: 12px; color: var(--muted); }
.hero-card, .tile, .cta-card, .canvas-card {
  background: rgba(255,255,255,0.88); border: 1px solid rgba(15,23,42,0.07); border-radius: 22px; box-shadow: 0 10px 24px rgba(15,23,42,0.06);
}
.hero-card { padding: 18px; }
.hero-card h3 { margin: 0 0 8px; font-size: 22px; }
.hero-card p, .tile p, .canvas-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.tile-grid { display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { padding: 14px; }
.tile strong { display:block; margin-bottom: 6px; }
.cta-card { padding: 16px; display:flex; align-items:center; justify-content:space-between; gap: 12px; }
.cta-button { border:0; background: linear-gradient(135deg, #12b76a, #0f9d58); color:#fff; padding:10px 14px; border-radius: 12px; font-weight:700; }
.canvas-card { padding: 18px; }
.canvas-card h3 { margin: 0 0 10px; font-size: 18px; }
.insight-list, .risk-stack, .logos-grid { display:grid; gap: 12px; }
.insight-item, .risk-item, .logo-item { background:#fff; border:1px solid var(--line); border-radius: 18px; padding: 14px 16px; }
.insight-item strong, .risk-item strong, .logo-item strong { display:block; margin-bottom: 6px; }
.kpi-strip { display:grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.kpi { background:#fff; border:1px solid var(--line); border-radius: 18px; padding: 14px; }
.kpi span { display:block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.kpi strong { font-size: 18px; }
.heat-grid { display:grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.heat-cell { border-radius: 18px; padding: 16px; color:#fff; min-height: 120px; display:flex; flex-direction:column; justify-content:flex-end; }
.heat-a { background: linear-gradient(135deg,#0f9d58,#34d399); }
.heat-b { background: linear-gradient(135deg,#6c5ce7,#9b8cff); }
.heat-c { background: linear-gradient(135deg,#ff8a00,#ffb84d); }
@keyframes fadeUp { from { opacity:0; transform: translateY(10px);} to { opacity:1; transform: translateY(0);} }
@media (max-width: 1180px) {
  .content-grid, .stage-layout, .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .phone-zone { position: relative; top: 0; }
}
@media (max-width: 760px) {
  .main-column { padding: 12px; }
  .topbar, .stage, .comments { padding: 16px; border-radius: 22px; }
  h1 { font-size: 24px; }
  .topbar { flex-direction: column; align-items: stretch; }
  .kpi-strip, .heat-grid, .tile-grid { grid-template-columns: 1fr; }
}
