/* ЖДЁТ ПРОЧТЕНИЯ СОБСТВЕННИКОМ: look and texts are a first draft.
   Light page, soft white cards, one calm teal accent, coloured chips and
   bars. Nothing here needs a font, an image file or a script: icons are CSS
   masks of small inline vectors (img-src data:), bar widths are the classes
   w0..w100 at the end of the file (the page is not allowed to write styles).
   Light only (owner, 2026-10-29): no dark palette, whatever scheme
   Telegram or the phone reports. */
:root {
  color-scheme: light;
  --page: #f2f5f4;
  --card: #ffffff;
  --fg: #14211e;
  --sub: #4f5f5a;
  --hint: #637069;
  --line: #e3e9e7;
  --track: #e7edeb;
  --accent: #0a7d6b;
  --accent-fg: #ffffff;
  --accent-soft: #e0f2ee;
  --accent-ink: #085e50;
  --shadow: 0 1px 2px rgba(18, 52, 46, 0.05), 0 8px 24px rgba(18, 52, 46, 0.07);
  --red: #d9453f;
  --red-bg: #fdeceb;
  --red-fg: #b02a25;
  --amber: #e39a2d;
  --amber-bg: #fff2d6;
  --amber-fg: #85540a;
  --green: #2b9d5f;
  --green-bg: #e1f5e9;
  --green-fg: #146b3a;
  --teal: #12a38c;
  --teal-bg: #dff3ef;
  --teal-fg: #085e50;
  --gray: #9aa8a3;
  --gray-bg: #ebeff0;
  --gray-fg: #4f5d59;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--fg);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
#app { padding: 12px 16px 28px; max-width: 640px; margin: 0 auto; }
body.hasnav #app { padding-bottom: 108px; }
h1 {
  font-size: 22px; line-height: 1.25; margin: 0; font-weight: 700;
  letter-spacing: -0.01em; overflow-wrap: anywhere;
}
h2 { font-size: 15px; font-weight: 700; margin: 22px 2px 10px; }
button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ---- icons: a mask of a small vector, coloured by the text colour ------ */
.ic {
  display: inline-block; flex: none; width: 22px; height: 22px;
  background-color: currentColor;
  -webkit-mask: var(--ic) center / contain no-repeat;
  mask: var(--ic) center / contain no-repeat;
}
.ic-home { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpath d='M9 22V12h6v10'/%3E%3C/svg%3E"); }
.ic-doc { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M16 13H8M16 17H8M10 9H8'/%3E%3C/svg%3E"); }
.ic-check { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11l3 3L22 4'/%3E%3Cpath d='M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11'/%3E%3C/svg%3E"); }
.ic-plus { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
.ic-users { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Cpath d='M9 3a4 4 0 1 0 0 8 4 4 0 0 0 0-8'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E"); }
.ic-user { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Cpath d='M12 3a4 4 0 1 0 0 8 4 4 0 0 0 0-8'/%3E%3C/svg%3E"); }
.ic-chart { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 20V10M12 20V4M6 20v-6'/%3E%3C/svg%3E"); }
.ic-cal { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 4H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E"); }
.ic-eye { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Cpath d='M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6'/%3E%3C/svg%3E"); }
.ic-tool { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z'/%3E%3C/svg%3E"); }
.ic-sun { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8'/%3E%3Cpath d='M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42'/%3E%3C/svg%3E"); }
.ic-zap { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2L3 14h9l-1 8 10-12h-9l1-8z'/%3E%3C/svg%3E"); }
.ic-alert { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E"); }
.ic-shield { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E"); }
.ic-chev { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E"); }
.ic-back { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3C/svg%3E"); }
.ic-tick { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E"); }
.ic-search { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 3a8 8 0 1 0 0 16 8 8 0 0 0 0-16z'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E"); }

/* ---- header ------------------------------------------------------------ */
.top { display: flex; align-items: center; gap: 10px; margin: 2px 0 14px; }
.top h1 { flex: 1; min-width: 0; }
.back {
  display: inline-flex; align-items: center; gap: 2px; flex: none;
  border: 0; background: var(--card); color: var(--accent-ink); cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 600; min-height: 40px;
  padding: 0 14px 0 8px; border-radius: 20px; box-shadow: var(--shadow);
}
.back .ic { width: 20px; height: 20px; }
.hero { display: flex; align-items: center; gap: 12px; margin: 2px 0 16px; }
.hero .hi { min-width: 0; }
.hero .cap { font-size: 13px; color: var(--hint); }
.hero h1 { font-size: 21px; }
.avatar {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent-ink);
  font-size: 16px; font-weight: 700; letter-spacing: 0.02em;
}
.avatar.big { width: 56px; height: 56px; font-size: 20px; }
.shead {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px; margin: 22px 2px 10px;
}
.shead h2 { margin: 0; }
.shead .more {
  border: 0; background: none; color: var(--accent-ink); font: inherit;
  font-size: 14px; font-weight: 600; cursor: pointer; padding: 4px 0;
}

/* ---- buttons ----------------------------------------------------------- */
.btn {
  display: block; width: 100%; border: 0; border-radius: 14px;
  background: var(--accent); color: var(--accent-fg); text-align: center;
  font: inherit; font-size: 16px; font-weight: 600; min-height: 50px;
  padding: 12px 16px; margin-top: 12px; cursor: pointer;
}
.btn.ghost { background: var(--accent-soft); color: var(--accent-ink); }
.btn.danger { background: var(--red-bg); color: var(--red-fg); }
.actions { display: grid; gap: 0; }
.actions .btn.ghost { margin-top: 10px; }
.sect .btn { min-height: 46px; font-size: 15px; margin-top: 10px; }
button:disabled, .btn:disabled, .kpi:disabled, .row:disabled, .navb:disabled {
  opacity: 0.5; cursor: not-allowed;
}

/* ---- cards, lists, rows ------------------------------------------------ */
.card {
  margin: 0; background: var(--card); border-radius: 18px;
  box-shadow: var(--shadow); padding: 4px 16px;
}
dl.card { padding: 6px 16px 8px; margin-bottom: 12px; }
.kpis + .bars, .kpis + .list, .btn + .list { margin-top: 12px; }
dt { color: var(--hint); font-size: 12.5px; margin-top: 12px; }
dd { margin: 3px 0 8px; overflow-wrap: anywhere; white-space: pre-wrap; }
dd .chip { margin: 1px 0; }
dd.old { color: var(--hint); text-decoration: line-through; }
dd.new { color: var(--accent-ink); font-weight: 600; }
.list { display: grid; gap: 10px; }
.row {
  display: block; position: relative; width: 100%; text-align: left;
  border: 0; border-radius: 16px; background: var(--card); color: var(--fg);
  font: inherit; padding: 14px 16px; box-shadow: var(--shadow);
  overflow-wrap: anywhere;
}
button.row { cursor: pointer; padding-right: 42px; }
button.row::after {
  content: ""; position: absolute; right: 14px; top: 50%;
  width: 18px; height: 18px; margin-top: -9px; background: var(--hint);
  -webkit-mask: var(--chev) center / contain no-repeat;
  mask: var(--chev) center / contain no-repeat;
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E");
}
.row.hasl { display: flex; align-items: center; gap: 12px; }
button.row.hasl { display: flex; }
.row .lead {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent-ink);
}
.row .lead.avatar { border-radius: 50%; font-size: 14px; }
.rbody { display: block; min-width: 0; flex: 1; }
.rt { display: block; font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.row small, .rbody small {
  display: block; color: var(--hint); font-size: 13.5px; margin-top: 5px;
  line-height: 1.35;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chips:empty { display: none; }
.row.sel { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
button.row.sel::after { background: var(--accent); --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E"); }
.row.draft { box-shadow: inset 4px 0 0 var(--amber), var(--shadow); }
.row.draft .btn {
  display: inline-block; width: auto; min-height: 40px; padding: 8px 16px;
  margin: 10px 8px 0 0; font-size: 14.5px;
}
.row .btn { margin-top: 10px; }
.row.countrow { display: block; }
button.countrow { padding-right: 42px; }
.count {
  float: right; margin-left: 12px; font-size: 17px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.countrow .bar { margin-top: 10px; clear: both; }
.msg { padding: 28px 0; text-align: center; color: var(--hint); }
.msg.load::before {
  content: ""; display: block; width: 26px; height: 26px; margin: 0 auto 12px;
  border-radius: 50%; border: 3px solid var(--track);
  border-top-color: var(--accent); animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .msg.load::before { animation: none; }
}
.list > .msg {
  background: var(--card); border: 1px dashed var(--line); border-radius: 16px;
  padding: 22px 12px;
}
.sect {
  margin-top: 12px; background: var(--card); border-radius: 18px;
  padding: 14px 16px 16px; box-shadow: var(--shadow);
}
.sect .sect { margin: 0; padding: 0; background: none; box-shadow: none; }
.sect > h2 {
  font-size: 13px; font-weight: 600; color: var(--sub); margin: 0 0 8px;
}
.sect.ai { background: var(--accent-soft); box-shadow: none; }
.sect.ai > h2 { color: var(--accent-ink); }
.sect.ai .hint { background: var(--card); border-radius: 12px; padding: 8px 12px; margin: 6px 0 8px; }
.sect.ai .row { box-shadow: none; background: var(--card); margin-top: 8px; }

/* ---- notes ------------------------------------------------------------- */
.err {
  color: var(--red-fg); background: var(--red-bg); border-radius: 12px;
  padding: 10px 12px; margin-top: 10px; overflow-wrap: anywhere; font-size: 14.5px;
}
.err:empty { display: none; }
.err .btn { margin-top: 8px; min-height: 40px; font-size: 14.5px; }
.ok {
  color: var(--green-fg); background: var(--green-bg); border-radius: 14px;
  padding: 12px 14px; margin-bottom: 12px; font-weight: 600; font-size: 15px;
}
.hint, .status {
  color: var(--hint); font-size: 13.5px; padding: 6px 2px; overflow-wrap: anywhere;
}
.hint:empty, .status:empty { display: none; }
.status { text-align: right; }
.banner {
  display: flex; align-items: center; gap: 10px; background: var(--accent-soft);
  color: var(--accent-ink); border-radius: 14px; padding: 12px 14px;
  margin-bottom: 12px; font-size: 14.5px; font-weight: 600;
}
.banner.warn { background: var(--amber-bg); color: var(--amber-fg); }

/* ---- chips ------------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; font-size: 12px; font-weight: 600;
  line-height: 1; padding: 5px 9px; border-radius: 999px; white-space: nowrap;
}
.c-red { background: var(--red-bg); color: var(--red-fg); }
.c-amber { background: var(--amber-bg); color: var(--amber-fg); }
.c-green { background: var(--green-bg); color: var(--green-fg); }
.c-teal { background: var(--teal-bg); color: var(--teal-fg); }
.c-gray { background: var(--gray-bg); color: var(--gray-fg); }

/* ---- KPI tiles --------------------------------------------------------- */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  width: 100%; text-align: left; border: 0; border-radius: 18px; padding: 14px;
  font: inherit; color: var(--fg); min-height: 104px; background: var(--card);
  box-shadow: var(--shadow); overflow-wrap: anywhere;
}
button.kpi { cursor: pointer; }
.kpi.wide { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; gap: 14px; }
.kpi .kb { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; align-self: stretch; }
.kpi .kl { font-size: 13px; font-weight: 600; color: var(--sub); }
.kpi .kv {
  font-size: 32px; line-height: 1.05; font-weight: 800; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.kpi .kf { font-size: 12.5px; color: var(--sub); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: auto; }
.kpi.wide .kv { font-size: 28px; }
.kpi.wide .kf { margin-top: 2px; }
.kpi .ic { width: 26px; height: 26px; }
.k-red { background: var(--red-bg); }
.k-red .kv { color: var(--red-fg); }
.k-amber { background: var(--amber-bg); }
.k-amber .kv { color: var(--amber-fg); }
.k-green { background: var(--green-bg); }
.k-green .kv { color: var(--green-fg); }
.k-teal { background: var(--teal-bg); }
.k-teal .kv { color: var(--teal-fg); }
.k-gray .kv { color: var(--fg); }
.kpi .chip { background: rgba(255, 255, 255, 0.7); }

/* ---- bars -------------------------------------------------------------- */
.bar { height: 8px; border-radius: 4px; background: var(--track); overflow: hidden; }
.fill { display: block; height: 100%; border-radius: 4px; background: var(--teal); }
.f-red { background: var(--red); }
.f-amber { background: var(--amber); }
.f-green { background: var(--green); }
.f-teal { background: var(--teal); }
.f-gray { background: var(--gray); }
.bars { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 6px 16px 10px; margin-bottom: 12px; }
.bars .chips { margin: 2px 0 6px; }
.brow { padding: 10px 0; }
.brow + .brow { border-top: 1px solid var(--line); }
.btop { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin-bottom: 7px; }
.btop .bl { color: var(--sub); }
.btop .bv { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stack { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--track); gap: 2px; }
.stack .fill { border-radius: 0; flex: 0 1 auto; min-width: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12.5px; color: var(--sub); }
.legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--teal); }
.dot.f-red { background: var(--red); }
.dot.f-amber { background: var(--amber); }
.dot.f-green { background: var(--green); }
.dot.f-teal { background: var(--teal); }
.dot.f-gray { background: var(--gray); }
.mine, .briefcard {
  display: block; width: 100%; text-align: left; border: 0; font: inherit;
  color: var(--fg); padding: 14px 16px 16px;
}
.mine { margin-bottom: 14px; }
button.mine, button.briefcard { cursor: pointer; }
.mine .mh { display: flex; align-items: center; justify-content: space-between; font-weight: 700; margin-bottom: 10px; }
.mine .mh .ic { color: var(--hint); width: 18px; height: 18px; }
.mine .nums { display: flex; gap: 22px; margin-bottom: 12px; }
.mine .num b { display: block; font-size: 28px; line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; }
.mine .num span { font-size: 12.5px; color: var(--sub); }
.mine .num.red b { color: var(--red-fg); }
.minis { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; margin-top: 12px; }
.mini b { display: block; font-size: 24px; line-height: 1.1; font-weight: 800; font-variant-numeric: tabular-nums; }
.mini span { display: block; font-size: 12.5px; color: var(--sub); margin: 2px 0 4px; }
.m-red b { color: var(--red-fg); }
.m-amber b { color: var(--amber-fg); }
.m-green b { color: var(--green-fg); }
.m-teal b { color: var(--teal-fg); }
.mini .chip { font-size: 11.5px; padding: 4px 8px; }
.row.add { box-shadow: inset 4px 0 0 var(--green), var(--shadow); }
.row.rem { box-shadow: inset 4px 0 0 var(--red), var(--shadow); }
small:empty { display: none; }
.briefcard { margin-top: 14px; }
.briefcard .mh { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700; }
.briefcard .mh span.t { display: flex; align-items: center; gap: 8px; }

/* ---- forms ------------------------------------------------------------- */
input, textarea {
  display: block; width: 100%; margin: 0 0 8px; padding: 12px 14px; min-height: 50px;
  border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--page); color: var(--fg); font: inherit;
}
input::placeholder, textarea::placeholder { color: var(--hint); }
input:focus, textarea:focus { outline: none; border-color: var(--accent); background: var(--card); }
textarea { min-height: 104px; resize: vertical; }
/* A task title: one line that grows with its text (rows set by app.js;
   field-sizing where the WebView has it). */
textarea.grow { min-height: 50px; resize: none; overflow: hidden; field-sizing: content; }
input[type="search"] {
  padding-left: 44px; background-repeat: no-repeat; background-position: 14px center;
  background-size: 18px 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23849089' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 3a8 8 0 1 0 0 16 8 8 0 0 0 0-16z'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E");
}
input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; display: inline-block; flex: none;
  width: 26px; height: 26px; min-height: 0; margin: 0; padding: 0;
  border: 2px solid var(--gray); border-radius: 8px; background: var(--card);
}
input[type="checkbox"]:checked {
  border-color: var(--accent); background-color: var(--accent);
  background-repeat: no-repeat; background-position: center; background-size: 16px 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
}
input[type="checkbox"]:disabled { opacity: 0.4; }
.row.check { display: flex; align-items: center; gap: 14px; margin: 0; cursor: pointer; }
.list > .row.check { margin: 0; }
.nodes > .row.check, #app > .row.check { margin: 8px 0; }

/* ---- bottom navigation -------------------------------------------------- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: center; background: var(--card);
  border-top: 1px solid var(--line);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
}
.nav[hidden] { display: none; }
.navin { display: flex; width: 100%; max-width: 640px; gap: 2px; }
.navb {
  position: relative; flex: 1 1 0; min-width: 0; border: 0; background: none;
  color: var(--hint); font: inherit; font-size: 10.5px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 4px 0 2px; border-radius: 12px; cursor: pointer;
}
.navb .nl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navb .navi { display: flex; align-items: center; justify-content: center; width: 46px; height: 30px; border-radius: 15px; }
.navb .ic { width: 22px; height: 22px; }
.navb.on { color: var(--accent-ink); }
.navb.on .navi { background: var(--accent-soft); }
.navb.cta .navi { background: var(--accent); color: var(--accent-fg); }
.nbadge {
  position: absolute; top: -2px; left: 50%; margin-left: 6px; min-width: 18px;
  height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red);
  color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.nbadge.amber { background: var(--amber); color: #3a2600; }

/* ---- bar widths (the page may not write styles, so they are classes) --- */
.w0 { width: 0%; }
.w1 { width: 1%; }
.w2 { width: 2%; }
.w3 { width: 3%; }
.w4 { width: 4%; }
.w5 { width: 5%; }
.w6 { width: 6%; }
.w7 { width: 7%; }
.w8 { width: 8%; }
.w9 { width: 9%; }
.w10 { width: 10%; }
.w11 { width: 11%; }
.w12 { width: 12%; }
.w13 { width: 13%; }
.w14 { width: 14%; }
.w15 { width: 15%; }
.w16 { width: 16%; }
.w17 { width: 17%; }
.w18 { width: 18%; }
.w19 { width: 19%; }
.w20 { width: 20%; }
.w21 { width: 21%; }
.w22 { width: 22%; }
.w23 { width: 23%; }
.w24 { width: 24%; }
.w25 { width: 25%; }
.w26 { width: 26%; }
.w27 { width: 27%; }
.w28 { width: 28%; }
.w29 { width: 29%; }
.w30 { width: 30%; }
.w31 { width: 31%; }
.w32 { width: 32%; }
.w33 { width: 33%; }
.w34 { width: 34%; }
.w35 { width: 35%; }
.w36 { width: 36%; }
.w37 { width: 37%; }
.w38 { width: 38%; }
.w39 { width: 39%; }
.w40 { width: 40%; }
.w41 { width: 41%; }
.w42 { width: 42%; }
.w43 { width: 43%; }
.w44 { width: 44%; }
.w45 { width: 45%; }
.w46 { width: 46%; }
.w47 { width: 47%; }
.w48 { width: 48%; }
.w49 { width: 49%; }
.w50 { width: 50%; }
.w51 { width: 51%; }
.w52 { width: 52%; }
.w53 { width: 53%; }
.w54 { width: 54%; }
.w55 { width: 55%; }
.w56 { width: 56%; }
.w57 { width: 57%; }
.w58 { width: 58%; }
.w59 { width: 59%; }
.w60 { width: 60%; }
.w61 { width: 61%; }
.w62 { width: 62%; }
.w63 { width: 63%; }
.w64 { width: 64%; }
.w65 { width: 65%; }
.w66 { width: 66%; }
.w67 { width: 67%; }
.w68 { width: 68%; }
.w69 { width: 69%; }
.w70 { width: 70%; }
.w71 { width: 71%; }
.w72 { width: 72%; }
.w73 { width: 73%; }
.w74 { width: 74%; }
.w75 { width: 75%; }
.w76 { width: 76%; }
.w77 { width: 77%; }
.w78 { width: 78%; }
.w79 { width: 79%; }
.w80 { width: 80%; }
.w81 { width: 81%; }
.w82 { width: 82%; }
.w83 { width: 83%; }
.w84 { width: 84%; }
.w85 { width: 85%; }
.w86 { width: 86%; }
.w87 { width: 87%; }
.w88 { width: 88%; }
.w89 { width: 89%; }
.w90 { width: 90%; }
.w91 { width: 91%; }
.w92 { width: 92%; }
.w93 { width: 93%; }
.w94 { width: 94%; }
.w95 { width: 95%; }
.w96 { width: 96%; }
.w97 { width: 97%; }
.w98 { width: 98%; }
.w99 { width: 99%; }
.w100 { width: 100%; }
