@font-face { font-family: "Bitter"; src: url("/static/fonts/bitter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/static/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/static/fonts/instrument-sans-latin-wght-italic.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/static/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/static/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--surface-000); color: var(--ink); font: 400 15px/22px var(--font-sans); }
a { color: var(--ink-brand); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--surface-000); padding: var(--space-2) var(--space-3); }

/* The shell: a menu down the left, the page beside it. */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; padding: var(--space-5) 0 var(--space-5); background: var(--surface-100); border-right: 1px solid var(--border); }
.brand { --mark: 28px; display: flex; align-items: center; gap: calc(var(--mark) / 2); padding: 0 var(--space-5) var(--space-5); color: var(--ink-brand); text-decoration: none; }
.mark { width: var(--mark); height: var(--mark); flex: none; background: url("/static/brand/mark-128.png") center / contain no-repeat; }
.wordmark { display: block; width: auto; height: var(--mark); flex: none; }
[data-theme="dark"] .brand { color: var(--ink); }
.brand + .band-label { margin: calc(-1 * var(--space-3)) var(--space-5) var(--space-4) calc(var(--space-5) + 42px); color: var(--ink-accent); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.legal { padding: 0 var(--space-5); font-size: 13px; }
.shell.bare .legal { margin: 0 var(--space-4); padding: 0; }
.admin .legal a { color: var(--ink-muted); }
.menu { display: flex; flex-direction: column; }
.menu a { display: flex; align-items: baseline; gap: var(--space-3); padding: var(--space-2) var(--space-5) var(--space-2) var(--space-4); border-left: 3px solid transparent; color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; }
.menu a .num { min-width: 1.6em; color: var(--ink-muted); font-size: 12px; font-variant-numeric: tabular-nums; letter-spacing: 0.06em; font-family: var(--font-mono); }
.menu a:hover { background: var(--surface-brand-soft); }
.menu a.on { border-left-color: var(--surface-brand); background: var(--surface-brand-soft); color: var(--ink); }
.menu .sep { margin: var(--space-3) var(--space-5); border-top: 1px solid var(--border); }
a.site { color: var(--ink-muted); font-size: 13px; line-height: 18px; font-weight: 600; text-decoration: none; }
a.site::before { content: "\2190\00a0"; }
a.site:hover { color: var(--ink); text-decoration: underline; }
.menu a.site { color: var(--ink-muted); font-size: 13px; line-height: 18px; }
.who { margin-top: auto; padding: var(--space-4) var(--space-5) 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; align-items: flex-start; gap: 2px; color: var(--ink-muted); font-size: 13px; line-height: 18px; overflow-wrap: anywhere; }
.who strong { color: var(--ink); }
.who button.quiet { padding-left: 0; padding-right: 0; }

/* The person's name is a menu: Files, What's new, Help, Terms, Privacy, the Admin portal and the website sit behind it. */
.name-menu { position: relative; margin-top: auto; border-top: 1px solid var(--border); }
.name-menu summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-4) var(--space-5); color: var(--ink); font-weight: 600; font-size: 15px; cursor: pointer; list-style: none; }
.name-menu summary::-webkit-details-marker { display: none; }
.name-menu summary::after { content: "\25B4"; color: var(--ink-muted); font-size: 12px; }
.name-menu[open] summary::after { content: "\25BE"; }
.name-menu summary:hover { background: var(--surface-brand-soft); }
.name-items { position: absolute; left: 8px; right: 8px; bottom: 100%; z-index: 5; display: flex; flex-direction: column; padding: var(--space-2) 0; background: var(--surface-000); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow:var(--shadow-md); }
.name-items a { display: block; padding: var(--space-2) var(--space-4); border-left: 0; color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; }
.name-items a:hover { background: var(--surface-brand-soft); }
.name-items a.on { color: var(--ink); background: var(--surface-brand-soft); }
.name-items form.inline { display: block; margin: var(--space-1) 0 0; padding: var(--space-2) var(--space-2) 0; border-top: 1px solid var(--border); }
.name-items button.quiet { padding-left: var(--space-2); }

/* Admin: the same shell on the soft brand tint, so staff always know where they are. */
.admin .side { background: var(--surface-brand-soft); border-right-color: var(--border); }
.admin .band-label { color: var(--ink-accent); }
.admin .menu a { color: var(--ink); }
.admin .menu a .num { color: var(--ink-muted); }
.admin .menu a:hover { background: var(--surface-100); }
.admin .menu a.on { border-left-color: var(--surface-brand); background: var(--surface-100); color: var(--ink); }
.admin .menu .sep { border-top-color: var(--border); }
.admin a.site, .admin .menu a.site { color: var(--ink-muted); }
.admin a.site:hover { color: var(--ink); }
.admin .who { border-top-color: var(--border); color: var(--ink-muted); }
.admin .who strong { color: var(--ink); }
.admin .who button.quiet { color: var(--ink-brand); }

main { width: 100%; max-width: 1040px; padding: var(--space-7) clamp(var(--space-5), 4vw, var(--space-8)) var(--space-8); }

