/* Cortana design system for the site. One file: tokens, base, and the shared pieces every page uses (nav, footer, buttons,
   fields, panels, prose). The identity is shared with the app (tv/style.css): the token block below is the same text in
   both files. A living room at night: midnight indigo, warm paper, and one lamp-gold light that means "an agent needs you".
   Type: Mona Sans, one variable family; wide and heavy for display, normal width for text. JetBrains Mono for code only. */

@font-face { font-family: "Mona Sans"; src: url("/assets/fonts/mona-sans.woff2?v=5ea3740633") format("woff2"); font-weight: 200 900; font-stretch: 75% 125%; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/jbmono-var.woff2?v=d333f4f9cd") format("woff2"); font-weight: 400 600; font-display: swap; }
/* A metric-matched fallback so the swap does not move the page. */
@font-face { font-family: "Mona Sans Fallback"; src: local("Arial"), local("Helvetica Neue"), local("Liberation Sans"); size-adjust: 103%; ascent-override: 88%; descent-override: 22%; line-gap-override: 0%; }

/* @tokens:start  One identity for the site, the app and the TV: "midnight and lamplight". This block is byte-identical in
   site/assets/cortana.css and tv/style.css (test/design-tokens.test.mjs fails if they drift); brand.json carries the same
   colours for everything that is not CSS. Rules: midnight indigo ground; warm paper ink; halo blue for links, focus and
   the brand; GOLD MEANS ONE THING, an agent is waiting on you, and nothing else on any surface may use it. */
:root {
  /* ground */
  --c-bg: #070a18;            /* page: midnight indigo */
  --c-rail: #0b0f22;          /* navigation rail, tab bar, raised page areas */
  --c-surface: #121832;       /* cards and rows */
  --c-surface-2: #1c2448;     /* focused or raised surface */
  --c-surface-3: #262f5c;     /* controls, tracks */
  --c-line: #2a3463;          /* hairlines on surfaces */
  --c-line-soft: #171d3d;     /* hairlines on the page */
  /* ink: lamplit paper, then two cooler steps */
  --c-ink: #f4f1ea;  --c-ink-2: #aeb7dc;  --c-ink-3: #838dbb;
  --c-ink-bg: #f4f1ea;  --c-ink-bg-2: #aeb7dc;  --c-ink-bg-3: #838dbb;
  /* identity */
  --c-brand: #8fa5ff;         /* halo blue: links, charts, selection, focus on the site */
  --c-brand-bg: #8fa5ff;      /* the same role when drawn on the page or rail */
  --c-brand-dim: #1d2759;     /* chart fills */
  --c-on-brand: #070c2b;
  /* signals: each means one thing everywhere */
  --c-ask: #ffc857;           /* an agent is waiting on you */
  --c-ask-deep: #c9912e;      /* the same light, further from the lamp */
  --c-on-ask: #241700;
  --c-live: #4be3a8;          /* working, done, healthy */
  --c-live-surface: #0d2b29;
  --c-idle: #8791bd;          /* connected, nothing to do */
  --c-stuck: #ff6b81;         /* stuck, overdue, problem */
  --c-stuck-surface: #2c1533;
  --c-on-signal: #06131f;
  /* focus */
  --c-focus: #ffffff;         /* ring drawn on the page */
  --c-focus-in: #ffffff;      /* ring drawn on a surface */
  /* map */
  --c-map-sea: #0a0e20;  --c-map-land: #1a2247;  --c-map-line: #333f78;
  /* type: Mona Sans, one variable family. Wide and heavy for display, normal width for text. */
  --c-font: "Mona Sans", "Mona Sans Fallback", -apple-system, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --c-font-display: "Mona Sans", "Mona Sans Fallback", -apple-system, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --c-font-label: var(--c-font);
  --c-font-code: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --c-wide: 122%;             /* width axis for display type */
  /* motion */
  --c-ease: cubic-bezier(.2, .8, .2, 1);
  --c-dur: 180ms;
}
/* @tokens:end */

:root {
  /* The site's own names for the shared colours (older rules use these). */
  --night: var(--c-bg);  --night-2: var(--c-rail);  --night-3: var(--c-surface);  --night-4: var(--c-surface-2);
  --line: var(--c-line);  --line-soft: var(--c-line-soft);
  --paper: var(--c-ink);  --mist: var(--c-ink-2);  --dim: var(--c-ink-3);
  --lamp: var(--c-ask);  --lamp-deep: var(--c-ask-deep);   /* gold: an agent is waiting on you. Never decoration. */
  --screen: var(--c-brand);  --signal: #6f86ff;
  --go: var(--c-live);  --stop: var(--c-stuck);
  --walnut: #2a2140;

  /* type */
  --font: var(--c-font);
  --mono: var(--c-font-code);
  --t-xs: .8125rem;   /* 13 */
  --t-sm: .9375rem;   /* 15 */
  --t-base: 1.0625rem;/* 17 */
  --t-lg: 1.3125rem;  /* 21 */
  --t-xl: 1.75rem;    /* 28 */
  --t-2xl: clamp(2rem, 1.3rem + 2.6vw, 3.25rem);
  --t-3xl: clamp(2.5rem, 1.2rem + 5vw, 5.25rem);
  --t-hero: clamp(2.6rem, .6rem + 7.4vw, 8.75rem);

  /* space: a 4 px base, named by step */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem; --s-6: 2rem; --s-7: 3rem; --s-8: 4rem; --s-9: 6rem; --s-10: 9rem;
  --gutter: clamp(1.25rem, 5vw, 5.5rem);
  --measure: 62ch;

  /* radii: small for controls, large for surfaces, full for pills */
  --r-1: 8px; --r-2: 14px; --r-3: 22px; --r-4: 32px; --r-pill: 999px;

  /* motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);       /* arrivals */
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);   /* moves */
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1); /* small confirmations */
  --d-1: 120ms; --d-2: 240ms; --d-3: 480ms; --d-4: 900ms;

  /* elevation: light comes from the screen, so shadows are deep and cool */
  --e-1: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 8px 24px rgba(2, 3, 12, .4);
  --e-2: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 24px 64px rgba(2, 3, 12, .55);
  --e-3: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 48px 120px rgba(2, 3, 12, .7);
  --focus: 0 0 0 3px var(--night), 0 0 0 5px var(--screen);
  /* Aliases read by pages built before this file existed (pricing). */
  --color-bg: var(--night); --color-surface: var(--night-2); --color-surface-raised: var(--night-3); --color-border: var(--line); --color-text: var(--paper); --color-text-muted: var(--mist);
  --color-accent: var(--screen); --color-accent-2: var(--lamp); --color-on-accent: var(--night); --font-sans: var(--font); --radius-lg: var(--r-4); --dur: .55s;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--night); color: var(--paper); font-family: var(--font); font-size: var(--t-base); line-height: 1.55; font-stretch: 100%; font-weight: 400;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; overflow-x: clip; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--screen); text-decoration-thickness: .06em; text-underline-offset: .18em; }
