@font-face {
  font-family: "Nunito";
  src: url("/assets/nunito-variable-3bae3d88.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --font-sans: "Nunito", system-ui, -apple-system, sans-serif;
  --font-data: ui-monospace, SFMono-Regular, Consolas, monospace;
  --blue: #017fdb;
  --blue-strong: #006fbe;
  --blue-soft: #ecf7ff;
  --ink: #203348;
  --text: #384b60;
  --muted: #64748b;
  --surface: #ffffff;
  --canvas: #f6f9fc;
  --line: #dfe7ef;
  --line-soft: #edf1f5;
  --radius: 12px;
  --radius-control: 8px;
  --chart-series-1: #006fbe;
  --chart-series-2: #7761ad;
  --chart-series-3: #a56917;
  --chart-series-4: #237f83;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--canvas);
  font-synthesis: style;
}

* { box-sizing: border-box; }
body { margin: 0; line-height: 1.6; }
button, input, select, textarea { font: inherit; }
a { color: var(--blue-strong); text-underline-offset: 3px; }
a:hover { color: #004f8b; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
::selection { background: #cfebff; color: var(--ink); }

.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 30; padding: .65rem 1rem; background: var(--ink); color: white; }
.skip-link:focus { top: 1rem; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1440px; margin: auto; min-height: 80px; padding: 0 2rem; display: flex; align-items: center; gap: 1.75rem; }
.brand { display: inline-flex; align-items: baseline; gap: .65rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand-wordmark { font-size: 1.6rem; font-weight: 850; letter-spacing: -.055em; }
.brand-label { color: var(--muted); border-left: 1px solid var(--line); padding-left: .65rem; font-size: .9rem; font-weight: 600; }
.site-header nav { display: flex; align-self: stretch; align-items: stretch; gap: .1rem; flex: 1; min-width: 0; }
.nav-link { display: flex; align-items: center; position: relative; padding: .6rem .6rem; font-size: .875rem; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; }
.nav-link:hover { color: var(--blue-strong); background: #f8fbfe; }
.nav-link[aria-current="page"] { color: var(--blue-strong); }
.nav-link[aria-current="page"]::after { content: ""; position: absolute; bottom: 0; left: .6rem; right: .6rem; height: 3px; background: var(--blue); border-radius: 2px 2px 0 0; }
.site-header .nav-group { position: relative; margin: 0; }
.nav-group > summary { height: 100%; gap: .35rem; list-style: none; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group-active > summary { color: var(--blue-strong); }
.nav-menu { position: absolute; top: 100%; left: 0; z-index: 10; min-width: 180px; padding: .5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-control); box-shadow: 0 8px 24px #20334818; }
.nav-menu .nav-link { min-height: 44px; padding: .6rem .8rem; }
.header-actions { margin-left: auto; display: flex; align-items: center; flex-shrink: 0; }
.header-actions form { margin: 0; }
.text-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: .6rem .2rem; font-size: .875rem; font-weight: 600; }
.text-button:hover { color: var(--blue-strong); }

.page-shell { max-width: 1200px; margin: 0 auto; padding: 2.75rem 2rem 5rem; }
h1, h2, h3 { color: var(--ink); line-height: 1.25; font-weight: 750; }
h1 { margin: .35rem 0 1rem; font-size: clamp(1.85rem, 3vw, 2.25rem); letter-spacing: -.03em; overflow-wrap: anywhere; }
h2 { margin: 0 0 .8rem; font-size: 1.2rem; letter-spacing: -.015em; }
h3 { margin: 1rem 0 .5rem; font-size: 1.05rem; }
p { margin: 0 0 1rem; }
.eyebrow, .section-kicker { margin: 0; color: var(--blue-strong); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; line-height: 1.5; }
.eyebrow a { text-decoration: none; }
.lede { max-width: 72ch; font-size: 1.025rem; color: var(--muted); line-height: 1.65; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.75rem; }
.page-heading h1 { margin-bottom: 0; }
.page-heading .lede { margin: .65rem 0 0; }
.page-heading > .button { flex-shrink: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .7rem; min-height: 44px; color: white; background: var(--blue-strong); border: 1px solid var(--blue-strong); padding: .65rem 1.1rem; border-radius: var(--radius-control); font-weight: 700; line-height: 1.4; text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s; }
.button:hover { background: #005996; border-color: #005996; color: white; }
.button-secondary { color: var(--blue-strong); border-color: #b9d9f0; background: var(--surface); }
.button-secondary:hover { background: var(--blue-soft); color: var(--blue-strong); border-color: #86bbe3; }
.button-small { min-height: 36px; padding: .4rem .8rem; font-size: .85rem; }
.actions { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; margin: 1.5rem 0; }
.text-link { font-size: .85rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1.25rem; }
.panel, .auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.page-shell > .panel + .panel { margin-top: 1.25rem; }
.page-shell > .dashboard-grid { margin-top: 1.25rem; }
.section-tabs { display: flex; gap: .5rem; border-bottom: 1px solid var(--line); margin: -1rem 0 2rem; overflow-x: auto; }
.section-tabs .nav-link { min-height: 48px; padding: .6rem 1rem; }
.form-panel { max-width: 900px; }
.form-section { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; padding: 1.5rem 0 0; min-width: 0; }
.form-section legend { color: var(--ink); font-weight: 750; padding-right: .75rem; }
.json-input, .checksum { font-family: var(--font-data); font-size: .85rem; overflow-wrap: anywhere; }
pre { font-family: var(--font-data); font-size: .8rem; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--canvas); padding: 1rem; border-radius: 8px; max-width: 100%; }
details { margin: 1rem 0; }
summary { cursor: pointer; color: var(--blue-strong); font-size: .85rem; font-weight: 700; }
.comparison-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 1.25rem; }
.comparison-assignment { padding: 1rem 0; border-top: 1px solid var(--line-soft); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 2rem; margin: 1.5rem 0; font-size: .85rem; }
.search-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 1rem; }
.table-scroll { overflow-x: auto; max-width: 100%; }
.table-scroll table { min-width: 720px; }
.table-scroll td .text-link { display: block; }
.panel > :last-child { margin-bottom: 0; }
.agent-access-list { margin-top: 1.25rem; }
.credential-token { border-color: #86bbe3; background: #f7fbff; margin-bottom: 1.25rem; }
.credential-token textarea { min-height: 4.5rem; }
.agent-connection-note { margin-top: 1rem; }
.agent-connection-grid { margin-bottom: 1.25rem; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.section-heading h2 { margin-bottom: 0; }
.section-kicker { color: var(--muted); font-size: .65rem; margin-bottom: .35rem; }
.item-list { list-style: none; padding: 0; margin: 0; }
.item-list li { padding: 1rem 0; border-top: 1px solid var(--line-soft); overflow-wrap: anywhere; }
.item-list li:first-child { border-top: 0; }
.item-list li:last-child { padding-bottom: 0; }
.item-list a { font-weight: 700; text-decoration: none; line-height: 1.45; }
.item-list a:hover { text-decoration: underline; }
.item-list .muted { margin-top: .25rem; }
.item-list a + .badge { margin-left: .45rem; }
.list-row { display: flex; gap: 1rem; align-items: baseline; }
.list-copy { flex: 1; min-width: 0; }
.list-row > .badge { flex-shrink: 0; }
.muted { color: var(--muted); font-size: .875rem; }
.badge { display: inline-flex; align-items: center; padding: .15rem .6rem; border: 1px solid #e1e7ee; border-radius: 6px; background: #f1f4f8; color: #56657b; font-size: .72rem; line-height: 1.6; font-weight: 750; letter-spacing: .01em; vertical-align: middle; }
.badge-info { background: var(--blue-soft); border-color: #d4eafd; color: #0065ad; }
.badge-positive { background: #edf7f3; border-color: #d4eae0; color: #28654f; }
.badge-warning { background: #fff7e8; border-color: #f4e5c5; color: #825916; }
.badge-negative { background: #fdf0f1; border-color: #f3dce0; color: #a04453; }
.empty { margin: .5rem 0; color: var(--muted); font-size: .9rem; }
.empty:empty { display: none; }
.empty-state { padding: 1.25rem 0 .35rem; }
.empty-state h3 { margin: 0 0 .45rem; font-size: .98rem; }
.empty-state p { margin-bottom: .75rem; color: var(--muted); font-size: .9rem; max-width: 42ch; }
.dashboard-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.25rem; }
.workspace-note { display: flex; align-items: center; gap: .6rem; margin: 1.5rem 0 0; color: var(--muted); font-size: .8rem; }
.workspace-note::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); flex-shrink: 0; }

.field { margin: 0 0 1.2rem; }
.field label { display: block; color: var(--ink); font-size: .9rem; font-weight: 750; margin-bottom: .4rem; }
.field input:not([type=checkbox]), .field textarea, .field select { display: block; width: 100%; max-width: 760px; padding: .7rem .8rem; border: 1px solid #bccbda; border-radius: var(--radius-control); background: var(--surface); color: var(--ink); line-height: 1.5; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: #879fb8; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--blue); outline: 3px solid #d6edff; outline-offset: 0; }
.field textarea { min-height: 8rem; resize: vertical; }
.field .hint { display: block; color: var(--muted); font-size: .8rem; margin-top: .3rem; }
.field-checkbox label { display: inline; }
.field input[type=checkbox] { accent-color: var(--blue-strong); width: 16px; height: 16px; }
.page-shell > form { max-width: 880px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 1.75rem; }
.form-errors, .flash { padding: .9rem 1rem; border: 1px solid #d2e8dd; border-radius: var(--radius-control); margin-bottom: 1.5rem; background: #edf7f2; color: #28654f; }
.form-errors, .flash-alert { border-color: #f0d4d9; background: #fdf0f1; color: #93404f; }
.form-errors h2 { color: inherit; }
.detail-grid { display: grid; grid-template-columns: minmax(130px, 180px) minmax(0, 1fr); gap: .85rem 1.5rem; margin: 0; }
.detail-grid dt { color: var(--muted); font-size: .85rem; }
.detail-grid dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.detail-grid + h2 { margin-top: 1.75rem; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.75; }
code, .data-value { font-family: var(--font-data); font-size: .85em; }
table { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
th { font-size: .78rem; font-weight: 750; color: var(--muted); background: #f7f9fc; }
th, td { padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
caption { text-align: left; margin-bottom: .75rem; color: var(--muted); font-size: .85rem; }

.auth-card { max-width: 460px; margin: 3rem auto; padding: 2.25rem; box-shadow: 0 8px 30px #20334805; }
.auth-card h1 { margin: .5rem 0 .75rem; }
.auth-card > p:not(.eyebrow) { color: var(--muted); font-size: .95rem; }
.auth-card form { margin-top: 1.75rem; }
.auth-card .button { width: 100%; }
.auth-note { max-width: 460px; margin: -1.5rem auto 2rem; text-align: center; color: var(--muted); font-size: .8rem; }

.public-page { background: var(--surface); }
.public-page .page-shell { padding-top: 4.5rem; }
.home-hero { display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 4rem; padding: 1.5rem 0 4.5rem; }
.home-hero h1 { font-size: clamp(2.65rem, 4.5vw, 3.6rem); font-weight: 700; line-height: 1.14; letter-spacing: -.035em; margin: 1rem 0 1.4rem; }
.home-hero h1 span { display: block; color: var(--blue-strong); }
.home-hero .lede { max-width: 48ch; font-size: 1.1rem; }
.home-hero .actions { margin-top: 1.75rem; }
.home-caption { margin: -.45rem 0 0; color: var(--muted); font-size: .8rem; }
.research-map { background: #f7fbff; padding: 1.75rem; border: 1px solid #daeaf7; border-radius: 16px; }
.research-map h2 { margin: .7rem 0 1.5rem; font-size: 1.3rem; }
.workflow-list { list-style: none; margin: 0; padding: 0; }
.workflow-list li { display: flex; gap: 1rem; position: relative; padding-bottom: 1.3rem; }
.workflow-list li:last-child { padding-bottom: 0; }
.workflow-list li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 34px; bottom: 3px; width: 1px; background: #bddbf2; }
.workflow-number { flex-shrink: 0; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: white; border: 1px solid #bddbf2; color: var(--blue-strong); font-size: .7rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.workflow-list h3 { font-size: .95rem; margin: .15rem 0 .2rem; }
.workflow-list p { color: var(--muted); font-size: .82rem; line-height: 1.5; margin: 0; }
.principles-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); padding: 2.5rem 0; gap: 3rem; }
.principle-number { color: var(--blue-strong); font-size: .75rem; font-weight: 800; }
.principles-grid h2 { margin: .6rem 0 .7rem; font-size: 1.05rem; }
.principles-grid p { color: var(--muted); font-size: .9rem; margin: 0; }
.related-work { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.5rem 1.75rem; background: var(--canvas); border-radius: var(--radius); }
.related-work h2 { font-size: .95rem; margin: 0 0 .25rem; }
.related-work p { font-size: .85rem; color: var(--muted); margin: 0; }
.related-work-links { display: flex; gap: 1.75rem; }
.related-work-links a { font-weight: 750; text-decoration: none; }
.related-work-links a:hover { text-decoration: underline; }
.site-footer { max-width: 1200px; padding: 0 2rem 1.75rem; margin: 0 auto; color: var(--muted); font-size: .75rem; }

@media (max-width: 1150px) {
  .header-inner { flex-wrap: wrap; gap: 0 1.25rem; padding-top: .85rem; }
  .header-actions { min-height: 48px; }
  .site-header nav { flex-basis: 100%; order: 3; flex-wrap: wrap; }
  .nav-link { min-height: 48px; padding: .65rem .8rem; }
  .nav-link[aria-current="page"]::after { left: .8rem; right: .8rem; }
}

@media (max-width: 760px) {
  .header-inner { padding-left: 1.25rem; padding-right: 1.25rem; }
  .brand-wordmark { font-size: 1.4rem; }
  .brand-label { font-size: .8rem; }
  .page-shell { padding: 2rem 1.25rem 3.5rem; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; gap: 1rem; }
  .dashboard-grid, .home-hero, .principles-grid { grid-template-columns: 1fr; }
  .dashboard-grid { gap: 1rem; }
  .panel { padding: 1.25rem; }
  .detail-grid { grid-template-columns: 1fr; gap: .25rem; }
  .detail-grid dd { margin-bottom: .75rem; }
  .detail-grid dd:last-child { margin-bottom: 0; }
  .page-shell > form { padding: 1.25rem; }
  .auth-card { margin: 1.5rem auto 3rem; padding: 1.5rem; }
  .public-page .page-shell { padding-top: 2rem; }
  .home-hero { gap: 2.5rem; padding: 1rem 0 2.5rem; }
  .home-hero h1 { font-size: clamp(2.4rem, 8vw, 3.3rem); }
  .home-hero .lede { font-size: 1rem; }
  .research-map { padding: 1.4rem; }
  .principles-grid { gap: 1.75rem; padding: 2rem 0; }
  .related-work { align-items: flex-start; flex-direction: column; padding: 1.25rem; }
  .site-footer { padding-left: 1.25rem; padding-right: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
