/* NorthCore Labs Desk. Light, warm and alive: the roadmap's mint and white, neon green as the accent, Core on every page.
   System fonts only (no external requests). */
:root {
  color-scheme: light;
  --bg: #f4faf7; --bg2: #eaf6f0; --card: #ffffff; --mint: #eefaf4; --mint2: #d9f4e7;
  --ink: #0f1f18; --ink2: #2b3a33; --mute: #5d6d65; --faint: #8a948f; --line: #e2ebe6; --line2: #cfe0d7;
  --g: #0CC481; --g2: #10E896; --gd: #087A50; --gdd: #05553a;
  --warn: #b7791f; --warn-bg: #fff6e5; --bad: #c53030; --bad-bg: #fdecec; --info: #1c6fa8;
  --shadow: 0 1px 2px rgba(15, 31, 24, .06), 0 8px 24px rgba(15, 31, 24, .06);
  --shadow-lg: 0 2px 6px rgba(15, 31, 24, .06), 0 18px 48px rgba(8, 122, 80, .12);
  --r: 18px; --r-sm: 12px;
  --font: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', sans-serif;
  --display: 'Poppins', 'Segoe UI Semibold', 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font: 15.5px/1.55 var(--font); }
body { background: radial-gradient(900px 480px at 100% -10%, rgba(12, 196, 129, .14), transparent 60%), radial-gradient(700px 400px at -10% 110%, rgba(12, 196, 129, .08), transparent 60%), var(--bg); background-attachment: fixed; }
a { color: var(--gd); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; line-height: 1.15; margin: 0 0 8px; }
h1 { font-size: 32px; font-weight: 800; } h2 { font-size: 21px; font-weight: 700; } h3 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 10px; }
.mute { color: var(--mute); } .faint { color: var(--faint); } .small { font-size: 13.5px; } .tiny { font-size: 12px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gd); }
:focus-visible { outline: 3px solid rgba(12, 196, 129, .55); outline-offset: 2px; border-radius: 6px; }

