/* BAPC Dubigi design system.
   Built to the same standard as BAPC Rthasuly (thin glowing rims, glass panels with a soft top highlight, a 12-column
   dashboard grid, a display face, slim buttons) in the colours of Bryan's Dubigi visual: deep ocean blue, cyan glass and
   glossy orange. All artwork is Bryan's own, cut unchanged from docs/spec/owner-visual.png. Device fonts only.
   Text always sits on solid or near-solid surfaces (WCAG AA). Recording state is never shown by colour alone. */

:root {
  --abyss: #020913;
  --deep: #051a33;
  --glass: rgba(76, 160, 255, .08);
  --glass2: rgba(76, 160, 255, .15);
  --rim: rgba(140, 200, 255, .22);
  --rim2: rgba(150, 215, 255, .5);
  --snow: #eef6ff;
  --mist: #a9c4e2;
  --cyan: #4fd6ff;
  --cyan2: #b8ecff;
  --orange: #ff8a2a;
  --sun: #ffc53d;
  --rec: #ff4d4d;
  --ok: #5ff0b0;
  --warn: #ffd27a;
  --bad: #ff9a9a;
  --on-orange: #2a1100;
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --body: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --radius: 16px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --abyss: #eef5ff; --deep: #ffffff; --glass: rgba(11, 95, 214, .05); --glass2: rgba(11, 95, 214, .1);
  --rim: rgba(11, 95, 214, .2); --rim2: rgba(11, 95, 214, .45); --snow: #061a33; --mist: #3a5a82; --cyan: #0a6fc2; --cyan2: #0a4f99;
  --orange: #c95600; --sun: #9a6a00; --ok: #0a7a55; --warn: #8a5a00; --bad: #b42323; color-scheme: light;
}
@media (prefers-contrast: more) { :root { --rim: rgba(255, 255, 255, .6); --rim2: #fff; --mist: var(--snow); } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--abyss); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--snow); font: 16px/1.55 var(--body);
  background:
    radial-gradient(1000px 560px at -8% 4%, rgba(255, 138, 42, .16), transparent 62%),
    radial-gradient(1100px 600px at 105% -6%, rgba(79, 214, 255, .18), transparent 60%),
    linear-gradient(180deg, #04162c 0%, var(--abyss) 60%);
  background-attachment: fixed;
}
:root[data-theme="light"] body { background: radial-gradient(1000px 560px at -8% 4%, rgba(255, 138, 42, .12), transparent 62%), radial-gradient(1100px 600px at 105% -6%, rgba(79, 160, 255, .14), transparent 60%), var(--abyss); }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-weight: 800; font-size: clamp(2rem, 4.6vw, 3.2rem); }
h2 { font-weight: 700; font-size: 1.12rem; letter-spacing: .005em; }
h3 { font-weight: 650; font-size: 1rem; margin-bottom: 4px; }
p { margin: 0 0 1em; }
a { color: var(--cyan); }
a:hover { color: var(--cyan2); }
img, video, canvas { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--deep); color: var(--snow); padding: 8px 12px; border-radius: 8px; }
.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; }
.muted { color: var(--mist); }
.small { font-size: .86rem; }
.lead { color: var(--mist); max-width: 64ch; font-size: 1.04rem; }
.eyebrow { font: 700 .74rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--cyan2); margin: 0 0 8px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.hidden { display: none !important; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.wordmark { font-weight: 800; background: linear-gradient(90deg, #6fd8ff, var(--cyan) 40%, var(--sun) 62%, var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent; }
kbd { font: 700 .85rem ui-monospace, "Cascadia Mono", Consolas, monospace; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--rim2); background: var(--glass); }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; min-height: 64px; padding: 0 max(20px, calc((100vw - 1280px) / 2 + 20px));
  background: rgba(2, 12, 26, .76); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--rim); flex-wrap: wrap; }
