:root { --brand: #0f766e; --bg: #f8fafc; --fg: #0f172a; --muted: #64748b; --line: #e2e8f0; --card: #fff; --high: #dc2626; --medium: #d97706; --low: #2563eb; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.5 -apple-system, "Segoe UI", Roboto, "Noto Sans", Helvetica, Arial, sans-serif; }
body { padding: env(safe-area-inset-top) 0 calc(64px + env(safe-area-inset-bottom)); }
.top { display: flex; gap: 10px; align-items: center; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.top small { display: block; color: var(--muted); font-size: 12px; line-height: 1.2; }
main { max-width: 640px; margin: 0 auto; padding: 16px; }
h1 { font-size: 22px; margin: 4px 0 12px; } h2 { font-size: 17px; margin: 0 0 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 0 0 14px; }
.muted { color: var(--muted); } .center { text-align: center; } .small { font-size: 13px; }
label { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 4px; }
label .help { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
input[type=email], input[type=text], input[type=number], input[inputmode], select { width: 100%; padding: 11px 12px; font-size: 16px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; }
.row { display: flex; gap: 8px; align-items: center; } .row > * { flex: 1; }
.prefix { position: relative; } .prefix span { position: absolute; left: 12px; top: 11px; color: var(--muted); } .prefix input { padding-left: 26px; }
button, .btn { display: inline-block; border: 0; border-radius: 8px; padding: 11px 16px; font-size: 16px; font-weight: 600; background: var(--brand); color: #fff; cursor: pointer; text-decoration: none; text-align: center; }
button.secondary, .btn.secondary { background: #e2e8f0; color: var(--fg); }
button.link { background: none; color: var(--brand); padding: 6px 0; font-weight: 500; }
button[disabled] { opacity: .55; cursor: default; }
.block { display: block; width: 100%; margin-top: 12px; }
.tabs { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 2; }
.tabs a { flex: 1; text-align: center; padding: 12px 0; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; position: relative; }
.tabs a.on { color: var(--brand); }
.badge { background: var(--high); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 6px; margin-left: 4px; vertical-align: top; }
.feed { list-style: none; padding: 0; margin: 0; }
.feed li a { display: flex; gap: 10px; padding: 12px 4px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.feed .dot { flex: 0 0 10px; height: 10px; border-radius: 5px; margin-top: 7px; background: #cbd5e1; }
.feed .high .dot { background: var(--high); } .feed .medium .dot { background: var(--medium); } .feed .low .dot, .feed .info .dot { background: var(--low); }
.feed .unread b { font-weight: 700; } .feed .read b { font-weight: 500; }
.feed small { display: block; color: var(--muted); font-size: 12px; }
.msg div { margin: 2px 0; } .msg .gap { height: 10px; } .msg em { color: #475569; } .msg .ind { margin-left: 16px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px; margin: 10px 0; } .facts dt { color: var(--muted); } .facts dd { margin: 0; }
.fix { background: #ecfdf5; border-left: 4px solid #10b981; padding: 10px 12px; border-radius: 6px; margin: 10px 0; }
.key { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; word-break: break-all; background: #f1f5f9; padding: 10px; border-radius: 8px; }
.steps { padding-left: 20px; } .steps li { margin: 6px 0; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } @media (max-width: 480px) { .plans { grid-template-columns: 1fr; } }
.plan.pro { border: 2px solid var(--brand); } .price { font-size: 26px; font-weight: 800; } .plan ul { padding-left: 18px; margin: 8px 0; font-size: 14px; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #e2e8f0; } .pill.ok { background: #dcfce7; color: #166534; } .pill.warn { background: #fef3c7; color: #92400e; }
.toggle { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 12px 0; } .toggle input { width: 22px; height: 22px; }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); background: #0f172a; color: #fff; padding: 12px 14px; border-radius: 10px; text-align: center; z-index: 3; }
.ios { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; padding: 12px; font-size: 14px; }
.lapsed { background: #fffbeb; border-color: #fcd34d; } .lapsed p { margin: 6px 0 0; }

/* legal / support links (Plan page + footer) */
.legal-line { margin: 8px 0 0; }
footer.legal { max-width: 640px; margin: 8px auto 0; padding: 12px 16px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; text-align: center; }
footer.legal nav { margin-bottom: 4px; }
footer.legal a { color: var(--muted); }