/* Without a menu (sign-in, setup, a bare message) and on a phone, the side becomes a bar across the top. */
.shell.bare { display: block; }
.shell.bare main { max-width: 640px; margin: 0 auto; padding-top: var(--space-6); }
.shell.bare .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: var(--space-3) var(--space-4); border-right: 0; border-bottom: 1px solid var(--border); }
.shell.bare .brand { padding: 0; }
.shell.bare .brand + .band-label { margin: 0 0 0 var(--space-3); }
.shell.bare a.site { margin-left: var(--space-4); }
.shell.bare .who { margin: 0 0 0 auto; padding: 0; border: 0; flex-direction: row; align-items: center; gap: var(--space-2); }
.shell.bare .who button.quiet { padding-left: var(--space-2); padding-right: var(--space-2); }
.admin.bare .side { border-bottom-color: var(--border); }
@media (max-width: 800px) {
  .shell { display: block; }
  main { padding: var(--space-5) var(--space-4) var(--space-8); }
  .shell .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: var(--space-3) var(--space-4); border-right: 0; border-bottom: 1px solid var(--border); }
  .admin .side { border-bottom-color: var(--border); }
  .shell .brand { padding: 0; order: 1; }
  .shell .brand + .band-label { margin: 0 0 0 var(--space-3); order: 1; }
  .shell .side > a.site { order: 1; margin-left: var(--space-4); }
  .shell .who { order: 2; margin: 0 0 0 auto; padding: 0; border: 0; flex-direction: row; align-items: center; gap: var(--space-2); }
  .shell .who button.quiet { padding-left: var(--space-2); padding-right: var(--space-2); }
  .shell .menu { order: 3; width: 100%; flex-direction: row; flex-wrap: wrap; margin-top: var(--space-2); }
  .shell .menu a { padding: var(--space-2) var(--space-3); border-left: 0; border-bottom: 3px solid transparent; font-size: 15px; }
  .shell .menu a .num { display: none; }
  .shell .menu a.on { border-bottom-color: var(--surface-brand); }
  .admin .menu a.on { border-bottom-color: var(--surface-brand); }
  .shell .menu .sep { display: none; }
  .shell:not(.admin) .menu { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .shell:not(.admin) .menu a { flex: 1 1 auto; justify-content: center; padding: var(--space-2) 0; font-size: 13px; line-height: 18px; }
  .shell .name-menu { order: 2; margin: 0 0 0 auto; border: 0; }
  .shell .name-menu summary { padding: var(--space-2) 0 var(--space-2) var(--space-2); max-width: 46vw; font-size: 15px; }
  .shell .name-menu summary::after { content: "\25BE"; }
  .shell .name-menu[open] summary::after { content: "\25B4"; }
  .shell .name-menu[open]::before { content: ""; position: fixed; inset: 0; z-index: 20; background: var(--scrim); }
  .shell .name-menu summary { position: relative; z-index: 30; }
  .shell .name-items { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 30; width: auto; max-height: none; padding: var(--space-2) 0 max(16px, env(safe-area-inset-bottom)); border-width: 1px 0 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow:var(--shadow-md); }
  .shell .name-items a { padding: 0 var(--space-5); min-height: 52px; display: flex; align-items: center; border-bottom: 1px solid var(--border); font-size: 18px; line-height: 24px; }
  .shell .name-items form.inline { margin: 0; padding: 0; border-top: 0; }
  .shell .name-items button.quiet { width: 100%; min-height: 52px; padding: 0 var(--space-5); text-align: left; font-size: 18px; line-height: 24px; }
}

/* A page: a copper label over a heavy title, then sections divided by rules. */
.head { margin: 0 0 var(--space-5); }
.eyebrow { margin: 0 0 var(--space-2); color: var(--ink-accent); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
p.back { margin: 0 0 6px; }
p.back a { display: inline-block; padding: 8px 0; font-weight: 700; }
h1 { margin: 0; color: var(--ink); font-family: var(--font-display); font-size: 26px; line-height: 32px; font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.lead { max-width: 62ch; margin: var(--space-3) 0 0; color: var(--ink-muted); }
h2 { margin: 0 0 var(--space-2); color: var(--ink); font-size: 18px; line-height: 24px; font-weight: 600; }
h3 { margin: var(--space-5) 0 var(--space-2); color: var(--ink); font-size: 15px; line-height: 22px; font-weight: 600; }
section.card { margin: 0; padding: var(--space-5) 0 var(--space-3); border-top: 1px solid var(--border); }
.muted { color: var(--ink-muted); }
.row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); padding: var(--space-3) 0; border-bottom: 1px solid var(--border); }
.big { color: var(--ink); font-family: var(--font-mono); font-size: 24px; line-height: 28px; font-weight: 500; font-variant-numeric: tabular-nums; }
.note { margin: 0 0 var(--space-5); padding: var(--space-3) var(--space-4); border-left: 3px solid var(--surface-brand); background: var(--surface-brand-soft); }
.note.warn { border-left-color: var(--warning); background: var(--warning-soft); }
span.warn { color: var(--warning); font-weight: 600; }
code, pre { font: 400 13px/18px var(--font-mono); background: var(--surface-200); border-radius: var(--radius-sm); }
code { padding: 1px var(--space-1); overflow-wrap: anywhere; }
code.copyable { user-select: all; -webkit-user-select: all; }
.copyblock { display: flex; align-items: center; gap: var(--space-2); margin: var(--space-2) 0 var(--space-3); padding: var(--space-2) var(--space-1) var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-200); max-width: 100%; }
.copyblock code { flex: 1 1 auto; min-width: 0; padding: 0; background: none; }
.copyblock button { flex: none; }
a.button { display: inline-block; padding: var(--space-2) var(--space-4); border-radius: var(--radius-md); background: var(--surface-brand); color: var(--on-brand); font-weight: 600; text-decoration: none; }
a.button.quiet { background: none; color: var(--ink-brand); box-shadow: inset 0 0 0 1px var(--surface-brand); }
a.button:hover { filter: brightness(1.08); text-decoration: none; }
.routes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: var(--space-3); margin: var(--space-2) 0 var(--space-3); }
a.route { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-4) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-100); color: var(--ink); text-decoration: none; }
a.route:hover { border-color: var(--surface-brand); }
a.route.on { border: 2px solid var(--surface-brand); padding: var(--space-3) var(--space-4); }
ol.steps li > div { flex: 1 1 auto; min-width: 0; }
ol.steps li > div > p { margin: 0 0 var(--space-2); }
#check p { margin: var(--space-2) 0; }
pre { padding: var(--space-3) var(--space-4); overflow-x: auto; }
.pre { white-space: pre-wrap; }
.break { word-break: break-all; }
main svg { max-width: 100%; height: auto; }
ol.steps { padding-left: var(--space-5); } ol.steps li { margin: var(--space-2) 0; } ol.steps li.done { color: var(--ink-muted); }

/* Forms: solid moss for the main action, quiet text in moss for the rest. */
form.inline { display: inline; }
input, select, textarea { max-width: 100%; margin: 2px 0; padding: var(--space-2) var(--space-3); border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface-100); color: var(--ink); font: inherit; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
input[type=checkbox] { margin: 0 var(--space-1) 0 0; }
label.check { display: block; margin: var(--space-1) 0; }
fieldset { margin: var(--space-3) 0; padding: var(--space-2) var(--space-3); border: 1px solid var(--border-strong); border-radius: var(--radius-md); }
button { padding: var(--space-2) var(--space-4); border: 1px solid var(--surface-brand); border-radius: var(--radius-md); background: var(--surface-brand); color: var(--on-brand); font: inherit; font-weight: 600; cursor: pointer; }
button:hover { filter: brightness(1.08); }
button:disabled { opacity: 0.5; cursor: default; }
button.quiet { padding-left: var(--space-2); padding-right: var(--space-2); border-color: transparent; background: transparent; color: var(--ink-brand); }
button.quiet:hover { text-decoration: underline; filter: none; }
@media (max-width: 800px) {
  input:not([type=checkbox]):not([type=file]):not([type=hidden]), select, textarea { width: 100%; }
}
/* Sign in with Google and Apple: the providers' own button rules, their marks served from /static/brand, never hot-linked. */
.provider { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 40px; margin: var(--space-1) var(--space-2) var(--space-1) 0;
  border-radius: var(--radius-sm); text-decoration: none; cursor: pointer; white-space: nowrap; max-width: 100%; }
