/* Legate Labs homepage — shadcn/ui look without the framework (2026-10-22).
   Tokens follow shadcn's default "zinc" theme (background/foreground/muted/
   border/ring, radius 0.75rem) and component recipes (Card, Badge, Button,
   Accordion, Table), with one blue accent reserved for calls to action.
   Geist + Geist Mono self-hosted (OFL). No JavaScript, no external requests.
   Emissary's pages keep /styles.css. */

@font-face { font-family: "Geist"; font-weight: 400; font-display: swap; src: url("/fonts/geist-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-weight: 500; font-display: swap; src: url("/fonts/geist-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-weight: 600; font-display: swap; src: url("/fonts/geist-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-weight: 500; font-display: swap; src: url("/fonts/geist-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --background: #ffffff;
  --foreground: #09090b;
  --card: #ffffff;
  --muted: #f4f4f5;
  --muted-foreground: #71717a;
  --border: #e4e4e7;
  --primary: #18181b;
  --primary-foreground: #fafafa;
  --accent: #2563eb;
  --accent-foreground: #ffffff;
  --accent-soft: #eff6ff;
  --ok: #15803d;
  --ok-soft: #f0fdf4;
  --ok-border: #bbf7d0;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --warn-border: #fde68a;
  --ring: #a1a1aa;
  --radius: 0.75rem;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-lg: 0 1px 3px 0 rgb(0 0 0 / 0.06), 0 20px 48px -16px rgb(0 0 0 / 0.18);
  --grid-line: rgb(9 9 11 / 0.045);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #09090b;
    --foreground: #fafafa;
    --card: #0c0c0f;
    --muted: #18181b;
    --muted-foreground: #a1a1aa;
    --border: #27272a;
    --primary: #fafafa;
    --primary-foreground: #18181b;
    --accent: #3b82f6;
    --accent-foreground: #ffffff;
    --accent-soft: #172036;
    --ok: #4ade80;
    --ok-soft: #052e16;
    --ok-border: #14532d;
    --warn: #fbbf24;
    --warn-soft: #2a1d05;
    --warn-border: #713f12;
    --ring: #52525b;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.4);
    --shadow-lg: 0 1px 3px 0 rgb(0 0 0 / 0.5), 0 24px 56px -16px rgb(0 0 0 / 0.7);
    --grid-line: rgb(250 250 250 / 0.04);
  }
}

*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
h1, h2, h3 { margin: 0; color: var(--foreground); font-weight: 600; line-height: 1.15; }
h1 { font-size: clamp(2.25rem, 5.6vw, 3.75rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.25rem); letter-spacing: -0.025em; }
h3 { font-size: 1rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

a { color: inherit; text-decoration-color: var(--ring); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
@media (min-width: 640px) { .container { padding: 0 32px; } }

.skip { position: absolute; left: -9999px; top: 0; background: var(--card); padding: 8px 16px; border: 1px solid var(--border); border-radius: 8px; }
.skip:focus { left: 16px; top: 16px; z-index: 50; }

/* Header: sticky, translucent, hairline border (shadcn site header) */
.site-header {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--background) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--primary); color: var(--primary-foreground); display: grid; place-items: center; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) { color: var(--muted-foreground); text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 8px; transition: color 150ms, background-color 150ms; }
.nav a:not(.btn):hover { color: var(--foreground); background: var(--muted); }
.nav .btn { margin-left: 8px; }

/* Buttons (shadcn Button: default / outline / accent) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 8px; border: 1px solid transparent;
  font: 500 14px/1 "Geist", ui-sans-serif, system-ui, sans-serif; text-decoration: none; white-space: nowrap;
  background: var(--primary); color: var(--primary-foreground); box-shadow: var(--shadow-sm);
  cursor: pointer; transition: opacity 150ms, background-color 150ms, border-color 150ms;
}
.btn:hover { opacity: 0.9; }
.btn-lg { height: 44px; padding: 0 22px; font-size: 15px; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-accent { background: var(--accent); color: var(--accent-foreground); }
.btn-outline { background: var(--background); color: var(--foreground); border-color: var(--border); }
.btn-outline:hover { opacity: 1; background: var(--muted); }

/* Badges (shadcn Badge) */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); border-radius: 999px;
  padding: 2px 10px; font-size: 12px; font-weight: 500; line-height: 1.6; white-space: nowrap;
  background: var(--background); color: var(--foreground);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-border); }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-border); }

/* Hero with a faint grid fading out */
.hero { position: relative; isolation: isolate; padding: 88px 0 72px; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 40%, transparent 100%);
}
.hero-copy { max-width: 760px; margin: 0 auto; text-align: center; }
.hero .hero-copy > .badge { margin-bottom: 24px; }
.hero h1 { margin-bottom: 20px; }
.lead { font-size: 18px; color: var(--muted-foreground); max-width: 620px; margin: 0 auto 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.fineprint { margin: 16px 0 0; font-size: 13px; color: var(--muted-foreground); }

/* Card (shadcn Card) */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-header { padding: 20px 24px 0; }
.card-title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.card-description { font-size: 14px; color: var(--muted-foreground); margin: 4px 0 0; }

/* Sample table (shadcn Table inside a Card) */
.sample { max-width: 880px; margin: 56px auto 0; box-shadow: var(--shadow-lg); overflow: hidden; }
.sample .card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { height: 40px; padding: 0 16px; text-align: left; font-weight: 500; color: var(--muted-foreground); white-space: nowrap; }
td { padding: 12px 16px; border-top: 1px solid var(--border); white-space: nowrap; }
tbody tr { transition: background-color 150ms; }
tbody tr:hover { background: color-mix(in srgb, var(--muted) 60%, transparent); }
.num { text-align: right; } td.num { font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; font-variant-numeric: tabular-nums; }
.mono { font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--muted-foreground); }
.sample-foot { padding: 14px 24px; border-top: 1px solid var(--border); background: var(--muted); font-size: 13px; color: var(--muted-foreground); }
.sample-foot strong { color: var(--foreground); font-weight: 600; }
.sample-foot .stat { display: inline-flex; gap: 6px; align-items: baseline; margin-right: 16px; }

