/* Mara's HQ: the look of the HQ home screen, rebuilt for a public demo.
   Quiet rose and cream, soft pressed surfaces, Lexend to read and Comic Neue Bold for headings. */
:root{--bg:#EFE9E5;--card:#F7F4F2;--tile:#F7F4F2;--ink:#322D2B;--muted:#6A615C;--line:#E2DAD3;
--accent:#9D6462;--accent-deep:#7E4F4D;--on-accent:#FBF3F1;--hi:rgba(255,255,255,.95);--lo:rgba(126,79,77,.18);
--system:#e8702a;--inbox:#d64545;--clients:#2f6fdb;--creator:#8a4fd3;--ops:#c99a06;--life:#3f8f57;--archive:#8f887c;
--good:#3f8f57;--focus:#2f6fdb;
--read:"Lexend",-apple-system,BlinkMacSystemFont,"SF Pro Text",system-ui,sans-serif;
--head:"Comic Neue","Lexend",-apple-system,system-ui,sans-serif;
color-scheme:light}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--bg:#1E1A19;--card:#2A2523;--tile:#2F2A28;--ink:#EAE2DD;--muted:#B0A096;--line:#3B3530;--accent:#B8807D;--accent-deep:#D29A96;--on-accent:#1E1A19;--hi:rgba(255,255,255,.06);--lo:rgba(0,0,0,.55);--good:#6CC08A;--focus:#8DB4FF;color-scheme:dark}}
:root[data-theme="dark"]{--bg:#1E1A19;--card:#2A2523;--tile:#2F2A28;--ink:#EAE2DD;--muted:#B0A096;--line:#3B3530;--accent:#B8807D;--accent-deep:#D29A96;--on-accent:#1E1A19;--hi:rgba(255,255,255,.06);--lo:rgba(0,0,0,.55);--good:#6CC08A;--focus:#8DB4FF;color-scheme:dark}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:17px/1.5 var(--read);padding:max(16px,env(safe-area-inset-top)) 16px 40px;overflow-x:hidden}
main{max-width:820px;margin:0 auto}
h1,h2,h3,summary,.tile-name,.head{font-family:var(--head);font-weight:700}
h1{font-size:28px;margin:0;line-height:1.15}
h2{font-size:21px;margin:0 0 8px;line-height:1.2}
h3{font-size:18px;margin:0 0 6px}
p{margin:8px 0}
a{color:inherit}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--focus);outline-offset:3px;border-radius:12px}
.sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.muted,.meta{color:var(--muted)}
.meta{font-size:15px}

/* header */
.top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:4px 0 14px}
.top .title{display:flex;align-items:center;gap:12px;min-width:0}
.top .title h1{overflow-wrap:anywhere}
.back{display:inline-flex;align-items:center;gap:6px;min-height:44px;color:var(--muted);text-decoration:none;font-size:15px;font-weight:600}
.back:hover{color:var(--ink)}
.app-icon{flex:none;width:56px;height:56px;border-radius:18px;background:var(--card);display:grid;place-items:center;color:var(--accent-deep);
box-shadow:4px 4px 10px var(--lo),-4px -4px 10px var(--hi)}
.app-icon svg{width:38px;height:38px}
button.theme{font-size:20px;width:48px;height:48px;padding:0;flex:none}

/* buttons */
button{font:inherit;color:var(--ink);cursor:pointer}
.btn,button.theme{background:var(--tile);border:0;border-radius:14px;padding:10px 16px;min-height:44px;font-size:16px;font-weight:600;
box-shadow:4px 4px 10px var(--lo),-4px -4px 10px var(--hi);transition:transform .12s ease,box-shadow .12s ease}
.btn:active,button.theme:active{transform:scale(.97);box-shadow:inset 3px 3px 8px var(--lo),inset -3px -3px 8px var(--hi)}
.btn.go{background:var(--accent);color:var(--on-accent)}
.btn.quiet{background:none;box-shadow:none;color:var(--accent-deep);text-decoration:underline;padding:10px 6px}
.btn[disabled]{opacity:.5;cursor:default}
.btn-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}

