/* Orbit site. Colours come from the place itself: dry sage ground, walnut-leaf green, spring water, pomegranate. */
:root {
  --ground: #eef2ee; --sheet: #fbfdfb; --ink: #14261f; --soft: #52645b; --line: #d3dcd5; --leaf: #1c6b45; --on-leaf: #ffffff; --leaf-wash: #dcebe1;
  --water: #1b6fa3; --pom: #ad2443; --pom-wash: #f7e1e6; --sun: #8a5800; --sun-wash: #f6e9cd; --soil: #b49a78;
  --k0: #1c7a4c; --k1: #c22f55; --k2: #2f74c0; --k3: #d97a00; --k4: #7b4fb5; --k5: #0f8b8d; --k6: #8c5a2b; --k7: #b8a100; --kx: #7c8a83;
  --r: 14px; --gap: 18px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0e1714; --sheet: #15221d; --ink: #e4ece7; --soft: #9db0a6; --line: #2a3b34; --leaf: #74c79b; --on-leaf: #08150f; --leaf-wash: #1d3a2c;
    --water: #78bdea; --pom: #f290a3; --pom-wash: #44202a; --sun: #e6b859; --sun-wash: #3c3016; --soil: #8a765a;
    --k0: #4fbf85; --k1: #f0718f; --k2: #6fabf0; --k3: #f2a043; --k4: #b490ea; --k5: #4cc5c6; --k6: #c79668; --k7: #dccb4e; --kx: #93a19a;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--ground); color: var(--ink); overflow-wrap: anywhere;
  font: 400 16px/1.85 Vazirmatn, Vazir, "Segoe UI", "SF Arabic", "Geeza Pro", "Noto Sans Arabic", "Noto Naskh Arabic", Tahoma, sans-serif;
}
a { color: var(--leaf); text-underline-offset: 4px; }
h1, h2, h3, h4, p, dl, dd, ul, ol, figure { margin: 0; }
h1 { font-size: 1.75rem; line-height: 1.5; font-weight: 700; text-wrap: balance; }
h1 a { color: inherit; } h1 small { font-size: 1rem; font-weight: 400; color: var(--soft); }
h2 { font-size: 1.0625rem; line-height: 1.6; font-weight: 700; margin-bottom: 8px; }
h3 { font-size: 1rem; font-weight: 600; margin: 16px 0 6px; }
small { font-size: .8125rem; color: var(--soft); line-height: 1.6; }
.num, .n, .much, .sum, .when, .count { font-variant-numeric: tabular-nums; }
bdi.num { white-space: nowrap; }
:focus-visible { outline: 3px solid var(--water); outline-offset: 2px; border-radius: 6px; }
.sprite { position: absolute; width: 0; height: 0; }
.i { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: fixed; inset-inline-start: 12px; top: -80px; z-index: 9; background: var(--sheet); padding: 8px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }

/* frame: a bar and bottom tabs on a phone, a side column on a wide screen */
.top { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 6px; min-height: 56px; padding: env(safe-area-inset-top) 10px 0; background: var(--ground); border-bottom: 1px solid var(--line); }
.top .where { flex: 1; display: flex; align-items: center; gap: 8px; padding-inline: 6px; font-weight: 700; }
.round { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink); }
.tabs { position: fixed; inset: auto 0 0; z-index: 4; display: flex; background: var(--sheet); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
.tabs .brand { display: none; }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0; min-height: 54px; justify-content: center; color: var(--soft); text-decoration: none; font-size: .75rem; line-height: 1.6; border-radius: 12px; }
.tabs a[aria-current] { color: var(--leaf); font-weight: 700; }
.tabs a[aria-current] .i { fill: var(--leaf-wash); }
.page { max-width: 780px; margin: 0 auto; padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); display: grid; gap: 26px; grid-template-columns: minmax(0, 1fr); }
.page > .sections + .sections { margin-top: -16px; }
.page > .eyebrow:first-child { margin-bottom: -24px; }
h1 + .eyebrow, .money + .eyebrow { margin-top: -22px; }
@media (min-width: 900px) {
  body { display: grid; grid-template-columns: 208px minmax(0, 1fr); grid-template-rows: auto 1fr; }
  body > .sprite, body > .skip { grid-area: 1 / 1; }
  .tabs { position: sticky; top: 0; grid-area: 1 / 1 / 3 / 2; height: 100vh; flex-direction: column; gap: 4px; padding: 18px 12px; border-top: 0; border-inline-end: 1px solid var(--line); }
  .tabs a { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; padding-inline: 12px; min-height: 46px; font-size: .9375rem; }
  .tabs a[aria-current] { background: var(--leaf-wash); color: var(--ink); } .tabs a[aria-current] .i { fill: none; }
  .tabs .brand { display: flex; color: var(--ink); font-size: 1.25rem; font-weight: 700; margin-bottom: 14px; }
  .top { grid-area: 1 / 2; padding-inline: 24px; } .top .where { visibility: hidden; } .page { grid-area: 2 / 2; width: 100%; padding: 28px 24px 64px; }
}

