/* EverittOS Connect Agents page (docs/CONNECT_AGENTS.md). A static page outside the Next app, so
   it carries copies of the public-site tokens (app/design/tokens.css: Everitt navy, charcoal,
   warm white, neutral hairlines, Manrope, square corners, no shadows). Keep them in step. */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/fonts/manrope-latin.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/fonts/manrope-latin-ext.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF; }

:root {
  --eo-color-brand: #223c4d;
  --eo-color-brand-deep: #1b3140;
  --eo-color-text: #171717;
  --eo-color-text-secondary: #404040;
  --eo-color-muted: #5c5c5c;
  --eo-color-border: #e5e5e5;
  --eo-color-border-strong: #c7c7c7;
  --eo-color-surface: #ffffff;
  --eo-color-surface-subtle: #f5f5f5;
  --eo-site-warm: #f7f5f1;
  --eo-color-on-brand: #ffffff;
  --eo-color-warning-bg: #fff9f6;
  --eo-color-warning-border: rgba(158, 83, 58, 0.28);
  --eo-color-warning-text: #7a4937;
  --eo-font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--eo-site-warm); color: var(--eo-color-text); font: 400 16px/1.6 var(--eo-font); }
a { color: var(--eo-color-brand); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--eo-color-brand); outline-offset: 2px; }
h1, h2, h3 { font-weight: 500; line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
code, pre { font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
code { overflow-wrap: anywhere; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--eo-color-surface); padding: 8px 12px; z-index: 10; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.site-header { background: var(--eo-color-surface); border-bottom: 1px solid var(--eo-color-border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--eo-color-text); text-decoration: none; font-weight: 500; }
.brand-mark { display: inline-flex; width: 28px; height: 28px; background: var(--eo-color-brand); color: var(--eo-color-on-brand); align-items: center; justify-content: center; }
.brand-mark svg { width: 14px; height: 15px; }
.header-links { display: flex; gap: 20px; font-size: 15px; }
.header-links a { color: var(--eo-color-text-secondary); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.header-links a:hover { color: var(--eo-color-brand); }

.hero { padding: 48px 0 24px; }
.eyebrow { font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--eo-color-muted); margin: 0 0 12px; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); max-width: 760px; }
.lead { font-size: 18px; color: var(--eo-color-text-secondary); max-width: 720px; margin: 16px 0 0; }

.desk-tabs { display: flex; gap: 0; margin: 28px 0 0; border-bottom: 1px solid var(--eo-color-border-strong); flex-wrap: wrap; }
.desk-tabs a { padding: 12px 18px; min-height: 44px; text-decoration: none; color: var(--eo-color-text-secondary); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.desk-tabs a[aria-current="page"] { color: var(--eo-color-brand); border-bottom-color: var(--eo-color-brand); }

.notice { margin: 24px 0 0; padding: 14px 16px; background: var(--eo-color-warning-bg); border: 1px solid var(--eo-color-warning-border); color: var(--eo-color-warning-text); font-size: 15px; }
.notice strong { font-weight: 600; }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; padding: 24px 0 48px; align-items: start; }
.panel { background: var(--eo-color-surface); border: 1px solid var(--eo-color-border); padding: 20px; }
.panel h2 { font-size: 20px; margin-bottom: 8px; }
.panel h3 { font-size: 16px; margin: 20px 0 8px; }
.panel p { margin: 8px 0; color: var(--eo-color-text-secondary); font-size: 15px; }
.actor { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 12px; }
.actor label { font-weight: 500; font-size: 15px; }
.actor select { font: inherit; font-size: 16px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--eo-color-border-strong); background: var(--eo-color-surface); color: var(--eo-color-text); border-radius: 0; max-width: 100%; }
#assistant-status { font-size: 14px; color: var(--eo-color-muted); margin: 0 0 12px; }

