/* Ur Next Door MCP: the main site's tokens (design-system/urnextdoor/MASTER.md), light and dark. */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/geist-1.8.2-latin.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("/fonts/newsreader-1.0.3-latin.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/geist-mono-1.8.2-latin.woff2") format("woff2"); }

:root {
  --bg: #f7f6f3; --surface: #ffffff; --surface-2: #f9f9f8; --border: #eaeaea; --border-dk: #d9d8d4;
  --text: #111111; --muted: #6b6a66; --primary: #504fec; --primary-btn: #504fec; --primary-btn-h: #4240d4;
  --on-primary: #ffffff; --primary-bg: #f1f1fd; --link: #504fec;
  --danger: #9f2f2d; --danger-bg: #fdebec; --warning: #956400; --warning-bg: #fbf3db; --success: #346538; --success-bg: #edf3ec;
  --code-bg: #f1f1ef; --code-text: #2b2a27;
  --ff-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ff-serif: "Newsreader", ui-serif, Georgia, "Times New Roman", serif;
  --ff-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 12px; --radius-sm: 8px; --radius-btn: 6px;
  --ring: 0 0 0 3px rgba(80, 79, 236, 0.35);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191919; --surface: #202020; --surface-2: #262626; --border: #2f2f2f; --border-dk: #3d3d3b;
    --text: #ededec; --muted: #9b9a97; --primary: #8b89f5; --primary-btn-h: #5e5df0; --primary-bg: #282841; --link: #8b89f5;
    --danger: #f1a9a5; --danger-bg: #3a2321; --warning: #e2be6a; --warning-bg: #342b17; --success: #9bcb97; --success-bg: #22301f;
    --code-bg: #262626; --code-text: #e4e4e2;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 var(--ff-sans); }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--primary-btn-h); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 4px; }
img { max-width: 100%; height: auto; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 10; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 560px; }
header.site { border-bottom: 1px solid var(--border); background: var(--surface); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; }
.brand img { width: 28px; height: 28px; border-radius: 6px; }
.brand small { color: var(--muted); font-weight: 500; font-family: var(--ff-mono); font-size: 12px; border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; }
nav.top { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
nav.top a { color: var(--muted); }
nav.top a[aria-current="page"], nav.top a:hover { color: var(--text); }

main { padding: 40px 0 64px; }
h1, h2 { font-family: var(--ff-serif); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
h1 { font-size: clamp(32px, 5vw, 48px); margin: 0 0 16px; }
h2 { font-size: 28px; margin: 48px 0 12px; }
h3 { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
h4 { font-size: 14px; font-weight: 600; margin: 16px 0 6px; }
p { margin: 0 0 14px; }
.lede { font-size: 18px; color: var(--muted); max-width: 640px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid .card p { margin: 0; color: var(--muted); font-size: 14px; }
.stack > * + * { margin-top: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--radius-btn); border: 1px solid var(--border-dk); background: var(--surface); color: var(--text); font: 600 14px var(--ff-sans); cursor: pointer; }
.btn:hover { border-color: var(--muted); color: var(--text); }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--primary-btn); border-color: var(--primary-btn); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-btn-h); border-color: var(--primary-btn-h); color: var(--on-primary); }
.btn.danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn.small { min-height: 32px; padding: 0 12px; font-size: 13px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

code, pre, kbd { font-family: var(--ff-mono); font-size: 13px; }
:not(pre) > code { background: var(--code-bg); color: var(--code-text); padding: 1px 6px; border-radius: 4px; word-break: break-word; }
.code { position: relative; margin: 10px 0 18px; }
.code pre { margin: 0; background: var(--code-bg); color: var(--code-text); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; padding-right: 76px; overflow-x: auto; line-height: 1.55; white-space: pre; }
.copy { position: absolute; top: 8px; right: 8px; min-height: 28px; padding: 0 10px; font-size: 12px; }
.copy[hidden] { display: none; }

.pill { display: inline-block; font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--primary-bg); color: var(--primary); font-weight: 600; }
.pill.red { background: var(--danger-bg); color: var(--danger); }
.pill.yellow { background: var(--warning-bg); color: var(--warning); }
.pill.green { background: var(--success-bg); color: var(--success); }

.note { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; border: 1px solid var(--border); background: var(--surface-2); }
.note.warn { background: var(--warning-bg); color: var(--warning); border-color: transparent; }
.note.danger { background: var(--danger-bg); color: var(--danger); border-color: transparent; }

/* tabs (setup page): every panel is visible without JavaScript; site.js turns them into tabs */
.tabs [role="tablist"] { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tabs [role="tab"] { appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 10px; color: var(--muted); font: 600 14px var(--ff-sans); cursor: pointer; }
.tabs [role="tab"][aria-selected="true"] { color: var(--text); border-bottom-color: var(--primary-btn); }
.tabs [role="tablist"][hidden] { display: none; }
.panel { scroll-margin-top: 20px; }
.panel + .panel { margin-top: 32px; }
.js .tabs .panel + .panel { margin-top: 0; }
.panel h2 { margin-top: 0; font-size: 24px; }
ol.steps { padding-left: 20px; }
ol.steps li { margin-bottom: 8px; }

/* consent */
.consent { max-width: 520px; margin: 0 auto; }
.consent h1 { font-size: 30px; }
.who { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.who img { width: 28px; height: 28px; border-radius: 50%; }
.facts { margin: 16px 0; padding: 0; list-style: none; font-size: 14px; }
.facts li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.facts li span:first-child { color: var(--muted); }
.facts li span:last-child { text-align: right; word-break: break-all; font-weight: 600; }
fieldset { border: 0; padding: 0; margin: 18px 0 0; }
legend { font-weight: 600; margin-bottom: 8px; }
.perm { display: grid; grid-template-columns: 22px 1fr; gap: 4px 10px; align-items: start; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; background: var(--surface); }
.perm input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--primary-btn); }
.perm label { font-weight: 600; }
.perm p { grid-column: 2; margin: 0; font-size: 13px; color: var(--muted); }
.perm.danger { border-color: var(--danger); }
.perm.danger label, .perm.danger p.warn { color: var(--danger); }
.perm.off { opacity: 0.6; }

table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th, table.list td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.list th { color: var(--muted); font-weight: 500; font-size: 13px; }

footer.site { border-top: 1px solid var(--border); padding: 24px 0 40px; color: var(--muted); font-size: 13px; }
footer.site .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
footer.site nav { display: flex; gap: 14px; flex-wrap: wrap; }
footer.site a { color: var(--muted); }

@media (max-width: 600px) {
  main { padding-top: 28px; }
  h2 { font-size: 24px; }
  .facts li { flex-direction: column; gap: 2px; }
  .facts li span:last-child { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.mt { margin-top: 16px; }
.scroll-x { overflow-x: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
