/* Tutoria — shared component styles. Every colour is a token; each layout stylesheet
   (agora.css, noticeboard.css, studio.css) redefines the tokens and adds its own structure.
   Blue (--offer / --series-1) always means tutors & supply, orange (--request / --series-2)
   always means students & demand — validated for colour-vision deficiency on every surface. */

:root {
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-head: var(--font);
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --bg: #f6f7f9; --surface: #ffffff; --surface-2: #f2f4f7; --surface-3: #e8ecf1;
  --text: #172033; --text-2: #3b4555; --muted: #5d6879; --border: #e1e6ed; --border-strong: #c8d0db;
  --primary: #0f6e6e; --primary-hover: #0b5858; --on-primary: #ffffff; --primary-soft: #e2f2f0;
  --accent: #d9531e; --accent-hover: #bb4416; --on-accent: #ffffff;
  --offer: #2a78d6; --offer-soft: #e7f0fc; --offer-ink: #1b56a0;
  --request: #eb6834; --request-soft: #fdeee6; --request-ink: #a1401a;
  --ok: #0ca30c; --ok-soft: #e4f5e4; --ok-ink: #106b10;
  --warn: #fab219; --warn-soft: #fff4d9; --warn-ink: #7a5000;
  --danger: #d03b3b; --danger-soft: #fdeaea; --danger-ink: #a32323;
  --series-1: #2a78d6; --series-2: #eb6834; --grid: #e4e3dc; --viz-muted: #898781;
  --radius: 12px; --radius-sm: 8px; --radius-lg: 18px;
  --shadow: 0 1px 2px rgb(16 24 40 / .05), 0 1px 3px rgb(16 24 40 / .07);
  --shadow-lg: 0 12px 32px rgb(16 24 40 / .14);
  --ring: 0 0 0 3px color-mix(in srgb, var(--primary) 32%, transparent);
  --maxw: 1200px; --gutter: 16px;
  color-scheme: light;
}

/* ---------- reset & type ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--text); background: var(--bg); overflow-wrap: break-word; }
img, svg { display: inline-block; vertical-align: middle; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; color: var(--text); letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); font-weight: 750; }
h2 { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.45rem); font-weight: 700; }
h3, .h3 { font-size: 1.08rem; font-weight: 680; }
p { margin: 0 0 .8em; }
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-hover); }
small, .small { font-size: .86rem; }
.muted { color: var(--muted); }
.lead { font-size: 1.12rem; color: var(--text-2); }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .74rem; font-weight: 700; color: var(--muted); margin: 0 0 .4em; display: flex; flex-wrap: wrap; gap: .4em; align-items: center; }
code, pre { font-family: var(--font-mono); font-size: .9em; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }
pre { background: var(--surface-2); padding: 12px 14px; border-radius: var(--radius-sm); overflow: auto; white-space: pre-wrap; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5em 0; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
.i { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.17em; margin-right: .38em; }
.btn .i, .icon-btn .i { margin-right: .35em; }
.icon-btn .i { margin: 0; width: 1.25em; height: 1.25em; }

/* ---------- layout helpers ---------- */
main { display: block; }
section { margin-bottom: 28px; }
.cols-2 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); align-items: start; }
.card-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.card-list { display: grid; gap: 12px; }
.stack { display: grid; gap: 8px; align-content: start; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.detail { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .detail { grid-template-columns: minmax(0, 1fr) 320px; } }
.detail__main > .card, .detail__main > section { margin-bottom: 16px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.section-head h2, .section-head .h3 { margin: 0; display: flex; align-items: center; }
.section-head a { font-size: .92rem; font-weight: 600; text-decoration: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0; min-height: 40px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: .95rem;
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--surface-2); color: var(--text); }
.btn--primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn--primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--primary); }
.btn--ghost:hover { background: var(--primary-soft); color: var(--primary-hover); }
.btn--danger { background: var(--danger-soft); border-color: transparent; color: var(--danger-ink); }
.btn--danger:hover { background: var(--danger); color: #fff; }
.btn--sm { min-height: 32px; padding: 4px 12px; font-size: .86rem; }
.btn--block { display: flex; width: 100%; }
.btn.is-active { background: var(--text); color: var(--surface); border-color: var(--text); }
.inline-form { display: inline; margin: 0; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; color: var(--text-2); text-decoration: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.dot-count, .count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; font-size: .7rem; font-weight: 700; line-height: 1; background: var(--accent); color: var(--on-accent); }
.dot-count { position: absolute; top: 2px; right: 0; }
.count { margin-left: 6px; background: var(--surface-3); color: var(--text-2); }
.is-active > .count, a.is-active .count { background: var(--primary); color: var(--on-primary); }

/* ---------- avatars, badges, tags, chips ---------- */
.avatar { border-radius: 50%; object-fit: cover; background: var(--surface-3); flex: none; }
.avatar--xs { width: 24px; height: 24px; } .avatar--sm { width: 32px; height: 32px; } .avatar--md { width: 44px; height: 44px; }
.avatar--lg { width: 72px; height: 72px; } .avatar--xl { width: 112px; height: 112px; }
.badge { display: inline-flex; align-items: center; gap: 2px; padding: 2px 8px; border-radius: 999px; font-size: .74rem; font-weight: 650; background: var(--surface-2); color: var(--text-2); margin-right: 4px; white-space: nowrap; }
.badge .i { margin-right: 3px; width: .95em; height: .95em; }
.badge--verified { background: var(--ok-soft); color: var(--ok-ink); }
.badge--tutor { background: var(--offer-soft); color: var(--offer-ink); }
.badge--guardian { background: var(--warn-soft); color: var(--warn-ink); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 6px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.tag--offer { background: var(--offer-soft); color: var(--offer-ink); }
.tag--offer::before, .tag--request::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--offer); }
.tag--request { background: var(--request-soft); color: var(--request-ink); }
.tag--request::before { background: var(--request); }
.tag--demo { background: var(--surface-3); color: var(--muted); font-weight: 600; }
.pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 650; background: var(--surface-2); color: var(--text-2); margin-right: 4px; white-space: nowrap; }
.pill--open, .pill--active, .pill--pending, .pill--due, .pill--sent { background: var(--warn-soft); color: var(--warn-ink); }
.pill--open, .pill--active { background: var(--primary-soft); color: var(--primary-hover); }
.pill--accepted, .pill--matched, .pill--confirmed, .pill--published, .pill--done, .pill--verified { background: var(--ok-soft); color: var(--ok-ink); }
.pill--backup, .pill--recommended { background: var(--offer-soft); color: var(--offer-ink); }
.pill--declined, .pill--withdrawn, .pill--cancelled, .pill--removed, .pill--closed, .pill--expired, .pill--disputed { background: var(--danger-soft); color: var(--danger-ink); }
.pill--paused, .pill--draft, .pill--waived { background: var(--surface-3); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; padding: 0; margin: 0; }
.chip { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: .78rem; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.chip--link { text-decoration: none; }
.chip--link:hover { border-color: var(--primary); color: var(--primary); }
.match { display: inline-flex; padding: 1px 8px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--ok-soft); color: var(--ok-ink); }

