/* Home (1.5.0): hero image card, quick actions, "Vandaag gepland" and the quote card. Tokens only (tests/theme.cjs). */
/* The hero replaces the page heading on Home; the h1 stays in the DOM for focus and screen readers. */
body[data-view=home] main .page-heading{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
body[data-view=home] #view-home{padding-top:6px}
.home-hero{position:relative;overflow:hidden;border-radius:22px;min-height:300px;margin:0 0 16px;background:var(--hero);color:var(--on-dark);isolation:isolate}
.home-hero-image,.home-quote-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:68% 50%;display:block}
.home-hero-shade{position:absolute;inset:0;background:linear-gradient(90deg,var(--hero-image-overlay) 0%,var(--hero-image-overlay) 28%,transparent 72%),linear-gradient(180deg,transparent 40%,var(--hero-image-overlay) 100%)}
.home-hero-copy{position:relative;display:flex;flex-direction:column;justify-content:flex-end;gap:6px;min-height:300px;padding:26px 24px 26px;max-width:76%}
.home-hero-copy .livu-eyebrow{margin:0 0 8px;color:var(--lime);font-size:11px;letter-spacing:.16em;text-shadow:0 1px 8px var(--scrim)}
.home-hero-title{margin:0;font-size:35px;line-height:1.02;letter-spacing:-1.2px;font-weight:800;color:var(--on-dark);text-shadow:0 2px 14px var(--scrim);text-wrap:balance}
.home-hero-sub{margin:4px 0 0;font-size:16px;line-height:1.45;color:var(--on-dark);opacity:.94;text-shadow:0 1px 8px var(--scrim)}
@media(min-width:721px){.home-hero{min-height:340px}.home-hero-copy{min-height:340px;padding:34px 36px;max-width:60%}.home-hero-title{font-size:44px}}
@media(max-width:360px){.home-hero-copy{max-width:80%;padding:22px 18px}.home-hero-title{font-size:31px}}
/* Phones: the photo is the page background at the top of Home. The top bar (logo, bell, settings) sits on the photo, which fades
   into var(--bg) over its last ~150px so the Vandaag card follows on the plain background. The top bar keeps its height in the
   flow (--home-topbar-h) and the hero pulls itself up under it; it scrolls away with the photo instead of sticking. */