.samples { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.samples button { width: 100%; text-align: left; font: inherit; font-size: 15px; padding: 10px 12px; min-height: 44px; border: 1px solid var(--eo-color-border); background: var(--eo-color-surface); color: var(--eo-color-text); cursor: pointer; border-radius: 0; }
.samples button:hover { border-color: var(--eo-color-brand); }
.side-list { margin: 8px 0; padding-left: 18px; font-size: 15px; color: var(--eo-color-text-secondary); }
.side-list li { margin: 4px 0; }

.section { border-top: 1px solid var(--eo-color-border); padding: 40px 0; }
.section h2 { font-size: 26px; margin-bottom: 12px; }
.section p { max-width: 760px; color: var(--eo-color-text-secondary); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 16px; }
.grid-2 h3 { font-size: 17px; margin-bottom: 6px; }
.grid-2 p, .grid-2 li { font-size: 15px; }
.files { list-style: none; padding: 0; margin: 12px 0 0; border-top: 1px solid var(--eo-color-border); }
.files li { border-bottom: 1px solid var(--eo-color-border); padding: 10px 0; display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: space-between; font-size: 15px; }
.files li span { color: var(--eo-color-muted); }
pre.snippet { background: var(--eo-color-brand-deep); color: var(--eo-color-on-brand); padding: 16px; overflow-x: auto; margin: 12px 0; max-width: 100%; }

.site-footer { background: var(--eo-color-surface); border-top: 1px solid var(--eo-color-border); padding: 28px 0; font-size: 14px; color: var(--eo-color-muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-footer a { color: var(--eo-color-text-secondary); }

/* The runtime reads these variables for its chat, settings and agent panels. White text sits on
   --ns-primary and --ns-accent (Everitt navy, well above 4.5:1). */
#agent-app {
  --ns-font: var(--eo-font);
  --ns-bg: var(--eo-color-surface);
  --ns-fg: var(--eo-color-text);
  --ns-primary: var(--eo-color-brand);
  --ns-accent: var(--eo-color-brand);
  --ns-border: var(--eo-color-border-strong);
  --ns-panelbg: var(--eo-color-surface);
  --ns-msgbg: var(--eo-color-surface-subtle);
  --ns-muted: var(--eo-color-muted);
}
.assistant-panels { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 12px; }
#agent-app.ns-composed-app [data-ns-slot="chat"] { height: 620px; }
#agent-app .ns-chat { background: var(--ns-bg); }
#agent-app input[type="checkbox"], #agent-app input[type="radio"] { width: auto; }
#agent-app .ns-header { flex-wrap: wrap; }
#agent-app textarea, #agent-app input, #agent-app select { font-size: 16px; }
#agent-app button { margin: 0; }
#agent-app .ns-msg { overflow-wrap: break-word; }
#agent-app .ns-consent-actions { flex-wrap: wrap; }
#agent-app .ns-consent-actions button { white-space: nowrap; }
#agent-app .ns-msgs:has(.ns-consent-actions) > .ns-turn-status { display: none; }

body > dialog h2 { margin: 0 0 12px; font: 500 1.25em var(--eo-font); }
.assistant-review { max-width: 640px; width: calc(100% - 32px); max-height: 85vh; overflow: auto; border: 1px solid var(--eo-color-border-strong); border-radius: 0; padding: 24px; font: 16px/1.5 var(--eo-font); color: var(--eo-color-text); background: var(--eo-color-surface); }
.assistant-review dl { display: grid; grid-template-columns: fit-content(40%) 1fr; gap: 4px 16px; margin: 12px 0; }
.assistant-review dt { font-weight: 600; }
.assistant-review dd { margin: 0; overflow-wrap: anywhere; }
.assistant-review pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.assistant-review-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.assistant-review button { font: 500 16px var(--eo-font); min-height: 44px; padding: 10px 18px; border-radius: 0; cursor: pointer; background: var(--eo-color-brand); color: var(--eo-color-on-brand); border: 1px solid var(--eo-color-brand); }
.assistant-review .assistant-decline { background: transparent; color: var(--eo-color-text); border-color: var(--eo-color-border-strong); }

@media (max-width: 860px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .header-links { display: none; }
  #agent-app.ns-composed-app [data-ns-slot="chat"] { height: 560px; }
  .assistant-review dl { grid-template-columns: 1fr; gap: 0; }
  .assistant-review dd { margin-bottom: 8px; }
}
@media (max-width: 420px) {
  .wrap { padding: 0 16px; }
}
