/* HOP Easy 8 (easy8.js): the Today banner, the list of eight and each habit's page. Tokens only, so light and dark both work. */
.e8-banner{display:block;padding:14px 14px 13px;border-radius:18px;border:1px solid var(--border);background:var(--surface);box-shadow:var(--shadow-sm);}
.e8-banner-head{appearance:none;display:block;width:100%;text-align:left;font:inherit;color:var(--text);background:transparent;border:0;padding:0;margin:0;cursor:pointer;}
.e8-banner-top{display:flex;align-items:center;justify-content:space-between;}
.e8-banner-t{font-family:var(--font-display);font-weight:800;font-size:19px;letter-spacing:-.01em;}
.e8-banner-go{color:var(--accent-500);display:flex;}
.e8-banner-s{display:block;margin:2px 0 11px;font-size:13.5px;line-height:1.35;color:var(--text-muted);}
.e8-banner-row{display:grid;grid-template-columns:repeat(8,1fr);gap:5px;}
.e8-bi{appearance:none;border:0;padding:0;font:inherit;cursor:pointer;display:flex;align-items:center;justify-content:center;aspect-ratio:1/1;border-radius:11px;background:var(--accent-100);color:var(--accent-500);}
.e8-bi:active{transform:scale(.94);background:var(--accent-400);color:#fff;}
.e8-bi svg{width:62%;height:62%;}
@media (max-width:340px){.e8-banner-row{gap:3px;}}

.e8-main{display:flex;flex-direction:column;gap:14px;padding-top:14px;}
.e8-intro{margin:0;font-size:16.5px;line-height:1.5;}
.e8-list{padding:4px 0;}
.e8-row{appearance:none;width:100%;text-align:left;font:inherit;color:var(--text);background:transparent;border:0;border-top:1px solid var(--border);display:flex;align-items:center;gap:12px;padding:12px 14px;min-height:64px;cursor:pointer;}
.e8-row:first-child{border-top:0;}
.e8-row:active{background:var(--surface-2);}
.e8-ic{flex:0 0 auto;width:44px;height:44px;border-radius:13px;background:var(--accent-100);color:var(--accent-500);display:flex;align-items:center;justify-content:center;}
.e8-rc{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;}
.e8-rn{font-weight:800;font-size:16.5px;line-height:1.2;}
.e8-rl{font-size:13.5px;line-height:1.35;color:var(--text-muted);}
.e8-chev{flex:0 0 auto;color:var(--text-faint);display:flex;}
.e8-area{flex:0 0 auto;align-self:flex-start;margin-top:2px;font-family:var(--font-display);font-weight:800;font-size:10.5px;letter-spacing:.07em;padding:3px 8px;border-radius:999px;border:1px solid var(--border-strong,var(--border));color:var(--text-muted);background:var(--surface-2);}
.e8-big{display:flex;flex-direction:column;gap:8px;margin-top:6px;}
.e8-big h2{margin:0;font-family:var(--font-display);font-size:19px;font-weight:800;letter-spacing:-.01em;}
.e8-big p{margin:0;font-size:14.5px;line-height:1.45;color:var(--text-muted);}

.e8-hero{display:flex;align-items:center;gap:14px;}
.e8-hero-ic{flex:0 0 auto;width:68px;height:68px;border-radius:20px;background:var(--accent-500);color:#fff;display:flex;align-items:center;justify-content:center;}
.e8-hero-b{display:flex;flex-direction:column;align-items:flex-start;gap:6px;}
.e8-line{margin:0;font-size:18px;line-height:1.3;font-weight:700;}
.e8-sec{display:flex;flex-direction:column;gap:6px;}
.e8-sec h2{margin:0;font-size:12.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--text-muted);}
.e8-sec p{margin:0;font-size:16.5px;line-height:1.5;}
.e8-worth{padding:12px 14px;border-radius:16px;background:var(--surface-2);border:1px solid var(--border);border-left:4px solid var(--accent-400);}
.e8-start{padding:12px 14px;border-radius:16px;background:var(--accent-100);border:1px solid var(--accent-line,var(--accent-400));}
.e8-start h2{color:var(--accent-700);}
.e8-also{font-size:14.5px!important;color:var(--text-muted);}
.e8-snags{display:flex;flex-wrap:wrap;gap:6px;}
.e8-snag{font-size:14px;line-height:1.3;padding:6px 11px;border-radius:999px;background:var(--surface);border:1px solid var(--border);}
.e8-note{font-size:14px!important;color:var(--text-muted);}
.e8-sure{border:1px solid var(--border);border-radius:14px;background:var(--surface);padding:0 14px;}
.e8-sure summary{cursor:pointer;padding:12px 0;min-height:44px;box-sizing:border-box;font-weight:700;font-size:15.5px;list-style-position:inside;}
.e8-sure p{margin:0 0 10px;font-size:15px;line-height:1.5;color:var(--text);}
.e8-src{margin:0 0 12px;padding-left:18px;font-size:14px;line-height:1.5;}
.e8-src a{color:var(--accent-600);overflow-wrap:anywhere;}
.e8-pn{display:flex;justify-content:space-between;gap:8px;}
.e8-pn-b{appearance:none;font:inherit;font-size:14px;font-weight:700;display:flex;align-items:center;gap:4px;min-height:44px;padding:8px 10px;border-radius:12px;border:0;background:transparent;color:var(--accent-600);cursor:pointer;max-width:48%;}
.e8-pn-b span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.e8-pn-b.is-next{margin-left:auto;text-align:right;}
.e8-pn-b:active{background:var(--surface-2);}

/* For Fuck's Sake mode: the switch (top right of the Easy 8 pages) and the voices */
.e8-tog{appearance:none;flex:0 0 auto;display:flex;flex-direction:column;align-items:center;gap:3px;background:none;border:0;padding:2px 4px;margin:0 2px 0 4px;cursor:pointer;font:inherit;color:var(--text-muted);min-width:44px;}
.e8-track{width:44px;height:25px;border-radius:999px;background:var(--border-strong,var(--border));position:relative;transition:background .15s;}
.e8-knob{position:absolute;top:3px;left:3px;width:19px;height:19px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.35);transition:transform .15s;}
.e8-tog[aria-checked="true"] .e8-track{background:#d8431f;}
.e8-tog[aria-checked="true"] .e8-knob{transform:translateX(19px);}
.e8-tl{font-size:9.5px;line-height:1.08;font-weight:800;text-align:center;letter-spacing:.01em;}
.e8-tog[aria-checked="true"] .e8-tl{color:#d8431f;}
.e8-who{display:block;margin-top:3px;text-transform:none;letter-spacing:0;font-size:12.5px;font-weight:700;}
.is-ffs .e8-hero-ic{background:#d8431f;}
.is-ffs .e8-what .e8-who{color:#d8431f;}
.is-ffs .e8-worth{border-left-color:#e0662a;}
.is-ffs .e8-worth .e8-who{color:#c4531c;}
.is-ffs .e8-worth p,.is-ffs .e8-why p{font-size:16px;}
.is-ffs .e8-sec p+p{margin-top:9px;}
.is-ffs .e8-why{padding:12px 14px;border-radius:16px;background:var(--surface-2);border:1px solid var(--border);border-left:4px solid #7a4fc4;}
.is-ffs .e8-why .e8-who{color:#7a4fc4;}
.is-ffs .e8-start{background:rgba(216,67,31,.10);border-color:#d8431f;}
.is-ffs .e8-start h2{color:#d8431f;}
.is-ffs .e8-start p{font-weight:700;}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .is-ffs .e8-why .e8-who{color:#b79cf0;} :root:not([data-theme="light"]) .e8-tog[aria-checked="true"] .e8-tl,:root:not([data-theme="light"]) .is-ffs .e8-what .e8-who,:root:not([data-theme="light"]) .is-ffs .e8-start h2{color:#ff7a55;}}
:root[data-theme="dark"] .is-ffs .e8-why .e8-who{color:#b79cf0;}
:root[data-theme="dark"] .e8-tog[aria-checked="true"] .e8-tl,:root[data-theme="dark"] .is-ffs .e8-what .e8-who,:root[data-theme="dark"] .is-ffs .e8-start h2{color:#ff7a55;}
.topbar:has(.e8-tog) .topbar-title h1{white-space:normal;overflow:visible;text-overflow:clip;font-size:19px;line-height:1.1;}

/* v81: How it is going (the habit's own 0-10, week by week) */
.e8-trend{ background:var(--surface-2); border:1px solid var(--border); border-radius:14px; padding:12px 14px; }
.e8-tr-top{ display:flex; align-items:center; gap:12px; }
.e8-tr-n{ font-family:Manrope, sans-serif; font-weight:800; font-size:30px; line-height:1; font-variant-numeric:tabular-nums; }
.e8-tr-n small{ font-size:14px; color:var(--text-muted); margin-left:2px; }
.e8-tr-say{ font-size:15px; line-height:1.35; }
.e8-tr-chart .d8-spark{ width:100%; height:auto; max-height:110px; display:block; margin-top:6px; }
.e8-tr-chart .d8-spark polyline, .e8-tr-chart .d8-spark line{ stroke-width:2.5; vector-effect:non-scaling-stroke; }
.e8-tr-chart .d8-spark line{ stroke-width:1; }
.e8-tr-ax{ display:flex; justify-content:space-between; font-size:12px !important; color:var(--text-muted); }
.e8-scale-d summary{ cursor:pointer; font-size:14px; font-weight:700; color:var(--text-muted); padding:4px 0; }
.e8-scale{ list-style:none; margin:4px 0 0; padding:0; display:grid; gap:4px; }
.e8-scale li{ display:flex; align-items:center; gap:10px; font-size:15px; }
.e8-scale b{ flex-shrink:0; width:28px; height:28px; border-radius:8px; display:grid; place-items:center; color:#fff; font-size:14px;
  background:hsl(calc((9 - var(--i)) * 15) 72% 42%); }
.e8-scale b.is-zero{ background:var(--sc-nailed, #1d8f55); }
.e8-tr-chart{ position:relative; padding-top:16px; }
.e8-tr-y{ position:absolute; left:0; font-size:11px; color:var(--text-muted); line-height:1; }
.e8-tr-y.is-top{ top:0; }
.e8-tr-y.is-bot{ bottom:6px; }

/* v86: this habit over 7 / 28 / 90 days / All */
.e8-rg{ display:grid; gap:0; margin-top:10px; border:1px solid var(--border); border-radius:12px; overflow:hidden; background:var(--surface); }
.e8-rg-r{ display:grid; grid-template-columns:70px 1fr 0.8fr auto; gap:8px; align-items:center; padding:8px 10px; font-size:14.5px; border-top:1px solid var(--border); }
.e8-rg-r:first-child{ border-top:0; }
.e8-rg-h{ font-size:11.5px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; color:var(--text-muted); background:var(--surface-2); }
.e8-rg-r small{ color:var(--text-muted); font-size:12px; }
@media (max-width:380px){ .e8-rg-r{ grid-template-columns:58px 1fr 0.8fr; } .e8-rg-r > span:last-child{ grid-column:1 / -1; } }
.e8-rg-r small.e8-was{ display:block; }

/* v87: the list, filled to each habit's score (green 85%+, blue 70%+, orange below) */
.e8-row.has-fill{ background:linear-gradient(90deg, color-mix(in srgb, var(--fc) 24%, transparent) 0, color-mix(in srgb, var(--fc) 24%, transparent) var(--fill), transparent var(--fill)); box-shadow:inset 4px 0 0 var(--fc); }
.e8-row.has-fill:active{ filter:brightness(.97); }
.e8-rn .e8-area{ display:inline-block; vertical-align:2px; margin:0 0 0 6px; font-size:9.5px; padding:2px 6px; }
.e8-stat{ flex:0 0 auto; display:flex; flex-direction:column; align-items:flex-end; gap:1px; min-width:58px; }
.e8-stat b{ font-family:var(--font-display); font-weight:800; font-size:19px; line-height:1.1; font-variant-numeric:tabular-nums; }
.e8-stat i{ font-style:normal; font-size:12px; font-weight:800; white-space:nowrap; }
.e8-stat.is-none b{ color:var(--text-faint); font-size:16px; }
.e8-stat.is-none i{ color:var(--text-faint); font-weight:600; }
.e8-tr.is-up{ color:var(--sc-nailed); }
.e8-tr.is-down{ color:var(--sc-mixed); }
.e8-tr.is-flat{ color:var(--text-muted); }
.e8-tr span{ font-size:9.5px; }
.e8-legend{ display:flex; flex-direction:column; gap:6px; margin:0 0 10px; }
.e8-legend p{ margin:0; font-size:13.5px; line-height:1.45; color:var(--text-muted); }
.e8-k{ display:inline-block; padding:1px 7px; border-radius:999px; font-size:12px; color:var(--text); }
.e8-k.is-g{ background:color-mix(in srgb, var(--sc-nailed) 28%, transparent); }
.e8-k.is-b{ background:color-mix(in srgb, var(--sc-solid) 28%, transparent); }
.e8-k.is-o{ background:color-mix(in srgb, var(--sc-mixed) 30%, transparent); }
.e8-legend .d8-toggle{ align-self:flex-start; }
