/* ---- shared: weather, schedule views, finish line ---- */
:root { --sage: #5f7056; --bone: #f4f2ee; --bone-muted: #dde2d4; --rain: #2f6f9f; --rain-soft: #e3eef6; }
@media (prefers-color-scheme: dark) { :root { --sage: #2a3326; --bone: #ecebe6; --bone-muted: #c3c9b9; --rain: #8cbfe3; --rain-soft: #1f2d38; } }
.fin { display: inline-grid; gap: 1px; }
.fin b { font-weight: 700; }
.finsub { font-size: 0.75rem; opacity: 0.8; }
.crewline { display: block; font-size: 0.8rem; margin-top: 2px; }
.wx { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 0 0 14px; }
.wxd { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 4px; display: grid; justify-items: center; gap: 3px; font-size: 0.78rem; min-width: 0; }
.wxd svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.wxd.wet { border-color: var(--rain); background: var(--rain-soft); }
.wxd.wet svg { color: var(--rain); }
.wxn { font-weight: 700; }
.wxt { font-variant-numeric: tabular-nums; }
.wxr { color: var(--rain); font-weight: 600; min-height: 1em; }
.wxwarn { background: var(--rain-soft); color: var(--ink, inherit); border-left: 4px solid var(--rain); border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-size: 0.9rem; }
.small.wet { color: var(--rain); font-weight: 600; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin: 0 0 12px; }
.seg button { border: 0; background: none; font: inherit; font-size: 0.85rem; font-weight: 600; padding: 6px 14px; border-radius: 999px; color: var(--muted); cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink, #fff); }
.gantt { overflow-x: auto; display: grid; gap: 2px; font-size: 0.8rem; }
.grow { display: grid; grid-template-columns: minmax(120px, 34%) minmax(calc(var(--weeks) * 46px), 1fr); align-items: center; gap: 8px; min-height: 22px; }
.gname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gtrack { position: relative; height: 18px; background: repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / var(--weeks) - 1px), var(--line) calc(100% / var(--weeks) - 1px), var(--line) calc(100% / var(--weeks))); }
.ghead .gtrack { height: 20px; background: none; }
.ghead .gtrack span { position: absolute; top: 0; font-size: 0.7rem; color: var(--muted); padding-left: 2px; white-space: nowrap; }
.gbar { position: absolute; top: 3px; height: 12px; border-radius: 4px; background: var(--muted); opacity: 0.55; }
.gbar.now { background: var(--accent); opacity: 1; }
.gbar.done { background: var(--ok); opacity: 0.6; }
.gshut { position: absolute; top: -2px; bottom: -2px; background: repeating-linear-gradient(135deg, var(--line) 0 4px, transparent 4px 8px); opacity: 0.9; }
.wlist { display: grid; }
.wrow { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.wrow:last-child { border-bottom: 0; }
.wwk { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wrow.shut { color: var(--muted); font-style: italic; }
.ptot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.ptable { display: grid; }
.ptable .prow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 8px 18px; border-bottom: 1px solid var(--line); }
.ptable .prow.ptotal { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--line); }
.gtoday { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--red, #b42318); z-index: 1; }
.cal .calnav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cdow { font-size: 0.7rem; font-weight: 700; color: var(--muted); text-align: center; text-transform: uppercase; letter-spacing: 0.05em; }
.cday { min-height: 78px; border: 1px solid var(--line); border-radius: 6px; padding: 4px; display: grid; align-content: start; gap: 2px; min-width: 0; }
.cday.out { opacity: 0.45; }
.cday.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cnum { font-size: 0.75rem; font-weight: 700; }
.cev { font-size: 0.68rem; line-height: 1.25; background: var(--sunk); border-radius: 3px; padding: 1px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cev.now { background: var(--accent); color: var(--accent-ink, #fff); }
.cmore { font-size: 0.66rem; color: var(--muted); }
@media (max-width: 560px) { .cday { min-height: 54px; } .cev { font-size: 0.6rem; } .wx { gap: 3px; } .wxd { padding: 6px 2px; font-size: 0.7rem; } .wxd svg { width: 20px; height: 20px; } }

/* ---- staff site ---- */
.tiles { align-items: stretch; }
.tiles.t2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 620px) { .tiles.t2 { grid-template-columns: minmax(0, 1fr); } }
.xtile { display: flex; flex-direction: column; }
.xtile .tlist { flex: 1; align-content: start; }
.trow a { color: inherit; text-decoration: none; }
.trow a:hover b { text-decoration: underline; }
.tsee { padding: 8px 14px 12px; display: block; }
.tsub { padding: 0 14px 6px; margin: 0; font-weight: 700; font-size: 0.85rem; }
.acts.l { justify-content: flex-start; }
.form.mini { padding: 8px 0 4px; gap: 8px; }
.form.mini[hidden], .form.mini.inl[hidden] { display: none; }
.form.mini textarea { min-height: 70px; }
.form.mini.inl { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.form.mini.inl label { flex: 1 1 140px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.homeacts { margin-top: 6px; }
.btn.onsagebtn { color: var(--bone); border-color: var(--bone-muted); background: transparent; }
.onsage.small { font-size: 0.85rem; color: var(--bone-muted); }
.home > h2.onsage { margin-bottom: -8px; }
.jcards { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.jcard, .jcard * { text-decoration: none; }
.jcard:hover h2 { text-decoration: underline; }
.jcard { padding: 0; overflow: hidden; gap: 0; align-content: start; }
.jcard.isred { border-color: var(--red); box-shadow: inset 0 4px 0 var(--red); }
.jcover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--sunk); }
.jcover.none { background: linear-gradient(135deg, var(--sunk), var(--line)); }
.jbody { display: grid; gap: 6px; padding: 12px 14px 14px; }
.jred { color: var(--red); font-weight: 600; font-size: 0.85rem; line-height: 1.4; }
.jok { color: var(--muted); font-size: 0.85rem; }
.mysg { position: relative; margin-right: 12px; }
.rdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-left: 5px; vertical-align: middle; }
.sg { display: grid; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.sg textarea { min-height: 64px; width: 100%; }
.sg input[name=r] { flex: 1 1 200px; width: auto; }
.sg select { width: auto; padding: 6px 8px; }
.sgdone { padding: 8px 0 0; }
.sgdone summary { padding: 0 18px 8px; }
.barcover { width: 96px; height: 64px; object-fit: cover; border-radius: 8px; border: 2px solid var(--bone); align-self: center; }
.jobbar .fin, .jobbar .crewline { color: var(--bone); }
.jobbar .finsub { color: var(--bone-muted); opacity: 1; }
.hero { width: 100%; max-height: 300px; aspect-ratio: 21 / 9; object-fit: cover; border-radius: var(--radius); display: block; margin-top: 12px; }
.reply { margin-top: 8px; background: var(--sunk); border-radius: 8px; padding: 8px 12px; display: grid; gap: 2px; white-space: pre-wrap; }
.row.qa { grid-template-columns: minmax(0, 1fr); }
.docmeta summary { cursor: pointer; color: var(--accent); margin-top: 4px; }
fieldset.trades { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
fieldset.trades legend { padding: 0 4px; }
.coverpick { position: relative; }
.coverpick .cpl { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 0.7rem; padding: 3px; text-align: center; }
.coverpick:hover { border-color: var(--accent); }

/* ---- client portal on sage ---- */
body.sage-portal { background: var(--sage); }
body.sage-portal .jobhead h1, body.sage-portal .jobhead .label { color: var(--bone); }
body.sage-portal .jobhead .muted, body.sage-portal main > p.muted { color: var(--bone-muted); }
body.sage-portal .tabs { border-bottom-color: rgba(244, 242, 238, 0.35); }
body.sage-portal .tabs .tab { color: var(--bone-muted); }
body.sage-portal .tabs .tab[aria-selected="true"] { color: var(--bone); border-bottom-color: var(--bone); }
body.sage-portal .hero { margin-top: 20px; overflow: hidden; border-radius: var(--radius); max-height: 320px; }
body.sage-portal .hero img { width: 100%; height: 100%; max-height: 320px; object-fit: cover; display: block; }
body.sage-portal #segh .seg { margin-top: 4px; }
.prose ol { padding-left: 20px; display: grid; gap: 8px; margin: 0; }
.entry.qa .reply { margin-top: 6px; }
body.sage-portal main .tabs { overflow-x: auto; scrollbar-width: thin; }
body.sage-portal main .tabs .tab { flex: 0 0 auto; }
.xtile > .form.mini { padding: 10px 14px 4px; }

/* ---- stage 3: quote dashboards, team, minutes ---- */
.welcome .panel-body { font-size: 1rem; line-height: 1.6; }
.welcome .panel-body p { margin: 0; }
.welcome .sig { font-weight: 700; }
.grid main > .welcome { margin-bottom: 16px; }
.dots { display: flex; gap: 4px; margin-top: 8px; }
.dots i { width: 18px; height: 4px; border-radius: 2px; background: var(--line); }
.dots i.on { background: var(--accent); }
.tag { display: inline-block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; vertical-align: 1px; }
.tag.q { background: var(--ok-soft, #e5f4e4); color: var(--ok, #2f6b2c); }
.tag.a { background: var(--sunk); color: var(--muted); }
.ptable .prow { align-items: start; }
.pcat { min-width: 0; }
.pinc { margin: 6px 0 2px; padding-left: 18px; font-size: 0.85rem; color: var(--muted); display: grid; gap: 2px; }
.disc { margin: 14px 2px 0; }
body.sage-portal .disc { color: var(--bone-muted); }
.steps { list-style: none; counter-reset: st; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: st; display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 12px; row-gap: 2px; }
.steps li::before { content: counter(st); grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; color: var(--muted); }
.steps li.done::before { content: "✓"; background: var(--sunk); }
.steps li.cur::before { border-color: var(--accent); background: var(--accent); color: var(--accent-ink, #fff); }
.steps li span { color: var(--muted); font-size: 0.9rem; }
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px; }
.tm { display: grid; justify-items: center; text-align: center; gap: 4px; }
.tmpic { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--sunk); color: var(--muted); font-weight: 700; font-size: 1.2rem; flex: 0 0 auto; }
.pmrow { display: flex; gap: 12px; align-items: center; }
.pmrow .tmpic { width: 56px; height: 56px; font-size: 1rem; }
.teamrow .tmpic { width: 52px; height: 52px; font-size: 0.95rem; }
.teamrow { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.phases h3 { margin: 0 0 6px; font-size: 1rem; }
.plist { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 0.92rem; }
.prose .plist { gap: 8px; }
.minutes { white-space: pre-wrap; line-height: 1.55; }

/* ---- stage 4: job layout, safety, defects, schedule clicks ---- */
.shero { position: relative; margin-top: 12px; }
.shero img { width: 100%; max-height: 300px; aspect-ratio: 21 / 9; object-fit: cover; border-radius: var(--radius); display: block; }
.covercam { position: absolute; right: 10px; bottom: 10px; width: 30px; height: 30px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.35); color: #fff; cursor: pointer; opacity: 0.55; transition: opacity 0.15s; }
.covercam:hover, .covercam:focus-visible { opacity: 1; }
.covercam.solo { position: static; margin-top: 10px; background: transparent; color: var(--bone-muted); border: 1px solid var(--bone-muted); opacity: 0.6; }
.covgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.covpick { padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: var(--sunk); cursor: pointer; aspect-ratio: 1; display: block; }
.covpick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.covpick:hover { border-color: var(--accent); }
#covp { margin-top: 12px; }
.sgrid { margin-top: 4px; }
.sgrid > main { min-width: 0; }
.wxtile .wx { grid-template-columns: minmax(0, 1fr); gap: 4px; margin: 0; }
.wxtile .wxd { grid-template-columns: 3.2em 28px minmax(0, 1fr) auto; justify-items: start; align-items: center; padding: 5px 8px; text-align: left; }
.wxtile .wxd svg { width: 22px; height: 22px; }
.wxtile .wxwarn { margin: 0 0 8px; }
.ecard .eline { display: grid; gap: 1px; font-size: 0.9rem; }
.e000 { margin: 0; background: var(--rain-soft); border-left: 4px solid var(--red, #b42318); border-radius: 6px; padding: 8px 10px; font-size: 0.9rem; }
.cnotice { border: 2px solid var(--red, #b42318); margin-bottom: 14px; }
.qa5 { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.qa5 input[type=date] { width: auto; padding: 4px 6px; font-size: 0.85rem; }
.flash { animation: flash5 2.4s ease-out; }
@keyframes flash5 { 0%, 40% { box-shadow: inset 0 0 0 2px var(--accent); background: var(--sunk); } 100% { box-shadow: none; } }
.glead { position: absolute; top: 6px; height: 6px; border-radius: 3px; background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 7px); opacity: 0.8; }
.glead.late { background: repeating-linear-gradient(90deg, var(--red, #b42318) 0 4px, transparent 4px 7px); }
.glead.bk { background: repeating-linear-gradient(90deg, var(--ok) 0 4px, transparent 4px 7px); }
.glname { font-style: italic; color: var(--muted); }
.gantt.click .gbar, .gantt.click .gname[data-task] { cursor: pointer; }
.gantt.click .gbar:hover { outline: 2px solid var(--accent); }
.cev[data-task] { cursor: pointer; }
#taskp, #ptask { margin-bottom: 14px; }
.spage h1 { margin: 6px 0 14px; }
.sgrid2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 760px) { .sgrid2 { grid-template-columns: minmax(0, 1fr); } }
.sreport #repOpen { justify-self: start; }
details.row summary { cursor: pointer; list-style-position: outside; }
.sgrid main .tabs { overflow-x: auto; scrollbar-width: thin; flex-wrap: nowrap; }
.sgrid main .tabs .tab { flex: 0 0 auto; }

/* stage 5: compact tiles, big views, Jamie's home, briefs, clients, coming back */
.xtile .tlist { max-height: 340px; overflow-y: auto; overscroll-behavior: contain; }
.xtile .trow { padding-top: 7px; padding-bottom: 7px; }
.tile.open .tlist, .tlist.big { max-height: none; overflow: visible; }
.thead-link { color: inherit; text-decoration: none; }
.thead-link:hover, .thead-link:focus-visible { text-decoration: underline; }
.thead-link::after { content: " \203A"; color: var(--muted); font-weight: 400; }
.bfilter { margin: 0 0 12px; }
.bfilter label { display: inline-flex; gap: 8px; align-items: center; }
.bfilter select { max-width: 100%; }
#bfull .bfilter { padding: 10px 18px 0; }
.bhandled { padding: 10px 18px 16px; border-top: 1px solid var(--line); }
.bhandled summary { cursor: pointer; font-weight: 600; }
.dhome { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 16px; }
.dside { display: grid; gap: 16px; min-width: 0; }
.dmain { min-width: 0; }
#tBrief.bmain .tlist { max-height: 72vh; }
@media (max-width: 860px) { .dhome { grid-template-columns: minmax(0, 1fr); } #tBrief.bmain .tlist { max-height: 60vh; } }
.ccard .cli { display: grid; gap: 3px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.ccard .cli:last-child { border-bottom: 0; padding-bottom: 0; }
.ccard .csug { display: grid; gap: 10px; padding: 10px; border-radius: 10px; background: var(--sunk); }
.invprev { display: grid; gap: 6px; margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.invprev pre { white-space: pre-wrap; font: inherit; font-size: 0.85rem; margin: 0; max-height: 260px; overflow-y: auto; }
.vrm.warn { color: var(--red, #b42318); border-color: currentColor; }
.varch summary { cursor: pointer; list-style: none; }
.varch summary::-webkit-details-marker { display: none; }
.gwait { position: absolute; top: 9px; height: 0; border-top: 2px dashed var(--muted); opacity: 0.7; }
.gbar.gback { background: var(--warn); opacity: 0.85; }
.sstile .tlist { gap: 10px; padding: 12px 18px 16px; }
.ssstage { padding: 12px 18px; border-top: 1px solid var(--line); }
.ssstage h3 { margin: 0 0 8px; font-size: 1rem; }
.ssrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.ssrow .check { flex: 1 1 260px; min-width: 0; }
.ssrow select { width: auto; padding: 4px 8px; font-size: 0.85rem; }
.ssrow.off .check span { color: var(--muted); text-decoration: line-through; }
.ssadd { padding: 10px 0 0; }
.ssadd label:nth-of-type(2) { flex: 0 0 auto; }
/* ---------- Stage 6: portal look, Jamie's home, phones, job page tidy-up ---------- */
[hidden] { display: none !important; }
:root { --ok-soft: #e3efe6; --amber: var(--warn); --amber-soft: var(--warn-soft); }
@media (prefers-color-scheme: dark) { :root { --ok-soft: #1f3327; } }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.amber, .pill.todo { background: var(--amber-soft); color: var(--amber); }
.btn.yellow { background: #f5c518; color: #2b2300; border: 1px solid #e0b40c; font-weight: 700; }
.btn.yellow:hover { background: #ffd23a; }
/* one input style everywhere */
.staffsite input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]), .staffsite select, .staffsite textarea { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-family: inherit; font-size: 0.92rem; padding: 9px 10px; box-shadow: none; }
.staffsite input:focus-visible, .staffsite select:focus-visible, .staffsite textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
/* number strip on staff homes */
.hsum { margin: 18px 0 4px; padding-bottom: 8px; }
.hsum .stat { text-decoration: none; color: inherit; }
.hsum .stat:hover { border-color: var(--accent); }
.hsum .stat .label { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.hsum .stat.bad .big { color: var(--red); }
.hsum .stat .small { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* email rows with a suggested action */
.trow.em { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 12px 16px; align-items: start; }
.trow.em .ewhen { font-size: 0.8rem; color: var(--muted); line-height: 1.35; overflow-wrap: anywhere; }
.trow.em .ewhen b { display: block; color: var(--ink); font-size: 0.86rem; }
.trow.em .ebody { min-width: 0; display: grid; gap: 6px; }
.trow.em h4 { margin: 0; font-size: 0.98rem; display: flex; gap: 8px; align-items: baseline; }
.trow.em h4 .lamp { flex: 0 0 8px; width: 8px; height: 8px; margin: 0; align-self: center; }
.trow.em h4 a { color: inherit; text-decoration: none; }
.trow.em h4 a:hover { text-decoration: underline; }
.trow.em p { margin: 0; font-size: 0.88rem; color: var(--muted); }
.trow.em p b { color: var(--ink); font-weight: 600; }
.etag { display: inline-block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 1px 8px; border-radius: 999px; margin-right: 6px; text-decoration: none; background: hsl(var(--h) 45% 92%); color: hsl(var(--h) 45% 28%); }
@media (prefers-color-scheme: dark) { .etag { background: hsl(var(--h) 25% 22%); color: hsl(var(--h) 45% 82%); } }
.trow.em .sugg { font-size: 0.78rem; color: var(--muted); margin-right: 2px; }
.trow.em .emore { min-width: 40px; font-weight: 700; letter-spacing: 1px; }
.trow.em .emenu { padding-top: 2px; }
.trow.em .btn.warn { color: var(--red); border-color: currentColor; }
@media (max-width: 640px) { .trow.em { grid-template-columns: minmax(0, 1fr); gap: 4px; } .trow.em .ewhen b { display: inline; margin-right: 6px; } .trow.em .sugg { display: none; } }
/* needs you and slim job lists */
.needsyou .nh { padding: 12px 16px 2px; font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.needsyou .nh a { color: inherit; text-decoration: none; }
.needsyou .tlist { max-height: none; }
.slimjobs .jr { display: flex; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); align-items: flex-start; text-decoration: none; color: inherit; }
.slimjobs .jr:first-of-type { border-top: 0; }
.slimjobs .jr:hover b { text-decoration: underline; }
.slimjobs .jr .lamp { flex: 0 0 10px; margin-top: 6px; }
.slimjobs .jr b { font-size: 0.92rem; }
.slimjobs .jr small { display: block; color: var(--muted); font-size: 0.78rem; }
.tgrp b { font-weight: 700; }
.sgline .panel-body { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.hcount { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 0.7rem; line-height: 18px; text-align: center; font-weight: 700; text-decoration: none; }
/* cards fit their content; blank covers get a band with the street */
.cards, .jcards, .tiles { align-items: start; }
.jcover.none { display: flex; align-items: flex-end; aspect-ratio: auto; height: 74px; padding: 10px 14px; background: hsl(var(--h, 90) 22% 42%); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
/* job page: tabs wrap, side cards fold to one line, main first on phones */
.sgrid main .tabs { flex-wrap: wrap; overflow: visible; }
.panel.fold .panel-head { cursor: pointer; flex-wrap: wrap; row-gap: 2px; }
.panel.fold .foldsum { flex: 1 1 100%; order: 3; }
.panel.fold.open .foldsum { display: none; }
.panel.fold .foldchev { order: 2; margin-left: auto; color: var(--muted); transition: transform 0.15s; font-size: 1.2rem; line-height: 1; }
.panel.fold.open .foldchev { transform: rotate(90deg); }
.panel.fold .panel-head h2 { order: 0; }
.panel.fold .panel-head > .link-btn, .panel.fold .panel-head > button:not(.foldchev) { order: 1; margin-left: auto; }
.panel.fold:not(.open) > :not(.panel-head) { display: none; }
.uearly .panel-body { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.uearly { margin-bottom: 16px; }
/* smaller, out-of-the-way suggest button */
.btn.small.suggest-btn, .suggest-btn { padding: 6px 12px; font-size: 0.78rem; opacity: 0.85; bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); }
.suggest-btn:hover { opacity: 1; }
/* phones */
.menubtn, .btabs { display: none; }
@media (max-width: 700px) {
  .sgrid .side, .grid .side { order: 0; }
  .top .wrap { flex-wrap: nowrap; padding-block: 10px; }
  .top .menubtn { display: inline-block; margin-left: auto; font-weight: 600; }
  .top .who { display: none; }
  .top.open .wrap { flex-wrap: wrap; }
  .top.open .who { display: flex; flex-direction: column; align-items: flex-start; flex-basis: 100%; gap: 10px; padding: 8px 0 4px; }
  .btabs { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
  .btabs a { text-align: center; padding: 12px 4px; font-size: 0.82rem; font-weight: 600; color: var(--muted); text-decoration: none; }
  .btabs a.on { color: var(--ink); box-shadow: inset 0 3px 0 var(--accent); }
  body { padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px)); }
  .suggest-btn { bottom: calc(env(safe-area-inset-bottom, 0px) + 62px); }
  .jcards { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .jcard { grid-template-columns: 64px minmax(0, 1fr); display: grid; align-items: center; }
  .jcard .jcover { width: 64px; height: 64px; aspect-ratio: 1; }
  .jcard .jcover.none { font-size: 0; padding: 0; }
  .jcard .jbody { padding: 8px 12px; gap: 2px; }
  .jcard .jbody h2 { font-size: 0.95rem; }
  .jcard .jbody > .small, .jcard .jbody .wet, .jcard .jbody .fin, .jcard .jbody > span:not(.label):not(.jred):not(.jok) { display: none; }
  .jcard .jred { font-size: 0.78rem; }
  .jcard.isred { box-shadow: inset 4px 0 0 var(--red); }
  .hsum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .homeacts { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .homeacts > * { flex: 0 0 auto; }
  .sgrid main .tabs .tab { padding: 8px 10px; font-size: 0.9rem; }
  .jsum .stat:nth-child(n+3) { display: none; }
  .hsum .stat { padding: 10px 12px; }
  .hsum .stat .big { font-size: 1.2rem; }
}
.dmain .xtile .tlist { max-height: 560px; }
.att .attrow .lamp:not(.red):not(.ok) { background: var(--warn); }
.jsum { margin: 0 0 18px; padding-bottom: 0; }
/* ---------- Stage 7: trades, crew goals, Friday wrap-up ---------- */
.jbox { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; padding: 4px 0 8px; }
.jbox .check { font-size: 0.88rem; }
.trrow.off { opacity: 0.6; }
.goalp { margin-bottom: 16px; border-left: 4px solid var(--accent); }
.goalp .goalt { font-size: 1.05rem; }
.gparts { display: grid; gap: 4px; }
.goalf textarea { min-height: 90px; }
.wraprow b { color: var(--ink); }
.clive { display: grid; gap: 4px; padding: 10px 12px; border-radius: 8px; border-left: 4px solid var(--warn); background: var(--warn-soft); }
.clive.on { border-left-color: var(--ok); background: var(--ok-soft); }
.clive .btn { justify-self: start; margin-top: 4px; }

/* stage 9: Set up list, SharePoint link, Friday wrap-up tick-off */
.lamp.claude { background: var(--rain, #2f6f9f); }
.setupt .trow.su .acts { margin-top: 6px; }
.setupt .suf { margin-top: 8px; padding: 0; }
.setupt .sufoot { margin: 0; padding: 10px 16px 14px; border-top: 1px solid var(--line); }
.jsp { margin: -6px 0 12px; }
.jsp a { color: var(--accent); font-weight: 700; text-decoration: none; }
.wth { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.wth h3 { margin: 0; }
.wtrow { padding: 10px 0; border-bottom: 1px solid var(--line); }
.wtrow:last-child { border-bottom: 0; }
.wtt { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.wtt .muted { white-space: nowrap; }
.wwhy { font-size: .84rem; color: var(--muted); margin: 3px 0 8px; }
.wwhy b { color: var(--accent); }
.wseg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wopt { font: inherit; font-size: .8rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.wopt.guess { border-style: dashed; border-color: var(--accent); }
.wopt.on.done { background: var(--ok-soft); border: 1px solid var(--ok); color: var(--ok); font-weight: 700; }
.wopt.on.under { background: var(--rain-soft); border: 1px solid var(--rain); color: var(--rain); font-weight: 700; }
.wopt.on.missed { background: var(--red-soft); border: 1px solid var(--red); color: var(--red); font-weight: 700; }
.wopt.on.back { background: var(--warn-soft); border: 1px solid var(--warn); color: var(--warn); font-weight: 700; }
.wmini { font: inherit; font-size: .82rem; border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; background: var(--surface); color: var(--ink); }
.wfx { font-size: .76rem; color: var(--muted); margin-top: 7px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.wfx span:not(.muted) { background: var(--sunk); border-radius: 5px; padding: 1px 7px; }
.wfx.lit span:not(.muted) { background: var(--ok-soft); color: var(--ok); }
.wbody { white-space: pre-wrap; font-size: .9rem; background: var(--sunk); border-radius: 8px; padding: 10px 12px; margin: 0 0 10px; }
.wdel { border: 1px dashed var(--warn); border-radius: 9px; padding: 8px 12px; margin: 0 0 10px; }
.wasks { border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; margin: 0 0 10px; }
.wdh { font-size: .82rem; font-weight: 700; color: var(--warn); display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.wasks .wdh { color: var(--ink); }
.wdh .muted { font-weight: 400; }
.wseg .wmini { width: auto !important; min-width: 0; flex: 0 0 auto; margin: 0 !important; padding: 3px 6px !important; height: auto; min-height: 0; font-size: .82rem; }
.wseg .wopt { margin: 0 !important; line-height: 1.3; }
.setupt .nh { padding: 12px 16px 2px; font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.setupt .tlist { max-height: none; }

/* stage 10: section fills and warnings */
.sufill { margin: 6px 0 2px; font-size: .86rem; }
.sufill summary { cursor: pointer; color: var(--muted); margin-bottom: 4px; }
.sufill .check { padding: 2px 0; }
.suchk { margin: 6px 0 0; font-size: .86rem; }
.sucmp { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0; }
.sucmp > div { background: var(--sunk); border-radius: 7px; padding: 6px 9px; display: grid; gap: 2px; min-width: 0; }
.sucmp b { overflow-wrap: anywhere; }
.jfill { margin: -4px 0 14px; }
.jfill .tlist { max-height: none; }
