/*
 * Be AI Intelligence Platform - live
 * Loaded after app.css and skin.css (both from the demo, unchanged). Only the pieces the live
 * service adds: sign-in screens, two-step set-up, notices, coming-next entries and small helpers.
 * An area's own styles go in public/css/areas/<area>.css.
 */

/* ---------- frame additions ---------- */
.top .spacer { flex: 1 1 auto; }
.nav a.later { color: var(--faint); }
.nav a.later .n-ic { opacity: .6; }
.nav a .n-next { margin-left: auto; font: 600 9.5px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); border: 1px solid var(--stroke-2); border-radius: 5px; padding: 3px 5px; }
.app.side-min .nav a .n-next { display: none; }
.sd-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; margin-top: 10px; }
.sd-strip i { height: 4px; border-radius: 3px; display: block; }
.sheet-menu .sm-t .lk { font: 600 9.5px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }
.tabbar a, .tabbar button { min-width: 0; }

/* ---------- small helpers ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.btn.block { width: 100%; justify-content: center; }
.btn[aria-busy="true"] { opacity: .7; cursor: progress; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.lede { font-size: 16px; color: var(--text-2); margin: 8px 0 14px; max-width: 720px; }
.checks { display: flex; flex-direction: column; gap: 8px; }
.checks .row { align-items: flex-start; }
.checks .row span { overflow-wrap: anywhere; }
.check-row { gap: 10px; margin: 4px 0 12px; font-weight: 500; font-size: 13.5px; }
.check-row input { width: 18px; height: 18px; accent-color: #C63C1E; flex: none; }
.stack-form .btn { margin-top: 4px; }
.form-err { color: var(--t-crit); background: rgba(179, 38, 30, .08); border: 1px solid rgba(179, 38, 30, .25); border-radius: 10px; padding: 9px 12px; font-size: 13.3px; margin: 4px 0 12px; }
.data-loc { display: flex; align-items: center; gap: 8px; margin-top: calc(var(--gap) + 6px); color: var(--muted); font-size: 12.5px; }
.data-loc .ic { flex: none; color: var(--faint); }

/* ---------- notices, empty states, coming next ---------- */
.notice-card, .empty-hero { text-align: center; padding: clamp(24px, 4vw, 44px) clamp(16px, 4vw, 40px); }
.notice-card h2, .empty-hero h2 { font-size: clamp(20px, 2vw, 26px); margin: 12px 0 8px; }
.notice-card p, .empty-hero p { max-width: 620px; margin: 0 auto; }
.nc-ic { width: 52px; height: 52px; border-radius: 16px; display: inline-grid; place-items: center; color: var(--accent-t); background: rgba(216, 70, 38, .1); border: 1px solid rgba(216, 70, 38, .25); }
.nc-ic .ic { width: 24px; height: 24px; }
.next-card { padding: clamp(20px, 3.4vw, 40px); max-width: 860px; }
.next-card h1 { font-size: clamp(26px, 2.6vw, 36px); margin-top: 6px; }
.next-card .eyebrow { color: var(--mc); }

/* ---------- home tiles ---------- */
.area-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.area-tile { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; border: 1px solid var(--stroke); background: var(--glass); font-weight: 600; font-size: 13.3px; min-width: 0; transition: border-color .2s, background .2s; }
.area-tile:hover { border-color: var(--stroke-2); background: var(--glass-2); }
.area-tile .mod-ic { width: 36px; height: 36px; border-radius: 11px; }
.area-tile .mod-ic .ic { width: 18px; height: 18px; }
.area-tile span:last-child { min-width: 0; overflow-wrap: anywhere; }
.area-tile small { display: block; font: 500 11px/1.3 var(--f-mono); color: var(--faint); }
.area-tile.later { opacity: .7; }

