/* Tap AAC portal (tapaac.com/app/). Every class starts with ta-. Neutral greys, one accent (brand teal),
   an 8px spacing scale, 1px borders, light and dark by the system setting.
   Adaptive rules (the Tap AAC app's window size classes, ADAPTIVE.md in the app repo), by window width:
   compact < 600: full-screen pop-ups, stacked tables, the sidebar is a drawer behind the menu button;
   medium 600-839: tables and two-column forms come back, pop-ups still full screen, sidebar still a drawer;
   expanded 840+: the sidebar stays, the board editor shows its page list beside the board, pop-ups are panels at the
   right; large (page 1100px+): People shows the chosen person beside the list. Pages stop growing (max 1120px, the board
   1280px) and stand in the middle. Short windows (height < 480, a phone on its side): the top bar scrolls away.
   Touch: controls at least 48px tall. A foldable open like a book: the two halves of a screen meet at the fold. */

:root {
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r-sm: 6px; --r: 8px; --r-lg: 12px;

  --bg: #F7F7F8;
  --surface: #FFFFFF;
  --surface-2: #F3F4F6;
  --surface-3: #E9EBEF;
  --border: #E4E6EA;
  --border-strong: #D2D6DC;
  --text: #15181D;
  --text-2: #4A5260;
  --text-3: #6B7280;
  --accent: #0F6E8C;
  --accent-hover: #0C5C75;
  --accent-soft: #E8F3F6;
  --accent-text: #0C5C75;
  --accent-ring: rgba(15, 110, 140, .35);
  --yellow: #FFC933;
  --danger: #B42318;
  --danger-hover: #912018;
  --danger-soft: #FEF3F2;
  --ok: #067647;
  --ok-soft: #ECFDF3;
  --warn: #B54708;
  --warn-soft: #FFFAEB;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 32px -8px rgba(16, 24, 40, .18), 0 4px 8px -4px rgba(16, 24, 40, .08);
  --side-w: 248px;
  --top-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1116;
    --surface: #151920;
    --surface-2: #1B2029;
    --surface-3: #232935;
    --border: #262C36;
    --border-strong: #333B48;
    --text: #E7E9EC;
    --text-2: #AEB5C0;
    --text-3: #8790A0;
    --accent: #3AA6C7;
    --accent-hover: #5CB8D4;
    --accent-soft: rgba(58, 166, 199, .14);
    --accent-text: #7CC9E0;
    --accent-ring: rgba(58, 166, 199, .45);
    --danger: #F97066;
    --danger-hover: #FDA29B;
    --danger-soft: rgba(249, 112, 102, .12);
    --ok: #47CD89;
    --ok-soft: rgba(71, 205, 137, .12);
    --warn: #FDB022;
    --warn-soft: rgba(253, 176, 34, .12);
    --shadow-sm: none;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 16px 40px -8px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; }

/* ---------- Type ---------- */
.ta-display { font-size: 24px; line-height: 1.25; font-weight: 600; letter-spacing: -.02em; }
.ta-h2 { font-size: 18px; line-height: 1.35; font-weight: 600; letter-spacing: -.01em; }
.ta-h3 { font-size: 14px; line-height: 1.4; font-weight: 600; display: flex; align-items: center; gap: var(--s2); }
.ta-h3 .ta-ic { color: var(--text-3); }
.ta-overline { font-size: 12px; font-weight: 600; color: var(--text-3); letter-spacing: .02em; }
.ta-muted { color: var(--text-3); }
.ta-small { font-size: 13px; }
.ta-mono { font-family: var(--mono); letter-spacing: .02em; }
.ta-center { text-align: center; }
.ta-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ta-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ta-grow { flex: 1; }
.ta-mt { margin-top: var(--s5); }
.ta-pad { padding: var(--s2) var(--s3); }
.ta-pad-x { padding-left: var(--s5); padding-right: var(--s5); }
.ta-pad-b { padding-bottom: var(--s5); }
.ta-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--surface-2); color: var(--text-3); font-size: 12px; font-weight: 500; }
.ta-optional { font-weight: 400; color: var(--text-3); font-size: 12px; margin-left: 4px; }

/* ---------- Icons, avatars ---------- */
.ta-ic { width: 18px; height: 18px; flex: none; }
.ta-logo { width: 28px; height: 28px; flex: none; }
.ta-g { width: 18px; height: 18px; }
.ta-av { --h: 192; display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 999px; font-weight: 600; letter-spacing: .01em;
  background: hsl(var(--h) 55% 92%); color: hsl(var(--h) 55% 28%); }
@media (prefers-color-scheme: dark) { .ta-av { background: hsl(var(--h) 35% 24%); color: hsl(var(--h) 60% 82%); } }
.ta-av-xs { width: 22px; height: 22px; font-size: 10px; }
.ta-av-sm { width: 28px; height: 28px; font-size: 11px; }
.ta-av-md { width: 36px; height: 36px; font-size: 13px; }
.ta-av-lg { width: 48px; height: 48px; font-size: 16px; }
.ta-av-xl { width: 64px; height: 64px; font-size: 22px; }
.ta-av-neutral { background: var(--surface-2); color: var(--text-3); }
.ta-av-neutral .ta-ic { width: 16px; height: 16px; }
.ta-av-more { background: var(--surface-2); color: var(--text-3); }
.ta-faces { display: inline-flex; }
.ta-faces .ta-av { box-shadow: 0 0 0 2px var(--surface); }
.ta-faces .ta-av + .ta-av { margin-left: -6px; }

/* ---------- Buttons ---------- */
.ta-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); height: 36px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-weight: 500; font-size: 14px; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-sm); text-decoration: none; transition: background .12s, border-color .12s; }
.ta-btn:hover { background: var(--surface-2); text-decoration: none; }
.ta-btn:disabled { opacity: .55; cursor: default; }
.ta-btn .ta-ic { width: 16px; height: 16px; }
.ta-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.ta-btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
@media (prefers-color-scheme: dark) { .ta-btn-primary { color: #04151B; } }
.ta-btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.ta-btn-danger:hover { background: var(--danger-hover); border-color: var(--danger-hover); }
@media (prefers-color-scheme: dark) { .ta-btn-danger { color: #1B0705; } }
.ta-btn-ghost-danger { color: var(--danger); border-color: var(--border); background: transparent; box-shadow: none; }
.ta-btn-ghost-danger:hover { background: var(--danger-soft); }
.ta-btn-sm { height: 30px; padding: 0 10px; font-size: 13px; gap: 6px; }
.ta-btn-lg { height: 44px; padding: 0 18px; font-size: 15px; width: 100%; }
.ta-btn-google { background: var(--surface); }
.ta-iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 0; border-radius: var(--r); background: transparent; color: var(--text-2); cursor: pointer; flex: none; }
.ta-iconbtn:hover { background: var(--surface-2); color: var(--text); }
.ta-iconbtn-sm { width: 28px; height: 28px; }
.ta-iconbtn.ta-danger:hover { color: var(--danger); background: var(--danger-soft); }
.ta-link { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0; color: var(--accent-text); font-weight: 500; font-size: 13px; cursor: pointer; }
.ta-link .ta-ic { width: 14px; height: 14px; }
.ta-btnrow { display: flex; gap: var(--s2); align-items: center; }
.ta-wrap { flex-wrap: wrap; }
.ta-actions { display: flex; gap: var(--s2); flex-wrap: wrap; }

/* ---------- Pills, tags, chips ---------- */
.ta-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; border: 1px solid transparent; }
.ta-role-owner { background: #FFF6DB; color: #7A5600; border-color: #F5E2A6; }
.ta-role-editor { background: var(--accent-soft); color: var(--accent-text); }
.ta-role-viewer { background: var(--surface-2); color: var(--text-2); }
@media (prefers-color-scheme: dark) { .ta-role-owner { background: rgba(255, 201, 51, .12); color: #FFD666; border-color: transparent; } }
.ta-tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 500; white-space: nowrap; }
.ta-tag .ta-ic { width: 13px; height: 13px; }
.ta-tag-accent { background: var(--accent-soft); color: var(--accent-text); }
.ta-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--text-2); }
.ta-status::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: var(--text-3); }
.ta-status-active::before { background: var(--accent); }
.ta-status-met::before { background: var(--ok); }
.ta-status-paused::before { background: var(--warn); }
.ta-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ta-chip { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 500; cursor: pointer; }
.ta-chip:hover { border-color: var(--border-strong); color: var(--text); }
.ta-chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--surface); }

