/* Guided sections: a section is a set of pages (one URL each) with a page menu on the left.
   Plain-language status chips, summary cards, step forms, timeline bars and task cards.
   Colours come from the theme tokens (devheal-brand.css) so dark and light themes both work. */
.gx-layout{display:grid;grid-template-columns:270px minmax(0,1fr);gap:18px;align-items:start}
.gx-menu{position:sticky;top:10px;display:grid;gap:5px}
.gx-menu a{display:grid;grid-template-columns:32px minmax(0,1fr);gap:10px;align-items:center;padding:9px 11px;border-radius:12px;border:1px solid var(--dh-line);color:var(--white);text-decoration:none;background:var(--surface)}
.gx-menu a:hover{background:var(--surface2);border-color:var(--dh-accent)}
.gx-menu a.current{background:var(--dh-accent-wash);border-color:var(--dh-accent)}
.gx-menu .n{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:12px;background:var(--dh-accent-wash);color:var(--dh-accent)}
.gx-menu a.current .n{background:var(--dh-accent);color:var(--dh-accent-fg)}
.gx-menu .t{font-weight:700;font-size:13px;line-height:1.25}
.gx-menu small{display:block;color:var(--muted);font-size:11px;margin-top:2px}
.gx-dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:5px;background:var(--muted);vertical-align:middle;opacity:.6}
.gx-dot.done{background:var(--dh-ok);opacity:1}.gx-dot.todo{background:var(--dh-warn);opacity:1}.gx-dot.blocked{background:var(--dh-danger);opacity:1}.gx-dot.wait{background:var(--dh-info);opacity:1}
.gx-page{min-width:0;display:grid;gap:18px}
.gx-page .panel+.panel{margin-top:0}
.gx-intro{display:flex;justify-content:space-between;gap:14px;align-items:start;flex-wrap:wrap}
.gx-intro h3{margin:0 0 4px;font-size:18px}
.gx-intro p{margin:0;color:var(--muted);line-height:1.5;max-width:720px}
.gx-hero{border:1px solid var(--dh-accent);background:var(--dh-accent-wash)}
.gx-hero h3{font-size:20px;margin:0 0 6px}
.gx-hero p{color:var(--muted);margin:0 0 12px;line-height:1.5}
.gx-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}
.gx-card{background:var(--surface2);border:1px solid var(--dh-line);border-radius:12px;padding:14px;display:grid;gap:6px;align-content:start}
.gx-card .l{font-size:11px;letter-spacing:.06em;font-weight:700;color:var(--muted);text-transform:uppercase}
.gx-card .v{font-size:22px;font-weight:800;letter-spacing:-.02em;line-height:1.15;color:var(--white)}
.gx-card .v.small{font-size:16px}
.gx-card .s{font-size:12px;color:var(--muted);line-height:1.45}
.gx-card.good{border-color:var(--dh-ok)}.gx-card.warn{border-color:var(--dh-warn)}.gx-card.bad{border-color:var(--dh-danger)}
.gx-why{border-left:3px solid var(--dh-info);background:var(--dh-accent-wash);border-radius:8px;padding:10px 14px;font-size:12.5px;line-height:1.55;color:var(--muted)}
.gx-why strong{color:var(--white)}
.gx-list{display:grid;gap:8px}
.gx-item{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:12px 14px;border:1px solid var(--dh-line);border-radius:12px;background:var(--surface2)}
.gx-item.focus{outline:2px solid var(--dh-accent)}
.gx-item>div:first-child{min-width:0;flex:1}
.gx-item strong{display:block;font-size:13.5px}
.gx-item .s{font-size:12px;color:var(--muted);line-height:1.45;margin-top:3px}
.gx-item .actions{flex-wrap:wrap;justify-content:flex-end}
.gx-check{display:grid;grid-template-columns:28px 1fr auto;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid var(--dh-line)}
.gx-check:last-child{border-bottom:0}
.gx-check .i{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:13px;color:#fff}
.gx-check .i.done{background:var(--dh-ok)}.gx-check .i.todo{background:var(--dh-warn)}.gx-check .i.blocked{background:var(--dh-danger)}.gx-check .i.wait{background:var(--dh-info)}.gx-check .i.none{background:var(--muted)}
.gx-check small{display:block;color:var(--muted);font-size:11.5px;margin-top:2px}
details.gx-details{border:1px solid var(--dh-line);border-radius:12px;padding:0;background:var(--surface2)}
details.gx-details summary{cursor:pointer;padding:11px 14px;font-weight:700;font-size:12.5px;color:var(--muted);list-style:none}
details.gx-details summary::before{content:'▸ ';color:var(--dh-accent)}
details.gx-details[open] summary::before{content:'▾ '}
details.gx-details>*:not(summary){padding:0 14px 14px}
.gx-form{display:grid;gap:14px}
.gx-fs{border:1px solid var(--dh-line);border-radius:12px;padding:12px 14px 14px;margin:0;min-width:0}
.gx-fs legend{font-weight:800;font-size:12px;letter-spacing:.05em;color:var(--dh-accent);padding:0 6px;text-transform:uppercase}
.gx-fs>.help{margin:0 0 10px}
.gx-chips{display:flex;flex-wrap:wrap;gap:6px}
.gx-chips button{background:var(--surface2);border:1px solid var(--dh-line);color:var(--white);border-radius:999px;padding:6px 12px;font-size:12px;cursor:pointer}
.gx-chips button.on{background:var(--dh-accent);border-color:var(--dh-accent);color:var(--dh-accent-fg)}
.gx-checks{display:grid;gap:6px;max-height:220px;overflow:auto;padding:4px 2px}
.gx-checks label{display:flex;gap:8px;align-items:center;font-weight:500;font-size:12.5px;color:var(--white);text-transform:none;letter-spacing:0}
.gx-checks input{width:auto}
.gx-rows table{width:100%;border-collapse:collapse;font-size:12px}
.gx-rows th{text-align:left;color:var(--muted);font-size:11px;padding:4px 6px}
.gx-rows td{padding:3px 4px}
.gx-rows input,.gx-rows select{width:100%;min-width:70px}
.gx-rows .del{background:none;border:0;color:var(--dh-danger);cursor:pointer;font-size:14px;padding:4px}
.dialog.gx-wide{width:min(960px,100%)}
.gx-bars{display:grid;gap:6px}
.gx-bar{display:grid;grid-template-columns:230px minmax(0,1fr) 150px;gap:10px;align-items:center;font-size:12px}
.gx-bar .lane{position:relative;height:22px;background:var(--dh-accent-wash);border-radius:6px;overflow:hidden}
.gx-bar .fill{position:absolute;top:3px;bottom:3px;border-radius:5px;background:var(--dh-accent);min-width:3px;opacity:.85}
.gx-bar .fill.done{background:var(--dh-ok)}.gx-bar .fill.late{background:var(--dh-danger)}.gx-bar .fill.risk{background:var(--dh-warn)}
.gx-bar .hp{position:absolute;top:2px;width:6px;height:18px;border-radius:2px;background:var(--dh-warn)}
.gx-bar .hp.released{background:var(--dh-ok)}.gx-bar .hp.failed{background:var(--dh-danger)}
.gx-bar .d{color:var(--muted);text-align:right;white-space:nowrap}
.gx-term{border-bottom:1px dotted var(--dh-accent);cursor:help}
.gx-foot{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap;padding-top:4px}
.gx-table-note{font-size:11px;color:var(--muted);margin-top:8px}
.gx-page .hint{line-height:1.55}
@media (max-width:980px){.gx-layout{grid-template-columns:1fr}.gx-menu{position:static;display:flex;overflow:auto;gap:6px;padding-bottom:4px}.gx-menu a{min-width:200px}.gx-bar{grid-template-columns:1fr}.gx-bar .d{text-align:left}}
.lang-switch{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:8px 0;font-size:13px}
.lang-switch select{width:auto;min-width:120px}
a.sp-share{display:inline-flex;align-items:center;text-decoration:none}
@media (max-width:640px){.dialog input,.dialog select,.dialog textarea{font-size:16px;min-height:44px}.gx-chips button,.dialog .actions button,a.sp-share{min-height:44px;padding-inline:14px}}
.lab-pick,.lab-ot{display:inline-flex;gap:4px;align-items:center;margin:0;font-weight:500}
.lab-pick input{width:auto}
.dim-hit,.col-hit,.elem-hit{cursor:pointer}.col-hit{touch-action:none}.check-line{display:flex;align-items:center;gap:8px;margin:4px 0}.studio-structure h4{margin:10px 0 6px}.studio-structure .actions{flex-wrap:wrap}.studio-structure fieldset,#columnForm fieldset,#gridForm fieldset{border:1px solid var(--line,#d5dde3);border-radius:8px;padding:8px 12px}
.studio-placement-message:has(#structureDone){pointer-events:auto;z-index:3}.studio-placement-message #structureDone{margin-left:8px;pointer-events:auto}
.plan-label{fill:#0f2433;stroke:#fff;stroke-width:16px;paint-order:stroke;stroke-linejoin:round}
.phone-menu{display:none}
@media (max-width:770px){.phone-menu{display:block;margin-left:auto;min-height:44px;padding:0 16px;border:1px solid var(--dh-line);border-radius:10px;background:transparent;color:inherit;font-weight:700}.sidebar .brand{display:flex;align-items:center}.sidebar>.nav-block,.sidebar>.sidebar-bottom{display:none}.sidebar.menu-open>.nav-block{display:block}.sidebar.menu-open>.sidebar-bottom{display:grid}}
/* Phones: a row whose buttons fill the width (attendance marks, bill actions) puts them under the name instead of squeezing the name to one letter per line. */
@media (max-width:640px){.gx-item{flex-wrap:wrap}.gx-item>div:first-child{flex:1 1 100%}.gx-item .actions{justify-content:flex-start}}
/* RA bills money summary: on phones each party becomes a card with labelled values instead of six squeezed columns. */
@media (max-width:640px){.ra-summary table,.ra-summary tbody,.ra-summary tr,.ra-summary td{display:block;width:100%}.ra-summary thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.ra-summary tr{border:1px solid var(--dh-line,#294054);border-radius:10px;padding:6px 12px;margin-bottom:10px}.ra-summary td{display:flex;justify-content:space-between;gap:12px;padding:7px 0;border-bottom:1px solid var(--dh-line,#294054);text-align:right}.ra-summary td:last-child{border-bottom:0}.ra-summary td::before{content:attr(data-label);font-weight:700;color:var(--muted);text-align:left;flex:0 0 auto}.ra-summary td:first-child{font-weight:700;justify-content:flex-start;text-align:left}.ra-summary td:first-child::before{display:none}}
/* Email this: preview of what will be sent from the person's Gmail. */
.sp-mail-form{display:grid;gap:12px}.sp-mail-preview dl{display:grid;grid-template-columns:max-content 1fr;gap:6px 14px;margin:0 0 12px}.sp-mail-preview dt{font-weight:700;color:var(--muted)}.sp-mail-preview dd{margin:0;overflow-wrap:anywhere}.sp-mail-text{white-space:pre-wrap;overflow-wrap:anywhere;border:1px solid var(--dh-line,#294054);border-radius:10px;padding:12px;max-height:320px;overflow:auto;margin-bottom:14px;font-size:13px}
/* Email a record: compact confirm sheet with recipient chips, and the Contacts & e-mail page. */
.sp-mail-sheet{display:grid;gap:10px}.sp-mail-from{margin:0}.sp-mail-row{display:grid;grid-template-columns:34px 1fr;gap:8px;align-items:start}.sp-mail-label{font-weight:700;color:var(--muted);padding-top:7px}
.sp-chips{display:flex;flex-wrap:wrap;gap:6px;align-items:center;min-width:0}.sp-chip{display:inline-flex;align-items:center;gap:4px;max-width:100%;border:1px solid var(--dh-line,#294054);background:var(--surface2);border-radius:999px;padding:4px 4px 4px 12px;font-size:13px;overflow-wrap:anywhere}
.sp-chip button{border:0;background:transparent;color:inherit;cursor:pointer;min-width:28px;min-height:28px;border-radius:999px;padding:0}.sp-chip button:hover{background:var(--dh-line,#294054)}
.sp-chip-input{flex:1 1 180px;min-width:0}.sp-chip-add{justify-self:start}.sp-mail-miss small{font-weight:400}.sp-mail-files{display:flex;flex-wrap:wrap;gap:8px}.sp-file{border:1px dashed var(--dh-line,#294054);border-radius:8px;padding:6px 10px;font-size:13px;overflow-wrap:anywhere}.sp-file b{color:var(--dh-accent,#e05a47);margin-right:4px}
.sp-mail-sheet textarea{min-height:150px}.sp-role-head{margin:12px 0 6px}
@media (max-width:420px){.sp-mail-row{grid-template-columns:1fr}.sp-mail-label{padding-top:0}.sp-chip{font-size:12px}.sp-mail-sheet .actions button{flex:1 1 100%}}
.account-mail{margin-top:18px}.account-mail h4{margin-bottom:4px}.invite-link{overflow-wrap:anywhere}
@media (max-width:640px){.sp-mail-preview dl{grid-template-columns:1fr}.sp-mail-preview dt{margin-top:6px}.account-mail .account-method{grid-template-columns:34px 1fr}.account-mail .account-method>.actions{grid-column:1/-1}}