.provider::before { content: ""; flex: none; background: center / contain no-repeat; }
a.provider:hover, button.provider:hover { filter: brightness(0.96); text-decoration: none; }
.provider.google, button.provider.google { padding: 0 var(--space-3) 0 var(--space-3); gap: var(--space-3); border: 1px solid #747775; background: #fff; color: #1f1f1f;
  font: 500 14px/20px "Google Sans", Roboto, system-ui, sans-serif; letter-spacing: 0.25px; }
.provider.google::before { width: 20px; height: 20px; background-image: url(/static/brand/google.svg); }
.provider.apple, button.provider.apple { padding: 0 var(--space-4); gap: var(--space-2); border: 1px solid #000; background: #000; color: #fff; min-height: 40px; border-radius: var(--radius-sm);
  font: 500 15px/20px -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif; }
.provider.apple::before { width: 14px; height: 18px; background-image: url(/static/brand/apple-white.svg); }
[data-theme="dark"] {
  .provider.google, button.provider.google { border-color: #8e918f; background: #131314; color: #e3e3e3; }
  .provider.apple, button.provider.apple { border-color: #fff; background: #fff; color: #000; }
  .provider.apple::before { background-image: url(/static/brand/apple-black.svg); }
}
@media (max-width: 480px) { .provider { display: flex; width: 100%; margin-right: 0; } }

/* Tables sit in .wrap, which scrolls on its own so the page never does. */
.wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: var(--space-2) var(--space-3) var(--space-2) 0; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
th { color: var(--ink-muted); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }

nav.tabs { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); margin: 0 0 var(--space-2); border-bottom: 1px solid var(--border); }
nav.tabs + section.card { border-top: 0; }
nav.tabs a { padding: var(--space-2) 0; border-bottom: 3px solid transparent; color: var(--ink); font-weight: 600; text-decoration: none; }
nav.tabs a:hover { color: var(--ink-brand); }
nav.tabs a.on { border-bottom-color: var(--surface-brand); color: var(--ink); }

/* The record: Feed, Profile and Docs. */
.filters { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); margin: 0 0 var(--space-3); }
.filters a { padding: var(--space-1) 0; border-bottom: 2px solid transparent; color: var(--ink); font-weight: 600; text-decoration: none; }
.filters a:hover { color: var(--ink-brand); }
.filters a.on { border-bottom-color: var(--surface-brand); color: var(--ink); }
.count { color: var(--ink-muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0.04em; font-family: var(--font-mono); }
h2.day { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); }
ul.entries { margin: 0; padding: 0; list-style: none; }
.entry { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); gap: 0 var(--space-3); padding: var(--space-2) 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.entry:first-child { border-top: 0; }
.entry time { padding-top: 2px; color: var(--ink-muted); font-size: 13px; line-height: 18px; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.entry > div:only-child { grid-column: 1 / -1; }
.tag { display: inline-block; margin-right: var(--space-2); padding: 0 var(--space-2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--ink-accent); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; vertical-align: 1px; }
.from { display: block; margin-top: 2px; color: var(--ink-muted); font-size: 13px; }
details.group { border-top: 1px solid var(--border); padding: var(--space-2) 0 var(--space-3); }
details.group > summary { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); padding: var(--space-2) 0; color: var(--ink); font-size: 18px; line-height: 24px; font-weight: 600; cursor: pointer; }
.dropzone { display: block; padding: var(--space-5) var(--space-4); border: 2px dashed var(--border); border-radius: var(--radius-lg); background: var(--surface-100); text-align: center; }
.dropzone.over { border-color: var(--surface-brand); background: var(--surface-brand-soft); }
.dropzone input { max-width: 100%; }
#upload-results { margin: 0; padding-left: var(--space-5); }
@media (max-width: 800px) {
  .entry { grid-template-columns: 4.2em minmax(0, 1fr); gap: 0 var(--space-2); }
}

/* Connections: a block per source, then the catalog of what can be added. */
.source { padding: var(--space-4) 0; border-bottom: 1px solid var(--border); }
.source p { margin: var(--space-2) 0; }
.source-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--space-3); }
.source-head h3 { margin: 0; font-size: 18px; line-height: 24px; overflow-wrap: anywhere; }
.source .kind { color: var(--ink-muted); font-size: 13px; line-height: 18px; }
.source .state { margin-left: auto; color: var(--ink-brand); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.source .state.warn { color: var(--warning); }
.tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-2) 0; padding: 0; list-style: none; }
.tags li { padding: 1px var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface-accent-soft); font-size: 13px; }
.source .actions { margin: var(--space-2) 0 0 calc(-1 * var(--space-2)); }
.source details { margin-top: var(--space-2); }
.source summary { cursor: pointer; color: var(--ink-brand); font-weight: 600; }
.source .line { display: block; margin: var(--space-1) 0; overflow-wrap: anywhere; }
.source .line.warn { color: var(--warning); font-weight: 600; }
.grants { margin: var(--space-2) 0 0; padding: 0; list-style: none; }
.grants li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 var(--space-3); padding: var(--space-2) 0; border-top: 1px solid var(--border); }
#idle > summary::before { content: "\25B8"; margin-right: var(--space-2); color: var(--ink-brand); }
#idle[open] > summary::before { content: "\25BE"; }
#idle > form { margin-left: calc(-1 * var(--space-2)); }
#idle > summary { justify-content: flex-start; }
form:not(.inline) > button + a { margin-left: var(--space-4); }
.keyshow .copyblock { padding: var(--space-4) var(--space-2) var(--space-4) var(--space-4); }
.keyshow .copyblock code { font-size: 18px; line-height: 1.5; word-break: break-all; }
.once { margin: 0 0 var(--space-5); padding: var(--space-3) var(--space-4); border-left: 3px solid var(--surface-accent); background: var(--surface-accent-soft); }