/* shell */
#app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: rgba(255, 255, 255, .78); backdrop-filter: blur(10px); border-right: 1px solid var(--line); padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 16px; }
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand b { display: block; font-family: var(--display); font-size: 15px; }
.brand span { font-size: 11px; color: var(--mute); letter-spacing: .14em; text-transform: uppercase; }
.switcher { width: 100%; background: var(--card); color: var(--ink); border: 1px solid var(--line2); border-radius: var(--r-sm); padding: 9px 10px; font: inherit; margin-bottom: 12px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav h4 { margin: 16px 10px 6px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; color: var(--ink2); font-weight: 600; }
.nav a:hover { background: var(--mint); text-decoration: none; }
.nav a.on { background: var(--mint2); color: var(--gdd); }
.nav a .badge { margin-left: auto; background: var(--g); color: #fff; font-size: 11px; font-weight: 800; border-radius: 99px; padding: 1px 8px; }
.side .grow { flex: 1; }
.me { margin-top: 18px; padding: 12px; border: 1px solid var(--line); background: var(--card); border-radius: var(--r-sm); font-size: 13px; }
.me b { display: block; } .me .btn { margin-top: 8px; width: 100%; }
.side-core { display: flex; align-items: flex-end; gap: 8px; padding: 6px 8px 0; }
.side-core img { width: 54px; animation: bob 4s ease-in-out infinite; }
.side-core .say { background: var(--card); border: 1.5px solid var(--g); border-radius: 14px 14px 14px 4px; padding: 7px 10px; font-size: 12.5px; font-weight: 600; color: var(--ink2); }
main { padding: 30px 40px 90px; max-width: 1180px; width: 100%; }
.viewing { background: var(--warn-bg); border: 1px solid #f1d7a6; color: #7a5413; border-radius: var(--r-sm); padding: 9px 14px; margin-bottom: 18px; font-size: 13.5px; }

/* primitives */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .row.between { justify-content: space-between; } .grow { flex: 1; }
.grid { display: grid; gap: 16px; } .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack > * + * { margin-top: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; background: var(--card); color: var(--ink); border: 1px solid var(--line2); border-radius: 99px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; }
.btn:hover { border-color: var(--g); text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.primary { background: var(--g); color: #fff; border-color: var(--g); }
.btn.primary:hover { background: var(--gd); border-color: var(--gd); }
.btn.ghost { background: transparent; border-color: transparent; } .btn.ghost:hover { background: var(--mint); box-shadow: none; }
.btn.danger { color: var(--bad); border-color: #f0c4c4; } .btn.sm { padding: 5px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--mint); color: var(--gdd); white-space: nowrap; }
.pill.warn { background: var(--warn-bg); color: #8a5a10; } .pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.info { background: #e8f2fa; color: var(--info); } .pill.neutral, .pill.plain { background: #f0f3f1; color: var(--mute); } .pill.ok { background: var(--mint2); color: var(--gdd); }
input, select, textarea { width: 100%; background: #fff; color: var(--ink); border: 1px solid var(--line2); border-radius: var(--r-sm); padding: 10px 12px; font: inherit; }
input:focus, select:focus, textarea:focus { border-color: var(--g); outline: none; box-shadow: 0 0 0 3px rgba(12, 196, 129, .18); }
textarea { min-height: 90px; resize: vertical; }
label { display: block; font-size: 13px; color: var(--mute); margin-bottom: 5px; font-weight: 600; }
.field { margin-bottom: 14px; }
.help { font-size: 12.5px; color: var(--faint); margin-top: 4px; }
.bar { height: 10px; background: var(--mint); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--g), var(--g2)); border-radius: 99px; transition: width .5s ease; }
.empty { padding: 30px; text-align: center; color: var(--mute); border: 2px dashed var(--line2); border-radius: var(--r); background: rgba(255, 255, 255, .6); }
.empty img { width: 92px; display: block; margin: 0 auto 10px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--faint); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.tablewrap { overflow-x: auto; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* this week */
.hero { position: relative; overflow: hidden; background: linear-gradient(135deg, #ffffff 0%, var(--mint) 55%, var(--mint2) 100%); border: 1px solid var(--line); border-radius: 26px; padding: 30px 34px; display: grid; grid-template-columns: 1fr 260px; gap: 20px; align-items: center; box-shadow: var(--shadow-lg); margin-bottom: 20px; }
.hero h1 { font-size: 38px; margin: 6px 0 6px; }
.hero .dates { font-weight: 700; color: var(--ink2); }
.hero .story { font-size: 16.5px; color: var(--ink2); max-width: 600px; margin-top: 12px; }
.hero .art { justify-self: end; }
.hero .art img { width: 240px; max-width: 100%; filter: drop-shadow(0 18px 26px rgba(8, 122, 80, .2)); animation: bob 5s ease-in-out infinite; }
.weekdots { display: flex; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.weekdots i { width: 26px; height: 8px; border-radius: 99px; background: var(--line2); }
.weekdots i.past { background: var(--g); } .weekdots i.current { background: var(--gd); width: 44px; }
.goals h2 { display: flex; align-items: center; gap: 10px; }
.goals h2 img { width: 34px; }
.goal { display: flex; gap: 12px; align-items: flex-start; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.goal:last-child { border-bottom: 0; }
.goal .tick { flex: none; width: 26px; height: 26px; border-radius: 9px; border: 2px solid var(--line2); background: #fff; display: grid; place-items: center; cursor: pointer; transition: all .15s ease; padding: 0; }
.goal .tick:hover { border-color: var(--g); }
.goal .tick.on { background: var(--g); border-color: var(--g); }
.goal .tick.on::after { content: ''; width: 7px; height: 12px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-1px, -1px); }
.goal .tick:disabled { cursor: default; opacity: .9; }
.goal.done .text { color: var(--faint); text-decoration: line-through; }
.goal .text { font-weight: 600; color: var(--ink2); }
.goal .who { font-size: 12px; color: var(--faint); }
.allclear { display: flex; gap: 14px; align-items: center; background: var(--mint); border-radius: var(--r-sm); padding: 12px 14px; margin-top: 8px; }
.allclear img { width: 54px; animation: bounce 1.6s ease-in-out infinite; }
.next { display: flex; gap: 16px; align-items: center; }
.next img { width: 86px; }

/* the plan */
.plan { position: relative; padding-left: 8px; }
.chapter { display: grid; grid-template-columns: 120px 1fr; gap: 22px; margin-bottom: 18px; }
.chapter .face { width: 110px; height: 110px; border-radius: 50%; background: var(--mint); border: 4px solid #fff; box-shadow: 0 0 0 2px var(--g), var(--shadow); display: grid; place-items: center; overflow: hidden; }
.chapter .face img { width: 92px; }
.chapter.current .face { box-shadow: 0 0 0 3px var(--gd), 0 0 0 9px rgba(12, 196, 129, .18), var(--shadow-lg); }
.chapter.past .face { filter: saturate(.75); }
.wk { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; margin-top: 8px; background: #fff; }
.wk.current { border-color: var(--g); box-shadow: 0 0 0 3px rgba(12, 196, 129, .14); }
.wk.past { background: #fbfdfc; }
.wk summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wk summary::-webkit-details-marker { display: none; }
.wk ul { margin: 10px 0 4px; padding-left: 20px; } .wk li { margin: 3px 0; }
.wk li.done { color: var(--faint); text-decoration: line-through; }

/* documents */
.folders { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.folders button { border: 1px solid var(--line2); background: #fff; border-radius: 99px; padding: 7px 14px; font: inherit; font-weight: 600; color: var(--ink2); cursor: pointer; }
.folders button.on { background: var(--gd); border-color: var(--gd); color: #fff; }
.drop { border: 2px dashed var(--line2); border-radius: var(--r); background: rgba(255, 255, 255, .8); padding: 22px; display: flex; gap: 18px; align-items: center; transition: all .15s ease; }
.drop.over { border-color: var(--g); background: var(--mint); }
.drop img { width: 74px; }
.doc { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.doc:last-child { border-bottom: 0; }
.doc .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--mint); color: var(--gd); display: grid; place-items: center; font-weight: 800; font-size: 11px; letter-spacing: .04em; }
.doc .name { font-weight: 700; color: var(--ink); word-break: break-word; }

/* record */
.fact { display: grid; grid-template-columns: 200px 1fr auto; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); align-items: start; }
.fact:last-child { border-bottom: 0; }
.fact .k { color: var(--mute); font-weight: 600; font-size: 14px; }
.fact .v { white-space: pre-wrap; }
.note { padding: 12px 0; border-bottom: 1px solid var(--line); }
.note:last-child { border-bottom: 0; }
.note .meta { font-size: 12px; color: var(--faint); margin-bottom: 3px; }
.note.internal { background: var(--warn-bg); border-radius: 10px; padding: 10px 12px; border: 0; margin-bottom: 6px; }

/* welcome */
.welcome { position: fixed; inset: 0; z-index: 60; background: radial-gradient(800px 500px at 70% 20%, rgba(12, 196, 129, .22), transparent 60%), linear-gradient(180deg, #eefaf4, #ffffff 70%); overflow-y: auto; display: grid; place-items: center; padding: 30px 20px; }
.welcome .inner { width: min(980px, 100%); display: grid; grid-template-columns: 1.1fr .9fr; gap: 30px; align-items: center; }
.welcome h1 { font-size: 46px; }
.welcome h1 span { color: var(--g); }
.welcome .lede { font-size: 18px; color: var(--ink2); }
.welcome .core { position: relative; text-align: center; }
.welcome .core img { width: 340px; max-width: 100%; animation: bob 4.5s ease-in-out infinite; filter: drop-shadow(0 22px 30px rgba(8, 122, 80, .25)); }
.welcome .bubble { position: absolute; z-index: 2; left: -30px; top: -18px; max-width: 220px; background: #fff; border: 2px solid var(--g); border-radius: 20px 20px 20px 6px; padding: 12px 16px; font-weight: 700; font-family: var(--display); text-align: left; box-shadow: var(--shadow); }
.promise { display: flex; gap: 12px; align-items: flex-start; background: rgba(255, 255, 255, .85); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; margin-top: 10px; }
.promise b { display: block; color: var(--gdd); font-family: var(--display); }
.promise .dot { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--g); color: #fff; display: grid; place-items: center; font-weight: 800; }

/* portfolio */
.prac { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.prac:last-child { border-bottom: 0; }
.prac img { width: 52px; }

/* modals, toasts */
.modal-back { position: fixed; inset: 0; background: rgba(15, 31, 24, .35); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 70; padding: 20px; }
.modal { background: #fff; border-radius: 22px; padding: 22px 24px; width: min(580px, 100%); max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg); }
.modal.wide { width: min(860px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; } .modal-head h2 { margin: 0; }
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 90; }
.toast { background: #fff; border: 1px solid var(--g); color: var(--ink); border-radius: 14px; padding: 11px 16px; max-width: 380px; box-shadow: var(--shadow-lg); font-weight: 600; animation: rise .25s ease; }
.toast.err { border-color: var(--bad); color: var(--bad); }

/* markdown (SOPs) */
.md h2, .md h3, .md h4 { margin: 20px 0 8px; } .md ul, .md ol { padding-left: 22px; margin: 0 0 12px; } .md li { margin: 3px 0; }
.md li.task { list-style: none; margin-left: -22px; display: flex; gap: 9px; align-items: flex-start; }
.md .box { width: 16px; height: 16px; border: 2px solid var(--g); border-radius: 4px; margin-top: 4px; flex: none; }
.md code { background: var(--mint); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.md pre { background: #f6f8f7; border: 1px solid var(--line); padding: 12px; border-radius: var(--r-sm); overflow-x: auto; }
.md blockquote { margin: 0 0 12px; padding: 8px 14px; border-left: 3px solid var(--g); background: var(--mint); color: var(--ink2); border-radius: 0 10px 10px 0; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* login (local demo only; production signs in at the NorthCore login page) */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login { width: min(980px, calc(100vw - 48px)); display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.login .hero-l { text-align: center; } .login .hero-l img { width: 170px; animation: bob 4.5s ease-in-out infinite; }
.demo-user { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; padding: 10px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--ink); font: inherit; cursor: pointer; margin-bottom: 7px; }
.demo-user:hover { border-color: var(--g); background: var(--mint); }

/* the older build modules keep working on the light theme */
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; }
.tile b { display: block; font-size: 24px; } .tile span { font-size: 12px; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; }
.tile.hot { border-color: #f1d7a6; } .tile.good { border-color: var(--mint2); }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; color: var(--mute); padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--gdd); border-color: var(--g); }
.phone { background: #f3f6f5; border: 1px solid var(--line); border-radius: 22px; padding: 14px 12px; width: 300px; max-width: 100%; }
.phone .who { text-align: center; font-size: 12px; color: var(--mute); margin-bottom: 8px; }
.bubble { background: var(--mint2); color: var(--ink); border-radius: 16px 16px 16px 4px; padding: 9px 12px; font-size: 14px; white-space: pre-wrap; word-wrap: break-word; }
.step { display: grid; grid-template-columns: 320px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.lint div { font-size: 13px; padding: 5px 9px; border-radius: 8px; margin-top: 4px; }
.lint .error { background: var(--bad-bg); color: var(--bad); } .lint .warn { background: var(--warn-bg); color: #8a5a10; }
.meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--mute); margin: 6px 0; }
.meta input { width: 70px; padding: 3px 6px; }
.cmt { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
td input[type=number] { width: 92px; padding: 5px 8px; }
.warn-t { color: var(--warn); }

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes bounce { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-4deg); } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 900px) {
  #app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: column; }
  .side-core { display: none; }
  main { padding: 18px 16px 70px; }
  .hero, .welcome .inner, .g2, .g3, .login, .step { grid-template-columns: 1fr; }
  .hero .art { justify-self: center; } .hero .art img { width: 170px; }
  .hero h1, .welcome h1 { font-size: 30px; }
  .chapter { grid-template-columns: 64px 1fr; gap: 12px; } .chapter .face { width: 60px; height: 60px; } .chapter .face img { width: 50px; }
  .fact { grid-template-columns: 1fr; gap: 2px; }
}

/* home: the menu after sign-in */
.ws { display: flex; flex-direction: column; margin-bottom: 0; }
.ws-top { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.ws-top img { width: 64px; animation: bob 5s ease-in-out infinite; }
.ws .row { margin-top: auto !important; padding-top: 12px; }
.ws .tile b { font-size: 20px; }
.ws-mini { display: flex; gap: 12px; align-items: center; color: var(--ink); margin-bottom: 0; }
.ws-mini:hover { text-decoration: none; border-color: var(--g); transform: translateY(-1px); }
.ws-mini img { width: 52px; }