:root[data-theme="light"] .topbar { background: rgba(255, 255, 255, .88); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--snow); text-decoration: none; font: 700 1.05rem/1 var(--display); }
.brand > img:first-child { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 0 0 1px var(--rim), 0 0 14px rgba(79, 214, 255, .35); }
.brand img.brand-wordmark { width: auto; height: 30px; -webkit-mask-image: radial-gradient(ellipse 62% 70% at 50% 50%, #000 70%, transparent 100%); mask-image: radial-gradient(ellipse 62% 70% at 50% 50%, #000 70%, transparent 100%); }
.tabs, .site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav { margin-left: auto; }
.tabs button, .site-nav a { white-space: nowrap; min-height: 38px; padding: 8px 14px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--mist);
  font: 500 .93rem var(--body); text-decoration: none; cursor: pointer; }
.tabs button:hover, .site-nav a:hover { color: var(--snow); background: var(--glass); }
.tabs button[aria-selected="true"], .site-nav a[aria-current="page"] { color: var(--snow); background: var(--glass2); border-color: var(--rim); }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--rim); background: var(--glass); color: var(--snow); cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- buttons ---------- */
.btn { --b: rgba(79, 214, 255, .07); --c: var(--snow); position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 18px;
  border-radius: 10px; border: 1px solid var(--rim2); background: var(--b); color: var(--c); font: 600 .95rem var(--body); text-decoration: none; cursor: pointer; transition: background .15s, box-shadow .15s, transform .1s; }