/* ---------- cards & listings ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card--danger { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.listing { display: flex; flex-direction: column; gap: 10px; padding: 16px; position: relative; }
.listing--offer { border-top: 3px solid var(--offer); }
.listing--request { border-top: 3px solid var(--request); }
.listing.is-demo { }
.listing__head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.listing__head .price { margin-left: auto; }
.listing__title { margin: 0; font-size: 1.06rem; line-height: 1.3; font-weight: 700; }
.listing__title a { color: var(--text); text-decoration: none; }
.listing__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.listing__title a:hover { color: var(--primary); }
.listing__topic { margin: 0; font-size: .9rem; color: var(--text-2); display: flex; align-items: center; }
.listing__meta { display: flex; flex-wrap: wrap; gap: 4px; }
.listing__foot { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); font-size: .86rem; flex-wrap: wrap; }
.listing__foot a, .listing__foot .badge { position: relative; z-index: 1; }
.listing__platforms { color: var(--muted); display: inline-flex; align-items: center; }
.price { display: inline-flex; align-items: baseline; gap: 2px; white-space: nowrap; color: var(--text); }
.price strong { font-size: 1rem; font-weight: 750; }
.price small { color: var(--muted); font-size: .76rem; }
.price--none { color: var(--muted); font-size: .86rem; }
.who { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); min-width: 0; }
.who__text { display: grid; line-height: 1.2; min-width: 0; }
.who__name { font-weight: 600; font-size: .9rem; }
.who__sub { color: var(--muted); font-size: .78rem; }
a.who:hover .who__name { color: var(--primary); }
.who-line { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.who-line .badge { margin: 0; }

/* focus meter: label + three dots (filled = rating) */
.focus { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.focus__item { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 8px; background: var(--surface-2); font-size: .8rem; color: var(--text-2); }
.focus__item--w3 { background: var(--primary-soft); color: var(--text); font-weight: 600; }
.focus__more { font-size: .8rem; color: var(--muted); align-self: center; }
.dots { display: inline-flex; gap: 2px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); }
.dots i.on { background: var(--primary); }

