/* nitely.net. The app's own tokens (src/styles/tokens.css): warm graphite, Geist, teal for an
   agent moving the work, amber for what waits on you. Dark first, light follows the system. */

@font-face {
  font-family: "Geist";
  src: url("assets/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("assets/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #121211;
  --surface: #1b1b1a;
  --line: #292927;
  --line-strong: #3a3a37;
  --fg: #ecebe6;
  --fg-2: #a7a69f;
  --fg-3: #7c7b75;
  --live: oklch(0.76 0.12 170);
  --attention: oklch(0.8 0.14 75);
  --vendor-claude: oklch(0.62 0.13 42);
  --vendor-codex: oklch(0.5 0.06 255);
  --vendor-cursor: oklch(0.42 0.01 260);
  --btn-bg: #ecebe6;
  --btn-fg: #141413;
  --shot-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.7);
  --glow: oklch(0.76 0.12 170 / 0.07);
  --font: "Geist", "Segoe UI Variable Text", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  --wrap: 1120px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f8f7f4;
    --surface: #ffffff;
    --line: #e3e1db;
    --line-strong: #d3d1ca;
    --fg: #1b1b19;
    --fg-2: #55544f;
    --fg-3: #8c8b85;
    --live: oklch(0.56 0.11 170);
    --attention: oklch(0.66 0.15 65);
    --btn-bg: #1b1b19;
    --btn-fg: #f8f7f4;
    --shot-shadow: 0 40px 100px -30px rgba(40, 35, 20, 0.28);
    --glow: oklch(0.56 0.11 170 / 0.06);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1100px 520px at 50% -120px, var(--glow), transparent 70%),
    var(--bg);
  color: var(--fg);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--fg); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--fg-2); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }

/* The mark: the app's own BrandMark (src/App.tsx), three stations on a line. */
.mark { display: block; flex: none; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; text-decoration: none; letter-spacing: -0.01em; }
.brand.small { font-size: 14px; color: var(--fg-2); }

.top {
  max-width: var(--wrap); margin: 0 auto; padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.top-links { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.top-links a:not(.btn) { color: var(--fg-2); text-decoration: none; }
.top-links a:not(.btn):hover { color: var(--fg); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 42px; padding: 0 18px; border-radius: 8px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 550; font-size: 15px; text-decoration: none;
  transition: transform 120ms cubic-bezier(0.2, 0.7, 0.2, 1), opacity 120ms;
}
.btn:hover { opacity: 0.9; }
.btn:active { transform: translateY(1px); }
.btn-quiet { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-quiet:hover { box-shadow: inset 0 0 0 1px var(--fg-3); opacity: 1; }
.btn-small { height: 34px; padding: 0 14px; font-size: 14px; }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--fg-2); outline-offset: 3px; }

main { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* Hero */
.hero { padding: 96px 0 56px; text-align: center; }
.eyebrow { font: 13px/1 var(--mono); color: var(--fg-3); letter-spacing: 0.02em; }
.hero h1 { margin-top: 20px; font-size: clamp(40px, 7vw, 76px); line-height: 1.02; letter-spacing: -0.04em; }
.lede { max-width: 640px; margin: 24px auto 0; font-size: 18px; color: var(--fg-2); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.fine { margin-top: 14px; font-size: 13px; color: var(--fg-3); }

/* The track: an issue's stations, with the dot of an agent moving it. It waits at "Needs you". */
.track {
  --n: 8;
  position: relative; list-style: none; padding: 0; margin: 72px auto 0; max-width: 820px;
  display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  font: 12px/1 var(--mono); color: var(--fg-3);
}
.track::before {
  content: ""; position: absolute; top: 5px; height: 1px; background: var(--line-strong);
  left: calc(100% / var(--n) / 2); right: calc(100% / var(--n) / 2);
}
.track li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.track li::before {
  content: ""; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line-strong);
}
.track li.you { color: var(--attention); }
.track li.you::before { box-shadow: inset 0 0 0 1.5px var(--attention); }
.track::after {
  content: ""; position: absolute; top: 0; width: 11px; height: 11px; border-radius: 50%;
  left: calc(100% / var(--n) / 2 - 5.5px);
  background: var(--live);
  box-shadow: 0 0 0 5px color-mix(in oklab, var(--live) 18%, transparent);
}
@media (prefers-reduced-motion: no-preference) {
  .track::after { animation: travel 9s cubic-bezier(0.45, 0, 0.25, 1) infinite; }
}
/* Station k's center is at (k + 0.5) / 8 of the track; "Needs you" is station 5, Done 7. */
@keyframes travel {
  0%, 6% { left: calc(0.5 * 100% / 8 - 5.5px); background: var(--live); }
  44% { left: calc(5.5 * 100% / 8 - 5.5px); background: var(--live); }
  48%, 66% { left: calc(5.5 * 100% / 8 - 5.5px); background: var(--attention);
    box-shadow: 0 0 0 6px color-mix(in oklab, var(--attention) 22%, transparent); }
  70% { left: calc(5.5 * 100% / 8 - 5.5px); background: var(--live); }
  92%, 100% { left: calc(7.5 * 100% / 8 - 5.5px); background: var(--fg-3); box-shadow: none; }
}

/* Screenshots: the real app on its sample data. */
.shot {
  margin: 0; border-radius: 14px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--line), var(--shot-shadow);
  background: var(--surface);
}
.shot-hero { margin: 0 -40px; }
/* The window keeps going below the fold: let it fade into the page instead of ending mid-row. */
.shot-hero img, .split .shot img {
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent);
  mask-image: linear-gradient(to bottom, #000 72%, transparent);
}
.shot-hero, .split .shot { box-shadow: 0 0 0 1px var(--line); background: transparent; }

/* A night */
.night { padding: 140px 0 40px; }
.night h2, .split h2, .closing h2 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.03em; }
.section-lede { margin-top: 14px; max-width: 560px; color: var(--fg-2); font-size: 17px; }
.timeline { list-style: none; padding: 0; margin: 56px 0 0; display: grid; gap: 0; }
.timeline li {
  display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px;
  padding: 26px 0; border-top: 1px solid var(--line);
}
.timeline time { font: 14px/1.6 var(--mono); color: var(--live); padding-top: 2px; }
.timeline li.morning time { color: var(--attention); }
.timeline h3 { font-size: 19px; }
.timeline p { margin-top: 6px; color: var(--fg-2); max-width: 660px; }

