/* Georgia — реновація · design tokens from the Figma spec
 * (Figma: «Georgia PM — Mini App», bordeaux/olive/ivory/brass) */
:root {
  --bg: #f3ecdf;
  --card: #fffdf8;
  --ink: #2b211c;
  --hint: #8c7c6d;
  --line: #e4d9c6;
  --bordo: #772b27;
  --bordo-deep: #571e1b;
  --red: #a63a33;
  --green: #46543f;
  --cream: #ede3d0;
  --brass: #ae8a54;
  --brass-soft: #c89a62;
  --chip-todo-bg: #ede3d0;   --chip-todo-fg: #6b5b4c;
  --chip-doing-bg: #e7d8b9;  --chip-doing-fg: #7a5b22;
  --chip-blocked-bg: #f0d9d4;--chip-blocked-fg: #8a2f28;
  --chip-done-bg: #dee8d5;   --chip-done-fg: #3f5a34;
}

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 'Inter', -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif;
  padding-bottom: 44px;
}

/* ---------- header ---------- */
header {
  background: var(--bordo-deep);
  padding: 16px 20px 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.wordmark { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 30px; color: var(--bg); line-height: 1.2; }
.wordsub { font-size: 10.5px; font-weight: 500; letter-spacing: 0.12em; color: var(--brass-soft); text-transform: uppercase; margin-top: 2px; }
.who { text-align: right; }
.who .name { font-size: 13px; font-weight: 600; color: var(--bg); }
.who .role { font-size: 11px; color: #c9b8a5; margin-top: 2px; }

.ribbon {
  background: var(--green);
  color: var(--bg);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  padding: 8px 12px;
}

main, #tabs { padding-left: 16px; padding-right: 16px; }

/* ---------- tabs ---------- */
#tabs {
  display: flex;
  gap: 6px;
  padding-top: 14px;
  padding-bottom: 12px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 5;
}
#tabs button {
  flex: 1;
  border: none;
  border-radius: 11px;
  padding: 9px 2px;
  background: var(--cream);
  color: #6b5b4c;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
#tabs button.active { background: var(--bordo); color: var(--card); font-weight: 600; }

#searchWrap { padding: 0 16px 12px; background: var(--bg); }
#search {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  padding: 10px 12px;
  outline: none;
}
#search:focus { border-color: var(--brass); }

/* ---------- learn ---------- */
.upload-card { text-align: center; }
.upload-card .cta {
  display: inline-block;
  background: var(--bordo);
  color: var(--card);
  border: none;
  border-radius: 11px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  margin: 4px 0 8px;
}
.upload-card .hint-line { color: var(--hint); font-size: 12px; }
.material .top .status { font-size: 11.5px; }
.material .summary { font-size: 13px; color: var(--ink); margin-top: 8px; line-height: 1.45; }
.material .by { color: var(--hint); font-size: 11.5px; margin-top: 6px; }
.material .learned { color: var(--green); font-size: 12px; font-weight: 500; margin-top: 4px; }

h2.section {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 400;
  font-size: 20px;
  margin: 6px 0 12px;
}
h3.group-head {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--hint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 16px 0 8px;
}

/* ---------- task cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 3px 10px rgba(59, 41, 28, 0.07);
}
.card .top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.card .num { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: var(--brass); }
.card .title { font-weight: 600; font-size: 15.5px; line-height: 1.35; }
.card .meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; margin-top: 8px; }
.card .meta .phase { color: var(--green); font-weight: 500; }
.card .meta .due { color: var(--hint); font-weight: 500; }
.card .meta .due.overdue { color: var(--red); }
.card .meta .mates, .card .meta .lock { color: var(--hint); }

.chip { border-radius: 999px; padding: 4px 10px; font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.chip.todo { background: var(--chip-todo-bg); color: var(--chip-todo-fg); }
.chip.doing { background: var(--chip-doing-bg); color: var(--chip-doing-fg); }
.chip.blocked { background: var(--chip-blocked-bg); color: var(--chip-blocked-fg); }
.chip.done { background: var(--chip-done-bg); color: var(--chip-done-fg); }

.status-row { display: flex; gap: 6px; margin-top: 12px; }
.status-row button {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--hint);
  border-radius: 9px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
}
.status-row button.current { background: var(--bordo); border-color: var(--bordo); color: var(--card); font-weight: 600; }

/* ---------- avatars (shared tasks) ---------- */
.ppl { display: flex; }
.ppl .av {
  width: 26px; height: 26px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--card); font-size: 10.5px; font-weight: 600;
  border: 1.5px solid var(--card);
  margin-left: -6px;
}
.ppl .av:first-child { margin-left: 0; }
.ppl .av:nth-child(3n+1) { background: var(--bordo); }
.ppl .av:nth-child(3n+2) { background: var(--green); }
.ppl .av:nth-child(3n)   { background: var(--brass); }

/* ---------- project hero + phases ---------- */
.hero {
  background: var(--bordo-deep);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 3px 10px rgba(59, 41, 28, 0.12);
}
.hero .big { display: flex; align-items: baseline; gap: 8px; color: var(--bg); }
.hero .big .n { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 40px; }
.hero .big .of { font-size: 13px; font-weight: 500; color: #c9b8a5; }
.hero .track { height: 7px; border-radius: 4px; background: #3e1513; margin: 10px 0; overflow: hidden; }
.hero .track > div { height: 100%; border-radius: 4px; background: var(--brass); }
.hero .budget { font-size: 12px; font-weight: 500; color: #c9b8a5; }

.phase { margin-bottom: 10px; }
.phase .label { display: flex; justify-content: space-between; font-size: 13.5px; }
.phase .label .count { color: var(--hint); font-size: 12.5px; }
.phase .bar { height: 6px; border-radius: 3px; background: var(--line); margin-top: 5px; overflow: hidden; }
.phase .bar > div { height: 100%; border-radius: 3px; background: var(--bordo); min-width: 4px; }

.mini-card { padding: 12px; }
.mini-card .title { font-weight: 500; font-size: 13.5px; }

/* ---------- feed ---------- */
.feed { padding: 4px; }
.feed-item { display: flex; gap: 10px; padding: 10px; border-top: 1px solid var(--line); font-size: 13.5px; }
.feed-item:first-child { border-top: none; }
.feed-item .dot { width: 7px; height: 7px; border-radius: 999px; background: var(--brass); margin-top: 6px; flex: none; }
.feed-item:first-child .dot { background: var(--bordo); }
.feed-item .at { color: var(--hint); font-size: 11.5px; margin-top: 3px; }

.empty { color: var(--hint); text-align: center; padding: 30px 10px; }
#error {
  position: fixed; bottom: 12px; left: 12px; right: 12px;
  background: var(--red); color: var(--card);
  padding: 10px 12px; border-radius: 10px; font-size: 13.5px;
  box-shadow: 0 4px 14px rgba(59, 41, 28, 0.25);
}