/* Sections */
.section { padding: 96px 0 0; }
.section-head { max-width: 640px; margin: 0 0 40px; }
.eyebrow { display: block; margin-bottom: 12px; font-size: 13px; font-weight: 500; color: var(--accent); }
.section-head h2 { margin-bottom: 12px; }
.section-head p { color: var(--muted-foreground); font-size: 17px; margin: 0; }

/* Bento grid */
.bento { display: grid; gap: 16px; }
@media (min-width: 820px) { .bento { grid-template-columns: repeat(3, 1fr); } .bento .wide { grid-column: span 2; } }
.feature { padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.feature .icon { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); display: grid; place-items: center; color: var(--foreground); background: var(--muted); margin-bottom: 8px; }
.feature p { margin: 0; color: var(--muted-foreground); font-size: 15px; }
.lenders { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; padding: 24px; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 16px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--muted);
  font: 500 13px/1 "Geist Mono", ui-monospace, monospace; color: var(--foreground);
}
.steps h3 { margin-bottom: 6px; }
.steps p { margin: 0; color: var(--muted-foreground); font-size: 15px; }

.promise { margin-top: 16px; display: grid; }
@media (min-width: 820px) { .promise { grid-template-columns: repeat(3, 1fr); } }
.promise > div { padding: 20px 24px; display: flex; gap: 12px; align-items: flex-start; }
@media (min-width: 820px) { .promise > div + div { border-left: 1px solid var(--border); } }
@media (max-width: 819px) { .promise > div + div { border-top: 1px solid var(--border); } }
.promise svg { flex: none; color: var(--ok); margin-top: 2px; }
.promise p { margin: 0; font-size: 14px; color: var(--muted-foreground); }
.promise strong { display: block; color: var(--foreground); font-weight: 500; font-size: 15px; margin-bottom: 2px; }

/* Accordion (shadcn Accordion, type=single collapsible via <details name>) */
.accordion { border-top: 1px solid var(--border); }
.accordion details { border-bottom: 1px solid var(--border); }
.accordion summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 0; font-weight: 500; font-size: 15px; min-height: 44px;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary:hover { text-decoration: underline; text-underline-offset: 4px; }
.accordion summary svg { flex: none; color: var(--muted-foreground); transition: transform 200ms ease; }
.accordion details[open] summary svg { transform: rotate(180deg); }
.accordion details p { margin: 0 0 18px; color: var(--muted-foreground); font-size: 15px; max-width: 62ch; }

/* CTA */
.cta { margin-top: 96px; padding: 56px 32px; text-align: center; position: relative; overflow: hidden; isolation: isolate; }
.cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 80% at 50% 0%, var(--accent-soft), transparent 70%);
}
.cta h2 { margin-bottom: 12px; }
.cta p { color: var(--muted-foreground); max-width: 40em; margin: 0 auto 24px; }

.also { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; }
.also p { margin: 0; color: var(--muted-foreground); font-size: 14px; max-width: 64ch; }
.also strong { color: var(--foreground); font-weight: 500; }

.site-footer { margin-top: 72px; border-top: 1px solid var(--border); padding: 24px 0 32px; font-size: 13px; color: var(--muted-foreground); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--muted-foreground); text-decoration: none; }
.site-footer a:hover { color: var(--foreground); }

/* Small screens */
@media (max-width: 640px) {
  .nav a:not(.btn) { display: none; }
  .hero { padding: 56px 0 48px; }
  .sample { margin-top: 40px; }
  th, td { padding-left: 8px; padding-right: 8px; }
  th:nth-child(2), td:nth-child(2) { padding-left: 14px; white-space: normal; }
  th:last-child, td:last-child { padding-right: 14px; }
  .col-date, .col-job { display: none; }
  .sample .card-header { flex-direction: column; gap: 8px; }
  .section { padding-top: 72px; }
  .cta { padding: 40px 20px; margin-top: 72px; }
}

/* Sample report page */
.report-hero { padding: 72px 0 48px; }
.report-hero h1 { font-size: clamp(2rem, 4.6vw, 3rem); }
.kpis { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 8px; }
.kpi { padding: 20px 22px; }
.kpi .kpi-label { font-size: 13px; color: var(--muted-foreground); }
.kpi .kpi-value { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.kpi .kpi-note { font-size: 13px; color: var(--muted-foreground); }
.report-card { overflow: hidden; }
.report-card + .report-card { margin-top: 16px; }
.report-card .card-header { padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.reason { color: var(--muted-foreground); font-size: 14px; white-space: normal; min-width: 260px; }
.report-note { margin-top: 16px; font-size: 13px; color: var(--muted-foreground); }
.kpis.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 819px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpis.kpis-3 { grid-template-columns: 1fr; } }