/* lists */
.rows { list-style: none; padding: 0; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.rows > li + li { border-top: 1px solid var(--line); }
.rows > li > a, .rows > li:not(:has(> a)) { display: flex; align-items: center; gap: 12px; padding: 11px 14px; min-height: 56px; color: inherit; text-decoration: none; }
.rows .main { flex: 1; min-width: 0; display: grid; } .rows b { font-weight: 600; line-height: 1.65; } .rows .i { color: var(--soft); width: 20px; height: 20px; }
.rows .note { font-size: .875rem; color: var(--soft); line-height: 1.7; }
.rows.big b { font-size: 1.125rem; }
.mark { font-size: 1.25rem; width: 28px; text-align: center; flex: none; }
.much { color: var(--soft); font-weight: 400; } h2 .much { font-size: .9375rem; }
.sum { white-space: nowrap; font-weight: 600; } .expense { color: var(--pom); } .income { color: var(--leaf); } .bad { color: var(--pom); }
.when { flex: none; font-size: .8125rem; color: var(--soft); white-space: nowrap; }
.when.late, .when.now { padding: 1px 10px; border-radius: 99px; } .when.late { background: var(--pom-wash); color: var(--pom); } .when.now { background: var(--sun-wash); color: var(--sun); }
.count { display: inline-block; min-width: 1.7em; text-align: center; padding: 0 .4em; border-radius: 99px; background: var(--sun-wash); color: var(--sun); font-size: .8125rem; font-weight: 600; }
.count.bad { background: var(--pom-wash); color: var(--pom); }
.dot { width: 14px; height: 14px; border: 2px solid var(--soft); border-radius: 50%; flex: none; } .dot.p1 { border-color: var(--pom); } .dot.p3 { border-color: var(--leaf); } .dot.done { background: var(--leaf); border-color: var(--leaf); }
.empty { color: var(--soft); padding: 14px; border: 1px dashed var(--line); border-radius: var(--r); }
@media (hover: hover) { .rows > li > a:hover, .tabs a:hover { background: var(--leaf-wash); } .round:hover { background: var(--leaf-wash); } }

/* facts and text */
.datehead p { color: var(--soft); } .datehead h1 { font-size: clamp(1.75rem, 7vw, 2.5rem); }
.eyebrow { color: var(--soft); font-size: .875rem; } h2 + .eyebrow { margin: -6px 0 8px; }
.facts { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.facts > div { flex: 1 1 132px; background: var(--sheet); padding: 10px 14px; display: flex; flex-direction: column; } .facts dt { font-size: .8125rem; color: var(--soft); } .facts dd { font-size: 1.375rem; font-weight: 700; line-height: 1.6; font-variant-numeric: tabular-nums; }
.pairs { display: grid; grid-template-columns: minmax(84px, max-content) minmax(0, 1fr); gap: 6px 18px; } .pairs dt { color: var(--soft); } .pairs dd > ul { padding-inline-start: 1.2em; }
.prose { max-width: 68ch; } .prose > * + *, .pairs dd > * + * { margin-top: .7em; } .prose ul { padding-inline-start: 1.3em; } .prose li + li { margin-top: .3em; } .prose li::marker { color: var(--leaf); }
.prose h3 { font-size: 1.1875rem; font-weight: 700; margin-top: 1.7em; padding-top: .9em; border-top: 1px solid var(--line); } .prose h4 { font-size: 1rem; font-weight: 700; margin-top: 1.4em; } .prose.pre { white-space: pre-wrap; }
.caveat { font-size: .875rem; color: var(--soft); border-inline-start: 3px solid var(--sun); padding-inline-start: 12px; margin-top: 16px; }
.warn { color: var(--pom) !important; } .quiet { display: inline-block; padding: 8px 0; } .result { color: var(--soft); margin-bottom: 8px; }
.line { list-style: none; padding: 0; display: grid; gap: 18px; } .line time { font-weight: 600; color: var(--leaf); } .line li { border-inline-start: 2px solid var(--soil); padding-inline-start: 14px; }

/* sections, filters, buttons */
.sections { display: flex; gap: 6px; overflow-x: auto; margin: -12px -16px 0; padding: 2px 16px; scrollbar-width: none; } .sections::-webkit-scrollbar { display: none; }
.sections a { flex: none; display: flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--sheet); color: var(--ink); text-decoration: none; font-size: .9375rem; }
.sections a[aria-current] { background: var(--leaf); border-color: var(--leaf); color: var(--on-leaf); font-weight: 600; } .sections a[aria-current] .much { color: inherit; }
.filter { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; align-items: end; } .filter .field:first-child, .filter .button { grid-column: 1 / -1; }
.filter:not(:has(select)) { grid-template-columns: minmax(0, 1fr) auto; } .filter:not(:has(select)) > * { grid-column: auto !important; }
.field { display: grid; gap: 2px; } .field span, label { font-size: .8125rem; color: var(--soft); }
input, select, button { font: inherit; } input, select { width: 100%; min-height: 46px; padding: 6px 12px; color: var(--ink); background: var(--sheet); border: 1px solid var(--soft); border-radius: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 6px 20px; border: 0; border-radius: 12px; background: var(--leaf); color: var(--on-leaf); font-weight: 600; text-decoration: none; cursor: pointer; } .button.danger { background: var(--pom-wash); color: var(--pom); } .button:active { transform: translateY(1px); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.fold { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r); padding: 0 14px; } .fold + .fold, .rows + .fold { margin-top: 8px; } .fold summary { display: flex; align-items: center; gap: 12px; min-height: 56px; cursor: pointer; list-style: none; } .fold summary::-webkit-details-marker { display: none; } .fold summary .main { flex: 1; display: grid; } .fold summary::after { content: ""; width: 8px; height: 8px; border: solid var(--soft); border-width: 0 2px 2px 0; transform: rotate(45deg); flex: none; } .fold[open] summary::after { transform: rotate(-135deg); } .fold[open] { padding-bottom: 14px; } .fold .scroll { margin-top: 12px; } .fold .rows { border: 0; margin-inline: -14px; border-radius: 0; }
.numtag { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--leaf-wash); font-weight: 700; flex: none; }

