/* Apple blue and neutral surfaces. Shared values resolve through color-scheme; explicit themes override the system. */
:root {
  color-scheme: light dark;
  --canvas: light-dark(#f5f5f7, #000000);
  --panel: light-dark(#ffffff, #1d1d1f);
  --card: light-dark(#ffffff, #272729);
  --ink: light-dark(#1d1d1f, #f5f5f7);
  --ink-2: light-dark(#626267, #b0b0b5);
  --ink-3: light-dark(#626267, #aaaaaf);
  --line: light-dark(rgba(0,0,0,.1), rgba(255,255,255,.12));
  --hover: light-dark(rgba(0,0,0,.05), rgba(255,255,255,.08));
  --hover-2: light-dark(rgba(0,0,0,.08), rgba(255,255,255,.1));
  --on-accent: #ffffff;
  --accent-soft: light-dark(rgba(0,113,227,.1), rgba(41,151,255,.18));
  --ok: light-dark(#248a3d, #30d158);
  --ok-ink: light-dark(#1b6e30, #30d158);
  --warn: light-dark(#705b00, #ffd60a);
  --err: light-dark(#d70015, #ff453a);
  --glass: light-dark(rgba(255,255,255,.72), rgba(22,22,23,.72));
  --veil: light-dark(rgba(0,0,0,.28), rgba(0,0,0,.5));
  --field-line: light-dark(#86868b, #737378);
  --card-shadow: 0 0 0 .5px var(--line), 0 8px 24px light-dark(rgba(0,0,0,.06), rgba(0,0,0,.16));
  --page-shadow: 0 0 0 .5px var(--line), 0 18px 50px light-dark(rgba(0,0,0,.14), rgba(0,0,0,.45));
  --pop-shadow: 0 0 0 .5px var(--line), 0 12px 34px light-dark(rgba(0,0,0,.16), rgba(0,0,0,.45));
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --serif: "Source Serif 4", "Noto Serif CJK SC", "Songti SC", "SimSun", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --m-press: 120ms ease-out;
  --m-fade: 180ms ease-out;
  --m-glide: 350ms cubic-bezier(.32,.72,0,1);
  --m-settle: 400ms linear(0,.26 7%,.74 17%,1.03 29%,1.07 37%,1.02 50%,.995 64%,1);
  --m-sheet: 500ms cubic-bezier(.32,.72,0,1);
  --bg: var(--canvas);
  --side: var(--panel);
  --head: var(--ink);
  --line-2: light-dark(#d2d2d7, #424245);
  --field: var(--field-line);
  --sel: var(--hover-2);
  --accent: light-dark(#0066cc, #2997ff);
  --accent-ink: light-dark(#005bb5, #70b7ff);
  --accent-2: var(--accent-hover);
  --btn: var(--accent-fill);
  --btn-2: var(--accent-hover);
  --link: var(--accent-ink);
  --bad: var(--err-ink);
  --bad-fill: #d70015;
  --dots: none;
  --shadow: var(--card-shadow);
  --shadow-pop: var(--pop-shadow);
  --sans: var(--font);
  --accent-fill: #0071e3;
  --accent-hover: #0074e8;
  --accent-press: #006edb;
  --err-ink: light-dark(#c00012, #ff8b84);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

@font-face { font-family: "Source Serif 4"; src: url("/web/vendor/fonts/SourceSerif4-Regular.otf") format("opentype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/web/vendor/fonts/SourceSerif4-Semibold.otf") format("opentype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/web/vendor/fonts/JetBrainsMono-Regular.otf") format("opentype"); font-weight: 400; font-style: normal; font-display: swap; }

/* Shared palette for sign-in, projects, sharing and account pages. */

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100vh; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 16px; height: 16px; flex: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--card); cursor: pointer; transition: background-color var(--m-fade), border-color var(--m-fade), transform var(--m-press); white-space: nowrap; text-decoration: none; color: var(--ink); }
.btn:hover { background: var(--hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary {  border-color: var(--btn);  font-weight: 600; }
.btn.primary:hover {  border-color: var(--btn-2); }
.btn.sm { height: 30px; padding: 0 10px; border-radius: 8px; font-size: 13px; }
.btn.danger { color: var(--bad); }
.btn.danger.solid { background: var(--bad-fill); border-color: var(--bad-fill); color: #fff; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.textbtn { border: 0; background: none; padding: 0; color: var(--link); cursor: pointer; font-size: 13px; }
.textbtn:hover { text-decoration: underline; }
.icon-btn { width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; cursor: pointer; display: inline-grid; place-items: center; color: var(--ink-2);
  transition: background-color var(--m-fade), color var(--m-fade), transform var(--m-press); position: relative; }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.icon-btn:disabled { opacity: .35; cursor: default; background: transparent; }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn.danger:hover { color: var(--bad); }

/* The SVG supplies its own rounded blue tile in either theme. */
.mark { width: 28px; height: 28px; display: inline-grid; place-items: center; flex: none; }
.mark svg { width: 100%; height: 100%; display: block; }
.mark.big { width: 44px; height: 44px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand b { font: 700 20px/1 var(--sans); letter-spacing: -.01em; color: var(--head); }

/* inputs */
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink); }
.field small { color: var(--ink-3); font-weight: 400; }
.input, .field input, .field select, select.input { height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--field); background: var(--card); width: 100%;
  transition: border-color var(--m-fade); }
.input:focus, .field input:focus, .field select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
select.input, .sel { appearance: none; padding-right: 30px; cursor: pointer;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235E5A7E' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 8px center / 16px; }
.sel { height: 32px; border-radius: 8px; border: 1px solid var(--field); padding: 0 28px 0 10px; font-size: 13px; color: var(--ink); }
.sel:disabled { opacity: .7; cursor: default; }
.err { color: var(--bad); font-size: 13px; min-height: 1.2em; margin: 0; }
.err:empty { min-height: 0; }
.muted { color: var(--ink-3); }

input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--btn); margin: 0; cursor: pointer; }

/* sign-in */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; background: var(--dots); }
.auth-box { width: min(400px, 100%); display: grid; gap: 22px; justify-items: center;  }
.auth-box .brand b { font-size: 26px; }
.auth-card { width: 100%; padding: 28px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  display: grid; gap: 14px; }
.auth-card h1 { margin: 0; font-size: 23px; letter-spacing: -.5px; }
.auth-link { color: var(--link); font-size: 13px; text-align: center; }
.auth-card .btn.primary { height: 44px; margin-top: 4px; }
.auth-providers { display: grid; gap: 10px; padding-top: 16px; margin-top: 2px; border-top: 1px solid var(--line); }
.provider-btn { height: 44px; position: relative; }
.provider-mark { display: inline-flex; width: 20px; height: 20px; flex: 0 0 20px; }
.provider-mark svg { width: 100%; height: 100%; }
.provider-btn .provider-mark { position: absolute; left: 14px; }
.auth-note { margin: 0; font-size: 13px; color: var(--ink-2); text-align: center; }
.seg { display: flex; padding: 4px; border-radius: 10px; background: var(--side); }
.seg button { flex: 1; height: 34px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; color: var(--ink-2); transition: background-color var(--m-fade), color var(--m-fade), transform var(--m-press); }
.seg button[aria-selected="true"] { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }

/* the shell: a side bar and the page */
.shell { display: grid;  min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow: auto; display: flex; flex-direction: column; gap: 2px; padding: 18px 12px 12px;  border-right: 1px solid var(--line); }
.side .brand { padding: 4px 10px 16px; }
.side .new { margin: 0 2px 14px; height: 40px; }
.nav { display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; padding: 0 10px 0 12px; border: 0;  background: transparent; color: var(--ink-2);
  cursor: pointer; text-align: left; text-decoration: none; transition: background-color var(--m-fade), color var(--m-fade), transform var(--m-press); }
.nav:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.nav[aria-current="true"] { background: var(--sel); color: var(--ink); font-weight: 600; }
.nav .n { margin-left: auto; color: var(--ink-3); font-size: 13px; font-weight: 400; font-variant-numeric: tabular-nums; }
.nav svg { width: 16px; height: 16px; flex: none; opacity: .8; }
.side-h { display: flex; align-items: center; justify-content: space-between; margin: 18px 4px 4px 12px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.side-h .icon-btn { width: 24px; height: 24px; }
.tagrow { position: relative; }
.tagrow .nav { padding-right: 10px; }
.tagrow .more { position: absolute; right: 4px;  width: 24px; height: 24px; opacity: 0; }
.tagrow:hover .more, .tagrow .more:focus-visible, .tagrow .more[aria-expanded="true"] { opacity: 1; }
.tagrow:hover .nav .n { visibility: hidden; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.side .grow { flex: 1; min-height: 16px; }
.legal-links { display: flex; justify-content: center; gap: 16px; font-size: 12px; }
.legal-links a { color: var(--ink-3); text-decoration: none; }
.legal-links a:hover { color: var(--ink-2); text-decoration: underline; }
.side-legal { padding: 10px 0 0; }
.chipacct { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.chipacct a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.chipacct a:hover { text-decoration: none; }
.chipacct .who { min-width: 0; line-height: 1.25; }
.chipacct .who b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chipacct .who small { color: var(--ink-3); font-size: 13px; }
.badge { position: absolute; top: -2px; right: -3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--btn);  font-size: 13px; font-weight: 600;
  display: grid; place-items: center; line-height: 1;  }

.main { min-width: 0;  display: flex; flex-direction: column;  }
.head { display: flex; flex-wrap: wrap; align-items: center;  min-height: 40px; }
.head h1 { margin: 0; flex: 1 1 200px;   color: var(--head); }
.search { position: relative; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; width: 320px; max-width: 100%; border: 1px solid var(--field); border-radius: 10px; background: var(--card);
  transition: border-color var(--m-fade); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search svg { color: var(--ink-3); }
.search input { border: 0; outline: 0; flex: 1; min-width: 0; background: transparent; }

/* bulk actions */
.bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px 6px 14px; border-radius: 12px; background: var(--accent-soft);  }
.bulk b { margin-right: 8px; font-weight: 600; }
.bulk .btn { background: var(--card); border-color: transparent; }
.bulk .btn:hover { background: var(--hover); }
.bulk .sp { flex: 1; }

/* the table */
.tablebox { position: relative; border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow-x: auto; box-shadow: var(--shadow); }
table.list { width: 100%; min-width: 820px; border-collapse: collapse; }
.list th { text-align: left; font-size: 13px; font-weight: 600; color: var(--ink-3); padding: 11px 8px; white-space: nowrap; }
.list th:first-child, .list td:first-child { padding-left: 16px; width: 36px; }
.list th:last-child, .list td:last-child { padding-right: 12px; text-align: right; }
.list td { padding: 11px 8px; border-top: 1px solid var(--line); vertical-align: middle; color: var(--ink-2); }
.list tbody tr { transition: background-color var(--m-fade);  }
.list tbody tr:hover { background: color-mix(in srgb, var(--hover) 55%, transparent); }
.list tbody tr.on { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
.list .t { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.list .t a, .list .t .nolink { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.list .t .nolink { opacity: .75; }
.list .acts { white-space: nowrap; }
.list .acts .icon-btn { width: 28px; height: 28px; }
.list .when { white-space: nowrap; }
.list .when small { color: var(--ink-3); }
.who-cell { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 13px; font-weight: 500;
  background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--ink); white-space: nowrap; }
.role { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 10px; font-size: 13px; background: var(--panel); border: 1px solid var(--line); color: var(--ink-2); }
.starting { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 13px; font-weight: 400; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent);  }
.empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 64px 16px; color: var(--ink-2); }
.empty h2 { margin: 0; font: 500 21px/1.3 var(--serif); color: var(--ink); }
.empty p { margin: 0; }
.skel { height: 52px; border-top: 1px solid var(--line); background: linear-gradient(90deg, var(--card), var(--hover), var(--card)); background-size: 200% 100%;  }

/* avatars */
.av { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--c, #636366); color: #fff; font-size: 13px; font-weight: 600; flex: none; }
.av.sm { width: 24px; height: 24px; font-size: 13px; }
.av.lg { width: 56px; height: 56px; font-size: 22px; }
.av.ghost { background: var(--panel); color: var(--ink-3); border: 1px dashed var(--line-2); }
.stack { display: flex; align-items: center; }
.stack .av { border: 2px solid var(--card); margin-left: -7px; }
.stack .av:first-child { margin-left: 0; }
.stack .more-n { margin-left: 6px; font-size: 13px; color: var(--ink-3); }

/* menus, popovers, sheets */
.menu { position: fixed; z-index: 30; min-width: 200px; max-width: 320px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: var(--shadow-pop);  }
.menu .title { padding: 6px 10px 8px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.menu button.mi { display: flex; width: 100%; align-items: center; gap: 9px; min-height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; text-align: left; }
.menu button.mi:hover { background: var(--hover); }
.menu button.mi .sub { margin-left: auto; color: var(--ink-3); font-size: 13px; }
.menu button.mi.danger { color: var(--bad); }
.menu button.mi svg { width: 16px; height: 16px; color: var(--ink-2); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 0; }
.menu .swatches { padding: 4px 10px 6px; }
/* colour swatches (avatar, tags): round, the chosen one ringed and ticked (the switch is .toggle) */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; --gap: var(--card); }
.swatch { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: var(--c); color: #fff; cursor: pointer; flex: none; display: grid; place-items: center;
  box-shadow: inset 0 0 0 .5px rgba(0,0,0,.14); transition: transform var(--m-press), box-shadow var(--m-fade); }
.swatch:hover { transform: scale(1.08); }
.swatch svg { width: 13px; height: 13px; stroke-width: 2.6; opacity: 0; transition: opacity var(--m-fade); }
.swatch[aria-checked="true"], .swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--gap), 0 0 0 4px var(--c); }
.swatch[aria-checked="true"] svg, .swatch[aria-pressed="true"] svg { opacity: 1; }
.pop { position: fixed; z-index: 30; width: 380px; max-width: calc(100vw - 16px); max-height: min(520px, calc(100vh - 32px)); display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-pop);  overflow: hidden; }
.pop-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px 12px 16px; border-bottom: 1px solid var(--line); }
.pop-h b { flex: 1; font-size: 15px; }
.pop-b { overflow: auto; }
.pop-f { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.note { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line);  }
.note:last-child { border-bottom: 0; }
.note.unread { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.note .body { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.45; }
.note .body b { font-weight: 600; }
.note .meta { margin-top: 2px; color: var(--ink-3); font-size: 13px; }
.note .acts { display: flex; gap: 6px; margin-top: 8px; }
.note-empty { padding: 32px 16px; text-align: center; color: var(--ink-3); }
.veil { position: fixed; inset: 0; z-index: 40; background: var(--veil); display: grid; place-items: center; padding: 16px;  }
.sheet { width: min(480px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-pop);
  padding: 22px; display: grid; gap: 16px;  }
.sheet h3 { margin: 0; font: 500 22px/1.3 var(--serif); }
.sheet .row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.drop { display: grid; gap: 6px; justify-items: center; padding: 22px; border: 1px dashed var(--line-2); border-radius: 12px; color: var(--ink-2); font-size: 13.5px; text-align: center; cursor: pointer;
  transition: background-color var(--m-fade), border-color var(--m-fade); }
.drop.over, .drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.drop { border-color: var(--field); }

/* share */
.share { width: min(600px, 100%); padding: 0; gap: 0; }
.share-h { display: flex; align-items: center; gap: 8px; padding: 18px 16px 16px 24px; border-bottom: 1px solid var(--line); }
.share-h h3 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-b { display: grid; gap: 18px; padding: 20px 24px; }
.invite { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
.invite .input { height: 40px; }
.invite .sel { height: 40px; border-radius: 10px; }
.invite .btn { height: 40px; }
.sec-h { font-weight: 600; margin-bottom: 4px; display: flex; align-items: baseline; gap: 6px; }
.sec-h small { color: var(--ink-3); font-weight: 400; }
.mrow { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line);  }
.mrow:first-of-type { border-top: 0; }
.mrow .who { flex: 1; min-width: 0; line-height: 1.3; }
.mrow .who b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow .who small { color: var(--ink-3); font-size: 13px; }
.mrow .fixed { color: var(--ink-2); font-size: 13px; padding: 0 6px; }
.linkrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.linkrow > svg { color: var(--ink-2); }
.linkrow .lbl { flex: 1 1 140px; }
.share-f { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--line); }
.standalone { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }

.side .nav.back { color: var(--ink-2); margin-bottom: 10px; }

.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 50; background: var(--ink); color: var(--bg);
  padding: 9px 16px; border-radius: 10px; font-size: 13.5px; box-shadow: var(--shadow-pop);  max-width: calc(100vw - 32px); }
.toast.bad { background: var(--bad-fill); color: #fff; }

@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; }
  .side .grow { display: none; }
  .main { padding: 20px 16px 48px; }
  .head h1 { font-size: 26px; }
  .search { width: 100%; }
  .invite { grid-template-columns: 1fr auto; }
  .invite .input { grid-column: 1 / -1; }
  .share-b, .share-h, .share-f { padding-left: 16px; padding-right: 16px; }
}

/* sortable columns, "show more", Uncategorized */
.list th button.sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; border-radius: 6px; padding: 2px 4px; margin: -2px -4px; }
.list th button.sort:hover, .list th button.sort.on { color: var(--ink); }
.list th button.sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.list th button.sort .arrow { font-size: 13px; opacity: .45; }
.list th button.sort.on .arrow { opacity: 1; }
.listfoot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; }
.linkish { all: unset; cursor: pointer; color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.linkish:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.nav.untagged em { font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Your AI: the computer's state, its switches */
.aistate { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.aidot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.aidot[data-s="online"] { background: var(--ok); }
.aidot[data-s="working"] { background: var(--accent); }
.airow { cursor: pointer; }
.toggle { position: relative; flex: none; width: 38px; height: 22px; }
.toggle input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.toggle i { position: absolute; inset: 0; border-radius: 10px; background: var(--line-2); transition: background-color var(--m-fade), transform var(--m-press); pointer-events: none; }
.toggle i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform var(--m-glide); }
.toggle input:checked + i { background: var(--btn); }
.toggle input:checked + i::after { transform: translateX(16px); }
.toggle input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Project covers preserve table semantics, sort controls, selection and every row action. */
.shell { grid-template-columns: 244px minmax(0, 1fr); }
.side { background: var(--panel); border-right-width: .5px; padding-top: 20px; }
.main { padding: 44px 56px; gap: 26px; }
.head { gap: 14px; }
.head h1 { font: 600 34px/1.15 var(--serif); letter-spacing: -.01em; }
.head .search { width: min(280px, 100%); background: var(--hover); border: 0; }
.head .new { height: 40px; border-radius: 11px; }
.brand b, .card h2, .empty h2 { font-family: var(--sans); }
.card { border-radius: 16px; border-width: .5px; }
.sheet h3 { font-family: var(--sans); font-size: 20px; }
.btn.primary { background: var(--btn); color: var(--on-accent); }
.btn.primary:hover { background: var(--btn-2); color: var(--on-accent); }
.btn.primary:active { background: var(--accent-press); border-color: var(--accent-press); }
.btn.sm, .icon-btn, .side-h .icon-btn, .tagrow .more, .list .acts .icon-btn { min-width: 32px; min-height: 32px; border-radius: 9px; }
.tagrow .more { top: 2px; }
.nav { border-radius: 9px; }
.badge { color: var(--on-accent); }
.project-covers { border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
table.list.cover-grid { display: block; min-width: 0; }
.cover-grid thead { display: block; margin-bottom: 18px; }
.cover-grid thead tr { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.cover-grid th { padding: 0; font-size: 13px; }
.cover-grid th:first-child { width: 32px; padding: 0; }
.cover-grid th:last-child { padding: 0; }
.cover-grid th button.sort { min-height: 32px; }
.cover-grid tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 20px; }
.cover-grid .project-cover { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: start; gap: 8px;
  padding: 0 16px 14px; border-radius: 16px; background: var(--panel); box-shadow: var(--card-shadow); overflow: hidden; }
.cover-grid .project-cover:hover { background: var(--panel); }
.cover-grid .project-cover.on { background: var(--panel); outline: 2px solid var(--link); outline-offset: 2px; }
.cover-grid .project-cover td { padding: 0; border: 0; min-width: 0; color: var(--ink-2); font-size: 13px; }
.cover-grid .project-cover td:first-child { position: absolute; top: 12px; left: 12px; z-index: 1; padding: 0; width: auto; }
.cover-grid .project-cover td:nth-child(2) { grid-column: 1 / -1; }
.cover-grid .project-cover td:nth-child(3) { grid-column: 1; }
.cover-grid .project-cover td:nth-child(4) { grid-column: 2; justify-self: end; }
.cover-grid .project-cover td:nth-child(5) { grid-column: 1 / -1; }
.cover-grid .project-cover td:last-child { grid-column: 1 / -1; text-align: left; padding: 0; }
.cover-grid .t { display: block; }
.cover-grid .t a, .cover-grid .t .nolink { display: block; font-size: 15px; line-height: 1.4; }
.cover-grid .t a:hover { text-decoration: none; }
.cover-grid .t a:hover .paper-cover > span { color: #1d1d1f; }
.cover-grid .t .nolink { opacity: 1; }
.cover-grid .tag, .cover-grid .starting { margin-top: 8px; margin-right: 4px; }
.paper-cover { height: 236px; margin: 0 -16px 14px; padding: 26px 24px 0; display: flex; justify-content: center; overflow: hidden; background: var(--bg); }
.paper-cover > span { display: block; width: 190px; height: 266px; padding: 28px 20px; border-radius: 2px; background: #ffffff; color: #1d1d1f;
  font: 600 15px/1.35 var(--serif); text-align: center; overflow-wrap: anywhere; box-shadow: 0 6px 22px rgba(0,0,0,.18); }
.cover-grid .when { white-space: normal; }
.cover-grid .acts { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 -4px; }
.cover-grid .project-cover:focus-within { outline: 2px solid var(--link); outline-offset: 2px; }
.listfoot { border: 0; }
.project-covers .empty .btn.primary { background: var(--hover); border-color: transparent; color: var(--ink); }
.project-covers .empty .btn.primary:hover { background: var(--hover-2); }
input::placeholder { color: var(--ink-2); opacity: 1; }
@media (max-width: 1000px) { .main { padding: 32px 28px; } }
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { border-right: 0; }
  .main { padding: 24px 16px; }
  .head h1 { flex-basis: 100%; }
  .head .search { flex: 1; }
}

/* The same five tiers as the editor. Reading surfaces never move. */
button, .btn { transition: background-color var(--m-fade), color var(--m-fade), border-color var(--m-fade), opacity var(--m-fade), transform var(--m-press); }
button:active:not(:disabled), .btn:active:not(:disabled) { transform: scale(.97); }
.menu, .pop { opacity: 1; transform: none; transform-origin: top right; transition: transform var(--m-settle), opacity var(--m-fade); }
.veil { opacity: 1; transition: opacity var(--m-fade); }
.veil .sheet { opacity: 1; transform: none; transition: transform var(--m-settle), opacity var(--m-fade); }
.toast { opacity: 1; transition: opacity var(--m-fade); }
@starting-style {
  .menu, .pop { transform: scale(.97); opacity: 0; }
  .veil, .toast { opacity: 0; }
  .veil .sheet { transform: scale(.98); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: opacity var(--m-fade) !important; scroll-behavior: auto !important; }
  .menu, .pop, .sheet, button:active, .btn:active, .swatch:hover, .toggle i::after { transform: none !important; }
  .toggle input:checked + i::after { left: 18px; }
}

/* scrolling edges feather away, only on a side with more to see; a browser without scroll timelines simply shows a hard edge.
   Not on anything with its own shadow (a mask would cut it off), nor on the PDF or the code editor. */
@property --fade-top { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --fade-end { syntax: "<length>"; inherits: false; initial-value: 0px; }
@keyframes fade-top-in { from { --fade-top: 0px; } to { --fade-top: 28px; } }
@keyframes fade-end-out { from { --fade-end: 28px; } to { --fade-end: 0px; } }
@supports (animation-timeline: scroll()) {
  .side, .pop-b {
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 var(--fade-top), #000 calc(100% - var(--fade-end)), transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 var(--fade-top), #000 calc(100% - var(--fade-end)), transparent);
    animation: fade-top-in linear both, fade-end-out linear both;
    animation-timeline: scroll(self y), scroll(self y);
    animation-range: 0 40px, calc(100% - 40px) 100%;
  }
}

/* the tooltip: there at once, with a very quick fade */
.uitip { position: fixed; z-index: 100000; max-width: 280px; padding: 4px 8px; border-radius: 7px; background: #1d1d1f; color: #f5f5f7; font: 12px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", system-ui, sans-serif; box-shadow: 0 0 0 .5px rgba(255, 255, 255, .12), 0 4px 14px rgba(0, 0, 0, .28); pointer-events: none; opacity: 0; transition: opacity 90ms ease-out; }
.uitip.on { opacity: 1; }
.paper-cover > span { position: relative; }
.paper-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity var(--m-fade); }
.paper-cover img.loaded { opacity: 1; }

.template-sheet { width: min(800px, 100%); }
.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 20px; }
.template-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; text-align: left; border: 0; border-radius: 10px; padding: 8px; background: transparent; color: inherit; cursor: pointer; transition: background-color var(--m-fade); }
.template-card:hover { background: var(--hover); }
.template-card img { width: 100%; aspect-ratio: 0.72; object-fit: contain; object-position: top; background: white; border: .5px solid var(--line); border-radius: 4px; box-shadow: 0 2px 8px var(--hover); margin-bottom: 6px; }
.template-card b { font-size: 14px; font-weight: 500; }
.template-card span { font-size: 12px; color: var(--ink-2); }
@media (max-width: 600px) { .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 8px; } }

/* account: one centred column of grouped lists, as in System Settings */
.acct-main { padding-top: 40px; }
.acct { width: 100%; max-width: 680px; margin: 0 auto; display: grid; gap: 36px; padding-bottom: 32px; }
.acct-head { display: grid; justify-items: center; gap: 2px; text-align: center; }
.acct-head .av { margin-bottom: 12px; }
.acct-head h1 { margin: 0; font: 600 26px/1.25 var(--sans); letter-spacing: -.02em; color: var(--ink); overflow-wrap: anywhere; }
.acct-head p { margin: 0; color: var(--ink-2); font-size: 15px; overflow-wrap: anywhere; }
.av.xl { width: 80px; height: 80px; font-size: 34px; font-weight: 500; }
.acct-nav { display: grid; gap: 2px; }
.group { display: grid; gap: 8px; scroll-margin-top: 28px; }
.group h2 { margin: 0 0 2px 4px; font: 600 17px/1.3 var(--sans); letter-spacing: -.01em; color: var(--ink); }
.group h3 { margin: 18px 0 2px 4px; font: 600 14px/1.3 var(--sans); color: var(--ink); }
.gh { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-right: 4px; }
.gh h2 { margin-bottom: 2px; }
.gnote { margin: 0 4px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.glist { background: var(--panel); border-radius: 12px; box-shadow: 0 0 0 .5px var(--line); overflow: hidden; }
.lrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 52px; padding: 10px 16px; position: relative; }
.lrow + .lrow::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--line); }
.lrow:has(> .lico)::before { left: 56px; }
.lico { flex: none; width: 28px; height: 28px; display: grid; place-items: center; color: var(--ink-2); }
.lico.tile { border-radius: 7px; background: var(--hover-2); color: var(--ink); }
.lico svg, .lico .provider-mark { width: 16px; height: 16px; flex: none; }
.ltxt { flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; display: grid; gap: 1px; }
.ltxt b { font-weight: 500; }
.ltxt small { color: var(--ink-2); font-size: 13px; line-height: 1.4; }
.ltxt small .on { color: var(--ok-ink); }
.lend { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; min-width: 0; }
.lval { color: var(--ink-2); overflow-wrap: anywhere; }
.pill { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.pill svg { width: 12px; height: 12px; stroke-width: 2.6; }
.pill.ok { color: var(--ok-ink); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.pill.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 16%, transparent); }
.here { color: var(--ok-ink); font-size: 13px; font-weight: 500; }
.inline { height: 34px; width: 100%; padding: 0 12px; border-radius: 8px; border: 1px solid transparent; background: var(--hover); color: var(--ink);
  transition: border-color var(--m-fade), box-shadow var(--m-fade), background-color var(--m-fade); }
.inline:hover { background: var(--hover-2); }
.inline:focus { outline: none; background: var(--card); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field-row .lend { flex: 0 1 300px; }
.glist .swatches { --gap: var(--panel); }
.lrow .seg { flex: none; width: 252px; padding: 2px; border-radius: 9px; background: var(--hover-2); }
.lrow .seg button { height: 28px; border-radius: 7px; font-size: 13px; }
.lrow .seg button[aria-selected="true"] { background: light-dark(#ffffff, #636366); box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); }
.lbtn { width: 100%; justify-content: center; border: 0; background: transparent; color: var(--bad); font-weight: 500; cursor: pointer; }
.lbtn:hover { background: var(--hover); }
.lend .sel { width: auto; }
.ldetails { display: block; }
.ldetails summary { display: flex; align-items: center; gap: 8px; min-height: 32px; cursor: pointer; list-style: none; font-weight: 500; }
.ldetails summary::-webkit-details-marker { display: none; }
.ldetails summary::after { content: ""; width: 7px; height: 7px; margin-left: auto; border: solid var(--ink-3); border-width: 0 1.6px 1.6px 0; transform: rotate(-45deg); transition: transform var(--m-fade); }
.ldetails[open] summary::after { transform: rotate(45deg); }
.ldetails[open] summary { margin-bottom: 6px; }
.ldetails p { margin: 8px 0 4px; font-size: 13px; color: var(--ink-2); }
.cmd { display: flex; align-items: center; gap: 8px; }
.cmd input { flex: 1; min-width: 0; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: var(--hover); color: var(--ink); font: 12.5px var(--mono); }
.cmd input:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.lend .cmd { flex: 1 1 auto; }
.lrow.wide .ltxt, .lrow.wide .lend { flex-basis: 100%; }
.lrow.wide .lend { justify-content: flex-start; margin-left: 0; }
.lempty { color: var(--ink-2); font-size: 13.5px; }
.sheet-form { display: grid; gap: 16px; }
.sheet-form h3 { margin: 0; }
.sheet-form .err:empty { display: none; }
.sheet-form > .muted { margin: -8px 0 0; font-size: 13.5px; }
.sheet-form .row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.del-sheet { max-width: 100%; }
.del-part { display: grid; gap: 4px; }
.del-h { font-weight: 600; }
.del-part .muted { margin: 0; font-size: 13px; }
.del-list { margin: 2px 0 0; padding: 0 0 0 18px; display: grid; gap: 2px; font-size: 13.5px; color: var(--ink-2); max-height: 160px; overflow: auto; }
.del-list b { font-weight: 500; color: var(--ink); }
.del-warn { margin: 0; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--warn) 14%, transparent); font-size: 13.5px; }
@media (max-width: 760px) {
  .acct-side { position: sticky; top: 0; z-index: 5; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 10px 16px 8px;
    background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: .5px solid var(--line); -webkit-mask-image: none; mask-image: none; animation: none; }
  .acct-side .brand { flex: 1; padding: 4px 0; }
  .acct-side .nav.back { width: auto; margin: 0; }
  .acct-side .chipacct { display: none; }
  .acct-nav { flex-basis: 100%; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 4px 16px 2px; }
  .acct-nav::-webkit-scrollbar { display: none; }
  .acct-nav .nav { width: auto; flex: none; height: 30px; padding: 0 12px; border-radius: 15px; background: var(--hover); font-size: 13px; }
  .acct-nav .nav svg { display: none; }
  .acct-nav .nav[aria-current="true"] { background: var(--accent-soft); color: var(--accent-ink); }
  .acct-main { padding-top: 28px; }
  .acct { gap: 30px; }
  .group { scroll-margin-top: 112px; }
  .lrow .ltxt { flex-basis: 0; }
  .lrow.stack .ltxt { flex-basis: 100%; }
  .lrow.stack .lend { flex-basis: 100%; justify-content: flex-start; margin-left: 0; }
  .lrow .seg { width: 100%; }
}

/* Consent uses the same surfaces, fields and buttons as sign-in and account settings. */
.oauth-consent { max-width: 480px; }
.oauth-consent h1 { font-size: 25px; line-height: 1.25; margin: 24px 0 16px; overflow-wrap: anywhere; }
.oauth-consent p, .oauth-consent li { color: var(--ink-2); line-height: 1.6; }
.oauth-consent ul { padding-left: 22px; }
.oauth-consent form { margin-top: 24px; }
.oauth-consent .brand img { width: 36px; height: 36px; }

/* site admin: the same surfaces as the account page; the two lists are grouped tables, one person or project a column of grouped lists */
.nav.admin-link { margin-bottom: 8px; }
.adm-main { padding-top: 40px; }
.adm { width: 100%; max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.adm-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; }
.adm-head h1 { margin: 0; font: 600 28px/1.2 var(--sans); letter-spacing: -.02em; color: var(--ink); }
.adm-sum { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.adm-head .search { width: min(300px, 100%); height: 36px; background: var(--hover); border: 0; }
.adm-head .search input::-webkit-search-cancel-button { cursor: pointer; }
.adm-box { position: relative; background: var(--panel); border-radius: 12px; box-shadow: 0 0 0 .5px var(--line); overflow-x: auto; }
.adm-table { width: 100%; min-width: 980px; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.adm-table th { text-align: left; padding: 10px 12px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); white-space: nowrap; border-bottom: .5px solid var(--line); }
.adm-table td { padding: 9px 12px; color: var(--ink-2); white-space: nowrap; vertical-align: middle; }
.adm-table tbody tr + tr td { border-top: .5px solid var(--line); }
.adm-table th:first-child, .adm-table td:first-child { padding-left: 16px; }
.adm-table th:last-child, .adm-table td:last-child { padding-right: 14px; width: 24px; }
.adm-table tbody tr { cursor: pointer; transition: background-color var(--m-fade); }
.adm-table tbody tr:hover { background: var(--hover); }
.adm-table tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.adm-table th button.sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; border-radius: 6px; padding: 2px 4px; margin: -2px -4px; }
.adm-table th button.sort:hover, .adm-table th button.sort.on { color: var(--ink); }
.adm-table th button.sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.adm-table th button.sort .arrow { font-size: 12px; min-width: 8px; }
.adm-table .c-name, .adm-table .c-title { white-space: normal; min-width: 200px; }
.adm-table .c-title b { overflow-wrap: anywhere; }
.adm-table .c-email { max-width: 240px; }
.adm-email { overflow: hidden; text-overflow: ellipsis; }
.adm-two { display: grid; gap: 1px; line-height: 1.3; min-width: 0; }
.adm-two b { font-weight: 500; color: var(--ink); }
.adm-two small { font-size: 12.5px; color: var(--ink-3); }
.adm-two small:empty { display: none; }
small.ok { color: var(--ok-ink); }
small.warn { color: var(--warn); }
small.bad { color: var(--err-ink); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--ink-3); }
.adm-table .who-cell { gap: 10px; }
.adm-table .who-cell > .muted { margin-left: -2px; }
.adm-table .stack .av { border-color: var(--panel); }
.adm-badge { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); font-size: 11.5px; font-weight: 600; line-height: 18px; vertical-align: 1px; }
.adm-methods { display: inline-flex; gap: 5px; }
.adm-method { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--hover-2); color: var(--ink); }
.adm-method svg, .adm-method .provider-mark { width: 13px; height: 13px; }
.adm-method .provider-mark svg { width: 13px; height: 13px; display: block; }
.adm-state { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.adm-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex: none; }
.adm-state.running i, .adm-state.online i { background: var(--ok); }
.adm-state.working i { background: var(--accent); }
.adm-state.paused i { background: var(--warn); }
.adm-state.asleep i, .adm-state.offline i, .adm-state.stopped i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.adm-state.asleep, .adm-state.offline, .adm-state.stopped { color: var(--ink-2); }
.chev { display: inline-block; width: 7px; height: 7px; border: solid var(--ink-3); border-width: 0 1.6px 1.6px 0; transform: rotate(-45deg); opacity: .8; }
.adm-box .empty { padding: 48px 16px; }
.adm-detail { gap: 32px; }
.adm-back { justify-self: start; display: inline-flex; align-items: center; gap: 2px; margin: 0 0 -20px -4px; color: var(--link); font-size: 14px; }
.adm-back svg { width: 18px; height: 18px; }
.adm-detail .acct-head p { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 4px; }
.adm-phead h1 { font-size: 26px; }
.adm-phead .btn { margin-top: 14px; }
.adm-phead .gnote { margin-top: 12px; }
.gcount { color: var(--ink-3); font-size: 15px; font-variant-numeric: tabular-nums; }
.lrow.link { cursor: pointer; transition: background-color var(--m-fade); }
.lrow.link:hover { background: var(--hover); }
.lrow.link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lrow:has(> .av)::before { left: 56px; }
.lico.vtag { width: auto; min-width: 28px; padding: 0 5px; font-size: 11px; color: var(--ink-2); }
.pill.role { color: var(--ink-2); background: var(--hover-2); }
.pill.role.owner { color: var(--accent-ink); background: var(--accent-soft); }
.lend .lval + .pill { margin-left: 2px; }
.lend .adm-two { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-end; gap: 2px 8px; }
.lend .adm-two small { font-size: 13px; }
.lend .on { color: var(--ok-ink); }
.adm-method svg, .adm-method .provider-mark svg { width: 14px; height: 14px; }
@media (max-width: 760px) {
  .adm-side .side-h { display: none; }
  .adm-main { padding-top: 24px; }
  .adm-head .search { width: 100%; }
  .adm-back { margin-bottom: -12px; }
}
.connector-url { display: block; overflow-wrap: anywhere; margin: 12px 0; }

/* Account AI: quiet grouped settings, with one surface for each computer. */
#ai, #connected-apps { gap: 12px; }
.settings-card { min-width: 0; padding: 16px; border: .5px solid var(--line); border-radius: 12px; background: var(--panel); }
.settings-card h3, .group .settings-card h3 { margin: 0; font: 600 14px/1.4 var(--sans); }
.settings-card p { margin: 6px 0 0; color: var(--ink-2); font-size: 13px; }
.settings-card code { font: 12px/1.5 var(--mono); }
.engine-settings code, .engine-help code { padding: 2px 5px; border-radius: 4px; background: var(--hover); }
.jev-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.jev-row p { margin: 3px 0 0; }
#ai-jev { color: var(--ink-2); }
.section-sessions { font-size: 13px; white-space: nowrap; }
.engine-help { margin-top: 14px; padding-top: 12px; border-top: .5px solid var(--line); font-size: 13px; color: var(--ink-2); }
.engine-help summary, .online-papers summary { cursor: pointer; }
.engine-help p { line-height: 1.6; }
.computer-list { display: grid; gap: 12px; min-width: 0; }
.computer-card { padding: 0 16px; }
.computer-header { display: flex; align-items: center; gap: 10px; padding: 16px 0; }
.computer-icon { display: grid; place-items: center; width: 32px; height: 32px; flex: none; color: var(--ink-2); }
.computer-icon .i { width: 26px; height: 26px; stroke-width: 1.3; }
.computer-header .ltxt { flex: 1; }
.computer-header .ltxt b { font-weight: 600; }
.machine-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 12px; background: var(--hover); font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.machine-pill[data-state="online"], .machine-pill[data-state="working"] { color: var(--ok-ink); background: color-mix(in srgb, var(--ok) 9%, transparent); }
.machine-pill[data-state="paused"] { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.machine-pill .aidot { width: 6px; height: 6px; margin: 0; background: var(--ink-3); box-shadow: none; }
.machine-pill[data-state="online"] .aidot, .machine-pill[data-state="working"] .aidot { background: var(--ok); }
.machine-pill[data-state="paused"] .aidot { background: var(--warn); }
.computer-group { border-top: .5px solid var(--line); padding: 14px 0; }
.group .computer-group > h3 { margin: 0 0 12px; }
.engine-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.engine-grid .engine-field { grid-column: 1; }
.engine-grid .engine-tier { grid-column: 1 / -1; }
.engine-grid .engine-tier { font-size: 13px; font-weight: 500; margin-bottom: -8px; }
.engine-grid label { display: grid; gap: 6px; min-width: 0; color: var(--ink-2); font-size: 13px; }
.engine-grid .sel { width: 100%; min-width: 0; height: 36px; padding: 0 10px; border: .5px solid var(--line-2); border-radius: 7px; background-color: var(--card); color: var(--ink); font-size: 13px; text-overflow: ellipsis; }
.engine-grid .sel:disabled { color: var(--ink-2); opacity: .65; }
.engine-health { margin-top: 12px; color: var(--ink-2); font-size: 13px; }
.engine-health summary { cursor: pointer; list-style: none; }
.engine-health summary::-webkit-details-marker { display: none; }
.health-label { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.health-label > span { display: inline-flex; }
.health-label .i { width: 14px; height: 14px; }
.ready .health-label { color: var(--ok-ink); }
.failed .health-label { color: var(--bad); }
.health-details { color: var(--link); }
.engine-health summary:hover .health-details { text-decoration: underline; }
.engine-diagnostic { margin: 8px 0 0; padding: 10px 12px; border-radius: 7px; background: var(--hover); color: var(--ink-2); font: 12px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 128px; overflow: auto; }
.folder-base { display: flex; align-items: baseline; gap: 10px; margin: -4px 0 8px; color: var(--ink-2); }
.folder-base code { overflow-wrap: anywhere; min-width: 0; }
.folder-base button { flex: none; }
.folder-row { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 42px; border-top: .5px solid var(--line); }
.folder-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 13px; }
.paper-chip { flex: none; border-radius: 5px; padding: 2px 6px; font-size: 11px; color: var(--ink-2); background: var(--hover); white-space: nowrap; }
.paper-chip.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.paper-chip.bad { color: var(--bad); }
.folder-row .icon-btn { width: 26px; height: 28px; flex: none; }
.folder-more { opacity: 0; }
.folder-row:hover .folder-more, .folder-row:focus-within .folder-more, .folder-more[aria-expanded="true"] { opacity: 1; }
.computer-footer { padding: 12px 0; border-top: .5px solid var(--line); font-size: 13px; }
.online-papers { font-size: 13px; color: var(--ink-2); }
.online-papers .lrow { padding: 10px 0; }
.add-computer { border: 1px dashed var(--line-2); background: transparent; }
.add-computer .cmd, .connector-intro .cmd { margin-top: 12px; }
.cmd { position: relative; display: flex; width: 100%; gap: 0; border: .5px solid var(--line-2); border-radius: 8px; background: var(--hover); }
.cmd input { width: 100%; height: 38px; padding: 0 42px 0 10px; border-radius: inherit; background: transparent; }
.cmd .icon-btn { position: absolute; top: 3px; right: 3px; width: 32px; height: 32px; }
.add-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.add-computer .gnote { margin-top: 12px; }
.connector-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.connector-note { min-height: 20px; }
.connector-tile ol { display: grid; gap: 12px; margin: 16px 0 0; padding-left: 20px; font-size: 13px; color: var(--ink-2); }
.connector-tile li { padding-left: 3px; }
.connector-tile li::marker { color: var(--ink-3); }
#connector-list .lrow { padding: 16px; }
.disconnect { color: var(--bad); }
.textbtn:hover { text-decoration: underline; }
@media (max-width: 480px) {
  .computer-card { scroll-margin-top: 112px; }
  .engine-grid, .connector-tiles { grid-template-columns: minmax(0, 1fr); }
  .computer-header { gap: 6px; }
  .computer-icon { width: 24px; }
  .computer-icon .i { width: 22px; }
  .machine-pill { padding: 3px 6px; font-size: 11px; }
  .computer-header .machine-more { width: 26px; flex: none; }
  .computer-header .ltxt b { font-size: 13px; }
  .folder-row { gap: 4px; }
  .folder-row .icon-btn { width: 24px; }
  .jev-row { align-items: flex-start; }
}
@media (hover: none) { .folder-more { opacity: 1; } }

/* Sessions use persistent request history; no simulated live progress. */
.sessions-main { max-width: 1400px; width: 100%; min-width: 0; }
.session-filters { display: inline-flex; margin: 0 0 22px; max-width: 100%; }
.session-filters button { white-space: nowrap; }
.session-filters [aria-pressed="true"] { background: var(--card); color: var(--link); box-shadow: var(--card-shadow); }
.session-row { display: flex; align-items: center; gap: 18px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); margin-bottom: 10px; }
.session-summary { flex: 1; min-width: 0; }
.session-summary h2 { font-size: 16px; margin: 0 0 8px; overflow-wrap: anywhere; }
.session-summary a { color: var(--ink); text-decoration: none; }
.session-summary a:hover { color: var(--link); text-decoration: underline; }
.session-summary p { margin: 0; font-size: 13px; }
.session-actions { display: flex; gap: 8px; flex-shrink: 0; }
.session-chip { display: inline-block; border-radius: 20px; padding: 5px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--hover); color: var(--ink-2); }
.session-chip.running { color: var(--link); background: var(--accent-soft); }
.session-chip.needs_you { color: light-dark(#805000, #ffd18a); background: light-dark(#fff1d5, #493519); }
.session-chip.done { color: var(--ok-ink); background: light-dark(#e5f5e9, #193e25); }
.session-chip.failed { color: var(--err-ink); }
.session-stop { color: var(--err-ink); }
.session-empty { padding: 48px 20px; color: var(--ink-2); text-align: center; line-height: 1.7; }
.session-breadcrumb { color: var(--ink-2); font-size: 14px; margin: 0 0 24px; }
.session-breadcrumb a { color: var(--link); }
.session-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--ink-2); font-size: 13px; margin: 0 0 25px; }
.session-columns { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 22px; margin-top: 22px; align-items: start; }
.session-panel { background: var(--panel); border: 1px solid var(--line); padding: 24px; border-radius: 16px; margin-bottom: 20px; min-width: 0; }
.session-panel h2 { font-size: 18px; margin: 0 0 22px; }
.session-panel p { line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.session-steps { list-style: none; padding: 0; margin: 0; }
.session-steps > li { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 14px; padding: 0 0 26px; }
.session-steps > li:not(:last-child)::before { content: ''; position: absolute; top: 22px; left: 10px; bottom: 3px; width: 1px; background: var(--line); }
.session-steps h3 { font-size: 15px; margin: 1px 0 12px; }
.step-marker { color: var(--ink-3); text-align: center; }
.done .step-marker { color: var(--ok-ink); }
.current .step-marker { color: var(--link); }
.waiting h3 { color: var(--ink-3); }
.session-event { font-size: 13px; color: var(--ink-2); }
.session-agent { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin: 10px 0; }
.session-agent small { display: block; color: var(--ink-2); margin-top: 6px; }
.session-message { border-radius: 10px; background: var(--hover); padding: 12px 14px; margin: 10px 0; font-size: 13px; }
.session-message.user { background: var(--accent-soft); }
.session-message p { margin: 6px 0 0; }
.session-message-form { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; align-items: flex-end; }
.session-message-form textarea { width: 100%; resize: vertical; border: 1px solid var(--field-line); border-radius: 10px; background: var(--panel); color: var(--ink); padding: 12px; font: inherit; }
.session-row a:focus-visible, .sessions-main :is(button,a,textarea,input):focus-visible { outline: 3px solid #0071e3; outline-offset: 3px; }
@media (max-width: 760px) {
  .session-columns { grid-template-columns: minmax(0, 1fr); }
  .session-row { flex-wrap: wrap; padding: 16px; gap: 12px; }
  .session-summary { flex-basis: calc(100% - 110px); }
  .session-actions { width: 100%; justify-content: flex-end; }
  .session-panel { padding: 18px; }
  .session-filters { width: 100%; }
  .session-filters button { flex: 1; padding: 8px; }
}
.session-event-data { display: block; margin-top: 4px; }
.nav[aria-current="page"] { background: var(--sel); color: var(--ink); font-weight: 600; }

/* Visible copies use the account's grouped rows in both colour schemes. */
.folder-path { overflow-wrap: anywhere; }
.folder-row .ltxt { min-width: 0; }
.folder-error { color: var(--err); }
#paper-folders .lend { flex-wrap: wrap; }

/* what a project is (paper, slides, diagram, table): a small label on its cover */
.paper-cover { position: relative; }
.paper-cover > .kind-badge { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 4px; width: auto; height: 22px; padding: 0 8px 0 6px;
  border-radius: 11px; background: var(--panel); color: var(--ink-2); font: 500 11.5px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  text-align: left; box-shadow: 0 0 0 .5px var(--line), 0 1px 3px rgba(0,0,0,.08); }
.paper-cover > .kind-badge .i { width: 14px; height: 14px; }
.paper-cover > .kind-diagram, .paper-cover > .kind-table, .paper-cover > .kind-slides { color: var(--link); }
