/*
  MotMeet portal - one stylesheet, one accent colour (the blue of the app and the join page), light and dark.
  No inline styles anywhere: the Content Security Policy allows this file and nothing else (docs/PORTAL.md section 4).
*/

/*
  The addresses' font (docs/CALLS.md section 2.2): JetBrains Mono, served by the website with its licence (/fonts/OFL.txt,
  Content/AddressFont.cs), the first family of --mono. Its address carries ?v= and the first 16 hex digits of the file's SHA-256
  (AddressFont.Version), so that it is kept a year; a test checks the two agree. Its code ligatures stay off wherever --mono is used.
*/
@font-face {
  font-family: "MotMeet Mono";
  src: url("/fonts/JetBrainsMono-Regular.woff2?v=a9cb1cd82332b23a") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --bg-soft: #f4f6fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #5a6479;
  --line: #e2e6ee;
  --accent: #2f6fde;
  --accent-strong: #2458b9;
  --accent-soft: #eaf1fd;
  --accent-text: #ffffff;
  --ok: #17803f;
  --ok-soft: #e6f5ec;
  --warn: #8f5a00;
  --warn-soft: #fff3d6;
  --danger: #b42318;
  --danger-soft: #fdeceb;
  --radius: 16px;
  --radius-small: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 12px 32px rgba(16, 24, 40, 0.07);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "MotMeet Mono", "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, "Courier New", monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151c;
    --bg-soft: #171c25;
    --card: #1c2230;
    --text: #e8ecf3;
    --muted: #a3adbf;
    --line: #2d3545;
    --accent: #5b93f0;
    --accent-strong: #7fabf5;
    --accent-soft: #1e2d4a;
    --accent-text: #0b1220;
    --ok: #5fcf8b;
    --ok-soft: #173427;
    --warn: #f0b64f;
    --warn-soft: #3a2d12;
    --danger: #f28b82;
    --danger-soft: #3d1d1b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1 0 auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.01em; }
h1 { font-size: 34px; }
h2 { font-size: 26px; }
h3 { font-size: 19px; }
p { margin: 0 0 14px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.mono { font-family: var(--mono); font-variant-ligatures: none; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.stack > * + * { margin-top: 16px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; z-index: 10; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---- Header and footer ------------------------------------------------ */

.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.header-row { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand svg { width: 30px; height: 30px; flex: none; }
.site-nav { display: flex; gap: 22px; }
.site-nav a { color: var(--muted); font-weight: 500; }
.site-nav a:hover, .site-nav a.active { color: var(--text); text-decoration: none; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.header-actions .link { color: var(--text); font-weight: 500; }

.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-small); font-weight: 600; }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; top: 48px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-small);
  box-shadow: var(--shadow); padding: 8px; display: flex; flex-direction: column; min-width: 200px; }
.menu-panel a { padding: 10px 12px; border-radius: 8px; color: var(--text); }
.menu-panel a:hover { background: var(--bg-soft); text-decoration: none; }

.site-footer { border-top: 1px solid var(--line); margin-top: 72px; padding: 28px 0 36px; color: var(--muted); font-size: 14px; }
.footer-row { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
.footer-row nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-left: auto; }
.footer-row a { color: var(--muted); }
.footer-row .languages { flex-basis: 100%; justify-content: flex-end; gap: 8px 16px; }
.footer-row .languages span { color: var(--text); font-weight: 600; }

/* ---- Buttons, badges, notices ----------------------------------------- */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; min-height: 44px; border-radius: var(--radius-small); border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center;
}
.button:hover { background: var(--accent-strong); border-color: var(--accent-strong); text-decoration: none; }
.button.secondary { background: transparent; color: var(--accent); border-color: var(--line); }
.button.secondary:hover { background: var(--accent-soft); }
.button.danger { background: transparent; color: var(--danger); border-color: var(--line); }
.button.danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.button.small { padding: 7px 14px; min-height: 36px; font-size: 14px; }
.button.large { padding: 15px 28px; min-height: 54px; font-size: 18px; border-radius: 12px; }
.button.block { display: flex; width: 100%; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.link-button:hover { text-decoration: underline; }
.link-button.danger { color: var(--danger); }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.off { background: var(--bg-soft); color: var(--muted); border: 1px solid var(--line); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }

.notice { border-radius: var(--radius-small); padding: 14px 16px; background: var(--accent-soft); border: 1px solid transparent; margin: 0 0 20px; }
.notice.ok { background: var(--ok-soft); color: var(--text); }
.notice.warn { background: var(--warn-soft); color: var(--text); }
.notice.danger { background: var(--danger-soft); color: var(--text); }
.notice p:last-child { margin-bottom: 0; }

/* ---- Cards, grids ------------------------------------------------------ */

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card h2 { font-size: 21px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.section { padding: 64px 0; }
.section.soft { background: var(--bg-soft); }
.section-title { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-title p { color: var(--muted); font-size: 18px; }

/* ---- Landing ----------------------------------------------------------- */

.hero { padding: 72px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: 52px; letter-spacing: -0.02em; margin-bottom: 18px; }
.hero h1 .accent { color: var(--accent); }
.hero .lead { font-size: 20px; color: var(--muted); max-width: 520px; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-note { margin-top: 14px; font-size: 14px; color: var(--muted); }

.app-mock { background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.app-mock-bar { display: flex; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.app-mock-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.app-mock-body { padding: 28px; display: grid; gap: 16px; }
.app-mock-title { font-weight: 700; font-size: 18px; }
.mock-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mock-action { border-radius: 16px; padding: 22px 18px; display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); }
.mock-action svg { width: 34px; height: 34px; }
.mock-action strong { font-size: 17px; }
.mock-action.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.mock-action.primary svg { color: var(--accent-text); }
.mock-action:not(.primary) svg { color: var(--accent); }
.mock-code { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px dashed var(--line); border-radius: 12px; padding: 12px 16px; }
.mock-code .code-text { font: 700 22px/1.2 var(--mono); font-variant-ligatures: none; letter-spacing: 2px; }
.mock-people { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.mock-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; }

.step-card { display: flex; gap: 18px; align-items: flex-start; }
.step-number { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 19px; }
.step-card h3 { margin-top: 8px; }
.step-card p { color: var(--muted); margin: 0; }

.feature svg { width: 36px; height: 36px; color: var(--accent); margin-bottom: 12px; }
.feature p { color: var(--muted); margin: 0; }

.company-band { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; }
.company-band ul { margin: 0 0 20px; padding-left: 20px; color: var(--muted); }
.price-tag { font-size: 44px; font-weight: 700; letter-spacing: -0.02em; }
.price-tag small { font-size: 16px; color: var(--muted); font-weight: 500; letter-spacing: 0; }

/* What it is for: the landing's four cards, and the page of each use (remote support, meetings, classes, companies). */
.use-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.use-grid > .card + .card { margin-top: 0; }
.use-card { display: flex; flex-direction: column; color: var(--text); padding: 24px; }
.use-card:hover { text-decoration: none; border-color: var(--accent); }
.use-card svg { width: 34px; height: 34px; color: var(--accent); margin-bottom: 12px; }
.use-card h3 { margin-bottom: 8px; }
.use-card p { color: var(--muted); flex: 1; margin-bottom: 16px; }
.use-card .more { color: var(--accent); font-weight: 600; }
.page-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }
.use-note { max-width: 760px; margin: 0 auto; text-align: center; }
.use-note p { color: var(--muted); }
@media (max-width: 960px) { .use-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .use-grid { grid-template-columns: 1fr; } }

/* ---- Pricing ----------------------------------------------------------- */

.page-head { padding: 56px 0 32px; text-align: center; }
.page-head p { color: var(--muted); font-size: 19px; max-width: 640px; margin: 0 auto; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: 880px; margin: 0 auto; }
.plan { display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--accent); }
.plan h2 { margin-bottom: 4px; }
.plan .price-tag { margin: 12px 0 4px; }
.plan ul { list-style: none; padding: 0; margin: 20px 0 28px; flex: 1; }
.plan li { padding: 7px 0 7px 30px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 14px; height: 8px; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); }
.faq { max-width: 760px; margin: 56px auto 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* ---- Download ---------------------------------------------------------- */

.download-card { max-width: 720px; margin: 0 auto; }
.download-head { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; }
.download-head svg { width: 56px; height: 56px; color: var(--accent); flex: none; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 24px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; }
.hash { font: 14px/1.5 var(--mono); font-variant-ligatures: none; word-break: break-all; }
.download-alt { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 20px; }
.download-alt h3 { margin-top: 0; }

/* ---- Code boxes and copy buttons --------------------------------------- */

.code-box { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--bg-soft); overflow: hidden; }
.code-box code { flex: 1; padding: 12px 14px; font: 15px/1.5 var(--mono); font-variant-ligatures: none; word-break: break-all; min-width: 0; }
.code-box .copy { border: 0; border-left: 1px solid var(--line); background: var(--card); color: var(--accent); font: inherit; font-weight: 600; padding: 0 16px; cursor: pointer; }
.code-box .copy:hover { background: var(--accent-soft); }
.copy { display: none; }
html.can-copy .copy { display: block; }
.token { font: 700 22px/1.4 var(--mono); font-variant-ligatures: none; letter-spacing: 1px; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; font: 17px/1.6 var(--mono); font-variant-ligatures: none; padding: 16px 20px; background: var(--bg-soft); border-radius: var(--radius-small); margin: 16px 0; }

/* ---- Forms ------------------------------------------------------------- */

.narrow { max-width: 460px; margin: 0 auto; padding: 56px 20px 0; width: 100%; }
.form-card h1 { font-size: 28px; }
.form-card .lead { color: var(--muted); margin-bottom: 24px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-size: 14px; color: var(--muted); margin-top: 6px; overflow-wrap: anywhere; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=search], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-small);
  background: var(--card); color: var(--text); font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
input.code-input { font: 600 24px/1.2 var(--mono); font-variant-ligatures: none; letter-spacing: 6px; text-align: center; }
/* A box that takes an address or a code: after the rule above, which would give it the page's font (docs/CALLS.md section 2.2). */
input.mono, textarea.mono { font-family: var(--mono); font-variant-ligatures: none; }
.checkbox { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.checkbox input { width: 18px; height: 18px; flex: none; }
.field-error, .validation-summary-errors { color: var(--danger); font-size: 14px; }
.validation-summary-errors ul { margin: 0 0 16px; padding-left: 18px; }
.form-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 18px; font-size: 15px; }
.inline-form { display: inline; }
.form-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.form-row .field { flex: 1 1 220px; margin-bottom: 0; }
.narrow.wide { max-width: 580px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.accent-icon { color: var(--accent); margin-bottom: 8px; }
.qr { display: inline-block; background: #fff; padding: 10px; border-radius: 12px; border: 1px solid var(--line); margin: 12px 0; line-height: 0; }
.qr svg { width: 200px; height: 200px; }
details summary { cursor: pointer; color: var(--accent); }
details[open] summary { margin-bottom: 10px; }
.faq details summary { color: var(--text); }

/* ---- Tables ------------------------------------------------------------ */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .sub { display: block; color: var(--muted); font-size: 13px; }
/* A table of several columns of words keeps its width on a phone and scrolls sideways, rather than one word a line. */
table.table.wide { min-width: 640px; }
.empty { text-align: center; padding: 36px 20px; color: var(--muted); }

/* ---- Console ----------------------------------------------------------- */

.console { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 36px; padding-top: 36px; }
.console-nav { position: sticky; top: 92px; align-self: start; }
.console-company { font-weight: 700; font-size: 17px; margin-bottom: 4px; overflow-wrap: anywhere; }
.console-nav nav { display: flex; flex-direction: column; gap: 2px; margin-top: 18px; }
.console-nav nav a { padding: 9px 12px; border-radius: 9px; color: var(--muted); font-weight: 500; }
.console-nav nav a:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.console-nav nav a.active { background: var(--accent-soft); color: var(--accent); }
.console-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.console-head h1 { font-size: 28px; margin-bottom: 4px; }
.console-head p { color: var(--muted); margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat .label { color: var(--muted); font-size: 14px; }
.stat .value { font-size: 24px; font-weight: 700; margin-top: 4px; }
.card + .card, .card + .table-wrap, .table-wrap + .card, .table-wrap + h2, .card + h2 { margin-top: 24px; }
h2.block-title { font-size: 20px; margin: 32px 0 12px; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 22px 48px; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; }
.user-chip { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.operator-mark { border: 1px dashed var(--warn); }

/* ---- Help -------------------------------------------------------------- */

.help-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; padding-top: 36px; }
.help-nav { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; }
.help-nav a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--muted); font-size: 15px; }
.help-nav a:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.help-nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.help-index { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.help-index a.card { color: var(--text); padding: 20px 22px; box-shadow: none; }
.help-index a.card:hover { border-color: var(--accent); text-decoration: none; }
.help-index a.card span { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }
.prose { max-width: 760px; }
.prose h2 { font-size: 23px; margin: 36px 0 12px; scroll-margin-top: 90px; }
.prose h3 { font-size: 19px; margin: 28px 0 10px; scroll-margin-top: 90px; }
.prose ul, .prose ol { padding-left: 24px; margin: 0 0 16px; }
.prose li { margin: 4px 0; }
.prose code { font: 0.9em var(--mono); font-variant-ligatures: none; background: var(--bg-soft); padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); }
.prose pre { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-small); padding: 14px 16px; overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--bg-soft); }
.prose blockquote { margin: 0 0 16px; padding: 4px 16px; border-left: 4px solid var(--accent); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

/* ---- Legal pages ------------------------------------------------------- */

.legal { max-width: 760px; margin: 0 auto; padding-top: 48px; }
.legal h2 { font-size: 21px; margin-top: 32px; }
.legal ul { padding-left: 22px; }

/* ---- Responsive -------------------------------------------------------- */

@media (max-width: 960px) {
  .hero-grid, .company-band { grid-template-columns: 1fr; gap: 36px; }
  .hero h1 { font-size: 42px; }
  .grid-3, .help-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .console, .help-layout { grid-template-columns: 1fr; gap: 20px; }
  .console-nav, .help-nav { position: static; max-height: none; }
  .console-nav nav { flex-direction: row; flex-wrap: wrap; }
  .help-nav { display: flex; flex-wrap: wrap; gap: 4px; }
}

@media (max-width: 720px) {
  h1 { font-size: 28px; }
  .site-nav, .header-actions .hide-small { display: none; }
  .menu { display: block; }
  .header-row { gap: 12px; }
  .hero { padding: 40px 0 32px; }
  .hero h1 { font-size: 34px; }
  .hero .lead { font-size: 18px; }
  .grid-2, .grid-3, .plans, .help-index, .stat-grid { grid-template-columns: 1fr; }
  .section { padding: 44px 0; }
  .card { padding: 22px 18px; }
  .mock-actions { grid-template-columns: 1fr 1fr; }
  .app-mock-body { padding: 18px; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
  .recovery-codes { grid-template-columns: 1fr; }
  .narrow { padding-top: 32px; }
  .table th, .table td { padding: 10px 12px; }
}
strong + .badge { margin-left: 8px; }
.section-tight { padding-top: 36px; }
.form-actions { margin-top: 16px; }
.grid-2 > .card + .card, .grid-3 > .card + .card, .plans > .card + .card { margin-top: 0; }
.hero h1 .accent { display: block; }

/* ---- Fixes after looking at every page -------------------------------- */

.page-narrow { max-width: 760px; margin: 0 auto; padding-top: 48px; }
.page-narrow.wide { max-width: 960px; }
.card > h2:first-child, .card > h1:first-child { margin-top: 0; }
.card + .stat-grid { margin-top: 24px; }
.help-index > .card + .card, .stat-grid > * + * { margin-top: 0; }
.form-card form .small { margin-top: 12px; }
.search-form { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; }
.search-form input { width: 260px; }
main:has(> .section:last-child) + .site-footer { margin-top: 0; }
@media (max-width: 960px) {
  .console, .help-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .search-form { width: 100%; }
  .search-form input { width: auto; flex: 1; }
}

/* ---- Promo codes, first steps, the download page's help -------------- */

.head-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.form-grid { gap: 0 24px; margin-bottom: 8px; }
.promo-box { border: 1px dashed var(--line); border-radius: var(--radius-small); padding: 14px 16px; margin: 18px 0; }
.promo-box summary { font-weight: 600; }
.promo-box form { margin-top: 4px; }
.promo-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.promo-form .form-row { align-items: stretch; }
.promo-form .form-row input { flex: 1 1 220px; width: auto; min-width: 0; }
.promo-form .field-error { display: block; margin-top: 6px; }
input.code-field { font-family: var(--mono); font-variant-ligatures: none; letter-spacing: 1px; text-transform: uppercase; }
input.code-field::placeholder { text-transform: none; letter-spacing: 0; }
.checklist > li p { margin: 2px 0 8px; }
.checklist > li.done::before { content: "\2713"; background: var(--ok-soft); color: var(--ok); }
.checklist > li.done > strong { color: var(--muted); }
.step-link { margin-left: 12px; }
.download-hint { margin: 10px 0 0; }
.plan-note { margin: 12px 0 0; }
.plan > .plan-note { margin: 0 0 14px; }
#windows-asks, #gateway, #zip { scroll-margin-top: 90px; }
.smartscreen-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 20px 0; }
.smartscreen-step { margin: 0; }
.smartscreen-step figcaption { margin-top: 10px; }
.smartscreen { background: #1c5fb0; color: #ffffff; border-radius: 8px; padding: 16px 18px 14px; min-height: 170px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.smartscreen-title { font-size: 19px; font-weight: 600; line-height: 1.25; }
.smartscreen-lines span { display: block; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.35); margin: 7px 0; }
.smartscreen-lines span + span { width: 65%; }
.smartscreen-link { align-self: flex-start; text-decoration: underline; font-weight: 600; border-radius: 3px; outline: 3px solid #ffd33d; outline-offset: 3px; }
.smartscreen-buttons { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.smartscreen-button { border: 1px solid rgba(255, 255, 255, 0.85); padding: 4px 14px; border-radius: 3px; font-size: 13px; white-space: nowrap; }
.smartscreen-button.primary { background: #ffffff; color: #1c5fb0; font-weight: 600; outline: 3px solid #ffd33d; outline-offset: 3px; }
@media (max-width: 720px) {
  .smartscreen-steps { grid-template-columns: 1fr; }
  .head-actions { width: 100%; }
}

/* ---- Gateway licenses and billing ------------------------------------- */

.card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-title-row h2 { margin: 0; }
.license-summary { font-size: 18px; margin: 0 0 12px; }
.license-list { list-style: none; padding: 0; margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--radius-small); }
.license-list li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.license-list li:last-child { border-bottom: 0; }
#licenses .table-wrap { margin-bottom: 16px; }
.buy-form input[type=number] { max-width: 160px; }
.batch-actions { align-items: center; gap: 8px; }
.batch-actions input[type=date] { width: auto; }
.pricing-example { max-width: 880px; margin: 24px auto 0; }
.pay-page h1 { margin-bottom: 8px; }

/* ---- The owner's dashboard, charts and gateway load ------------------- */

.operator-nav { display: flex; flex-wrap: wrap; gap: 2px 4px; margin: 0 0 28px; border-bottom: 1px solid var(--line); }
.operator-nav a { padding: 10px 14px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.operator-nav a:hover { color: var(--text); text-decoration: none; }
.operator-nav a.active { color: var(--accent); border-bottom-color: var(--accent); }
.dash-section { margin-top: 40px; }
.dash-section > h2 { font-size: 21px; margin-bottom: 4px; }
.dash-section > .section-note { color: var(--muted); margin: 0 0 16px; }
.stat-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.stat.hero .value { font-size: 48px; line-height: 1.1; }
.charts-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.chart { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 10px; }
.chart + .chart { margin-top: 16px; }
.charts-2 > .chart + .chart { margin-top: 0; }
.chart figcaption { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; margin-bottom: 8px; }
.chart-title { font-weight: 600; }
.chart-note { color: var(--muted); font-size: 14px; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-bar { fill: var(--accent); }
.chart-column:hover .chart-bar { fill: var(--accent-strong); }
.chart-hit { fill: transparent; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-baseline { stroke: var(--muted); stroke-width: 1; opacity: 0.5; }
.chart-ref { stroke: var(--warn); stroke-width: 1.5; }
.chart-text { fill: var(--muted); font: 11px var(--font); }
.chart-value { fill: var(--text); font-weight: 600; }
.chart-ref-label { fill: var(--warn); font-weight: 600; }
.chart-value, .chart-ref-label { paint-order: stroke; stroke: var(--card); stroke-width: 3px; stroke-linejoin: round; }
.chart-table { margin-top: 4px; }
.chart-table summary { font-size: 14px; }
.chart-table .table-wrap { margin-top: 8px; max-height: 320px; overflow-y: auto; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.table th.num { text-align: right; }
.meter { width: 100%; height: 8px; display: block; }
.meter-track { fill: var(--accent-soft); }
.meter-fill { fill: var(--accent); }
.meter-fill.warn { fill: var(--warn); }
.setup-steps { margin: 8px 0 0; padding-left: 22px; }
.setup-steps li { margin: 4px 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
/* Single sign-on's email domains (docs/PORTAL.md section 20.2): a block each, the TXT record at full width. */
.domain-list { list-style: none; margin: 12px 0 20px; padding: 0; display: grid; gap: 12px; }
.domain-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 14px 16px; min-width: 0; }
.domain-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.domain-name { overflow-wrap: anywhere; }
.domain-actions { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.domain-item .sub { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.domain-record { margin: 12px 0 6px; font-weight: 600; }
/* The console's API (docs/PORTAL.md section 21): the line over the new key's curl example. */
.try-it { margin: 16px 0 6px; }
#api-keys .table-wrap, #api-webhooks .table-wrap { margin-bottom: 24px; }
.mono.nowrap { overflow-wrap: normal; }
/* A list of switches under a heading: the legend reads as a label, the switches one under the other, no frame. */
fieldset.choices { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
fieldset.choices legend { padding: 0; margin-bottom: 8px; font-weight: 600; }
fieldset.choices .checkbox { display: flex; gap: 10px; margin: 8px 0; align-items: flex-start; font-weight: 500; }
fieldset.choices .checkbox input { margin-top: 3px; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.segmented a { padding: 6px 14px; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 500; }
.segmented a:hover { color: var(--text); text-decoration: none; }
.segmented a.active { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 960px) {
  .stat-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .charts-2, .stat-grid.four { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
}

/* ---- Your company's MotMeet (docs/PORTAL.md section 19) ----------------- */

.branding-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.branding-form h2 { margin-top: 28px; }
.branding-form h2:first-child { margin-top: 0; }
.branding-form .checkbox { margin: 10px 0; }
.branding-preview { position: sticky; top: 90px; }
.preview-svg { display: block; width: 100%; height: auto; }
.accent-row { display: flex; gap: 10px; align-items: center; }
.accent-row input[type=color] { width: 52px; height: 46px; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--card); cursor: pointer; }
.accent-row input[type=text] { max-width: 160px; }
.logo-now { margin: 4px 0 8px; line-height: 0; }
.logo-now img { max-width: 200px; height: 48px; object-fit: contain; }
.gateway-choices, .permission-choices { list-style: none; margin: 8px 0 12px; padding: 0; }
.gateway-choices li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.gateway-choices li:last-child { border-bottom: 0; }
.gateway-choices .checkbox { margin: 0; }
.gateway-choices .sub { display: block; margin-left: 28px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.permission-choices { padding-left: 28px; }
.permission-choices .checkbox { margin: 6px 0; }
#accent-suggestion { margin-top: 8px; }
@media (max-width: 960px) {
  .branding-layout { grid-template-columns: minmax(0, 1fr); }
  .branding-preview { position: static; }
}
