/* ============================================================================
   Novasyne theme for Part B — "lots of blue", modern, flat.
   HARD RULE: no gradients anywhere. Solid fills only.
   Brand values are CSS variables — drop in exact Novasyne hex codes here.
   ========================================================================== */
:root {
  /* Blues (dark -> light) */
  --ns-navy-900: #08192f; /* deepest navy — hero/footer/nav base */
  --ns-navy-800: #0c2444;
  --ns-navy-700: #123257;
  --ns-primary: #17405c;   /* brand navy — ALL buttons + active states + links */
  --ns-primary-600: #123448;
  --ns-primary-700: #0e2838;
  --ns-accent: #86a9c4;    /* light steel — labels/eyebrows on dark bg (NOT a button) */
  --ns-accent-700: #5f86a6;
  --ns-sky: #eaf1f8;       /* pale steel tint for chips/wells */

  /* Neutrals */
  --ns-ink: #0f2033;
  --ns-muted: #5b6b7d;
  --ns-bg: #f4f8fd;        /* app background (subtle blue tint) */
  --ns-card: #ffffff;
  --ns-border: #dfe8f5;

  --ns-radius: 14px;
  --ns-radius-sm: 10px;
  --ns-shadow: 0 10px 30px rgba(8, 25, 47, 0.08);
  --ns-shadow-lg: 0 20px 50px rgba(8, 25, 47, 0.14);
  --ns-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  font-family: var(--ns-font);
  color: var(--ns-ink);
  background: var(--ns-bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Sticky footer: <main> grows to fill the viewport so the footer always sits at
   the bottom (flush on short pages, below the fold on long ones). It is itself a
   flex column so short-content pages (e.g. auth) can flex-fill and center. */
.ns-main { flex: 1 0 auto; display: flex; flex-direction: column; }

h1, h2, h3, h4, h5, .navbar-brand { font-weight: 700; letter-spacing: -0.01em; }
a { color: var(--ns-primary); }
a:hover { color: var(--ns-primary-700); }

/* ---- Navbar ---- */
.ns-navbar {
  background: var(--ns-navy-900);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}
.ns-navbar .navbar-brand { color: #fff; display: flex; align-items: center; gap: 0.55rem; }
.ns-navbar .nav-link { color: rgba(255, 255, 255, 0.78); font-weight: 500; }
.ns-navbar .nav-link:hover, .ns-navbar .nav-link.active { color: #fff; }
.brand-dot {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--ns-accent);           /* solid, no gradient */
  display: inline-block;
}

/* ---- Hero (solid navy) ---- */
.ns-hero {
  background: var(--ns-navy-900);
  color: #eaf2fb;
  padding: 6rem 0 5.5rem;
}
.ns-hero h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); line-height: 1.08; }
.ns-hero .lead { color: rgba(234, 242, 251, 0.82); font-size: 1.18rem; max-width: 40rem; }
.ns-eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem;
  font-weight: 600; color: var(--ns-accent);
}

/* ---- Buttons: single brand navy, rectangular, solid ---- */
.btn { border-radius: 3px; font-weight: 600; padding: 0.6rem 1.4rem; }
.btn-primary, .btn-accent { background: var(--ns-primary); border: 1px solid var(--ns-primary); color: #fff; }
.btn-primary:hover, .btn-accent:hover { background: var(--ns-primary-700); border-color: var(--ns-primary-700); color: #fff; }
.btn-outline-light { border-radius: 3px; }

/* ---- Cards ---- */
.ns-card {
  background: var(--ns-card);
  border: 1px solid var(--ns-border);
  border-radius: var(--ns-radius);
  box-shadow: var(--ns-shadow);
}
.feature-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center; font-size: 1.35rem; color: #fff;
  background: var(--ns-primary);          /* solid, no gradient */
}

/* ---- Auth card ---- */
.auth-wrap { flex: 1 0 auto; display: grid; place-items: center; padding: 3rem 1rem; }
.auth-card { width: 100%; max-width: 440px; padding: 2.25rem; }
/* Register card is wider so the consent panel's agreement text reads comfortably. */
.auth-card.auth-card-wide { max-width: 600px; }
.auth-card .form-control { padding: 0.7rem 0.9rem; border-radius: var(--ns-radius-sm); }
.auth-card .form-control:focus {
  border-color: var(--ns-primary);
  box-shadow: 0 0 0 0.2rem rgba(23, 64, 92, 0.18);
}

/* ---- Consent / disclaimer panel (registration) ---- */
.consent-panel {
  background: var(--ns-sky);
  border: 1px solid var(--ns-border);
  border-radius: var(--ns-radius-sm);
  padding: 1rem 1.1rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ns-ink);
}
.consent-panel h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.5rem; }
.consent-panel p { margin-bottom: 0.5rem; }
.consent-panel ul { margin: 0; padding-left: 1.1rem; }
.consent-panel li { margin-bottom: 0.4rem; }
.consent-panel li:last-child { margin-bottom: 0; }
.auth-card .form-check-label { font-size: 0.85rem; line-height: 1.45; }