/* cards */
.card{position:relative;background:var(--tile);border-radius:20px;margin:14px 0;padding:16px 20px;border-top:3px solid var(--accent);
box-shadow:6px 6px 14px var(--lo),-6px -6px 14px var(--hi)}
.card.plain{border-top:0}
.card h2{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.count{font-family:var(--read);font-size:14px;color:var(--muted);font-weight:400}
.section-title{font-size:15px;color:var(--muted);font-weight:700;text-transform:uppercase;letter-spacing:.04em;margin:26px 4px 6px;font-family:var(--read)}

/* the demo line */
.demo-line{background:var(--tile);border-radius:20px;padding:14px 18px;margin:0 0 18px;font-size:16px;border-left:6px solid var(--accent);
box-shadow:6px 6px 14px var(--lo),-6px -6px 14px var(--hi)}
.demo-line p{margin:4px 0}

/* home sections and tiles, as on the real home screen */
details.home-sec{margin:0 0 12px}
details.home-sec>summary{list-style:none;cursor:pointer;font-size:20px;padding:8px 4px;display:flex;align-items:center;gap:8px;min-height:44px}
details.home-sec>summary::-webkit-details-marker{display:none}
details.home-sec>summary::after{content:"▾";margin-left:auto;color:var(--muted);transition:transform .2s}
details.home-sec:not([open])>summary::after{transform:rotate(-90deg)}
details.home-sec>summary .sec-count{font-size:14px;color:var(--muted);font-weight:400;font-family:var(--read)}
.home-row{display:grid;grid-template-columns:repeat(auto-fill,minmax(158px,1fr));gap:14px 12px;padding:10px 4px 16px}
@media(min-width:640px){.home-row{grid-template-columns:repeat(auto-fill,minmax(210px,1fr))}}
.tile{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto;align-items:center;column-gap:10px;row-gap:2px;
padding:10px 12px;border-radius:16px;min-width:0;text-decoration:none;color:var(--ink);background:var(--tile);border:0;text-align:left;font:inherit;width:100%;
box-shadow:6px 6px 14px var(--lo),-6px -6px 14px var(--hi);transition:transform .15s ease,box-shadow .15s ease}
.tile.wide{grid-column:1/-1}
.tile .icon{grid-row:1/3;width:40px;height:40px;border-radius:12px;overflow:hidden;box-shadow:3px 3px 8px var(--lo),-3px -3px 8px var(--hi)}
.tile .icon svg{width:100%;height:100%;display:block}
.tile .tile-name{font-size:15.5px;line-height:1.2;min-width:0;overflow-wrap:anywhere}
.tile .tile-status{font-size:12.5px;color:var(--muted);line-height:1.25;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tile.live{box-shadow:6px 6px 14px var(--lo),-6px -6px 14px var(--hi),inset 0 0 0 2px color-mix(in srgb,var(--accent) 55%,transparent)}
.tile .open-pill{position:absolute;top:-8px;right:10px;font-size:10.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;padding:2px 8px;border-radius:999px;background:var(--accent);color:var(--on-accent);
box-shadow:0 2px 6px var(--lo)}
@media(hover:hover){.tile:hover{transform:translateY(-2px)}}
.tile:active{transform:scale(.98)}

/* settle in */
@keyframes settle{from{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:none}}
.settle{animation:settle .55s cubic-bezier(.2,.8,.2,1) both;animation-delay:calc(var(--i,0) * 45ms)}

/* icons that draw themselves */
@keyframes draw{to{stroke-dashoffset:0}}
.draw path{stroke-dasharray:1;stroke-dashoffset:1;animation:draw .9s ease forwards}
.draw path:nth-child(2){animation-delay:.12s}.draw path:nth-child(3){animation-delay:.24s}.draw path:nth-child(4){animation-delay:.36s}
.draw path:nth-child(5){animation-delay:.48s}.draw path:nth-child(6){animation-delay:.6s}.draw path:nth-child(7){animation-delay:.72s}
.draw path:nth-child(n+8){animation-delay:.84s}

/* the tick */
.tick{flex:none;width:36px;height:36px;border-radius:11px;border:0;padding:0;background:var(--bg);display:grid;place-items:center;
box-shadow:inset 2px 2px 5px var(--lo),inset -2px -2px 5px var(--hi);transition:background .2s ease}
.tick svg{width:22px;height:22px;stroke:var(--on-accent);fill:none;stroke-width:3.2;stroke-linecap:round;stroke-linejoin:round}
.tick svg path{stroke-dasharray:1;stroke-dashoffset:1;transition:stroke-dashoffset .3s ease .05s}
.tick[aria-checked="true"]{background:var(--good);box-shadow:none;animation:pop .35s ease}
.tick[aria-checked="true"] svg path{stroke-dashoffset:0}
@keyframes pop{0%{transform:scale(1)}45%{transform:scale(1.18)}100%{transform:scale(1)}}
@keyframes leave{to{opacity:0;transform:translateX(18px)}}
.leaving{animation:leave .32s ease forwards}

/* rows */
.row{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.row:last-child{border-bottom:0}
.row .text{flex:1;min-width:0;overflow-wrap:anywhere}
.row.done .text{color:var(--muted);text-decoration:line-through}
.chip{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:600;padding:2px 10px;border-radius:999px;background:var(--bg);color:var(--muted);white-space:nowrap}
.dot{display:inline-block;width:10px;height:10px;border-radius:50%;flex:none}

/* forms */
input[type=text],input[type=search],select{font:inherit;font-size:16px;color:var(--ink);background:var(--bg);border:0;border-radius:14px;padding:10px 14px;min-height:46px;
box-shadow:inset 3px 3px 8px var(--lo),inset -3px -3px 8px var(--hi);min-width:0}
label{font-size:15px;color:var(--muted);font-weight:600}
.field{display:flex;flex-direction:column;gap:4px;flex:1 1 200px;min-width:0}

/* toast */
.toast{position:fixed;left:50%;bottom:calc(20px + env(safe-area-inset-bottom));transform:translate(-50%,20px);opacity:0;z-index:30;
background:var(--ink);color:var(--bg);border-radius:16px;padding:10px 12px 10px 18px;display:flex;align-items:center;gap:12px;max-width:calc(100vw - 32px);
font-size:15px;transition:opacity .25s ease,transform .25s ease;pointer-events:none}
.toast.show{opacity:1;transform:translate(-50%,0);pointer-events:auto}
.toast button{background:var(--bg);color:var(--ink);border:0;border-radius:10px;padding:8px 12px;min-height:40px;font-weight:700;font-size:15px}

/* teaching section and footer */
.teach{margin:34px 0 0;padding:20px 22px;border-radius:22px;background:var(--card);border:2px dashed color-mix(in srgb,var(--accent) 50%,transparent)}
.teach h2{font-size:22px}
.teach a{color:var(--accent-deep);font-weight:700}
.reset-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;margin:28px 0 0;padding:14px 4px 0;border-top:1px solid var(--line)}
.reset-row p{margin:0;font-size:14px;color:var(--muted);flex:1 1 220px}
footer.site{color:var(--muted);font-size:14px;text-align:center;margin-top:30px;line-height:1.7}
footer.site a{color:var(--accent-deep);font-weight:600}

/* reduced motion: everything still, everything visible */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
  .draw path{stroke-dashoffset:0!important}
  .settle{opacity:1!important;transform:none!important}
}
@media(max-width:480px){.stat,.bstat,.summary .stat{padding:12px 12px!important}.stat .n,.bstat .bn,.summary .n{font-size:30px!important}.stat .l,.bstat .bl,.summary .l{font-size:13px!important}}
a.btn{text-decoration:none;display:inline-flex;align-items:center;justify-content:center}
a.btn.quiet{text-decoration:underline}
@media(max-width:480px){.tile .tile-status{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .dot{box-shadow:0 0 0 1.5px rgba(255,255,255,.4)}}
:root[data-theme="dark"] .dot{box-shadow:0 0 0 1.5px rgba(255,255,255,.4)}

/* layout fix, 22 Nov 2026: the tick buttons are 44 pixels on phones, so they are easy to tap */
@media(max-width:760px){.tick{width:44px;height:44px;border-radius:13px}.tick svg{width:24px;height:24px}}
select{-webkit-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238C7F79' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center;background-size:12px 8px;padding-right:40px}