/* ---------- Forms ---------- */
.ta-field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 var(--s4); border: 0; padding: 0; min-width: 0; }
.ta-label { font-size: 13px; font-weight: 500; color: var(--text); padding: 0; }
.ta-hint { font-size: 12.5px; color: var(--text-3); display: inline-flex; align-items: center; gap: 6px; }
.ta-hint .ta-ic { width: 15px; height: 15px; }
.ta-input { width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface); color: var(--text); font-size: 14px; box-shadow: var(--shadow-sm); transition: border-color .12s, box-shadow .12s; }
textarea.ta-input { height: auto; padding: 8px 10px; resize: vertical; line-height: 1.5; }
.ta-textarea-lg { min-height: 200px; }
select.ta-input { padding-right: 28px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 16px; }
.ta-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.ta-input:disabled { background: var(--surface-2); color: var(--text-3); }
.ta-input-sm { height: 30px; font-size: 13px; width: auto; }
.ta-input::placeholder, textarea::placeholder { color: var(--text-3); opacity: .8; }
.ta-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.ta-field-short { max-width: 200px; }
.ta-check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; margin-bottom: var(--s4); }
.ta-check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.ta-check small { display: block; color: var(--text-3); font-size: 12.5px; }
.ta-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); width: max-content; max-width: 100%; }
.ta-seg-wrap { flex-wrap: wrap; width: auto; }
.ta-seg label { position: relative; cursor: pointer; }
.ta-seg input { position: absolute; opacity: 0; inset: 0; }
.ta-seg span { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.ta-seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.ta-seg input:focus-visible + span { outline: 2px solid var(--accent); }
.ta-radios { display: grid; gap: 6px; }
.ta-radios-2 { grid-template-columns: 1fr 1fr; }
.ta-radio { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r); cursor: pointer; background: var(--surface); }
.ta-radio:hover { border-color: var(--border-strong); }
.ta-radio input { accent-color: var(--accent); margin: 0; }
.ta-radio .ta-ic { color: var(--text-3); width: 16px; height: 16px; }
.ta-radio:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.ta-search { position: relative; display: flex; align-items: center; min-width: 0; }
.ta-search .ta-ic { position: absolute; left: 10px; width: 16px; height: 16px; color: var(--text-3); pointer-events: none; }
.ta-search input { width: 100%; height: 36px; padding: 0 36px 0 34px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); color: var(--text); font-size: 14px; }
.ta-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.ta-search kbd { position: absolute; right: 8px; font: 500 11px var(--font); color: var(--text-3); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; background: var(--surface-2); }
.ta-search input:focus + kbd { display: none; }
.ta-search-sm input { height: 32px; font-size: 13px; }
.ta-select-inline { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); }
.ta-select-inline select { height: 30px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--r); padding: 0 8px; font-size: 13px; color: var(--text); }
.ta-copyfield { display: flex; gap: var(--s2); }
.ta-copyfield .ta-input { font-size: 13px; }
.ta-form-foot { display: flex; justify-content: flex-end; gap: var(--s2); padding-top: var(--s4); border-top: 1px solid var(--border); margin-top: var(--s2); }

/* ---------- Boot, sign-in ---------- */
.ta-boot { min-height: 100vh; display: grid; place-items: center; }
.ta-spinner { width: 22px; height: 22px; border-radius: 999px; border: 2px solid var(--border-strong); border-top-color: var(--accent); animation: ta-spin .8s linear infinite; }
@keyframes ta-spin { to { transform: rotate(360deg); } }
.ta-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--s6) var(--s4); }
.ta-auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s6); box-shadow: var(--shadow); }
.ta-auth-card-wide { max-width: 640px; }
.ta-auth-brand { display: flex; width: max-content; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; color: var(--text); margin-bottom: var(--s6); }
.ta-auth-brand:hover { text-decoration: none; }
.ta-auth-h { font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; }
.ta-auth-sub { color: var(--text-2); margin-top: var(--s2); }
.ta-auth-actions { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s5); }
.ta-auth-fine { color: var(--text-3); font-size: 12.5px; margin-top: var(--s3); }
.ta-auth-links { display: flex; gap: var(--s2); justify-content: center; margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--border); font-size: 13px; color: var(--text-3); }
.ta-auth-links a { color: var(--text-2); }
.ta-auth-badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 12px; font-weight: 600; margin-bottom: var(--s3); }
.ta-auth-badge .ta-ic { width: 14px; height: 14px; }
.ta-auth-code { display: flex; justify-content: space-between; align-items: center; margin-top: var(--s4); padding: var(--s3) var(--s4); border: 1px dashed var(--border-strong); border-radius: var(--r); }
.ta-auth-code strong { font-family: var(--mono); font-size: 16px; letter-spacing: .08em; }
.ta-auth-steps { margin-top: var(--s5); padding-left: 20px; color: var(--text-2); font-size: 13px; display: grid; gap: 4px; }
.ta-testsignin { margin-top: var(--s3); padding-top: var(--s3); border-top: 1px dashed var(--border-strong); display: grid; gap: 6px; }
.ta-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-top: var(--s5); }
.ta-choice { position: relative; display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s4); border: 1px solid var(--border); border-radius: var(--r-lg); cursor: pointer; background: var(--surface); transition: border-color .12s; }
.ta-choice:hover { border-color: var(--border-strong); }
.ta-choice input { position: absolute; opacity: 0; }
.ta-choice:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
.ta-choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.ta-choice-ic { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--r); background: var(--surface-2); color: var(--accent-text); flex: none; }
.ta-choice-txt { display: flex; flex-direction: column; gap: 2px; }
.ta-choice-txt span { color: var(--text-3); font-size: 13px; }
.ta-choice-other { margin-top: var(--s3); color: var(--text-2); }

/* ---------- App shell ---------- */
.ta-app { display: flex; min-height: 100vh; }
.ta-side { position: sticky; top: 0; height: 100vh; width: var(--side-w); flex: none; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--border); padding: var(--s3); gap: var(--s2); z-index: 30; transition: width .18s ease; }
.ta-side-top { display: flex; align-items: center; justify-content: space-between; height: 36px; padding-left: 6px; }
.ta-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 15px; letter-spacing: -.01em; min-width: 0; }
.ta-brand:hover { text-decoration: none; }
.ta-drawer-close { display: none; }
.ta-switcher-wrap { padding: var(--s1) 0 var(--s2); border-bottom: 1px solid var(--border); }
.ta-switcher { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); cursor: pointer; text-align: left; }
.ta-switcher:hover { background: var(--surface-2); }
.ta-switcher > .ta-ic { color: var(--text-3); width: 16px; height: 16px; }
.ta-switcher-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.ta-switcher-txt strong { font-size: 13.5px; font-weight: 600; }
.ta-switcher-txt span { font-size: 12px; color: var(--text-3); }
.ta-nav { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; flex: 1; padding-top: var(--s1); }
.ta-nav-item { flex: none; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: var(--r-sm); color: var(--text-2); font-weight: 500; font-size: 14px; white-space: nowrap; }
.ta-nav-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.ta-nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }
.ta-nav-item[aria-current="page"] .ta-ic { color: var(--accent-text); }
.ta-nav-item .ta-ic { color: var(--text-3); }
.ta-nav-text { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.ta-nav-count { font-size: 12px; color: var(--text-3); font-weight: 500; }
.ta-nav-group { margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 1px; }
.ta-nav-label { display: flex; align-items: center; gap: 6px; padding: 0 10px 6px; font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: none; letter-spacing: .01em; }
.ta-nav-label::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--yellow); flex: none; }
.ta-side-bottom { border-top: 1px solid var(--border); padding-top: var(--s2); display: flex; flex-direction: column; gap: 1px; }
.ta-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ta-top { position: sticky; top: 0; z-index: 20; height: var(--top-h); display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s5); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--border); }
.ta-menu-btn, .ta-search-btn { display: none; }
.ta-top-title { min-width: 0; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.ta-crumbs { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-3); min-height: 0; overflow: hidden; white-space: nowrap; }
.ta-crumbs:empty { display: none; }
.ta-crumbs a { color: var(--text-3); }
.ta-crumb-sep { width: 12px; height: 12px; }
.ta-title { font-size: 15px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ta-top-search { width: min(320px, 32vw); }
.ta-avatar-btn { border: 0; background: none; padding: 2px; border-radius: 999px; cursor: pointer; }
.ta-avatar-btn:hover .ta-av { filter: brightness(.96); }
.ta-main { flex: 1; outline: none; }
.ta-page { max-width: 1120px; margin: 0 auto; padding: var(--s6) var(--s5) var(--s7); display: flex; flex-direction: column; gap: var(--s4); }
.ta-page-narrow { max-width: 760px; }
.ta-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s2); }
.ta-page-head p { margin-top: 4px; max-width: 640px; }
.ta-section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s2); }
.ta-back { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); font-size: 13px; font-weight: 500; width: max-content; }
.ta-back .ta-ic { width: 16px; height: 16px; }

/* Collapsed sidebar (desktop) */
@media (min-width: 840px) {
  .ta-app.is-collapsed { --side-w: 64px; }
  .is-collapsed .ta-brand-word, .is-collapsed .ta-nav-text, .is-collapsed .ta-nav-count, .is-collapsed .ta-switcher-txt, .is-collapsed .ta-switcher > .ta-ic, .is-collapsed .ta-nav-label span { display: none; }
  .is-collapsed .ta-side-top { flex-direction: column; height: auto; gap: var(--s2); padding: 0; }
  .is-collapsed .ta-switcher { justify-content: center; padding: 6px; border-color: transparent; }
  .is-collapsed .ta-nav-item { justify-content: center; padding: 0; }
  .is-collapsed .ta-nav-label { justify-content: center; padding: 0 0 6px; }
}