/* ---- Footer ---- */
.ns-footer {
  background: var(--ns-navy-900); color: rgba(255, 255, 255, 0.66);
  padding: 2rem 0; font-size: 0.92rem;
  flex-shrink: 0;
}
.ns-footer a { color: rgba(255, 255, 255, 0.82); text-decoration: none; }
.ns-footer a:hover { color: #fff; }

.text-accent { color: var(--ns-accent) !important; }
.bg-sky { background: var(--ns-sky) !important; }

/* ===== Brand + nav extras ===== */
.brand-sub { color: var(--ns-accent); font-weight: 600; }
.hero-fineprint { color: rgba(234,242,251,0.6); font-size: 0.9rem; }
.wallet-pill {
  display: inline-block; background: var(--ns-navy-700); color: #eaf2fb;
  border: 1px solid rgba(255,255,255,0.14); border-radius: 3px;
  padding: 0.3rem 0.8rem; font-weight: 700; text-decoration: none; font-size: 0.9rem;
}
.wallet-pill:hover { color: #fff; background: var(--ns-navy-800); }

/* ===== Hero mini before/after ===== */
.mini-ba .mini-label { text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.72rem; font-weight: 700; margin-bottom: 2px; }
.mini-ba p { margin-bottom: 1rem; color: var(--ns-ink); }

/* ===== Section heads ===== */
.section-head h2 { font-size: 1.9rem; }
.section-head p { font-size: 1.05rem; }

/* ===== Demo band + example cards ===== */
.demo-band { background: #eaf1fa; border-top: 1px solid var(--ns-border); border-bottom: 1px solid var(--ns-border); }
.example-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem; }
.example-card {
  flex: 1 1 240px; max-width: 300px;
  text-align: left; background: var(--ns-card); border: 1px solid var(--ns-border);
  border-radius: var(--ns-radius-sm); padding: 1rem; cursor: pointer; transition: all .12s ease;
}
.example-card:hover { border-color: var(--ns-primary); box-shadow: var(--ns-shadow); transform: translateY(-2px); }
.example-card.active { border-color: var(--ns-primary); box-shadow: 0 0 0 2px rgba(23,64,92,0.2); }
.example-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.example-title { font-weight: 700; margin-bottom: 0.25rem; }
.example-snippet { color: var(--ns-muted); font-size: 0.86rem; line-height: 1.4; }
.use-badge { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ns-muted);
  border: 1px solid var(--ns-border); border-radius: 6px; padding: 1px 6px; }

/* emotion chip (dot + label) */
.emo-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 600; text-transform: capitalize; }
.emo-chip .dot, .leg .dot, .brain-cap .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* ===== Result panel ===== */
.result-panel { padding: 1.5rem; margin-top: 1rem; }
.result-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.result-badge { font-weight: 700; font-size: 0.8rem; padding: 0.25rem 0.7rem; border-radius: 3px; }
.result-badge.ok { background: #d8f3ec; color: #0b6b52; }
.result-badge.partial { background: var(--ns-sky); color: var(--ns-primary-700); }
.result-meta { color: var(--ns-muted); font-size: 0.85rem; }
.result-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 1.5rem; }
@media (max-width: 860px) { .result-grid { grid-template-columns: 1fr; } }

.ba-block { margin-bottom: 1rem; }
.ba-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700;
  color: var(--ns-muted); margin-bottom: 0.35rem; display: flex; align-items: center; gap: 0.5rem; }