/* Inbox */
.split { padding: 120px 0 40px; display: grid; gap: 40px; }
.split-text { max-width: 620px; }
.split-text p { margin-top: 16px; color: var(--fg-2); font-size: 17px; }

/* Points */
.points {
  margin-top: 120px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.points > div { padding: 30px 28px 34px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.points h3 { font-size: 16px; }
.points p { margin-top: 8px; color: var(--fg-2); font-size: 15px; }

/* Vendors: the app's own agent tiles. */
.vendors { margin-top: 80px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 32px; color: var(--fg-3); font-size: 14px; }
.vendors ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 14px 28px; color: var(--fg); font-size: 16px; }
.vendors li { display: flex; align-items: center; gap: 10px; }
.tile { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; font: 600 11px/1 var(--mono); color: #fff; }
.tile.claude { background: var(--vendor-claude); }
.tile.codex { background: var(--vendor-codex); }
.tile.cursor { background: var(--vendor-cursor); }

/* Closing */
.closing { padding: 140px 0 120px; text-align: center; }
.closing > p:not(.fine) { max-width: 600px; margin: 18px auto 0; color: var(--fg-2); font-size: 17px; }

.foot {
  max-width: var(--wrap); margin: 0 auto; padding: 28px 24px 40px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  border-top: 1px solid var(--line); font-size: 14px;
}
.foot nav { display: flex; gap: 22px; }
.foot nav a { color: var(--fg-3); text-decoration: none; }
.foot nav a:hover { color: var(--fg); }

/* Entrance: the end state is the base style, so no-motion and print show everything. */
@media (prefers-reduced-motion: no-preference) {
  .hero > *, .shot-hero { animation: rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero h1 { animation-delay: 60ms; }
  .hero .lede { animation-delay: 120ms; }
  .hero .actions { animation-delay: 180ms; }
  .hero .fine { animation-delay: 220ms; }
  .hero .track { animation-delay: 280ms; }
  .shot-hero { animation-delay: 360ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } }
}

@media (max-width: 1200px) { .shot-hero { margin: 0; } }
@media (max-width: 860px) {
  .points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-links a:not(.btn) { display: none; }
}
@media (max-width: 720px) {
  .hero { padding-top: 56px; }
  .track { font-size: 0; margin-top: 52px; }
  .track li { gap: 0; }
  .timeline li { grid-template-columns: 1fr; gap: 6px; }
  .points { grid-template-columns: minmax(0, 1fr); }
  .night, .split { padding-top: 88px; }
  .closing { padding: 96px 0 88px; }
}

/* Home: the leaderboard teaser. */
.board-teaser {
  margin-top: 120px; padding: 36px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px;
}
.board-teaser h2 { font-size: clamp(24px, 3vw, 30px); letter-spacing: -0.02em; }
.board-teaser p { margin-top: 8px; max-width: 620px; color: var(--fg-2); }
.top-links a[aria-current="page"] { color: var(--fg); }

/* Leaderboard page: the app's board (src/leaderboard), for the web. */
.lb { padding-bottom: 40px; }
.lb-head { padding: 72px 0 0; max-width: 720px; }
.lb-head h1 { font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.035em; }
.lb-lede { margin-top: 16px; color: var(--fg-2); font-size: 17px; }

.lb-controls { margin-top: 44px; display: flex; flex-direction: column; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button {
  height: 32px; padding: 0 12px; border: 0; border-radius: 7px; cursor: pointer;
  background: transparent; color: var(--fg-2); font: 500 14px/1 var(--font);
  box-shadow: inset 0 0 0 1px var(--line);
}
.chips button:hover { color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-strong); }
.chips button[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-fg); box-shadow: none; }
.chips button:focus-visible { outline: 2px solid var(--fg-2); outline-offset: 2px; }
.chips[data-group="period"] button { font-family: var(--mono); font-size: 13px; }

.lb-status { margin-top: 28px; color: var(--fg-3); font: 13px/1.5 var(--mono); }

.lb-podium { margin-top: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lb-card { padding: 20px; border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 14px; }
.lb-card-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lb-card-head .who { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.lb-card-head .name { max-width: 100%; font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-card-head .rank { align-self: flex-start; }
.rank { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font: 600 12px/1 var(--mono); color: var(--fg-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.rank.first { color: var(--bg); background: var(--live); box-shadow: none; }
.avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; object-fit: cover; vertical-align: middle; background: var(--bg); color: var(--fg-2); box-shadow: inset 0 0 0 1px var(--line-strong); font-weight: 550; line-height: 1; letter-spacing: 0.02em; user-select: none; }
.lb-table td.name .avatar { margin-right: 8px; }
.lb-figure { display: flex; align-items: baseline; gap: 8px; }
.lb-figure .big { font-size: 40px; line-height: 1; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.lb-figure .unit { color: var(--fg-3); font-size: 13px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 32px; }
.bars i { flex: 1; background: var(--fg-3); border-radius: 1px; opacity: 0.7; }
/* The secondary stats: one quiet line, dot-separated, cut short rather than wrapped. */
.lb-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.lb-meta span + span::before { content: "\00B7"; margin: 0 7px; }
.lb-links { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: -4px; font-size: 12px; }
.lb-links a { text-decoration: none; color: var(--fg-3); }
.lb-links a:hover { color: var(--fg); }
.quiet { color: var(--fg-3); }
.crew { display: inline-flex; gap: 3px; }
.crew .tile { width: 20px; height: 20px; border-radius: 5px; font-size: 9px; }
.tile.other { background: #6b6a65; }

.lb-table-wrap { margin-top: 28px; overflow-x: auto; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); }
.lb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lb-table th { text-align: left; font-weight: 500; color: var(--fg-3); font-size: 13px; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.lb-table td { height: 48px; padding: 0 14px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.lb-table td .crew { display: flex; }
.lb-table tr:last-child td { border-bottom: 0; }
.lb-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.lb-table th.sorted, .lb-table td.sorted { color: var(--fg); }
.lb-table td.name { font-weight: 550; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }

.lb-empty { margin-top: 28px; padding: 48px 32px; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); text-align: center; }
.lb-empty h2 { font-size: 22px; }
.lb-empty p { margin: 12px auto 24px; max-width: 520px; color: var(--fg-2); }

.lb-how { margin-top: 96px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; padding-top: 32px; border-top: 1px solid var(--line); }
.lb-how h3 { font-size: 16px; }
.lb-how p { margin-top: 8px; color: var(--fg-2); font-size: 15px; }

@media (max-width: 860px) {
  .lb-podium, .lb-how { grid-template-columns: minmax(0, 1fr); }
}

/* A person's page, /u/<id> (NIT-632). Its parts start hidden and the script shows the ones it fills. */
.u [hidden] { display: none; }
.u-head { padding: 72px 0 0; display: flex; align-items: center; gap: 22px; min-width: 0; }
.u-head .avatar { width: 72px; height: 72px; font-size: 28px; }
.u-who { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.u-who h1 { font-size: clamp(32px, 5vw, 48px); letter-spacing: -0.035em; overflow-wrap: anywhere; }
.u-rank { color: var(--fg-2); font-size: 17px; font-variant-numeric: tabular-nums; }
.u .lb-controls { margin-top: 36px; }
.u-body { margin-top: 28px; padding: 28px; border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 28px; }
.u-figure .big { font-size: clamp(56px, 9vw, 88px); line-height: 1; }
.u-figure .unit { font-size: 16px; }
.u-stats { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 18px 24px; }
.u-stats dt { color: var(--fg-3); font-size: 13px; }
.u-stats dd { margin: 4px 0 0; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.u-records { padding-top: 22px; border-top: 1px solid var(--line); }
.u-records dd { font-size: 17px; font-weight: 500; }
.u-bars { height: 72px; }
.u-bars i.now { background: var(--live); opacity: 1; }
.u-caption { margin-top: 8px; color: var(--fg-3); font-size: 13px; }
.u-more { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--line); max-width: 640px; }
.u-more p { color: var(--fg-2); font-size: 15px; }
.u-actions { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 560px) {
  .u-head { padding-top: 48px; gap: 16px; align-items: flex-start; }
  .u-head .avatar { width: 56px; height: 56px; font-size: 22px; }
  .u-body { padding: 20px; }
}