/* Goals, Research and panels: charts are inline SVG coloured by the theme; the numbers sit beside them as text. */
.stat { margin: var(--space-1) 0 var(--space-2); }
.unit { margin-left: 0.25em; color: var(--ink-muted); font-size: 0.5em; font-weight: 600; }
.goal .row { flex-wrap: wrap; border-bottom: 0; padding-bottom: 0; }
.goal .row > div { flex: 1 1 14em; min-width: 0; }
.goal .row h2, .project h2 { overflow-wrap: anywhere; }
.goal .row .big { flex: none; }
.plan { margin: var(--space-3) 0; padding-left: var(--space-3); border-left: 3px solid var(--border); }
.plan p { margin: var(--space-1) 0; }
.panel { margin: 0 0 var(--space-5); }
.panels { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 0 var(--space-6); }
.panels .panel { min-width: 0; overflow-x: auto; }
.dashboards { margin: var(--space-1) 0 var(--space-3); padding: 0; list-style: none; }
.dashboards li { padding: var(--space-3) 0; border-top: 1px solid var(--border); }
.dashboards li:first-child { border-top: 0; }
.dashboards a { font-weight: 600; overflow-wrap: anywhere; }
.dashboards p { margin: 2px 0; }
.dashboards .muted { display: block; font-size: 15px; }
.panel h3 { margin-top: var(--space-4); }
/* A dashboard's tiles: tiles.js places them on the grid; with no script, or on a phone, they are the plain grid above. */
.tiles-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-4); min-height: 32px; margin-bottom: var(--space-3); }
.tiles-bar [data-tiles-reset] { margin-left: auto; }
main:has(.tiles.arranged) { max-width: none; padding-bottom: var(--space-5); }
.tile { position: relative; min-width: 0; }
.tile .panel h3 { padding-right: var(--space-6); }
.tile-menu { position: absolute; top: 6px; right: 6px; z-index: 2; }
.tile-menu > summary { position: relative; display: block; width: 24px; height: 24px; border-radius: var(--radius-sm); color: var(--ink-muted); list-style: none; cursor: pointer; }
.tile-menu > summary::-webkit-details-marker { display: none; }
.tile-menu > summary span, .tile-menu > summary span::before, .tile-menu > summary span::after { position: absolute; width: 12px; height: 2px; border-radius: 1px; background: currentColor; content: ""; }
.tile-menu > summary span { top: 11px; left: 6px; }
.tile-menu > summary span::before { top: -4px; left: 0; }
.tile-menu > summary span::after { top: 4px; left: 0; }
.tile-menu > summary:hover, .tile-menu[open] > summary { background: var(--border); color: var(--ink); }
.tile-menu-list { position: absolute; top: 28px; right: 0; padding: var(--space-1); white-space: nowrap; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-100); box-shadow:var(--shadow-md); }
.tile-menu-list form { margin: 0; }
.tile-menu-list button { display: block; width: 100%; margin: 0; padding: var(--space-2) var(--space-3); border: 0; border-radius: var(--radius-sm); background: none; color: var(--ink); font-weight: 400; text-align: left; }
.tile-menu-list button:hover, .tile-menu-list button:focus-visible { background: var(--border); filter: none; }
.tiles.arranged .tile:has(.tile-menu[open]) { z-index: 3; overflow: visible; }
.tiles.arranged { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-3); }
.tiles.arranged .tile { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-100); }
.tiles.arranged .tile.held { z-index: 1; border-color: var(--surface-accent); box-shadow:var(--shadow-md); }
.tiles.arranged .panel { display: flex; flex-direction: column; height: 100%; margin: 0; padding: var(--space-3) var(--space-4); overflow: auto; }
.tiles.arranged .panel h3 { flex: none; margin: 0 var(--space-6) var(--space-1) 0; padding-right: var(--space-6); cursor: grab; touch-action: none; user-select: none; overflow-wrap: anywhere; }
.tiles.arranged .panel .chart { flex: 1 1 0; max-width: none; height: 0; min-height: 90px; aspect-ratio: auto; margin: 0; }
.tile-move, .tile-size { display: none; }
.tiles.arranged .tile-move, .tiles.arranged .tile-size { position: absolute; display: block; margin: 0; padding: 0; border: 0; background: none; color: var(--ink-muted); touch-action: none; }
.tiles.arranged .tile-move { top: 6px; right: 32px; width: 24px; height: 24px; font-size: 15px; line-height: 24px; cursor: grab; }
.tiles.arranged .tile-size { right: 0; bottom: 0; width: 20px; height: 20px; cursor: nwse-resize; }
.tiles.arranged .tile-size::after { content: ""; position: absolute; right: 5px; bottom: 5px; width: 8px; height: 8px; border-right: 2px solid var(--ink-muted); border-bottom: 2px solid var(--ink-muted); }
.tiles.arranged .tile.held .panel h3, .tiles.arranged .tile.held .tile-move { cursor: grabbing; }
.chart { display: grid; grid-template: minmax(0, 1fr) 20px / auto minmax(0, 1fr) auto; width: 100%; max-width: 520px; aspect-ratio: 2 / 1; margin: var(--space-2) 0; padding-top: var(--space-5); box-sizing: border-box; }
.chart svg { display: block; height: 100%; max-width: none; overflow: visible; }
.chart .y { grid-area: 1 / 1; }
.chart .plot { grid-area: 1 / 2; width: 100%; }
.chart .tail { grid-area: 1 / 3; }
.chart .x { grid-area: 2 / 2; width: 100%; }
.chart .plot svg { width: 100%; }
.chart .off { visibility: hidden; }
.chart .grid { stroke: var(--chart-grid); stroke-width: 1; opacity: 0.6; }
.chart .axis { stroke: var(--ink-muted); stroke-width: 1; }
.chart .series { fill: none; stroke: var(--chart-1); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart .dot { fill: var(--chart-1); }
.chart .bar { fill: var(--chart-1); }
.chart .bar.last, .chart circle.last { fill: var(--chart-2); }
.chart text { fill: var(--ink-muted); font-size: 11px; }
.chart text.value { fill: var(--ink); font-weight: 600; paint-order: stroke; stroke: var(--surface-100); stroke-width: 3px; }
.chart .s2.series { stroke: var(--chart-2); } .chart .s2.dot { fill: var(--chart-2); } .chart-key .s2 i { background: var(--chart-2); }
.chart .s3.series { stroke: var(--chart-3); } .chart .s3.dot { fill: var(--chart-3); } .chart-key .s3 i { background: var(--chart-3); }
.chart .s4.series { stroke: var(--chart-4); } .chart .s4.dot { fill: var(--chart-4); } .chart-key .s4 i { background: var(--chart-4); }
.chart .s5.series { stroke: var(--chart-5); } .chart .s5.dot { fill: var(--chart-5); } .chart-key .s5 i { background: var(--chart-5); }
.chart .s6.series { stroke: var(--chart-6); } .chart .s6.dot { fill: var(--chart-6); } .chart-key .s6 i { background: var(--chart-6); }
.chart-key { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); margin: var(--space-2) 0 0; font-size: 13px; color: var(--ink-muted); }
.chart-key span { display: inline-flex; align-items: center; gap: var(--space-1); }
.chart-key i { display: inline-block; width: 12px; height: 3px; border-radius: var(--radius-pill); background: var(--chart-1); }
.chart.lines { padding-top: var(--space-2); }
.chart-data { margin: 0 0 var(--space-2); font-size: 15px; }
.view-box { position: relative; width: 100%; max-width: 520px; min-height: 200px; overflow: auto; }
.view-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; visibility: hidden; }
.view-box[data-state="drawn"] { overflow: hidden; }
.view-box[data-state="drawn"] iframe { visibility: visible; }
.view-box[data-state="drawn"] .view-plain { visibility: hidden; }
.tiles.arranged .panel .view-box { flex: 1 1 0; max-width: none; height: 0; min-height: 90px; }
.chart-data summary { color: var(--ink-brand); cursor: pointer; }
.figures { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin: var(--space-1) 0 var(--space-3); }
.figure { display: flex; flex-direction: column; gap: 2px; }
.when { margin: var(--space-3) 0 2px; color: var(--ink-accent); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.finding { padding: var(--space-1) 0 var(--space-2); }
.finding + .finding { border-top: 1px solid var(--border); }
.project h2 a { text-decoration: none; }
.project h2 a:hover { text-decoration: underline; }

/* Home: the setup steps, then for a returning person the cards, goals with their numbers, what is worth knowing, findings and pinned panels. */
ol.steps { margin: var(--space-2) 0 var(--space-4); padding: 0; list-style: none; counter-reset: step; }
ol.steps li { display: flex; gap: var(--space-4); align-items: baseline; margin: 0; padding: var(--space-3) 0; border-top: 1px solid var(--border); counter-increment: step; }
ol.steps li::before { content: counter(step, decimal-leading-zero); min-width: 1.6em; color: var(--ink-accent); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0.06em; font-family: var(--font-mono); }
ol.steps li.done::before { color: var(--ink-muted); }
.label { margin: 0; color: var(--ink-muted); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; overflow-wrap: anywhere; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--space-4); margin: var(--space-3) 0 var(--space-2); }
.gap { display: flex; flex-direction: column; padding: var(--space-4) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-100); min-width: 0; }
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: var(--space-4); margin: var(--space-4) 0; }
.project-card { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-100); min-width: 0; }
.project-card h2 { margin: 0; font-size: 20px; line-height: 28px; overflow-wrap: anywhere; }
.project-card p { margin: 0; }
.project-card .muted { font-size: 14px; line-height: 20px; }
.gap h3 { margin: var(--space-2) 0 var(--space-3); font-size: 18px; line-height: 24px; line-height: 1.35; overflow-wrap: anywhere; }
.answers { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--space-1); margin: auto calc(-1 * var(--space-2)) 0; }
.answers details { flex: 1 1 100%; padding: 0 var(--space-2); }
.answers summary { cursor: pointer; padding: var(--space-1) 0; color: var(--ink-brand); font-weight: 600; }
.answers .options { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); padding: var(--space-1) 0 var(--space-2); }
.answers .options textarea { flex: 1 1 100%; }
.answers .options form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); }
.answers .options button { padding: var(--space-2) var(--space-4); }
.answers .options button.quiet { margin-left: calc(-1 * var(--space-2)); }
.standouts { margin: var(--space-1) 0 var(--space-3); padding: 0; list-style: none; }
.standouts li { padding: var(--space-3) 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.standouts li:first-child { border-top: 0; }
.standouts li p { margin: var(--space-1) 0 0; }
.goal-lines .numbers { margin: var(--space-1) 0 0; padding: 0 0 0 var(--space-4); color: var(--ink); font-size: 15px; }
.goal-lines .numbers li { padding: 2px 0; border: 0; }
.goal-lines { margin: var(--space-1) 0 var(--space-3); padding: 0; list-style: none; }
.goal-lines li { padding: var(--space-2) 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.goal-lines li:first-child { border-top: 0; }
.goal-lines a { font-weight: 600; }
.house .headline { margin: var(--space-1) 0 var(--space-3); color: var(--ink); font-size: 18px; line-height: 24px; font-weight: 600; overflow-wrap: anywhere; }
.valves { margin: 0 0 var(--space-4); padding: 0; list-style: none; }
.valve { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--space-3); padding: var(--space-2) 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.valve:first-child { border-top: 0; }
.valve .name { font-weight: 600; }
.valve .state { padding: 0 var(--space-2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--ink-muted); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.valve .state.on { border-color: var(--surface-accent); color: var(--ink-accent); }
button.big-button { padding: var(--space-4) var(--space-5); font-size: 18px; }
button.stop { border-color: var(--surface-accent); background: var(--surface-accent); }
.sent { margin: var(--space-4) 0 var(--space-2); }
.results { margin: var(--space-1) 0; padding: 0; list-style: none; }
.results li { padding: var(--space-2) 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.results li:first-child { border-top: 0; }
.results .part { display: inline-block; margin-left: var(--space-3); color: var(--ink-muted); font-size: 13px; line-height: 18px; }
@media (max-width: 800px) { .house form.inline, .house button.big-button { display: block; width: 100%; } }
ol.chain li.current::before { color: var(--ink-brand); }
#step .label { margin-bottom: var(--space-1); }
#step h2 { margin-top: 0; }

/* Tracks: the map, the speed legend, an entry's numbers. */
.map { width: 100%; height: 420px; margin: var(--space-1) 0 var(--space-3); border: 1px solid var(--border); background: var(--surface-200); }
.map[data-ready="true"] { background: var(--surface-100); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); margin: 0 0 var(--space-3); color: var(--ink-muted); font-size: 13px; line-height: 18px; }
.legend span { white-space: nowrap; }
.legend #legend-note { flex-basis: 100%; }
.legend .ramp { flex: 1 1 60px; max-width: 200px; height: 10px; border-radius: var(--radius-pill); }
.numbers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-3) var(--space-5); margin: 0 0 var(--space-3); }
.numbers div { padding-top: var(--space-2); border-top: 1px solid var(--border); }
.numbers dt { color: var(--ink-muted); font-size: 13px; text-transform: capitalize; }
.numbers dd { margin: 0; font-size: 24px; line-height: 28px; font-weight: 500; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
ul.plain { margin: 0 0 var(--space-3); padding: 0; list-style: none; }
button[aria-pressed="true"] { text-decoration: underline; font-weight: 600; }
.popup-line { margin: var(--space-1) 0 0; white-space: pre-line; }
.maplibregl-popup-content { background: var(--surface-100); color: var(--ink); }
@media (max-width: 720px) { .map { height: 320px; } }
.modes { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-2); }
.modes button { padding: var(--space-2) var(--space-4); background: transparent; color: var(--ink-brand); }
.modes button[aria-pressed="true"] { background: var(--surface-brand); color: var(--on-brand); text-decoration: none; }
.legend #legend-name { font-weight: 600; color: var(--ink); }
.profile { margin: 0 0 var(--space-2); touch-action: pan-y; cursor: crosshair; user-select: none; }
.profile:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.profile svg { display: block; max-width: 100%; }
.profile .area { fill: var(--surface-brand-soft); }
.profile .line { fill: none; stroke: var(--chart-1); stroke-width: 2; }
.profile .band { fill: var(--chart-2); opacity: 0.3; }
.profile .marker { stroke: var(--chart-2); stroke-width: 2; }
.profile text { fill: var(--ink-muted); font-size: 12px; }
.readout { min-height: 1.5em; margin: 0 0 var(--space-3); color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; font-family: var(--font-mono); }

/* Promises: a line of seven day cells, the ticked days filled. */
.promises { margin: var(--space-1) 0 0; padding: 0; list-style: none; }
.promises li { padding: var(--space-3) 0; border-top: 1px solid var(--border); }
.promises li:first-child { border-top: 0; }
.promises p { margin: 0 0 var(--space-1); }
.ticks { display: flex; gap: var(--space-2); }
.tick { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 50%; color: var(--ink-muted); font-size: 12px; font-weight: 600; }
.tick.on { background: var(--surface-brand); border-color: var(--surface-brand); color: var(--on-brand); }
h2.found { margin: var(--space-6) 0 var(--space-2); font-size: 18px; line-height: 24px; }
.name-menu summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Files: a search and sort bar over the list, and the actions under each file. */
.filterbar { display: flex; flex-wrap: wrap; align-items: end; gap: var(--space-2) var(--space-3); margin: 0 0 var(--space-3); }
.filterbar input[type="search"] { flex: 1 1 220px; min-width: 0; }
.entry .actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); margin-top: var(--space-2); }
.entry .actions details { margin: 0; }
.entry .actions details form { display: grid; gap: var(--space-2); max-width: 420px; margin-top: var(--space-2); }