/* ---------- Panels, cards ---------- */
.ta-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s5); box-shadow: var(--shadow-sm); }
.ta-panel-flush { padding: var(--s5) 0 0; overflow: hidden; }
.ta-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.ta-panel-head p { margin-top: 2px; }
.ta-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); color: var(--text); }
a.ta-card:hover, button.ta-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); text-decoration: none; }
.ta-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: var(--s4); }
.ta-cards > *, .ta-page > *, .ta-two-col > * { min-width: 0; }
.ta-two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s4); align-items: start; }
.ta-pcard { display: flex; flex-direction: column; gap: var(--s4); padding: var(--s4) var(--s5); }
.ta-pcard-top { display: flex; align-items: center; gap: var(--s3); }
.ta-pcard-name { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.35; }
.ta-pcard-name strong { font-size: 15px; font-weight: 600; }
.ta-pcard-stats { display: flex; gap: var(--s4); flex-wrap: wrap; font-size: 13px; color: var(--text-2); min-height: 20px; }
.ta-pcard-stats span { display: inline-flex; align-items: center; gap: 6px; }
.ta-pcard-stats .ta-ic { width: 15px; height: 15px; color: var(--text-3); }
.ta-pcard-foot { display: flex; align-items: center; gap: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--border); min-width: 0; }
.ta-start { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.ta-start-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: var(--s5); text-align: left; cursor: pointer; font-size: 14px; }
.ta-start-card strong { font-size: 15px; }
.ta-start-ic { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: var(--r); background: var(--accent-soft); color: var(--accent-text); margin-bottom: var(--s2); }
.ta-hero-person { display: grid; grid-template-columns: 1fr auto; gap: var(--s5); padding: var(--s5); align-items: center; }
.ta-hero-left { display: flex; gap: var(--s4); align-items: center; min-width: 0; }
.ta-hero-left p { margin-top: 2px; }
.ta-hero-team { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s2); }
.ta-hero-actions { display: flex; gap: var(--s2); flex-wrap: wrap; justify-content: flex-end; }
.ta-hero-stats { grid-column: 1 / -1; }
.ta-hero-stats:empty { display: none; }
.ta-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--s3); }
.ta-stat { display: flex; flex-direction: column; gap: 4px; padding: var(--s4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); min-width: 0; }
.ta-hero-stats .ta-stat { background: var(--surface-2); border-color: transparent; }
.ta-stat-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); font-weight: 500; }
.ta-stat-label .ta-ic { width: 15px; height: 15px; }
.ta-stat-value { font-size: 22px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ta-stat .ta-small { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Person header */
.ta-person-head { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s5); align-items: center; padding: var(--s5); }
.ta-person-id { min-width: 0; }
.ta-person-id p { margin-top: 2px; }
.ta-person-tags { display: flex; gap: var(--s2); align-items: center; margin-top: var(--s2); min-width: 0; }
.ta-person-note { max-width: 420px; }
.ta-person-actions { display: flex; gap: var(--s2); flex-wrap: wrap; justify-content: flex-end; }

/* Lists in panels */
.ta-acts { list-style: none; padding: 0; display: flex; flex-direction: column; }
.ta-act { display: flex; gap: var(--s3); padding: 10px 0; border-top: 1px solid var(--border); }
.ta-act:first-child { border-top: 0; padding-top: 0; }
.ta-acts.ta-panel .ta-act { padding: 12px 0; }
.ta-acts.ta-panel .ta-act:first-child { padding-top: 0; }
.ta-acts.ta-panel .ta-act:last-child { padding-bottom: 0; }
.ta-act-ic { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 999px; background: var(--surface-2); color: var(--text-3); flex: none; }
.ta-act-ic .ta-ic { width: 15px; height: 15px; }
.ta-act-button, .ta-act-page { color: var(--accent-text); background: var(--accent-soft); }
.ta-act-goal { color: var(--ok); background: var(--ok-soft); }
.ta-act-body { min-width: 0; }
.ta-act-body p { overflow-wrap: anywhere; }
.ta-act-body p a { text-decoration: underline; text-underline-offset: 2px; }
.ta-day { display: flex; flex-direction: column; gap: var(--s2); }
.ta-goal-mini, .ta-team-mini, .ta-note-mini { list-style: none; padding: 0; display: flex; flex-direction: column; }
.ta-goal-mini li a { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 0; border-top: 1px solid var(--border); color: var(--text); }
.ta-goal-mini li:first-child a { border-top: 0; padding-top: 0; }
.ta-goal-mini a:hover { text-decoration: none; }
.ta-goal-mini a:hover .ta-goal-mini-text { color: var(--accent-text); }
.ta-team-mini li { display: flex; align-items: center; gap: var(--s3); padding: 8px 0; border-top: 1px solid var(--border); }
.ta-team-mini li:first-child { border-top: 0; padding-top: 0; }
.ta-team-mini-name { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.ta-note-mini li { padding: 10px 0; border-top: 1px solid var(--border); }
.ta-note-mini li:first-child { border-top: 0; padding-top: 0; }
.ta-note-mini p { white-space: pre-wrap; margin-top: 2px; }

/* ---------- Toolbar, tabs ---------- */
.ta-toolbar { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.ta-toolbar .ta-search { width: 260px; }
.ta-tabs { display: flex; gap: var(--s4); border-bottom: 1px solid var(--border); overflow-x: auto; }
.ta-tab { display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 0 2px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--text-3); font-weight: 500; cursor: pointer; white-space: nowrap; }
.ta-tab:hover { color: var(--text); }
.ta-tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }

/* ---------- Tables ---------- */
.ta-table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: auto; max-height: calc(100vh - 220px); box-shadow: var(--shadow-sm); }
.ta-table-plain { border: 0; border-radius: 0; box-shadow: none; max-height: none; }
.ta-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.ta-table th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); text-align: left; font-weight: 500; font-size: 12.5px; color: var(--text-2); padding: 10px var(--s4); border-bottom: 1px solid var(--border); white-space: nowrap; }
.ta-table td { padding: 12px var(--s4); border-bottom: 1px solid var(--border); vertical-align: middle; }
.ta-table tbody tr:last-child td { border-bottom: 0; }
.ta-table tbody tr[data-href] { cursor: pointer; }
.ta-table tbody tr[data-href]:hover td { background: var(--surface-2); }
.ta-table tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ta-table .ta-ic { color: var(--accent-text); width: 16px; height: 16px; }
.ta-num, .ta-table th.ta-num { text-align: right; font-variant-numeric: tabular-nums; }
.ta-cell-person { display: flex; align-items: center; gap: var(--s3); color: var(--text); }
.ta-cell-person:hover { text-decoration: none; }
.ta-cell-person > span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.ta-cell-actions { width: 44px; text-align: right; }
.ta-inline-person { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

/* ---------- Empty states, skeletons ---------- */
.ta-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: var(--s6) var(--s4); gap: 6px; }
.ta-empty h3 { font-size: 15px; font-weight: 600; }
.ta-empty p { color: var(--text-3); max-width: 420px; }
.ta-empty-ic { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--r-lg); background: var(--surface-2); color: var(--text-3); margin-bottom: var(--s2); }
.ta-empty-ic .ta-ic { width: 22px; height: 22px; }
.ta-empty-act { display: flex; gap: var(--s2); margin-top: var(--s3); flex-wrap: wrap; justify-content: center; }
.ta-skel { display: block; background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: ta-shimmer 1.4s ease infinite; border-radius: 6px; }
@keyframes ta-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.ta-skel-line { height: 12px; width: 70%; }
.ta-skel-line.short { width: 40%; }
.ta-skel-circle { width: 32px; height: 32px; border-radius: 999px; flex: none; }
.ta-skel-h { height: 28px; width: 240px; }
.ta-skel-block { height: 160px; border-radius: var(--r-lg); background: var(--surface-2); }
.ta-skel-list { display: flex; flex-direction: column; gap: var(--s4); padding: var(--s2) 0; }
.ta-skel-row { display: flex; align-items: center; gap: var(--s3); }
.ta-skel-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.ta-skel-card { height: 150px; padding: var(--s5); display: flex; flex-direction: column; gap: var(--s3); }
@media (prefers-reduced-motion: reduce) { .ta-skel, .ta-spinner { animation: none; } }

