/* Marifa Secure Personal. Phone first; no external fonts or files. */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1c2430;
  --muted: #566173;
  --border: #d9dee6;
  --accent: #1f5fbf;
  --accent-text: #ffffff;
  --well: #1d7a46;
  --well-bg: #e6f4ec;
  --few: #8a5a00;
  --few-bg: #fdf3dc;
  --attention: #a8321f;
  --attention-bg: #fbe8e4;
  --focus: #f0b400;
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161c;
    --surface: #1b2129;
    --text: #e8ecf1;
    --muted: #a3adbb;
    --border: #2e3744;
    --accent: #6ea4ff;
    --accent-text: #0b1220;
    --well: #6fd39b;
    --well-bg: #15301f;
    --few: #f2c45a;
    --few-bg: #33290f;
    --attention: #ff8a73;
    --attention-bg: #3a1b15;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
}

.site-header, main, .site-footer {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header { padding-top: 16px; }
.brand { margin: 0; font-weight: 700; letter-spacing: 0.01em; }
.brand span { color: var(--accent); }

main { padding-top: 8px; padding-bottom: 24px; outline: none; }

.site-footer { color: var(--muted); font-size: 0.9rem; padding-bottom: 32px; }

h1 { font-size: 1.6rem; line-height: 1.25; margin: 16px 0 12px; }
h2 { font-size: 1.25rem; margin: 28px 0 8px; }
h4 { margin: 16px 0 4px; font-size: 1rem; }
h1:focus, h2:focus { outline: none; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 12px 0;
}

.lead { color: var(--muted); margin-top: 0; }

ul.points { padding-left: 1.2rem; margin: 0; }

/* Buttons */
.buttons { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }

button {
  font: inherit;
  font-weight: 600;
  min-height: 48px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
}
button.secondary { background: transparent; color: var(--accent); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button:focus-visible, summary:focus-visible, input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* Questions */
.progress { color: var(--muted); font-size: 0.95rem; margin: 16px 0 6px; }
.bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.bar > div { height: 100%; background: var(--accent); transition: width 0.2s; }

fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: 1.35rem; font-weight: 700; line-height: 1.3; margin: 20px 0 12px; padding: 0; }

.option {
  display: block;
  position: relative;
  margin: 10px 0;
  cursor: pointer;
}
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option span {
  display: block;
  padding: 14px 16px 14px 48px;
  min-height: 52px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  position: relative;
}
.option span::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  background: var(--surface);
}
.option input:checked + span { border-color: var(--accent); }
.option input:checked + span::before {
  border-color: var(--accent);
  background: radial-gradient(circle, var(--accent) 0 5px, var(--surface) 6px);
}

/* Results */
.result { border-width: 2px; }
.result h1 { margin-top: 0; }
.result.well { background: var(--well-bg); border-color: var(--well); }
.result.well h1 { color: var(--well); }
.result.few { background: var(--few-bg); border-color: var(--few); }
.result.few h1 { color: var(--few); }
.result.attention { background: var(--attention-bg); border-color: var(--attention); }
.result.attention h1 { color: var(--attention); }
.result p { margin-bottom: 0; }

details.action {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 10px 0;
}
details.action.who { border: 2px solid var(--accent); }
details.action > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 44px 14px 16px;
  position: relative;
  font-weight: 700;
}
details.action > summary::-webkit-details-marker { display: none; }
details.action > summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 12px;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--accent);
}
details.action[open] > summary::after { content: "\2212"; }
.time { display: block; font-weight: 400; color: var(--muted); font-size: 0.92rem; }
.action-body { padding: 0 16px 12px; border-top: 1px solid var(--border); }
.action-body dl { margin: 12px 0; }
.action-body dt { font-weight: 700; }
.action-body dd { margin: 0 0 8px; }
.action-body ol, .action-body ul { padding-left: 1.4rem; }
.action-body li { margin: 4px 0; }
.note { font-weight: 400; color: var(--muted); }

.ignore li { margin: 8px 0; }