@media(max-width:720px){
 body[data-view=home]{--home-topbar-h:calc(84px + env(safe-area-inset-top));padding-top:0}
 body[data-view=home] .topbar{position:relative;top:0;z-index:5;box-sizing:border-box;height:var(--home-topbar-h);min-height:0;padding-top:calc(16px + env(safe-area-inset-top))!important;padding-bottom:16px!important;background:transparent!important;border:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
 body[data-view=home] .topbar::before{display:none}
 /* Scrolled down, a fixed strip paints the page background behind the status bar again (the bar itself scrolled away). */
 body[data-view=home]:not(.home-photo-top)::before{content:"";position:fixed;top:0;left:0;right:0;height:env(safe-area-inset-top);background:var(--bg);z-index:70;pointer-events:none}
 body[data-view=home] main{padding-top:0!important;display:flow-root;position:relative}
 body[data-view=home] #view-home{padding-top:0}
 /* Light wordmark and glass buttons while the bar is over the photo. */
 body[data-view=home].home-header-photo .topbar .brand{background:url(icons/livufit-logo-dark.png) left center/contain no-repeat}
 body[data-view=home].home-header-photo .topbar .brand-lockup{opacity:0}
 body[data-view=home].home-header-photo .topbar #attention-button,body[data-view=home].home-header-photo .topbar #cloud-status{background:var(--glass-2)!important;color:var(--on-dark)!important;border:1px solid var(--glass-2)!important;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
 body[data-view=home].home-header-photo .topbar #attention-button .attention-dot{box-shadow:0 0 0 2px var(--hero)}
 /* The hero block: full width, from the very top of the page, room for the bar above the copy. */
 body[data-view=home] #view-home>.home-hero{margin:0 -19px 0;border-radius:0;min-height:calc(440px + env(safe-area-inset-top));background:var(--bg)}
 /* Whatever follows the hero tucks into the end of the fade, like a card resting on the photo. */
 /* The overlap lives on the hero itself (negative bottom margin), so it does not depend on which sibling comes next or on JS timing;
    every later sibling is positioned above the hero so the card paints over the photo. */
 body[data-view=home] #view-home>.home-hero{margin-bottom:-60px;z-index:0}
 body[data-view=home] #view-home>.home-hero~*{position:relative;z-index:1}
 body[data-view=home] #view-home>.home-hero-next{border-radius:22px;box-shadow:0 12px 32px var(--shadow-2)}
 body[data-view=home].home-header-photo #view-home>.home-hero:first-child{margin-top:calc(-1 * var(--home-topbar-h))}
 body[data-view=home] .home-hero-image{object-position:66% 38%}
 /* Keep the photo vivid: only a soft top scrim for the logo, a light left veil behind the text and a short fade at the very bottom;
    the Vandaag card overlaps the photo (see below), which is what makes the transition feel natural instead of a hard edge. */
 body[data-view=home] .home-hero-shade{background:linear-gradient(180deg,var(--scrim) 0,transparent 140px),linear-gradient(90deg,var(--hero-image-overlay) 0%,transparent 58%),linear-gradient(180deg,transparent 55%,var(--scrim) 100%),linear-gradient(180deg,transparent 95%,var(--bg) 100%)}
 :root[data-theme=dark] body[data-view=home] .home-hero-shade{background:linear-gradient(180deg,var(--scrim) 0,transparent 140px),linear-gradient(90deg,var(--hero-image-overlay) 0%,transparent 62%),linear-gradient(180deg,transparent 55%,var(--scrim) 100%),linear-gradient(180deg,transparent 94%,var(--bg) 100%)}
 body[data-view=home] .home-hero-copy{min-height:calc(440px + env(safe-area-inset-top));padding:calc(var(--home-topbar-h) + 8px) 16px 96px 19px;max-width:86%;justify-content:flex-end}
 body[data-view=home] .home-hero-copy .livu-eyebrow{margin-bottom:6px}
 body[data-view=home] .home-hero-title{font-size:37px}
 /* Dev mode: the demo banner floats as a pill on the photo instead of pushing the hero down. */
 body[data-view=home] main>.dev-banner{position:absolute;left:19px;right:19px;top:4px;z-index:6;margin:0;padding:5px 12px;font-size:11px;background:var(--frost);border:1px solid var(--line)}
}
@media(max-width:360px){body[data-view=home] #view-home>.home-hero{margin-left:-19px;margin-right:-19px}body[data-view=home] .home-hero-copy{max-width:82%;padding-left:18px}body[data-view=home] .home-hero-title{font-size:33px}}
/* Quick actions: four equal tiles, two rows on the narrowest phones. */
.home-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 16px}
.home-action{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:10px;min-height:104px;padding:14px 6px 12px;border:1px solid var(--line);border-radius:18px;background:var(--surface);color:var(--ink);font-size:12.5px;font-weight:650;line-height:1.25;text-align:center;box-shadow:none;transition:background .15s,border-color .15s}
.home-action:hover{background:var(--surface-2);border-color:var(--line-2)}
.home-action .livu-tile{width:42px;height:42px;border-radius:13px}
.home-action span:last-child{display:block;text-wrap:balance}
@media(max-width:360px){.home-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.home-action{min-height:96px}}
/* 19 September 2026: without the diary the row has one or two actions; they fill the width as horizontal cards. */
.home-actions[data-count="3"]{grid-template-columns:repeat(3,minmax(0,1fr))}
.home-actions[data-count="2"],.home-actions[data-count="1"]{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
.home-actions[data-count="2"] .home-action,.home-actions[data-count="1"] .home-action{flex-direction:row;justify-content:flex-start;align-items:center;gap:12px;min-height:72px;padding:12px 14px;font-size:14px;text-align:left}
.home-actions[data-count="2"] .home-action .livu-tile,.home-actions[data-count="1"] .home-action .livu-tile{flex:0 0 auto;width:44px;height:44px}
/* Planned today: rows like the agenda, one accent per row. */
.home-planned.card{padding:20px;margin:0 0 16px}
.home-planned .section-line{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px}
.home-planned .section-line h2{margin:0;font-size:20px}
.home-planned-all{display:inline-flex;align-items:center;gap:6px;padding:8px 0;font-size:13px;font-weight:650;color:var(--brand)}
.home-planned-list{display:grid;gap:8px}
.home-planned-row{display:flex;align-items:center;gap:12px;width:100%;min-height:64px;padding:10px 12px;border:1px solid var(--line);border-radius:16px;background:var(--surface-2);color:var(--ink);text-align:left;box-shadow:none}
.home-planned-row:hover{background:var(--tint)}
.home-planned-text{flex:1;min-width:0;display:grid;gap:3px}
.home-planned-text strong{font-size:15px;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.home-planned-text small{font-size:12.5px;color:var(--muted);line-height:1.3}
.home-planned-chevron{flex:none;color:var(--muted)}
.home-planned-check{display:inline-flex;align-items:center;justify-content:center;flex:none;width:28px;height:28px;border-radius:50%;background:var(--lime);color:var(--on-accent)}
.home-planned-row.is-done strong{color:var(--muted)}
.home-planned-empty{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.home-planned-empty p{margin:0;flex:1 1 180px;font-size:14px;line-height:1.55;color:var(--muted)}
.home-planned-empty button{flex:none;min-height:42px;padding:10px 16px;border-radius:13px}
/* Quote card: a short image band with today's line. */
.home-quote{position:relative;overflow:hidden;min-height:120px;margin:0 0 16px;border-radius:18px;background:var(--hero);color:var(--on-dark);isolation:isolate}
.home-quote-image{object-position:60% 40%}
.home-quote-shade{position:absolute;inset:0;background:linear-gradient(90deg,var(--hero-image-overlay) 0%,var(--hero-image-overlay) 45%,transparent 100%)}
.home-quote-copy{position:relative;display:flex;flex-direction:column;justify-content:center;gap:10px;min-height:120px;margin:0;padding:22px 24px;max-width:70%}
.home-quote-copy p{margin:0;font-size:19px;line-height:1.3;font-weight:750;letter-spacing:-.3px;color:var(--on-dark);text-shadow:0 1px 10px var(--scrim);text-wrap:balance}
.home-quote-accent{display:block;width:34px;height:4px;border-radius:2px;background:var(--lime)}
@media(max-width:360px){.home-quote-copy{max-width:82%;padding:18px}.home-quote-copy p{font-size:17px}}
/* The compact week card and the rest of Home keep the same rhythm as the new cards. */
#view-home>.dashboard-week{margin:0 0 16px}
#view-home .dashboard-measure.card{margin:0 0 16px}
.dashboard-measure-row>.livu-tile{flex:none}.dashboard-measure-row>div{flex:1}
.dashboard-measure .section-line .ghost{display:inline-flex;align-items:center;gap:6px;color:var(--brand)}
/* A pending setup task sits on the wallpaper, with one large tap target. */
#view-home .dashboard-pending{border:1px solid var(--line);border-radius:18px;background:var(--frost);margin:0;max-width:420px;box-shadow:0 8px 24px var(--shadow-2);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);overflow:hidden}
.home-profile-task{display:flex;align-items:center;gap:12px;width:100%;padding:16px;margin:0;border:0;border-radius:inherit;background:transparent;color:var(--ink);box-shadow:none;text-align:left;white-space:normal}
.home-profile-task:hover{background:var(--tint)}
.home-profile-task:focus-visible{outline:3px solid var(--brand);outline-offset:-4px}
.home-profile-task-icon{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;border-radius:13px;background:var(--tint);color:var(--brand)}
.home-profile-task-copy{display:grid;gap:4px;flex:1;min-width:0}
.home-profile-task-label{font-size:10px;font-weight:700;line-height:1.3;letter-spacing:.1em;text-transform:uppercase;color:var(--brand)}
.home-profile-task-copy strong{font-size:15px;font-weight:750;line-height:1.3;letter-spacing:-.2px}
#home-profile-task-detail{font-size:12px;font-weight:400;line-height:1.4;color:var(--muted)}
.home-profile-task-arrow{flex:none;color:var(--brand)}

/* Home: the quick-action tile "Eten loggen" replaces the wide add button inside the Vandaag card. */
#view-home .dashboard-energy .nutrition-add-food{display:flex}
/* Desktop / tablet: transparent navigation on the photo becomes a floating card on scroll. */
@media(min-width:721px){
 body{--web-nav-height:82px;--web-nav-space:114px}
 .topbar{position:sticky;top:16px!important;z-index:60;gap:24px;width:min(1280px,calc(100% - 48px));height:var(--web-nav-height);min-height:var(--web-nav-height);margin:16px auto;padding:12px 20px!important;border:1px solid var(--line);border-radius:24px;background:var(--frost)!important;box-shadow:0 8px 28px var(--shadow-2);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);transition:background .2s,border-color .2s,box-shadow .2s}
 .topbar::before{display:none}
 body.home-header-photo:not(.nav-stuck) .topbar{background:transparent!important;border-color:transparent;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
 body.home-header-photo:not(.nav-stuck) .topbar .brand{background:url(icons/livufit-logo-dark.png) left center/contain no-repeat}
 body.home-header-photo:not(.nav-stuck) .topbar .brand-lockup{opacity:0}
 body.home-header-photo:not(.nav-stuck) .topbar .tabs.module-nav button{color:var(--on-dark-soft)!important}
 body.home-header-photo:not(.nav-stuck) .topbar .tabs.module-nav button[aria-current=page]{color:var(--on-dark)!important}
 body.home-header-photo:not(.nav-stuck) .topbar .tabs.module-nav button[aria-current=page] .module-nav-icon{background:var(--glass-2)}
 body.home-header-photo:not(.nav-stuck) .topbar #attention-button,body.home-header-photo:not(.nav-stuck) .topbar #cloud-status{background:var(--glass-2)!important;color:var(--on-dark)!important;border-color:var(--glass-2)!important}
 .topbar .tabs.module-nav{position:static;flex:1 1 auto;display:flex!important;justify-content:center;width:auto;max-width:none;margin:0;padding:4px;gap:4px;background:transparent;border:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;overflow:visible;grid-template-columns:none!important}
 .topbar .tabs.module-nav button{flex:0 0 auto;display:inline-flex;align-items:center;gap:8px!important;min-height:44px;padding:6px 14px!important;border-radius:14px}
 .topbar .tabs.module-nav button .module-nav-icon{width:36px;height:30px}
 .topbar .tabs.module-nav button[aria-current=page] .module-nav-icon{background:var(--tint)}
 .topbar .tabs.module-nav button .module-nav-label{font-size:14px!important}
 .topbar .topbar-tools,.topbar .brand{flex:0 0 auto}
 /* The photo spans the available page width; its content uses the dashboard's 820px column. */
 body[data-view=home]{--home-grid:minmax(28px,1fr) minmax(0,820px) minmax(28px,1fr)}
 body[data-view=home] main{max-width:none;padding-top:0;padding-inline:0}
 body[data-view=home] #view-home{display:grid;grid-template-columns:var(--home-grid);max-width:none;padding-top:0;margin:0}
 body[data-view=home] #view-home>*{grid-column:2;min-width:0}
 body[data-view=home] #view-home>.home-hero,body[data-view=home] #view-home>.home-hero.has-pending-task{grid-column:1/-1;display:grid;grid-template-columns:var(--home-grid);grid-template-rows:1fr;gap:24px 0;align-content:end;position:relative;z-index:0;margin:0 0 -48px;padding:calc(var(--web-nav-space) + 40px) 0 104px;border-radius:0;min-height:clamp(600px,32vw,720px);background:var(--bg)}
 body.home-header-photo #view-home>.home-hero:first-child{margin-top:calc(-1 * var(--web-nav-space))}
 body[data-view=home] #view-home>.home-hero.has-pending-task{grid-template-rows:1fr auto}
 body[data-view=home] #view-home>.home-hero~*{position:relative;z-index:1}
 body[data-view=home] .home-hero-image{object-position:center top}
 body[data-view=home] .home-hero-shade{background:linear-gradient(180deg,var(--scrim) 0,transparent 180px),linear-gradient(90deg,var(--hero-image-overlay) 0%,var(--hero-image-overlay) 32%,transparent 75%),linear-gradient(180deg,transparent 60%,var(--scrim) 100%)}
 body[data-view=home] .home-hero .home-hero-copy,body[data-view=home] .has-pending-task .home-hero-copy{grid-column:2;grid-row:1;align-self:end;min-height:0;max-width:480px;padding:0;gap:8px}
 body[data-view=home] .home-hero-title{font-size:clamp(40px,3.6vw,52px)}
 body[data-view=home] .home-hero-sub{font-size:17px}
 body[data-view=home] .home-hero .home-hero-task{grid-column:2;grid-row:2;width:100%;max-width:none;padding:0;margin:0}
 body[data-view=home] #view-home>.home-hero-next{border-radius:22px;box-shadow:0 12px 32px var(--shadow-2)}
}


/* Tablet navigation keeps the logo and controls clear without horizontal scrolling. */
@media(min-width:721px) and (max-width:1000px){
 .topbar{gap:12px;width:calc(100% - 32px);padding-inline:14px!important}
 .topbar .tabs.module-nav{min-width:0;gap:0;padding:0}
 .topbar .tabs.module-nav button{flex-direction:column;gap:2px!important;padding:6px 8px!important}
 .topbar .tabs.module-nav button .module-nav-label{font-size:12px!important}
}
@media(prefers-reduced-motion:reduce){.topbar{transition:none}}

/* Phones keep the task above the headline, with space for the header over the photo. */
@media(max-width:720px){
body[data-view=home] #view-home>.home-hero.has-pending-task{display:flex;flex-direction:column}
body[data-view=home] .home-hero-task{position:relative;padding:calc(var(--home-topbar-h,100px) + 12px) 19px 0;width:100%;max-width:1120px;margin:0 auto;box-sizing:border-box}
body[data-view=home] .has-pending-task .home-hero-copy{flex:1;min-height:0;padding-top:28px}
}
@media(max-width:360px){.home-profile-task{gap:10px;padding:13px}.home-profile-task-icon{flex-basis:34px;width:34px;height:34px;border-radius:11px}.home-profile-task-arrow{width:16px}}
