/* tebb — app-level rules for the role UI at /tebb (not loaded in Desk or print). Depends on tebb-tokens.css + tebb-ui.css.
   Tokens only, logical properties only (design/tebb/CLAUDE.md rules 2–3). */

html, body, #app { height: 100%; }
body { margin: 0; }

/* Breakpoints — the rules tebb-ui.css keeps as comments because its reference boards are fixed-size; the app applies them
   to the viewport (design/tebb/README.md, plan step 3). Boards that differ from these carry inline overrides in their views. */
@media (max-width: 1180px) {
  .sidebar { width: 232px; }
  .toolbar { inset-inline-start: 256px; }
  .app-content { padding-inline-start: 260px; }
}
@media (max-width: 700px) {
  .sidebar, .toolbar { display: none; }
  .app-content { padding: 110px 16px 110px; }
}
@media (min-width: 701px) {
  .tabbar, .phone-only { display: none; }
}

/* Visually hidden, still announced (labels for icon-only controls and inputs drawn as text). */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Controls rendered as the reference's plain elements keep the reference look: no UA button/link chrome. */
.tebb-reset { all: unset; box-sizing: border-box; }
a.nav-item, a.tab, a.list-row { cursor: pointer; }
.tebb-link { color: inherit; text-decoration: none; }

/* Live mode: inline status for a screen that could not load (what happened and what to do now). */
.tebb-load-error { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); background: var(--amber-bg); color: var(--amber); font-size: 15px; line-height: 1.55; }

/* Dark-theme contrast corrections (WCAG 1.4.3 AA; light theme untouched, so the parity boards are unchanged).
   tebb-ui.css pairs — .badge.neutral: --label-3 on --fill-3 over --bg-surface-2 = 4.48:1; .btn.destructive: #fff on
   the dark --red = 2.9:1. The handoff files stay byte-identical; these are the app's corrections on top. */
[data-theme="dark"] .badge.neutral { color: var(--label-2); }
[data-theme="dark"] .btn.destructive { background: var(--red-bg); color: var(--red); }

/* ---------- Account menu (components/AccountMenu.vue; plan 12 Phase 1) ----------
   The board's account block becomes the menu button (same look: .sidebar .account still styles it); the menu is the
   .menu.glass of tebb-ui.css, opened above the block. Items are buttons/links drawn as .menu-item (zero-specificity
   resets below keep the tebb-ui.css states); focus ring 3 px (rule 8); 44 px targets on touch (rule 9). */
.tebb-account-wrap { position: relative; }
.tebb-account-btn { box-sizing: border-box; width: 100%; cursor: pointer; text-align: start; }
.tebb-account-btn:hover { background: var(--fill-2); }
.tebb-account-btn:active { background: var(--fill-1); }
.tebb-account-btn:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.tebb-account-menu { position: absolute; inset-block-end: calc(100% + 8px); inset-inline-start: 0; z-index: 10;
  width: max-content; min-width: 100%; max-width: 300px; }
.tebb-account-head { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 4px; font-size: 14px; }
.tebb-account-head .ltr { text-align: start; overflow-wrap: anywhere; }
.tebb-menu-label { display: block; padding: 6px 10px 2px; font-size: 12.5px; color: var(--label-2-on-glass); }
.tebb-menu-check { width: 17px; height: 17px; flex: none; }
.tebb-menu-hint { direction: inherit; }
:where(.tebb-account-menu) :where(button.menu-item, a.menu-item) { width: 100%; border: 0; margin: 0; background: transparent;
  font: inherit; color: inherit; text-align: start; text-decoration: none; cursor: pointer; }
.tebb-account-menu .menu-item:focus-visible { box-shadow: inset 0 0 0 3px var(--focus-ring); }
.tebb-account-menu .menu-item[aria-checked="true"] { font-weight: 600; }
@media (pointer: coarse) { .tebb-account-menu .menu-item { min-height: 44px; } .tebb-account-btn { min-height: 48px; } }

/* The owner home renders without tebb-ui.css (self-styled on the tokens, App.vue sets data-ui="self"): the few
   tebb-ui.css rules the account menu uses, so it looks the same there. Values copied from tebb-ui.css (tokens only). */
:root[data-ui="self"] .glass { background: var(--glass-fill); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-hairline); box-shadow: inset 0 1px 0 var(--glass-specular), var(--shadow-glass); }
:root[data-ui="self"] .icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }
:root[data-ui="self"][dir="rtl"] .icon[data-mirror] { transform: scaleX(-1); }
:root[data-ui="self"] .menu { border-radius: 18px; padding: 6px; min-width: 240px; font-size: 15px; color: var(--label); }
:root[data-ui="self"] .menu-item { height: 36px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border-radius: 12px; }
:root[data-ui="self"] .menu-item .icon { width: 17px; height: 17px; stroke-width: 1.75; }
:root[data-ui="self"] .menu-item:hover, :root[data-ui="self"] .menu-item:focus-visible { outline: none; background: var(--nav-selected); color: var(--anabi-800); }
:root[data-ui="self"][data-theme="dark"] .menu-item:hover { color: var(--accent); }
:root[data-ui="self"] .menu-item.destructive { color: var(--red); font-weight: 500; }
:root[data-ui="self"] .menu-item .shortcut { margin-inline-start: auto; font-size: 13px; color: var(--label-2-on-glass); }
:root[data-ui="self"] .menu-sep { height: 1px; background: var(--separator); margin: 5px 10px; }
:root[data-ui="self"] .grow { flex: 1; min-width: 0; }
:root[data-ui="self"] .small { font-size: 13px; } :root[data-ui="self"] .strong { font-weight: 600; }
:root[data-ui="self"] .on-glass-2 { color: var(--label-2-on-glass); }
:root[data-ui="self"] .ltr { direction: ltr; unicode-bidi: isolate; }
:root[data-ui="self"] .is-entering { animation: tebb-app-rise var(--dur-4) var(--ease-spring) both; }
@keyframes tebb-app-rise { from { opacity: 0; transform: translateY(16px) scale(.98); } }

/* ---------- Status card (components/LoadError.vue): what happened and what to do now (§4.8) ---------- */
.tebb-status { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; max-width: 560px;
  width: 100%; margin-inline: auto; padding: 28px 22px; }
.tebb-status .tile { width: 52px; height: 52px; border-radius: 16px; background: var(--fill-3); display: grid; place-items: center; color: var(--label-3); }
.tebb-status .tile .icon { width: 26px; height: 26px; }
.tebb-status-title { margin: 0; font-size: 17px; font-weight: 600; }
.tebb-status-body { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--label-2); max-width: 380px; }
.tebb-status .row { flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.tebb-load-error .btn { margin-inline-start: auto; flex: none; }
/* While a screen is refused or missing (LoadError card), none of its work controls are offered. */
:root[data-refused] .toolbar .btn, :root[data-refused] .shortcut-bar, :root[data-refused] .inspector,
:root[data-refused] .tebb-status ~ * { display: none; }
.tebb-load-error.is-info { background: var(--fill-3); color: var(--label-2); }
