/* Clavis portal & console — Myra Calm Academic, the design system of MyraEDU
   (myra-edu/apps/web/src/styles/main.css), so every Myralith app reads as one
   family. Token values are copied from there; see docs/DESIGN.md §8.2. */
@font-face { font-family: "Plus Jakarta Sans"; src: url("fonts/plus-jakarta-sans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("fonts/plus-jakarta-sans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("fonts/plus-jakarta-sans-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  color-scheme: light;
  --canvas: #f7f6f2;
  --surface: #ffffff;
  --surface-soft: #f1f2ee;
  --surface-teal: #edf6f4;
  --surface-blue: #edf2f6;
  --surface-amber: #fbf2e9;
  --surface-danger: #f8eae8;
  --ink: #17232b;
  --ink-soft: #40515d;
  --muted: #6c7a82;
  --primary: #1f6f68;
  --primary-strong: #145b55;
  --primary-deep: #0d706c;
  --secondary: #28455c;
  --attention: #a85f27;
  --danger: #a13b37;
  --border: #dfe3df;
  --border-strong: #c8cfcb;
  --shadow: 0 12px 32px rgb(26 48 56 / 0.06);
  --shadow-card: 0 4px 20px rgb(26 48 56 / 0.025);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --topbar-height: 68px;
  --sidebar-width: 248px;
  --ease: 160ms ease;
  --font-heading: "Plus Jakarta Sans", Inter, sans-serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
html { -webkit-text-size-adjust: 100%; min-width: 320px; background: var(--canvas); }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--ink); font: 0.9rem/1.55 var(--font-body); font-synthesis: none; text-rendering: optimizeLegibility; }
button, input, textarea, select { font: inherit; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-strong); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 30%, transparent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--primary) 22%, white); color: var(--ink); }
h1, h2, h3 { font-family: var(--font-heading); letter-spacing: -0.02em; color: var(--ink); margin: 0 0 0.6rem; }
h1 { font-size: clamp(1.6rem, 2vw, 2.1rem); font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.12rem; font-weight: 700; line-height: 1.35; margin-top: 2rem; }
h3 { font-size: 1rem; line-height: 1.4; }
p { margin: 0 0 0.8rem; }
b, strong { font-weight: 650; }
code, .mono { font-family: var(--font-mono); font-size: 0.86em; }
.muted { color: var(--muted); }
.small { font-size: 0.8rem; }
.icon { flex: none; display: block; }

