/* style.css — CERM notification app. Mobile first, system font, the mail's band colours come from the API. */
:root { --ink: #1f1f1f; --muted: #666; --line: #e3e3e3; --navy: #13293D; --link: #1a56a6; --ok: #1e7b34; --bg: #fff; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.4; -webkit-text-size-adjust: 100%; }
.top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 10px) 14px 10px 14px; background: var(--navy); color: #fff; font-weight: 600; font-size: 17px; }
.top .mark { width: 26px; height: 26px; border-radius: 6px; background: #fff; }
.top span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top a { color: #fff; text-decoration: none; font-size: 26px; line-height: 1; padding: 0 6px; }
.top .back { font-size: 32px; margin-left: -6px; }
.page { padding: 14px 14px calc(env(safe-area-inset-bottom) + 24px) 14px; max-width: 640px; margin: 0 auto; }
.narrow { max-width: 440px; }
h1 { font-size: 22px; margin: 6px 0 10px 0; }
h2 { font-size: 17px; margin: 18px 0 8px 0; }
p { margin: 0 0 10px 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; color: var(--muted); }
.hidden { display: none !important; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px 0; }
input[type=email], textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #bbb; border-radius: 8px; background: #fff; color: var(--ink); }
textarea { min-height: 70px; resize: vertical; }
button { font: inherit; }
.primary { display: block; width: 100%; margin: 14px 0 0 0; padding: 13px 16px; border: 0; border-radius: 10px; background: var(--ok); color: #fff; font-weight: 600; font-size: 17px; }
.primary:disabled { opacity: .5; }
.secondary { display: block; width: 100%; margin: 10px 0 0 0; padding: 11px 16px; border: 1px solid #bbb; border-radius: 10px; background: #fff; color: var(--ink); font-weight: 500; }
.danger { border-color: #c00000; color: #c00000; }
.notice { background: #fff6d6; border: 1px solid #f2d27a; border-radius: 8px; padding: 10px 12px; }
.answer { background: #e8f3ea; border: 1px solid #bfdcc6; border-radius: 8px; padding: 12px; }
.panel { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 0 0 16px 0; }
.panel ol { padding-left: 20px; margin: 6px 0; }
.panel li { margin: 0 0 6px 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-bottom: 1px solid var(--line); }
.list a { display: block; padding: 12px 4px; color: inherit; text-decoration: none; }
.list .when { font-size: 13px; color: var(--muted); }
.list .subj { font-weight: 600; margin: 2px 0 4px 0; }
.list .unread .subj::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--link); margin: 0 6px 1px 0; }
.dots span { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 11px; font-size: 12px; font-weight: 700; margin: 0 4px 0 0; text-align: center; }
.dots .red { background: #C00000; color: #fff; }
.dots .amber { background: #F2B01E; color: #1f1f1f; }
.dots .green { background: #DCEBD9; color: #1E4D2B; }
.more { margin: 14px 0 0 0; }
.item { margin: 0 0 22px 0; }
.band { padding: 10px 14px 12px 14px; border-radius: 10px 10px 0 0; }
.band .tag { font-size: 12px; letter-spacing: .08em; font-weight: 700; opacity: .9; margin: 0 0 4px 0; }
.band .tag code { font-family: Menlo, Consolas, monospace; letter-spacing: 0; }
.band .head { font-size: 19px; font-weight: 700; line-height: 1.25; }
.body { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; padding: 10px 14px 12px 14px; }
.body .summary { margin: 0 0 8px 0; }
.body .filed { font-size: 13px; color: var(--muted); margin: 0 0 8px 0; }
.body a { color: var(--link); font-weight: 600; text-decoration: none; }
.body .host { color: #888; font-size: 13px; font-weight: 400; }
.also { font-size: 13px; color: var(--muted); margin: 6px 0 0 0; }
.view { margin: 12px 0 0 0; }
.view .lead { font-size: 13px; color: var(--muted); margin: 0 0 6px 0; }
.emoji { display: flex; gap: 6px; flex-wrap: wrap; }
.emoji button { font-size: 24px; line-height: 1; padding: 7px 9px; border: 1px solid var(--line); border-radius: 10px; background: #fafafa; }
.emoji button.on { border-color: var(--ok); background: #e8f3ea; }
.emoji button:disabled { opacity: .6; }
.noted { font-size: 13px; color: var(--ok); margin: 6px 0 0 0; min-height: 1.2em; }
.commentbox { margin: 8px 0 0 0; }
.commentbox button { margin-top: 6px; padding: 8px 14px; border: 1px solid #bbb; border-radius: 8px; background: #fff; }
.toggle { background: none; border: 0; padding: 0; color: var(--link); font-size: 14px; margin: 8px 0 0 0; }
.docx { margin: 6px 0 18px 0; }
.kv { font-size: 14px; }
.kv div { padding: 8px 0; border-bottom: 1px solid var(--line); }
.kv b { display: inline-block; min-width: 100px; color: var(--muted); font-weight: 500; }
.devices { list-style: none; padding: 0; margin: 0 0 10px 0; }
.devices li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ok { color: var(--ok); font-weight: 600; }
.warn { color: #c00000; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px 0; }
.filters button { font-size: 14px; padding: 6px 12px; border: 1px solid #bbb; border-radius: 16px; background: #fff; color: var(--ink); }
.filters button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.filters button.c-red.on { background: #C00000; border-color: #C00000; }
.filters button.c-amber.on { background: #F2B01E; border-color: #F2B01E; color: #1f1f1f; }
.filters button.c-green.on { background: #1E7B34; border-color: #1E7B34; }
.list .headline { font-weight: 600; margin: 3px 0 0 0; line-height: 1.3; }
.list .unread .headline:first-of-type::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--link); margin: 0 6px 1px 0; }
.list .dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin: 0 6px 0 0; vertical-align: -1px; }
.list .dot.red { background: #C00000; }
.list .dot.amber { background: #F2B01E; }
.list .dot.green { background: #1E7B34; }
.list .code { font-family: Menlo, Consolas, monospace; font-size: 12px; color: var(--muted); font-weight: 400; }
.list .rowsummary { font-size: 14px; color: #444; margin: 2px 0 0 18px; }
.choices { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.choices .choice { width: 100%; text-align: left; }
.kv select { font: inherit; padding: 6px 8px; border: 1px solid #c9d1d9; border-radius: 8px; background: #fff; }
/* 2026-11-30 phone hand-over: the QR code of "Add your phone" */
.qr { background: #fff; padding: 6px; margin: 12px auto 4px auto; width: 232px; }
.qr svg { display: block; width: 220px; height: 220px; }
/* 2026-12-04 high-level risk codes (user: "include the high level risk as a filter ... Like TEC_3 NET_4"): the filter row
   scrolls sideways on one line; the same code_priority tags sit under each headline and at the top of each item */
.filters.riskrow { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -14px 4px -14px; padding: 0 14px 4px 14px; scrollbar-width: none; }
.filters.riskrow::-webkit-scrollbar { display: none; }
.filters.riskrow button { flex: 0 0 auto; font-family: Menlo, Consolas, monospace; font-size: 13px; }
.riskhint { margin: 0 0 10px 0; }
.risktags { margin: 3px 0 2px 18px; display: flex; gap: 5px; flex-wrap: wrap; }
.risktags span, .risktag { display: inline-block; font-family: Menlo, Consolas, monospace; font-size: 12px; font-weight: 400; padding: 1px 6px; border: 1px solid #c9d1d9; border-radius: 6px; background: #f3f5f7; color: #333; }
.risklines { margin: 0 0 10px 0; font-size: 14px; }
.risklines .lead { font-size: 13px; color: var(--muted); margin: 0 0 4px 0; }
.risklines div { margin: 0 0 3px 0; }
/* 2026-12-04 per-subscriber decision: the short "for you" line and the Why text that opens under its link */
.foryou { font-size: 13px; color: var(--muted); font-style: italic; }
.list .foryou { margin: 1px 0 0 18px; }
.whyrow { margin: 0 0 8px 0; }
.whyrow .toggle { margin: 0; }
.why { background: #f6f7f9; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px 2px 12px; margin: 0 0 10px 0; font-size: 14px; }
.why p { margin: 0 0 8px 0; }
/* 2026-12-05 personalised | universal: the two-button switch above the list and in Settings */
.filters.viewrow { margin: 0 0 4px 0; }
.filters.viewrow button { flex: 1 1 0; border-radius: 10px; padding: 8px 12px; font-weight: 600; }
.viewhint { margin: 0 0 12px 0; }
.filters.viewrow button.deltabtn { flex: 0 0 auto; }
#feed h2, #riskshow h2 { margin-top: 0; }
#feed .viewrow, #riskshow .viewrow { margin-bottom: 10px; }
/* 2026-12-06 the lock screen (Face ID / fingerprint) */
.lock { text-align: center; padding: 28px 6px 0 6px; }
.lock .lockicon { font-size: 54px; line-height: 1; margin: 0 0 14px 0; }
.lock p { margin: 0 0 6px 0; }
.lock .lockout { margin-top: 28px; font-size: 14px; }
