/* WebBrain Companion site. Palette and typeface come from the app's own panel
   (the "brain tissue" colors of the WebBrain mark, Bricolage Grotesque). */

@font-face {
  font-family: "Bricolage";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(fonts/bricolage-grotesque-latin-opsz-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(fonts/bricolage-grotesque-latin-ext-opsz-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper: #fbf6f8;
  --ink: #2b1426;
  --muted: #6e5064;
  --rose: #c42d62;
  --rose-hover: #a92353;
  --rose-ink: #ffffff;
  --rose-mark: #d9396f;
  --tissue: #f1dbe5;
  --line: #e8d4de;
  --plum: #3d1836;
  --code: #f3e5ec;
  --focus: #8a2d63;
  --window: #ffffff;
  --window-bar: #f6edf1;
  --shadow: 0 1px 0 rgba(61, 24, 54, .04), 0 28px 56px -28px rgba(61, 24, 54, .42);

  /* Tray menu, light appearance (menus follow the system theme, not the wallpaper). */
  --menu-bg: rgba(244, 238, 242, .9);
  --menu-ink: #1d1d1f;
  --menu-dim: #65616a;
  --menu-sep: rgba(0, 0, 0, .1);
  --menu-hi: #2e6bdc;

  --font: "Bricolage", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1a0f18;
    --ink: #f7e9f0;
    --muted: #c3a5b7;
    --rose: #ff6fa5;
    --rose-hover: #ff8db8;
    --rose-ink: #2b0c1f;
    --rose-mark: #ff6fa5;
    --tissue: #3a2233;
    --line: #3a2535;
    --plum: #2f1429;
    --code: #261521;
    --focus: #ffb3cf;
    --window: #1a0f18;
    --window-bar: #24151f;
    --shadow: 0 0 0 1px rgba(255, 255, 255, .05), 0 28px 56px -28px rgba(0, 0, 0, .8);
    --menu-bg: rgba(42, 36, 41, .9);
    --menu-ink: #f2f2f2;
    --menu-dim: #a19ca3;
    --menu-sep: rgba(255, 255, 255, .12);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
a { color: inherit; text-decoration-color: color-mix(in srgb, var(--rose) 70%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: .18em; }
a:hover { text-decoration-color: var(--rose); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
code, pre { font-family: var(--mono); direction: ltr; unicode-bidi: isolate; }
code { font-size: .88em; background: var(--code); padding: .08em .35em; border-radius: 5px; white-space: nowrap; }
pre code { background: none; padding: 0; font-size: inherit; white-space: pre; }
h1, h2, h3 { font-family: var(--font); margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.skip { position: absolute; inset-inline-start: 8px; top: 8px; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; background: var(--ink); color: var(--paper); border-radius: 8px; z-index: 30; }
.skip:focus { width: auto; height: auto; padding: 8px 14px; clip-path: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Header */
.site-head { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.01em; text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.site-nav { display: flex; gap: 24px; margin-inline-start: auto; font-size: 15px; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover { color: var(--ink); }
.language-picker { position: relative; flex: none; z-index: 20; }
.language-picker summary { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); cursor: pointer; list-style: none; }
.language-picker summary::-webkit-details-marker { display: none; }
.language-picker summary:hover, .language-picker[open] summary { color: var(--ink); background: var(--tissue); }
.language-picker summary svg { width: 21px; height: 21px; }
.language-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 10px); display: grid; width: 240px; max-width: calc(100vw - 32px); max-height: min(420px, calc(100dvh - 100px)); overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); }
.language-menu a { padding: 8px 12px; border-radius: 8px; text-decoration: none; font-size: 15px; text-align: start; }
.language-menu a:hover, .language-menu a[aria-current="page"] { color: var(--ink); background: var(--tissue); }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: clamp(32px, 5vw, 72px); align-items: center; padding-block: clamp(24px, 4vw, 48px) clamp(64px, 8vw, 104px); }
.hero h1 {
  font-size: clamp(2.5rem, 3.2vw + 1.2rem, 4.2rem);
  font-weight: 760;
  line-height: .98;
  letter-spacing: -.032em;
  margin-bottom: 26px;
}
.lede { font-size: clamp(1.08rem, .4vw + 1rem, 1.25rem); line-height: 1.5; max-width: 34em; color: color-mix(in srgb, var(--ink) 88%, var(--paper)); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 30px; }
.cta-note { font-size: 15px; color: var(--muted); max-width: 22em; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px; font-weight: 650; font-size: 17px; text-decoration: none; border: 1.5px solid transparent; transition: background-color .15s; }
.button.primary { background: var(--rose); color: var(--rose-ink); }
.button.primary:hover { background: var(--rose-hover); }

/* The symbolic desktop: a plain plum field with one status bar and the real menu. */
.desk-wrap { margin: 0; }
.desk {
  position: relative;
  height: 460px;
  border-radius: 22px;
  background: var(--plum);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.desk .bar { position: absolute; left: 0; right: 0; display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 0 14px; color: #fff; }
.desk .bar .s { display: block; background: currentColor; opacity: .5; }
.desk .bar .s1 { width: 15px; height: 9px; border-radius: 3px; }
.desk .bar .s2 { width: 11px; height: 11px; border-radius: 50%; }
.desk .bar .s3 { width: 30px; height: 7px; border-radius: 4px; }
.desk .icon { display: grid; place-items: center; padding: 3px 7px; border-radius: 5px; background: rgba(255, 255, 255, .24); }
.desk .glyph { width: 18px; height: 18px; background: currentColor; -webkit-mask: url(img/tray-glyph.png) center / contain no-repeat; mask: url(img/tray-glyph.png) center / contain no-repeat; }

.menu {
  position: absolute;
  right: 14px;
  width: min(380px, calc(100% - 28px));
  padding: 5px;
  background: var(--menu-bg);
  color: var(--menu-ink);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  backdrop-filter: blur(24px) saturate(1.5);
  border-radius: 8px;
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .35), 0 12px 34px rgba(0, 0, 0, .38);
  font: 13px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  transform-origin: top right;
}
.menu .row { display: flex; align-items: center; gap: 6px; height: 22px; padding: 0 12px 0 24px; border-radius: 4px; white-space: nowrap; position: relative; }
.menu .row > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.menu .dim { color: var(--menu-dim); }
.menu .sep { height: 1px; margin: 5px 12px; background: var(--menu-sep); }
/* One line per plan, spaced the way the app writes it: name, bar, percent. */
.menu .plan { gap: .7em; }
.menu .plan > span:first-child { flex: none; }
.meter { display: inline-flex; gap: 2px; }
.meter i { width: 6px; height: 9px; border: 1px solid currentColor; border-radius: 1px; transform: skewX(-16deg); }
.meter i.on { background: currentColor; }
.menu .hl { background: var(--menu-hi); color: #fff; }

/* Windows: taskbar at the bottom, the menu opens upward. */
.desk[data-os="win"] .bar { bottom: 0; height: 46px; background: rgba(28, 22, 28, .82); gap: 16px; padding-right: 18px; }
.desk[data-os="win"] .icon { padding: 7px 8px; border-radius: 6px; background: rgba(255, 255, 255, .12); }
.desk[data-os="win"] .menu { bottom: 54px; right: 18px; border-radius: 8px; padding: 4px; font: 13px/1 "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif; transform-origin: bottom right; }
.desk[data-os="win"] .menu .row { height: 24px; padding-left: 30px; }
.desk[data-os="win"] .meter i, .desk[data-os="linux"] .meter i { transform: none; width: 7px; height: 7px; border-radius: 0; }

/* Linux (GNOME with AppIndicator): black top bar, rounder menu. */
.desk[data-os="linux"] .bar { top: 0; height: 28px; background: #000; }
.desk[data-os="linux"] .icon { border-radius: 999px; padding: 3px 9px; background: rgba(255, 255, 255, .2); }
.desk[data-os="linux"] .menu { top: 34px; right: 10px; border-radius: 12px; padding: 6px; font: 13px/1 Cantarell, "Noto Sans", Ubuntu, system-ui, sans-serif; }
.desk[data-os="linux"] .menu .row { height: 25px; border-radius: 6px; }
.desk[data-os="mac"] .bar { top: 0; height: 30px; background: rgba(255, 255, 255, .13); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.desk[data-os="mac"] .menu { top: 33px; }

.os-switch { display: none; align-items: center; gap: 10px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.js .os-switch { display: flex; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--tissue); }
.seg button { font: inherit; font-weight: 600; color: var(--muted); background: none; border: 0; padding: 6px 13px; border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(43, 20, 38, .16); }

/* Sections */
.section { padding-block: clamp(56px, 6.5vw, 96px); border-top: 1px solid var(--line); }
.section h2 { font-size: clamp(2rem, 2.2vw + 1.2rem, 3.1rem); font-weight: 730; line-height: 1.02; letter-spacing: -.028em; max-width: 18em; margin-bottom: 22px; }
.section .intro { max-width: 40em; font-size: 1.1rem; color: color-mix(in srgb, var(--ink) 88%, var(--paper)); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.split.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* Panel windows */
.windows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 36px); margin: 48px 0 0; padding: 0; list-style: none; }
.windows figure { margin: 0; }
.window { border-radius: 12px; overflow: hidden; background: var(--window); box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.titlebar { display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; background: var(--window-bar); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.titlebar i { width: 11px; height: 11px; border-radius: 50%; background: color-mix(in srgb, var(--muted) 35%, transparent); }
.titlebar span { flex: 1; text-align: center; margin-right: 47px; }
.window img { display: block; width: 100%; height: auto; aspect-ratio: 460 / 760; }
.windows figcaption { padding: 18px 2px 0; }
.windows h3 { font-size: 1.2rem; font-weight: 680; letter-spacing: -.01em; margin-bottom: 6px; }
.windows figcaption p { color: var(--muted); font-size: 16px; margin: 0; }

/* Local model planner table */
.machines { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 16px; }
.machines caption { text-align: start; font-weight: 680; font-size: 1.2rem; padding-bottom: 14px; letter-spacing: -.01em; }
.machines th { text-align: start; font-size: 14px; font-weight: 600; color: var(--muted); padding: 0 16px 10px 0; border-bottom: 1.5px solid var(--ink); white-space: nowrap; }
.machines td { padding: 15px 16px 15px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.machines td:first-child { font-weight: 620; width: 30%; }
.machines td:last-child, .machines th:last-child { white-space: nowrap; padding-right: 0; }
.vis { display: inline-flex; align-items: center; gap: .5em; white-space: nowrap; font-weight: 600; }
.vis::before { content: ""; width: .66em; height: .66em; border-radius: 50%; border: 2px solid var(--rose); flex: none; }
.vis.gpu::before { background: var(--rose); }
.vis.off { color: var(--muted); font-weight: 500; }
.vis.off::before { border: 0; height: 2px; border-radius: 1px; background: var(--muted); }
.note { color: var(--muted); font-size: 15px; margin-top: 18px; max-width: 46em; }

/* Code */
.code-label { font-size: 14px; font-weight: 600; color: var(--muted); margin: 0 0 8px; }
pre { margin: 0 0 22px; padding: 18px 20px; background: var(--code); border-radius: 14px; overflow-x: auto; font-size: 13.5px; line-height: 1.6; tab-size: 2; }
pre .k { color: var(--rose); }

/* Connect steps: a real sequence, so numbered */
.steps { list-style: none; counter-reset: step; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px clamp(20px, 3vw, 40px); }
.steps li { counter-increment: step; padding-top: 16px; border-top: 1.5px solid var(--ink); }
.steps li::before { content: counter(step); display: block; margin-bottom: 12px; font-weight: 760; font-size: 2.2rem; line-height: 1; letter-spacing: -.02em; color: var(--rose); font-variant-numeric: tabular-nums; }
.steps b { font-weight: 650; }
.after-steps { margin-top: 30px; color: var(--muted); }

/* Downloads */
.downloads { margin-top: 36px; border-top: 1.5px solid var(--ink); }
.dl { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 1.3fr) minmax(0, 1.6fr); gap: 16px 32px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.dl h3 { font-size: 1.6rem; font-weight: 730; letter-spacing: -.02em; }
.dl .req { color: var(--muted); font-size: 15px; margin: 4px 0 0; }
.dl .yours { display: none; margin-top: 10px; font-size: 13px; font-weight: 650; color: var(--rose); }
.dl.current .yours { display: block; }
.files { display: grid; gap: 10px; align-content: start; margin: 0; padding: 0; list-style: none; }
.files a { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 12px 16px; border-radius: 12px; border: 1.5px solid var(--line); text-decoration: none; font-weight: 620; }
.files a:hover { border-color: var(--rose); }
.files small { color: var(--muted); font-weight: 450; font-size: 14px; white-space: nowrap; }
.dl .how { font-size: 15.5px; color: color-mix(in srgb, var(--ink) 82%, var(--paper)); margin: 0; }
.more-links { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 22px; font-size: 15px; }

/* Safety */
.facts { margin: 0; padding-inline-start: 1.15em; }
.facts li { margin: 0 0 .8em; padding-inline-start: .2em; }
.facts li::marker { color: var(--rose); }
.safety h3 { font-size: 1.25rem; font-weight: 680; margin-bottom: 14px; letter-spacing: -.01em; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding-block: 36px 56px; font-size: 14.5px; color: var(--muted); }
.site-foot .wrap { display: grid; grid-template-columns: minmax(0, 2fr) auto; gap: 24px 48px; align-items: start; }
.site-foot nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-foot p { margin: 0; max-width: 46em; }

/* The one orchestrated moment: the menu opens, then the meters fill. */
@media (prefers-reduced-motion: no-preference) {
  .js .desk .menu { animation: menu-open .2s ease-out .35s both; }
  .js .desk[data-os="win"] .menu { animation-name: menu-open-up; }
  @keyframes menu-open { from { opacity: 0; transform: translateY(-4px) scale(.985); } }
  @keyframes menu-open-up { from { opacity: 0; transform: translateY(4px) scale(.985); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Narrower screens */
@media (max-width: 1020px) {
  .site-nav { display: none; }
  .language-picker { margin-inline-start: auto; }
  .hero { grid-template-columns: 1fr; }
  .desk-wrap { max-width: 560px; }
  .split, .split.even { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dl { grid-template-columns: 1fr 1fr; }
  .dl > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .windows { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(78%, 330px); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 14px; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  .windows > li { scroll-snap-align: start; }
  .desk { height: 420px; }
  .menu { font-size: 12px; }
  .menu .row { height: 21px; padding-left: 20px; padding-right: 10px; }
  .meter i, .desk[data-os] .meter i { width: 4px; }
  .desk[data-os="win"] .meter i, .desk[data-os="linux"] .meter i { width: 5px; height: 5px; }
  .dl { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .desk[data-os] .menu .row { height: 21px; }
  .machines thead { display: none; }
  .machines caption { display: block; }
  .machines, .machines tbody, .machines tr, .machines td { display: block; width: auto; }
  .machines tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .machines td { border: 0; padding: 3px 0; }
  .machines td:first-child { width: auto; font-size: 1.05rem; padding-bottom: 6px; }
  .machines td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-weight: 500; }
  .site-foot .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .site-head { gap: 12px; }
  .brand { font-size: 16px; gap: 8px; }
  .brand img { width: 28px; height: 28px; }
  .desk { height: 340px; border-radius: 16px; }
}