/* Instructions for your assistant: each rule in full with Edit and Remove under it; the editor and the add box are multi-line (#993). */
.instruction .words { margin: 0 0 2px; overflow-wrap: anywhere; }
.instruction label, .add-instruction label { display: block; margin: 0 0 var(--space-1); font-weight: 600; }
.instruction textarea, .add-instruction textarea { display: block; box-sizing: border-box; width: 100%; max-width: 640px; resize: vertical; }
.instruction .actions a.button, .instruction .actions summary { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--space-2); color: var(--ink-brand); cursor: pointer; }
.instruction .actions details[open] { flex: 1 1 100%; }
.instruction .actions details form p { margin: 0; }
.add-instruction { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--border); }
.add-instruction p { margin: var(--space-1) 0 var(--space-2); }

/* Connections: a card for each thing a person can connect, with the next step as one big button. */
/* Connections (#1487): one grid of tiles on both tabs, each opening its own page in a panel from the right. */
.conn-group { margin: 0 0 var(--space-5); }
.conn-group > .label { margin: 0 0 var(--space-2); }
.conn-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: var(--space-3); }
a.conn-tile { display: flex; flex-direction: column; gap: var(--space-1); min-height: 88px; padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-100); color: var(--ink); text-decoration: none; }
a.conn-tile:hover { border-color: var(--surface-brand); text-decoration: none; }
a.conn-tile:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
a.conn-tile.warn { border-color: var(--warning); }
.conn-name { font-size: 18px; line-height: 24px; font-weight: 600; overflow-wrap: anywhere; }
.conn-status { display: flex; align-items: flex-start; gap: var(--space-2); margin-top: auto; color: var(--ink-muted); font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.conn-status .icon { flex: none; margin-top: 2px; }
.conn-status.ok .icon { color: var(--success); }
.conn-status.warn { color: var(--ink); }
.conn-status.warn .icon { color: var(--warning); }
.conn-status.off .icon { color: var(--ink-muted); }
.idle-link { margin: var(--space-2) 0 0; }
.back-link { margin: 0 0 var(--space-3); }
.conn-head { margin: 0 0 var(--space-4); }
.conn-detail .part { padding: var(--space-3) 0; border-top: 1px solid var(--border); }
.conn-detail .part-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--space-3); }
.conn-detail .part-head h3 { margin: 0; font-size: 18px; line-height: 24px; overflow-wrap: anywhere; }
.conn-detail .part-head .state { margin-left: auto; color: var(--ink-brand); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.conn-detail .part-head .state.off { color: var(--ink-muted); }
.conn-detail details { margin: var(--space-2) 0; }
.conn-detail summary { cursor: pointer; color: var(--ink-brand); font-weight: 600; }
.conn-detail details.coding { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--border); }
.drawer-scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); opacity: 0; transition: opacity 200ms ease; }
.drawer-scrim.open { opacity: 1; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; width: min(560px, 100%); overflow-y: auto; padding: var(--space-5) var(--space-5) var(--space-8); background: var(--surface-000); box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform 200ms ease; }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin: 0 0 var(--space-3); }
.drawer-head h2 { margin: 0; overflow-wrap: anywhere; }
.drawer-head h2:focus { outline: none; }
.drawer .conn-detail { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .drawer, .drawer-scrim { transition: none; } }
.get-started { margin: 0 0 var(--space-5); padding: var(--space-5); border: 1px solid var(--surface-brand); border-radius: var(--radius-lg); background: var(--surface-100); }
.get-started .label { margin-bottom: var(--space-1); color: var(--ink-brand); }
.get-started h2 { font-size: 22px; line-height: 28px; }
.get-started p { max-width: 62ch; margin: 0 0 var(--space-3); }
.get-started p:last-child, .get-started form.hide { margin-bottom: 0; }
.get-started a.button { padding: var(--space-3) var(--space-5); }
.get-started form.hide button.quiet { padding-left: 0; color: var(--ink-muted); }
.own-way ul { margin: var(--space-2) 0 0; padding: 0; list-style: none; }
.own-way li { padding: var(--space-2) 0; }
.own-way li .muted { display: block; font-size: 15px; }
@media (max-width: 800px) {
  .get-started { padding: var(--space-4); }
  .get-started a.button { display: block; text-align: center; }
}