.skip-link { position: fixed; z-index: 200; top: 10px; left: 10px; padding: 10px 14px; border-radius: 8px; background: var(--ink); color: #fff; transform: translateY(-150%); transition: transform var(--ease); }
.skip-link:focus { transform: translateY(0); color: #fff; }

/* Brand mark: teal tile + wordmark, same build as MyraEDU's BrandMark. */
.brand { display: inline-flex; color: inherit; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark__symbol { display: grid; flex: none; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: var(--primary); color: #fff; box-shadow: 0 7px 16px color-mix(in srgb, var(--primary) 20%, transparent); }
.brand-mark__symbol svg { width: 28px; height: 28px; }
.brand-mark__text { display: grid; line-height: 1.15; min-width: 0; }
.brand-mark__word { color: var(--secondary); font: 750 1.08rem var(--font-heading); letter-spacing: -0.04em; }
.brand-mark__text small { color: var(--muted); font-size: 0.68rem; font-weight: 600; white-space: nowrap; }

.avatar { display: inline-grid; flex: none; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--surface-teal); color: var(--primary-strong); font: 700 0.8rem var(--font-heading); }

/* Console layout: light sidebar like MyraEDU's sidebar mode. */
.shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100vh; }
.shell > * { min-width: 0; }
.side { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; gap: 22px; padding: 22px 16px 16px; border-right: 1px solid #d8ddd9; background: #f0f1ed; }
.side .brand { padding: 0 8px; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; min-height: 44px; align-items: center; gap: 10px; padding: 0 12px; border-radius: 11px; color: #4c5d67; font-size: 0.86rem; font-weight: 550; text-decoration: none; transition: background var(--ease), color var(--ease); }
.nav a:hover { background: rgb(255 255 255 / 0.7); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--secondary); color: #fff; box-shadow: 0 7px 18px rgb(40 69 92 / 0.14); }
.who { display: flex; align-items: center; gap: 6px; margin-top: auto; padding: 10px 8px 10px 10px; border: 1px solid #d7dcda; border-radius: var(--radius); background: rgb(255 255 255 / 0.56); }
.who__id { display: flex; flex: 1; min-width: 0; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.who__id:hover { text-decoration: none; color: var(--primary-strong); }
.who__id > span:last-child { display: grid; min-width: 0; line-height: 1.3; }
.who__id strong { overflow: hidden; font-size: 0.8rem; text-overflow: ellipsis; white-space: nowrap; }
.who__id small { overflow: hidden; color: var(--muted); font-size: 0.7rem; text-overflow: ellipsis; white-space: nowrap; }
.who__id[aria-current] strong { color: var(--primary-strong); }
.who form { margin: 0; }
.main { padding: 32px 32px 64px; }

/* Portal layout: sticky translucent top bar like MyraEDU's shell. */
.topbar { position: sticky; z-index: 40; top: 0; display: flex; height: var(--topbar-height); align-items: center; gap: 28px; padding: 0 32px; border-bottom: 1px solid var(--border); background: rgb(247 246 242 / 0.92); backdrop-filter: blur(16px); }
.tnav { display: flex; gap: 4px; }
.tnav a { display: inline-flex; min-height: 40px; align-items: center; gap: 8px; padding: 0 13px; border-radius: 11px; color: var(--ink-soft); font-size: 0.84rem; font-weight: 600; text-decoration: none; transition: background var(--ease), color var(--ease); }
.tnav a .icon { width: 18px; height: 18px; }
.tnav a:hover { background: var(--surface-soft); color: var(--ink); }
.tnav a[aria-current="page"] { background: var(--surface-teal); color: var(--primary-strong); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 22%, transparent); }
.tuser { display: flex; align-items: center; gap: 8px; margin-left: auto; min-width: 0; }
.tuser form { margin: 0; }
.org-switch { display: inline-flex; min-height: 40px; max-width: 260px; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); color: var(--ink); font-size: 0.8rem; font-weight: 600; text-decoration: none; }
.org-switch span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-switch .icon { width: 16px; height: 16px; color: var(--muted); }
a.org-switch:hover { background: var(--surface-soft); color: var(--ink); text-decoration: none; }
.pmain { padding: 32px 32px 64px; }

/* Page header: eyebrow, title, description (MyraEDU's PageHeader). */
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 24px; }
.head > div:first-child { display: grid; gap: 4px; min-width: 0; }
.head h1 { margin: 0; }
.head p { margin: 0; }
.head > div:first-child > p:not(.eyebrow) { max-width: 760px; color: var(--muted); }
.eyebrow { margin: 0 0 4px; color: var(--primary); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.eyebrow a { color: inherit; }

/* Surfaces */
.card { padding: 20px 22px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.card > h2:first-child { margin-top: 0; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.stat-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.card.stat { display: flex; align-items: center; gap: 14px; padding: 18px; }
.stat-icon { display: grid; flex: none; width: 46px; height: 46px; place-items: center; border-radius: 13px; background: var(--surface-teal); color: var(--primary); }
.stat-icon.amber { background: var(--surface-amber); color: var(--attention); }
.stat-icon.blue { background: var(--surface-blue); color: var(--secondary); }
.stat-icon.red { background: var(--surface-danger); color: var(--danger); }
.stat .l { color: var(--ink-soft); font-size: 0.74rem; font-weight: 650; }
.stat .n { font: 750 1.55rem/1.2 var(--font-heading); letter-spacing: -0.02em; }
.stat .s { color: var(--muted); font-size: 0.72rem; }
.split { display: grid; gap: 16px; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); align-items: start; }
.split > * { min-width: 0; }
.split > div > h2:first-child { margin-top: 0; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0; }
dl.kv dt { padding-top: 2px; color: var(--muted); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
dl.kv dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-card); }
table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
th, td { padding: 12px 14px; border-top: 1px solid var(--border); text-align: left; vertical-align: top; }
th { border-top: 0; color: var(--ink-soft); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; }
tbody tr:first-child td { border-top: 1px solid var(--border); }
table:not(:has(thead)) tbody tr:first-child td { border-top: 0; }
tbody tr { transition: background var(--ease); }
tbody tr:hover { background: #fafaf8; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.num { font-family: var(--font-mono); font-size: 0.8rem; }
.empty { padding: 32px; color: var(--muted); text-align: center; }

/* Status pills */
.badge { display: inline-flex; min-height: 24px; align-items: center; gap: 5px; width: fit-content; padding: 0 9px; border-radius: 999px; background: var(--surface-soft); color: var(--ink-soft); font-size: 0.7rem; font-weight: 650; line-height: 1; white-space: nowrap; vertical-align: middle; }
.badge.ok { background: var(--surface-teal); color: var(--primary-strong); }
.badge.warn { background: var(--surface-amber); color: var(--attention); }
.badge.danger { background: var(--surface-danger); color: var(--danger); }
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--border-strong); vertical-align: middle; }
.dot.live { background: var(--primary); box-shadow: 0 0 0 3px var(--surface-teal); }

/* Forms */
form.stack { display: grid; gap: 14px; }
.stack-sm { display: grid; gap: 12px; }
.row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
label { display: grid; align-content: start; gap: 6px; color: var(--ink-soft); font-size: 0.78rem; font-weight: 650; }
label.check { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 0.84rem; font-weight: 500; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font-size: 0.86rem; font-weight: 400; transition: border-color var(--ease), box-shadow var(--ease);
}
input[type=file] { width: 100%; padding: 10px 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-soft); color: var(--ink-soft); font-size: 0.8rem; font-weight: 400; }
input[type=file]::file-selector-button { margin-right: 10px; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font: 600 0.76rem var(--font-body); cursor: pointer; }
textarea { min-height: 84px; padding: 10px 12px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent); }
input:disabled, input[readonly] { background: var(--surface-soft); color: var(--muted); }
::placeholder { color: #9aa5ab; }
.hint { color: var(--muted); font-size: 0.72rem; font-weight: 400; line-height: 1.45; }
fieldset { margin: 0; padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
legend { padding: 0 6px; font: 700 0.95rem var(--font-heading); }
.ent-row { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(0, 2fr); gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.ent-row:last-child { border-bottom: 0; }
.ent-row .opts { display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* Buttons */
button, .btn { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border: 1px solid transparent; border-radius: 11px;
  background: var(--primary); color: #fff; font: 650 0.82rem var(--font-body); text-decoration: none; cursor: pointer;
  transition: background var(--ease), border-color var(--ease), transform var(--ease); }
button:hover, .btn:hover { background: var(--primary-strong); color: #fff; text-decoration: none; }
button:active, .btn:active { transform: translateY(1px); }
button.secondary, .btn.secondary { border-color: var(--border-strong); background: var(--surface); color: var(--ink); }
button.secondary:hover, .btn.secondary:hover { background: var(--surface-soft); color: var(--ink); }
button.ghost, .btn.ghost { background: transparent; color: var(--ink-soft); }
button.ghost:hover, .btn.ghost:hover { background: var(--surface-soft); color: var(--ink); }
button.danger, .btn.danger { border-color: var(--border-strong); background: var(--surface); color: var(--danger); }
button.danger:hover, .btn.danger:hover { border-color: var(--danger); background: #fbeeed; color: var(--danger); }
button.small, .btn.small { min-height: 34px; padding: 0 12px; font-size: 0.74rem; }
button.icon-only { width: 40px; min-height: 40px; padding: 0; border-radius: 10px; }
button.wide { width: 100%; justify-content: space-between; }
button:disabled, button:disabled:hover { background: #d9ddda; border-color: transparent; color: #7b858a; cursor: not-allowed; transform: none; }
.btn.wide-btn { display: flex; width: 100%; margin-top: 12px; }
.btn.google img, button.google img { flex: none; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
form.inline { display: flex; align-items: center; gap: 6px; }
form.inline select, form.inline input { width: auto; min-height: 34px; }

/* Collapsible action panels */
details.action { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-card); }
details.action > summary { display: flex; min-height: 48px; align-items: center; gap: 10px; padding: 0 16px; border-radius: var(--radius); font-size: 0.86rem; font-weight: 650; list-style: none; cursor: pointer; }
details.action > summary::-webkit-details-marker { display: none; }
details.action > summary::after { content: ""; width: 7px; height: 7px; margin-left: auto; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform var(--ease); }
details.action[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
details.action > summary:hover { background: #fafaf8; }
details.action > form { padding: 2px 16px 16px; }
details.action.danger > summary { color: var(--danger); }
td details.action { box-shadow: none; }
td details.action > summary { min-height: 34px; padding: 0 10px; }

/* Notices */
.flash { display: block; margin-bottom: 20px; padding: 12px 14px; border: 1px solid transparent; border-radius: var(--radius-sm); font-size: 0.84rem; }
.flash.ok { background: var(--surface-teal); color: var(--primary-strong); }
.flash.err { border-color: #eccfcc; background: #fdf3f2; color: var(--danger); }
.flash a { color: inherit; text-decoration: underline; }
.secret { padding: 14px 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-soft); font: 500 1.1rem var(--font-mono); overflow-wrap: anywhere; user-select: all; }
.secret.small { font-size: 0.86rem; }
/* Shown at the PNG's own size (whole pixels per module, quiet zone included);
   squeezing it to a fixed box blurs the modules and phones fail to scan it. */
.qr { display: block; width: auto; max-width: 100%; height: auto; margin: 8px 0 16px; border-radius: var(--radius-sm); background: #fff; image-rendering: pixelated; }

/* Sign-in: form on the left, deep teal stage on the right (MyraEDU login). */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; background: var(--surface); }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 48px 32px; }
.auth-form__in { width: min(380px, 100%); }
.auth-form .brand { margin-bottom: 40px; }
.auth-form .eyebrow { color: var(--muted); }
.auth-form h1 { margin-bottom: 6px; font-size: 1.85rem; }
.auth-form h1 + p { color: var(--muted); }
.auth-form form.stack { margin-top: 22px; }
.auth-form form.stack > button { width: 100%; margin-top: 4px; }
.auth-form p.small { color: var(--muted); }
.auth-stage { position: relative; display: grid; overflow: hidden; place-items: center; padding: 48px; background: var(--primary-deep); color: #fff; text-align: center; }
.auth-stage--console { background: var(--secondary); }
.auth-stage::before { content: ""; position: absolute; top: -12%; left: 4%; width: 150%; aspect-ratio: 1; border: 64px solid rgb(255 255 255 / 0.05); border-radius: 50%; }
.auth-stage::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgb(255 255 255 / 0.16) 1px, transparent 1.6px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(115deg, transparent 35%, #000 75%); mask-image: linear-gradient(115deg, transparent 35%, #000 75%); }
.auth-stage__in { position: relative; z-index: 1; display: grid; justify-items: center; gap: 14px; max-width: 420px; }
.auth-stage__in::before { content: ""; position: absolute; z-index: -1; top: -40px; right: -90px; width: 300px; height: 300px; border: 1px solid rgb(255 255 255 / 0.22); border-radius: 50%; }
.auth-stage .eyebrow { margin: 0; color: rgb(255 255 255 / 0.82); }
.stage-mark { display: grid; width: 96px; height: 96px; margin: 18px 0 6px; place-items: center; border-radius: 28px; background: #fff; color: var(--primary-deep); box-shadow: 0 18px 40px rgb(0 0 0 / 0.18); }
.auth-stage--console .stage-mark { color: var(--secondary); }
.stage-mark svg { width: 66px; height: 66px; }
.auth-stage h2 { margin: 18px 0 0; color: #fff; font-size: clamp(1.5rem, 2.2vw, 2rem); font-weight: 750; line-height: 1.2; }
.auth-stage p { margin: 0; color: rgb(255 255 255 / 0.85); font-size: 0.88rem; }

/* Portal license cards */
.lic-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card.lic { display: grid; align-content: start; gap: 6px; }
a.card.lic { color: inherit; text-decoration: none; transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease); }
a.card.lic:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.lic-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.lic-tier { font: 700 1.2rem/1.25 var(--font-heading); letter-spacing: -0.02em; }
.card.lic form { margin-top: 8px; }
.price { font: 750 1.5rem/1.1 var(--font-heading); letter-spacing: -0.02em; }

/* Utilities (inline styles are blocked by the CSP) */
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.flush { margin-top: 0; }
.end { align-self: end; }
.nowrap { white-space: nowrap; }
.or { margin: 14px 0 0; text-align: center; }
.id-title { font: 500 1.4rem/1.25 var(--font-mono); letter-spacing: 0; overflow-wrap: anywhere; }

@media (max-width: 920px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-stage { display: none; }
}

/* Phones: header on top, a fixed bottom navigation like MyraEDU's. */
@media (max-width: 820px) {
  :root { --topbar-height: 62px; }
  .shell { display: block; }
  .side { position: sticky; z-index: 40; height: var(--topbar-height); flex-direction: row; align-items: center; justify-content: space-between; padding: 0 12px 0 16px; border-right: 0; border-bottom: 1px solid var(--border); background: var(--canvas); }
  .side .brand { padding: 0; }
  .who { margin: 0; padding: 0; border: 0; background: none; }
  .who__id { flex: none; }
  .who__id > span:last-child { display: none; }
  /* No backdrop-filter here: it would become the containing block of the
     fixed bottom navigation inside it. */
  .topbar { gap: 8px; padding: 0 12px 0 16px; background: var(--canvas); backdrop-filter: none; }
  .org-switch { max-width: 40vw; }
  .tuser .avatar { display: none; }
  .nav, .tnav { position: fixed; z-index: 45; right: 0; bottom: 0; left: 0; display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: rgb(255 255 255 / 0.96); backdrop-filter: blur(16px); }
  .nav a, .tnav a { min-height: 52px; flex-direction: column; justify-content: center; gap: 3px; padding: 0 2px; border-radius: 12px; font-size: 0.66rem; font-weight: 600; white-space: nowrap; }
  .nav a[aria-current="page"], .tnav a[aria-current="page"] { background: var(--surface-teal); color: var(--primary-strong); box-shadow: none; }
  .main, .pmain { padding: 22px 16px 104px; }
  .head { align-items: flex-start; }
  dl.kv { grid-template-columns: 1fr; gap: 2px; }
  dl.kv dd { margin-bottom: 10px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .ent-row { grid-template-columns: 1fr; }
  .auth-form { align-items: flex-start; padding: 40px 20px; }
}
@media (max-width: 380px) {
  .brand-mark__text small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  a.card.lic:hover { transform: none; }
}
