@font-face { font-family: "Heebo"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url("fonts/heebo-hebrew.woff2") format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Heebo"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url("fonts/heebo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #0d121c; --card: #131a28; --line: #222c42; --gold: #e2c06e; --text: #e8ecf4;
  --muted: #8d98ae; --field: #0f1522;
  --green: #5fd38d; --orange: #f0a84b; --blue: #6fa8f5; --gray: #94a0b6; --red: #ef7b7b;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 16px; line-height: 1.55; min-height: 100dvh; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul { list-style: none; padding: 0; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.center { text-align: center; justify-content: center; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px max(20px, env(safe-area-inset-left)) 12px max(20px, env(safe-area-inset-right));
  background: rgba(13, 18, 28, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.logo { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--gold); color: var(--bg);
  font-weight: 800; font-size: 23px; line-height: 1; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 19px; font-weight: 700; }
.brand-text span { font-size: 13px; color: var(--muted); }
.search { flex: 1 1 220px; min-width: 0; }
.search input { width: 100%; }
.nav { display: flex; align-items: center; gap: 16px; font-size: 15px; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav form { display: flex; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 24px 20px 64px; }

/* ---------- controls ---------- */
input, select, textarea, button { font: inherit; color: inherit; }
input:not([type=checkbox]), select, textarea { width: 100%; background: var(--field); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 13px; min-height: 44px; }
textarea { resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #5f6b82; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
label > input, label > select, label > textarea { margin-top: 5px; color: var(--text); font-size: 16px; }
label small { color: #6c7890; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 18px; border-radius: 10px;
  border: 1px solid var(--line); background: #182134; color: var(--text); font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #33405e; background: #1c2740; text-decoration: none; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #17130a; font-weight: 700; }
.btn.gold:hover { background: #ecd08a; border-color: #ecd08a; }
.btn.gold-line { border-color: rgba(226, 192, 110, .5); color: var(--gold); background: transparent; }
.btn.gold-line:hover { background: rgba(226, 192, 110, .1); }
.btn.small { min-height: 36px; padding: 4px 13px; font-size: 14px; }
.btn.block { width: 100%; }
.linklike { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font-size: inherit; }
.linklike:hover { color: var(--text); text-decoration: underline; }
.linklike.danger { color: var(--red); font-size: 14px; }
.icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; background: none; border: 0; border-radius: 8px; color: #6f7b93;
  cursor: pointer; font-size: 15px; }
.icon:hover { background: #1c2740; color: var(--text); }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h2 { font-size: 17px; font-weight: 700; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h2 { margin-inline-end: auto; }
.card-head .count { margin-inline-end: auto; }
.card-head h2 + .count { margin-inline-start: -2px; }
.card-head:has(.count) h2 { margin-inline-end: 0; }
.count { font-size: 13px; color: var(--muted); background: #1a2338; border-radius: 99px; padding: 1px 9px; font-variant-numeric: tabular-nums; }
.hint { font-size: 13px; color: #6f7b93; margin-top: 12px; }

.tag { display: inline-block; font-size: 13px; font-weight: 600; padding: 2px 11px; border-radius: 99px; white-space: nowrap; border: 1px solid transparent; }
.tag.green { color: var(--green); background: rgba(95, 211, 141, .12); border-color: rgba(95, 211, 141, .28); }
.tag.orange { color: var(--orange); background: rgba(240, 168, 75, .12); border-color: rgba(240, 168, 75, .28); }
.tag.blue { color: var(--blue); background: rgba(111, 168, 245, .12); border-color: rgba(111, 168, 245, .28); }
.tag.gray { color: var(--gray); background: rgba(148, 160, 182, .1); border-color: rgba(148, 160, 182, .25); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.green { background: var(--green); } .dot.orange { background: var(--orange); } .dot.blue { background: var(--blue); } .dot.gray { background: var(--gray); }

/* ---------- home ---------- */
.today { margin-bottom: 24px; border-inline-start: 3px solid var(--gold); }
.today h2 { margin-bottom: 10px; }
.today-list li { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-top: 1px solid #1b2437; }
.today-list li:first-child { border-top: 0; }
.today-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.today-project { font-size: 14px; color: var(--muted); white-space: nowrap; }
.toolbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs { display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.tabs a { display: flex; align-items: center; gap: 7px; padding: 7px 16px; border-radius: 9px; color: var(--muted); font-weight: 500; min-height: 38px; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.on { background: #1f2a42; color: var(--text); }
.tabs a.on .count { background: var(--gold); color: #17130a; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 38px; padding: 5px 15px; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; }
.chip:hover { color: var(--text); border-color: #33405e; }
.chip.on { background: rgba(226, 192, 110, .13); border-color: var(--gold); color: var(--gold); font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(275px, 1fr)); gap: 16px; }
.project { position: relative; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, transform .15s; }
.project:hover { border-color: #3a4868; transform: translateY(-2px); }
.project .cover { position: absolute; inset: 0; border-radius: var(--radius); z-index: 1; }
.project-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.project h3 { font-size: 18px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.cat { font-size: 13px; color: var(--muted); }
.summary { color: #c3cbdb; font-size: 15px; }
.project .summary { flex: 1; min-height: 46px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.summary.empty { color: #57627a; }
.quick { display: flex; flex-wrap: wrap; gap: 6px 14px; padding-top: 10px; border-top: 1px solid #1b2437; min-height: 37px; font-size: 14px; position: relative; z-index: 2; }
.quick:empty { pointer-events: none; }
.quick a { padding: 2px 0; }
.quick .linklike { color: var(--gold); }
.empty-note { text-align: center; padding: 40px 0; }

/* ---------- project page ---------- */
.backlink { display: inline-block; color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.phead { margin-bottom: 22px; }
.phead-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.phead h1 { font-size: 30px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.phead .summary { margin-top: 8px; font-size: 16px; max-width: 70ch; }
.phead-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.main, .side { display: grid; gap: 18px; min-width: 0; }
.tasks li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid #1b2437; }
.tasks li:first-child { border-top: 0; }
.tasks .none { padding: 10px 0; }
.task-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tasks.done .task-title { color: var(--muted); text-decoration: line-through; }
.check { width: 24px; height: 24px; margin: 6px; flex: none; border-radius: 7px; border: 2px solid #44506c; background: transparent; cursor: pointer;
  display: grid; place-items: center; color: #17130a; font-size: 14px; font-weight: 800; padding: 0; }
.check:hover { border-color: var(--gold); background: rgba(226, 192, 110, .15); }
.check.on { background: var(--gold); border-color: var(--gold); }
.tasks form, .today-list form, .rows form { display: flex; }
.urgent { font-size: 12px; padding: 2px 10px; min-height: 28px; border-radius: 99px; border: 1px dashed #36425e; background: transparent; color: #62708a; cursor: pointer; }
.urgent:hover { color: var(--orange); border-color: var(--orange); }
.urgent.on { border-style: solid; border-color: rgba(240, 168, 75, .5); background: rgba(240, 168, 75, .13); color: var(--orange); font-weight: 600; }
.adder { margin-top: 12px; }
.adder summary, .done-box summary { list-style: none; cursor: pointer; }
.adder summary::-webkit-details-marker, .done-box summary::-webkit-details-marker { display: none; }
.adder[open] summary { display: none; }
.inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline-form input[name=title] { flex: 1 1 220px; }
.checkline { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--text); white-space: nowrap; }
.checkline input { width: 18px; height: 18px; accent-color: var(--gold); }
.done-box { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.done-box summary { color: var(--muted); font-size: 14px; }
.done-box summary::before { content: "◂ "; }
.done-box[open] summary::before { content: "▾ "; }
.rows li { display: flex; align-items: center; gap: 2px; padding: 8px 0; border-top: 1px solid #1b2437; }
.rows li:first-child { border-top: 0; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--text); margin-inline-end: 6px; }
.row-main strong { font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
a.row-main strong { color: var(--gold); }
.row-main span { font-size: 13px; color: var(--muted); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: plaintext; }
.row-main em { font-style: normal; font-size: 12px; color: #6f7b93; }
.danger-zone { background: transparent; border-style: dashed; padding: 12px 20px; }
.more-link { display: inline-block; margin-top: 12px; font-size: 14px; }

/* ---------- reports ---------- */
.report { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #0f1522; }
.report + .report { margin-top: 12px; }
.report > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.report h3 { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.report .meta { font-size: 13px; color: var(--muted); }
.report .src { color: var(--gold); }
.report-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.md { font-size: 15px; color: #d2d9e6; overflow-wrap: anywhere; }
.md.clamp { max-height: 300px; overflow: hidden; }
.md.clamp.cut { -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.md > * + * { margin-top: 8px; }
.md h3, .md h4, .md h5, .md h6 { color: var(--text); font-weight: 700; margin-top: 16px; }
.md h3 { font-size: 18px; } .md h4 { font-size: 16.5px; } .md h5, .md h6 { font-size: 15px; }
.md > :first-child { margin-top: 0; }
.md ul, .md ol { padding-inline-start: 22px; }
.md ul { list-style: disc; } .md ol { list-style: decimal; }
.md li + li { margin-top: 4px; }
.md code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; background: #1a2338; padding: 1px 6px; border-radius: 5px; direction: ltr; unicode-bidi: isolate; }
.md pre { background: #0a0e17; border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow-x: auto; direction: ltr; text-align: left; }
.md pre code { background: none; padding: 0; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.more { margin-top: 8px; color: var(--gold); font-size: 14px; }

/* ---------- dialogs ---------- */
.dlg { width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; background: var(--card); color: var(--text); border: 1px solid #2c3854; border-radius: 16px;
  padding: 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.dlg.wide { width: min(720px, calc(100vw - 24px)); }
.dlg::backdrop { background: rgba(5, 8, 14, .72); }
.dlg h2 { font-size: 20px; margin-bottom: 16px; }
.dlg-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.brief { font-size: 14px; margin: 12px 0; }

/* ---------- auth ---------- */
body.auth { display: grid; place-items: center; padding: 20px; }
.auth-card { width: min(420px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 30px 28px; }
.auth-card .brand { margin-bottom: 24px; }
.auth-card h1 { font-size: 22px; margin-bottom: 8px; }
.auth-card > p { margin-bottom: 14px; }
.auth-card form { margin-top: 16px; }
.auth-card form + form { text-align: center; font-size: 14px; }
.step { color: var(--gold); font-size: 13px; font-weight: 600; margin-bottom: 4px !important; }
.steps { list-style: decimal; padding-inline-start: 20px; color: #c3cbdb; margin: 10px 0 16px; font-size: 15px; }
.steps li + li { margin-top: 4px; }
.qr { display: grid; place-items: center; margin-bottom: 12px; }
.qr img { border-radius: 12px; display: block; }
.secret { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-align: center; font-size: 15px; letter-spacing: .5px; background: var(--field); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px; user-select: all; -webkit-user-select: all; overflow-wrap: anywhere; margin-bottom: 10px !important; }
.code { font-size: 24px !important; letter-spacing: 6px; text-align: center; font-variant-numeric: tabular-nums; }
.error, .ok { border-radius: 10px; padding: 10px 14px; font-size: 15px; margin-bottom: 14px; }
.error { background: rgba(239, 123, 123, .1); border: 1px solid rgba(239, 123, 123, .35); color: #f7a3a3; }
.ok { background: rgba(95, 211, 141, .1); border: 1px solid rgba(95, 211, 141, .3); color: var(--green); }

.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; align-items: start; }
.settings h2 { margin-bottom: 12px; }
.settings h2.gap { margin-top: 26px; }
.settings .muted { margin-bottom: 12px; font-size: 15px; }
.stack { max-width: 380px; }

.toast { position: fixed; bottom: calc(22px + env(safe-area-inset-bottom)); left: 50%; transform: translate(-50%, 20px); background: var(--gold); color: #17130a; font-weight: 700;
  padding: 9px 20px; border-radius: 99px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- tablet & phone ---------- */
@media (max-width: 980px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .top { gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .brand-text span { display: none; }
  .search { order: 5; flex-basis: 100%; }
  .nav { margin-inline-start: auto; gap: 13px; font-size: 14px; }
  .top > .btn.gold { order: 4; padding: 8px 13px; }
  .nav { order: 3; }
  .wrap { padding: 16px 14px 56px; }
  .card { padding: 16px; }
  .phead h1 { font-size: 25px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: -14px; padding-inline: 14px; scrollbar-width: none; max-width: 100vw; }
  .filters::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .grid { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; gap: 0; }
  .today-list li { flex-wrap: wrap; }
  .today-project { flex-basis: 100%; padding-inline-start: 58px; margin-top: -8px; }
  .dlg { padding: 18px; }
  .report > header { flex-direction: column; }
  .report-actions { align-self: flex-start; }
  .project:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