a:hover { color: #bcc9ff; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
::selection { background: var(--screen); color: var(--c-on-brand); }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
code, kbd, pre { font-family: var(--mono); font-size: .92em; }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--s-4); top: -4rem; z-index: 200; background: var(--paper); color: var(--night); padding: .7rem 1rem; border-radius: var(--r-1); font-weight: 600; text-decoration: none; }
.skip:focus { top: var(--s-4); }

/* ---- type roles ------------------------------------------------------------------------------------ */
.display { font-stretch: 112%; font-weight: 720; letter-spacing: -.035em; line-height: .98; text-wrap: balance; }
.t-hero { font-size: var(--t-hero); }
.t-3xl { font-size: var(--t-3xl); }
.t-2xl { font-size: var(--t-2xl); line-height: 1.04; }
.t-xl { font-size: var(--t-xl); font-stretch: 108%; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; }
.lede { font-size: clamp(1.125rem, .95rem + .7vw, 1.4375rem); line-height: 1.45; color: var(--mist); max-width: 34em; text-wrap: pretty; }
.muted { color: var(--mist); }
.dim { color: var(--dim); }
.num { font-variant-numeric: normal; }

/* ---- layout ---------------------------------------------------------------------------------------- */
.wrap { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: 820px; }

/* ---- buttons --------------------------------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: 2.875rem; padding: 0 1.35rem; border-radius: var(--r-pill); border: 1px solid var(--line);
  background: var(--night-3); color: var(--paper); font-weight: 600; font-size: var(--t-sm); letter-spacing: -.005em; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background var(--d-1) ease, border-color var(--d-1) ease, transform var(--d-1) ease, color var(--d-1) ease; -webkit-appearance: none; appearance: none; }
.btn:hover { background: var(--night-4); border-color: #36417a; color: var(--paper); }
.btn:active { transform: scale(.975); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: default; pointer-events: none; }
.btn-primary { background: var(--paper); border-color: var(--paper); color: var(--night); }
.btn-primary:hover { background: #fff; border-color: #fff; color: var(--night); }
.btn-lamp { background: var(--lamp); border-color: var(--lamp); color: #241700; }
.btn-lamp:hover { background: #ffd884; border-color: #ffd884; color: #241700; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--mist); }
.btn-ghost:hover { background: var(--night-3); border-color: transparent; }
.btn-danger { color: var(--stop); }
.btn-danger:hover { background: #2c1533; border-color: #5c2a4a; color: #ffa0af; }
.btn-lg { min-height: 3.375rem; padding: 0 1.75rem; font-size: var(--t-base); }
.btn-sm { min-height: 2.25rem; padding: 0 .95rem; font-size: var(--t-xs); }
.btn-block { display: flex; width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--screen); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: .06em; }

/* ---- nav ------------------------------------------------------------------------------------------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 100; height: 4rem; display: flex; align-items: center; transition: background var(--d-2) ease, border-color var(--d-2) ease; border-bottom: 1px solid transparent; }
.nav.is-solid { background: rgba(7, 10, 24, .82); -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px); border-bottom-color: var(--line-soft); }
.nav-in { display: flex; align-items: center; gap: var(--s-5); width: 100%; max-width: 1480px; margin-inline: auto; padding-inline: var(--gutter); }
.brandmark { display: inline-flex; align-items: center; gap: .6rem; color: var(--paper); text-decoration: none; font-stretch: 122%; font-weight: 650; font-size: 1.125rem; letter-spacing: -.02em; min-height: 2.75rem; }
.brandmark:hover { color: var(--paper); }
.brandmark svg { width: 1.625rem; height: 1.625rem; flex: none; }
.nav-links { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; }
.nav-links a:not(.btn) { color: var(--mist); text-decoration: none; font-size: var(--t-sm); font-weight: 500; padding: .7rem .8rem; border-radius: var(--r-1); }
.nav-links a:not(.btn):hover, .nav-links a[aria-current="page"] { color: var(--paper); }
.nav-links .btn { margin-left: var(--s-2); }
.nav-toggle { display: none; }
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; margin-left: auto; width: 2.75rem; height: 2.75rem; align-items: center; justify-content: center; background: none; border: 0; border-radius: var(--r-1); cursor: pointer; }
  .nav-toggle span, .nav-toggle span::before { display: block; width: 20px; height: 2px; background: var(--paper); border-radius: 2px; transition: transform var(--d-2) var(--ease-out); }
  .nav-toggle span { transform: translateY(-3px); }
  .nav-toggle span::before { content: ""; transform: translateY(7px); }
  .nav.is-open .nav-toggle span { transform: rotate(45deg); }
  .nav.is-open .nav-toggle span::before { transform: rotate(-90deg); }
  .nav-links { position: fixed; inset: 4rem 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: var(--s-3) var(--gutter) var(--s-6); background: var(--night); border-bottom: 1px solid var(--line);
    visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity var(--d-2) ease, transform var(--d-2) var(--ease-out), visibility 0s linear var(--d-2); }
  .nav.is-open { background: var(--night); }
  .nav.is-open .nav-links { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav-links a:not(.btn) { font-size: var(--t-lg); padding: .9rem 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; color: var(--paper); }
  .nav-links .btn { margin: var(--s-5) 0 0; min-height: 3.25rem; font-size: var(--t-base); }
}

/* ---- footer ---------------------------------------------------------------------------------------- */
.foot { border-top: 1px solid var(--line-soft); padding-block: var(--s-8) var(--s-7); color: var(--mist); font-size: var(--t-sm); }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: var(--s-7) var(--s-6); }
.foot h2 { font-size: var(--t-xs); font-weight: 600; color: var(--dim); margin-bottom: var(--s-3); }
.foot li + li { margin-top: .15rem; }
.foot a { color: var(--mist); text-decoration: none; display: inline-block; padding: .35rem 0; }
.foot a:hover { color: var(--paper); }
.foot .brandmark { display: inline-flex; color: var(--paper); }
.foot-note { max-width: 30em; margin-top: var(--s-4); }
.foot-base { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); justify-content: space-between; margin-top: var(--s-8); padding-top: var(--s-5); border-top: 1px solid var(--line-soft); color: var(--dim); font-size: var(--t-xs); }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* ---- fields ---------------------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: .4rem; font-size: var(--t-sm); font-weight: 600; color: var(--paper); }
.field .hint { font-weight: 400; color: var(--dim); font-size: var(--t-xs); }
.input, .select { width: 100%; min-height: 3rem; padding: .7rem .9rem; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--night); color: var(--paper); font-size: var(--t-base); font-weight: 500; outline: none;
  transition: border-color var(--d-1) ease, box-shadow var(--d-1) ease; }