/* ---------- people and roles ---------- */
.role-cards { margin-bottom: 14px; }
.role-card { padding: 12px; border-radius: 12px; background: var(--glass); border: 1px solid var(--stroke); }
.role-card b { display: block; font-size: 13.5px; }
.role-card span { font-size: 12.5px; color: var(--muted); }
.matrix-wrap { overflow-x: auto; max-width: 100%; border-radius: 12px; border: 1px solid var(--stroke); }
.tbl.matrix { min-width: 760px; }
.tbl.matrix th, .tbl.matrix td { font-size: 12.5px; padding: 8px 10px; }
.tbl.matrix th.c, .tbl.matrix td.c { text-align: center; }
.tbl.matrix tr.grp td { font: 600 10.5px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); background: var(--glass); padding-top: 12px; }
.tbl.matrix .yes { color: var(--t-low); display: inline-flex; }

/* ---------- one-time links ---------- */
.link-box { padding: 12px 14px; border-radius: 12px; background: var(--glass); border: 1px solid var(--stroke-2); }
.link-box code { font-size: 12.5px; overflow-wrap: anywhere; word-break: break-all; user-select: all; }

/* ---------- sign-in screens ---------- */
.auth-wrap { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 14px; padding: 28px 16px calc(28px + env(safe-area-inset-bottom)); }
.auth-wrap .aurora { position: fixed; }
.auth-card { position: relative; z-index: 1; width: 100%; max-width: 460px; padding: clamp(22px, 4vw, 34px); }
.auth-card h1 { font-size: clamp(24px, 3vw, 30px); margin-top: 18px; }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand img { height: 40px; width: auto; }
.auth-brand .portal-tag { font: 600 10px/1.2 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-t); padding: 4px 7px; border: 1px solid var(--stroke-2); border-radius: 6px; margin-left: auto; }
.auth-lede { margin-top: 8px; }
.auth-form { margin-top: 18px; }
.auth-form .field { margin-bottom: 14px; }
.auth-links { margin-top: 14px; display: flex; justify-content: center; }
.auth-small { font-size: 12.5px; margin-top: 16px; text-align: center; }
.auth-foot { position: relative; z-index: 1; font-size: 12px; color: var(--faint); text-align: center; }
.code-input { font: 500 20px/1 var(--f-mono) !important; letter-spacing: .2em; text-align: center; }

/* ---------- two-step set-up ---------- */
.steps { margin: 16px 0 10px; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.steps li::marker { color: var(--accent-t); font-weight: 700; }
.qr-wrap { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 6px 0 4px; }
.qr-box { width: 172px; height: 172px; flex: none; padding: 8px; border-radius: 14px; background: #fff; border: 1px solid var(--stroke-2); }
.qr-box svg { width: 100%; height: 100%; }
.qr-key { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.qr-key code { font-size: 13px; padding: 8px 10px; border-radius: 10px; background: var(--glass); border: 1px solid var(--stroke); overflow-wrap: anywhere; user-select: all; }
.codes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.codes-grid code { text-align: center; padding: 9px 6px; border-radius: 10px; background: var(--glass); border: 1px solid var(--stroke); font-size: 14px; letter-spacing: .04em; user-select: all; }

@media (max-width: 720px) {
	.qr-box { width: 156px; height: 156px; margin: 0 auto; }
	.qr-wrap { justify-content: center; }
	.auth-brand .portal-tag { font-size: 9px; }
}
.callout.good { background: rgba(39, 116, 46, .08); border-color: rgba(39, 116, 46, .3); }
[data-theme="dark"] .callout.good { background: rgba(159, 203, 126, .1); border-color: rgba(159, 203, 126, .3); }

/* Rows with a switch keep the switch beside the label on phones. */
.li.li-switch { flex-wrap: nowrap; }
.li.li-switch .li-main { flex: 1 1 auto; }
.li.li-switch .li-s { white-space: normal; }
@media (max-width: 720px) {
	/* A stacked table cell with several tags gets the whole row (table column option cls: 'c-wide'). */
	.tbl.stack td.c-wide { grid-column: 1 / -1; }
}

/* Te reo Māori vowels with macrons. Fraunces has the macron mark but not the finished letters, so browsers
   stack the mark over the wrong letter. These few characters come from a serif the device already has. */
@font-face { font-family: 'BA Macrons'; font-weight: 400 800; src: local('Georgia'), local('Noto Serif'), local('DejaVu Serif'), local('Times New Roman'); unicode-range: U+0100-017F, U+0304; }
:root { --f-display: 'BA Macrons', "Fraunces", Georgia, "Times New Roman", serif; }
