/* Haisla Nation Events Tracker. Haisla Nation Design System: square corners, flat fills, no borders, Gotham with Montserrat as the web fallback. Light theme. */
@font-face{font-family:"Montserrat";font-weight:400;font-style:normal;font-display:swap;src:url(../fonts/montserrat-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:"Montserrat";font-weight:600;font-style:normal;font-display:swap;src:url(../fonts/montserrat-latin-600-normal.woff2) format("woff2")}
@font-face{font-family:"Montserrat";font-weight:700;font-style:normal;font-display:swap;src:url(../fonts/montserrat-latin-700-normal.woff2) format("woff2")}
@font-face{font-family:"Montserrat";font-weight:800;font-style:normal;font-display:swap;src:url(../fonts/montserrat-latin-800-normal.woff2) format("woff2")}

:root{
  --bg:#f3f3f3; --surface:#ffffff; --surface-2:#ececed; --field:#ececed; --track:#dcdddf;
  --ink:#2c2e35; --heading:#000000; --muted:#5d5f64;
  --red:#e61e26; --accent:#c81a21; --accent-hover:#a6151b; --danger:#b8171e;
  --blue:#143980; --blue-hover:#102e68; --on:#ffffff;
  --warn-bg:#fdeecb; --warn-fg:#5e3f00;
  --s0-bg:#fdeecb; --s0-fg:#5e3f00; --s1-bg:#dcf0f2; --s1-fg:#0b5159; --s2-bg:#dde6f5; --s2-fg:#143980;
  --s3-bg:#e6e4f2; --s3-fg:#3d3a7a; --s4-bg:#f7e2d6; --s4-fg:#7d3410; --s5-bg:#dcebd2; --s5-fg:#2b5316;
  --s6-bg:#e3eef8; --s6-fg:#164e7a; --s7-bg:#1f5b44; --s7-fg:#ffffff;
  --core:"Gotham","Montserrat",Arial,Helvetica,sans-serif;
  --ease:cubic-bezier(.4,0,.2,1);
  color-scheme:light;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%}
body{background:var(--bg);color:var(--ink);font-family:var(--core);font-size:15px;line-height:1.5;-webkit-font-smoothing:antialiased}
h1,h2,h3{color:var(--heading);margin:0;line-height:1.15;text-wrap:balance;font-weight:700}
h1{font-size:28px}
h2{font-size:19px}
h3{font-size:16px}
p{margin:0}
a{color:var(--blue)}
button,input,select,textarea{font:inherit;color:inherit}
:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.wrap{max-width:1240px;margin:0 auto;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
.num{font-variant-numeric:tabular-nums}
.muted{color:var(--muted)}
.small{font-size:13px}
.stack{display:flex;flex-direction:column;gap:16px}
.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.spacer{flex:1}
.inline{display:inline}
.sub{color:var(--muted);margin-top:4px}
.head{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;justify-content:space-between;margin-bottom:20px}
.hint{font-size:13px;color:var(--muted)}
.empty{color:var(--muted);font-size:14px}

/* Staff header */
.top{background:var(--surface)}
.top .wrap{display:flex;align-items:center;gap:20px;flex-wrap:wrap;padding-block:12px}
.lockup{display:flex;flex-direction:column;align-items:flex-start;gap:3px;text-decoration:none;color:var(--heading)}
.lockup img{width:125px;height:auto;display:block}
.lockup b{font-size:12px;font-weight:700;letter-spacing:.02em;color:var(--muted);padding-left:44px;line-height:1}
.nav{display:flex;gap:2px;flex-wrap:wrap}
.nav a{padding:9px 11px;font-weight:600;font-size:14px;color:var(--muted);text-decoration:none}
.nav a:hover{color:var(--heading)}
.nav a[aria-current="page"]{color:var(--heading);box-shadow:inset 0 -3px 0 var(--red)}
.navcount{display:inline-block;min-width:20px;padding:1px 6px;margin-left:6px;background:var(--red);color:var(--on);font-size:11px;font-weight:700;text-align:center}
.who{display:flex;align-items:center;gap:10px;font-size:13px;flex-wrap:wrap}
.who form{display:inline}
main{padding-block:24px 64px}

/* Buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;cursor:pointer;padding:10px 18px;font-weight:600;font-size:15px;background:var(--accent);color:var(--on);text-decoration:none;transition:background-color 140ms var(--ease)}
.btn:hover{background:var(--accent-hover)}
.btn:active{transform:scale(.98)}
.btn.blue{background:var(--blue)}
.btn.blue:hover{background:var(--blue-hover)}
.btn.quiet{background:var(--surface-2);color:var(--ink)}
.btn.quiet:hover{background:var(--track)}
.btn.small{padding:7px 12px;font-size:13px}
.btn[disabled]{opacity:.45;cursor:not-allowed;transform:none}
.btns{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.linkbtn{border:0;background:none;padding:0;color:var(--blue);font-weight:600;cursor:pointer;text-decoration:underline;text-underline-offset:3px;font-size:inherit}

/* Forms */
.form{display:grid;gap:16px}
.field{display:flex;flex-direction:column;gap:6px;min-width:0}
.field>span,.lbl{font-weight:600;font-size:14px;color:var(--heading)}
.field>span em{font-style:normal;font-weight:400;color:var(--muted)}
.field>span.hint{font-weight:400;font-size:13px;color:var(--muted)}
input[type=text],input[type=email],input[type=tel],input[type=date],input[type=time],input[type=number],input[type=password],input:not([type]),select,textarea{width:100%;background:var(--field);border:0;padding:10px 12px;min-height:44px;border-radius:0}
.card input[type=text],.card input[type=email],.card input[type=tel],.card input[type=date],.card input[type=time],.card input[type=number],.card input[type=password],.card input:not([type]),.card select,.card textarea{background:var(--field)}
.on-grey input,.on-grey select,.on-grey textarea{background:var(--surface)!important}
textarea{min-height:110px;resize:vertical}
input[type=file]{font-size:14px;max-width:100%}
.row2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.row3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.choices{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.choice{position:relative}
.choice input{position:absolute;opacity:0;inset:0;cursor:pointer;margin:0}
.choice span{display:block;padding:11px 12px;background:var(--field);font-size:14px;font-weight:500;cursor:pointer;height:100%}
.choice input:checked+span{background:var(--blue);color:var(--on)}
.choice input:focus-visible+span{outline:2px solid var(--blue);outline-offset:2px}
.check{display:flex;gap:10px;align-items:flex-start;cursor:pointer}
.check input{width:18px;height:18px;margin:2px 0 0;accent-color:var(--blue);flex:none}
.field-error{color:var(--danger);font-size:13px;font-weight:600}
.hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}

/* Surfaces */
.card{background:var(--surface);padding:20px 22px;min-width:0}
.card.top-accent{box-shadow:inset 0 4px 0 var(--red)}
.grid{display:grid;gap:16px}
.g2{grid-template-columns:repeat(2,minmax(0,1fr))}
.g3{grid-template-columns:repeat(3,minmax(0,1fr))}
.g4{grid-template-columns:repeat(4,minmax(0,1fr))}
.flash{background:var(--surface);box-shadow:inset 0 4px 0 var(--blue);padding:14px 16px;margin-bottom:20px;font-weight:600}
.errors{background:var(--surface);box-shadow:inset 0 4px 0 var(--red);padding:14px 16px;margin-bottom:20px;color:var(--danger)}
.errors ul{margin:0;padding-left:18px}
.notice{background:var(--warn-bg);color:var(--warn-fg);padding:14px 16px;font-size:14px}
.notice.info{background:var(--s1-bg);color:var(--s1-fg)}
.samplebadge{display:inline-block;font-size:12px;font-weight:600;background:var(--warn-bg);color:var(--warn-fg);padding:3px 8px}

/* Case list */
.tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.tile{background:var(--surface);padding:16px 18px;display:flex;flex-direction:column;gap:2px;text-decoration:none;color:inherit;transition:background-color 140ms var(--ease)}
.tile:hover{background:var(--surface-2)}
.tile .n{font-size:32px;font-weight:800;color:var(--heading);font-variant-numeric:tabular-nums;line-height:1.1}
.tile .t{font-size:14px;font-weight:600;color:var(--heading)}
.tile .d{font-size:13px;color:var(--muted)}
.tile.alert .n{color:var(--danger)}
.chips{display:flex;gap:6px;flex-wrap:wrap}
.chip{background:var(--surface);padding:7px 12px;font-size:13px;font-weight:600;color:var(--ink);text-decoration:none}
.chip[aria-current="true"]{background:var(--ink);color:var(--surface)}
.chip .c{opacity:.65;margin-left:4px;font-variant-numeric:tabular-nums}
.table-wrap{overflow-x:auto;background:var(--surface)}
table.data{width:100%;border-collapse:collapse;font-size:14px;min-width:760px}
table.data th{text-align:left;font-weight:600;font-size:13px;color:var(--muted);padding:12px 14px;background:var(--surface-2)}
table.data td{padding:13px 14px;vertical-align:middle}
table.data tbody tr:nth-child(even){background:#f8f8f8}
table.data tbody tr.link{cursor:pointer}
table.data tbody tr.link:hover{background:var(--surface-2)}
table.data td.num,table.data th.num{text-align:right;font-variant-numeric:tabular-nums}
.ref{font-weight:700;color:var(--heading);text-decoration:none}
.pill{display:inline-block;padding:3px 9px;font-size:12px;font-weight:700;white-space:nowrap}
.st0{background:var(--s0-bg);color:var(--s0-fg)} .st1{background:var(--s1-bg);color:var(--s1-fg)} .st2{background:var(--s2-bg);color:var(--s2-fg)}
.st3{background:var(--s3-bg);color:var(--s3-fg)} .st4{background:var(--s4-bg);color:var(--s4-fg)} .st5{background:var(--s5-bg);color:var(--s5-fg)}
.st6{background:var(--s6-bg);color:var(--s6-fg)} .st7{background:var(--s7-bg);color:var(--s7-fg)}
.st-blue{background:var(--blue);color:var(--on)}
.prio{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:600}
.prio::before{content:"";width:8px;height:8px;border-radius:999px;background:var(--track)}
.prio.urgent{color:var(--danger)}
.prio.urgent::before{background:var(--red)}
.unassigned{color:var(--danger);font-weight:600}
.pager{display:flex;gap:8px;justify-content:space-between;align-items:center;margin-top:16px;font-size:13px}
.pager a,.pager span.dis{background:var(--surface);padding:7px 12px;text-decoration:none;font-weight:600}
.pager span.dis{color:var(--muted)}

/* Case file */
.casehead{background:var(--surface);padding:20px 22px;display:flex;gap:16px 28px;flex-wrap:wrap;align-items:flex-start}
.casehead .main{flex:1 1 320px;min-width:0}
.casehead h1{font-size:24px;margin-top:6px}
.facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px 20px;flex:2 1 460px;align-items:end}
.facts .k{font-size:12px;color:var(--muted)}
.facts .v{font-weight:600;color:var(--heading);font-size:14px}
.facts select{min-height:36px;padding:6px 8px;font-size:14px;font-weight:600}
.stepper{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:4px;margin-top:12px}
.stepper div{padding:10px 8px 9px;background:var(--surface);font-size:12px;font-weight:600;color:var(--muted);position:relative}
.stepper div::before{content:"";position:absolute;inset:0 0 auto;height:4px;background:var(--track)}
.stepper div.done{color:var(--ink)}
.stepper div.done::before{background:var(--s7-bg)}
.stepper div.now{color:var(--heading)}
.stepper div.now::before{background:var(--red)}
.stepper .n{display:block;font-size:11px;font-weight:500;opacity:.8}
.casegrid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:16px;margin-top:16px;align-items:start}
.stagecard{background:var(--surface);padding:20px 22px;box-shadow:inset 0 4px 0 var(--red)}
.stagecard.complete{box-shadow:inset 0 4px 0 var(--s7-bg)}
.checklist{list-style:none;margin:14px 0 0;padding:0;display:flex;flex-direction:column;gap:2px}
.checklist li{background:var(--surface-2);padding:11px 12px}
.checklist form{margin:0}
.checklist .checkbtn{all:unset;display:flex;gap:10px;align-items:flex-start;cursor:pointer;width:100%}
.checklist .checkbtn[disabled]{cursor:not-allowed}
.checklist .box{width:18px;height:18px;flex:none;margin-top:2px;background:var(--surface);display:grid;place-items:center;box-shadow:inset 0 0 0 2px var(--muted)}
.checklist .on .box{background:var(--blue);box-shadow:none}
.checklist .on .box::after{content:"";width:10px;height:5px;border-left:2px solid #fff;border-bottom:2px solid #fff;transform:rotate(-45deg) translate(1px,-1px)}
.checklist .locked{opacity:.65}
.checklist .req{font-size:12px;color:var(--muted);margin:4px 0 0 28px;display:block}
.checkbtn:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.tabs{display:flex;gap:2px;overflow-x:auto;background:var(--surface-2);padding:4px}
.tabs a{padding:9px 14px;font-weight:600;font-size:14px;color:var(--muted);white-space:nowrap;text-decoration:none}
.tabs a[aria-current="page"]{background:var(--surface);color:var(--heading)}
.tabpanel{background:var(--surface);padding:20px 22px}
.dl{display:grid;grid-template-columns:170px minmax(0,1fr);gap:10px 16px;font-size:14px;margin:0}
.dl dt{color:var(--muted)}
.dl dd{margin:0;overflow-wrap:anywhere;white-space:pre-line}
.est{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:14px;background:var(--surface-2)}
.est+.est{margin-top:4px}
.est .amt{font-size:18px;font-weight:800;color:var(--heading);font-variant-numeric:tabular-nums}
.est.approved{background:var(--s5-bg);color:var(--s5-fg)}
.est.approved .amt{color:var(--s5-fg)}
.est.not_chosen{opacity:.6}
.photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:10px}
.ph{aspect-ratio:4/3;max-width:100%;background:var(--surface-2);position:relative;display:flex;align-items:flex-end;overflow:hidden;text-decoration:none;color:var(--ink)}
.ph img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.ph span{position:relative;z-index:1;background:var(--surface);font-size:12px;padding:5px 8px;font-weight:600;margin:6px;max-width:calc(100% - 12px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ph .tag{position:absolute;top:0;left:0;margin:6px}
.thread{display:flex;flex-direction:column;gap:10px}
.msg{max-width:85%;padding:12px 14px;background:var(--surface-2);white-space:pre-line;overflow-wrap:anywhere}
.msg.mine{align-self:flex-end;background:var(--blue);color:var(--on)}
.msg.internal{background:var(--warn-bg);color:var(--warn-fg)}
.msg .meta{font-size:12px;opacity:.85;margin-bottom:4px;white-space:normal}
.history{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px;font-size:14px}
.history li{display:grid;grid-template-columns:120px minmax(0,1fr);gap:12px}
.history .d{color:var(--muted);font-variant-numeric:tabular-nums;font-size:13px}
.history .hwho{font-weight:600;color:var(--heading)}
.side{display:flex;flex-direction:column;gap:16px}
.kv{display:flex;flex-direction:column;gap:12px;font-size:14px}
.kv .k{font-size:12px;color:var(--muted)}
.kv .v{color:var(--heading);font-weight:600}

/* Tasks */
.tasklist{display:flex;flex-direction:column;gap:2px}
.task{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:12px 14px;background:var(--surface-2)}
.task form{margin:0}
.task .tt{font-weight:600;color:var(--heading)}
.task.isdone .tt{text-decoration:line-through;color:var(--muted);font-weight:500}
.task .sub2{font-size:13px;color:var(--muted)}
.task select{min-height:34px;padding:5px 8px;font-size:13px;width:auto;background:var(--surface)}
.tickbtn{all:unset;cursor:pointer;width:20px;height:20px;background:var(--surface);box-shadow:inset 0 0 0 2px var(--muted);display:grid;place-items:center}
.tickbtn.on{background:var(--blue);box-shadow:none}
.tickbtn.on::after{content:"";width:10px;height:5px;border-left:2px solid #fff;border-bottom:2px solid #fff;transform:rotate(-45deg) translate(1px,-1px)}
.tickbtn:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.due{font-size:13px;font-weight:600;white-space:nowrap;font-variant-numeric:tabular-nums}
.due.over{color:var(--danger)}
.addtask{display:grid;grid-template-columns:minmax(0,1fr) 190px 170px auto;gap:8px;align-items:end}

/* Units, rooms, inspections, contractors */
.split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:16px;align-items:start}
.list{display:flex;flex-direction:column;gap:2px}
.listrow{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:14px;align-items:center;padding:13px 16px;background:var(--surface);text-decoration:none;color:inherit}
.listrow:hover,.listrow[aria-current="true"]{background:var(--surface-2)}
.listrow b{color:var(--heading)}
.roomchips{display:flex;flex-wrap:wrap;gap:6px}
.roomchip{background:var(--surface-2);padding:6px 10px;font-size:13px;font-weight:600;color:var(--heading);display:inline-flex;gap:6px;align-items:center}
.roomchip .c{font-weight:500;color:var(--muted);font-variant-numeric:tabular-nums}
.roomrow{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;padding:6px 8px;background:var(--surface-2)}
.roomrow form{margin:0}
.roomcheck{display:grid;grid-template-columns:minmax(150px,200px) minmax(0,1fr);gap:8px 12px;align-items:center;padding:8px 10px;background:var(--surface-2)}
.roomcheck input[type=text]{min-height:38px;padding:7px 10px;background:var(--surface)}
.insprec{display:flex;flex-direction:column;gap:10px;padding:16px;background:var(--surface-2)}
.insprec .flag{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px 12px;background:var(--surface)}
.insprec form{margin:0}
.warn{color:var(--danger);font-weight:600}

/* Reports */
.bars{display:flex;flex-direction:column;gap:10px}
.bar{display:grid;grid-template-columns:170px minmax(0,1fr) 92px;gap:12px;align-items:center;font-size:14px}
.bar .track{height:14px;background:var(--surface-2)}
.bar .fill{display:block;height:100%;background:var(--blue)}
.bar .fill.slow{background:var(--red)}
.bar .val{text-align:right;font-weight:700;font-variant-numeric:tabular-nums;color:var(--heading)}
.stat{background:var(--surface);padding:16px 18px}
.stat b{display:block;font-size:30px;line-height:1.1;color:var(--heading);font-variant-numeric:tabular-nums}
.stat span{color:var(--muted);font-size:13px}

/* Sign in pages */
.auth{min-height:100vh;display:grid;place-items:center;padding-block:40px}
.auth .card{width:100%;max-width:440px;box-shadow:inset 0 4px 0 var(--red)}
.auth .logo{display:block;width:170px;margin:0 0 22px}
.codes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:15px;background:var(--surface-2);padding:16px;margin:12px 0}
.qr{background:var(--surface);display:inline-block;padding:8px}
.qr svg{display:block;width:200px;height:200px}
.secret{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:14px;background:var(--surface-2);padding:8px 10px;display:inline-block;letter-spacing:.05em;word-break:break-all}

/* Member side */
.m-wrap{max-width:680px;margin:0 auto;padding-block:20px 56px}
.m-head{display:flex;align-items:center;gap:12px;padding-block:8px 20px;justify-content:space-between}
.m-head a{display:block}
.m-head img{width:140px;height:auto;display:block}
.m-head .title{font-weight:700;font-size:14px;color:var(--heading)}
.panel{background:var(--surface);padding:24px}
.hero{background:var(--blue);color:var(--on);padding:28px 24px 26px;position:relative;overflow:hidden}
.hero h1{color:var(--on);font-size:30px;max-width:16ch}
.hero p{margin-top:10px;max-width:46ch;opacity:.92}
.hero .waves{position:absolute;right:-60px;bottom:-30px;width:340px;opacity:.2;pointer-events:none}
.bigchoice{display:grid;gap:12px}
.bigchoice a{display:flex;flex-direction:column;gap:4px;background:var(--surface);padding:20px 22px;text-decoration:none;color:inherit;transition:background-color 140ms var(--ease)}
.bigchoice a:hover{background:var(--surface-2)}
.bigchoice b{font-size:18px;color:var(--heading)}
.bigchoice .go{color:var(--accent);font-weight:700;font-size:14px;margin-top:6px}
.formsec{display:flex;flex-direction:column;gap:18px}
.formsec+.formsec{margin-top:30px}
.refbox{background:var(--surface-2);padding:18px 20px;display:grid;grid-template-columns:1fr 1fr;gap:16px}
.refbox .k{font-size:13px;color:var(--muted)}
.refbox .v{font-size:26px;font-weight:800;color:var(--heading);letter-spacing:.04em}
.ptimeline{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.ptimeline li{display:grid;grid-template-columns:28px 1fr;gap:12px;padding-bottom:18px;position:relative}
.ptimeline li::before{content:"";position:absolute;left:13px;top:24px;bottom:0;width:2px;background:var(--track)}
.ptimeline li:last-child::before{display:none}
.ptimeline .dot{width:28px;height:28px;border-radius:999px;background:var(--track);display:grid;place-items:center;color:var(--muted);font-size:13px;font-weight:700}
.ptimeline li.done .dot{background:var(--s7-bg);color:var(--s7-fg)}
.ptimeline li.done::before{background:var(--s7-bg)}
.ptimeline li.now .dot{background:var(--red);color:var(--on)}
.ptimeline b{display:block;color:var(--heading)}
.m-foot{position:relative;margin-top:72px;height:56px;background:var(--red)}
.m-foot .circle{position:absolute;left:50%;top:0;transform:translate(-50%,-50%);width:80px;height:80px;border-radius:999px;background:var(--surface);display:grid;place-items:center}
.m-foot img{width:70px;height:70px;display:block}
.m-foot-text{background:var(--red);color:var(--on);text-align:center;font-size:13px;padding:0 16px 20px}

/* Contractor brief (screen and print) */
.briefwrap{display:grid;grid-template-columns:300px minmax(0,1fr);gap:16px;align-items:start}
.sheet{background:#fff;color:#2c2e35;max-width:816px;width:100%;min-height:1056px;box-shadow:0 12px 40px rgba(0,0,0,.18);display:flex;flex-direction:column}
.sheet .body{padding:48px 56px 24px;display:flex;flex-direction:column;gap:22px;flex:1}
.sheet h3{color:#000;font-size:16px;margin-bottom:8px}
.sheet-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap}
.sheet-head img{width:150px;height:auto}
.sheet-head .meta{font-size:13px;color:#5d5f64;text-align:right}
.sheet-head .meta b{color:#000}
.sheet-title{font-size:28px;font-weight:800;color:#000;line-height:1.1}
.sheet p{font-size:14px;line-height:1.55}
.sheet .sgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 20px}
.sheet .sgrid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.sheet .sgrid.four{grid-template-columns:2fr 1fr 1.3fr .7fr}
.sheet .notes{margin:8px 0 0;padding-left:18px;font-size:14px;line-height:1.55}
.sheet .k{font-size:12px;color:#5d5f64}
.sheet .v{font-size:14px;font-weight:600;color:#000}
.sheet .photos{grid-template-columns:repeat(3,minmax(0,1fr))}
.sheet .ph{background:#f3f3f3}
.sheet .callout{background:#f3f3f3;padding:16px 18px}
.sheet-foot{position:relative;height:56px;background:var(--red);margin-top:64px;flex:none}
.sheet-foot .circle{position:absolute;left:50%;top:0;transform:translate(-50%,-50%);width:96px;height:96px;border-radius:999px;background:#fff;display:grid;place-items:center}
.sheet-foot img{width:86px;height:86px;display:block}
.prewrap{white-space:pre-line}
@media print{
  @page{size:letter landscape;margin:12mm}
  body{background:#fff;font-size:11px}
  .head .btns,tr.link{cursor:default}
  .table-wrap{overflow:visible}
  table.data{min-width:0!important;font-size:11px}
  .tile .n{font-size:22px}
  .noprint,.top,.flash,.errors{display:none!important}
  main{padding:0}
  .wrap{max-width:none;padding:0}
  .briefwrap{display:block}
  .sheet{box-shadow:none;max-width:none;min-height:100vh}
  .sheet-foot,.sheet-foot .circle{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

@media (max-width:980px){
  .casegrid,.split,.briefwrap{grid-template-columns:minmax(0,1fr)}
  .tiles,.g4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .g3{grid-template-columns:minmax(0,1fr)}
  .stepper{grid-template-columns:repeat(4,minmax(0,1fr))}
  .g2{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:620px){
  h1{font-size:24px}
  .hero h1{font-size:25px}
  input,select,textarea{font-size:16px!important}
  .panel,.card,.tabpanel,.stagecard,.casehead{padding:18px 16px}
  .row2,.row3,.refbox{grid-template-columns:1fr}
  .dl{grid-template-columns:1fr;gap:2px 0}
  .dl dd{margin-bottom:10px}
  .stepper{grid-template-columns:repeat(2,minmax(0,1fr))}
  .bar{grid-template-columns:100px minmax(0,1fr) 80px}
  .est{grid-template-columns:minmax(0,1fr) auto}
  .est .act{grid-column:1/-1}
  .history li{grid-template-columns:1fr;gap:0}
  .addtask{grid-template-columns:1fr}
  .task{grid-template-columns:auto minmax(0,1fr)}
  .task>.c3,.task>.due{grid-column:2}
  .roomcheck{grid-template-columns:1fr}
  .sheet{min-height:0}
  .sheet .body{padding:28px 20px 16px}
  .sheet .sgrid,.sheet .sgrid.three,.sheet .sgrid.four,.sheet .photos{grid-template-columns:1fr 1fr}
  .lockup img{width:104px}
}

/* Header dropdowns */
.top .wrap{flex-wrap:nowrap}
.nav{align-items:center;flex-wrap:nowrap}
.menu{position:relative}
.menu summary{list-style:none;cursor:pointer;padding:9px 11px;font-weight:600;font-size:14px;color:var(--muted);display:flex;align-items:center;gap:6px;white-space:nowrap;user-select:none}
.menu summary::-webkit-details-marker{display:none}
.menu summary:hover,.menu[open] summary{color:var(--heading)}
.menu summary[aria-current="page"]{color:var(--heading);box-shadow:inset 0 -3px 0 var(--red)}
.menu .caret{width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg) translateY(-2px)}
.menu[open] .caret{transform:rotate(-135deg) translateY(-1px)}
.menu-list{position:absolute;top:calc(100% + 6px);left:0;min-width:200px;background:var(--surface);box-shadow:0 12px 40px rgba(0,0,0,.18);padding:6px;display:flex;flex-direction:column;z-index:30}
.menu.right .menu-list{left:auto;right:0}
.menu-list a,.menu-list button{display:block;text-align:left;width:100%;padding:10px 12px;font-weight:600;font-size:14px;color:var(--ink);text-decoration:none;background:none;border:0;cursor:pointer;font-family:inherit}
.menu-list a:hover,.menu-list button:hover{background:var(--surface-2)}
.menu-list a[aria-current="page"]{box-shadow:inset 3px 0 0 var(--red);background:var(--surface-2)}
.menu-list form{margin:0}
.menu-note{display:block;padding:8px 12px 10px;font-size:12px;color:var(--muted);overflow-wrap:anywhere}
.nav a{white-space:nowrap}
@media (max-width:980px){
  .top .wrap{flex-wrap:wrap;row-gap:4px}
  .nav{order:5;width:100%;flex-wrap:wrap;margin-left:-11px}
  /* On small screens an open group expands in place under the menu instead of floating */
  .nav .menu[open]{flex-basis:100%}
  .nav .menu-list{position:static;box-shadow:none;background:var(--surface-2);min-width:0;margin:0 0 8px 11px}
  .menu.right .menu-list{max-width:calc(100vw - 32px)}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}

.visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
[hidden]{display:none!important}

details>summary.linkbtn{list-style:none;display:inline}
details>summary.linkbtn::-webkit-details-marker{display:none}

/* Phase 2: events, checklists, action items */
.todaycard{display:flex;flex-direction:column;gap:2px;background:var(--blue);color:var(--on);padding:18px 22px;margin-bottom:16px;text-decoration:none}
.todaycard .k{font-size:12px;font-weight:700;letter-spacing:.04em;opacity:.8}
.todaycard .t{font-size:22px;font-weight:700}
.todaycard .s{font-size:14px;opacity:.9}
.erow{display:grid;grid-template-columns:52px minmax(0,1fr) auto;gap:14px;align-items:center;padding:10px 12px;background:var(--surface-2);text-decoration:none;color:inherit}
.erow:hover{background:var(--track)}
.erow b{color:var(--heading)}
.date{display:flex;flex-direction:column;align-items:center;background:var(--surface);padding:5px 0;line-height:1.1}
.date .m{font-size:11px;font-weight:700;color:var(--red);text-transform:uppercase;letter-spacing:.06em}
.date b{font-size:19px;font-weight:800}
.arow{display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:12px;align-items:center;padding:11px 12px;background:var(--surface-2)}
.arow form{margin:0}
.arow .t{font-weight:600;color:var(--heading);overflow-wrap:anywhere}
.arow .s{font-size:13px;color:var(--muted)}
.arow .s a{color:inherit}
.arow.done .t{color:var(--muted);text-decoration:line-through}
.tickbox{width:22px;height:22px;border:0;padding:0;cursor:pointer;background:var(--surface);box-shadow:inset 0 0 0 2px var(--muted);display:grid;place-items:center}
.tickbox.on{background:var(--s7-bg);box-shadow:none}
.tickbox.on::after{content:"";width:11px;height:5px;border-left:2px solid #fff;border-bottom:2px solid #fff;transform:rotate(-45deg) translate(1px,-1px)}
.aedit{display:flex;flex-direction:column}
.aopts{background:var(--surface-2);padding:0 12px 8px 52px;margin-top:-2px}
.aopts{padding-top:2px}
.aopts .linkbtn{color:var(--blue);font-weight:600}
.linkbtn.danger,.btn.danger{color:var(--danger)}
.aopts .linkbtn.danger{color:var(--danger)}
.aopts select,.aopts input{min-height:36px;padding:6px 8px;background:var(--surface)}
.progress{height:8px;background:var(--surface-2)}
.progress i{display:block;height:100%;background:var(--s7-bg)}
.taskrow{display:flex;gap:10px;align-items:flex-start}
.taskrow>form:first-child{flex:1;min-width:0}
.pgroup{margin:10px 0 2px;font-size:14px;font-weight:700;color:var(--muted)}
.pgroup:first-child{margin-top:0}
.extrarow{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) 170px;gap:8px}
.listhead{font-size:13px;font-weight:600;color:var(--muted)}
.listhead.row{padding:0 12px}
.tpl summary{cursor:pointer;list-style:none;display:flex;gap:10px;align-items:baseline;flex-wrap:wrap}
.tpl summary::-webkit-details-marker{display:none}
.tpl summary::before{content:"";width:8px;height:8px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(-45deg);margin-right:4px;align-self:center;transition:transform 140ms var(--ease)}
.tpl[open] summary::before{transform:rotate(45deg)}
.tpl summary b{font-size:17px;color:var(--heading)}
.tickset{border:0;margin:0;padding:12px;background:var(--surface-2);display:flex;flex-direction:column;gap:2px;min-width:0}
.tickset legend{font-weight:700;font-size:14px;color:var(--heading);padding:0;float:left;margin-bottom:8px}
.tick{display:flex;gap:10px;align-items:flex-start;padding:6px 4px;font-size:14px;cursor:pointer}
.tick input{width:18px;height:18px;margin:2px 0 0;flex:none;accent-color:var(--blue)}
.tplgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:6px}
.tplcard{position:relative;display:block;cursor:pointer}
.tplcard input{position:absolute;opacity:0;inset:0;margin:0;cursor:pointer}
.tplcard>span{display:flex;flex-direction:column;gap:3px;padding:14px;background:var(--surface-2);height:100%}
.tplcard b{color:var(--heading)}
.tplcard>span>span{font-size:12px;color:var(--muted)}
.tplcard input:checked+span{background:var(--blue);color:var(--on)}
.tplcard input:checked+span b,.tplcard input:checked+span>span{color:var(--on)}
.tplcard input:focus-visible+span{outline:2px solid var(--blue);outline-offset:2px}
.presets{display:flex;flex-direction:column;gap:4px}
.preset{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px 12px;background:var(--surface-2);cursor:pointer;transition:background-color 140ms var(--ease)}
.preset .ptext{display:flex;flex-direction:column;gap:2px;min-width:0}
.preset b{color:var(--heading);font-weight:600}
.preset .plus{width:38px;height:38px;background:var(--blue);display:grid;place-items:center;position:relative;flex:none}
.preset .plus::before,.preset .plus::after{content:"";position:absolute;width:16px;height:2px;background:var(--on)}
.preset .plus::after{transform:rotate(90deg)}
.preset:has(input:checked){background:var(--s5-bg)}
.preset:has(input:checked) .small{color:var(--s5-fg)}
.preset:has(input:checked) .plus{background:var(--track)}
.preset:has(input:checked) .plus::before{background:var(--ink)}
.preset:has(input:checked) .plus::after{display:none}
.preset:has(input:focus-visible) .plus{outline:2px solid var(--blue);outline-offset:2px}
.tasklist{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:2px}
.tasklistrow{display:flex;gap:8px;align-items:center;background:var(--surface-2);padding:6px 6px 6px 12px;font-size:14px}
.tasklistrow form{margin:0}
.iconbtn{width:32px;height:32px;border:0;background:var(--surface);cursor:pointer;font-size:15px;font-weight:700;color:var(--ink)}
.iconbtn:hover{background:var(--track)}
.iconbtn[disabled]{opacity:.35;cursor:default}
.presetedit{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end;background:var(--surface);padding:12px 14px}
.presetedit.off{opacity:.55}
.presetedit form{margin:0}
.presetfields{display:grid;grid-template-columns:minmax(0,1fr) 110px 128px;gap:10px;align-items:end}
.presetfields input,.presetfields select{min-height:38px;padding:6px 10px;background:var(--surface-2)}
.presetside{padding-bottom:2px}
@media (max-width:760px){
  .presetedit{grid-template-columns:1fr}
  .presetfields{grid-template-columns:1fr 1fr}
  .presetfields .field:first-child{grid-column:1/-1}
  .aopts{padding-left:12px}
  .extrarow{grid-template-columns:1fr 1fr}
  .extrarow input[type=text]{grid-column:1/-1}
  .extrarow.listhead{display:none}
}

/* Searchable dropdown */
.sd{position:relative}
.sd-input{width:100%;padding-right:40px!important}
.sd::after{content:"";position:absolute;right:16px;top:22px;width:7px;height:7px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:translateY(-70%) rotate(45deg);pointer-events:none}
.sd-list{position:absolute;z-index:30;left:0;right:0;top:100%;margin:2px 0 0;padding:4px 0;list-style:none;background:var(--surface);box-shadow:0 8px 24px rgba(0,0,0,.14);max-height:280px;overflow-y:auto}
.sd-list li{padding:9px 14px;cursor:pointer;font-size:15px}
.sd-list li:hover,.sd-list li.on{background:var(--surface-2)}
.sd-list li[aria-selected="true"]{font-weight:700;color:var(--heading)}
.sd-list li.sd-none{color:var(--muted);cursor:default}

/* Discussions */
.arow a.t{display:block;text-decoration:none}
.arow a.t:hover{text-decoration:underline}
.plainlist{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:4px;font-size:14px;overflow-wrap:anywhere}
.ownerpage{max-width:720px;padding-block:28px 64px;display:flex;flex-direction:column;gap:16px}
.ownerpage .logo{display:block;height:auto}
.ownerpage h1{font-size:24px}
@media (max-width:980px){.casegrid{grid-template-columns:1fr}}