/* Help and feedback: the support chat (support.js) sits inside the panel the floating button opens (voice.js, voice.css). */
.help-chat { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.help-head { display: flex; align-items: flex-start; gap: var(--space-2); padding: var(--space-3) var(--space-7) var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); }
.help-label { flex: 1 1 auto; min-width: 0; margin: 0; color: var(--ink-muted); font-size: 13px; line-height: 1.45; }
.help-log { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: var(--space-3) var(--space-4); overflow-wrap: anywhere; }
.help-msg { margin: 0 0 var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); font-size: 15px; }
.help-msg p { margin: 0 0 var(--space-2); }
.help-msg p:last-child { margin-bottom: 0; }
.help-msg ul, .help-msg ol { margin: 0 0 var(--space-2); padding-left: var(--space-5); }
.help-msg li { margin: 0 0 2px; }
.help-msg ul:last-child, .help-msg ol:last-child { margin-bottom: 0; }
.help-msg code { font-size: 0.92em; }
.help-msg a { color: var(--ink-brand); text-decoration: underline; }
.help-msg.person { margin-left: var(--space-5); background: var(--surface-brand-soft); color: var(--ink); }
.help-msg.assistant { margin-right: var(--space-5); border: 1px solid var(--border); }
.help-msg.notice { border-left: 3px solid var(--surface-accent); background: var(--surface-accent-soft); }
.help-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); padding: var(--space-2) var(--space-4) 0; }
button.help-talk { border-color: var(--surface-brand); background: transparent; color: var(--ink-brand); }
button.help-talk.attention { background: var(--surface-brand); color: var(--on-brand); }
.help-form { display: flex; align-items: flex-end; gap: var(--space-2); padding: var(--space-2) var(--space-4) var(--space-1); }
.help-form textarea { flex: 1 1 auto; min-width: 0; width: auto; margin: 0; resize: none; }
.help-form button { flex: none; }
.help-status { min-height: 1.6em; margin: 0; padding: 0 var(--space-4) var(--space-2); color: var(--ink-muted); font-size: 13px; }

