/* EdenFolio board – the app's palette (mobile/src/theme/colors.ts), calm, RTL with logical properties only. */
:root {
  --forest: #0F3D2E; --sage: #A7B895; --gold: #D4B06A; --ivory: #FAF7EE; --olive: #2B2B26;
  --surface: #FFFDF8; --line: #E8E2D0; --muted: #6F6F63; --link: #86671F;
  --up: #2F7D57; --up-bg: #E3EDDD; --stone: #76705F; --stone-bg: #ECE8DD; --sage-bg: #EEF2E8;
  --r: 14px; --tabs: 64px;
  --shadow: 0 4px 16px rgba(15, 61, 46, .11);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ivory); color: var(--olive); }
body {
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Heebo", "Segoe UI", Arial, sans-serif;
  padding-bottom: calc(var(--tabs) + env(safe-area-inset-bottom) + 16px);
  -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--link); }
code { font: 13px ui-monospace, Menlo, monospace; background: var(--stone-bg); padding: 1px 5px; border-radius: 5px; direction: ltr; unicode-bidi: isolate; }

.top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: baseline; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 14px) 18px 12px; background: rgba(250, 247, 238, .96);
  border-block-end: 1px solid var(--line);
}
.top h1 { margin: 0; font-size: 22px; color: var(--forest); font-family: "Frank Ruhl Libre", Georgia, serif; }
.top .sub { color: var(--muted); font-size: 14px; }
.back { border: 0; background: none; font-size: 22px; color: var(--forest); padding: 0 0 0 6px; min-width: 44px; min-height: 44px; cursor: pointer; }

main { padding: 14px 16px; max-width: 760px; margin: 0 auto; }

.tabs {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 6; display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabs) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 253, 248, .97); border-block-start: 1px solid var(--line);
}
.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: 12.5px; position: relative; }
.tabs a .ic { font-size: 19px; line-height: 1; }
.tabs a.on { color: var(--forest); font-weight: 600; }
.tabs b { position: absolute; top: 7px; inset-inline-start: 50%; margin-inline-start: 10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--gold); color: var(--olive); font-size: 11px; line-height: 18px; text-align: center; }

h2 { font-size: 15px; color: var(--forest); margin: 22px 2px 8px; display: flex; gap: 8px; align-items: baseline; }
h2 .n { color: var(--muted); font-weight: 400; font-size: 13px; }

.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; margin: 0 0 10px; }
.sprint .goal { color: var(--muted); font-size: 14px; margin: 2px 0 10px; }
.bar { height: 6px; border-radius: 3px; background: var(--sage-bg); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--forest); border-radius: 3px; }
.meta { color: var(--muted); font-size: 13px; margin-top: 6px; }

.list { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: block; text-decoration: none; color: inherit; background: var(--surface); border-radius: 12px;
  padding: 12px 14px; box-shadow: 0 1px 0 var(--line); border-inline-start: 4px solid transparent; min-height: 44px;
}
.row.me { border-inline-start-color: var(--gold); }
.row.doing { border-inline-start-color: var(--sage); }
.row .t { font-size: 15.5px; line-height: 1.4; overflow-wrap: anywhere; }
.row .chips { margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: var(--stone-bg); color: var(--olive); white-space: nowrap; }
.chip.key { direction: ltr; unicode-bidi: isolate; color: var(--muted); background: none; padding-inline: 0; }
.chip.ok { background: var(--up-bg); color: var(--up); }
.chip.sage { background: var(--sage-bg); color: var(--forest); }
.chip.gold { background: #F6EDD7; color: var(--link); }
.chip.ltr { direction: ltr; unicode-bidi: isolate; }
.linkrow { display: flex; justify-content: space-between; align-items: center; text-decoration: none; color: var(--forest); background: #F6EDD7; padding: 12px 14px; border-radius: 12px; min-height: 44px; }
.muted { color: var(--muted); }
.empty { color: var(--muted); padding: 10px 2px; font-size: 14px; }

details.group { margin: 0 0 8px; }
details.group > summary { list-style: none; cursor: pointer; padding: 10px 2px; color: var(--forest); font-weight: 600; display: flex; justify-content: space-between; min-height: 44px; align-items: center; }
details.group > summary::-webkit-details-marker { display: none; }
details.group > summary::after { content: "▾"; color: var(--muted); }
details.group:not([open]) > summary::after { content: "◂"; }

.btn { border: 1px solid var(--line); background: var(--surface); color: var(--forest); border-radius: 12px; padding: 10px 14px; min-height: 44px; cursor: pointer; }
.btn.primary { background: var(--forest); color: var(--ivory); border-color: var(--forest); }
.btn.quiet { background: none; border-color: transparent; color: var(--link); padding-inline: 4px; }
.btn:disabled { opacity: .55; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 1px solid var(--line); background: var(--surface); border-radius: 18px; padding: 7px 12px; min-height: 40px; cursor: pointer; font-size: 14px; }
.seg button.on { background: var(--forest); color: var(--ivory); border-color: var(--forest); }

.opt { overflow-wrap: anywhere; display: block; width: 100%; text-align: start; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px 14px; margin: 0 0 8px; cursor: pointer; min-height: 44px; }
.opt.rec { border-color: var(--gold); }
.opt.on { border-color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); }
.opt b { color: var(--forest); margin-inline-end: 6px; }

input[type=search], input[type=text], textarea, select {
  width: 100%; border: 1px solid #CFC8B4; background: var(--surface); border-radius: 12px; padding: 10px 12px; min-height: 44px;
}
textarea { min-height: 96px; resize: vertical; }
label.f { display: block; margin: 12px 0 4px; color: var(--muted); font-size: 14px; }

.body { font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.body h3, .body h4 { color: var(--forest); margin: 14px 0 4px; font-size: 16px; }
.body ul, .body ol { padding-inline-start: 20px; margin: 6px 0; }
.body pre { background: var(--stone-bg); padding: 10px; border-radius: 10px; overflow-x: auto; direction: ltr; text-align: left; font-size: 12.5px; white-space: pre; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 8px 0; border-block-end: 1px solid var(--line); font-size: 14px; }
.timeline .who { color: var(--muted); font-size: 12.5px; }

.toast { position: fixed; bottom: calc(var(--tabs) + env(safe-area-inset-bottom) + 12px); inset-inline: 16px; background: var(--forest); color: var(--ivory); padding: 12px 16px; border-radius: 12px; z-index: 9; text-align: center; }

.gone { max-width: 520px; margin: 60px auto; padding: 0 20px; }
.gone h1 { color: var(--forest); font-family: "Frank Ruhl Libre", Georgia, serif; }

@media (min-width: 900px) {
  main { max-width: 1100px; }
  .cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
}
@media (prefers-reduced-motion: no-preference) { .bar i { transition: width .4s ease; } }
.gap { margin-top: 8px; }
.btns.flush, h2.flush { margin-top: 0; }
.t.big { font-size: 18px; color: var(--forest); font-weight: 600; }
.tw { overflow-x: auto; margin: 8px 0; }
table.mdt { border-collapse: collapse; font-size: 13.5px; width: max-content; min-width: 100%; }
table.mdt th, table.mdt td { border-block-end: 1px solid var(--line); padding: 6px 8px; text-align: start; vertical-align: top; max-width: 240px; overflow-wrap: normal; word-break: normal; }
table.mdt th { color: var(--forest); font-weight: 600; background: var(--sage-bg); white-space: nowrap; }
