/* SEP Journey – mobile-first base styles. Colours as tokens; dark mode follows the device. */
:root {
  --bg: #f7f7f5; --surface: #ffffff; --text: #1d1d1b; --muted: #66665f; --line: #e2e1dc;
  --accent: #2f5d8a; --accent-text: #ffffff;
  --donate: #138808; --donate-hover: #0e6b06; --saffron: #ff9933; --saffron-light: #ffd8a8;
  --error: #b42318;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #161615; --surface: #20201e; --text: #ecebe6; --muted: #a4a39b; --line: #34332f;
          --accent: #7fb0e0; --accent-text: #0f1a24; --saffron-light: #5a3d1c; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
       font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; }
a { color: var(--accent); }
h1 { font-size: 1.4rem; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; margin: 0 0 .25rem; }
h3 { font-size: 1rem; margin: 1rem 0 .25rem; }
.container { max-width: 760px; margin: 0 auto; padding: 16px; }
.topbar { display: flex; gap: 12px; align-items: center; padding: 10px 16px;
          background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; text-decoration: none; color: var(--text); margin-inline-end: auto; }
.lang select { font: inherit; padding: 6px; border: 1px solid var(--line); border-radius: 8px;
               background: var(--surface); color: var(--text); max-width: 9rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
        padding: 16px; margin-bottom: 16px; }
.card.narrow { max-width: 420px; margin: 24px auto; }
.muted { color: var(--muted); font-size: .9rem; margin: 0; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.list li:last-child { border-bottom: 0; }
.buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btn { display: inline-block; min-height: 44px; padding: 10px 16px; border: 0; border-radius: 10px;
       background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 600;
       text-decoration: none; cursor: pointer; }
.btn-secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.link { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 8px; }
label { display: block; margin: 12px 0 4px; font-weight: 600; }
input, select, textarea { width: 100%; font: inherit; padding: 10px; border: 1px solid var(--line);
       border-radius: 8px; background: var(--surface); color: var(--text); }
form .btn { margin-top: 16px; width: 100%; }
.error { color: var(--error); }
.msg { background: var(--surface); border-inline-start: 4px solid var(--accent); padding: 8px 12px; border-radius: 6px; }
.donate { max-width: 760px; width: calc(100% - 32px); margin: 8px auto 32px; padding: 16px; background: var(--surface);
          border: 1px solid var(--saffron-light); border-inline-start: 4px solid var(--saffron);
          border-radius: 12px; font-size: .9rem; }
.donate p { margin: 0 0 8px; }
.donate-amount { color: var(--donate); font-weight: 600; }
.btn-donate { background: var(--donate); color: #fff; }
.btn-donate:hover { background: var(--donate-hover); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (min-width: 640px) { .container { padding: 24px; } .list li { flex-direction: row; justify-content: space-between; gap: 12px; } }
.field { margin-bottom: 4px; }
.field.check label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.field.check input { width: auto; margin-top: 4px; flex: none; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--error); }
input[type="file"] { padding: 8px; }
.org-logo { max-height: 56px; max-width: 160px; margin-bottom: 8px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 6px 12px; background: var(--surface);
        border-bottom: 1px solid var(--line); -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tabs a { white-space: nowrap; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: .95rem; }
.tabs a:hover { background: var(--bg); }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--error);
         color: #fff; font-size: .75rem; text-align: center; line-height: 20px; }
.progress { margin: 8px 0 12px; }
.req { margin: 10px 0; }
.req-head { display: flex; justify-content: space-between; gap: 8px; font-size: .95rem; }
.bar { height: 10px; background: var(--line); border-radius: 6px; overflow: hidden; margin-top: 4px; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.req.met .bar > span { background: var(--donate); }
.pill { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: .78rem; font-weight: 600;
        background: var(--bg); border: 1px solid var(--line); }
.pill.confirmed, .pill.documented, .pill.paper, .pill.at_training { color: var(--donate); border-color: var(--donate); }
.pill.awaiting { color: var(--accent); border-color: var(--accent); }
.pill.disputed { color: var(--error); border-color: var(--error); }
.entry { padding: 12px 0; border-bottom: 1px solid var(--line); }
.entry:last-child { border-bottom: 0; }
.entry-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.entry-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.entry-actions form { display: inline; }
.btn-small { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.btn-danger { background: transparent; color: var(--error); border: 1px solid var(--error); }
.warn { color: #9a6700; font-size: .85rem; margin: 4px 0 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.person-card { text-align: center; text-decoration: none; color: var(--text); background: var(--surface);
               border: 1px solid var(--line); border-radius: 12px; padding: 12px 8px; }
.avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: var(--line); display: block; margin: 0 auto 8px; }
.avatar.lg { width: 160px; height: 160px; }
.person-card strong { display: block; font-size: .95rem; }
.searchbar { display: flex; gap: 8px; margin-bottom: 12px; }
.searchbar input { flex: 1; }
.searchbar .btn { margin: 0; width: auto; }
.seg { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.seg a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--text); font-size: .9rem; }
.seg a.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
table.matrix { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.matrix th, table.matrix td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: center; }
table.matrix th:first-child, table.matrix td:first-child { text-align: start; }
table.matrix input { width: auto; }
.hint { background: var(--bg); border-radius: 8px; padding: 10px 12px; font-size: .9rem; }
.demo-banner { background: #fff4d6; color: #5c4400; text-align: center; font-size: .85rem; padding: 6px 12px; }
.demo-banner a { color: inherit; font-weight: 600; }