/* ---------- page furniture ---------- */
.page-head { margin: 8px 0 22px; }
.page-head__row { display: flex; gap: 16px; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; }
.page-head h1 { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head__sub { margin: .5em 0 0; color: var(--muted); max-width: 70ch; }
.page-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { display: flex; gap: 6px; flex-wrap: wrap; font-size: .86rem; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin: 0 0 18px; }
.tab { padding: 8px 12px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .92rem; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; }
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); border-color: var(--primary); }
.kind-switch { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 999px; margin: 0 0 18px; flex-wrap: wrap; }
.kind-switch__item { padding: 6px 14px; border-radius: 999px; text-decoration: none; color: var(--text-2); font-weight: 600; font-size: .9rem; }
.kind-switch__item.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.result-line { color: var(--muted); font-size: .9rem; margin: 0 0 12px; }
.pagination { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 24px 0; flex-wrap: wrap; }
.page-link { font-weight: 600; text-decoration: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); }
.page-info { color: var(--muted); font-size: .9rem; }
.empty { text-align: center; padding: 32px 16px; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface); }
.empty h3 { color: var(--text); margin-bottom: .3em; }
.empty__icon { width: 34px; height: 34px; margin: 0 0 8px; color: var(--border-strong); }
.empty-inline { color: var(--muted); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); margin: 0 0 16px; }
.notice .i { margin-top: .2em; }
.notice--warn { background: var(--warn-soft); border-color: transparent; color: var(--warn-ink); }
.notice--error { background: var(--danger-soft); border-color: transparent; color: var(--danger-ink); }
.notice--guest { background: var(--primary-soft); border-color: transparent; }
.flashes { display: grid; gap: 8px; margin: 12px 0 16px; }
.flash { margin: 0; padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 550; background: var(--surface-2); border-left: 4px solid var(--muted); }
.flash--ok { background: var(--ok-soft); border-color: var(--ok); color: var(--ok-ink); }
.flash--error { background: var(--danger-soft); border-color: var(--danger); color: var(--danger-ink); }
.flash--info { background: var(--offer-soft); border-color: var(--offer); color: var(--offer-ink); }
.announcement { background: var(--text); color: var(--surface); text-align: center; padding: 8px 16px; font-size: .9rem; font-weight: 550; }
.preview-banner { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 8px 16px; background: var(--warn); color: #2b1d00; font-size: .9rem; }
.preview-banner .btn { background: #fff; color: #2b1d00; border-color: transparent; }
.preview-banner .btn--ghost { background: transparent; color: #2b1d00; text-decoration: underline; }
.details { display: grid; gap: 0; margin: 0; }
.details > div { display: grid; grid-template-columns: minmax(110px, 30%) 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.details > div:last-child { border-bottom: 0; }
.details dt { color: var(--muted); font-size: .88rem; font-weight: 600; }
.details dd { margin: 0; min-width: 0; }
.stat-tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); margin: 0 0 24px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat dt { color: var(--muted); font-size: .82rem; font-weight: 600; }
.stat dd { margin: 4px 0 0; font-size: 1.7rem; font-weight: 750; letter-spacing: -.02em; }
.stat dd a { color: var(--text); text-decoration: none; }
.stat dd a:hover { color: var(--primary); }
.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.post-list li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.post-list li:last-child { border-bottom: 0; }
.post-list p { margin: 2px 0 0; font-size: .9rem; color: var(--muted); }
.post-list a { text-decoration: none; }
.post-list .is-unread { font-weight: 600; }
.ticks { padding-left: 1.2em; } .ticks li { margin-bottom: .4em; }
.report { margin-top: 12px; font-size: .86rem; color: var(--muted); }
.report summary { cursor: pointer; display: inline-flex; align-items: center; list-style: none; }
.report summary::-webkit-details-marker { display: none; }
.report__form { display: grid; gap: 8px; max-width: 420px; margin-top: 8px; padding: 12px; background: var(--surface-2); border-radius: var(--radius-sm); }
.report__form label { display: grid; gap: 4px; }

/* ---------- tables ---------- */
.data-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .92rem; }
.data-table--compact { min-width: 0; }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table thead th { background: var(--surface-2); color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; white-space: nowrap; }
.data-table tbody tr:last-child td, .data-table tbody tr:last-child th { border-bottom: 0; }
.data-table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .actions { white-space: nowrap; text-align: right; }
.data-table .actions > * { margin-left: 4px; }
.data-table__title { display: block; font-weight: 650; color: var(--text); text-decoration: none; margin-top: 4px; }
.data-table__title:hover { color: var(--primary); }
.data-table span.muted { display: block; font-size: .84rem; }
.data-table td.muted { font-size: .86rem; }
.data-table .focus__item { font-size: .74rem; }
.data-table tr.is-demo td:first-child { box-shadow: inset 3px 0 0 var(--surface-3); }
.data-table tr.is-muted { opacity: .6; }
.data-table tr.is-urgent { background: var(--danger-soft); }
.data-table tr.is-good td { background: color-mix(in srgb, var(--ok-soft) 70%, transparent); }

/* ---------- forms ---------- */
.form { display: grid; gap: 4px; }
.form--narrow { max-width: 480px; }
.form__section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.form__section > h2 { font-size: 1.05rem; margin-bottom: 14px; }
.form__row { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.form__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.field { display: grid; gap: 6px; margin: 0 0 14px; min-width: 0; border: 0; padding: 0; }
.field > label, .field > legend, fieldset.field > legend { font-weight: 650; font-size: .92rem; padding: 0; }
.field small, legend small { font-weight: 400; color: var(--muted); }
.req { color: var(--danger); margin-left: 2px; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=search], input[type=url], input[type=number], input[type=date], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; font: inherit; font-size: 1rem; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); appearance: none; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.field__help { margin: 0; color: var(--muted); font-size: .84rem; }
.field__error { margin: 0; color: var(--danger-ink); font-size: .86rem; font-weight: 600; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.check { display: block; }
.check label, label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: .95rem; cursor: pointer; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--primary); flex: none; }
.chip-group__items { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-label { display: inline-flex; flex-direction: column; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-size: .9rem; line-height: 1.25; user-select: none; }
.chip-label small { font-size: .72rem; color: var(--muted); }
.chip-label:hover { border-color: var(--primary); }
.chip-input:checked + .chip-label { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.chip-input:checked + .chip-label small { color: color-mix(in srgb, var(--on-primary) 80%, transparent); }
.chip-input:focus-visible + .chip-label { box-shadow: var(--ring); }
.focus-matrix__grid { display: grid; gap: 6px 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.focus-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.focus-row__label { font-size: .92rem; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 999px; overflow: hidden; flex: none; }
.seg__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg__label { width: 34px; height: 30px; display: grid; place-items: center; cursor: pointer; font-weight: 700; font-size: .85rem; color: var(--muted); border-left: 1px solid var(--border); }
.seg__label--0 { border-left: 0; }
.seg__input:checked + .seg__label { background: var(--primary); color: var(--on-primary); }
.seg__input:checked + .seg__label--0 { background: var(--surface-3); color: var(--text-2); }
.seg__input:focus-visible + .seg__label { box-shadow: inset var(--ring); }
.money-range__row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.money-range__row input { width: 120px; flex: 0 1 120px; }
.money-range__row select { width: 100px; flex: 0 0 100px; }
.filters { display: grid; gap: 12px; }
.filters label { display: grid; gap: 4px; font-size: .82rem; font-weight: 650; color: var(--muted); }
.filters label.check { display: flex; color: var(--text); font-size: .9rem; }
.filters__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.filters--bar, .filters--tt, form.filters:not(.filters--side) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); align-items: end; }
.filters--bar .filters__q { grid-column: 1 / -1; }
.chooser { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin-bottom: 24px; }
.chooser__item { text-decoration: none; color: var(--text); display: grid; gap: 8px; align-content: start; padding: 24px; transition: transform .15s, box-shadow .15s; }
.chooser__item:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--text); }
.chooser__icon { width: 36px; height: 36px; color: var(--primary); }
.chooser__item .btn { justify-self: start; }
.auth { max-width: 560px; margin: 0 auto; }