/* ---------- Toasts ---------- */
.ta-toasts { position: fixed; bottom: var(--s5); left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: var(--s2); align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.ta-toast { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r); background: #15181D; color: #F3F4F6; font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.ta-toast.in { opacity: 1; transform: none; }
.ta-toast .ta-ic { width: 16px; height: 16px; flex: none; }
.ta-toast-ok .ta-ic { color: #47CD89; }
.ta-toast-error .ta-ic { color: #F97066; }
@media (prefers-color-scheme: dark) { .ta-toast { background: #E7E9EC; color: #15181D; } .ta-toast-ok .ta-ic { color: #067647; } .ta-toast-error .ta-ic { color: #B42318; } }

/* ---------- Dialogs and side sheets ---------- */
dialog { color: var(--text); }
dialog::backdrop { background: rgba(15, 18, 24, .45); }
.ta-modal { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 0; width: min(440px, calc(100vw - 32px)); background: var(--surface); box-shadow: var(--shadow-lg); }
.ta-modal-body { padding: var(--s5); display: flex; flex-direction: column; gap: var(--s3); }
.ta-modal-body .ta-field { margin: 0; }
.ta-modal-foot { display: flex; justify-content: flex-end; gap: var(--s2); margin-top: var(--s2); }
.ta-sheet { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(480px, 100vw); max-width: 100vw; border: 0; border-left: 1px solid var(--border); padding: 0; background: var(--surface); box-shadow: var(--shadow-lg); transform: translateX(16px); opacity: 0; transition: transform .2s ease, opacity .2s ease; }
.ta-sheet.in { transform: none; opacity: 1; }
.ta-sheet-wide { width: min(640px, 100vw); }
.ta-sheet-form { display: flex; flex-direction: column; height: 100%; }
.ta-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--border); }
.ta-sheet-head p { margin-top: 2px; }
.ta-sheet-body { flex: 1; overflow-y: auto; padding: var(--s5); }
.ta-sheet-foot { display: flex; gap: var(--s2); align-items: center; padding: var(--s3) var(--s5); border-top: 1px solid var(--border); background: var(--surface); }
.ta-callout { padding: var(--s3); border-radius: var(--r); background: var(--surface-2); color: var(--text-2); font-size: 13px; margin-bottom: var(--s4); display: flex; gap: 8px; align-items: center; }
.ta-callout-error { background: var(--danger-soft); color: var(--danger); margin-top: var(--s4); }

/* ---------- Menus, search results ---------- */
.ta-menu { position: fixed; z-index: 900; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 4px; max-height: min(480px, calc(100vh - 80px)); overflow-y: auto; }
.ta-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 6px 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--text); font-size: 14px; cursor: pointer; text-align: left; }
a.ta-menu-item:hover { text-decoration: none; }
.ta-menu-item:hover, .ta-menu-item:focus-visible, .ta-menu-item[aria-selected="true"] { background: var(--surface-2); outline: none; }
.ta-menu-item[aria-current="true"] { background: var(--accent-soft); }
.ta-menu-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ta-menu-item .ta-ic { width: 16px; height: 16px; color: var(--text-3); }
.ta-menu-item.danger, .ta-menu-item.danger .ta-ic { color: var(--danger); }
.ta-menu-item > span:not(.ta-av):not(.ta-menu-meta) { flex: 1; min-width: 0; }
.ta-menu-meta { margin-left: auto; color: var(--text-3); font-size: 12px; flex: none; max-width: 50%; }
.ta-menu-sep { height: 1px; background: var(--border); margin: 4px -4px; }
.ta-menu-head { padding: 8px 10px 4px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.ta-menu-search { padding: 4px; }
.ta-menu-empty { padding: 10px; color: var(--text-3); font-size: 13px; }
.ta-menu-who { display: flex; align-items: center; gap: var(--s3); padding: 8px 10px; }
.ta-menu-who div { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.ta-menu-who span { font-size: 12.5px; color: var(--text-3); }
.ta-menu-list { max-height: 300px; overflow-y: auto; }

/* ---------- Board editor ---------- */
.ta-board { display: grid; grid-template-columns: 240px 1fr; align-content: start; min-height: calc(100vh - var(--top-h)); }
.ta-board-pages { border-right: 1px solid var(--border); background: var(--surface); padding: var(--s4) var(--s3); display: flex; flex-direction: column; gap: var(--s2); position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); overflow-y: auto; }
.ta-board-pages-head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; min-height: 28px; margin-top: var(--s2); }
.ta-board-pages-head:first-child { margin-top: 0; }
.ta-pagelist { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.ta-pagelist button, .ta-pagelist-static { display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 8px; border: 0; border-radius: var(--r-sm); background: none; color: var(--text-2); font-size: 13.5px; text-align: left; cursor: pointer; }
.ta-pagelist-static { cursor: default; }
.ta-pagelist .ta-ic { width: 16px; height: 16px; color: var(--text-3); }
.ta-pagelist button:hover { background: var(--surface-2); color: var(--text); }
.ta-pagelist button[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 500; }
.ta-pagelist .ta-tag { margin-left: auto; height: 18px; font-size: 11px; padding: 0 6px; }
.ta-board-work { padding: var(--s5); display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.ta-grid-skel { height: 360px; background: linear-gradient(90deg, #ECEEF1 25%, #F6F7F9 37%, #ECEEF1 63%); background-size: 400% 100%; animation: ta-shimmer 1.4s ease infinite; }
/* The board, as the Tap AAC app draws it (Board.kt): the app's top bar (Home, Back, the page's name chip, the editor's
   tools), the sentence bar when the page has one, and the page's buttons on its own background colour. */
.tb-newpage { width: 100%; justify-content: center; margin-bottom: var(--s2); }
.tb-pagerow { display: flex; align-items: center; gap: 2px; }
.tb-pagerow > button:first-child { flex: 1; min-width: 0; }
.tb-pagelist .tb-pagerow-more, .ta-pagelist .tb-pagerow-more { opacity: 0; flex: none; width: 32px; padding: 0; justify-content: center; }
.tb-pagerow:hover .tb-pagerow-more, .tb-pagerow:focus-within .tb-pagerow-more, .tb-pagerow-more[aria-expanded="true"] { opacity: 1; }
.tb-app { --chrome: 230px; container: tbapp / inline-size; width: 100%; max-width: 1280px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.tb-app-empty { padding: var(--s5); }
.tb-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s2); padding: 6px 8px; border-bottom: 1px solid var(--border); }
.tb-bar-l, .tb-bar-r { display: flex; align-items: center; gap: 2px; min-width: 0; }
.tb-bar-r { justify-self: end; }
.tb-barbtn { width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: none; color: var(--text); cursor: pointer; }
.tb-barbtn:hover:not(:disabled) { background: var(--surface-2); }
.tb-barbtn:disabled { color: var(--text-3); opacity: .45; cursor: default; }
.tb-barbtn .ta-ic { width: 22px; height: 22px; }
.tb-chip { display: flex; flex-direction: column; align-items: center; min-width: 0; max-width: min(46vw, 420px); padding: 4px 14px; border: 0; border-radius: 14px; background: none; color: var(--text); cursor: pointer; line-height: 1.2; }
.tb-chip:hover { background: var(--surface-2); }
.tb-chip-t { display: flex; align-items: center; gap: 4px; max-width: 100%; font-size: 18px; font-weight: 700; }
.tb-chip-t .ta-ic { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.tb-chip-n { font-size: 12.5px; color: var(--text-3); }
.tb-try { display: inline-flex; align-items: center; gap: 6px; height: 40px; white-space: nowrap; flex: none; padding: 0 14px; margin: 0 4px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer; }
.tb-try .ta-ic { width: 18px; height: 18px; }
.tb-try.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.tb-try:hover:not(.is-on) { background: var(--surface-2); }
.tb-sentence { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: 64px; margin: 8px 10px 0; padding: 8px 8px 8px 16px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.tb-sentence.is-idle { color: var(--text-3); font-size: 16px; }
.tb-sentence-words { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 22px; font-weight: 600; min-width: 0; }
.tb-sentence-hint { color: var(--text-3); font-size: 16px; font-weight: 400; }
.tb-sentence-tools { display: flex; gap: 6px; flex: none; }
.tb-speak:not(:disabled) { background: var(--text); color: var(--surface); }
.tb-stage { padding: 8px; background: var(--page-bg, #fff); }
.tb-stagebar { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); border-top: 1px solid var(--border); }
.tb-hint { max-width: 1280px; margin: 0 auto; }
/* The grid keeps the shape of its buttons (a little wider than tall, as on the tablet) and fits the window's height. */
.tb-grid-wrap { width: min(100%, calc((100vh - var(--top-h) - var(--chrome)) * var(--ar, 1.4))); margin: 0 auto; }
@supports (height: 100dvh) { .tb-grid-wrap { width: min(100%, calc((100dvh - var(--top-h) - var(--chrome)) * var(--ar, 1.4))); } }
.tb-grid { display: grid; gap: var(--gap, 6px); aspect-ratio: var(--ar, 1.4); }
.tb-tile { --tabh: 0px; position: relative; display: block; min-width: 0; min-height: 0; padding: 0; border: 0; background: none; font-family: var(--font); cursor: pointer; container-type: size; -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; }
.tb-tile:focus-visible { outline: none; }
.tb-tile.is-folder { --tabh: clamp(6px, 7%, 12px); }
.tb-tile.is-folder::before { content: ""; position: absolute; top: 0; left: 9%; width: 42%; height: calc(var(--tabh) * 2); border-radius: 7px 7px 0 0; background: var(--tab); }
.tb-face { position: absolute; inset: var(--tabh) 0 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3cqmin; padding: clamp(3px, 3cqmin, 8px);
  background: var(--bg); color: var(--ink); border: 1.5px solid color-mix(in srgb, var(--bd) 50%, transparent); border-radius: clamp(8px, 13cqmin, 26px); box-shadow: 0 2px 4px rgba(15, 23, 42, .14); overflow: hidden; transition: transform .1s; }
.is-folder .tb-face { border-width: 2.5px; border-color: color-mix(in srgb, var(--bd) 70%, transparent); }
.tb-pic { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
.tb-pic img { max-width: 100%; max-height: 100%; object-fit: contain; pointer-events: none; }
.tb-lbl { max-width: 100%; font-weight: 600; font-size: calc(clamp(9px, 13cqmin, 32px) * var(--ls, 1)); line-height: 1.1; text-align: center; overflow-wrap: normal; word-break: keep-all; hyphens: none;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.is-wordonly .tb-lbl { font-weight: 700; font-size: calc(clamp(11px, 26cqmin, 48px) * var(--ls, 1)); -webkit-line-clamp: 4; }
.tb-videomark .ta-ic, .tb-backarrow .ta-ic { width: 38cqmin; height: 38cqmin; color: var(--ink); }
.is-hidden .tb-face { opacity: .35; }
.tb-mark { position: absolute; top: calc(var(--tabh) + 4px); width: clamp(16px, 16cqmin, 26px); height: clamp(16px, 16cqmin, 26px); display: flex; align-items: center; justify-content: center; border-radius: 999px; background: #fff; color: #475569; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.tb-mark .ta-ic { width: 72%; height: 72%; }
.tb-mark-r { right: 4px; } .tb-mark-l { left: 4px; }
.tb-mark-accent { color: #0F6E8C; } .tb-mark-danger { color: #B42318; }
button.tb-tile:hover .tb-face { border: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); }
button.tb-tile:focus-visible .tb-face, .tb-tile.is-selected .tb-face { border: 4px solid var(--accent); }
.tb-tile.is-pressed .tb-face { transform: scale(1.03); border: 4px solid #F59E0B; }
.tb-tile.is-empty { cursor: default; }
.tb-grid.is-edit .tb-tile.is-empty { cursor: pointer; }
.tb-grid.is-edit .tb-tile.is-empty::after { content: ""; position: absolute; inset: 0; border: 2px dashed #94A3B8; border-radius: clamp(8px, 13cqmin, 26px); background: rgba(255, 255, 255, .6); }
.tb-add { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #0F6E8C; font-size: 13px; font-weight: 600; }
.tb-add .ta-ic { width: clamp(18px, 22cqmin, 40px); height: clamp(18px, 22cqmin, 40px); }
.tb-add span { color: #4A5260; }
@container (max-width: 70px) { .tb-add span { display: none; } }
button.tb-tile.is-empty:hover::after, button.tb-tile.is-empty:focus-visible::after { border-color: var(--accent); border-style: solid; border-width: 3px; }
.tb-tile.is-dragging { opacity: .35; }
.tb-tile.is-dropzone::after { content: ""; position: absolute; inset: -3px; border: 3px dashed var(--accent); border-radius: clamp(8px, 13cqmin, 26px); z-index: 2; }
.tb-ghost { position: fixed !important; left: 0; top: 0; z-index: 1000; pointer-events: none; opacity: .92; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .25)); }
/* Scenes: the picture in its own shape, the talking spots in percent of it. */
.tb-scene { position: relative; width: min(100%, calc((100vh - var(--top-h) - var(--chrome)) * var(--ar, 1.5))); aspect-ratio: var(--ar, 1.5); margin: 0 auto; border-radius: 12px; overflow: hidden; background: #E5E7EB; }
.tb-scene-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; user-select: none; pointer-events: none; }
.tb-scene-none { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #4A5260; font-size: 14px; }
.tb-spots { position: absolute; inset: 0; }
.tb-spot { position: absolute; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: 8px; touch-action: none; }
.tb-spot-dashed { outline: 3px dashed rgba(255, 255, 255, .95); box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(0, 0, 0, .35); }
.tb-spot-glow { background: rgba(255, 214, 0, .22); box-shadow: 0 0 0 3px rgba(255, 196, 0, .9), 0 0 16px rgba(255, 196, 0, .7); }
.tb-scene.is-edit .tb-spot-none { outline: 2px dashed rgba(255, 255, 255, .85); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .3); }
.tb-scene.is-edit .tb-spot { cursor: move; }
.tb-spot:hover, .tb-spot:focus-visible, .tb-spot.is-selected { outline: 3px solid var(--accent); outline-offset: 0; }
.tb-spot-lbl { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); max-width: calc(100% - 8px); padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: #15181D; font: 600 12px/1.4 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.tb-spot-grip { position: absolute; right: -2px; bottom: -2px; width: 18px; height: 18px; border-radius: 4px; background: var(--accent); border: 2px solid #fff; cursor: nwse-resize; }
/* A symbol keyboard: its groups and keys, as the tablet fills them. */
.tb-kb { display: flex; flex-direction: column; gap: 8px; }
.tb-kb-tabs { display: flex; gap: 6px; overflow-x: auto; }
.tb-kb-tab { padding: 6px 14px; border-radius: 999px; background: var(--bg); color: #1E293B; font-weight: 600; white-space: nowrap; border: 1px solid #94A3B8; }
.tb-kb-tab.is-on { border: 3px solid #1E293B; }
.tb-kb-keys { display: grid; gap: 6px; aspect-ratio: var(--ar, 1.4); }
.tb-kb-key { min-height: 0; border-radius: 12px; background: var(--bg); opacity: .55; border: 1.5px dashed #94A3B8; }
.tb-kb-note { color: #4A5260; font-size: 13px; background: rgba(255, 255, 255, .8); border-radius: 8px; padding: 8px 10px; }

/* Panels in the app's style (FormWidgets.kt): an overline, a card of rows, a caption under it. */
.tb-sheet .ta-sheet-body { background: var(--bg); }
.tb-sec { margin-bottom: 18px; }
.tb-sec-h { margin: 0 4px 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.tb-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.tb-card > * + *, .tb-card > .tb-radios > * + * { border-top: 1px solid var(--border); }
.tb-sec-foot { margin: 6px 4px 0; font-size: 12.5px; color: var(--text-3); line-height: 1.45; }
.tb-sec-foot.tb-in-card { margin: 0; padding: 8px 14px 10px; }
.tb-pad { padding: 10px 12px; }
.tb-row { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px; }
.tb-row small { display: block; font-size: 12px; }
.tb-rowbtn { width: 100%; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.tb-rowbtn:hover { background: var(--surface-2); }
.tb-grow { flex: 1; min-width: 0; }
.tb-field { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 4px 14px; }
.tb-field-l { flex: 0 0 116px; font-weight: 600; color: var(--text-2); }
.tb-field:focus-within { box-shadow: inset 3px 0 0 var(--accent); }
.tb-input { flex: 1; min-width: 0; padding: 8px 0; border: 0; background: transparent; color: var(--text); font-size: 15px; outline: none; }
.tb-input::placeholder { color: var(--text-3); }
textarea.tb-input, select.tb-input, .tb-sec > .tb-card > input.tb-input { display: block; width: 100%; padding: 12px 14px; resize: vertical; }
select.tb-input { margin: 0; }
.tb-field select.tb-input { padding: 8px 0; }
.tb-range { flex: 1; accent-color: var(--accent); min-height: 32px; }
.tb-val { min-width: 44px; text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; }
.tb-toggle { position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; cursor: pointer; }
.tb-toggle-t { flex: 1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tb-toggle-t small { flex-basis: 100%; color: var(--text-3); font-size: 12px; }
.tb-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tb-switch { position: relative; flex: none; width: 52px; height: 32px; border-radius: 999px; border: 2px solid var(--border-strong); background: var(--surface-3); transition: background .15s; }
.tb-switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 999px; background: var(--text-3); transition: transform .15s, background .15s; }
.tb-toggle input:checked + .tb-switch { background: var(--accent); border-color: var(--accent); }
.tb-toggle input:checked + .tb-switch::after { transform: translateX(20px); background: #fff; }
.tb-toggle input:focus-visible + .tb-switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.tb-toggle input:disabled + .tb-switch { opacity: .5; }
.tb-seg { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface-2); overflow-x: auto; }
.tb-seg label { flex: 1; position: relative; }
.tb-seg input { position: absolute; opacity: 0; }
.tb-seg span { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 10px; border-radius: 10px; font-weight: 600; white-space: nowrap; color: var(--text-2); cursor: pointer; }
.tb-seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.tb-seg input:focus-visible + span { outline: 2px solid var(--accent); }
.tb-seg input:disabled + span { cursor: default; }
.tb-fbtn { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 14px; border: 0; background: none; color: var(--accent-text); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.tb-fbtn:hover:not(:disabled) { background: var(--surface-2); }
.tb-fbtn:disabled { opacity: .45; cursor: default; }
.tb-fbtn.is-green { color: #15803D; } .tb-fbtn.is-danger { color: var(--danger); }
@media (prefers-color-scheme: dark) { .tb-fbtn.is-green { color: #47CD89; } }
.tb-fbtn:focus-within { outline: 2px solid var(--accent); outline-offset: -2px; }
.tb-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 14px; }
.tb-chips:empty { display: none; }
.tb-chips-scroll { flex-wrap: nowrap; overflow-x: auto; }
.tb-chip-s { padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 13px; white-space: nowrap; cursor: pointer; }
.tb-chip-s[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.tb-kindchip { flex: none; min-height: 40px; padding: 0 14px; border: 1px solid #94A3B8; border-radius: 999px; color: #1E293B; font-weight: 500; white-space: nowrap; cursor: pointer; }
.tb-kindchip[aria-pressed="true"] { border: 3px solid var(--text); font-weight: 700; }
.tb-sheet .tb-preview-row + .tb-sec-foot { margin-bottom: 18px; }
.tb-preview-row { display: flex; align-items: center; gap: 16px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.tb-preview { width: 132px; height: 132px; flex: none; padding: 0; border: 0; background: #F4F5F7; border-radius: 16px; cursor: pointer; }
.tb-preview .tb-tile { width: 100%; height: 100%; }
.tb-preview-info { display: flex; flex-direction: column; min-width: 0; }
.tb-steps { display: flex; gap: 8px; margin-top: 8px; }
.tb-round { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: var(--surface-2); color: var(--text); cursor: pointer; }
.tb-round:disabled { opacity: .4; cursor: default; }
.tb-matchrow, .tb-quick { display: flex; gap: 10px; padding: 12px; overflow-x: auto; }
.tb-match { flex: 0 0 76px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--text); font-size: 12px; cursor: pointer; }
.tb-match img { width: 52px; height: 52px; object-fit: contain; }
.tb-match span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-match[aria-pressed="true"], .tb-quickpick[aria-pressed="true"] { border: 3px solid var(--accent); background: var(--accent-soft); }
.tb-quickpick { flex: none; padding: 6px; border: 2px solid transparent; border-radius: 10px; background: var(--surface-2); cursor: pointer; }
.tb-quickpick img { width: 40px; height: 40px; object-fit: contain; display: block; }
.tb-cats { display: flex; gap: 6px; padding: 2px 14px 8px; overflow-x: auto; }
.tb-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 6px; max-height: 300px; overflow-y: auto; padding: 4px 14px 12px; }
.tb-results button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border: 1px solid var(--border); border-radius: var(--r); background: #fff; color: #334155; font-size: 11.5px; cursor: pointer; }
.tb-results button:hover { border-color: var(--accent); }
.tb-results button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-ring); }
.tb-results img { width: 48px; height: 48px; object-fit: contain; }
.tb-results span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-photo { width: 74px; height: 74px; flex: none; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); overflow: hidden; color: var(--text-3); }
.tb-photo img { width: 100%; height: 100%; object-fit: cover; }
.tb-symbol-now { width: 38px; height: 38px; object-fit: contain; }
.tb-danger-link { color: var(--danger); }
.tb-colour summary { list-style: none; cursor: pointer; }
.tb-colour summary::-webkit-details-marker { display: none; }
.tb-colour summary:hover { background: var(--surface-2); }
.tb-colour-chip { display: inline-block; width: 48px; height: 26px; flex: none; border-radius: 6px; border: 1px solid #94A3B8; }
.tb-toggle-t .tb-colour-chip { width: 26px; }
.tb-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 8px; padding: 6px 14px 14px; }
.tb-swatch { position: relative; aspect-ratio: 1; border: 1px solid #94A3B8; border-radius: 999px; cursor: pointer; padding: 0; }
.tb-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.tb-swatch-any { display: flex; align-items: center; justify-content: center; background: conic-gradient(#f43, #fc3, #6c4, #3cf, #36f, #c3f, #f43); color: #fff; }
.tb-swatch-any input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.tb-radios .tb-radio { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; cursor: pointer; }
.tb-radio input { width: 20px; height: 20px; accent-color: var(--accent); }
.tb-newkinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; margin-bottom: 16px; }
.tb-newkind { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer; }
.tb-newkind .ta-ic { width: 24px; height: 24px; color: var(--accent-text); }
.tb-newkind[aria-selected="true"] { border: 2px solid var(--accent); background: var(--accent-soft); }
.tb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 8px; }
.tb-tcard { display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); text-align: left; cursor: pointer; }
.tb-tcard[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--accent-soft); }
.tb-tcard-pics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 4px; }
.tb-tcard-pics span { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 6px; }
.tb-tcard-pics img { width: 80%; height: 80%; object-fit: contain; }
.tb-scenegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 12px; }
.tb-scenecard { display: flex; flex-direction: column; gap: 2px; padding: 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); text-align: left; cursor: pointer; }
.tb-scenecard img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; }
.tb-scenecard[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--accent-soft); }
.tb-scenepick { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tb-scenepick img { max-width: 100%; max-height: 190px; border-radius: 10px; border: 1px solid var(--border); }
.tb-mwrow { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px; }
.tb-mw { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer; }
.tb-mw img { width: 28px; height: 28px; object-fit: contain; }
.tb-mw.is-out { opacity: .4; text-decoration: line-through; }
.tb-levels { display: flex; gap: 8px; padding: 12px; }
.tb-level { flex: 1; min-height: 52px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--text); font-size: 20px; font-weight: 700; cursor: pointer; }
.tb-level[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.tb-vbmap { display: grid; gap: 4px; padding: 8px; }
.tb-vbcell { position: relative; height: 46px; min-width: 0; padding: 2px; border: 1px solid #94A3B8; border-radius: 6px; color: #1E293B; font: 600 12px var(--font); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.tb-vbcell.is-hidden { opacity: .35; }
.tb-vbcell .ta-ic { position: absolute; top: 2px; right: 2px; width: 12px; height: 12px; }
.tb-vbcell.is-empty { background: var(--surface-2); border-style: dashed; cursor: default; }
.tb-saved-pick { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.tb-saved-tile { width: 56px; height: 56px; flex: none; }
.tb-saved-tile .tb-tile { width: 100%; height: 100%; }
.ta-danger-text { color: var(--danger); }
.tb-pages-menu .ta-menu-item[aria-disabled="true"] { color: var(--text-3); cursor: default; }
.ta-print-card, .tb-print { display: none; }

/* ---------- Goals ---------- */
.ta-goals { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--s3); }
.ta-goal { display: flex; gap: var(--s4); padding: var(--s4) var(--s5); align-items: center; }
.ta-goal-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--s2); color: var(--text); }
.ta-goal-main:hover { text-decoration: none; }
.ta-goal-main:hover .ta-goal-text { color: var(--accent-text); }
.ta-goal-tags { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.ta-goal-tags .ta-small { display: inline-flex; align-items: center; gap: 4px; }
.ta-goal-tags .ta-ic { width: 14px; height: 14px; }
.ta-goal-text { font-size: 14.5px; font-weight: 500; line-height: 1.45; }
.ta-goal-side { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s2); flex: none; }
.ta-goal-last { display: flex; flex-direction: column; align-items: flex-end; min-width: 110px; }
.ta-goal-last strong { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ta-goal-head { padding: var(--s5); display: flex; flex-direction: column; gap: var(--s3); }
.ta-goal-title { font-size: 19px; line-height: 1.4; }
.ta-words { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ta-word { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 13px; font-weight: 500; }
.ta-word img { width: 22px; height: 22px; object-fit: contain; background: #fff; border-radius: 999px; }
.ta-word:not(:has(img)) { padding-left: 10px; }
.ta-chart { width: 100%; height: auto; display: block; }
.ta-chart-grid { stroke: var(--border); stroke-width: 1; }
.ta-chart-axis { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.ta-chart-line { fill: none; stroke: var(--accent); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.ta-chart-dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }

/* ---------- Notes ---------- */
.ta-notes { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--s3); }
.ta-note { padding: var(--s4) var(--s5); display: flex; flex-direction: column; gap: var(--s3); }
.ta-note-head { display: flex; align-items: center; gap: var(--s3); }
.ta-note-who { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.ta-note-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; color: var(--text); }
.ta-note-goal { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; font-size: 13px; font-weight: 500; padding: 4px 10px; border-radius: var(--r-sm); background: var(--ok-soft); color: var(--ok); width: max-content; }
.ta-note-goal .ta-ic { width: 14px; height: 14px; }
.ta-vis { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.ta-vis .ta-ic { width: 13px; height: 13px; }
.ta-vis-private, .ta-vis-editors { color: var(--warn); }

/* ---------- Team ---------- */
.ta-members { list-style: none; padding: 0; }
.ta-member { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s5); border-top: 1px solid var(--border); }
.ta-member-who { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.35; }
.ta-member-who > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ta-member-role { display: flex; align-items: center; gap: 4px; }
.ta-rolecards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-bottom: var(--s4); }
.ta-rolecard { display: flex; gap: var(--s3); align-items: flex-start; text-align: left; padding: var(--s4); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); cursor: pointer; }
.ta-rolecard > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.ta-rolecard:hover { border-color: var(--border-strong); }
.ta-rolecard[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
.ta-rolecard-ic { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: var(--r); background: var(--surface-2); color: var(--accent-text); flex: none; }
.ta-invite-opts { max-width: 520px; }
.ta-invite-out { display: grid; grid-template-columns: 200px 1fr; gap: var(--s5); margin-top: var(--s5); padding: var(--s5); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface-2); }
.ta-invite-qr { background: #fff; border-radius: var(--r); padding: 6px; border: 1px solid var(--border); align-self: start; }
.ta-qr { display: block; width: 100%; height: auto; }
.ta-invite-info { min-width: 0; }
.ta-invite-meta { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s4); }
.ta-codebig { display: flex; align-items: center; gap: var(--s2); font-family: var(--mono); font-size: 22px; font-weight: 600; letter-spacing: .1em; }
.ta-invites { list-style: none; padding: 0; }
.ta-invite-row { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s5); border-top: 1px solid var(--border); flex-wrap: wrap; }
.ta-invite-code { font-weight: 600; }
.ta-danger-zone { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.ta-danger-zone p { margin-top: 2px; max-width: 520px; }

/* ---------- Join, settings, account, help, usage ---------- */
.ta-join { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s3); padding: var(--s6); }
.ta-join-facts { width: 100%; margin: var(--s2) 0; border: 1px solid var(--border); border-radius: var(--r); text-align: left; }
.ta-join-facts div { display: flex; justify-content: space-between; gap: var(--s3); padding: 10px var(--s4); border-top: 1px solid var(--border); }
.ta-join-facts div:first-child { border-top: 0; }
.ta-join-facts dt { color: var(--text-3); font-size: 13px; }
.ta-join-facts dd { margin: 0; font-weight: 500; text-align: right; }
.ta-center-row { justify-content: center; }
.ta-form h3 { margin-bottom: var(--s4); }
.ta-account-id { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s5); }
.ta-account-id div { display: flex; flex-direction: column; }
.ta-help { display: flex; flex-direction: column; gap: var(--s4); }
.ta-help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--s4); }
.ta-help-wide { grid-column: 1 / -1; }
.ta-help-wide .ta-table td:not(:first-child), .ta-help-wide .ta-table th:not(:first-child) { text-align: center; width: 18%; }
.ta-help-sec { display: flex; flex-direction: column; gap: var(--s3); color: var(--text-2); }
.ta-help-sec ul, .ta-help-sec ol { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.ta-help-sec strong { color: var(--text); }
.ta-help-sec .ta-table td, .ta-help-sec .ta-table th { padding: 8px 10px; font-size: 13px; }
.ta-auth-card .ta-help-grid { grid-template-columns: 1fr; margin-bottom: var(--s4); }
.ta-coming { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s2); padding: var(--s7) var(--s5); }
.ta-coming p { max-width: 460px; }
.ta-coming-list { list-style: none; padding: 0; margin-top: var(--s3); display: flex; flex-direction: column; gap: 8px; text-align: left; }
.ta-coming-list li { display: flex; gap: 8px; align-items: center; color: var(--text-2); }
.ta-coming-list .ta-ic { color: var(--text-3); width: 16px; height: 16px; }

/* ---------- Tablets and phones ---------- */
/* Two columns and the person header's side-by-side actions need room: the page's own width decides (a container
   query), so a collapsed sidebar or a split-screen window gets them whenever they fit. */
.ta-main { container: main / inline-size; }
@container main (max-width: 849px) {
  .ta-two-col { grid-template-columns: 1fr; }
  .ta-person-head { grid-template-columns: auto 1fr; }
  .ta-person-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 839px) {
  .ta-side { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  .is-drawer .ta-side { transform: none; }
  .ta-scrim { position: fixed; inset: 0; background: rgba(15, 18, 24, .45); z-index: 25; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .is-drawer .ta-scrim { opacity: 1; pointer-events: auto; }
  .ta-collapse { display: none; }
  .ta-drawer-close { display: inline-flex; }
  .ta-menu-btn { display: inline-flex; margin-left: -8px; }
  .ta-top { padding: 0 var(--s4); gap: var(--s2); }
  .ta-top-search { display: none; }
  .ta-search-btn { display: inline-flex; }
  .is-searching .ta-top-search { display: block; position: absolute; left: var(--s4); right: var(--s4); top: 12px; width: auto; z-index: 2; }
  .ta-board { grid-template-columns: 1fr; }
  .ta-board-pages { display: none; }
  .ta-board-work { padding: var(--s4); }
}
@media (max-width: 599px) {
  body { font-size: 14px; }
  .ta-page { padding: var(--s5) var(--s4) var(--s7); }
  .ta-display { font-size: 21px; }
  .ta-row2, .ta-start, .ta-rolecards, .ta-choice-grid, .ta-radios-2 { grid-template-columns: 1fr; }
  .ta-page-head { align-items: flex-start; }
  .ta-page-head .ta-actions { width: 100%; }
  .ta-page-head .ta-actions .ta-btn { flex: 1; }
  .ta-hero-person { grid-template-columns: 1fr; }
  .ta-hero-actions { justify-content: flex-start; }
  .ta-hero-actions .ta-btn { flex: 1; }
  .ta-person-head { grid-template-columns: 1fr; text-align: left; }
  .ta-person-actions .ta-btn { flex: 1; }
  .ta-stats { grid-template-columns: 1fr 1fr; }
  .ta-stat-value { font-size: 19px; }
  .ta-toolbar .ta-search { width: 100%; }
  .ta-cards { grid-template-columns: minmax(0, 1fr); }
  .ta-goal { flex-direction: column; align-items: stretch; }
  .ta-goal-side { flex-direction: row; align-items: center; justify-content: space-between; }
  .ta-goal-last { align-items: flex-start; }
  .ta-invite-out { grid-template-columns: 1fr; }
  .ta-invite-qr { max-width: 220px; justify-self: center; }
  .ta-danger-zone { flex-direction: column; align-items: flex-start; }
  .ta-member { flex-wrap: wrap; padding: var(--s3) var(--s4); }
  .ta-member-who { flex-basis: calc(100% - 60px); }
  .ta-member-role { margin-left: 52px; }
  .ta-pad-x { padding-left: var(--s4); padding-right: var(--s4); }
  .ta-invite-row { padding: var(--s3) var(--s4); }
  .ta-panel { padding: var(--s4); }
  .ta-panel-flush { padding: var(--s4) 0 0; }
  .ta-auth-card { padding: var(--s5); border: 0; box-shadow: none; background: transparent; }
  .ta-auth { align-items: flex-start; padding-top: var(--s5); }
  .ta-copyfield { flex-direction: column; }
  .ta-table-wrap:not(.ta-table-plain) { max-height: none; }
  .ta-help-grid { grid-template-columns: 1fr; }
}

/* ---------- Print: only the page or the invite card ---------- */
@media print {
  @page { margin: 12mm; }
  body.ta-printing > *:not(#ta-print) { display: none !important; }
  body.ta-printing { background: #fff; color: #000; }
  body.ta-printing #ta-print { display: block; }
  .ta-pc { max-width: 170mm; margin: 0 auto; border: 1.5pt dashed #999; border-radius: 6mm; padding: 10mm; font-family: var(--font); color: #111; }
  .ta-pc-head { display: flex; align-items: center; gap: 3mm; font-weight: 600; font-size: 13pt; margin-bottom: 6mm; }
  .ta-pc h1 { font-size: 22pt; letter-spacing: -.01em; }
  .ta-pc-sub { font-size: 12pt; margin-top: 2mm; color: #333; }
  .ta-pc-body { display: grid; grid-template-columns: 60mm 1fr; gap: 8mm; align-items: center; margin-top: 8mm; }
  .ta-pc-body .ta-qr { width: 60mm; }
  .ta-pc-body ol { font-size: 12pt; display: flex; flex-direction: column; gap: 3mm; padding-left: 6mm; }
  .ta-pc-code { display: block; margin-top: 2mm; font: 600 18pt var(--mono); letter-spacing: .1em; }
  .ta-pc-foot { margin-top: 8mm; padding-top: 4mm; border-top: 1pt solid #ccc; font-size: 9.5pt; color: #555; }
  /* A page on paper, as it looks when talking (Print.kt): its own background, hidden words as empty spaces, folder tabs kept. */
  body.ta-printing #ta-print.tb-print { display: flex !important; flex-direction: column; height: calc(100vh - 2mm); font-family: var(--font); color: #111; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tb-print header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5mm; }
  .tb-print h1 { font-size: 20pt; }
  .tb-print header p { font-size: 12pt; color: #444; }
  .tb-print footer { margin-top: 4mm; text-align: center; font-size: 9pt; color: #555; }
  .tb-print-grid { flex: 1; min-height: 0; display: grid; gap: 3mm; padding: 2mm; border-radius: 3mm; }
  .tb-print .tb-tile { cursor: default; }
  .tb-print .tb-face { box-shadow: none; border-width: 1.5pt; border-color: var(--bd); }
  .tb-print-scene { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
  .tb-print-scene-in { position: relative; max-width: 100%; max-height: 100%; }
  .tb-print-scene-in img { display: block; max-width: 100%; max-height: calc(100vh - 40mm); }
  .tb-print-spot { position: absolute; border: 2pt dashed #111; border-radius: 2mm; }
  .tb-print-spot span { position: absolute; left: 50%; bottom: 1mm; transform: translateX(-50%); background: #fff; border: 1pt solid #111; border-radius: 3mm; padding: 0 2mm; font-size: 11pt; font-weight: 600; white-space: nowrap; }
}

/* ---------- Sign in: form on the left, product on the right ---------- */
.ta-signin { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 1fr) minmax(0, 1.15fr); background: var(--surface); }
.ta-signin-main { display: flex; flex-direction: column; padding: 32px 48px; min-height: 100vh; }
.ta-signin-brand { display: flex; width: max-content; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; color: var(--text); }
.ta-signin-brand:hover { text-decoration: none; }
.ta-signin-brand svg, .ta-signin-brand img { width: 30px; height: 30px; }
.ta-signin-body { width: 100%; max-width: 380px; margin: auto; padding: 48px 0; }
.ta-signin-h { font-size: 30px; font-weight: 650; letter-spacing: -.025em; line-height: 1.15; }
.ta-signin-sub { color: var(--text-2); font-size: 15px; margin-top: 10px; line-height: 1.5; }
.ta-signin-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
.ta-signin-new { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.ta-signin-legal { margin-top: 10px; color: var(--text-3); font-size: 12.5px; line-height: 1.5; }
.ta-signin-legal a, .ta-signin-new a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.ta-signin-foot { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; font-size: 12.5px; color: var(--text-3); }
.ta-signin-foot nav { display: flex; gap: 16px; }
.ta-signin-foot a { color: var(--text-3); }
.ta-signin-foot a:hover { color: var(--text); }

/* Google's own button style (white, grey outline, Roboto-like weight). */
.ta-signin .ta-btn-google {
  height: 48px; width: 100%; justify-content: center; gap: 12px; border-radius: 10px; border: 1px solid #747775;
  background: #fff; color: #1F1F1F; font-size: 15px; font-weight: 500; box-shadow: none;
}
.ta-signin .ta-btn-google:hover { background: #F7F8F8; border-color: #5F6368; box-shadow: 0 1px 2px rgba(60, 64, 67, .15); }
.ta-signin .ta-btn-google svg { width: 20px; height: 20px; }
@media (prefers-color-scheme: dark) {
  .ta-signin .ta-btn-google { background: #131314; color: #E3E3E3; border-color: #8E918F; }
  .ta-signin .ta-btn-google:hover { background: #1E1F20; }
}
.ta-signin .ta-testsignin { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); display: grid; gap: 8px; }

.ta-signin-panel {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 44px;
  padding: 64px 0 64px 64px; color: #fff;
  background: radial-gradient(120% 90% at 100% 0%, #13809F 0%, #0F6E8C 45%, #0A4F66 100%);
}
.ta-signin-copy { max-width: 520px; padding-right: 48px; }
.ta-signin-copy h2 { font-size: 28px; line-height: 1.22; font-weight: 650; letter-spacing: -.02em; color: #fff; }
.ta-signin-copy ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.ta-signin-copy li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.45; color: rgba(255, 255, 255, .88); }
.ta-signin-copy li svg { flex: none; width: 20px; height: 20px; margin-top: 1px; padding: 3px; border-radius: 50%; background: #FFC933; color: #15181D; stroke-width: 2.6; }
.ta-signin-shot { margin: 0; }
.ta-signin-shot img {
  display: block; width: 118%; max-width: none; height: auto; border-radius: 14px 0 0 14px;
  box-shadow: 0 30px 70px rgba(0, 20, 30, .45), 0 0 0 1px rgba(255, 255, 255, .14);
}
@media (max-width: 1000px) {
  .ta-signin { grid-template-columns: 1fr; }
  .ta-signin-panel { display: none; }
}
@media (max-width: 520px) {
  .ta-signin-main { padding: 20px 16px; }
  .ta-signin-body { padding: 32px 0; }
  .ta-signin-h { font-size: 26px; }
}
@media (min-width: 1001px) {
  .ta-signin { height: 100vh; min-height: 560px; }
  .ta-signin-main { min-height: 0; overflow: auto; }
  .ta-signin-panel { justify-content: flex-start; padding-top: clamp(40px, 9vh, 96px); padding-bottom: 0; }
  .ta-signin-shot { flex: 1; min-height: 0; overflow: hidden; border-radius: 14px 0 0 0; }
  .ta-signin-shot img { border-radius: 14px 0 0 0; }
}

/* ---------- Adaptive rules (see the top of this file) ---------- */
/* Pop-ups (side sheets) are full screen until the window is expanded, panels at the right after. */
@media (max-width: 839px) {
  .ta-sheet, .ta-sheet-wide { width: 100vw; border-left: 0; }
}
@supports (height: 100dvh) {
  .ta-sheet { height: 100dvh; max-height: 100dvh; }
  .ta-boot, .ta-auth, .ta-signin, .ta-app { min-height: 100dvh; }
  .ta-side { height: 100dvh; }
}

/* Large: People shows the chosen person beside the list (list + detail; views/people.js decides by the page's width). */
.ta-page-ld { max-width: 1480px; }
.ta-ld { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s4); align-items: start; }
.ta-ld-detail { position: sticky; top: calc(var(--top-h) + var(--s4)); display: flex; flex-direction: column; gap: var(--s3); }
.ta-ld-links { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.ta-ld-links .ta-btn { justify-content: flex-start; }
.ta-table tbody tr[aria-current="true"] td { background: var(--accent-soft); }
.ta-table tbody tr[aria-current="true"] .ta-muted, .ta-table tbody tr[data-href]:hover .ta-muted { color: var(--text-2); }
.ta-table tbody tr[aria-current="true"] td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.ta-table-wrap { container: table / inline-size; }
/* Tables become stacked rows when their own box is narrow (a phone, or a narrow pane). */
@container table (max-width: 599px) {
  .ta-table thead { display: none; }
  .ta-table, .ta-table tbody, .ta-table tr, .ta-table td { display: block; width: 100%; }
  .ta-table tr { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border); }
  .ta-table tbody tr:last-child { border-bottom: 0; }
  .ta-table td { padding: 3px 0; border: 0; text-align: left; display: flex; justify-content: space-between; gap: var(--s3); }
  .ta-table td[data-label]::before { content: attr(data-label); color: var(--text-3); font-size: 13px; }
  .ta-table td:first-child { padding-bottom: 8px; }
  .ta-table tbody tr[data-href]:hover td { background: none; }
  .ta-num { text-align: left; }
  .ta-cell-actions { width: auto; justify-content: flex-end !important; }
  .ta-help-sec .ta-table thead { display: table-header-group; }
  .ta-help-sec .ta-table { display: table; }
  .ta-help-sec .ta-table tbody { display: table-row-group; }
  .ta-help-sec .ta-table tr { display: table-row; padding: 0; }
  .ta-help-sec .ta-table td { display: table-cell; padding: 6px; }
}

/* Short windows: the top bar scrolls away with the page and is lower; pop-ups keep their buttons on screen. */
@media (max-height: 479px) {
  :root { --top-h: 52px; }
  .ta-top { position: relative; }
  .ta-board-pages { top: 0; height: 100vh; }
  .ta-sheet-head { padding: var(--s2) var(--s4); }
  .ta-sheet-body { padding: var(--s4); }
  .ta-sheet-foot { padding: var(--s2) var(--s4); }
  .ta-signin-body { padding: 16px 0; }
  .ta-page { padding-top: var(--s4); }
  .ta-ld-detail { position: static; }
}

/* The board editor by its own width (a phone, or a tablet window beside the sidebar): the app's bar keeps Undo, Page options, Try it and More on a phone (Redo is in More). */
@container tbapp (max-width: 640px) {
  .tb-hide-compact { display: none; }
  .tb-try span { display: none; }
  .tb-try { width: 44px; padding: 0; justify-content: center; margin: 0 2px; }
  .tb-barbtn { width: 40px; height: 40px; }
  .tb-chip { padding: 4px 6px; }
  .tb-chip-t { font-size: 16px; }
  .tb-bar { gap: 2px; padding: 4px; grid-template-columns: auto minmax(0, 1fr) auto; }
  .tb-chip { justify-self: center; max-width: 100%; }
  .tb-stage { padding: 4px; }
  .tb-sentence { margin: 6px 6px 0; min-height: 52px; }
  .tb-sentence-words { font-size: 18px; }
}
@media (max-width: 599px) {
  .tb-app { border-radius: 12px; --chrome: 200px; }
  .tb-field { flex-wrap: wrap; gap: 0; padding-top: 8px; }
  .tb-field-l { flex-basis: 100%; font-size: 13px; }
  .tb-preview { width: 104px; height: 104px; }
}
@media (max-height: 479px) {
  .tb-app { --chrome: 150px; }
  .tb-grid-wrap, .tb-scene { min-width: min(100%, 360px); }
  .tb-preview { width: 96px; height: 96px; }
}
/* Touch (a coarse pointer): every control at least 48px tall. */
@media (pointer: coarse) {
  .ta-btn, .ta-btn-sm, .ta-btn-lg, .ta-input, .ta-search input, .ta-select-inline select, .ta-chip, .ta-tab, .ta-menu-item,
  .ta-nav-item, .ta-pagelist button, .ta-pagelist-static { height: auto; min-height: 48px; }
  .ta-input-sm { min-height: 48px; }
  .ta-iconbtn, .ta-iconbtn-sm { width: 48px; height: 48px; }
  .ta-seg span { min-height: 44px; }
  .ta-seg { padding: 2px; }
  .ta-switcher { min-height: 52px; }
  .ta-avatar-btn { min-width: 48px; min-height: 48px; }
  .ta-brand, .ta-signin-brand, .ta-auth-brand, .ta-back, .ta-link { min-height: 48px; display: inline-flex; align-items: center; }
  .ta-signin-foot a, .ta-auth-links a { display: inline-flex; align-items: center; min-height: 48px; }
  .ta-cell-person { min-height: 48px; }
  .ta-side-top { height: auto; }
  /* Taller rows need more room than a tablet held sideways has: the whole sidebar scrolls, nothing is cut off. */
  .ta-side { overflow-y: auto; }
  .ta-nav { flex: none; overflow: visible; }
  .ta-side-bottom { margin-top: auto; }
  .ta-search kbd { display: none; }
  .tb-barbtn { width: 48px; height: 48px; }
  .tb-try { height: 48px; }
  .ta-pagelist .tb-pagerow-more { opacity: 1; width: 48px; }
  .tb-chip-s, .tb-kindchip { min-height: 44px; }
  .tb-results button { min-height: 76px; }
  .tb-swatches { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); }
  .tb-spot-grip { width: 28px; height: 28px; }
}
/* Mouse: hover tints exist on every control; the hand cursor on everything that can be pressed. */
@media (hover: hover) {
  .ta-table tbody tr[data-href]:hover td { background: var(--surface-2); }
  .ta-table tbody tr[aria-current="true"]:hover td { background: var(--accent-soft); }
}

/* A foldable open like a book (two screen segments side by side): nothing sits across the fold. */
@media (horizontal-viewport-segments: 2) {
  /* The page list fills the left half (beside the sidebar when it shows), the board the right half. */
  .ta-board { grid-template-columns: calc(env(viewport-segment-width 0 0) - var(--side-w)) env(viewport-segment-width 1 0); column-gap: calc(env(viewport-segment-left 1 0) - env(viewport-segment-right 0 0)); }
  .ta-board-work { padding-left: var(--s4); }
  .ta-board-pages { display: flex; }
  .ta-signin { grid-template-columns: env(viewport-segment-width 0 0) env(viewport-segment-width 1 0); column-gap: calc(env(viewport-segment-left 1 0) - env(viewport-segment-right 0 0)); }
  .ta-signin-panel { display: flex; padding-left: 32px; }
  .ta-sheet, .ta-sheet-wide { width: env(viewport-segment-width 1 0); border-left: 1px solid var(--border); }
  .ta-modal { margin-left: calc(env(viewport-segment-left 1 0) + 16px); margin-right: auto; width: min(440px, calc(env(viewport-segment-width 1 0) - 32px)); }
}

@media (horizontal-viewport-segments: 2) and (max-width: 839px) {
  .ta-board { grid-template-columns: env(viewport-segment-width 0 0) env(viewport-segment-width 1 0); }
}

/* Keyboard shortcuts list (?) */
.ta-keys { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; align-items: center; margin: 0; }
.ta-keys dt { display: flex; gap: 4px; flex-wrap: wrap; }
.ta-keys dd { margin: 0; color: var(--text-2); }
.ta-keys kbd { font: 500 12px var(--font); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; padding: 2px 7px; background: var(--surface-2); color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Usage: words on the board ---------- */
.ta-stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: var(--s3) 0; }
.ta-usage-pages { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px var(--s4); }
.ta-usage-pages li { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: 36px; border-bottom: 1px solid var(--border); }
.ta-usage-pages a { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text); }
.ta-usage-pages .ta-ic { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.ta-usage-goals { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--s3); }
.ta-usage-goals li { display: flex; flex-direction: column; gap: 6px; padding-bottom: var(--s3); border-bottom: 1px solid var(--border); }
.ta-usage-goals li:last-child { border-bottom: 0; }
.ta-usage-goals p { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ta-usage-goals .ta-ic { width: 16px; height: 16px; color: var(--ok); }
.ta-usage-missing .ta-ic { color: var(--warn); }
@media (max-width: 599px) { .ta-stats-3 { grid-template-columns: 1fr 1fr 1fr; } .ta-stats-3 .ta-stat-value { font-size: 18px; } }