.ba-text { border-radius: var(--ns-radius-sm); padding: 0.8rem 0.9rem; margin: 0; line-height: 1.5; }
.ba-text.before { background: #fbf0ee; border: 1px solid #f3d9d3; }
.ba-text.after { background: #eaf5ef; border: 1px solid #cfe9db; }
.copy-btn { border: 1px solid var(--ns-border); background: #fff; border-radius: 3px; font-size: 0.72rem;
  padding: 1px 8px; cursor: pointer; color: var(--ns-primary); }
.copy-btn:hover { background: var(--ns-sky); }

.table-scroll { overflow-x: auto; }
.scores-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.scores-table th, .scores-table td { padding: 0.5rem 0.6rem; text-align: left; border-bottom: 1px solid var(--ns-border); }
.scores-table thead th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ns-muted); }
.scores-table tbody th { font-weight: 600; color: var(--ns-ink); }
.delta-good { color: #0b6b52; font-weight: 700; }
.delta-bad { color: #b3341f; font-weight: 700; }
.delta-flat { color: var(--ns-muted); }

/* ===== Brain widget ===== */
.brain-col { display: flex; flex-direction: column; }
.brain-tabs { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.5rem; }
.brain-tab, .brain-expand {
  border: 1px solid var(--ns-border); background: #fff; border-radius: 3px; padding: 0.25rem 0.8rem;
  font-size: 0.8rem; font-weight: 600; cursor: pointer; color: var(--ns-muted);
}
.brain-tab.active { background: var(--ns-primary); border-color: var(--ns-primary); color: #fff; }
.brain-expand { color: var(--ns-primary); }
.brain-expand:hover { background: var(--ns-sky); }
.brain-stage { display: flex; justify-content: center; }
.brain-svg { max-width: 320px; width: 100%; height: auto; }
.brain-dot { transition: r .2s ease; }
.brain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; width: 100%; }
.brain-cell { text-align: center; }
.brain-cell .brain-svg { max-width: 110px; }
.brain-cap { font-size: 0.72rem; color: var(--ns-muted); text-transform: capitalize; margin-top: -4px; }
.brain-legend { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 0.5rem; justify-content: center; }
.brain-legend .leg { display: inline-flex; align-items: center; gap: 5px; font-size: 0.78rem; color: var(--ns-muted); text-transform: capitalize; }
.brain-domcap { text-align: center; font-size: 0.9rem; margin-bottom: 0.25rem; text-transform: capitalize; }
.brain-note { font-size: 0.75rem; color: var(--ns-muted); margin-top: 0.75rem; text-align: center; }

/* ===== Research band ===== */
.research-band { background: var(--ns-navy-800); color: #eaf2fb; padding: 3rem 0; }
.research-band h3 { color: #fff; }
.research-band p { color: rgba(234,242,251,0.82); }
.research-link { color: var(--ns-accent); font-weight: 600; }
.research-cite { font-size: 0.85rem; color: rgba(234,242,251,0.6); }

/* ===== Workspace ===== */
.balance-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ns-muted); }
.balance-amount { font-size: 1.4rem; font-weight: 700; color: var(--ns-primary); }
.balance-amount-lg { font-size: 2.4rem; font-weight: 700; color: var(--ns-primary); margin-bottom: 0.5rem; }
.word-count { font-size: 0.85rem; color: var(--ns-muted); font-variant-numeric: tabular-nums; }
.word-count.over { color: #b3341f; font-weight: 700; }
.analyze-hint { font-size: 0.8rem; color: var(--ns-muted); }
#analyze-text { border-radius: var(--ns-radius-sm); }
#analyze-text:focus { border-color: var(--ns-primary); box-shadow: 0 0 0 0.2rem rgba(23,64,92,0.18); }

/* ===== History ===== */
.history-list { display: grid; gap: 0.6rem; }
.history-item { text-align: left; background: #fff; border: 1px solid var(--ns-border); border-radius: var(--ns-radius-sm);
  padding: 0.9rem 1rem; cursor: pointer; transition: all .12s ease; }
.history-item:hover { border-color: var(--ns-primary); box-shadow: var(--ns-shadow); }
.history-item.active { border-color: var(--ns-primary); box-shadow: 0 0 0 2px rgba(23,64,92,0.2); }
.history-emos { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.3rem; }
.hi-arrow { color: var(--ns-muted); }
.history-snippet { color: var(--ns-ink); font-size: 0.9rem; }
.history-meta { color: var(--ns-muted); font-size: 0.78rem; margin-top: 0.25rem; }

/* ===== Account ===== */
.topup-options { display: flex; gap: 0.5rem; }
.topup-option { flex: 1; }
.topup-option input { position: absolute; opacity: 0; }
.topup-option span { display: block; text-align: center; border: 1px solid var(--ns-border); border-radius: var(--ns-radius-sm);
  padding: 0.6rem; font-weight: 700; cursor: pointer; }
.topup-option input:checked + span { border-color: var(--ns-primary); background: var(--ns-sky); color: var(--ns-primary-700); }
.ledger-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.ledger-table th, .ledger-table td { padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--ns-border); text-align: left; }
.ledger-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.ledger-table .pos { color: #0b6b52; }
.ledger-table .neg { color: #b3341f; }
.kind { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 1px 6px; border-radius: 6px; }
.kind-grant { background: var(--ns-sky); color: var(--ns-primary-700); }
.kind-topup { background: #d8f3ec; color: #0b6b52; }
.kind-query { background: #f1f4f8; color: var(--ns-muted); }
.invoice-list { list-style: none; padding: 0; margin: 0; }
.invoice-list li { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid var(--ns-border); font-size: 0.88rem; }
.inv-num { font-weight: 700; }
.inv-amt { color: var(--ns-primary); font-weight: 700; }
.inv-date, .inv-status { color: var(--ns-muted); font-size: 0.8rem; }

/* ===== Landing redesign ===== */
.hero-textlink { color: #eaf2fb; font-weight: 600; text-decoration: none; }
.hero-textlink:hover { color: var(--ns-accent); }

/* hero brain showpiece */
.hero-brain-wrap { display: flex; flex-direction: column; align-items: center; }
.hero-brain { width: 100%; max-width: 380px; }
.hero-brain-svg { width: 100%; height: auto; }
.hero-brain-cap { color: rgba(234,242,251,0.6); font-size: 0.82rem; margin-top: 0.5rem;
  text-transform: uppercase; letter-spacing: 0.1em; text-align: center; }
.hero-brain-svg .brain-dot { animation: dotpulse 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes dotpulse { 0%,100% { opacity: 0.9; } 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .hero-brain-svg .brain-dot { animation: none; } }

/* capability strip */
.cap-strip { background: #fff; border-bottom: 1px solid var(--ns-border); padding: 2.75rem 0; }
.cap-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.cap-k { font-weight: 700; font-size: 1.05rem; color: var(--ns-ink); margin-bottom: 0.35rem; }
.cap p { color: var(--ns-muted); font-size: 0.9rem; margin: 0; line-height: 1.5; }
@media (max-width: 820px) { .cap-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; } }

/* demo band padding */
.demo-band { padding: 4rem 0; }

/* how it works */
#how { padding: 4rem 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.step-n { font-size: 2rem; font-weight: 800; color: var(--ns-primary); line-height: 1;
  padding-bottom: 0.5rem; margin-bottom: 0.5rem; border-bottom: 3px solid var(--ns-primary); display: inline-block; }
.step h5 { font-size: 1.15rem; margin-bottom: 0.4rem; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; gap: 1.75rem; } }

/* use cases (no icons) */
.usecases-band { background: #eef3fa; border-top: 1px solid var(--ns-border);
  border-bottom: 1px solid var(--ns-border); padding: 4rem 0; }
.usecase { padding: 1.75rem; }
.uc-kicker { text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.72rem; font-weight: 700;
  color: var(--ns-primary); margin-bottom: 0.75rem; }

/* ===== Brain image (result panel) ===== */
.brain-imgwrap { display: flex; justify-content: center; padding: 0.25rem 0; }
.brain-img { max-width: 340px; width: 100%; height: auto; }
#brain-legend { display: block; text-align: center; margin-top: 0.5rem; }
.legwrap { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; margin-top: 0.35rem; }

/* ===== Logo (nav) + hero image ===== */
.ns-navbar { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.brand-logo { height: 56px; width: auto; display: block; }
.ns-navbar .navbar-brand { gap: 0.8rem; font-size: 1.55rem; }
.brand-sub { font-size: 1.45rem; }
.hero-logo { width: 100%; max-width: 460px; height: auto; display: block; margin: 0 auto; }
.usecase h5 { font-size: 1.2rem; margin-bottom: 0.5rem; }

/* research band lead */
.research-lead { font-size: 1.25rem; font-weight: 500; line-height: 1.5; color: #eaf2fb !important; }