.btn:hover { background: rgba(79, 214, 255, .15); color: var(--c); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.orange, .btn.primary { --c: var(--on-orange); background: linear-gradient(180deg, #ffc27a 0%, var(--orange) 55%, #e86a0c 100%); border-color: #ffc98a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 0 22px rgba(255, 138, 42, .35); }
.btn.orange:hover, .btn.primary:hover { background: linear-gradient(180deg, #ffd29a 0%, #ff9a40 55%, #f07a1c 100%); color: var(--on-orange); }
.btn.sun { --c: #241700; background: linear-gradient(180deg, #ffe08a, var(--sun) 60%, #e8a400); border-color: #ffe7a6; }
.btn.sun:hover { background: linear-gradient(180deg, #ffe9a8, #ffcf55 60%, #f0b010); color: #241700; }
.btn.rec { --c: #fff; background: linear-gradient(180deg, #ff8a7a, var(--rec) 60%, #d8262a); border-color: #ffa99f; box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 0 18px rgba(255, 77, 77, .35); }
.btn.rec:hover { background: linear-gradient(180deg, #ff9d8f, #ff6060 60%, #e23034); color: #fff; }
.btn.ghost { --b: transparent; }
.btn.danger { --b: transparent; --c: var(--bad); border-color: rgba(255, 154, 154, .55); }
.btn.danger:hover { background: rgba(255, 154, 154, .1); color: var(--bad); }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: .86rem; border-radius: 9px; }

/* ---------- panels ---------- */
.glass, .panel { position: relative; background: linear-gradient(180deg, rgba(90, 170, 255, .11), rgba(30, 80, 150, .06)); border: 1px solid var(--rim); border-radius: var(--radius);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: inset 0 1px 0 rgba(200, 230, 255, .12), 0 10px 30px rgba(0, 0, 0, .35); }
:root[data-theme="light"] .glass, :root[data-theme="light"] .panel { background: #fff; box-shadow: 0 8px 24px rgba(6, 40, 90, .1); }
.card, .panel { padding: 18px; }
.panel + .panel { margin-top: 16px; }
.dash > .panel + .panel { margin-top: 0; }
.panel > h3 { margin-bottom: 12px; }
.panel.hl { border-color: var(--rim2); box-shadow: inset 0 1px 0 rgba(200, 230, 255, .2), 0 0 40px rgba(79, 214, 255, .12), 0 12px 34px rgba(0, 0, 0, .4); }
.phead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.phead h2 { margin: 0; }
.phead a { font-size: .86rem; }
.solid { background: var(--deep); }
.dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.dash > * { min-width: 0; }
.s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s5 { grid-column: span 5; } .s6 { grid-column: span 6; } .s7 { grid-column: span 7; } .s8 { grid-column: span 8; } .s12 { grid-column: span 12; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 1100px) { .s3, .s4, .s5, .s7, .s8 { grid-column: span 6; } }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .dash { grid-template-columns: minmax(0, 1fr); } .s3, .s4, .s5, .s6, .s7, .s8, .s12 { grid-column: auto; } }

/* ---------- capture tiles: Bryan's glyphs on refined glass ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tile { --accent: var(--cyan); position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 118px; padding: 14px; border-radius: 14px;
  border: 1px solid rgba(150, 210, 255, .18); background: rgba(3, 20, 40, .5); color: var(--snow); font: 650 .98rem/1.2 var(--display); text-align: left; text-decoration: none; cursor: pointer;
  transition: border-color .15s, background .15s, transform .12s; overflow: hidden; }
.tile::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .85; }
.tile:hover { border-color: var(--rim2); background: rgba(79, 214, 255, .08); color: var(--snow); transform: translateY(-1px); }
.tile[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.tile .sub { font: 400 .8rem/1.35 var(--body); color: var(--mist); }
.tile img.glyph { width: 46px; height: auto; border-radius: 12px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25), 0 6px 16px -6px rgba(0, 0, 0, .7), 0 0 18px -4px var(--accent); }
.tile > svg { width: 30px; height: 30px; color: var(--accent); filter: drop-shadow(0 0 6px rgba(79, 214, 255, .5)); }
.tile.rec { --accent: #ff6a3d; } .tile.orange { --accent: var(--orange); } .tile.sun { --accent: var(--sun); }
:root[data-theme="light"] .tile { background: #f6faff; }

/* ---------- forms ---------- */
label { display: block; margin: 0 0 6px; color: var(--mist); font-size: .9rem; font-weight: 600; }
.field { margin-bottom: 12px; }
input[type="text"], input[type="email"], input[type="search"], input[type="number"], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--rim); background: rgba(2, 16, 32, .65); color: var(--snow); font: inherit; }
textarea { min-height: 84px; }
:root[data-theme="light"] input, :root[data-theme="light"] select, :root[data-theme="light"] textarea { background: #fff; }
input::placeholder { color: var(--mist); opacity: .8; }
.check { display: flex; align-items: center; gap: 10px; min-height: 38px; margin: 0; color: var(--snow); font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--orange); }
.error-text { color: var(--bad); font-weight: 600; font-size: .86rem; margin-top: 4px; }
fieldset { border: 1px solid rgba(150, 210, 255, .16); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; }
legend { padding: 0 6px; font: 650 .9rem var(--display); color: var(--snow); }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 520px) { .opts { grid-template-columns: 1fr; } }

/* ---------- chips, pills, meters ---------- */
.status-strip { display: flex; flex-wrap: wrap; gap: 6px; }
.chip, .pill, .tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--rim); background: rgba(2, 20, 40, .45); color: var(--mist); font-size: .8rem; font-weight: 600; }
.chip.warn, .tag.soon { color: var(--warn); border-color: rgba(255, 210, 122, .45); }
.chip.bad { color: var(--bad); border-color: rgba(255, 154, 154, .45); }
.tag.now, .pill.ok { color: var(--ok); border-color: rgba(95, 240, 176, .45); }
.meter, .progress { height: 6px; border-radius: 6px; background: rgba(150, 210, 255, .15); overflow: hidden; }
.meter > span, .progress > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ok), var(--sun) 70%, var(--rec)); transition: width .08s linear; }
.progress > span { background: linear-gradient(90deg, var(--cyan), var(--orange)); }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { position: relative; padding: 6px 0 6px 26px; }
.checks li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 12px; height: 7px; border-left: 2px solid var(--cyan); border-bottom: 2px solid var(--cyan); transform: rotate(-45deg); }

/* ---------- recording bar and monitor ---------- */
.recbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--rim); background: rgba(2, 14, 30, .72); }
.recbar[data-state="recording"] { border-color: rgba(255, 77, 77, .7); box-shadow: 0 0 22px rgba(255, 77, 77, .18); }
.recbar[data-state="paused"] { border-color: rgba(255, 197, 61, .7); border-style: dashed; }
.rec-indicator { display: inline-flex; align-items: center; gap: 8px; font: 700 .82rem var(--display); letter-spacing: .1em; text-transform: uppercase; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--mist); }
.recbar[data-state="recording"] .rec-dot { background: var(--rec); box-shadow: 0 0 10px var(--rec); animation: pulse 1.2s infinite; }
.recbar[data-state="paused"] .rec-dot { background: transparent; border-radius: 2px; width: 10px; height: 12px; border-left: 3px solid var(--sun); border-right: 3px solid var(--sun); }
.timer { font: 700 1.35rem/1 ui-monospace, "Cascadia Mono", Consolas, monospace; font-variant-numeric: tabular-nums; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.monitor { position: relative; margin: 0 auto; padding: 10px; border-radius: 18px; background: #04152c;
  border: 5px solid transparent; background-image: linear-gradient(#04152c, #04152c), linear-gradient(180deg, #cdeaff, #6db6ff 45%, #0b4fb3); background-origin: border-box; background-clip: padding-box, border-box;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .85), 0 0 34px -10px rgba(79, 214, 255, .45); }
.monitor-screen { position: relative; border-radius: 9px; overflow: hidden; background: #020c18; }
.preview { aspect-ratio: 16 / 9; width: 100%; display: grid; place-items: center; text-align: center; padding: 12px; color: var(--mist); background: radial-gradient(ellipse at 50% 60%, rgba(79, 214, 255, .12), transparent 70%), #020c18; }
.preview video, .preview img { width: 100%; height: 100%; object-fit: contain; }
.monitor-screen .corner { position: absolute; width: 16px; height: 16px; border: 0 solid rgba(255, 255, 255, .85); pointer-events: none; }
.monitor-screen .corner.tl { left: 10px; top: 10px; border-left-width: 2px; border-top-width: 2px; }
.monitor-screen .corner.tr { right: 10px; top: 10px; border-right-width: 2px; border-top-width: 2px; }
.monitor-screen .corner.bl { left: 10px; bottom: 10px; border-left-width: 2px; border-bottom-width: 2px; }
.monitor-screen .corner.br { right: 10px; bottom: 10px; border-right-width: 2px; border-bottom-width: 2px; }
.rec-badge { position: absolute; right: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 7px; background: rgba(4, 18, 40, .9); color: #fff; font: 800 .85rem var(--display); letter-spacing: .06em; }
.rec-badge[hidden] { display: none; }
.rec-badge .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rec); box-shadow: 0 0 8px var(--rec); animation: pulse 1.2s infinite; }
.rec-badge.paused .dot { animation: none; background: var(--sun); box-shadow: none; border-radius: 2px; }
.monitor-stand { width: 30%; max-width: 180px; height: 22px; margin: 0 auto; background: linear-gradient(180deg, #9fd4ff, #0b4fb3); clip-path: polygon(32% 0, 68% 0, 70% 55%, 100% 64%, 100% 100%, 0 100%, 0 64%, 30% 55%); }
.countdown { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(2, 10, 22, .74); font: 800 min(40vw, 240px)/1 var(--display); color: var(--sun); text-shadow: 0 0 60px rgba(255, 197, 61, .5); }

/* ---------- gallery ---------- */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.toolbar .field { margin: 0; min-width: 160px; flex: 1; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.cap { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; border: 1px solid rgba(150, 210, 255, .18); background: rgba(3, 20, 40, .55); }
.cap:hover { border-color: var(--rim2); }
.cap .thumb { aspect-ratio: 16 / 10; width: 100%; padding: 0; border: 0; background: #020c18; position: relative; display: grid; place-items: center; color: var(--mist); cursor: pointer; }
.cap .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cap .thumb svg { width: 34px; height: 34px; }
.cap .badge { position: absolute; left: 8px; top: 8px; padding: 2px 9px; border-radius: 999px; font: 700 .72rem var(--body); background: rgba(2, 10, 22, .8); color: #fff; }
.cap .dur { position: absolute; right: 8px; bottom: 8px; padding: 2px 7px; border-radius: 6px; font: 600 .76rem ui-monospace, monospace; background: rgba(2, 10, 22, .85); color: #fff; }
.cap .body { padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.cap .title { font: 650 .95rem var(--display); word-break: break-word; }
.cap .meta { font-size: .8rem; color: var(--mist); }
.cap .acts { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px 14px; }
.state { font-size: .8rem; font-weight: 700; }
.state.scanning, .state.uploading { color: var(--warn); }
.state.rejected, .state.failed { color: var(--bad); }
.empty { text-align: center; padding: 44px 20px; color: var(--mist); }
.empty svg { width: 54px; height: 54px; margin: 0 auto 12px; opacity: .7; color: var(--cyan); }

/* ---------- tables, dialogs, toasts, banners ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid rgba(150, 210, 255, .14); vertical-align: middle; }
th { color: var(--mist); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }
td small { display: block; color: var(--mist); }
td code, .mono { font: .82rem ui-monospace, "Cascadia Mono", Consolas, monospace; word-break: break-all; }
.state-row td { color: var(--mist); padding: 18px 12px; }
.state-row.bad td { color: var(--bad); font-weight: 700; }
.ok-text { color: var(--ok); font-weight: 700; }
.bad-text { color: var(--bad); font-weight: 700; }
dialog { border: 1px solid var(--rim2); border-radius: 18px; background: var(--deep); color: var(--snow); padding: 0; width: min(920px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
dialog::backdrop { background: rgba(1, 6, 14, .72); backdrop-filter: blur(4px); }
dialog .dhead { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--rim); }
dialog .dbody { padding: 18px; overflow: auto; }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 95; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 32px)); }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--deep); border: 1px solid var(--rim2); box-shadow: 0 12px 30px rgba(0, 0, 0, .5); font-weight: 600; }
.toast.bad { border-color: var(--bad); } .toast.good { border-color: var(--ok); }
.banner { padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(255, 210, 122, .5); border-left-width: 4px; background: rgba(255, 210, 122, .08); font-weight: 500; }
.banner.bad { border-color: rgba(255, 154, 154, .6); background: rgba(255, 154, 154, .08); }
.loading { display: flex; align-items: center; gap: 10px; color: var(--mist); padding: 18px; }
.loading::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--rim); border-top-color: var(--orange); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
details.faq { border-top: 1px solid rgba(150, 210, 255, .14); padding: 12px 0; }
details.faq:first-child { border-top: 0; }
details.faq summary { cursor: pointer; font: 650 1rem var(--display); min-height: 28px; }
details.faq p { margin: 8px 0 0; color: var(--mist); }

/* ---------- landing ---------- */
.hero { position: relative; overflow: hidden; }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 28px; align-items: center; padding-top: 44px; padding-bottom: 76px; }
.hero h1 { margin: 0; }
.hero h1 img { width: min(520px, 100%); height: auto; margin-left: -14px; -webkit-mask-image: radial-gradient(ellipse 60% 66% at 50% 52%, #000 72%, transparent 100%); mask-image: radial-gradient(ellipse 60% 66% at 50% 52%, #000 72%, transparent 100%); }
.hero .tagline { font: 700 clamp(1.35rem, 2.6vw, 1.9rem)/1.2 var(--display); margin: 4px 0 12px; color: var(--snow); max-width: 26ch; }
.hero p.lead { font-size: 1.08rem; color: #cfe2f6; margin-bottom: 24px; }
:root[data-theme="light"] .hero p.lead { color: var(--mist); }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .art { position: relative; }
.hero .art::before { content: ""; position: absolute; inset: 8% 6%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 138, 42, .32), rgba(79, 214, 255, .16) 60%, transparent); filter: blur(30px); }
.hero .art img { position: relative; width: 100%; height: auto; -webkit-mask-image: radial-gradient(ellipse 68% 66% at 50% 50%, #000 66%, transparent 100%); mask-image: radial-gradient(ellipse 68% 66% at 50% 50%, #000 66%, transparent 100%); }
.hero .trustline { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; color: var(--mist); font-size: .88rem; }
.hero .trustline span::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.lift { margin-top: -40px; position: relative; z-index: 2; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 44px 0 14px; flex-wrap: wrap; }
.section-title h2 { font-size: 1.5rem; margin: 0; }
.section-title p { margin: 0; color: var(--mist); }
.plan { display: flex; flex-direction: column; gap: 6px; }
.plan .price { font: 800 2rem/1 var(--display); color: #fff; }
.plan .price small { font: 500 .9rem var(--body); color: var(--mist); }
:root[data-theme="light"] .plan .price { color: var(--snow); }
.plan.pick { border-color: rgba(255, 179, 92, .7); box-shadow: inset 0 1px 0 rgba(255, 220, 180, .2), 0 0 40px rgba(255, 138, 42, .16), 0 12px 34px rgba(0, 0, 0, .4); }
.plan .checks { margin-top: 6px; }
.strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.strip .item { display: flex; gap: 14px; align-items: flex-start; }
.strip svg { flex: none; width: 34px; height: 34px; stroke: var(--cyan); fill: none; stroke-width: 1.6; filter: drop-shadow(0 0 8px rgba(79, 214, 255, .5)); }
.strip h3 { margin: 0 0 2px; }
.strip p { margin: 0; }
.roles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.role { padding: 12px; border-radius: 12px; border: 1px solid rgba(150, 210, 255, .16); background: rgba(3, 20, 40, .45); }
.role b { display: block; font: 650 .95rem var(--display); margin-bottom: 4px; }
.role span { font-size: .84rem; color: var(--mist); }
@media (max-width: 1000px) { .roles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
footer.site { border-top: 1px solid var(--rim); margin-top: 44px; padding: 22px 0 32px; color: var(--mist); font-size: .88rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 8px; }
.foot-links a { color: var(--mist); }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 24px; padding-bottom: 56px; }
  .hero .art { order: -1; max-width: 560px; margin: 0 auto; }
  .strip { grid-template-columns: 1fr; }
  .site-nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 8px; }
}

/* ---------- app shell ---------- */
.app-main { padding-top: 20px; padding-bottom: 40px; }
.stage-row { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; }
.stage-title { margin: 0; font-size: 1rem; }
.stage-tiles { margin-top: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1180px) { .stage-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.quick .tile { min-height: 0; flex-direction: row; align-items: center; padding: 10px 12px; }
.quick .tile > svg { width: 22px; height: 22px; }
@media (max-width: 520px) { .quick { grid-template-columns: 1fr; } }

/* ---------- phones and tablets: browsers there cannot capture the screen ---------- */
.mobile-only { display: none; }
body.no-screen-capture .mobile-only { display: block; }
body.no-screen-capture .desktop-only { display: none !important; }

/* ---------- static pages and staff admin (help, privacy-and-data, admin) ---------- */
.section { margin-top: 40px; }
.section > h2 { font-size: 1.5rem; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.feature svg { width: 36px; height: 36px; margin-bottom: 8px; color: var(--cyan); }
.doc { max-width: 860px; }
.doc h2 { font-size: 1.35rem; margin-top: 2em; scroll-margin-top: 80px; }
.doc h3 { margin-top: 1.4em; }
.doc li { margin-bottom: 6px; }
.toc { columns: 2 220px; padding-left: 1.2em; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.stat { padding: 16px 18px; }
.stat b, .stats .card b { display: block; font: 700 1.8rem/1.1 var(--display); color: #fff; }
:root[data-theme="light"] .stat b, :root[data-theme="light"] .stats .card b { color: var(--snow); }
.stat span { color: var(--mist); font-size: .88rem; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 18px; margin: 0; }
.kv > div { padding: 8px 0; border-bottom: 1px solid rgba(150, 210, 255, .14); }
.kv dt { font-size: .8rem; color: var(--mist); }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.search-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.search-row .field { flex: 1; min-width: 220px; margin: 0; }

/* ---------- fit the BAPC Enterprise Kit's legal footer and cookie notice into Dubigi's look ---------- */
.bapc-legal { background: transparent !important; color: var(--mist) !important; border-top: 1px solid var(--rim); font-family: var(--body) !important; }
.bapc-legal a, .bapc-cookie a { color: var(--cyan) !important; }
.bapc-cookie { background: var(--deep) !important; color: var(--snow) !important; border: 1px solid var(--rim2) !important; border-radius: 14px !important; box-shadow: 0 16px 40px rgba(0, 0, 0, .55) !important; font-family: var(--body) !important; }
.bapc-cookie button { background: linear-gradient(180deg, #ffc27a, var(--orange) 55%, #e86a0c) !important; color: var(--on-orange) !important; border: 1px solid #ffc98a !important; border-radius: 10px !important; font-weight: 700 !important; }

/* ---------- landing refinements ---------- */
#capture .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#capture .tile { min-height: 0; flex-direction: row; align-items: center; gap: 14px; padding: 16px; }
#capture .tile .sub { display: block; margin-top: 4px; }
#capture .tile > span.t { display: flex; flex-direction: column; }
.plan p { margin: 0; }
.plan .price { margin-top: 2px; }
.hero h1 img { -webkit-mask-image: radial-gradient(ellipse 54% 58% at 50% 52%, #000 58%, transparent 100%); mask-image: radial-gradient(ellipse 54% 58% at 50% 52%, #000 58%, transparent 100%); }
.hero .art img { -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, #000 52%, transparent 96%); mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, #000 52%, transparent 96%); }
.hero h1 img { -webkit-mask-image: radial-gradient(ellipse 72% 64% at 50% 50%, #000 64%, transparent 100%); mask-image: radial-gradient(ellipse 72% 64% at 50% 50%, #000 64%, transparent 100%); }
#capture .tile > svg { flex: none; width: 46px; height: 46px; padding: 9px; border-radius: 12px; background: rgba(79, 214, 255, .1); box-shadow: 0 0 0 1px var(--rim); }
@media (min-width: 721px) { .app-stage { position: sticky; top: 80px; } }
@media (max-width: 720px) { #capture .tiles { grid-template-columns: 1fr; } .hero h1 img { margin-left: 0; } }

/* light theme: every dark inner surface gets a light one */
:root[data-theme="light"] .role, :root[data-theme="light"] .recbar, :root[data-theme="light"] .cap, :root[data-theme="light"] .chip, :root[data-theme="light"] .pill, :root[data-theme="light"] .tag,
:root[data-theme="light"] .cap .thumb, :root[data-theme="light"] .preview, :root[data-theme="light"] .monitor-screen { background: #f3f8ff; color: var(--snow); }
:root[data-theme="light"] .preview { color: var(--mist); }
:root[data-theme="light"] .role span, :root[data-theme="light"] .tile .sub { color: #34557d; }
