/* ============================================================
   LUME 2 — design system
   Warm base (moon white / charcoal) + olive accent.
   Headings: Space Grotesk · Text: Hanken Grotesk
   ============================================================ */
:root{
  --bg:#F3EDE2; --surface:#FBF8F1; --surface-2:#EFE7D9; --surface-3:#E9E0CF;
  --border:#DED3C0; --border-soft:#E8DECD;
  --text:#1A1611; --muted:#6E5F4C; --faint:#736753;
  --olive:#566E40; --olive-soft:#8AA978; --olive-bg:#E7EEDD; --olive-ink:#3D5230;
  /* 2.8.90: the buttons and circles filled with olive, the same olive as with the dark theme, with the text in charcoal
     and a soft white shadow under it; --olive stays for text, which on the light background needs the dark one */
  --olive-fill:#9DBE86; --on-olive:#17191A; --on-olive-sombra:0 1px 2px rgba(255,255,255,.3);
  --track:#E7DECD;
  --ctrl:#E7DECD; /* the switches' track */
  --amber:#9A6B1E; --amber-bg:#F3E7CE;
  --red:#B0492F; --red-bg:#F2E0D8;
  --gold:#A87F2E; --gold-bg:#F2E8CF;
  --header-bg:rgba(243,237,226,.86);
  --nav-bg:rgba(251,248,241,.92);
  --overlay:rgba(26,22,17,.42);
  --shadow:0 1px 2px rgba(40,30,20,.05),0 4px 16px rgba(40,30,20,.07);
  --shadow-lg:0 2px 6px rgba(40,30,20,.08),0 12px 34px rgba(40,30,20,.16);
  --radius:16px; --radius-s:11px;
  --font-head:'Space Grotesk',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  --font-body:'Hanken Grotesk',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
  --nav-h:62px;
}
:root[data-theme="dark"]{
  --bg:#17191A; --surface:#212426; --surface-2:#1C1F20; --surface-3:#272B2D;
  --border:#33383A; --border-soft:#2B3032;
  --text:#F1EFEA; --muted:#AEB2AC; --faint:#787D78;
  --olive:#9DBE86; --olive-soft:#8AA978; --olive-bg:#293227; --olive-ink:#B8D4A4;
  --olive-fill:#9DBE86; --on-olive:#fff; --on-olive-sombra:none;
  --track:#2A2E2F;
  --ctrl:#6A7275; /* in dark, the track has to be visible */
  --amber:#D9A441; --amber-bg:#37331F;
  --red:#D98C73; --red-bg:#382923;
  --gold:#D9B45A; --gold-bg:#363019;
  --header-bg:rgba(23,25,26,.86);
  --nav-bg:rgba(33,36,38,.94);
  --overlay:rgba(0,0,0,.55);
  --shadow:0 1px 2px rgba(0,0,0,.35),0 4px 16px rgba(0,0,0,.4);
  --shadow-lg:0 2px 8px rgba(0,0,0,.5),0 14px 40px rgba(0,0,0,.55);
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
head,title,meta,link,script,style{display:none!important}
html,body{margin:0;padding:0}
html{background:var(--bg)}
body{
  font-family:var(--font-body);background:var(--bg);color:var(--text);
  line-height:1.5;-webkit-font-smoothing:antialiased;font-size:15px;
  min-height:100vh;min-height:100svh;
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;
}
button{font-family:inherit;color:inherit}
input,select,textarea{font-family:inherit;color:var(--text);-webkit-user-select:text;user-select:text}
::selection{background:var(--olive-soft);color:#fff}

/* ---------- SVG glyphs ---------- */
.glyph{width:1em;height:1em;display:inline-block;vertical-align:-.12em;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.glyph .filled{fill:currentColor;stroke:none}

/* ---------- header ---------- */
header.top{position:sticky;top:0;z-index:40;background:var(--header-bg);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-bottom:1px solid var(--border-soft)}
/* 2.8.101: without the column's width (980): on desktop the gear goes to the window's edge and leaves room for the
   Notes box when it floats in the header. On the iPhone the column is the screen: nothing changes */
.topin{margin:0 auto;padding:10px 16px;padding-top:calc(10px + env(safe-area-inset-top));display:flex;align-items:center;justify-content:space-between;gap:10px}
.top-actions{display:flex;gap:8px;align-items:center;margin-left:auto}
.icon-btn{border:1px solid var(--border);background:var(--surface);border-radius:10px;width:38px;height:38px;display:grid;place-items:center;cursor:pointer;color:var(--muted);transition:.15s}
.icon-btn:active{transform:scale(.93)}
.icon-btn .glyph{font-size:18px}

/* ---------- main / views ---------- */
main{max-width:980px;margin:0 auto;padding:16px 16px calc(var(--nav-h) + 30px + env(safe-area-inset-bottom))}
.view{display:none}
.view.active{display:block}
/* 2.8.96: when switching section (app/transitions.js), the previous one stays in view, fixed where it was, while it
   leaves. The top, left and width are set by the script. It replaces the short fade of .view, which faded the whole
   section and left its glass boxes without blur while it lasted. */
main > .view.tr-leaving{display:block;position:fixed;z-index:0;margin:0;pointer-events:none}
html.tr-moving,html.tr-moving body{overflow-x:clip}   /* what peeks out at the sides doesn't create sideways scrolling */
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:16px}
.card.pad-s{padding:12px 14px}
.blk{margin-bottom:16px}
.blk-head{display:flex;align-items:baseline;justify-content:space-between;margin:2px 2px 9px;gap:8px}
.blk-head .h{font-family:var(--font-head);font-size:12.5px;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--faint);display:flex;align-items:center;gap:7px}
.blk-head .h .glyph{font-size:15px}
.blk-head .more{border:none;background:none;color:var(--olive);font-weight:700;font-size:12.5px;cursor:pointer;padding:2px 2px}
.empty{text-align:center;color:var(--faint);padding:22px 10px;font-size:13.5px}
.hidden{display:none!important}

/* ---------- bottom navigation ---------- */
nav.bottom{position:fixed;left:0;right:0;bottom:0;z-index:40;background:var(--nav-bg);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-top:1px solid var(--border-soft);padding-bottom:env(safe-area-inset-bottom)}
.navin{max-width:560px;margin:0 auto;display:flex;height:var(--nav-h)}
nav.bottom button{flex:1;border:none;background:none;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:var(--faint);font-size:10px;font-weight:600;letter-spacing:.01em;transition:color .15s;padding:0}
nav.bottom button .glyph{font-size:21px;stroke-width:1.9}
nav.bottom button.active{color:var(--olive)}
nav.bottom button:active{transform:scale(.94)}
@media(min-width:860px){
  nav.bottom{left:50%;right:auto;transform:translateX(-50%);bottom:18px;border:1px solid var(--border);border-radius:999px;box-shadow:var(--shadow-lg);padding-bottom:0;overflow:hidden}
  .navin{width:480px;height:56px}
}

/* ---------- items (task / reminder / checkable row) ---------- */
.item{display:flex;align-items:flex-start;gap:12px;padding:11px 0;border-bottom:1px solid var(--border-soft)}
.item:last-child{border-bottom:none}
.item.tap{cursor:pointer}
.check{flex:0 0 auto;width:23px;height:23px;border:2px solid var(--border);border-radius:8px;cursor:pointer;display:grid;place-items:center;margin-top:1px;transition:.15s;background:var(--surface);color:transparent}
.check .glyph{font-size:13px;stroke-width:3}
.check:active{transform:scale(.85)}
.check.done{background:var(--olive-soft);border-color:var(--olive-soft);color:#fff}
.item-body{flex:1;min-width:0}
.item-title{font-size:14.5px;font-weight:600;word-wrap:break-word}
.item.done .item-title{color:var(--faint);font-weight:500}
/* strikethrough drawn on completion: it goes over the TEXT (.tw hugs it), is revealed left->right
   and overshoots only a couple of px (different for each one), always covering the title. */
.tw{position:relative;display:inline-block;max-width:100%}
/* 2.2: one straight line per text line (.strk-l), from the first letter to the last; .strk is the marker and the
   fallback line */
.strk{position:absolute;left:0;right:0;top:54%;height:2px;margin-top:-1px;background:var(--faint);border-radius:1px;pointer-events:none;clip-path:inset(0 0 0 0)}
.strk.measured{display:none}
.strk-l{position:absolute;height:2px;margin-top:-1px;background:var(--faint);border-radius:1px;pointer-events:none;clip-path:inset(0 0 0 0)}
.strk.draw{clip-path:inset(0 100% 0 0);animation:strkReveal .45s linear forwards}
.strk-l.draw{clip-path:inset(0 100% 0 0);animation:strkReveal .4s linear forwards}
@keyframes strkReveal{to{clip-path:inset(0 0 0 0)}}
@media(prefers-reduced-motion:reduce){.strk.draw,.strk-l.draw{animation:none;clip-path:inset(0 0 0 0)}.bar>span,.ring .pr{transition:none}}
.item-meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px;align-items:center}
.pill{font-size:11px;font-weight:600;padding:2px 8px;border-radius:999px;background:var(--surface-2);border:1px solid var(--border-soft);color:var(--muted);display:inline-flex;align-items:center;gap:4px}
.pill .glyph{font-size:12px}
.pill.area{border-color:transparent;color:#fff}
.pill.due-soon{background:var(--amber-bg);color:var(--amber);border-color:transparent}
.pill.due-over{background:var(--red-bg);color:var(--red);border-color:transparent}
.pill.prio-star{background:var(--gold-bg);color:var(--gold);border-color:transparent}
.pill.obj-link{background:var(--olive-bg);color:var(--olive);border-color:transparent}
.del{flex:0 0 auto;border:none;background:none;color:var(--faint);cursor:pointer;font-size:15px;padding:3px 5px;opacity:.55;border-radius:7px}
.del:active{color:var(--red);opacity:1}

/* ---------- goals ---------- */
.obj{padding:14px 2px;border-bottom:1px solid var(--border-soft);cursor:pointer}
.obj:last-child{border-bottom:none}
.obj-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.obj-name{font-family:var(--font-head);font-weight:700;font-size:15px}
.obj-pct{font-family:var(--font-head);font-weight:700;font-size:14px;color:var(--olive);white-space:nowrap}
.bar{height:8px;background:var(--track);border-radius:999px;overflow:hidden;margin-top:9px}
.bar>span{display:block;height:100%;background:linear-gradient(90deg,var(--olive-soft),var(--olive));border-radius:999px;transition:width .4s ease}
.step-btns{display:flex;gap:6px}
.mini{border:1px solid var(--border);background:var(--surface);border-radius:9px;padding:4px 11px;font-size:12.5px;font-weight:700;cursor:pointer;color:var(--muted);transition:.12s}
.mini:active{transform:scale(.93)}
.mini.olive{background:var(--olive-fill);border-color:var(--olive-fill);color:var(--on-olive);text-shadow:var(--on-olive-sombra)}
:root[data-theme="dark"] .mini.olive{color:#17191A}

/* task rows inside the goal detail (2.7.7: they are the milestones' rows; milestones no longer exist) */
.milestone{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px dashed var(--border-soft)}
.milestone:last-child{border-bottom:none}
.milestone .check{width:20px;height:20px;border-radius:999px}
.milestone-title{flex:1;font-size:13.5px;font-weight:600}
.milestone.done .milestone-title{color:var(--faint)}
.milestone-date{font-size:11.5px;color:var(--faint);white-space:nowrap}
.milestone-hint{font-size:11px;color:var(--faint);margin-top:9px;display:flex;align-items:center;gap:4px;line-height:1.4}
.milestone-hint .glyph{font-size:13px;color:var(--olive)}
/* 2.6: Daily's date, with its arrows, goes in .hy-date (the Hoy, Today, block). The streak is no longer shown. */
.week{display:flex;gap:6px;margin-top:10px}
.day{flex:1;text-align:center;min-width:0}
.day .dl{font-size:10px;color:var(--faint);margin-bottom:4px;font-weight:600}
.day.today .dl{color:var(--olive)}
