/* Support Hub admin panel
   Switchboard theme: quiet slate panels, one teal accent, status lamps. Rubik covers Hebrew + Latin. */

@font-face { font-family: Rubik; font-weight: 400; font-display: swap; src: url(/fonts/rubik-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AA; }
@font-face { font-family: Rubik; font-weight: 500; font-display: swap; src: url(/fonts/rubik-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AA; }
@font-face { font-family: Rubik; font-weight: 600; font-display: swap; src: url(/fonts/rubik-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AA; }
@font-face { font-family: Rubik; font-weight: 400; font-display: swap; src: url(/fonts/rubik-hebrew-400-normal.woff2) format('woff2'); unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: Rubik; font-weight: 500; font-display: swap; src: url(/fonts/rubik-hebrew-500-normal.woff2) format('woff2'); unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: Rubik; font-weight: 600; font-display: swap; src: url(/fonts/rubik-hebrew-600-normal.woff2) format('woff2'); unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }

:root {
  --page: #EEF1F4;
  --panel: #FFFFFF;
  --sunk: #F5F7F9;
  --ink: #1C2733;
  --muted: #5E6B78;
  --line: #D3D9E0;
  --accent: #0E7C7B;
  --accent-ink: #FFFFFF;
  --accent-soft: #DDEFEE;
  --ok: #2E9E5B;
  --wait: #D9A21B;
  --fault: #C8432F;
  --fault-soft: #FBE9E6;
  --bubble-in: #FFFFFF;
  --bubble-out: #DDEFEE;
  --bubble-sys: #ECEFF3;
  --focus: 0 0 0 3px rgba(14, 124, 123, .35);
  --r-sm: 6px;
  --r-md: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #121A22; --panel: #1A2530; --sunk: #16202A; --ink: #E4EAF0; --muted: #93A1AE; --line: #2C3A48;
    --accent: #2BA8A6; --accent-ink: #06201F; --accent-soft: #173A3B; --ok: #43B873; --wait: #E2B13A; --fault: #E0634F; --fault-soft: #3A2220;
    --bubble-in: #1F2C38; --bubble-out: #173A3B; --bubble-sys: #202B36; --focus: 0 0 0 3px rgba(43, 168, 166, .45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--page);
  color: var(--ink);
  font: 400 15px/1.5 Rubik, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
h1 { font-size: 1.6rem; font-weight: 600; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; font-weight: 600; margin: 0 0 .75rem; }
h3 { font-size: 1rem; font-weight: 600; margin: 0 0 .5rem; }
p { margin: 0 0 .75rem; max-width: 72ch; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.mono { font-variant-numeric: tabular-nums; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
[hidden] { display: none !important; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.nav { background: var(--panel); border-right: 1px solid var(--line); padding: 20px 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 20px; font-weight: 600; font-size: 1.05rem; }
.brand img { width: 26px; height: 26px; }
.nav a { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; }
.nav a:hover { background: var(--sunk); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); font-weight: 500; box-shadow: inset 3px 0 0 var(--accent); }
.nav .count { font-size: .8rem; color: var(--muted); }
.nav .spacer { flex: 1; }
.nav .who { padding: 10px; border-top: 1px solid var(--line); margin-top: 8px; font-size: .88rem; }
.nav .who button { margin-top: 6px; }
.main { padding: 28px 36px 60px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.menu-btn { display: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .nav { position: fixed; inset: 0 auto 0 0; width: 240px; z-index: 20; transform: translateX(-100%); transition: transform .2s; }
  .nav.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .main { padding: 16px 16px 48px; }
  .menu-btn { display: inline-flex; margin-bottom: 12px; }
}

/* ---------- Panels, forms ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; margin-bottom: 18px; }
.panel.flush { padding: 0; overflow: hidden; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; align-items: start; }
.grid2 > .panel { margin-bottom: 0; }

label.field, div.field { display: block; margin-bottom: 14px; max-width: 560px; }
label.field > span, div.field > span { display: block; font-weight: 500; margin-bottom: 4px; font-size: .92rem; }
label.field > small, div.field > small { display: block; color: var(--muted); margin-top: 4px; font-size: .84rem; }
input[type=text], input[type=password], input[type=url], input[type=email], input[type=number], input[type=search], input[type=time], input[type=date], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px;
}
textarea { min-height: 70px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); vertical-align: -3px; margin: 0 6px 0 0; }
.check { display: flex; align-items: flex-start; gap: 2px; margin-bottom: 12px; }
.check small { display: block; color: var(--muted); }

button, .btn {
  font: inherit; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  padding: 7px 14px; border-radius: var(--r-sm); text-decoration: none; white-space: nowrap;
}
button:hover, .btn:hover { border-color: var(--muted); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.primary:hover { filter: brightness(1.07); }
button.danger { color: var(--fault); }
button.danger:hover { border-color: var(--fault); }
button.link { border: 0; background: none; color: var(--accent); padding: 0; }
button:disabled { opacity: .55; cursor: default; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.error-box { background: var(--fault-soft); color: var(--fault); border-radius: var(--r-sm); padding: 9px 12px; margin-bottom: 12px; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 500; color: var(--muted); font-size: .85rem; background: var(--sunk); }
tr:last-child td { border-bottom: 0; }
td .sub { display: block; color: var(--muted); font-size: .85rem; }
.empty { padding: 28px 20px; color: var(--muted); }

/* ---------- Lamps (status) ---------- */
.lamp { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--line); flex: none; }
.lamp.ok { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.lamp.wait { background: var(--wait); box-shadow: 0 0 0 3px color-mix(in srgb, var(--wait) 25%, transparent); }
.lamp.fault { background: var(--fault); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fault) 22%, transparent); }
@media (prefers-reduced-motion: no-preference) {
  .lamp.wait { animation: blink 1.6s ease-in-out infinite; }
  @keyframes blink { 50% { opacity: .35; } }
}
.status { display: inline-flex; align-items: center; gap: 8px; }
.tag { display: inline-block; font-size: .8rem; padding: 1px 8px; border-radius: 999px; background: var(--sunk); border: 1px solid var(--line); color: var(--muted); }
.tag.open { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-soft); }
.tag.bad { color: var(--fault); border-color: color-mix(in srgb, var(--fault) 40%, transparent); background: var(--fault-soft); }

/* ---------- Switchboard (dashboard centrepiece) ---------- */
.board { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 0; margin-bottom: 18px; }
.board-row { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(120px, 2fr) minmax(150px, 1fr); align-items: center; padding: 14px 22px; gap: 0; }
.board-row + .board-row { border-top: 1px dashed var(--line); }
.jack { display: flex; align-items: center; gap: 10px; min-width: 0; }
.jack b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jack .sub { display: block; font-size: .82rem; color: var(--muted); }
.jack.right { justify-content: flex-end; text-align: right; }
.cable { height: 34px; position: relative; margin: 0 14px; }
.cable svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cable path { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; }
.cable.idle path { stroke: var(--line); stroke-dasharray: 2 6; }
.cable .plug { fill: var(--panel); stroke: var(--accent); stroke-width: 2.5; }
.cable.idle .plug { stroke: var(--line); }
.cable .label { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); font-size: .78rem; color: var(--muted); background: var(--panel); padding: 0 6px; white-space: nowrap; }
@media (max-width: 640px) {
  .board-row { grid-template-columns: 1fr; gap: 6px; }
  .cable { display: none; }
  .jack.right { justify-content: flex-start; text-align: left; padding-left: 20px; }
}

.figures { display: flex; gap: 36px; flex-wrap: wrap; margin-bottom: 4px; }
.figures div { min-width: 90px; }
.figures strong { display: block; font-size: 1.5rem; font-weight: 600; line-height: 1.2; }
.figures span { color: var(--muted); font-size: .88rem; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 110px; margin-top: 14px; }
.bars .day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.bars .stack { width: 100%; max-width: 34px; display: flex; flex-direction: column-reverse; height: 80px; }
.bars .in { background: var(--accent); border-radius: 3px 3px 0 0; }
.bars .out { background: color-mix(in srgb, var(--accent) 35%, var(--panel)); }
.bars small { color: var(--muted); font-size: .75rem; }
.legend { display: flex; gap: 16px; font-size: .82rem; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

.events { list-style: none; margin: 0; padding: 0; }
.events li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .9rem; display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
.events li:last-child { border-bottom: 0; }
.events time { color: var(--muted); font-size: .82rem; }
.events .error { color: var(--fault); }

/* ---------- Conversations ---------- */
.inbox { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; height: calc(100vh - 150px); min-height: 480px; }
.inbox-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.inbox-filters { padding: 12px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.seg button { flex: 1; border: 0; border-radius: 0; justify-content: center; padding: 6px 8px; font-weight: 400; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--accent-soft); font-weight: 500; }
.convs { overflow-y: auto; flex: 1; }
.conv { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 11px 14px; background: none; font-weight: 400; }
.conv:hover { background: var(--sunk); }
.conv[aria-current="true"] { background: var(--accent-soft); }
.conv .top { display: flex; justify-content: space-between; gap: 8px; }
.conv .name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv time { color: var(--muted); font-size: .8rem; flex: none; }
.conv .preview { color: var(--muted); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; margin-top: 2px; }
.conv .meta { display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; }

.thread { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.thread-head { padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.thread-head h2 { margin: 0; text-align: left; unicode-bidi: plaintext; }
.messages { flex: 1; overflow-y: auto; padding: 18px 20px; background: var(--sunk); display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: min(560px, 80%); padding: 8px 12px; border-radius: 12px; background: var(--bubble-in); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; align-self: flex-start; }
.msg.out { align-self: flex-end; background: var(--bubble-out); border-color: transparent; }
.msg.system, .msg.bot { background: var(--bubble-sys); border-style: dashed; }
.msg .by { display: block; font-size: .78rem; color: var(--muted); margin-bottom: 2px; white-space: normal; }
.msg .when { display: block; font-size: .74rem; color: var(--muted); margin-top: 3px; text-align: right; }
.msg.failed { border: 1px solid var(--fault); }
.msg .err { display: block; color: var(--fault); font-size: .8rem; margin-top: 4px; white-space: normal; }
.msg img, .msg video { max-width: 100%; max-height: 300px; border-radius: 8px; display: block; margin-top: 4px; }
.msg audio { display: block; margin-top: 4px; max-width: 100%; }
.composer { border-top: 1px solid var(--line); padding: 12px 16px; display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { min-height: 44px; max-height: 180px; }
.composer-note { border-top: 1px solid var(--line); padding: 12px 20px; color: var(--muted); font-size: .9rem; }
.thread-empty { margin: auto; color: var(--muted); padding: 40px; text-align: center; }
@media (max-width: 860px) {
  .inbox { grid-template-columns: 1fr; height: auto; }
  .inbox.has-thread .inbox-list { display: none; }
  .inbox:not(.has-thread) .thread { display: none; }
  .messages { max-height: 60vh; }
}

/* ---------- Channel linking ---------- */
.link-box { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; padding: 16px; border: 1px dashed var(--line); border-radius: var(--r-md); background: var(--sunk); margin-top: 12px; }
.link-box img { width: 232px; height: 232px; background: #fff; padding: 8px; border-radius: 8px; }
.code { font-size: 2.1rem; font-weight: 600; letter-spacing: .12em; padding: 6px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); }
.link-box ol { margin: 0; padding-left: 20px; }

/* ---------- Hours ---------- */
.week { display: grid; gap: 0; }
.week .day { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: start; }
.week .day:last-child { border-bottom: 0; }
.ranges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.range { display: inline-flex; gap: 4px; align-items: center; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 3px 6px; }
.range input { width: 108px; padding: 4px 6px; }
.range button { padding: 2px 7px; border: 0; background: none; color: var(--muted); }

/* ---------- Auth screens ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth .panel { width: 100%; max-width: 400px; padding: 28px; }
.auth .brand { padding: 0 0 18px; }
.auth h1 { font-size: 1.35rem; margin-bottom: 6px; }
.totp-qr { width: 200px; height: 200px; background: #fff; padding: 6px; border-radius: 8px; display: block; margin: 10px 0; }
.secret { font-size: .9rem; word-break: break-all; background: var(--sunk); padding: 6px 8px; border-radius: var(--r-sm); }

/* ---------- Modal + toast ---------- */
dialog { border: 1px solid var(--line); border-radius: var(--r-md); padding: 0; background: var(--panel); color: var(--ink); width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 40px); }
dialog::backdrop { background: rgba(10, 20, 30, .45); }
dialog form.body { padding: 22px 24px; overflow-y: auto; max-height: calc(100vh - 140px); }
dialog .foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--sunk); }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--page); padding: 9px 16px; border-radius: var(--r-sm); font-size: .92rem; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 50; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; }
#toast.bad { background: var(--fault); color: #fff; }

.rtl-input { direction: rtl; text-align: right; }
.placeholders { font-size: .84rem; color: var(--muted); }
.placeholders code { background: var(--sunk); padding: 0 4px; border-radius: 4px; }

/* ---------- v0.2: nav groups, account menu ---------- */
.nav-group { margin: 14px 10px 4px; font-size: .8rem; color: var(--muted); }
.nav .who { position: relative; }
.who-btn { width: 100%; border: 0; background: none; padding: 6px; justify-content: flex-start; gap: 10px; text-align: left; font-weight: 400; }
.who-btn:hover { background: var(--sunk); }
.who-btn b { display: block; font-weight: 500; }
.who-btn small { display: block; color: var(--muted); font-size: .8rem; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-grid; place-items: center; font-weight: 600; flex: none; }
.acct-menu { position: absolute; bottom: calc(100% + 6px); left: 0; right: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px; box-shadow: 0 12px 30px rgba(10, 20, 30, .18); z-index: 30; }
.acct-menu button { display: flex; width: 100%; border: 0; background: none; font-weight: 400; padding: 8px 10px; }
.acct-menu button:hover, .acct-menu button:focus-visible { background: var(--sunk); }
.acct-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.context-help { width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 50%; font-weight: 600; }

/* ---------- auth extras ---------- */
.or-google, .or-email { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 10px; justify-items: stretch; }
.or-google > span { text-align: center; margin-top: -26px; background: var(--panel); justify-self: center; padding: 0 8px; }
.btn.google { justify-content: center; }
.or-email .row input { flex: 1; min-width: 160px; }
.tfa-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.tfa-options > div { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; }
@media (max-width: 640px) { .tfa-options { grid-template-columns: 1fr; } }
.changelog h3 { margin-top: 14px; }
.changelog ul { margin: 0; padding-left: 20px; }
fieldset.plain { border: 0; padding: 0; margin: 0 0 14px; }
fieldset.plain legend { font-weight: 500; font-size: .92rem; margin-bottom: 6px; padding: 0; }
.ch-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 12px; padding-left: 24px; }

/* ---------- Release Center ---------- */
.update-status.running { border-color: var(--wait); }
.update-status.done { border-color: var(--ok); }
.update-status.failed { border-color: var(--fault); }
.error-text { color: var(--fault); margin: 8px 0 0; }
td.changes pre { white-space: pre-wrap; font: inherit; font-size: .86rem; margin: 6px 0 0; max-width: 46ch; }
td.changes summary { cursor: pointer; color: var(--accent); }

/* ---------- Hebrew text, holidays, calendar ---------- */
.he { font-family: Rubik, system-ui, sans-serif; unicode-bidi: plaintext; }
.holiday-rules td { vertical-align: middle; padding: 8px 10px; }
.holiday-rules td:first-child .he { font-weight: 500; }
.holiday-rules select { width: auto; min-width: 140px; }
.calendar-wrap { min-width: 0; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.cal-head > div { text-align: center; display: grid; }
.cal-head button { width: 34px; height: 34px; justify-content: center; padding: 0; font-size: 1.2rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-dow { text-align: center; font-size: .78rem; color: var(--muted); padding-bottom: 2px; display: grid; }
.cal-dow .he { font-size: .72rem; }
.cal-day { min-height: 74px; border: 1px solid var(--line); border-radius: 6px; padding: 4px 5px; display: flex; flex-direction: column; gap: 1px; font-size: .74rem; min-width: 0; background: var(--panel); }
.cal-day.empty { border: 0; background: none; }
.cal-day.special { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.cal-day.closed .cal-hours { color: var(--fault); }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-top { display: flex; justify-content: space-between; gap: 4px; align-items: baseline; }
.cal-top b { font-size: .88rem; }
.cal-top .he { color: var(--muted); }
.cal-hol { color: var(--accent); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-hours { color: var(--muted); margin-top: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .cal-day { min-height: 54px; } .cal-hours, .cal-hol { display: none; } .cal-day.special::after { content: '•'; color: var(--accent); } }

/* ---------- Help center ---------- */
.help-center { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
.help-nav { position: sticky; top: 16px; padding: 10px; display: flex; flex-direction: column; gap: 1px; max-height: calc(100vh - 40px); overflow-y: auto; }
.help-nav a { padding: 6px 10px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-size: .92rem; }
.help-nav a:hover { background: var(--sunk); }
.help-nav a[aria-current="page"] { background: var(--accent-soft); font-weight: 500; }
.help-nav .download { margin-top: 12px; color: var(--accent); font-size: .86rem; }
.help-body { padding: 26px 32px; min-width: 0; }
.help-body h1 { margin-bottom: 14px; }
.help-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 22px; }
.help-card { display: block; border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; text-decoration: none; color: var(--ink); }
.help-card:hover { border-color: var(--accent); }
.help-card b { display: block; margin-bottom: 4px; }
.help-card span { color: var(--muted); font-size: .88rem; }
.article-body { max-width: 74ch; line-height: 1.65; }
.article-body h2 { font-size: 1.12rem; margin: 26px 0 8px; }
.article-body h3 { font-size: 1rem; margin: 20px 0 6px; }
.article-body ul, .article-body ol { padding-left: 22px; }
.article-body li { margin: 4px 0; }
.article-body li.sub { margin-left: 18px; list-style: circle; }
.article-body code { background: var(--sunk); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; font-size: .9em; }
.article-body pre { background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; overflow-x: auto; }
.article-body pre code { border: 0; padding: 0; background: none; }
.article-body table { margin: 12px 0; border: 1px solid var(--line); border-radius: var(--r-sm); }
.article-body .tip { background: var(--accent-soft); border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: var(--r-sm); margin: 14px 0; }
.article-body kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font: inherit; font-size: .85em; }
.next-article { margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 860px) { .help-center { grid-template-columns: 1fr; } .help-nav { position: static; max-height: none; } .help-body { padding: 18px; } }

/* ---------- Tour ---------- */
.tour { position: fixed; inset: 0; z-index: 60; }
.tour-shade { position: absolute; inset: 0; background: rgba(10, 20, 30, .55); }
.tour.has-spot .tour-shade { background: transparent; }
.tour-spot { position: fixed; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(10, 20, 30, .55), 0 0 0 3px var(--accent); pointer-events: none; display: none; }
.tour-card { position: fixed; width: min(360px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 50px rgba(0, 0, 0, .3); padding: 16px 18px 14px; }
.tour-step { font-size: .8rem; color: var(--muted); }
.tour-card h3 { margin: 4px 0 6px; font-size: 1.08rem; }
.tour-card p { margin: 0 0 14px; line-height: 1.55; }
.tour-actions { display: flex; gap: 6px; align-items: center; }
.tour-actions > span { flex: 1; }
@media (prefers-reduced-motion: no-preference) { .tour-spot { transition: all .18s ease; } }

/* ---------- v0.3: attachments, API tokens ---------- */
.composer { align-items: flex-end; }
.composer-main { flex: 1; display: grid; gap: 6px; min-width: 0; }
.attach-btn { padding: 7px 10px; font-size: 1.05rem; }
.attach-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--sunk); border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: .86rem; max-width: 100%; justify-self: start; }
.attach-chip button { border: 0; background: none; padding: 0 6px; color: var(--muted); }
.file-link { display: inline-block; margin-top: 4px; word-break: break-all; }
tr.revoked td { opacity: .55; }
pre.code { background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; white-space: pre-wrap; word-break: break-all; font-size: .85rem; direction: ltr; text-align: left; }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; }
