/* The board's look for the pages around it: /connect, /extension.html, and the pages the server makes (approving an
   AI app, connecting the extension). The tokens are style.css's; theme.js applies the theme chosen on the board. */

:root {
  --font: "OddBoard UI", "OddBoard Sans", Inter, "Segoe UI Variable Text", "Segoe UI", ui-sans-serif, system-ui, Roboto, sans-serif;
  --app: #151515;
  --dot: rgba(255, 255, 255, .06);
  --panel: #1e1e1e;
  --surface: #262626;
  --surface-2: #2e2e2e;
  --surface-3: #363636;
  --hover: rgba(255, 255, 255, .06);
  --line: #2f2f2f;
  --line-2: #3b3b3b;
  --text: #ececec;
  --text-2: #bdbdbd;
  --muted: #9a9a9a;
  --faint: #6c6c6c;
  --accent: #4a7cf7;
  --accent-2: #3d6ee6;
  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --accent-ink: #9fb8ff;
  --shadow-lift: 0 14px 40px rgba(0, 0, 0, .55);
  --danger: #ef6a5b;
  --ok: #46c27a;
  --warn: #e2b443;
  color-scheme: dark;
}
:root[data-os="apple"] { --font: -apple-system, BlinkMacSystemFont, "OddBoard UI", "OddBoard Sans", system-ui, sans-serif; }
:root[data-theme="light"] {
  --app: #f1f0ec;
  --dot: rgba(0, 0, 0, .09);
  --panel: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f3ef;
  --surface-3: #ebe9e3;
  --hover: rgba(0, 0, 0, .05);
  --line: #e4e1da;
  --line-2: #d6d2c9;
  --text: #1c1b19;
  --text-2: #57534c;
  --muted: #6d6962;
  --faint: #a19c92;
  --accent: #3b6ef0;
  --accent-2: #2f5fd9;
  --accent-ink: #2f5fd9;
  --shadow-lift: 0 14px 34px rgba(20, 16, 10, .16);
  --danger: #cf3b2a;
  --ok: #1f9d55;
  --warn: #9a6b00;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: radial-gradient(circle, var(--dot) 1px, transparent 1.2px) 0 0 / 22px 22px fixed, var(--app);
  color: var(--text);
  font: 14px/1.55 var(--font);
  font-feature-settings: "cv11", "ss01", "ss03";
  letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); text-decoration: underline; }
b, strong { font-weight: 600; color: var(--text); }
p { margin: 0 0 10px; }
code, kbd {
  font: 12.5px ui-monospace, "SF Mono", Consolas, monospace; padding: 1px 6px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); overflow-wrap: anywhere;
}
kbd { border-bottom-width: 2px; font-size: 11.5px; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 15px; height: 15px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

.logo { flex: none; width: 22px; height: 22px; border-radius: 6px; background: conic-gradient(from 45deg, #ff5a36 0 25%, #ffb020 0 50%, #8338ec 0 75%, #3a86ff 0); }

/* buttons, as on the board */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 9px;
  cursor: pointer; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-weight: 550;
  text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.btn:focus-visible, .seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.btn.lg { height: 42px; padding: 0 18px; border-radius: 10px; font-size: 14.5px; }
.btn.ok { color: var(--ok); }

/* the bar along the top */
.pg-top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 20px;
  background: color-mix(in srgb, var(--app) 86%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.pg-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 650; font-size: 15px; letter-spacing: -.01em; }
.pg-brand:hover { color: var(--text); text-decoration: none; }
.pg-top .grow { flex: 1; }

.page { max-width: 720px; margin: 0 auto; padding: 40px 16px 64px; }
.page h1 { margin: 0 0 8px; font-size: 28px; line-height: 1.2; letter-spacing: -.025em; font-weight: 650; }
.lead { margin: 0 0 24px; color: var(--text-2); font-size: 15px; max-width: 60ch; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; height: 24px; padding: 0 10px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 600; }

.card { background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; padding: 20px; margin: 0 0 14px; }
.card h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.card > p:last-child, .card > ol:last-child { margin-bottom: 0; }
.tile { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-ink); }
.tile.orange { background: color-mix(in srgb, #ea8a3f 18%, transparent); color: #ea8a3f; }
.tile.green { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.tile.purple { background: color-mix(in srgb, #9d80f2 18%, transparent); color: #9d80f2; }
.tile .ic { width: 17px; height: 17px; }

/* a value to copy */
.copy { display: flex; gap: 8px; align-items: stretch; margin: 10px 0; }
.copy pre {
  flex: 1; min-width: 0; margin: 0; padding: 9px 12px; display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--surface); color: var(--text); font: 13px/1.5 ui-monospace, "SF Mono", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere;
}
.copy .btn { height: auto; min-height: 40px; }
.copy.big pre { font-size: 14px; padding: 11px 14px; }

/* numbered steps */
.steps { list-style: none; margin: 12px 0 0; padding: 0; counter-reset: step; display: grid; gap: 10px; }
.steps > li { position: relative; padding-left: 34px; color: var(--text-2); counter-increment: step; min-height: 24px; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); font-size: 12px; font-weight: 650;
}

/* tabs (the board's segmented control) */
.seg { display: inline-flex; flex-wrap: wrap; padding: 3px; gap: 2px; margin: 0 0 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; }
.seg button { height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 550; }
.seg button:hover { color: var(--text); }
.seg button[aria-selected="true"] { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
:root[data-theme="light"] .seg button[aria-selected="true"] { background: var(--panel); box-shadow: 0 1px 2px rgba(20, 16, 10, .12); }

.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font-size: 13px; }
.note .ic { color: var(--muted); margin-top: 1px; }
.note.warn .ic { color: var(--warn); }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; align-items: center; margin: 12px 0 0; color: var(--text-2); }
.keys dt { display: flex; gap: 4px; }
.keys dd { margin: 0; }
.card .keys + .note { margin-top: 14px; }

/* one card in the middle of the screen: approving an AI app, connecting the extension */
.pg-center { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.dialog { width: min(440px, 100%); padding: 28px 24px 24px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow-lift); }
.dialog .pg-brand { margin-bottom: 18px; }
.dialog h1 { margin: 0 0 10px; font-size: 21px; line-height: 1.3; letter-spacing: -.02em; font-weight: 650; }
.dialog p { color: var(--text-2); }
.app-id { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.app-id img, .app-id .tile { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }
.app-id .tile .ic { width: 22px; height: 22px; }
.connect-line { display: flex; align-items: center; gap: 8px; color: var(--faint); }
.app-id > .logo { width: 44px; height: 44px; border-radius: 12px; }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 600;
  background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.badge.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.perm { list-style: none; margin: 14px 0; padding: 4px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.perm li { display: flex; gap: 10px; padding: 10px 0; color: var(--text-2); font-size: 13.5px; }
.perm li + li { border-top: 1px solid var(--line); }
.perm .ic { color: var(--accent); margin-top: 1px; }
.who { font-size: 12.5px; color: var(--muted); }
.row { display: flex; gap: 8px; margin-top: 18px; }
.row .btn { flex: 1; height: 40px; }
.status-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px; background: var(--accent-soft); color: var(--accent-ink); }
.status-ic.bad { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.status-ic .ic { width: 22px; height: 22px; }

@media (max-width: 560px) {
  .pg-top { padding: 0 16px; }
  .page { padding-top: 28px; }
  .page h1 { font-size: 24px; }
  .copy { flex-direction: column; }
}