/* tables */
.scroll { overflow-x: auto; border-radius: var(--r); } table { width: 100%; border-collapse: collapse; background: var(--sheet); } .scroll > table { border: 1px solid var(--line); }
th { font-size: .8125rem; font-weight: 400; color: var(--soft); text-align: start; } th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: baseline; } .cal th, .cal td { vertical-align: middle; } tbody tr:last-child td { border-bottom: 0; } th.n, td.n { text-align: end; white-space: nowrap; }
.goods td:first-child { min-width: 140px; } .goods td small { display: block; } .idle { color: var(--soft); } .goods a { font-weight: 600; }

/* the planting plan */
.plan .scroll { background: var(--sheet); border: 1px solid var(--line); padding: 6px 0; } .plan svg { display: block; } .plan .scroll > svg { margin-inline: auto; max-width: none; }
.furrow { stroke: var(--soil); stroke-width: 2; stroke-linecap: round; opacity: .55; } .rowcode { font: 700 14px/1 "Segoe UI", sans-serif; fill: var(--soft); text-anchor: middle; direction: ltr; }
.tree { fill: var(--kx); } .tree.k0 { fill: var(--k0); } .tree.k1 { fill: var(--k1); } .tree.k2 { fill: var(--k2); } .tree.k3 { fill: var(--k3); } .tree.k4 { fill: var(--k4); } .tree.k5 { fill: var(--k5); } .tree.k6 { fill: var(--k6); } .tree.k7 { fill: var(--k7); }
.tree.planned { fill-opacity: .25; stroke: currentColor; stroke-dasharray: 2 2; } .free { fill: var(--sheet); stroke: var(--soft); stroke-width: 1.5; } .hit { fill: transparent; } .here { fill: none; stroke: var(--ink); stroke-width: 2; }
.plan a:focus-visible .hit, .plan a:hover .hit { fill: var(--leaf-wash); }
figcaption { font-size: .8125rem; color: var(--soft); margin-top: 8px; } .legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 16px; color: var(--ink); font-size: .875rem; } .legend li { display: flex; align-items: center; gap: 6px; } .plan figcaption small { display: block; margin-top: 6px; }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; } .chips a { display: flex; align-items: center; gap: 6px; min-height: 42px; min-width: 48px; justify-content: center; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--sheet); color: var(--ink); text-decoration: none; } .chips a.planned { border-style: dashed; } .chips a.dead, .chips a.replaced { color: var(--soft); text-decoration: line-through; }

