/* =========================================================
   System Core: the Guess, research answers, My City, Show & submit, offline chip.
   Positions sit inside .app-main (1226 x 1004) like the other iPad pages.
   ========================================================= */

/* ---------- the sealed Guess ---------- */
.sg h5 { margin: 4px 0 10px; font-size: 15px; font-weight: 600; color: var(--text)}
.sg-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px}
.sg-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border-radius: 12px; border: 1px solid var(--line-2, #2c2c2e); background: var(--panel-2); text-align: start; color: var(--text); transition: border-color .15s, background .15s}
.sg-opt span { color: var(--accent)}
.sg-opt b { font-size: 16px; font-weight: 600}
.sg-opt small { font-size: 12.5px; line-height: 1.35; color: var(--muted)}
.sg-opt.on { border-color: var(--accent); background: rgba(135, 135, 135, 0.1); outline: 1px solid var(--accent-line); outline-offset: 0; box-shadow: none}
.sg-opt:hover { border-color: var(--accent-line)}
.sg-why { display: grid; grid-template-columns: 1fr 1fr; gap: 8px}
.sg-opt.sm { flex-direction: row; align-items: center; gap: 10px; padding: 11px 14px; font-size: 14px}
.sg-opt.sm .ico { color: var(--accent); flex: none}
.sg-sealed { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px}
.sg-sealed div { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2)}
.sg-sealed small { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted)}
.sg-sealed b { display: block; margin-top: 4px; font-size: 15px; color: var(--text)}
.sg-result { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 4px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); font-size: 14px; line-height: 1.45}
.sg-result .ico { flex: none; margin-top: 2px; color: var(--warn)}
.sg-result.ok .ico { color: var(--accent)}
.sg-ans { font-size: 15px; line-height: 1.5; margin: 4px 0 0}
.fr-q { margin-top: 14px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--accent-line); background: rgba(135, 135, 135, 0.1)}
.fr-q h5 { margin: 0 0 10px; font-size: 15px; color: var(--text)}
.fr-q .fr-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px}
.fr-q .fr-opts button { padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line-2, #2c2c2e); background: var(--panel-2); color: var(--text); font-size: 14px; font-weight: 500}
.fr-q .fr-opts button:hover { border-color: var(--accent)}

/* ---------- offline chip (top bar and mission header) ---------- */
.sys-off { display: inline-flex; align-items: center; gap: 6px; margin-inline-end: 12px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid #333336; background: #1d1d1f; color: #ff9f0a; font-size: 12.5px; font-weight: 600; white-space: nowrap; align-self: center}
/* in the mission header the chip is a round icon; its title says Offline mode */
.mx-top .sys-off { width: 32px; height: 32px; padding: 0; justify-content: center; gap: 0; font-size: 0; margin-inline-end: 0}


/* ---------- Show & submit ---------- */
.submit .sb-card { position: absolute; top: 92px; display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: var(--ip-r); border: 1px solid var(--ip-line); background: var(--ip-card)}
.submit .sb-card:first-of-type { inset-inline-start: 15px; width: 640px; height: 896px}
.submit .sb-right { inset-inline-start: 671px; width: 535px; height: 896px}
.sb-card h3 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 8px; font-size: 17px; font-weight: 600; color: #ffffff}
.sb-card h3 small { font-size: 13px; font-weight: 400; color: var(--ip-text-2)}
.sb-row { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--ip-line); background: #161617}
.sb-row.ok { border-color: rgba(0, 255, 111, .35)}
.sb-row.opt { opacity: .8}
.sb-i { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 11px; background: #1d1d1f; color: #aeaeb2}
.sb-row.ok .sb-i { color: var(--accent); background: rgba(127, 127, 127, 0.1)}
.sb-row .t { flex: 1; min-width: 0}
.sb-row b { display: block; font-size: 15px; font-weight: 600; color: #ffffff}
.sb-row b em { font-style: normal; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #86868b; margin-inline-start: 6px}
.sb-row small { display: block; margin-top: 2px; font-size: 13px; color: var(--ip-text-2)}
.sb-row .btn { height: 40px; padding: 0 14px; font-size: 14px; white-space: nowrap}
.sb-row .btn.sm { height: 34px; font-size: 13px}
.sb-shot { position: relative; height: 300px; border-radius: 12px; overflow: hidden; border: 1px solid var(--ip-line); background: #111112}
.sb-shot > svg { width: 100%; height: 100%; display: block}
.sb-shot.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #86868b}
.sb-shot.empty p { margin: 0; font-size: 13.5px}
.sb-stamp { position: absolute; inset-inline-end: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 8px; background: rgba(11, 11, 11, 0.82); color: #e5e5ea; font-size: 11.5px; font-family: 'JetBrains Mono', monospace}
.sb-status { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--ip-line); background: #161617}
.sb-status b { display: block; font-size: 15px; font-weight: 600; color: #ffffff}
.sb-status small { display: block; margin-top: 4px; font-size: 13px; line-height: 1.45; color: var(--ip-text-2)}
.sb-status .ico { float: inline-start; margin-inline-end: 8px; margin-top: 2px}
.sb-status.wait { border-color: #333336}
.sb-status.wait .ico { color: #ff9f0a}
.sb-status.done { border-color: rgba(0, 255, 111, .4)}
.sb-status.done .ico { color: var(--accent)}
.sb-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px}
.sb-checks li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: #d2d2d7}
.sb-checks li.ok .ico { color: var(--accent)}
.sb-checks li.no .ico { color: var(--red)}
.sb-checks li.opt .ico { color: #86868b}
.sb-acts { display: flex; gap: 10px; margin-top: auto}
.sb-acts .btn { height: 48px; padding: 0 18px; gap: 10px; font-size: 15px}
.sb-cam { position: relative; height: 320px; border-radius: 12px; overflow: hidden; background: #111112}
.sb-cam > svg { width: 100%; height: 100%}
.sb-frame { position: absolute; inset: 18px; border: 2px solid rgba(255, 255, 255, 0.7); border-radius: 10px; pointer-events: none; outline: 999px solid rgba(0, 0, 0, 0.35); outline-offset: 0; box-shadow: none}
.sb-rec { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: stretch}
.sb-mic { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); text-align: center}
.sb-mic.live { border-color: var(--red); color: var(--red); animation: sbPulse 1s infinite}
.sb-mic b { font-size: 30px; color: var(--text)}
.sb-mic small { font-size: 12px; line-height: 1.35}
@keyframes sbPulse { 0%, 100% { box-shadow: none} 50% { outline: 10px solid rgba(255,79,163, 0); outline-offset: 0; box-shadow: none} }
.sb-prompts { display: grid; gap: 8px; align-content: center}
.sb-prompts div { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); font-size: 14px; color: var(--text)}
.sb-prompts i { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: rgba(135, 135, 135, 0.16); color: var(--accent); font-style: normal; font-size: 12px; font-weight: 700; flex: none}
.sb-wit { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px}
.sb-wit button { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2, #2c2c2e); background: var(--panel-2); color: var(--text); text-align: start}
.sb-wit button .ico { color: var(--accent)}
.sb-wit button span { font-size: 13px; font-weight: 500; line-height: 1.3}
.sb-wit button small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted)}
.sb-wit button.on { border-color: var(--accent); background: rgba(135, 135, 135, 0.1)}
.sb-code { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 0 4px}
.sb-code input { width: 200px; height: 64px; text-align: center; font-size: 34px; letter-spacing: .4em; font-family: 'JetBrains Mono', monospace; border-radius: 12px; border: 1px solid var(--line-2, #2c2c2e); background: var(--panel-2); color: var(--text)}
.sb-code small { color: var(--muted)}

/* Cadet: the inventory strip on KNOW screens is a short promise, not ten cards */
.mx-cadet { display: flex; align-items: center; gap: 14px}
.mx-cadet .mx-cards { display: flex; gap: 10px}
.mx-cadet p { margin: 0; font-size: 14px; color: #d2d2d7}

/* light theme */
[data-theme="light"] .sys-off { background: #f5f5f7; border-color: #ffd9a8; color: #ff9f0a}
[data-theme="light"] .city-d .t-name, [data-theme="light"] .city-kpi b, [data-theme="light"] .city-side h3, [data-theme="light"] .sb-card h3, [data-theme="light"] .sb-row b, [data-theme="light"] .sb-status b, [data-theme="light"] .city-proof b { color: #161617}
[data-theme="light"] .city-ico, [data-theme="light"] .sb-i, [data-theme="light"] .city-proof li, [data-theme="light"] .sb-row, [data-theme="light"] .sb-status, [data-theme="light"] .city-loop div { background: #f5f5f7}

/* one tab per started mission on Show & submit, so each proof is submitted on its own */
.submit .sb-tabs { position: absolute; inset-inline-end: 20px; top: 24px; display: flex; gap: 4px; padding: 4px; border-radius: 12px; border: 1px solid var(--ip-line); background: var(--ip-card)}
.sb-tabs button { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 9px; font-size: 14.5px; font-weight: 600; color: #aeaeb2; white-space: nowrap}
.sb-tabs button:hover:not(.on) { color: #ffffff}
.sb-tabs button.on { background: #1d1d1f; color: #ffffff; outline: 1px solid var(--accent-line); outline-offset: -1px; box-shadow: none}
.sb-tabs button.on .ico { color: var(--accent)}
