/* Investrology Workspace - premium fintech theme */
:root {
  --ink: #101C19; --bg: #F4F5F2; --card: #FFFFFF; --line: #E4E7E0;
  --teal: #0F6A5F; --teal-d: #0A4A43; --mint: #E3F0ED;
  --amber: #C9761B; --amber-soft: #FBF1E3; --grey: #6E7873;
  --serif: Georgia, 'Times New Roman', serif;
  --r: 20px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, 'Segoe UI', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; }
.muted { color: var(--grey); font-size: 13.5px; }
.cta { display: inline-block; background: var(--teal); color: #fff; border: none; border-radius: 14px; padding: 14px 28px; font-size: 15.5px; font-weight: 700; cursor: pointer; font-family: inherit; }
.cta:hover { background: var(--teal-d); }
.btn-ghost { background: none; border: 1px solid var(--line); border-radius: 12px; padding: 12px 22px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink); font-family: inherit; }

/* ---------- landing ---------- */
.land { max-width: 1080px; margin: 0 auto; padding: 0 22px 60px; }
.land-hero { margin: 0 -22px; padding: 84px 30px 64px; text-align: center;
  background: radial-gradient(900px 340px at 50% -80px, rgba(15,106,95,.5), transparent 65%), linear-gradient(160deg, #0C2420, #0F6A5F 80%);
  color: #EDF5F2; border-radius: 0 0 34px 34px; }
.land-kick { font-size: 12px; letter-spacing: .4em; font-weight: 700; color: #9FD4C9; }
.land-hero h1 { font-family: var(--serif); font-size: clamp(30px, 5.4vw, 52px); line-height: 1.12; margin: 16px auto 14px; max-width: 720px; color: #fff; font-weight: 700; }
.land-sub { font-size: 16px; line-height: 1.6; color: #C4DAD4; max-width: 620px; margin: 0 auto 28px; }
.land-hero .cta { background: #F2B05E; color: #241A0C; font-size: 16px; padding: 16px 34px; }
.land-hero .cta:hover { background: #E8A24A; }
.land-note { margin-top: 18px; font-size: 12px; color: #8FB3AB; }
.land-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 36px; }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; box-shadow: 0 1px 3px rgba(16,28,25,.05); }
.feat-i { font-size: 26px; }
.feat-t { font-size: 16px; font-weight: 700; margin: 10px 0 6px; }
.feat-d { font-size: 13.5px; color: var(--grey); line-height: 1.55; }

/* ---------- workspace shell ---------- */
.ws { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: #0C2420; color: #D5E5E0; padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.side-logo { display: flex; gap: 10px; align-items: center; padding: 4px 8px 18px; }
.side-mark { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, #F2B05E, #C9761B); color: #241A0C; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.side-logo b { display: block; font-size: 15px; color: #fff; }
.side-logo .muted { font-size: 11px; color: #8FB3AB; }
.side-link { text-align: left; background: none; border: none; color: #B9CFC9; font-size: 14.5px; font-weight: 600; padding: 12px 14px; border-radius: 12px; cursor: pointer; font-family: inherit; }
.side-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-link.on { background: #F2B05E; color: #241A0C; }
.side-foot { margin-top: auto; font-size: 11px; color: #6E938C; white-space: pre-line; padding: 8px; }
.main { padding: 26px 30px 60px; max-width: 1080px; width: 100%; }
.page { display: none; }
.page.on { display: block; }
section.page h2 { font-family: var(--serif); font-size: 28px; margin-bottom: 6px; }
.sec-t { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--grey); margin: 26px 0 10px; }

/* dashboard */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 18px; }
.statc { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.statc-v { font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--teal); }
.statc-l { font-size: 11.5px; color: var(--grey); margin-top: 4px; }
.qa { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.qa-btn { background: var(--mint); color: var(--teal-d); border: 1px solid #CFE3DE; border-radius: 999px; padding: 11px 20px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; }
.qa-btn:hover { background: #D3E8E2; }
.clist { display: flex; flex-direction: column; gap: 8px; }
.crow { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; cursor: pointer; text-align: left; font-family: inherit; transition: box-shadow .15s; }
.crow:hover { box-shadow: 0 4px 16px rgba(16,28,25,.08); }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.crow-mid { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 14.5px; }
.crow-mid .muted { font-size: 12.5px; }
.badge { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 4px 12px; }
.badge.ok { background: #E4F2E7; color: #2E6B3E; }
.badge.warn { background: var(--amber-soft); color: var(--amber); }
.badge.new { background: #E8ECFB; color: #3B4EA0; }

/* builder */
.bsec { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; margin-top: 16px; }
.bsec-t { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); margin-bottom: 14px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 9px 18px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; color: var(--ink); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.goal-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gcard { background: var(--bg); border: 2px solid transparent; border-radius: 16px; padding: 16px 14px; cursor: pointer; text-align: left; font-family: inherit; }
.gcard.on { border-color: var(--teal); background: var(--mint); }
.gcard-i { font-size: 22px; }
.gcard-t { font-size: 14.5px; font-weight: 700; margin-top: 6px; color: var(--ink); }
.gcard-h { font-size: 11.5px; color: var(--grey); margin-top: 3px; }
.qgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field span { font-size: 11.5px; font-weight: 600; color: var(--grey); }
.field input { font-size: 15px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-family: inherit; }
.field input:focus { outline: none; box-shadow: 0 0 0 3px rgba(15,106,95,.15); border-color: var(--teal); }

/* plan output */
.plan-hero { margin-top: 20px; background: linear-gradient(135deg, #0C2420, #0F6A5F); border-radius: 24px; padding: 30px; color: #EDF5F2; }
.ph-kick { font-size: 11px; letter-spacing: .28em; color: #9FD4C9; font-weight: 700; }
.ph-big { display: flex; align-items: baseline; gap: 10px; margin: 10px 0 4px; }
.ph-num { font-family: var(--serif); font-size: clamp(38px, 7vw, 56px); font-weight: 700; color: #F2B05E; }
.ph-per { font-size: 15px; color: #C4DAD4; }
.ph-sub { font-size: 14px; color: #C4DAD4; max-width: 560px; line-height: 1.55; margin: 6px 0 0; }
.plan-viz { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; margin-top: 16px; }
.viz { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.plan-viz .viz:first-child { grid-row: span 2; }
.viz-t { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--grey); margin-bottom: 12px; }
.viz svg { width: 100%; height: auto; display: block; }
.legend, .alloc-leg { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; }
.alloc-leg { flex-direction: column; gap: 8px; }
.leg { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--grey); }
.leg i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.alloc-row { display: flex; gap: 18px; align-items: center; }
.alloc-row svg { width: 120px; flex-shrink: 0; }
.chart-legend { font-size: 11px; color: var(--grey); margin-top: 10px; line-height: 1.5; }
.gap-line { font-size: 14.5px; line-height: 1.55; margin: 0 0 10px; }
.gapbar { height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.gapbar-fill { height: 100%; background: var(--amber); border-radius: 999px; }
.sliders { margin-top: 14px; }
.slider { display: block; margin-top: 14px; }
.slider-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--grey); margin-bottom: 6px; }
.slider-top b { color: var(--ink); }
.slider input[type=range] { width: 100%; accent-color: var(--teal); height: 26px; }
.plan-actions { display: flex; gap: 14px; align-items: center; margin-top: 18px; flex-wrap: wrap; }

/* proposal sheet */
dialog.ovl { border: none; padding: 0; background: transparent; max-width: none; max-height: none; overflow: visible; }
dialog.ovl::backdrop { background: rgba(12,36,32,.55); }
.sheet { background: #fff; border-radius: 22px; padding: 34px; width: min(640px, 92vw); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--ink); padding-bottom: 14px; }
.sheet-brand { font-family: var(--serif); font-size: 22px; font-weight: 700; letter-spacing: .12em; }
.sheet-arn { font-size: 11px; color: var(--grey); }
.sheet-title { font-family: var(--serif); font-size: 26px; margin: 20px 0 4px; }
.sheet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-top: 18px; }
.sheet-cell { background: var(--bg); border-radius: 14px; padding: 14px; }
.sheet-cell-l { font-size: 11px; color: var(--grey); font-weight: 600; }
.sheet-cell-v { font-family: var(--serif); font-size: 19px; font-weight: 700; color: var(--teal); margin-top: 4px; }
.sheet-disc { font-size: 11px; color: var(--grey); line-height: 1.6; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.sheet-btns { display: flex; gap: 10px; margin-top: 18px; }

/* mobile */
@media (max-width: 820px) {
  .ws { display: block; min-height: 0; }
  .side { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 4px; padding: 10px 12px; overflow-x: auto; scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  .side-logo { padding: 0 10px 0 0; flex-shrink: 0; }
  .side-link { padding: 9px 14px; font-size: 13px; white-space: nowrap; flex-shrink: 0; }
  .side-foot { display: none; }
  .main { padding: 18px 16px 50px; }
  .plan-viz { grid-template-columns: 1fr; }
  .plan-viz .viz:first-child { grid-row: auto; }
}
@media print { .side, .plan-actions, .sheet-btns { display: none !important; } dialog.ovl { position: static; } .sheet { max-width: none; } }