/* maps */
.map svg { display: block; width: 100%; max-height: 66vh; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r); }
.place { fill: var(--kx); fill-opacity: .14; stroke: var(--kx); stroke-width: 2; stroke-linejoin: round; } .place.land { fill: var(--soil); fill-opacity: .18; stroke: var(--soil); } .place.garden { fill: var(--leaf); fill-opacity: .2; stroke: var(--leaf); } .place.building { fill: var(--water); fill-opacity: .18; stroke: var(--water); }
.route { fill: none; stroke: var(--water); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; } .route.spring { stroke-dasharray: 8 6; } circle.spring { fill: var(--sheet); stroke: var(--water); stroke-width: 3; }
.tagbg { fill: var(--sheet); stroke: var(--ink); stroke-width: 1; } .tag, .bar text, .north text { font-size: 15px; font-weight: 700; fill: var(--ink); text-anchor: middle; } .bar path, .north path { fill: none; stroke: var(--ink); stroke-width: 2; } .north text { font-size: 12px; }
.picture img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--r); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; } .photos img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r); background: var(--line); }

/* calendar */
.calbar { display: flex; justify-content: space-between; align-items: center; } .calbar a { padding: 10px 4px; } .cal { table-layout: fixed; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; border-collapse: separate; border-spacing: 0; margin-bottom: 8px; } .cal th, .cal td { text-align: center; padding: 0; height: 48px; border-bottom: 1px solid var(--line); } .cal th { height: 34px; } .cal td { color: var(--soft); } .cal td a { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--ink); font-weight: 700; text-decoration: none; line-height: 1.5; } .cal td.today, .cal td.today a { background: var(--leaf); color: var(--on-leaf); font-weight: 700; }
.pips { display: flex; gap: 3px; min-height: 6px; } .pips i { width: 6px; height: 6px; border-radius: 50%; } .pips .done { background: var(--leaf); } .pips .due { background: var(--sun); } .today .pips i { outline: 1px solid var(--on-leaf); }

/* bars */
.bars { list-style: none; padding: 0; display: grid; gap: 4px; } .bars a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 6px 10px; margin-inline: -10px; color: inherit; text-decoration: none; border-radius: 10px; } .bars a[aria-current] { background: var(--leaf-wash); } .bars svg { grid-column: 1 / -1; width: 100%; height: 6px; background: var(--line); border-radius: 3px; } rect.expense { fill: var(--pom); } rect.income { fill: var(--leaf); } .bars b { font-weight: 600; }

/* before signing in */
.door { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 20px; grid-column: 1 / -1; grid-row: 1 / -1; } .login { width: min(100%, 360px); display: grid; gap: 14px; justify-items: start; } .login form { display: grid; gap: 10px; width: 100%; } .login input { font-size: 1.5rem; letter-spacing: .2em; text-align: center; min-height: 58px; font-variant-numeric: tabular-nums; } .error { color: var(--pom); font-size: .9375rem; } .say { display: grid; gap: 12px; }
@media print { .tabs, .top, .sections, .filter { display: none; } body { display: block; } }