/* Who is signed in, and the way to be someone else, above an assistant's request (#689). */
section.signed-as { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); }
section.signed-as p { margin: 0; display: flex; flex-direction: column; }
section.signed-as form { margin: 0; }
section.signed-as button.quiet { padding-left: 0; }

/* Sign-in, round two: the buttons of the name menu's form stack, and the provider buttons sit apart (#698). */
.name-items form.inline button { display: block; text-align: left; }

/* Add a connection: a card the search hides stays hidden (#703). */
.source[hidden] { display: none; }

/* The Activity page: what people look for as tabs, one line of background readings a day, a session as a card (issue 700). */
.filters.lookfor { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; gap: var(--space-1) var(--space-4); padding-bottom: var(--space-2); scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.filters.lookfor a { flex: 0 0 auto; }
ul.sessions { margin: 0; padding: 0; list-style: none; }
.session { padding: var(--space-3) 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.session:first-child { border-top: 0; }
.session .top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px var(--space-3); }
.session time { color: var(--ink-muted); font-size: 13px; line-height: 18px; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.session .facts { margin-top: 2px; color: var(--ink); }
.session .route { display: inline-block; margin-top: var(--space-2); font-weight: 600; }
.entry.summary .pre a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--ink-muted); }
/* A click that takes longer than 300 ms: a thin bar across the top and the clicked link dimmed (working.js). */
#working-bar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 50; opacity: 0; pointer-events: none; overflow: hidden; }
#working-bar::before { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; background: var(--surface-accent); animation: working-slide 1.1s ease-in-out infinite; }
.is-working #working-bar { opacity: 1; transition: opacity .15s; }
a.working, button.working { opacity: .55; }
@keyframes working-slide { from { left: -40%; } to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { #working-bar::before { animation: none; left: 0; width: 100%; opacity: .6; } }

.loading { display: inline-block; width: 14px; height: 14px; margin-right: var(--space-2); border: 2px solid var(--border); border-top-color: var(--ink); border-radius: 50%; vertical-align: -2px; animation: loading 0.8s linear infinite; }
@keyframes loading { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loading { animation: none; } }
.wait .lever { color: var(--ink); font-weight: 600; }
.wait .lever + .from { margin-left: var(--space-5); }
/* A workout's page: heart rate zones as a bar and a table, and the person's note (lifelever#710). Zone colours run cool to hot and read in both themes. */
svg.zones { display: block; width: 100%; height: 14px; margin: var(--space-1) 0 var(--space-3); border-radius: var(--radius-pill); }
.zone-easy { fill: var(--chart-5); background: var(--chart-5); }
.zone-steady { fill: var(--chart-2); background: var(--chart-2); }
.zone-hard { fill: var(--warning); background: var(--warning); }
.zone-maximum { fill: var(--danger); background: var(--danger); }
.swatch { display: inline-block; width: 10px; height: 10px; margin-right: var(--space-1); border-radius: 50%; vertical-align: -1px; }
form.stack label { display: block; margin: 0 0 var(--space-3); }
form.stack select, form.stack textarea { display: block; }

/* The Goals map (issue 871): size is what goes in, distance is what is working, a faint ring is what the person said. Two drawings, one shown by width. */
.goal-map { margin: var(--space-4) 0 var(--space-2); }
.goal-map svg { display: block; width: 100%; height: auto; max-width: 800px; margin: 0 auto; }
.goal-map svg.gm-narrow { display: none; }
.gm-legend { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); margin: 0; padding: 0; list-style: none; color: var(--ink-muted); font-size: 13px; line-height: 18px; }
.gm-track { fill: none; stroke: var(--chart-grid); }
.gm-spoke { stroke: var(--chart-grid); stroke-width: 1; }
.gm-link { fill: none; stroke: var(--seq-4); stroke-width: 2; }
.gm-link.gm-strong { stroke-width: 3; }
.gm-link.gm-stated { stroke-dasharray: 2 6; stroke-linecap: round; }
.gm-link.gm-lit { stroke: var(--chart-2); }
.gm-you { fill: var(--surface-brand); }
.gm-you-word { fill: var(--on-brand); font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-anchor: middle; }
.gm-said { fill: none; stroke: var(--ink-muted); stroke-width: 1; stroke-dasharray: 3 4; opacity: 0.75; }
.gm-node { cursor: pointer; }
.gm-node:focus { outline: none; }
.gm-dot { fill: var(--surface-100); stroke: var(--chart-1); stroke-width: 2; }
.gm-node.gm-out .gm-dot { stroke: var(--chart-2); }
.gm-node.gm-flat .gm-dot, .gm-node.gm-new .gm-dot { stroke: var(--ink-muted); }
.gm-node.gm-unset .gm-dot { fill: var(--surface-000); stroke: var(--ink-muted); stroke-dasharray: 5 5; }
.gm-node:hover .gm-dot { fill: var(--surface-brand-soft); }
.gm-node:focus-visible .gm-dot { stroke: var(--chart-2); stroke-width: 3; }
.gm-node.gm-selected .gm-dot { fill: var(--surface-brand-soft); stroke: var(--chart-2); }
.gm-name { fill: var(--ink); font-size: 13px; font-weight: 600; text-anchor: middle; pointer-events: none; }
.gm-name.gm-outside { paint-order: stroke; stroke: var(--surface-000); stroke-width: 4px; }
.gm-time { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; margin-top: var(--space-2); color: var(--ink-muted); font-size: 13px; line-height: 18px; }
.gm-time input { width: 100%; accent-color: var(--surface-brand); }
#gm-when { min-width: 6em; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; font-family: var(--font-mono); }
.gm-tag-out { border-color: var(--surface-accent); color: var(--ink-accent); background: none; }
.gm-tag-flat, .gm-tag-new, .gm-tag-unset { color: var(--ink-muted); background: none; }
.gm-detail { margin: var(--space-2) 0 0; }
.gm-pair { display: grid; grid-template-columns: 1fr 1fr; margin: var(--space-3) 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-100); }
.gm-pair > div { min-width: 0; padding: var(--space-3) var(--space-4); }
.gm-pair > div + div { border-left: 1px solid var(--border); }
.gm-pair strong { display: block; color: var(--ink); font-size: 24px; line-height: 28px; font-weight: 500; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.gm-pair span { display: block; color: var(--ink-muted); font-size: 13px; line-height: 1.3; }
.gm-read { color: var(--ink); font-weight: 600; }
.gm-rows { margin: 0; padding: 0; list-style: none; }
.gm-rows li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 var(--space-3); padding: var(--space-2) 0; border-top: 1px solid var(--border); font-size: 15px; }
.gm-rows li:first-child { border-top: 0; }
.gm-rows em { color: var(--ink-muted); font-size: 13px; line-height: 18px; font-style: normal; }
.gm-rows small { flex-basis: 100%; font-size: 15px; }
.gm-fit { color: var(--ink-muted); font-size: 13px; }
.gm-fit-fits { color: var(--ink-brand); font-weight: 600; }
.gm-fit-against { color: var(--ink-accent); font-weight: 600; }
#goal-shade { position: fixed; inset: 0; z-index: 40; background: var(--scrim); }
#goal-panel { position: fixed; inset: 0 0 0 auto; z-index: 41; width: min(460px, 100%); padding: 0 var(--space-5) var(--space-6); overflow-y: auto; border-left: 1px solid var(--border); background: var(--surface-000); }
#goal-panel:focus { outline: none; }
#goal-panel .card { padding-top: var(--space-1); border-top: 0; }
.gm-top { position: sticky; top: 0; z-index: 1; display: flex; justify-content: flex-end; padding: var(--space-4) 0 var(--space-2); background: var(--surface-000); }
.gm-asof { margin: 0 0 var(--space-2); color: var(--ink-accent); font-size: 15px; font-weight: 600; }
@media (max-width: 600px) {
  .goal-map svg.gm-wide { display: none; }
  .goal-map svg.gm-narrow { display: block; }
  .gm-time { grid-template-columns: minmax(0, 1fr) auto; }
  .gm-time .quiet { grid-column: 1 / -1; order: 3; }
  #goal-panel { padding: 0 var(--space-4) var(--space-6); border-left: 0; }
}

