/* Index Spend. The Index Invest house palette (bronze on warm ivory, espresso), light and dark, phone first.
   The start page copies the Entity Hub's, so every Index app greets people the same way. No inline styles: the
   Content-Security-Policy (staticwebapp.config.json) allows only this file. */
:root{--sans:"Segoe UI",system-ui,-apple-system,"Helvetica Neue",Arial,sans-serif;
  --bronze:#81674A;--bronze-2:#A3876A;--ivory:#F7F3EC;--sand:#ECE3D4;--ink:#2A231B;--muted:#6E6152;--esp:#1E1913;
  --line:rgba(163,135,106,.45);--card:#FFFDF9;--soft:#F1EADF;--ok:#3C6E47;--warn:#8A5A12;--bad:#8A3B12;--focus:#81674A}
@media (prefers-color-scheme:dark){:root{--ivory:#15110D;--sand:#2A231B;--ink:#F1E8DA;--muted:#B9AA96;--card:#1E1913;
  --soft:#2A231B;--line:rgba(163,135,106,.35);--bronze:#C9AE8C;--ok:#8CC79A;--warn:#E3B566;--bad:#F3A27A;--focus:#C9AE8C}}
*{box-sizing:border-box}
html,body{margin:0;background:var(--ivory);color:var(--ink);font:15px/1.5 var(--sans);-webkit-text-size-adjust:100%}
[hidden]{display:none!important}
a{color:var(--bronze)}
:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
html.locked .wrap{display:none!important}

/* ---------- start page (from the Entity Hub) ---------- */
.gate{--g-bronze:#81674A;--g-ivory:#F7F3EC;--g-ink:#2A231B;--g-muted:#6E6152;--g-esp:#1E1913;--g-esp-2:#2A231B;
  --g-line:rgba(163,135,106,.55);position:fixed;inset:0;z-index:1000;display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);background:var(--g-ivory);color:var(--g-ink);
  font:16px/1.55 var(--sans);overflow:auto}
.g-left{display:flex;flex-direction:column;justify-content:space-between;gap:40px;
  padding:clamp(28px,6vh,64px) clamp(24px,6vw,88px);min-height:100vh;min-height:100dvh}
.g-logo{display:block;width:clamp(150px,18vw,210px);height:auto}.g-logo.dark{display:none}
.g-top{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}
.g-portal{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border:1px solid var(--g-line);border-radius:999px;
  color:var(--g-ink);font:600 13px/1 var(--sans);text-decoration:none;letter-spacing:.02em;white-space:nowrap}
.g-portal svg{width:15px;height:15px;fill:none;stroke:var(--g-bronze);stroke-width:1.4}
.g-portal:hover{border-color:var(--g-bronze);color:var(--g-bronze);background:rgba(163,135,106,.08)}
.g-appicon{display:block;width:72px;height:72px;border-radius:16px;margin:0 0 22px;box-shadow:0 10px 26px rgba(30,25,19,.22)}
.g-main{max-width:560px}
.g-kicker{display:flex;align-items:center;gap:14px;margin:0 0 22px;font:600 11.5px/1 var(--sans);letter-spacing:.24em;
  text-transform:uppercase;color:var(--g-bronze)}
.g-kicker::before{content:"";width:38px;height:1px;background:var(--g-bronze)}
.g-ver{padding:4px 9px;border:1px solid var(--g-line);border-radius:999px;letter-spacing:.14em;font-size:10.5px;color:var(--g-muted)}
.g-title{font:500 clamp(40px,5.2vw,66px)/1.02 "Cormorant Garamond","Cormorant",Georgia,"Times New Roman",serif;margin:0}
.g-title em{font-style:italic;color:var(--g-bronze)}
.g-tag{margin:22px 0 0;font-size:clamp(16px,1.35vw,18.5px);line-height:1.6;color:var(--g-muted);max-width:30em}
.g-act{margin-top:38px;display:flex;flex-direction:column;align-items:flex-start;gap:14px}
.g-btn{all:unset;box-sizing:border-box;cursor:pointer;display:inline-flex;align-items:center;gap:14px;
  padding:15px 26px 15px 20px;border-radius:3px;background:var(--g-bronze);color:#FFFDF9;font:600 15px/1 var(--sans)}
.g-btn:hover{background:#6F583F}.g-btn:focus-visible{outline:2px solid var(--g-bronze);outline-offset:4px}
.g-btn[disabled]{cursor:progress;opacity:.7}.g-btn svg{width:18px;height:18px;flex:none}
.g-note{font-size:13.5px;color:var(--g-muted);min-height:1.5em;margin:0}
.g-note.alert{color:#8A3B12;background:#F6E6D6;border-left:3px solid #B5652A;padding:9px 13px;border-radius:2px}
.g-ms{margin:4px 0 0;font-size:13.5px}
.g-link{background:none;border:0;padding:0;color:var(--g-bronze);font:inherit;text-decoration:underline;cursor:pointer}
.g-foot{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:12px;color:var(--g-muted)}
.g-foot span+span::before{content:"·";margin-right:18px;color:var(--g-line)}
.g-right{position:relative;overflow:hidden;background:radial-gradient(120% 90% at 85% 10%,#3A3025 0%,rgba(58,48,37,0) 60%),
  linear-gradient(160deg,var(--g-esp-2),var(--g-esp) 70%);min-height:100vh;min-height:100dvh}
.g-right::before{content:"";position:absolute;inset:0;background:repeating-linear-gradient(90deg,rgba(163,135,106,.06) 0 1px,transparent 1px 56px),
  repeating-linear-gradient(0deg,rgba(163,135,106,.06) 0 1px,transparent 1px 56px)}
.g-slash{position:absolute;right:-6%;bottom:-8%;width:62%;height:auto;opacity:.16}
.g-chart{position:absolute;inset:0;margin:auto;width:min(86%,560px);height:auto}
.g-chart .bx{fill:rgba(163,135,106,.10);stroke:#A3876A;stroke-width:1.4}.g-chart .bx.f{fill:#81674A;stroke:#B79B7C}
.g-chart .ln{stroke:#B79B7C;stroke-width:1.6;fill:none}.g-chart .ck{stroke:#F7F3EC;stroke-width:6;fill:none;stroke-linecap:round;stroke-linejoin:round}
.g-chart .tx{fill:#E9DCC8;font:600 11px var(--sans);letter-spacing:.12em}.g-chart .ts{fill:rgba(233,220,200,.55);font:500 10px var(--sans);letter-spacing:.14em}
.g-chart .draw{stroke-dasharray:200;stroke-dashoffset:200;animation:gdraw 1.2s .3s ease-out forwards}
.g-chart .fade{opacity:0;animation:gfade .8s ease-out forwards}
.d1{animation-delay:.1s!important}.d2{animation-delay:.5s!important}.d3{animation-delay:.6s!important}.d4{animation-delay:.9s!important}.d5{animation-delay:1.2s!important}
@keyframes gdraw{to{stroke-dashoffset:0}}@keyframes gfade{to{opacity:1}}
@media (prefers-reduced-motion:reduce){.g-chart .draw{animation:none;stroke-dashoffset:0}.g-chart .fade{animation:none;opacity:1}}
@media (max-width:860px){.gate{grid-template-columns:1fr;grid-template-rows:auto 300px}
  .g-left{min-height:auto;padding:28px 16px 36px;gap:34px}.g-right{min-height:300px}
  .g-foot{flex-direction:column;gap:4px}.g-foot span+span::before{content:none}}
@media (prefers-color-scheme:dark){.gate{--g-ivory:#15110D;--g-ink:#F1E8DA;--g-muted:#B9AA96}
  .g-logo.light{display:none}.g-logo.dark{display:block}.g-title em{color:#C9AE8C}.g-note.alert{color:#F3C9A6;background:#3A2516}}

/* ---------- the app ---------- */
.top{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:14px;flex-wrap:wrap;
  padding:10px max(16px,env(safe-area-inset-left));background:var(--esp);color:#F1E8DA}
.brand{display:flex;align-items:center;gap:9px;color:#F1E8DA;text-decoration:none;font-weight:600}
.brand img{border-radius:7px}
.ver-badge{font:600 11px/1 var(--sans);padding:3px 7px;border-radius:999px;background:rgba(201,174,140,.18);color:#E3D3BC}
.nav{display:flex;gap:4px;flex-wrap:wrap;flex:1}
.nav a{color:#E3D3BC;text-decoration:none;padding:7px 11px;border-radius:999px;font-size:14px}
.nav a[aria-current="page"],.nav a:hover{background:rgba(201,174,140,.18);color:#fff}
.who{display:flex;align-items:center;gap:10px;font-size:13px;color:#CDBDA6}
/* All Index apps in the header (the Index standard of 16 Nov 2026): a pill with the grid icon; only the icon on a phone */
.hdr-portal{display:inline-flex;align-items:center;gap:7px;padding:6px 12px;border:1px solid rgba(201,174,140,.45);border-radius:999px;
  color:#E3D3BC;text-decoration:none;font-size:13px;white-space:nowrap}
.hdr-portal svg{width:14px;height:14px;fill:none;stroke:#C9AE8C;stroke-width:1.4}
.hdr-portal:hover{border-color:#C9AE8C;color:#fff;background:rgba(201,174,140,.14)}
.hdr-portal:focus-visible{outline:2px solid #C9AE8C;outline-offset:2px}
@media (max-width:639px){.hdr-portal span{display:none}.hdr-portal{padding:7px 9px}}
@media (max-width:1399px){.who #who-name{display:none}}   /* the name is in Sign out's tooltip; keeps the menu on one line */
.btn{all:unset;box-sizing:border-box;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:10px 16px;border-radius:4px;background:var(--bronze);color:#FFFDF9;font:600 14px/1.2 var(--sans);min-height:42px}
.btn:hover{filter:brightness(.92)}.btn[disabled]{opacity:.55;cursor:default}
.btn.ghost{background:transparent;border:1px solid var(--line);color:inherit}.btn.small{padding:6px 10px;min-height:32px;font-size:13px}
.btn.big{padding:16px 22px;font-size:16px;min-height:56px;width:100%}
.btn.danger{background:var(--bad)}
.main{max-width:1100px;margin:0 auto;padding:18px max(14px,env(safe-area-inset-left)) 80px}
h1.page{font:500 30px/1.15 "Cormorant Garamond",Georgia,serif;margin:6px 0 14px}
h2{font-size:17px;margin:22px 0 8px}
.muted{color:var(--muted)}.small{font-size:13px}
.card{background:var(--card);border:1px solid var(--line);border-radius:8px;padding:14px;margin:10px 0}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px 14px}
label.f{display:flex;flex-direction:column;gap:4px;font-size:13px;color:var(--muted)}
label.f.wide{grid-column:1/-1}
/* House settings: "as read → as booked" rows on one line (they wrap on a phone) */
.maptable{display:flex;flex-direction:column;gap:6px}
.maptable .row{flex-wrap:nowrap}
.maptable .row > input, .maptable .row > select, .maptable .row > span:not(:first-child){flex:1 1 0;min-width:0}
.maptable .row > span:nth-child(2){flex:0 0 auto}
.maptable > button{align-self:flex-start}
@media (max-width:640px){.maptable .row{flex-wrap:wrap}}
input,select,textarea{font:inherit;color:var(--ink);background:var(--card);border:1px solid var(--line);border-radius:4px;
  padding:9px 10px;min-height:42px;width:100%}
textarea{min-height:90px}
input[type=checkbox],input[type=radio]{width:auto;min-height:0}
.choice{display:flex;gap:8px;flex-wrap:wrap}.choice label{display:flex;gap:6px;align-items:center;padding:8px 12px;
  border:1px solid var(--line);border-radius:999px;color:var(--ink);font-size:14px;cursor:pointer}
.banner{padding:9px 16px;background:var(--soft);border-bottom:1px solid var(--line);font-size:14px}
.banner.off{background:#3A2516;color:#F3C9A6}
.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:var(--esp);color:#F1E8DA;padding:10px 16px;
  border-radius:6px;z-index:50;max-width:90vw;box-shadow:0 8px 24px rgba(0,0,0,.25)}
.err{color:var(--bad);background:rgba(181,101,42,.12);border-left:3px solid var(--bad);padding:8px 12px;border-radius:2px}
table.t{width:100%;border-collapse:collapse;font-size:14px}
table.t th{text-align:left;font-weight:600;color:var(--muted);border-bottom:1px solid var(--line);padding:7px 6px}
table.t td{border-bottom:1px solid var(--line);padding:8px 6px;vertical-align:top}
table.t tr.click{cursor:pointer}table.t tr.click:hover td{background:var(--soft)}
td.num,th.num{text-align:right;font-variant-numeric:tabular-nums}
.pill{display:inline-block;padding:2px 9px;border-radius:999px;font-size:12px;font-weight:600;background:var(--soft);color:var(--muted)}
.pill.Draft{background:rgba(163,135,106,.18);color:var(--bronze)}.pill.Submitted{background:rgba(60,110,71,.15);color:var(--ok)}
.pill.queued{background:rgba(138,90,18,.15);color:var(--warn)}
.photo{max-width:100%;max-height:60vh;border-radius:6px;border:1px solid var(--line);display:block;background:var(--soft)}
.split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:18px}
@media (max-width:760px){.split{grid-template-columns:1fr}.who #who-name{display:none}.nav{order:3;flex-basis:100%}}
.queue-list{display:flex;gap:8px;flex-wrap:wrap}.queue-list img{width:56px;height:56px;object-fit:cover;border-radius:4px;border:1px solid var(--line)}
.capture-hero{display:flex;flex-direction:column;gap:12px;max-width:520px}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
dialog{border:1px solid var(--line);border-radius:8px;background:var(--card);color:var(--ink);max-width:min(760px,94vw);width:100%}
dialog::backdrop{background:rgba(20,15,10,.45)}
.kv{display:grid;grid-template-columns:max-content 1fr;gap:4px 14px;font-size:14px}
.kv dt{color:var(--muted)}.kv dd{margin:0}
