/* OSS Analytics: 249Startups look (249startups.com + output/brand-kit). Light is the default theme;
   [data-theme="dark"] is the night theme, using the brand kit's dark tokens (lifted plum/orange). */

:root, [data-theme="light"] {
  --page: #f6f5f8;
  --surface: #ffffff;
  --surface-2: #faf8fb;
  --ink: #161418;          /* headings */
  --body: #333333;         /* body copy, as on 249startups.com */
  --muted: #6e6b73;
  --faint: #76737c;        /* AA on white */
  --rule: #e6e3e9;
  --plum: #801f5b;         /* brand primary (logo) */
  --plum-btn: #801f5b;
  --plum-deep: #5e1543;
  --plum-tint: #f7eff4;
  --blue: #1a71a0;
  --blue-tint: #eaf2f7;
  --orange: #ef4a25;       /* accents only, never a button fill */
  --orange-text: #b8350f;
  --orange-tint: #fdf0ec;
  --grey-mark: #b9b9ba;
  --shadow: 0 1px 2px rgba(22, 20, 24, .04), 0 10px 30px rgba(22, 20, 24, .06);
  --nav-bg: rgba(255, 255, 255, .82);
  /* charts */
  --c-open: #801f5b;
  --c-completed: #1a71a0;
  --c-cancelled: #ef4a25;
  --c-awaiting: #b9b9ba;
  --c-notdel: #5e1543;
  --c-soft: #d7a6c4;
  --c-grid: rgba(22, 20, 24, .07);
  --c-tick: #6e6b73;
  --c-tip-bg: rgba(22, 20, 24, .92);
  color-scheme: light;
}

[data-theme="dark"] {
  --page: #141216;
  --surface: #1e1b21;
  --surface-2: #2a262e;
  --ink: #f4f2f6;
  --body: #d2ced8;
  --muted: #9e99a6;
  --faint: #9e99a6;
  --rule: #332f38;
  --plum: #d98bb8;         /* lifted for text and marks on dark */
  --plum-btn: #801f5b;     /* buttons keep the brand plum with white text */
  --plum-deep: #5e1543;
  --plum-tint: rgba(217, 139, 184, .14);
  --blue: #6fb6de;
  --blue-tint: rgba(111, 182, 222, .14);
  --orange: #ff8a63;
  --orange-text: #ff8a63;
  --orange-tint: rgba(255, 138, 99, .13);
  --grey-mark: #6e6b73;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
  --nav-bg: rgba(20, 18, 22, .82);
  --c-open: #d98bb8;
  --c-completed: #6fb6de;
  --c-cancelled: #ff8a63;
  --c-awaiting: #8a8590;
  --c-notdel: #b27aa0;
  --c-soft: #7a4a68;
  --c-grid: rgba(255, 255, 255, .07);
  --c-tick: #9e99a6;
  --c-tip-bg: rgba(42, 38, 46, .96);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--body);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}
h1, h2, h3, .display { font-family: Outfit, Inter, "Segoe UI", sans-serif; color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(32px, 4.6vw, 60px); line-height: 1.04; margin: 14px 0 16px; }
h2 { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.15; margin: 0 0 8px; }
h3 { font-size: 17px; line-height: 1.3; margin: 0; font-weight: 600; }
a { color: inherit; }
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.muted { color: var(--faint); font-size: 13px; }
.lead { font-size: 18px; color: var(--muted); max-width: 60ch; margin: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--plum); }
.eyebrow::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--plum); }

/* navigation */
.nav { position: sticky; top: 0; z-index: 20; background: var(--nav-bg); border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
.nav-in { max-width: 1240px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; white-space: nowrap; }
.brand img { height: 34px; width: auto; display: block; }
.brand .logo-dark { display: none; }
[data-theme="dark"] .brand .logo-light { display: none; }
[data-theme="dark"] .brand .logo-dark { display: block; }
.brand-product { padding-left: 12px; border-left: 1px solid var(--rule); font-family: Outfit, Inter, sans-serif; font-weight: 600;
  color: var(--ink); font-size: 15px; }
.nav nav { display: flex; gap: 2px; flex: 1; }
.nav nav a { text-decoration: none; color: var(--muted); padding: 7px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; }
.nav nav a:hover { color: var(--ink); background: var(--plum-tint); }
.nav nav a.on { color: var(--plum); background: var(--plum-tint); }
.live { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #2e9e6b; box-shadow: 0 0 0 4px rgba(46, 158, 107, .16); }
.dot.warn { background: var(--orange); box-shadow: 0 0 0 4px rgba(239, 74, 37, .16); }
.theme-toggle { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--rule);
  background: var(--surface); color: var(--ink); cursor: pointer; }
.theme-toggle:hover { border-color: var(--plum); color: var(--plum); }
.theme-toggle .ico { width: 18px; height: 18px; }
.theme-toggle .i-moon { display: block; } .theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }

main { max-width: 1240px; margin: 0 auto; padding: 0 20px 48px; }

/* buttons (as on 249startups.com: plum, 8px corners) */
.cta { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 8px; text-decoration: none;
  font-weight: 600; font-size: 14.5px; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--plum-btn); color: #fff; }
.btn-primary:hover { background: #6c1a4d; }
.btn-ghost { border: 1px solid rgba(255, 255, 255, .35); color: #fff; }
.btn-ghost:hover { border-color: #fff; }
.btn-outline { border: 1px solid var(--rule); color: var(--ink); background: var(--surface); }
.btn-outline:hover { border-color: var(--plum); color: var(--plum); }

/* hero: dark band like the website's photo hero, with a glass panel of live numbers */
.hero-band { margin: 0; padding: 0 20px; position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(900px 500px at 85% 10%, rgba(26, 113, 160, .55), transparent 60%),
              radial-gradient(800px 520px at 10% 100%, rgba(128, 31, 91, .75), transparent 60%),
              linear-gradient(135deg, #1d0a17 0%, #2b0e22 45%, #0c2233 100%); }
.hero-band::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px); background-size: 22px 22px; }
.hero { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1.05fr 1fr;
  gap: 40px; align-items: center; padding: 64px 0 70px; }
.hero h1 { color: #fff; }
.hero .eyebrow { color: #f0c3de; } .hero .eyebrow::before { background: #f0c3de; }
.hero .lead { color: rgba(255, 255, 255, .78); }
.hero-panel { padding: 20px; border-radius: 16px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.panel-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: rgba(255, 255, 255, .72); }
.pill { padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 12px; }
.mini-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 8px; }
.mini-kpis > div { padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); }
.mini-kpis small { display: block; color: rgba(255, 255, 255, .7); font-size: 12px; }
.mini-kpis strong { display: block; font-family: Outfit, Inter, sans-serif; font-size: 26px; line-height: 1.2; color: #fff; }
.mini-kpis em { font-style: normal; font-size: 11.5px; color: rgba(255, 255, 255, .6); }
.panel-foot { font-size: 12px; color: rgba(255, 255, 255, .6); margin-top: 6px; }

/* "in numbers" band, echoing the website's impact numbers */
.numbers { text-align: center; padding: 60px 0 26px; }
.numbers h2 { margin-bottom: 30px; }
.numbers-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.number strong { display: block; font-family: Outfit, Inter, sans-serif; font-weight: 700; font-size: clamp(38px, 4.4vw, 58px);
  line-height: 1.05; color: var(--ink); letter-spacing: -.02em; }
.number strong sup { font-size: .45em; color: var(--plum); margin-left: 2px; }
.number span { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; }

/* cards */
.card, .kpi, .badge, .feature, .defs, .closing, .callout {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; box-shadow: var(--shadow); }
.badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0 34px; }
.badge { display: flex; gap: 12px; align-items: center; padding: 14px 16px; }
.badge .ico { width: 24px; height: 24px; color: var(--plum); }
.badge strong { display: block; font-size: 14px; color: var(--ink); }
.badge span { font-size: 12.5px; color: var(--muted); }

.section-head { text-align: center; margin: 8px 0 22px; }
.section-head p { color: var(--muted); margin: 0; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 34px; }
.feature { padding: 24px; text-decoration: none; display: flex; flex-direction: column; gap: 10px;
  transition: transform .2s ease, border-color .2s ease; }
.feature:hover { transform: translateY(-3px); border-color: var(--plum); }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; flex: 1; }
.f-link { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; font-weight: 600; color: var(--plum); }
.chip { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; }
.chip .ico { width: 20px; height: 20px; }
.chip.plum { background: var(--plum-tint); color: var(--plum); }
.chip.blue { background: var(--blue-tint); color: var(--blue); }
.chip.orange { background: var(--orange-tint); color: var(--orange-text); }

.defs { padding: 26px; margin-bottom: 34px; }
.defs-head p { margin: 0 0 14px; color: var(--muted); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; }
th, td { padding: 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
td:first-child { color: var(--ink); font-weight: 500; }
td.num { font-family: Outfit, Inter, sans-serif; font-size: 16px; font-weight: 700; color: var(--ink); white-space: nowrap; }
tbody tr:hover { background: var(--surface-2); }
.tag { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 999px; font-weight: 600; vertical-align: 1px; }
.tag-orange { background: var(--orange-tint); color: var(--orange-text); }

.closing { display: flex; gap: 20px; align-items: center; justify-content: space-between; padding: 26px;
  background: linear-gradient(120deg, var(--plum-tint), var(--blue-tint)); }
.closing p { margin: 0; color: var(--muted); }

/* report pages */
.page-head { padding: 40px 0 22px; }
.page-head h1 { font-size: clamp(30px, 3.6vw, 44px); margin-bottom: 10px; }
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 16px; display: flex; flex-direction: column; gap: 3px; }
.kpi .chip { width: 36px; height: 36px; margin-bottom: 8px; }
.kpi small { color: var(--muted); font-size: 12.5px; }
.kpi strong { font-family: Outfit, Inter, sans-serif; font-size: 32px; line-height: 1.1; color: var(--ink); letter-spacing: -.02em; }
.kpi em { font-style: normal; font-size: 12px; color: var(--faint); }
.kpi b.ok { color: var(--blue); } .kpi b.bad { color: var(--orange-text); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.span-2 { grid-column: 1 / -1; }
.card { padding: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; gap: 10px; }
.chart-wrap { position: relative; height: 280px; }
.chart-tall { height: 340px; }
.chart-hero { height: 170px; }
.callout { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; margin-bottom: 18px;
  background: var(--orange-tint); border-color: transparent; box-shadow: none; }
.callout div { color: var(--body); font-size: 14.5px; }
.callout strong { color: var(--ink); }
.note { display: flex; gap: 10px; color: var(--muted); font-size: 14px; margin-top: 18px; }
.legend-groups { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.legend-groups i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.g-open { background: var(--c-open); } .g-completed { background: var(--c-completed); } .g-cancelled { background: var(--c-cancelled); }
.g-awaiting_payment { background: var(--c-awaiting); } .g-not_delivered { background: var(--c-notdel); }

.foot { border-top: 1px solid var(--rule); background: var(--surface); }
.foot-in { max-width: 1240px; margin: 0 auto; padding: 20px; display: flex; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; align-items: center; color: var(--faint); font-size: 12.5px; }
.foot img { height: 26px; width: auto; }
.foot .logo-dark { display: none; }
[data-theme="dark"] .foot .logo-light { display: none; }
[data-theme="dark"] .foot .logo-dark { display: inline; }

/* sign-out link and sign-in page */
.signout { font-size: 13px; color: var(--muted); text-decoration: none; padding: 7px 10px; border-radius: 8px; }
.signout:hover { color: var(--plum); background: var(--plum-tint); }
.login-page { min-height: 100vh; display: grid; place-items: center;
  background: radial-gradient(800px 500px at 90% 0%, var(--blue-tint), transparent 60%),
              radial-gradient(800px 500px at 0% 100%, var(--plum-tint), transparent 60%), var(--page); }
.login-wrap { width: 100%; padding: 24px 16px; display: grid; place-items: center; }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--rule); border-radius: 16px;
  box-shadow: var(--shadow); padding: 30px 28px; display: flex; flex-direction: column; gap: 10px; }
.login-card img { height: 40px; width: auto; align-self: flex-start; margin-bottom: 8px; }
.login-card .logo-dark { display: none; }
[data-theme="dark"] .login-card .logo-light { display: none; }
[data-theme="dark"] .login-card .logo-dark { display: block; }
.login-card h1 { font-size: 30px; margin: 2px 0 0; }
.login-card form { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.login-card input { font: inherit; font-weight: 400; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--rule);
  background: var(--surface-2); color: var(--ink); }
.login-card input:focus { outline: 2px solid var(--plum); outline-offset: 1px; border-color: transparent; }
.login-card .btn { justify-content: center; border: 0; cursor: pointer; margin-top: 4px; }
.login-error { margin: 4px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--orange-tint); color: var(--orange-text); font-size: 14px; }
.login-foot { font-size: 12.5px; color: var(--faint); margin: 8px 0 0; }

/* responsive */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .badges, .numbers-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .hero, .grid-2, .features { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 46px; }
  .nav-in { flex-wrap: wrap; gap: 10px; }
  .nav nav { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; }
  .nav nav::-webkit-scrollbar { display: none; }
  .closing { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .badges, .mini-kpis { grid-template-columns: 1fr; }
  .kpi strong { font-size: 26px; }
  .brand-product { display: none; }
  .live { font-size: 11.5px; }
  .nav nav a { padding: 6px 8px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
