:root {
  --gold: #8a6420; --gold-bg: #f7efdf; --ink: #1b1b1b; --muted: #5f5f5f; --line: #d9d4c8;
  --bg: #fbfaf7; --card: #fff; --yes: #1d6b3a; --no: #a32424; --warn: #8a5a00;
  --yes-bg: #e4f3e9; --no-bg: #fbe7e7; --warn-bg: #fff2d6;
}
* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.5;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 16px;
  background: #1b1b1b; color: #fff; position: sticky; top: 0; z-index: 5; }
.brand { color: #f0d69a; font-weight: 700; text-decoration: none; }
.who { font-size: 0.9rem; }
main { max-width: 880px; margin: 0 auto; padding: 12px 16px 96px; }
.pad { padding: 24px 0; }
h1 { font-size: 1.4rem; margin: 16px 0 8px; } h2 { font-size: 1.15rem; margin: 0 0 6px; } h3 { font-size: 1rem; margin: 0 0 4px; }
.muted { color: var(--muted); } .small { font-size: 0.9rem; }
a { color: var(--gold); }
button, select, input, textarea { font: inherit; color: inherit; }
.btn { min-height: 44px; min-width: 44px; padding: 8px 16px; border: 1px solid var(--line); background: var(--card);
  border-radius: 8px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center;
  justify-content: center; gap: 6px; }
.btn:hover { border-color: var(--gold); }
.btn:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid #c39241; outline-offset: 2px; }
.btn.primary { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn.sel { background: var(--gold-bg); border-color: var(--gold); box-shadow: inset 0 0 0 2px var(--gold); font-weight: 600; }
.btn.small { min-height: 44px; font-size: 0.9rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 12px 0; }
.login { max-width: 420px; margin: 32px auto; }
.field { display: block; margin: 12px 0; }
.field > span { display: block; font-weight: 600; margin-bottom: 4px; }
input[type=text], input[type=password], input[type=number], input[type=tel], select, textarea {
  width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #b9b3a4; border-radius: 8px; background: #fff; }
textarea { min-height: 88px; resize: vertical; }
.err { color: var(--no); font-weight: 600; }
.bar { height: 12px; border-radius: 6px; background: #e8e3d6; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--gold); width: 0; transition: width 0.2s; }
.bar.other > i { background: #6e7f8d; }
.sec { display: block; }
.row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; }
.cnt { font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chips .btn { border-radius: 22px; }
.pill { display: inline-block; padding: 1px 10px; border-radius: 12px; font-size: 0.85rem; font-weight: 600; background: var(--gold-bg); }
.pill.yes { background: var(--yes-bg); color: var(--yes); } .pill.no { background: var(--no-bg); color: var(--no); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.why { background: var(--warn-bg); border-left: 4px solid var(--gold); padding: 8px 12px; border-radius: 6px; margin: 10px 0; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; color: var(--muted); }
.chains { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; margin: 10px 0; }
.chain { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: #fdfcf9; }
.chain h3 { color: var(--gold); }
.chain dl { margin: 0; } .chain dt { font-size: 0.8rem; color: var(--muted); margin-top: 6px; } .chain dd { margin: 0; overflow-wrap: anywhere; }
.chain dd.empty { color: var(--no); font-style: italic; }
.evid { margin: 12px 0; } .evid img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; display: block; }
.evid figure { margin: 0 0 12px; } .evid figcaption { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-top: 6px; }
details { margin: 8px 0; } summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
.q { font-size: 1.1rem; font-weight: 700; margin: 16px 0 8px; }
.opts { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.opts .btn { justify-content: flex-start; text-align: left; }
.opts .k { display: inline-block; min-width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 4px; background: #1b1b1b; color: #fff; font-size: 0.8rem; }
.ctl { margin: 10px 0; padding: 8px; border-radius: 8px; border: 2px solid transparent; }
.ctl.active { border-color: #e6d3a8; }
.ctlctx { background: #f4f1e8; border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; }
.ctlctx ul { margin: 4px 0; padding-left: 18px; } .ctlctx li { overflow-wrap: anywhere; }
.agree { border-radius: 10px; padding: 10px 14px; margin: 14px 0; border: 1px solid var(--line); background: #f4f6f8; }
.agree.same { background: var(--yes-bg); border-color: #a9d4b8; } .agree.diff { background: var(--no-bg); border-color: #e3a9a9; }
.navbar { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 8px 12px; z-index: 6; }
.navbar .in { max-width: 880px; margin: 0 auto; display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.status { flex: 1; text-align: center; font-size: 0.9rem; min-width: 0; }
.status.saved { color: var(--yes); } .status.error { color: var(--no); font-weight: 700; } .status.saving { color: var(--muted); }
.list a.item { display: flex; justify-content: space-between; gap: 8px; min-height: 44px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
kbd { background: #eee; border: 1px solid #ccc; border-radius: 4px; padding: 0 5px; font-size: 0.85rem; }
@media (max-width: 520px) { .navbar .btn { padding: 8px 10px; } }
@media (prefers-reduced-motion: reduce) { .bar > i { transition: none; } }
.lnk { text-decoration: none; color: inherit; display: block; } .lnk:hover { border-color: var(--gold); }
.tight { margin: 6px 0 0; }
.pdfrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
[hidden]{display:none!important}