/* ---------- account menu ---------- */
.account { position: relative; }
.account > summary { list-style: none; cursor: pointer; }
.account > summary::-webkit-details-marker { display: none; }
.account__chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); max-width: 260px; }
.account__chip:hover { border-color: var(--border-strong); }
.account__name { font-weight: 650; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account__tier { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 6px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.tier--guest { background: var(--warn-soft); color: var(--warn-ink); }
.tier--verified { background: var(--ok-soft); color: var(--ok-ink); }
.tier--tutor { background: var(--offer-soft); color: var(--offer-ink); }
.tier--admin { background: var(--text); color: var(--surface); }
.account__menu { position: absolute; right: 0; top: calc(100% + 8px); width: min(300px, calc(100vw - 32px)); background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 8px; z-index: 50; }
.account__head { font-size: .84rem; color: var(--muted); padding: 8px 10px; margin: 0 0 4px; border-bottom: 1px solid var(--border); }
.account__menu ul { list-style: none; margin: 0; padding: 0; }
.account__menu a, .account__menu button { display: flex; align-items: center; width: 100%; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font: inherit; font-size: .94rem; background: none; border: 0; cursor: pointer; text-align: left; }
.account__menu a:hover, .account__menu button:hover { background: var(--surface-2); }
.theme-switch { display: flex; gap: 4px; padding: 8px 10px 4px; border-top: 1px solid var(--border); margin-top: 4px; align-items: center; font-size: .8rem; color: var(--muted); }
.theme-switch button { width: auto; padding: 4px 8px; font-size: .8rem; border: 1px solid var(--border); border-radius: 999px; }
.theme-switch button[aria-pressed="true"] { background: var(--text); color: var(--surface); border-color: var(--text); }
.currency-form select { min-height: 34px; padding: 4px 26px 4px 10px; font-size: .86rem; font-weight: 600; width: auto; border-radius: 999px; background-position: calc(100% - 14px) 55%, calc(100% - 9px) 55%; }

/* ---------- side navigation (backends) ---------- */
.side-nav__title { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--muted); margin: 0 0 8px 10px; }
.side-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: center; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--text-2); font-weight: 550; font-size: .93rem; }
.side-nav a:hover { background: var(--surface-2); color: var(--text); }
.side-nav a.is-active { background: var(--primary-soft); color: var(--primary-hover); font-weight: 650; }
.side-nav a span:first-of-type { flex: 1; }
.backend { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .backend { grid-template-columns: 230px minmax(0, 1fr); } .backend .side-nav { position: sticky; top: 84px; align-self: start; } }
@media (max-width: 959px) {
  .backend .side-nav ul { display: flex; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .backend .side-nav a { white-space: nowrap; border: 1px solid var(--border); }
}

/* ---------- timetable ---------- */
.tt-nav { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 16px 0 10px; }
.tt-nav__views { display: inline-flex; gap: 4px; }
.tt-nav__step { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tt-nav__label { margin: 0 6px; font-size: 1.1rem; }
.tt-nav__tz { margin: 0; font-size: .84rem; color: var(--muted); display: flex; align-items: center; }
.tt-summary { display: flex; gap: 16px; flex-wrap: wrap; margin: 0 0 10px; font-size: .92rem; }
.tt-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.tt { border-collapse: separate; border-spacing: 2px; width: 100%; min-width: 720px; table-layout: fixed; font-size: .8rem; }
.tt th { font-weight: 650; color: var(--muted); padding: 6px 4px; background: var(--surface); }
.tt thead th { position: sticky; top: 0; z-index: 2; }
.tt thead th.is-today { color: var(--primary); }
.tt-corner, .tt-hour { width: 58px; }
.tt-hour { position: sticky; left: 0; z-index: 1; text-align: right; font-variant-numeric: tabular-nums; }
.tt-dow { display: block; text-transform: uppercase; letter-spacing: .06em; font-size: .7rem; }
.tt-date { display: block; color: var(--text); font-size: .9rem; }
.tt-cell { height: 52px; padding: 0; border-radius: 6px; background: var(--surface-2); vertical-align: top; }
.tt-cell.is-today { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 40%, transparent); }
.tt-cell.is-past { background: transparent; opacity: .5; }
.tt-cell.heat-1 { background: color-mix(in oklab, var(--primary) 10%, var(--surface)); }
.tt-cell.heat-2 { background: color-mix(in oklab, var(--primary) 20%, var(--surface)); }
.tt-cell.heat-3 { background: color-mix(in oklab, var(--primary) 32%, var(--surface)); }
.tt-cell.heat-4 { background: color-mix(in oklab, var(--primary) 46%, var(--surface)); }
.tt-link { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 4px 6px; text-decoration: none; color: var(--text); border-radius: 6px; }
.tt-link:hover { box-shadow: inset 0 0 0 2px var(--primary); }
.tt-add { display: grid; place-items: center; height: 100%; color: transparent; text-decoration: none; font-size: 1.1rem; border-radius: 6px; }
.tt-add:hover, .tt-add:focus { color: var(--primary); background: var(--primary-soft); }
.tt-sum { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; line-height: 1.15; min-width: 0; }
.tt-sum b { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; white-space: nowrap; }
.tt-sum b::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--offer); flex: none; }
.tt-sum--want b::before { background: var(--request); border-radius: 50%; }
.tt-sum small { color: var(--text-2); font-size: .72rem; white-space: nowrap; }
.tt--month .tt-day { height: 96px; padding: 0; vertical-align: top; background: var(--surface-2); border-radius: 8px; }
.tt--month .tt-day.is-out { opacity: .45; }
.tt--month .tt-day.is-today { box-shadow: inset 0 0 0 2px var(--primary); }
.tt-day__link { display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 6px 8px; text-decoration: none; color: var(--text); border-radius: 8px; }
.tt-day__link:hover { background: var(--primary-soft); }
.tt-day__num { font-weight: 750; font-size: .95rem; }
.tt-legend { font-size: .82rem; color: var(--muted); margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tt-legend .tt-sum { display: inline-flex; }
.tt-more { margin: 8px 0 0; font-size: .86rem; }
.tt--pick { min-width: 560px; }
.tt--pick td { padding: 0; height: 30px; }
.tt--pick tbody th { position: sticky; left: 0; z-index: 1; font-variant-numeric: tabular-nums; }
.tt--pick tr.is-night th, .tt--pick tr.is-night td { opacity: .55; }
.pick { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick + label { display: block; height: 28px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; }
.pick + label:hover { border-color: var(--primary); }
.pick:checked + label { background: var(--primary); border-color: var(--primary); }
.pick:focus-visible + label { box-shadow: var(--ring); }
.week-pick legend { margin-bottom: 8px; }
.slot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.slot-list li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.slot-list li:last-child { border-bottom: 0; }
.slot-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.slot-row { display: flex; gap: 16px; justify-content: space-between; align-items: center; flex-wrap: wrap; padding: 14px 16px; }
.slot-row__main { display: grid; gap: 6px; min-width: 0; }
.slot-row__time { margin: 0; font-weight: 750; font-size: 1.05rem; }
.slot-row__side { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.slot-row .muted { margin: 0; font-size: .88rem; }
.claims { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.claim { display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.claim--accepted { border-color: var(--ok); background: var(--ok-soft); }
.claim--declined, .claim--withdrawn { opacity: .6; }
.claim__meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 6px 0 0; font-size: .86rem; }
.claim__msg { margin: 6px 0 0; font-size: .92rem; color: var(--text-2); }
.claim__actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.owner { display: grid; gap: 10px; align-content: start; }
@media (min-width: 900px) { .detail > .owner { position: sticky; top: 84px; } }
.owner__head { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--text); }
.owner__head span { display: grid; }
.owner__head small { color: var(--muted); }
.owner__badges, .owner__headline { margin: 0; }
.owner__headline { font-size: .92rem; color: var(--text-2); }
.owner__facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .88rem; color: var(--text-2); }
.owner__actions { display: grid; gap: 8px; }
.contact { display: grid; gap: 8px; }

/* ---------- messages, community, articles, profile ---------- */
.threads { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.thread a { display: flex; gap: 12px; align-items: center; padding: 12px 14px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--border); }
.thread:last-child a { border-bottom: 0; }
.thread a:hover { background: var(--surface-2); }
.thread__text { display: grid; flex: 1; min-width: 0; }
.thread__text .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .9rem; }
.thread__meta { font-size: .8rem; color: var(--muted); display: grid; justify-items: end; gap: 4px; }
.thread.is-unread strong { color: var(--primary); }
.chat { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.chat__msg { max-width: min(80%, 620px); }
.chat__msg.is-mine { justify-self: end; }
.chat__bubble { background: var(--surface); border: 1px solid var(--border); border-radius: 16px 16px 16px 4px; padding: 10px 14px; }
.chat__bubble p:last-child { margin: 0; }
.is-mine .chat__bubble { background: var(--primary-soft); border-color: transparent; border-radius: 16px 16px 4px 16px; }
.chat__meta { font-size: .76rem; color: var(--muted); margin: 4px 6px 0; }
.is-mine .chat__meta { text-align: right; }
.chat__form { display: grid; gap: 8px; }
.sections { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin-bottom: 24px; }
.section-card { text-decoration: none; color: var(--text); display: grid; gap: 6px; align-content: start; }
.section-card:hover { border-color: var(--primary); color: var(--text); }
.section-card p { margin: 0; color: var(--text-2); font-size: .92rem; }
.post-items { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.post-item { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.post-item:last-child { border-bottom: 0; }
.post-item__title { font-weight: 680; text-decoration: none; color: var(--text); font-size: 1.02rem; }
.post-item__title:hover { color: var(--primary); }
.post-item__excerpt { margin: 4px 0; color: var(--text-2); font-size: .92rem; }
.post-item__meta { margin: 0; color: var(--muted); font-size: .82rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.new-post { margin-bottom: 18px; }
.new-post > summary { cursor: pointer; font-weight: 650; display: flex; align-items: center; color: var(--primary); }
.new-post[open] > summary { margin-bottom: 12px; }
.topic__head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.topic__head p { margin: 0; font-size: .82rem; }
.reply-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.article-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.article-card h2 a { color: var(--text); text-decoration: none; }
.article-card h2 a:hover { color: var(--primary); }
.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.4em; } .prose h3 { margin-top: 1.2em; }
.prose ul, .prose ol { padding-left: 1.3em; } .prose li { margin-bottom: .3em; }
.prose blockquote { margin: 1em 0; padding: 8px 16px; border-left: 4px solid var(--primary); background: var(--surface-2); border-radius: 0 8px 8px 0; }
.prose blockquote p { margin: 0; }
.prose--page { margin: 0 auto 32px; }
.card.prose { max-width: none; }
.card.prose > h2:first-child { margin-top: 0; }
.profile { margin-bottom: 24px; }
.profile__head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.profile__head h1 { margin: 0; }
.profile__head > div:nth-child(2) { flex: 1; min-width: 200px; }
.profile__head p { margin: 2px 0; }
.profile__headline { color: var(--text-2); }
.avatar-edit__row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.avatar-form { display: grid; gap: 8px; justify-items: start; }
.note-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.note-list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.note-list li:last-child { border-bottom: 0; }
.note-list li.is-unread { background: var(--primary-soft); }
.note-list .muted { font-size: .82rem; }
.quick .btn-row { margin-top: 8px; }
.verify--verified { border-color: var(--ok); }
.verify--pending { border-color: var(--warn); }
.error-page { max-width: 640px; margin: 40px auto; text-align: center; }
.error-page .page-head__row { justify-content: center; }
.error-page .kicker { justify-content: center; }
pre.mail { white-space: pre-wrap; font-size: .82rem; max-width: 60ch; }

/* ---------- tools ---------- */
.tool-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.tool { text-decoration: none; color: var(--text); display: grid; gap: 8px; align-content: start; justify-items: start; }
.tool:hover { border-color: var(--primary); color: var(--text); }
.tool p { margin: 0; color: var(--text-2); font-size: .92rem; }
.tool.is-soon { opacity: .75; }
.tool__icon { width: 30px; height: 30px; color: var(--primary); margin: 0; }
.tz-table td small, .tz-table th small { display: block; color: var(--muted); font-size: .72rem; font-weight: 500; text-transform: none; letter-spacing: 0; }
.tz-table td { font-variant-numeric: tabular-nums; font-weight: 600; }
.tz-table td.is-night { color: var(--muted); font-weight: 400; background: var(--surface-2); }

/* ---------- charts (stats) ---------- */
.viz { margin: 0; }
.viz-card .muted { font-size: .9rem; }
.viz-legend { display: flex; gap: 16px; list-style: none; padding: 0; margin: 0 0 12px; font-size: .84rem; color: var(--text-2); flex-wrap: wrap; }
.viz-legend li { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 3px; background: var(--series-1); display: inline-block; }
.sw--2 { background: var(--series-2); }
.bars { display: grid; gap: 10px; }
.bars__row { display: grid; grid-template-columns: minmax(90px, 32%) 1fr; gap: 10px; align-items: center; }
.bars__label { font-size: .86rem; color: var(--text-2); text-align: right; line-height: 1.2; }
.bars__pair { display: grid; gap: 2px; }
.bar-line { display: flex; align-items: center; gap: 6px; min-height: 12px; }
.bar { display: block; height: 12px; min-width: 2px; border-radius: 0 4px 4px 0; background: var(--series-1); cursor: default; }
.bar--2 { background: var(--series-2); }
.bar:hover, .bar:focus-visible { filter: brightness(1.12); }
.bar__val { font-size: .78rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.db { display: grid; gap: 4px; }
.db__row { display: grid; grid-template-columns: minmax(90px, 32%) 1fr; gap: 10px; align-items: center; min-height: 28px; }
.db__label { font-size: .86rem; color: var(--text-2); text-align: right; line-height: 1.2; }
.db__track { position: relative; height: 24px; border-bottom: 1px solid var(--grid); margin-right: 12px; }
.db__line { position: absolute; top: 11px; height: 2px; background: var(--viz-muted); opacity: .6; }
.db__dot { position: absolute; top: 6px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--series-1); box-shadow: 0 0 0 2px var(--surface); cursor: default; }
.db__dot--2 { background: var(--series-2); }
.db__dot::after { content: ""; position: absolute; inset: -6px; }
.db__dot:hover, .db__dot:focus-visible { transform: scale(1.25); }
.db__axis .db__track { border-bottom: 0; height: 18px; }
.db__tick { position: absolute; top: 0; transform: translateX(-50%); font-size: .72rem; color: var(--viz-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.viz-table { margin-top: 12px; font-size: .86rem; }
.viz-table summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.viz-table .table-wrap { margin-top: 8px; }
.viz--heat figcaption { font-weight: 650; font-size: .92rem; margin-bottom: 8px; }
.heat { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 2px; font-size: .66rem; color: var(--viz-muted); }
.heat__hour { text-align: left; font-variant-numeric: tabular-nums; }
.heat__day { align-self: center; color: var(--text-2); font-size: .72rem; }
.heat__cell { display: block; aspect-ratio: 1; min-height: 10px; border-radius: 3px; background: var(--surface-2); }
.heat__cell:focus-visible, .heat__cell:hover { outline: 2px solid var(--text); outline-offset: -1px; }
.heat--1 .l1, .heat__scale .l1 { background: color-mix(in oklab, var(--series-1) 18%, var(--surface)); }
.heat--1 .l2, .heat__scale .l2 { background: color-mix(in oklab, var(--series-1) 36%, var(--surface)); }
.heat--1 .l3, .heat__scale .l3 { background: color-mix(in oklab, var(--series-1) 56%, var(--surface)); }
.heat--1 .l4, .heat__scale .l4 { background: color-mix(in oklab, var(--series-1) 76%, var(--surface)); }
.heat--1 .l5, .heat__scale .l5 { background: var(--series-1); }
.heat--2 .l1 { background: color-mix(in oklab, var(--series-2) 18%, var(--surface)); }
.heat--2 .l2 { background: color-mix(in oklab, var(--series-2) 36%, var(--surface)); }
.heat--2 .l3 { background: color-mix(in oklab, var(--series-2) 56%, var(--surface)); }
.heat--2 .l4 { background: color-mix(in oklab, var(--series-2) 76%, var(--surface)); }
.heat--2 .l5 { background: var(--series-2); }
.viz--heat:has(.heat--2) .heat__scale .l1 { background: color-mix(in oklab, var(--series-2) 18%, var(--surface)); }
.viz--heat:has(.heat--2) .heat__scale .l2 { background: color-mix(in oklab, var(--series-2) 36%, var(--surface)); }
.viz--heat:has(.heat--2) .heat__scale .l3 { background: color-mix(in oklab, var(--series-2) 56%, var(--surface)); }
.viz--heat:has(.heat--2) .heat__scale .l4 { background: color-mix(in oklab, var(--series-2) 76%, var(--surface)); }
.viz--heat:has(.heat--2) .heat__scale .l5 { background: var(--series-2); }
.heat__scale { display: flex; align-items: center; gap: 3px; font-size: .74rem; color: var(--muted); margin: 8px 0 0; }
.heat__scale .heat__cell { width: 14px; min-height: 14px; }
.heat__scale span { margin: 0 4px; }
#viz-tip { position: fixed; z-index: 90; pointer-events: none; background: var(--text); color: var(--surface); padding: 6px 10px; border-radius: 8px; font-size: .8rem; font-weight: 600; box-shadow: var(--shadow-lg); max-width: 260px; }

/* ---------- admin: layout cards with wireframes ---------- */
.layout-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin-bottom: 24px; }
.layout-card.is-active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft), var(--shadow); }
.layout-card .h3 { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.wf { position: relative; height: 150px; border-radius: 10px; overflow: hidden; display: grid; gap: 5px; padding: 8px; }
.wf i { display: block; border-radius: 4px; }
.wf--agora { background: #f6f7f9; grid-template-columns: 1fr 1fr; grid-template-rows: 12px 44px 1fr 18px; }
.wf--agora .wf-bar { grid-column: 1 / -1; background: #fff; box-shadow: 0 1px 0 #e1e6ed; }
.wf--agora .wf-hero { grid-column: 1 / -1; background: linear-gradient(90deg, #0f6e6e 60%, #e2f2f0 60%); }
.wf--agora .wf-col { background: #fff; border-top: 3px solid #2a78d6; }
.wf--agora .wf-col + .wf-col { border-top-color: #eb6834; }
.wf--agora .wf-strip { grid-column: 1 / -1; background: repeating-linear-gradient(90deg, #fff 0 13%, #f6f7f9 13% 14.3%); }
.wf--noticeboard { background: #b98f60; grid-template-columns: repeat(3, 1fr) 0.8fr; grid-template-rows: 22px 10px 1fr; }
.wf--noticeboard .wf-mast { grid-column: 1 / -1; background: #fffaf0; }
.wf--noticeboard .wf-tabs { grid-column: 1 / -1; background: repeating-linear-gradient(90deg, #f3e3c4 0 14%, transparent 14% 16%); }
.wf--noticeboard .wf-note { background: #fff6c9; transform: rotate(-2deg); box-shadow: 0 2px 3px rgb(0 0 0 / .25); }
.wf--noticeboard .wf-note:nth-child(4) { background: #e7f0fc; transform: rotate(2deg); }
.wf--noticeboard .wf-side { background: #fffaf0; }
.wf--studio { background: #0f141b; grid-template-columns: 22% 1fr 1fr 1fr; grid-template-rows: 22px 1fr 34px; }
.wf--studio .wf-sidebar { grid-row: 1 / -1; background: #161d27; }
.wf--studio .wf-kpi { background: #1d2632; }
.wf--studio .wf-grid { grid-column: 2 / -1; background: repeating-linear-gradient(90deg, #2a4a6b 0 6%, #1d2632 6% 7%, #6b3a22 7% 11%, #1d2632 11% 12%); }
.wf--studio .wf-table { grid-column: 2 / -1; background: repeating-linear-gradient(180deg, #1d2632 0 6px, #161d27 6px 8px); }

/* ---------- footer links ---------- */
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.footer-links a { color: inherit; text-decoration: none; opacity: .85; }
.footer-links a:hover { opacity: 1; text-decoration: underline; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print { .ag-header, .nb-masthead, .st-sidebar, .st-topbar, footer, .report, form { display: none !important; } body { background: #fff; } }