.input::placeholder { color: #6a73a3; }
.input:hover, .select:hover { border-color: #3a4682; }
.input:focus, .select:focus { border-color: var(--screen); box-shadow: 0 0 0 3px rgba(143, 165, 255, .22); }
.input-code { font-family: var(--mono); letter-spacing: .16em; text-transform: uppercase; text-align: center; font-size: 1.375rem; }
.msg { min-height: 1.5em; font-size: var(--t-sm); color: var(--stop); }
.msg.good { color: var(--go); }

/* ---- surfaces -------------------------------------------------------------------------------------- */
.panel { background: var(--night-2); border: 1px solid var(--line-soft); border-radius: var(--r-3); box-shadow: var(--e-1); }
.pill { display: inline-flex; align-items: center; gap: .4em; padding: .2rem .65rem; border-radius: var(--r-pill); font-size: var(--t-xs); font-weight: 600; background: var(--night-4); color: var(--mist); white-space: nowrap; }
.pill::before { content: ""; width: .45em; height: .45em; border-radius: 50%; background: currentColor; }
.pill.go { color: var(--go); background: #0d2b29; } .pill.lamp { color: var(--lamp); background: #2e2410; } .pill.stop { color: var(--stop); background: #2c1533; } .pill.plain::before { display: none; }
.kbd { display: inline-block; padding: .1em .5em; border-radius: 6px; border: 1px solid var(--line); background: var(--night-3); font-family: var(--mono); font-size: .85em; }
.codeblock { margin: 0; padding: var(--s-5); border-radius: var(--r-2); background: #050714; border: 1px solid var(--line-soft); overflow-x: auto; font-size: var(--t-xs); line-height: 1.7; color: #d0d5ee; tab-size: 2; }
.codeblock .k { color: var(--screen); } .codeblock .s { color: var(--go); } .codeblock .c { color: var(--dim); }

/* ---- prose (legal, security) ----------------------------------------------------------------------- */
.doc { padding-block: calc(4rem + var(--s-9)) var(--s-9); }
.doc > header { margin-bottom: var(--s-8); }
.doc > header p { margin-top: var(--s-4); }
.prose { max-width: var(--measure); color: #d5d8ea; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font-size: var(--t-xl); font-stretch: 108%; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; color: var(--paper); margin-top: 2.6em; scroll-margin-top: 6rem; }
.prose h3 { font-size: var(--t-lg); font-weight: 650; color: var(--paper); margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: .45em; }
.prose strong { color: var(--paper); font-weight: 650; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.prose th, .prose td { text-align: left; vertical-align: top; padding: .7rem .9rem .7rem 0; border-bottom: 1px solid var(--line-soft); }
.prose th { color: var(--dim); font-weight: 600; }
.doc-toc { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: var(--s-6); }
.callout { padding: var(--s-5); border-radius: var(--r-2); background: var(--night-2); border: 1px solid var(--line-soft); border-left: 3px solid var(--screen); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) { .btn { border: 1px solid ButtonText; } }

/* Touch: every control is at least 44 px tall on small screens. */
@media (max-width: 760px) {
  .btn-sm, .seg button { min-height: 2.75rem; }
  .foot a { padding: .7rem 0; }
  .foot li + li { margin-top: 0; }
  .join-alt a, .set-acts a:not(.btn), .home-links a { display: inline-flex; align-items: center; min-height: 2.75rem; min-width: 2.75rem; padding: .25rem 0; }
  .foot a { min-width: 2.75rem; }
}

/* Guides rendered from Markdown (site/help). */
.prose-guide h1 { font-size: var(--t-2xl); font-stretch: 112%; font-weight: 720; letter-spacing: -.035em; line-height: 1.02; color: var(--paper); text-wrap: balance; margin-bottom: .6em; }
.prose-guide code { padding: .1em .35em; border-radius: 6px; background: var(--night-3); color: #e1e4f4; }
.prose-guide pre { margin: 0; padding: var(--s-4) var(--s-5); border-radius: var(--r-2); background: #050714; border: 1px solid var(--line-soft); overflow-x: auto; font-size: var(--t-xs); line-height: 1.7; }
.prose-guide pre code { padding: 0; background: none; overflow-wrap: normal; white-space: pre; }
/* R2 L3: long inline code and URLs wrap on a 390 px phone instead of widening the page; code blocks scroll inside themselves */
.prose-guide { min-width: 0; overflow-wrap: break-word; } .prose-guide code, .prose-guide a { overflow-wrap: anywhere; } .prose-guide pre, .prose-guide img { max-width: 100%; }
.prose-guide ol ol, .prose-guide ol ul, .prose-guide ul ul { margin-top: .45em; }
.prose-guide .table { overflow-x: auto; }
