/* shared.css: what tasks, canvas and notes draw the same way. Edit this file, shared/shared.css at the project root,
   never the copies: each app's dev.sh and deploy.sh run shared/sync.sh first, which copies it, tokens.css and
   logo.woff2 into public/, canvas/public/ and notes/public/. Each page loads tokens.css, then this, then its app.css.

   Three parts (2026-11-16):
   1. The redesign's parts, on the design language (Draft 9) and the 6 Nov mockups: the top bar, the tool layout
      (margin, column, panel), choice lists, menus, floating bars, status labels and the small parts. Each app moves
      onto them in its own redesign task. A name an app already uses for something else today (.check, .field,
      .swatch) leaves that old markup out, so nothing old changes until its app's task replaces it.
   2. The Settings page (Task 3). The old shell (sidebar, light/dark disc, .seg switches) was removed in Task 13.
   3. The custom cursor. */

/* ---------- the logo: 搞掂晒 ---------- */
/* Chiron GoRound TC Black (SIL Open Font License), cut down to just these three characters (2 KB), so it loads with the
   page and needs nothing from elsewhere. */
@font-face { font-family: 'gaudims logo'; font-weight: 900; font-display: block; src: url(logo.woff2) format('woff2'); unicode-range: U+6382, U+641E, U+6652; }


/* ==================== 1. The redesign's parts (2026-11-16) ==================== */

/* Keyboard focus on the new parts: an ink ring. Zero specificity, so any rule of an app's own wins. */
:where(.g-top, .g-tool, .g-float, .menu) :focus-visible,
:where(.btn, .act, .field, .check, .theme-choice button):focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- the top bar: logo and place on the left, the three apps in the middle, people, Settings, theme ----------
   shared.topBar() builds it. The app fills .place (where you are) and .g-here (who else is here). Its height is
   --g-top-h, so what sits under it can measure against it (2026-11-16). */
