:root {
  --bg: #f6f7f4; --surface: #ffffff; --text: #1c2119; --muted: #5f6a5a; --line: #dfe3da;
  --accent: #2f7a3a; --accent-text: #ffffff; --warn: #b4560b; --warn-bg: #fff3e5;
  --error: #b42318; --error-bg: #fdecea; --ok: #1f6b33; --ok-bg: #e7f5ea; --changed-bg: #fff8e1;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141713; --surface: #1d211b; --text: #e8ebe5; --muted: #a3ad9e; --line: #343a31;
    --accent: #5fb36c; --accent-text: #0e1a10; --warn: #f0a35c; --warn-bg: #3a2a18;
    --error: #ff8a80; --error-bg: #3b1d1a; --ok: #8fd69c; --ok-bg: #1b3221; --changed-bg: #352f18;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", "Noto Sans Georgian", sans-serif; }
a { color: var(--accent); }
h1 { font-size: 1.3rem; margin: .2rem 0 .5rem; }
h2 { font-size: 1.1rem; margin: 0 0 .3rem; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; }
.top-actions { display: flex; gap: 12px; }
.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; color: var(--accent); font: inherit; padding: 6px 0; cursor: pointer; }
main { max-width: 760px; margin: 0 auto; padding: 12px 16px 120px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.card.narrow { max-width: 400px; margin: 32px auto; }
.center { text-align: center; }
.stack { display: grid; gap: 12px; }
label { display: grid; gap: 4px; font-weight: 600; }
input, select { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 44px; width: 100%; }
input.short { width: 5.5em; display: inline-block; }
button.primary, button.secondary { font: inherit; font-weight: 600; border-radius: 8px; min-height: 48px; padding: 0 20px; cursor: pointer; }
button.primary { background: var(--accent); color: var(--accent-text); border: 0; }
button.secondary { background: var(--surface); color: var(--accent); border: 1px solid var(--accent); }
.muted { color: var(--muted); }
.alert { padding: 10px 12px; border-radius: 8px; margin: 8px 0 0; }
.alert.error { background: var(--error-bg); color: var(--error); }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.chip { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); margin: 4px 0; }
.chip.open { border-color: var(--accent); }
.chip.urgent { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }
.chip.closed { color: var(--muted); }
.answer { margin: 8px 0 0; }
.intro { margin: 4px 2px 12px; }
.lines { display: grid; gap: 8px; }
.line { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.line.changed { background: var(--changed-bg); border-color: var(--warn); }
.line-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.name { font-weight: 600; overflow-wrap: anywhere; }
.rec { white-space: nowrap; }
.facts { font-size: .9rem; margin: 2px 0 8px; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper input { width: 6.5em; text-align: center; font-weight: 600; }
.step { min-width: 48px; min-height: 48px; font-size: 1.4rem; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; }
.unit { color: var(--muted); }
.why-fields { display: none; gap: 6px; margin-top: 8px; }
.line.changed .why-fields { display: grid; }
.no-js .why-fields { display: grid; }
details.why { margin-top: 6px; font-size: .85rem; color: var(--muted); }
details.why p { margin: 4px 0 0; overflow-wrap: anywhere; }
.final { margin-top: 4px; }
.tag { display: inline-block; font-size: .8rem; padding: 1px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.add { margin-top: 16px; }
.add input[type=search] { margin: 6px 0 10px; }
.hidden { display: none !important; }
.bar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.bar .primary { flex: 0 0 auto; min-width: 40%; }
.no-changes { margin: 16px 0; }
.no-changes button { width: 100%; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.row label { display: block; font-weight: 400; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table.board { border-collapse: collapse; width: 100%; font-size: .92rem; }
.board th, .board td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.tag.st-submitted { border-color: var(--accent); color: var(--ok); }
.tag.st-no_changes { color: var(--ok); }
.tag.st-viewed { border-color: var(--warn); color: var(--warn); }
.tag.st-not_opened { color: var(--error); }
.pulse { width: 14px; height: 14px; margin: 16px auto; border-radius: 50%; background: var(--accent); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { opacity: 1; transform: scale(.8); } 70% { opacity: .2; transform: scale(1.6); } 100% { opacity: 1; transform: scale(.8); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