/* Help reads on a phone first: one column, and text that follows the reader's own text size (the phone's, or the browser's). */
.help-guides, .help-page { max-width: 42em; font-size: 1rem; overflow-wrap: anywhere; }
@supports (font: -apple-system-body) {
  .help-guides, .help-page { font: -apple-system-body; font-family: var(--font-sans); line-height: 1.5; }
}
.help-search { display: flex; flex-wrap: wrap; gap: 0.5em; align-items: center; margin: 0 0 0.75em; }
.help-search label { flex: 1 1 100%; font-weight: 600; }
.help-search input { flex: 1 1 12em; min-width: 0; font-size: 1em; }
.help-search button { font-size: 1em; }
.help-list { margin: 0 0 1em; padding-left: 1.2em; }
.help-list li { margin: 0.6em 0; }
.help-list a { display: inline-block; padding: 0.5em 0; font-weight: 600; }
.help-list li span { display: block; font-size: 0.92em; line-height: 1.5; }
.help-page h2 { margin-top: 1.5em; font-size: 1.25em; }
.help-page h3 { font-size: 1.1em; }
.help-page img { max-width: 100%; height: auto; }
.help-page table { width: 100%; border-collapse: collapse; table-layout: auto; font-size: 0.92em; }
.help-page th, .help-page td { padding: 0.4em 0.5em; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; white-space: normal; overflow-wrap: break-word; }
.help-page code { overflow-wrap: anywhere; }

/* Start here: every step of the route on one list, ticked by what lifelever sees; its help opens in place (#1213). */
ol.steps.checklist .start-action { margin: var(--space-2) 0 var(--space-3); }
ol.steps.checklist .start-action a.button { display: block; text-align: center; padding: var(--space-3) var(--space-4); }
details.coding { margin-top: var(--space-3); padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md); }
details.coding > summary { cursor: pointer; color: var(--ink-brand); font-weight: 600; }
details.coding[open] > summary { margin-bottom: var(--space-2); }
ol.steps.checklist li { flex-direction: column; gap: 0; align-items: stretch; }
ol.steps.checklist li::before { align-self: flex-start; margin-bottom: var(--space-1); }
ol.steps.checklist li > div { width: 100%; }
ol.steps.checklist li.done .head strong { color: var(--ink-muted); }
ol.steps.checklist li.current { padding-left: var(--space-3); border-left: 3px solid var(--surface-brand); }
ol.steps.checklist .head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3); margin: 0 0 var(--space-2); }
ol.steps.checklist .state { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-brand); }
ol.steps.checklist li.done .state { color: var(--success); }
ol.steps.checklist li.done .state::before { content: "\2713\00a0"; }
ol.steps.checklist details.more { margin: var(--space-2) 0 0; padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-100); }
ol.steps.checklist details.more > summary { cursor: pointer; color: var(--ink-brand); font-weight: 600; }
ol.steps.checklist details.more[open] > summary { margin-bottom: var(--space-2); }
ol.steps.checklist details.more .label { margin: var(--space-3) 0 var(--space-1); }

/* The room meter on Account (#1170): the track is a well, the bar is forest, and it is oak when the room is filling or full; a word always sits beside the colour. */
progress.meter { display: block; appearance: none; width: 100%; height: var(--space-3); margin: var(--space-2) 0; border: 0; border-radius: var(--radius-pill); background: var(--surface-200); overflow: hidden; }
progress.meter::-webkit-progress-bar { background: var(--surface-200); border-radius: var(--radius-pill); }
progress.meter::-webkit-progress-value { background: var(--surface-brand); border-radius: var(--radius-pill); }
progress.meter::-moz-progress-bar { background: var(--surface-brand); border-radius: var(--radius-pill); }
progress.meter.near::-webkit-progress-value, progress.meter.full::-webkit-progress-value { background: var(--surface-accent); }
progress.meter.near::-moz-progress-bar, progress.meter.full::-moz-progress-bar { background: var(--surface-accent); }
.room-line { font-weight: 600; margin: 0 0 var(--space-2); }
.room-level { margin: 0 0 var(--space-3); }