:root { --g-top-h: 46px; }
.g-top {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: baseline; column-gap: var(--s-gutter);
  box-sizing: border-box; height: var(--g-top-h); padding: 13px var(--s-gutter) 11px; position: relative; z-index: 20;
  background: var(--bg); color: var(--ink); border-bottom: 1px solid var(--rule);
  font: var(--w-text) var(--t-body)/var(--lead) var(--font); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.g-top a { color: var(--ink); text-decoration: none; }
.g-top button { font: inherit; color: var(--ink); background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
.g-left { display: inline-flex; align-items: baseline; gap: 12px; min-width: 0; overflow: hidden; }
.g-top .logo { flex: none; font: 900 20px/1 'gaudims logo', var(--font); letter-spacing: -.03em; color: var(--ink); }
.g-left .place { display: inline-flex; align-items: baseline; gap: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.g-left .place:empty { display: none; }
.g-left .sep { color: var(--tick); }
/* The switch as words: the app you're in in ink. */
.g-top nav.app-switch { display: flex; gap: 16px; padding: 0; border-radius: 0; background: none; }
.g-top nav.app-switch a { flex: none; display: inline; padding: 0; border-radius: 0; font: inherit; color: var(--mute); background: none; box-shadow: none; transition: color var(--fast) var(--ease); }
.g-top nav.app-switch a.on, .g-top nav.app-switch a:hover { color: var(--ink); background: none; box-shadow: none; }
.g-top nav.app-switch a:focus-visible { color: var(--ink); outline: 2px solid var(--ink); outline-offset: 3px; }
.g-top nav.app-switch .ic { display: none; }
.g-right { display: inline-flex; align-items: baseline; justify-self: end; gap: 18px; min-width: 0; grid-column: 3; }   /* the last column even when the switch is hidden (a share link's page) */
/* Who else is here: an 8px square in their colour (--a), then their name. Squares, never discs. */
.g-here { display: inline-flex; align-items: baseline; gap: 4px 12px; min-width: 0; }
.g-here:empty { display: none; }
.g-here > * { display: inline-flex; align-items: baseline; gap: 6px; }
.g-here i { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: var(--radius-small); background: var(--a, var(--a-stone)); }
/* Phones: the logo and the place get a line of their own; the switch and the rest share the next, and wrap. */
@media (max-width: 760px) {
  .g-top { display: flex; flex-wrap: wrap; column-gap: 16px; row-gap: 4px; height: auto; padding: 10px 16px 9px; }
  .g-top .g-left { flex: 1 0 100%; }
  .g-top .g-right { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; gap: 4px 14px; }
}

/* ---------- the tool layout: the margin, the column, and a 320px panel for the selected thing ---------- */
.g-tool {
  display: grid; grid-template-columns: var(--notes) minmax(0, 1fr); column-gap: var(--s-col); height: calc(100% - var(--g-top-h)); padding: 0 var(--s-gutter);
  box-sizing: border-box; background: var(--bg); color: var(--ink); font: var(--w-text) var(--t-body)/var(--lead) var(--font); font-variant-numeric: tabular-nums;
}
.g-tool.has-panel { grid-template-columns: var(--notes) minmax(0, 1fr) 320px; }
/* The panes scroll on their own, on plain paper: a scrollbar would be the only box on the screen. */
.g-margin, .g-main, .g-panel { overflow-y: auto; padding: 24px 0 48px; min-width: 0; scrollbar-width: none; }
.g-margin::-webkit-scrollbar, .g-main::-webkit-scrollbar, .g-panel::-webkit-scrollbar { display: none; }
@media (max-width: 760px) {
  .g-tool, .g-tool.has-panel { display: block; height: auto; padding: 0 16px; }
  .g-margin, .g-main, .g-panel { overflow: visible; padding-bottom: 24px; }
}

/* The margin: groups, each a small grey label over a choice list. A legend is the margin's list; nothing needs a key. */
.g-margin > * + * { padding-top: 28px; }
.g-lab { color: var(--mute); font-size: var(--t-small); padding-bottom: var(--s-gap); }

/* The column's head: the name and its one-line state on the left, the views on the right, on one baseline. */
.g-head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding-bottom: 18px; }
.g-head .say { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; min-width: 0; }
.g-views { display: flex; gap: 16px; flex: none; }
.g-views > a, .g-views > button { font: inherit; color: var(--mute); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; transition: color var(--fast) var(--ease); }
.g-views > .on, .g-views > a:hover, .g-views > button:hover { color: var(--ink); }

/* The toolbar: words on one baseline. A field that fills, text actions, then the one ink button. */
.g-toolbar { display: flex; align-items: baseline; gap: 18px; padding-bottom: 18px; }
.g-toolbar .field { flex: 1; min-width: 80px; }
.g-toolbar .off { color: var(--mute); }
.g-toolbar .act.on { text-decoration-color: currentColor; }
.g-toolbar .gap { flex: 1; }

/* The panel: the selected thing under a 2px rule in its colour (--a), then its facts. */
.g-panel .in { border-top: 2px solid var(--a, var(--ink)); padding-top: 10px; }
.g-panel .name { font-weight: var(--w-strong); }
.g-panel .sub { padding-top: 24px; }
.g-panel .acts { display: flex; flex-wrap: wrap; gap: 4px 16px; padding-top: 18px; }
.g-facts { display: grid; grid-template-columns: 6em minmax(0, 1fr); row-gap: 2px; padding: 18px 0; }
.g-facts > :nth-child(odd) { color: var(--mute); }

/* A section head: the label left, a count or an action right, an ink hairline under. */
.head-rule { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: var(--s-gap); border-bottom: 1px solid var(--ink); margin-bottom: var(--s-line); }

/* ---------- a choice list: the picked one in ink, the rest grey, a count (.n) to the right ----------
   Under the pointer a tile-grey fill fades in behind the row. Rows can be links, buttons or plain elements. */
.choices { display: flex; flex-direction: column; }
.choices > * {
  position: relative; isolation: isolate; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; min-width: 0;
  box-sizing: border-box; width: 100%; padding: 1px 0; border: 0; background: none; font: inherit; text-align: left; text-decoration: none; color: var(--mute); cursor: pointer;
  transition: color var(--fast) var(--ease);
}
.choices > *::before { content: ""; position: absolute; z-index: -1; inset: 0 -6px; border-radius: var(--radius); background: var(--tile); opacity: 0; transition: opacity var(--fast) var(--ease); }
.choices > :hover::before { opacity: 1; }
.choices > .on, .choices > :hover { color: var(--ink); }
.choices .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.choices .n { flex: none; color: var(--mute); font-variant-numeric: tabular-nums; }
.choices .in { padding-left: 16px; }   /* a row inside another (a folder's areas) */

/* ---------- menus: words on paper, a --tick hairline, 2px corners, no shadow ----------
   Right-click menus and every pop-up list; replaces each app's .ctx as it moves over. Rows are buttons or links,
   a shortcut or detail in .k on the right; .lab a grey label; .sep or <hr> a hairline; .primary the action most
   people want. Shown and hidden with [hidden]; it fades. */
.menu {
  position: fixed; z-index: 60; min-width: 190px; max-height: calc(100vh - 12px); overflow-y: auto; box-sizing: border-box; padding: 4px 0;
  background: var(--bg); color: var(--ink); border: 1px solid var(--tick); border-radius: var(--radius); box-shadow: none;
  font: var(--w-text) var(--t-body)/var(--lead) var(--font); font-variant-numeric: tabular-nums; text-align: left;
  transition: opacity var(--fast) var(--ease), display var(--fast) allow-discrete;
}
.menu[hidden] { display: none; opacity: 0; }
@starting-style { .menu { opacity: 0; } }
.menu > button, .menu > a, .menu .it {
  display: flex; justify-content: space-between; align-items: baseline; gap: 18px; box-sizing: border-box; width: 100%; padding: 3px 12px 4px;
  font: inherit; color: var(--ink); text-align: left; text-decoration: none; background: none; border: 0; cursor: pointer;
  transition: background-color var(--fast) var(--ease);
}
.menu > button:hover, .menu > a:hover, .menu .it:hover, .menu > button:focus-visible, .menu > a:focus-visible { background: var(--tile); outline: 0; }
.menu > button:disabled, .menu .it.off { color: var(--mute); cursor: default; background: none; }
.menu .k { color: var(--mute); }
.menu .lab { padding: 6px 12px 2px; color: var(--mute); font-size: var(--t-small); cursor: default; }
.menu .sep, .menu > hr { height: 1px; margin: 4px 0; padding: 0; border: 0; background: var(--rule); }
.menu > .primary { font-weight: var(--w-strong); background: color-mix(in srgb, var(--a-green) var(--chip-mix), var(--bg)); }
.menu > .primary:hover { background: color-mix(in srgb, var(--a-green) calc(var(--chip-mix) * 1.6), var(--bg)); }
.menu .swatches { display: flex; gap: 6px; padding: 4px 12px; }
.menu .swatches > * { display: block; width: 12px; height: 12px; padding: 0; border: 0; border-radius: var(--radius-small); background: var(--a, var(--a-stone)); cursor: pointer; }
.menu .swatches > .on { outline: 1px solid var(--ink); outline-offset: 1px; }

/* ---------- floating bars on a board (the dock, selection, zoom, find): paper, a hairline, words ---------- */
.g-float {
  position: absolute; z-index: 10; display: flex; align-items: baseline; gap: 16px; box-sizing: border-box; padding: 5px 12px 6px; white-space: nowrap;
  background: var(--bg); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: none;
  font: var(--w-text) var(--t-body)/var(--lead) var(--font); font-variant-numeric: tabular-nums;
}
.g-float a, .g-float button { font: inherit; color: var(--mute); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; transition: color var(--fast) var(--ease); }
.g-float a:hover, .g-float a.on, .g-float button:hover, .g-float button.on { color: var(--ink); }
.g-float .sep { width: 1px; align-self: stretch; margin: 0 -4px; background: var(--rule); }

/* ---------- status label: a light tint of how things stand behind the word, ink text; 500 when it needs someone ---------- */
.status-label { display: inline-block; padding: 0 5px 1px; border-radius: var(--radius); color: var(--ink); background: color-mix(in srgb, var(--c, var(--a-stone)) var(--chip-mix), var(--bg)); white-space: nowrap; }
.status-label.t-ok { --c: var(--a-green); }
.status-label.t-info { --c: var(--a-blue); }
.status-label.t-wait { --c: var(--a-straw); }
.status-label.t-look { --c: var(--a-clay); font-weight: var(--w-strong); }
.status-label.t-off { --c: var(--a-stone); color: var(--mute); }
.status-label.t-bad { --c: var(--signal); color: color-mix(in srgb, var(--signal) 62%, var(--ink)); font-weight: var(--w-strong); }   /* the strong mix: plain red is too faint on its own tint */

/* ---------- small parts ---------- */
/* Check: a 10px square in an ink outline, filled grey when on (done). The pseudo-element makes the target bigger than the
   square, so a click near it still lands. */
.check {
  position: relative; display: inline-block; flex: none; box-sizing: border-box; width: 10px; height: 10px; margin: 0 8px 0 0; padding: 0; vertical-align: -1px;
  border: 1px solid var(--ink); border-radius: var(--radius-small); background: none; cursor: pointer;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.check::before { content: ""; position: absolute; inset: -8px; }
.check:not(:disabled):hover { background: var(--tile); }
.check.on { background: var(--mute); border-color: var(--mute); }
.check:disabled { cursor: default; }

/* Swatch: an 8px square of an accent (--a), before the name of what it marks. Leaves out tasks' old swatches
   (in the timeline and the details card) until Tasks 7 and 8 replace them. */
.swatch:where(:not(:is(.tl-title, .peek-head) .swatch)) {
  display: inline-block; flex: none; width: 8px; height: 8px; margin-right: 8px; vertical-align: 0;
  border-radius: var(--radius-small); background: var(--a, var(--a-stone));
}

/* Button: an ink block, the word in paper. One per view; everything else is a text action. */
.btn { font: inherit; color: var(--bg); background: var(--ink); border: 0; border-radius: var(--radius); padding: 5px 12px 6px; cursor: pointer; white-space: nowrap; transition: background-color var(--fast) var(--ease); }
.btn:hover { background: var(--btn-hover); }
.btn:disabled { color: var(--mute); background: var(--rule); cursor: default; }

/* Text action: a word in ink over a rule-grey underline that turns ink under the pointer. */
.act {
  font: inherit; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--rule); text-decoration-thickness: 1px; text-underline-offset: 3px;
  transition: text-decoration-color var(--fast) var(--ease);
}
.act:hover { text-decoration-color: currentColor; }
a.btn { display: inline-block; text-decoration: none; }

/* The sign-in page and its sister pages in all three apps (2026-11-17; tasks' own until then): the logo as a poster
   at the top left, as large as the window allows, and along the bottom edge a line, then the way in or on. The logo
   and the poster sit outside the type scale. */
.gate { position: relative; display: flex; flex-direction: column; min-height: 100dvh; box-sizing: border-box; padding: 0 var(--s-gutter); text-align: left; background: var(--bg); color: var(--ink); }
.gate .wordmark.logo {
  flex: none; display: block; margin: 12px 0 0;   /* in the flow, so a short window scrolls and never overlaps */
  font-size: max(72px, min(calc((100vw - 48px) / 2.94), calc(100dvh - 220px)));
}
.gate-base { margin-top: auto; padding: 24px 0 var(--s-gutter); }
.gate .say { margin: 0; padding-bottom: 14px; max-width: 560px; }
.gate .err { color: var(--signal); font-size: var(--t-body); }
.gate .fine { margin: 14px 0 0; color: var(--mute); font-size: var(--t-small); }
/* The fields and the button share a row, wrapping when the window is narrow. */
.gate-form { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 24px; }
.gate-form .field { width: 240px; max-width: 100%; flex: none; }
.gate .act { white-space: nowrap; }
.gate .act[hidden] { display: none; }
.gate .act:disabled { color: var(--mute); cursor: default; }
/* The local sign-ins stay on the page in development, small and out of the way. */
.gate-dev { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-top: 14px; font-size: var(--t-small); color: var(--mute); }

/* Field: text on an ink line. Leaves out tasks' old .field (a <div> round a label and its input in the editor and
   the area card) until Task 7 replaces them. */
.field:where(:not(div)) {
  font: inherit; color: inherit; background: none; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0;
  padding: 3px 0 4px; margin: 0; outline: 0; min-width: 0; box-shadow: none;
}
.field:where(:not(div))::placeholder { color: var(--mute); opacity: 1; }
.field:where(:not(div)):focus { border-bottom-width: 2px; padding-bottom: 3px; }

/* Table: a grey head over an ink line, rows on hairlines; .group rows are section heads inside it. */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { font-weight: var(--w-text); color: var(--mute); text-align: left; padding: 0 16px 6px 0; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.tbl th.sorted { color: var(--ink); }
.tbl td { padding: 5px 16px 5px 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
.tbl .r { text-align: right; }
.tbl tr.sel td { background: var(--select); }
.tbl tr.group td { padding: 28px 16px 6px 0; border-bottom: 1px solid var(--ink); }
.tbl tr.group td:last-child { text-align: right; color: var(--mute); }
.tbl tr.tinted td { transition: background-color var(--fast) var(--ease); }
.tbl tr.tinted:hover td { background: color-mix(in srgb, var(--a) var(--row-hover-mix), var(--bg)); }
.tbl tr.tinted.sel td, .tbl tr.tinted.sel:hover td { background: color-mix(in srgb, var(--a) var(--row-sel-mix), var(--bg)); }

/* Theme choice: Auto, Light, Dark as words (shared.themeWords()), the current one in ink. */
.theme-choice { display: inline-flex; align-items: baseline; gap: 10px; }
.theme-choice button { font: inherit; color: var(--mute); background: none; border: 0; padding: 0; margin: 0; cursor: pointer; transition: color var(--fast) var(--ease); }
.theme-choice button[aria-pressed="true"], .theme-choice button:hover { color: var(--ink); }

/* Tooltip: an ink block, 2px corners. Each app still draws #tip with its own rules, which set these same properties
   (white-space aside, which is normal there anyway), so this shows only once an app drops its own. It fades, by
   opacity alone. */
#tip {
  position: fixed; z-index: 90; max-width: 280px; padding: 6px 10px; border-radius: var(--radius);
  background: var(--ink); color: var(--bg); font: var(--t-small)/1.45 var(--font); pointer-events: none; white-space: normal;
  transition: opacity var(--fast) var(--ease), display var(--fast) allow-discrete;
}
#tip[hidden] { opacity: 0; }
@starting-style { #tip { opacity: 0; } }
#tip kbd { border-color: color-mix(in srgb, var(--bg) 40%, transparent); color: var(--bg); margin-left: 4px; }
@media (hover: none) { #tip { display: none !important; } }

/* Nothing moves under reduced motion (each app has the same rule today). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}


/* ==================== 2. Today's shell, until Tasks 5, 10 and 12 ==================== */
/* Written for tasks and canvas (2026-09-23): each app supplies the colour and type tokens these use (--ink, --muted,
   --faint, --hover, --ui, --ease, --fast, --mid) in its own :root. */

:root { --switch-on: #ffffff; }
:root[data-theme="dark"] { --switch-on: #2c2c2c; }

.wordmark.logo { font-family: 'gaudims logo', var(--ui); font-weight: 900; letter-spacing: -0.03em; line-height: 1; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.wordmark.logo.small { font-size: 30px; }

/* The old sidebar, pill switch, light/dark disc and .seg switches are gone (2026-11-17); the top bar and the Settings page replaced them. */
.g-top nav.app-switch a::after { display: none; }

/* ---------- the Settings page (2026-11-16) ----------
   shared.openSettings() draws it: fixed over the app, its own top bar, a margin of section names and one column. The
   old pop-up's rules are gone. Everything is under .settings-page so the apps' older bare rules (inputs, p, h2, button.link)
   can't reach it, and each rule is written to win over those. Sections follow the 6 Nov mockup on Draft 9: a head
   with an ink line under it, rows on hairlines, words for controls. */
.settings-page {
  position: fixed; inset: 0; z-index: 1000; overflow-y: auto; background: var(--bg); color: var(--ink);
  font: var(--w-text) var(--t-body)/var(--lead) var(--font); font-variant-numeric: tabular-nums; outline: 0;
  transition: opacity var(--fast) var(--ease);
}
@starting-style { .settings-page { opacity: 0; } }
.settings-page [hidden] { display: none !important; }
.settings-page .g-top { position: sticky; top: 0; }
.settings-page p, .settings-page dl, .settings-page dd, .settings-page ul { margin: 0; padding: 0; list-style: none; }
.settings-page .strong { font-weight: var(--w-strong); }
.settings-page .mute, .settings-page .sp-fine { color: var(--mute); }
.settings-page .data { color: var(--ink); }
.settings-page .sp-col { max-width: var(--col); }
.settings-page .sp-col::after { content: ""; display: block; height: 35vh; }
.settings-page .sp-sec { scroll-margin-top: 24px; }
.settings-page .sp-sec + .sp-sec { padding-top: var(--s-col); }
.settings-page .head-rule { margin-bottom: 0; min-height: 22px; }
.settings-page .head-rule .btn, .settings-page .head-rule .act { margin: -3px 0; }

/* A row: the name on the left, what it holds (words, actions) on the right. */
.settings-page .sp-row { display: grid; grid-template-columns: 160px minmax(0, 1fr); column-gap: 24px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--rule); }
.settings-page .sp-row > :first-child { color: var(--ink); }
.settings-page .sp-row > :last-child { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; min-width: 0; overflow-wrap: anywhere; }
.settings-page .sp-add { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px; padding-top: 12px; }
.settings-page .sp-form { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px 0 6px; max-width: 360px; }
.settings-page .sp-form .field { width: 100%; }
.settings-page .sp-acts { display: flex; gap: 18px; }
.settings-page .sp-sub { padding-top: 28px; }
.settings-page .sp-sub > .lab { font-weight: var(--w-strong); padding-bottom: 6px; }
.settings-page .sp-fine { padding-top: 12px; max-width: 640px; }
.settings-page .sp-err { padding-top: 8px; color: color-mix(in srgb, var(--signal) 62%, var(--ink)); font-weight: var(--w-strong); }
.settings-page .sp-new { padding-top: 12px; overflow-wrap: anywhere; }
.settings-page .sp-new code { font: inherit; font-weight: var(--w-strong); }
.settings-page .sp-sec > .tbl { margin-top: 12px; }
.settings-page .tbl td:last-child, .settings-page .tbl th:last-child { text-align: right; padding-right: 0; }
.settings-page .tbl.plain td:last-child, .settings-page .tbl.plain th:last-child { text-align: left; }
.settings-page .tbl.plain td.when { text-align: right; padding-right: 0; color: var(--mute); white-space: nowrap; }
.settings-page .tbl td { overflow-wrap: anywhere; }
.settings-page .tbl .grey { color: var(--mute); }
.settings-page .tbl.plain td:first-child { white-space: nowrap; padding-right: 24px; }
.settings-page .tbl td[colspan] { text-align: left; }
.settings-page .g-margin > * + * { padding-top: 0; }

/* Fields and buttons the apps' older bare rules would restyle. */
.settings-page .field {
  font: inherit; color: var(--ink); background: none; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0;
  padding: 3px 0 4px; margin: 0; outline: 0; min-width: 0; max-width: 100%; box-shadow: none; width: 280px;
}
.settings-page .field::placeholder { color: var(--mute); opacity: 1; }
.settings-page .field:focus { border-bottom-width: 2px; padding-bottom: 3px; }
.settings-page .field.sp-url { flex: 1; width: auto; color: var(--mute); }
.settings-page .field.sp-num { width: 64px; text-align: center; }
.settings-page .field.sp-grow { flex: 1; min-width: 160px; }
.settings-page button.act, .settings-page a.act { font: inherit; color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule); text-decoration-thickness: 1px; text-underline-offset: 3px; background: none; border: 0; padding: 0; cursor: pointer; transition: text-decoration-color var(--fast) var(--ease); }
.settings-page button.act:hover, .settings-page a.act:hover { text-decoration-color: currentColor; }
.settings-page button.btn { font: inherit; }

/* The cursor toggle: a tick box and a sentence. */
.settings-page .sp-toggle { display: inline-flex; align-items: baseline; font: inherit; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; }
.settings-page .sp-tick { display: inline-block; flex: none; box-sizing: border-box; width: 10px; height: 10px; margin-right: 8px; border: 1px solid var(--ink); border-radius: var(--radius-small); transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease); }
.settings-page .sp-toggle:hover .sp-tick { background: var(--tile); }
.settings-page .sp-tick.on, .settings-page .sp-toggle:hover .sp-tick.on { background: var(--mute); border-color: var(--mute); }
.settings-page .sp-toggle:focus-visible, .settings-page .act:focus-visible, .settings-page .field:focus-visible, .settings-page .btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* The margin: section names; the one in view in ink. */
.settings-page .g-margin .choices > a { color: var(--mute); }
.settings-page .g-margin .choices > a.on, .settings-page .g-margin .choices > a:hover { color: var(--ink); }

/* Keyboard shortcuts: Tasks, Canvas, Notes, each a head with its groups under it, two to a row where there is room. */
.settings-page .sp-keys-app { padding-top: 18px; }
.settings-page .sp-keys-app + .sp-keys-app { padding-top: var(--s-col); }
.settings-page .sp-keys-app > .head-rule { min-height: 0; }
.settings-page .sp-keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); column-gap: var(--s-col); row-gap: 28px; padding-top: 12px; }
.settings-page .sp-keys-group > .lab { color: var(--mute); font-size: var(--t-small); padding-bottom: 6px; }
.settings-page .sp-keys dl { display: grid; grid-template-columns: 8.4em minmax(0, 1fr); column-gap: 12px; row-gap: 2px; }
.settings-page .sp-keys dt { color: var(--ink); overflow-wrap: anywhere; }
.settings-page .sp-keys dd { color: var(--mute); }

/* Phones: the margin becomes a wrapped row of section names above the column, and the page scrolls as one. */
@media (max-width: 760px) {
  .settings-page .g-margin { padding-bottom: 8px; }
  .settings-page .g-margin .g-lab { display: none; }
  .settings-page .g-margin .choices { flex-direction: row; flex-wrap: wrap; gap: 2px 16px; }
  .settings-page .g-margin .choices > * { width: auto; }
  .settings-page .sp-sec + .sp-sec, .settings-page .sp-keys-app + .sp-keys-app { padding-top: 32px; }
  .settings-page .sp-row { grid-template-columns: 104px minmax(0, 1fr); column-gap: 16px; }
  .settings-page .sp-keys { grid-template-columns: minmax(0, 1fr); }
  .settings-page .sp-col::after { height: 24px; }
  .settings-page .sp-sec { scroll-margin-top: 70px; }
}


/* ==================== 3. The custom cursor (shared/cursor.js; mouse and trackpad only; the same in every app) ==================== */

html.custom-cursor:not(.cursor-native), html.custom-cursor:not(.cursor-native) * { cursor: none !important; }
.cursor-dot, .cursor-ring {
  position: fixed; left: 0; top: 0; z-index: 2147483647; pointer-events: none;
  border-radius: 50%; will-change: transform; transform: translate3d(-100px, -100px, 0);
  transition: opacity var(--fast) var(--ease);
}
.cursor-dot { width: 4.5px; height: 4.5px; background: var(--ink); }
.cursor-ring {
  width: 19.5px; height: 19.5px; border: 1px solid var(--ink); opacity: 1;
  transition: opacity var(--fast) var(--ease), background-color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.cursor-ring.active { border-color: var(--muted); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.cursor-ring.pressed { background: color-mix(in srgb, var(--ink) 14%, transparent); }
html.cursor-native .cursor-dot, html.cursor-native .cursor-ring { opacity: 0 !important; }

/* The column head's state line (2026-11-16): a 6px bar (ink on a rule track) for an area's progress, then a tint behind
   the figures that answer the page's question: ready green, late red. Scoped to the head, so a board's bar is untouched. */
.g-head .say-rest { display: contents; }
.g-head .bar { width: 96px; height: 6px; align-self: center; background: var(--rule); }
.g-head .bar > i { display: block; height: 100%; background: var(--ink); transition: width var(--slow) var(--ease); }
.g-head mark { --m: var(--a-stone); background: color-mix(in srgb, var(--m) var(--tint-mix), var(--bg)); color: var(--ink); padding: 0 3px; margin: 0 -3px; }
.g-head mark.is-ok { --m: var(--a-green); }
.g-head mark.is-bad { --m: var(--signal); }
