/* LetResolve — application styles.
 *
 * The design system is lifted from the agreed mock-up (docs/mockup/), so the
 * built product and the thing everyone signed off look the same. Brand tokens
 * come from brand/palette/brand.css.
 *
 * Additions beyond the mock-up are at the bottom: real form controls (the
 * mock-up used styled divs), loading and empty states, and toasts.
 */

/* The two typefaces, served by LetResolve itself rather than Google Fonts, so
   no page tells another company who is visiting (web/assets/fonts/LICENSE.txt). */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/inter-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
  src: url('assets/fonts/nunito-latin.woff2') format('woff2');
}

/* ============================================================
   LetResolve — brand tokens v1.0 (from brand.css)
   ============================================================ */
:root{
  /* brand core */
  --navy:#012B5D; --blue:#018DC5; --blue-deep:#00509B;
  --teal:#017681; --green:#039762; --green-bright:#19D84A;
  --cloud:#F3F8FC; --slate:#46617F;
  --gradient:linear-gradient(90deg,#012B5D,#018DC5,#017681,#039762);

  /* surfaces & ink */
  --bg:#EDF4FA; --panel:#FFFFFF; --panel-2:#F7FBFD;
  --border:#D8E6F1; --border-strong:#BFD5E6;
  --ink:#012B5D; --ink-muted:#46617F; --ink-faint:#7791AC;
  --primary:#018DC5; --primary-ink:#01608A; --on-primary:#FFFFFF;
  --shadow:0 1px 2px rgba(1,43,93,.06),0 8px 24px -12px rgba(1,43,93,.18);
  --shadow-lg:0 24px 60px -24px rgba(1,43,93,.35);

  /* status (validated: CVD + normal-vision separation) */
  --hi:#BC2C22;   --hi-ink:#93221A;  --hi-bg:#FCEBE9;  --hi-line:#F4CFCA;
  --med:#CE9412;  --med-ink:#86600B; --med-bg:#FDF4E3; --med-line:#F2E0BB;
  --ok:#039762;   --ok-ink:#026B46;  --ok-bg:#E6F6EF;  --ok-line:#BFE6D4;
  --info:#018DC5; --info-ink:#01608A;--info-bg:#E5F3FA;--info-line:#BFE2F2;
  --prog:#017681; --prog-ink:#01565E;--prog-bg:#E4F2F3;--prog-line:#BCDFE2;
  --neut:#46617F; --neut-ink:#46617F;--neut-bg:#EDF3F9;--neut-line:#DBE7F1;

  /* logo plate: the navy half of the wordmark needs a light ground */
  --logo-plate:transparent;
  --r-sm:6px; --r:10px; --r-lg:16px;
  --f-display:'Nunito',system-ui,-apple-system,sans-serif;
  --f-body:'Inter',system-ui,-apple-system,sans-serif;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --bg:#04121F; --panel:#0A2137; --panel-2:#0D2942;
    --border:#1B3A57; --border-strong:#2A5178;
    --ink:#E7EFF7; --ink-muted:#9DB8D1; --ink-faint:#6E8CA9;
    --primary:#3BAEE0; --primary-ink:#7FCBEC; --on-primary:#04121F;
    --shadow:0 1px 2px rgba(0,0,0,.4),0 8px 24px -12px rgba(0,0,0,.6);
    --shadow-lg:0 24px 60px -24px rgba(0,0,0,.8);
    --hi:#E8695C;  --hi-ink:#F3A79D;  --hi-bg:#3A1A17;  --hi-line:#5E2A24;
    --med:#E3AE44; --med-ink:#EFC97E; --med-bg:#33260C; --med-line:#553F12;
    --ok:#2BC183;  --ok-ink:#6BD9AA;  --ok-bg:#0B2E22;  --ok-line:#13503A;
    --info:#3BAEE0;--info-ink:#7FCBEC;--info-bg:#0A2A3C; --info-line:#12455F;
    --prog:#2FA0AC;--prog-ink:#6FC7D0;--prog-bg:#08292D;--prog-line:#11454C;
    --neut:#9DB8D1;--neut-ink:#9DB8D1;--neut-bg:#132B41;--neut-line:#20415F;
    --logo-plate:#FFFFFF;
  }
}
:root[data-theme="dark"]{
  --bg:#04121F; --panel:#0A2137; --panel-2:#0D2942;
  --border:#1B3A57; --border-strong:#2A5178;
  --ink:#E7EFF7; --ink-muted:#9DB8D1; --ink-faint:#6E8CA9;
  --primary:#3BAEE0; --primary-ink:#7FCBEC; --on-primary:#04121F;
  --shadow:0 1px 2px rgba(0,0,0,.4),0 8px 24px -12px rgba(0,0,0,.6);
  --shadow-lg:0 24px 60px -24px rgba(0,0,0,.8);
  --hi:#E8695C;  --hi-ink:#F3A79D;  --hi-bg:#3A1A17;  --hi-line:#5E2A24;
  --med:#E3AE44; --med-ink:#EFC97E; --med-bg:#33260C; --med-line:#553F12;
  --ok:#2BC183;  --ok-ink:#6BD9AA;  --ok-bg:#0B2E22;  --ok-line:#13503A;
  --info:#3BAEE0;--info-ink:#7FCBEC;--info-bg:#0A2A3C; --info-line:#12455F;
  --prog:#2FA0AC;--prog-ink:#6FC7D0;--prog-bg:#08292D;--prog-line:#11454C;
  --neut:#9DB8D1;--neut-ink:#9DB8D1;--neut-bg:#132B41;--neut-line:#20415F;
  --logo-plate:#FFFFFF;
}

*{box-sizing:border-box}
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:var(--f-body); font-size:14px; line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4{font-family:var(--f-display); font-weight:800; color:var(--ink); margin:0; text-wrap:balance; letter-spacing:-.01em}
a{color:var(--primary-ink)}
button{font:inherit; cursor:pointer}
:focus-visible{outline:2px solid var(--primary); outline-offset:2px; border-radius:4px}
@media (prefers-reduced-motion:reduce){*{animation:none!important; transition:none!important}}

/* ---------- app shell ---------- */
.app{display:grid; grid-template-columns:248px 1fr; min-height:100vh}
/* The `hidden` attribute is how the app hides what a role cannot use. Any rule
   that sets `display` — .nav's flex, for one — silently beats it, so it is
   enforced here once for every element. */
[hidden]{display:none !important}
.app[hidden]{display:none}

.side{
  background:var(--panel); border-right:1px solid var(--border);
  display:flex; flex-direction:column; gap:4px; padding:18px 12px;
  position:sticky; top:0; height:100vh; overflow-y:auto;
}
.brand{display:flex; align-items:center; padding:4px 8px 16px}
.brand img{width:170px; height:auto; display:block; background:var(--logo-plate); border-radius:9px; padding:5px 7px}
:root[data-theme="dark"] .brand img,
.acct-mark{border-radius:8px}
.navlabel{
  font-size:10.5px; font-weight:600; letter-spacing:.1em; text-transform:uppercase;
  color:var(--ink-faint); padding:14px 10px 6px;
}
.nav{
  display:flex; align-items:center; gap:10px; width:100%;
  padding:9px 10px; border:0; border-radius:var(--r-sm);
  background:transparent; color:var(--ink-muted); font-weight:500; font-size:13.5px;
  text-align:left; transition:background .12s,color .12s;
}
.nav:hover{background:var(--panel-2); color:var(--ink)}
.nav[aria-current="page"]{background:var(--info-bg); color:var(--primary-ink); font-weight:600}
.nav .ic{width:17px; height:17px; flex:none; stroke:currentColor; fill:none; stroke-width:1.7}
.nav .count{margin-left:auto; font-size:11.5px; font-weight:600; color:var(--ink-faint); font-variant-numeric:tabular-nums}
.nav .count.count-alert:not(:empty){color:#fff; background:var(--hi); border-radius:999px; padding:1px 7px; min-width:20px; text-align:center}
.side-foot{margin-top:auto; padding-top:14px; border-top:1px solid var(--border)}

/* Help — opens the help site in a tab of its own (web/help.js). */
.nav-help .ext{width:12px; height:12px; margin-left:auto; flex:none; stroke:currentColor; fill:none;
  stroke-width:2; opacity:.55; transition:opacity .12s, transform .12s}
.nav-help:hover .ext{opacity:1; transform:translate(1px,-1px)}
.help-btn{
  display:inline-grid; place-items:center; width:34px; height:34px; flex:none;
  border-radius:50%; border:1px solid var(--border-strong); background:var(--panel);
  color:var(--ink-muted); transition:background .12s, border-color .12s, color .12s, transform .12s;
}
.help-btn svg{width:18px; height:18px; stroke:currentColor; fill:none; stroke-width:1.9}
.help-btn:hover{background:var(--info-bg); border-color:var(--primary); color:var(--primary-ink)}
.help-btn:active{transform:scale(.94)}
.sr-only{position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
  clip:rect(0 0 0 0); white-space:nowrap; border:0}
.acct{display:flex; align-items:center; gap:10px; padding:8px 10px}
.acct-mark{width:30px; height:30px; flex:none}
.acct b{display:block; font-size:13px; font-family:var(--f-display); color:var(--ink)}
.acct span{display:block; font-size:11.5px; color:var(--ink-faint)}
.acct .signout{display:inline-block; margin-top:2px; font-size:11.5px; color:var(--ink-muted)}

/* Shown while the platform admin is reading a landlord's account (ADR 0010). */
.admin-banner{
  display:flex; align-items:center; gap:12px; padding:9px 26px;
  background:var(--med-bg); color:var(--med-ink); border-bottom:1px solid var(--med-line);
  font-size:13px;
}
.admin-banner span{flex:1}

/* Shown while the app waits out a normal start-up delay (web/api.js). */
.waiting-banner{
  padding:9px 26px; font-size:13px;
  background:var(--info-bg); color:var(--info-ink); border-bottom:1px solid var(--info-line);
}
.admin-banner[hidden]{display:none}

.main{min-width:0; display:flex; flex-direction:column}
.topbar{
  position:sticky; top:0; z-index:20; background:var(--panel);
  border-bottom:1px solid var(--border);
  display:flex; align-items:center; gap:14px; padding:13px 26px;
}
.topbar h1{font-size:19px}
.crumb{font-size:12px; color:var(--ink-faint); font-weight:500}
.search{
  margin-left:auto; display:flex; align-items:center; gap:8px;
  background:var(--panel-2); border:1px solid var(--border);
  border-radius:var(--r-sm); padding:7px 11px; width:240px; color:var(--ink-faint);
}
.search input{border:0; background:transparent; color:var(--ink); width:100%; font:inherit; outline:none}
.page{padding:24px 26px 56px; display:flex; flex-direction:column; gap:20px; max-width:1400px}
.page[hidden]{display:none}

/* ---------- generic bits ---------- */
.card{background:var(--panel); border:1px solid var(--border); border-radius:var(--r-lg); box-shadow:var(--shadow)}
.card-h{display:flex; align-items:center; gap:12px; padding:15px 18px; border-bottom:1px solid var(--border)}
.card-h h2{font-size:15px}
.card-h .sub{font-size:12px; color:var(--ink-faint)}
.card-b{padding:18px}
.spacer{margin-left:auto}
.btn{
  display:inline-flex; align-items:center; gap:7px; padding:8px 14px;
  border-radius:var(--r-sm); border:1px solid var(--border-strong);
  background:var(--panel); color:var(--ink); font-weight:600; font-size:13px;
  transition:background .12s,border-color .12s;
}
.btn:hover{background:var(--panel-2); border-color:var(--primary)}
.btn-primary{background:var(--primary); border-color:var(--primary); color:var(--on-primary)}
.btn-primary:hover{background:var(--blue-deep); border-color:var(--blue-deep); color:#fff}
.btn .ic{width:15px; height:15px; stroke:currentColor; fill:none; stroke-width:2}
.btn-sm{padding:6px 11px; font-size:12.5px}

.chip{
  display:inline-flex; align-items:center; gap:5px; padding:3px 9px; border-radius:999px;
  font-size:11.5px; font-weight:600; white-space:nowrap; border:1px solid transparent;
}
.chip::before{content:""; width:6px; height:6px; border-radius:50%; background:currentColor; flex:none}
.c-open{color:var(--info-ink); background:var(--info-bg); border-color:var(--info-line)}
.c-prog{color:var(--prog-ink); background:var(--prog-bg); border-color:var(--prog-line)}
.c-hold{color:var(--neut-ink); background:var(--neut-bg); border-color:var(--neut-line)}
.c-done{color:var(--ok-ink); background:var(--ok-bg); border-color:var(--ok-line)}
.pri{
  display:inline-flex; align-items:center; justify-content:center;
  width:22px; height:22px; border-radius:var(--r-sm);
  font-size:11.5px; font-weight:700; font-family:var(--f-display); border:1px solid transparent;
}
.p-H{color:var(--hi-ink); background:var(--hi-bg); border-color:var(--hi-line)}
.p-M{color:var(--med-ink); background:var(--med-bg); border-color:var(--med-line)}
.p-L{color:var(--neut-ink); background:var(--neut-bg); border-color:var(--neut-line)}
.flagset{display:flex; gap:5px}
.flag{
  display:inline-flex; align-items:center; gap:4px; padding:2px 7px; border-radius:var(--r-sm);
  font-size:10.5px; font-weight:600; letter-spacing:.02em;
}
.f-damp{color:var(--prog-ink); background:var(--prog-bg); border:1px solid var(--prog-line)}
.f-out{color:var(--ink-muted); background:var(--neut-bg); border:1px solid var(--neut-line)}

/* ---------- KPI tiles (no plot: form = headline number) ---------- */
.kpis{display:grid; grid-template-columns:repeat(auto-fit,minmax(178px,1fr)); gap:14px}
.kpi{
  background:var(--panel); border:1px solid var(--border); border-radius:var(--r-lg);
  padding:15px 16px; box-shadow:var(--shadow); position:relative; overflow:hidden;
}
.kpi::before{content:""; position:absolute; inset:0 auto 0 0; width:3px; background:var(--neut)}
.kpi.k-hi::before{background:var(--hi)} .kpi.k-med::before{background:var(--med)}
.kpi.k-info::before{background:var(--info)} .kpi.k-prog::before{background:var(--prog)}
.kpi.k-ok::before{background:var(--ok)}
.kpi .lab{font-size:11.5px; font-weight:600; color:var(--ink-muted); letter-spacing:.02em}
.kpi .val{font-family:var(--f-display); font-weight:800; font-size:30px; line-height:1.15; font-variant-numeric:tabular-nums; margin-top:3px}
.kpi .note{font-size:11.5px; color:var(--ink-faint)}

/* ---------- tables ---------- */
.twrap{overflow-x:auto}
table{border-collapse:collapse; width:100%; font-size:13px}
thead th{
  text-align:left; font-size:10.5px; text-transform:uppercase; letter-spacing:.07em;
  color:var(--ink-faint); font-weight:600; padding:10px 12px;
  border-bottom:1px solid var(--border); white-space:nowrap; background:var(--panel-2);
}
tbody td{padding:11px 12px; border-bottom:1px solid var(--border); vertical-align:middle}
tbody tr:last-child td{border-bottom:0}
tbody tr.clickable{cursor:pointer; transition:background .1s}
tbody tr.clickable:hover{background:var(--panel-2)}
.num{font-variant-numeric:tabular-nums}
.ref{font-family:var(--f-display); font-weight:700; color:var(--primary-ink); font-variant-numeric:tabular-nums}
.ttl{font-weight:600; color:var(--ink)}
.dim{color:var(--ink-muted)}
.tiny{font-size:11.5px; color:var(--ink-faint)}
tr.sev-H td:first-child{box-shadow:inset 3px 0 0 var(--hi)}
tr.sev-overdue td:first-child{box-shadow:inset 3px 0 0 var(--med)}

/* ---------- filters ---------- */
.filters{display:flex; flex-wrap:wrap; gap:8px; align-items:center; padding:13px 18px; border-bottom:1px solid var(--border)}
.sel{
  display:inline-flex; align-items:center; gap:6px; padding:6px 11px;
  border:1px solid var(--border-strong); border-radius:var(--r-sm);
  background:var(--panel); font-size:12.5px; font-weight:500; color:var(--ink-muted);
}
.sel b{color:var(--ink); font-weight:600}
.sel.on{border-color:var(--primary); background:var(--info-bg); color:var(--primary-ink)}
.sel .ic{width:13px; height:13px; stroke:currentColor; fill:none; stroke-width:2}

/* ---------- two-column detail ---------- */
.split{display:grid; grid-template-columns:minmax(0,1.65fr) minmax(280px,.85fr); gap:18px; align-items:start}
.fields{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px}
.field{display:flex; flex-direction:column; gap:5px; min-width:0}
.field.wide{grid-column:1/-1}
.field label{font-size:10.5px; font-weight:600; letter-spacing:.07em; text-transform:uppercase; color:var(--ink-faint)}
.inp{
  border:1px solid var(--border-strong); border-radius:var(--r-sm); background:var(--panel-2);
  padding:8px 11px; font-size:13px; color:var(--ink); min-height:36px; display:flex; align-items:center;
}
.inp.area{min-height:74px; align-items:flex-start; line-height:1.6; display:block}
.inp.ro{background:var(--neut-bg); color:var(--ink-muted)}
.toggle{display:inline-flex; border:1px solid var(--border-strong); border-radius:var(--r-sm); overflow:hidden; width:fit-content}
.toggle span{padding:7px 15px; font-size:12.5px; font-weight:600; color:var(--ink-muted); background:var(--panel-2)}
.toggle span.on{background:var(--prog); color:#fff}
.toggle span.on.no{background:var(--neut-bg); color:var(--ink-muted)}

/* ---------- timeline / audit ---------- */
.tl{display:flex; flex-direction:column; gap:0}
.tl-item{display:grid; grid-template-columns:14px 1fr; gap:11px; padding:0 0 15px}
.tl-rail{display:flex; flex-direction:column; align-items:center; gap:3px}
.tl-dot{width:9px; height:9px; border-radius:50%; background:var(--primary); margin-top:5px; flex:none}
.tl-dot.ok{background:var(--ok)} .tl-dot.new{background:var(--teal)} .tl-dot.del{background:var(--hi)}
.tl-line{width:1px; flex:1; background:var(--border)}
.tl-item:last-child .tl-line{display:none}
.tl-body{font-size:12.5px; min-width:0}
.tl-body b{font-weight:600}
.tl-when{font-size:11px; color:var(--ink-faint); font-variant-numeric:tabular-nums}
.diff{
  margin-top:5px; font-size:11.5px; background:var(--panel-2); border:1px solid var(--border);
  border-radius:var(--r-sm); padding:6px 9px; display:flex; flex-direction:column; gap:3px;
}
.diff s{color:var(--ink-faint); text-decoration-color:var(--ink-faint)}
.diff em{font-style:normal; color:var(--ok-ink); font-weight:600}

/* ---------- attachments ---------- */
.thumbs{display:grid; grid-template-columns:repeat(auto-fill,minmax(84px,1fr)); gap:9px}
.thumb{
  aspect-ratio:1; border-radius:var(--r); border:1px solid var(--border); overflow:hidden;
  display:flex; align-items:center; justify-content:center; position:relative;
  background:linear-gradient(140deg,var(--panel-2),var(--info-bg));
}
.thumb .ic{width:22px; height:22px; stroke:var(--ink-faint); fill:none; stroke-width:1.6}
.thumb .cap{position:absolute; left:0; right:0; bottom:0; font-size:9.5px; padding:3px 5px;
  background:rgba(1,43,93,.72); color:#fff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.drop{
  border:1.5px dashed var(--border-strong); border-radius:var(--r); padding:14px;
  text-align:center; font-size:12px; color:var(--ink-faint); margin-top:10px;
}

/* ---------- chart (single series, one hue) ---------- */
.bars{display:flex; flex-direction:column; gap:11px}
.bar-row{display:grid; grid-template-columns:150px 1fr 52px; gap:11px; align-items:center; font-size:12.5px}
.bar-track{background:var(--panel-2); border-radius:3px; height:11px; position:relative; overflow:hidden}
.bar-fill{height:100%; border-radius:0 3px 3px 0; background:var(--primary)}
.bar-val{text-align:right; font-variant-numeric:tabular-nums; font-weight:600; color:var(--ink-muted)}

/* ---------- report menu ---------- */
.rgrid{display:grid; grid-template-columns:repeat(auto-fit,minmax(215px,1fr)); gap:12px}
.rcard{
  text-align:left; background:var(--panel); border:1px solid var(--border); border-radius:var(--r);
  padding:14px; display:flex; flex-direction:column; gap:5px; transition:border-color .12s,transform .12s;
}
.rcard:hover{border-color:var(--primary); transform:translateY(-1px)}
.rcard b{font-family:var(--f-display); font-size:13.5px}
.rcard span{font-size:11.5px; color:var(--ink-faint); line-height:1.5}
.rcard.on{border-color:var(--primary); background:var(--info-bg)}

/* ---------- AI ---------- */
.chat{display:flex; flex-direction:column; gap:14px; max-width:760px}
.msg{display:flex; gap:11px; align-items:flex-start}
.msg .av{width:28px; height:28px; border-radius:8px; flex:none; display:flex; align-items:center; justify-content:center;
  font-size:11px; font-weight:700; font-family:var(--f-display)}
.msg.me .av{background:var(--neut-bg); color:var(--ink-muted)}
.msg.ai .av{background:var(--gradient); color:#fff}
.bubble{background:var(--panel-2); border:1px solid var(--border); border-radius:var(--r); padding:11px 14px; font-size:13px; min-width:0}
.msg.me .bubble{background:var(--info-bg); border-color:var(--info-line)}
.cite{font-size:11px; color:var(--ink-faint); margin-top:7px; padding-top:7px; border-top:1px solid var(--border)}
.ask{display:flex; gap:9px; align-items:center; border:1px solid var(--border-strong); border-radius:var(--r);
  background:var(--panel); padding:9px 11px; max-width:760px}
.ask input{flex:1; border:0; background:transparent; font:inherit; color:var(--ink); outline:none}
.suggest{display:flex; flex-wrap:wrap; gap:7px}
.suggest button{background:var(--panel); border:1px solid var(--border-strong); color:var(--ink-muted);
  border-radius:999px; padding:6px 12px; font-size:12px}
.suggest button:hover{border-color:var(--primary); color:var(--primary-ink)}
.disclaim{font-size:11.5px; color:var(--ink-faint); display:flex; gap:7px; align-items:center}

/* ---------- Ask LetResolve (ADR 0012) ---------- */
.meter{display:flex; flex-direction:column; align-items:flex-end; gap:4px; min-width:170px}
.meter-bar{display:block; width:160px; height:5px; border-radius:999px; background:var(--neut-bg); overflow:hidden}
.meter-bar span{display:block; height:100%; background:var(--gradient); border-radius:999px}
.ask-count{font-size:11px; color:var(--ink-faint); font-variant-numeric:tabular-nums}
.bubble p{margin:0 0 6px} .bubble p:last-child{margin-bottom:0}
.bubble.note{background:var(--panel); color:var(--ink-muted); border-style:dashed}
.cite{display:flex; gap:8px; align-items:flex-start; flex-wrap:wrap}
.cite > span{padding-top:3px; text-transform:uppercase; letter-spacing:.06em; font-weight:600; font-size:10px}
.srcs{display:flex; flex-wrap:wrap; gap:5px; flex:1}
.src{display:inline-block; max-width:260px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  font-size:11.5px; padding:2px 9px; border-radius:999px; border:1px solid var(--info-line);
  background:var(--info-bg); color:var(--primary-ink); text-decoration:none}
.src:hover{border-color:var(--primary)}
.src.src-prop{background:var(--ok-bg); border-color:var(--ok-line); color:var(--ok-ink)}
.src.src-doc{background:var(--prog-bg); border-color:var(--prog-line); color:var(--prog-ink)}
.src.src-doc::before{content:""; display:inline-block; width:7px; height:9px; margin-right:5px;
  vertical-align:-1px; border:1.5px solid currentColor; border-radius:1.5px; opacity:.75}
.src.src-person{background:var(--neut-bg); border-color:var(--neut-line); color:var(--neut-ink)}
.src.src-person::before{content:""; display:inline-block; width:9px; height:9px; margin-right:5px;
  vertical-align:-1px; background:currentColor; opacity:.8;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='7.5' r='5'/%3E%3Cpath d='M2 23c0-6 4.5-9.5 10-9.5S22 17 22 23z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='7.5' r='5'/%3E%3Cpath d='M2 23c0-6 4.5-9.5 10-9.5S22 17 22 23z'/%3E%3C/svg%3E") center/contain no-repeat}
.bubble .when{margin-top:6px; text-align:right}
.ask-earlier{text-align:center; margin:2px 0 0}
.thinking{color:var(--ink-muted)}
.dots{display:inline-flex; gap:3px; margin-left:6px; vertical-align:middle}
.dots i{width:5px; height:5px; border-radius:50%; background:var(--ink-faint); animation:dot 1.2s infinite ease-in-out}
.dots i:nth-child(2){animation-delay:.15s} .dots i:nth-child(3){animation-delay:.3s}
@keyframes dot{0%,80%,100%{opacity:.25; transform:translateY(0)} 40%{opacity:1; transform:translateY(-2px)}}
@media (prefers-reduced-motion: reduce){.dots i{animation:none; opacity:.6}}
@media (max-width: 640px){.meter{align-items:flex-start; min-width:0; width:100%} .meter-bar{width:100%}}

/* ---------- sign-in ---------- */
.signin{min-height:100vh; display:grid; grid-template-columns:1.05fr .95fr; background:var(--panel)}
.signin[hidden]{display:none}
.si-art{
  background:linear-gradient(150deg,#012B5D 0%,#00509B 42%,#017681 74%,#039762 100%);
  color:#fff; padding:52px; display:flex; flex-direction:column; justify-content:space-between; position:relative; overflow:hidden;
}
.si-art::after{content:""; position:absolute; width:520px; height:520px; right:-190px; bottom:-190px;
  border-radius:50%; background:rgba(255,255,255,.07)}
.si-art h2{color:#fff; font-size:34px; line-height:1.2; max-width:15ch}
.si-art p{color:rgba(255,255,255,.85); font-size:14.5px; max-width:40ch; line-height:1.65}
.si-list{display:flex; flex-direction:column; gap:11px; position:relative; z-index:1}
.si-list div{display:flex; gap:10px; align-items:center; font-size:13.5px; color:rgba(255,255,255,.92)}
.si-list .ic{width:17px; height:17px; stroke:var(--green-bright); fill:none; stroke-width:2.4; flex:none}
.si-form{display:flex; flex-direction:column; justify-content:center; padding:52px; gap:9px; max-width:440px; margin:0 auto; width:100%}
.si-form img{width:210px; margin-bottom:22px; background:var(--logo-plate); border-radius:11px; padding:6px 9px; align-self:flex-start}
.si-form h1{font-size:24px}
.si-form>p{color:var(--ink-muted); font-size:13.5px; margin:0 0 12px}
.prov{
  display:flex; align-items:center; justify-content:center; gap:10px; width:100%;
  padding:11px; border:1px solid var(--border-strong); border-radius:var(--r-sm);
  background:var(--panel); font-weight:600; font-size:13.5px; color:var(--ink);
}
.prov:hover{border-color:var(--primary); background:var(--panel-2)}
.si-note{font-size:12px; color:var(--ink-faint); margin-top:14px; line-height:1.6; text-align:center}

/* ---------- modal ---------- */
.scrim{position:fixed; inset:0; background:rgba(1,43,93,.45); backdrop-filter:blur(2px);
  display:flex; align-items:flex-start; justify-content:center; padding:52px 20px; z-index:60; overflow-y:auto}
.scrim[hidden]{display:none}
.modal{background:var(--panel); border-radius:var(--r-lg); box-shadow:var(--shadow-lg); width:min(700px,100%); border:1px solid var(--border)}
.modal-h{display:flex; align-items:center; gap:12px; padding:16px 20px; border-bottom:1px solid var(--border)}
.modal-f{display:flex; gap:9px; padding:15px 20px; border-top:1px solid var(--border); background:var(--panel-2); border-radius:0 0 var(--r-lg) var(--r-lg)}
.x{border:0; background:transparent; color:var(--ink-faint); font-size:19px; line-height:1; padding:5px}

/* ---------- misc ---------- */
.grid2{display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:18px}
.stack{display:flex; flex-direction:column; gap:14px}
.row{display:flex; align-items:center; gap:10px; flex-wrap:wrap}
.wake{display:flex; align-items:center; gap:9px; font-size:12.5px; color:var(--ink-muted);
  background:var(--info-bg); border:1px solid var(--info-line); border-radius:var(--r); padding:9px 13px}
.wake .dot{width:7px; height:7px; border-radius:50%; background:var(--primary); animation:pulse 1.4s infinite}
@keyframes pulse{0%,100%{opacity:.35}50%{opacity:1}}
.propline{display:flex; flex-direction:column; gap:1px}
.propline b{font-weight:600; font-size:13px}
.hdr-actions{display:flex; gap:8px; align-items:center}
.tabs{display:flex; gap:2px; border-bottom:1px solid var(--border); padding:0 18px}
.tab{border:0; background:transparent; padding:11px 13px; font-size:13px; font-weight:600;
  color:var(--ink-faint); border-bottom:2px solid transparent; margin-bottom:-1px}
.tab.on{color:var(--primary-ink); border-bottom-color:var(--primary)}
.tab:hover{color:var(--ink)}

@media (max-width:1080px){
  .app{grid-template-columns:1fr}
  .side{position:static; height:auto; flex-direction:row; flex-wrap:wrap; align-items:center; gap:6px}
  .side .navlabel{display:none} .side-foot{margin:0; border:0; padding:0}
  .brand{width:100%; padding-bottom:8px}
  .split{grid-template-columns:minmax(0,1fr)}
  .signin{grid-template-columns:1fr} .si-art{display:none}
}
@media (max-width:640px){
  .page{padding:16px}
  .topbar{padding:11px 16px} .search{display:none} .help-btn{margin-left:auto}
  .fields{grid-template-columns:1fr}
}

/* ============================================================
   Beyond the mock-up: real controls, live states, feedback
   ============================================================ */

/* Form controls. The mock-up used styled divs; these are the real thing,
   matching that appearance so the built product looks like what was agreed. */
input.inp, select.inp, textarea.inp {
  font: inherit; width: 100%; color: var(--ink);
  border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  background: var(--panel-2); padding: 8px 11px; min-height: 36px;
}
textarea.inp { min-height: 84px; line-height: 1.6; resize: vertical; }
input.inp:focus, select.inp:focus, textarea.inp:focus {
  outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary);
}
input.inp:disabled, select.inp:disabled, textarea.inp:disabled {
  background: var(--neut-bg); color: var(--ink-muted); cursor: not-allowed;
}
select.inp { cursor: pointer; }
.field-row { display: flex; gap: 8px; align-items: center; }

/* Read-only mode for Viewers: controls look inert rather than merely disabled. */
.readonly-note {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px;
  color: var(--ink-muted); background: var(--neut-bg);
  border: 1px solid var(--neut-line); border-radius: var(--r-sm); padding: 8px 12px;
}

/* Loading. The database auto-pauses on the free tier, so the first request of
   the day genuinely takes a few seconds — say so rather than showing nothing. */
.skeleton {
  height: 14px; border-radius: 4px; background: var(--panel-2);
  animation: shimmer 1.2s ease-in-out infinite;
}
@keyframes shimmer { 0%,100% { opacity: .5 } 50% { opacity: 1 } }
.skeleton-row { display: flex; gap: 12px; padding: 12px; }
.skeleton-row .skeleton:nth-child(1) { width: 8%; }
.skeleton-row .skeleton:nth-child(2) { width: 42%; }
.skeleton-row .skeleton:nth-child(3) { width: 22%; }
.skeleton-row .skeleton:nth-child(4) { width: 14%; }

.empty {
  text-align: center; padding: 40px 20px; color: var(--ink-faint);
  display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.empty b { font-family: var(--f-display); color: var(--ink); font-size: 15px; }

.error-box {
  border: 1px solid var(--hi-line); background: var(--hi-bg); color: var(--hi-ink);
  border-radius: var(--r); padding: 12px 14px; font-size: 13px;
  display: flex; flex-direction: column; gap: 6px;
}
.error-box b { font-family: var(--f-display); }

/* Toasts — confirmation that a save actually happened. */
#toasts {
  position: fixed; right: 18px; bottom: 18px; z-index: 100;
  display: flex; flex-direction: column; gap: 8px; max-width: 380px;
}
.toast {
  display: flex; align-items: flex-start; gap: 9px; padding: 11px 14px;
  border-radius: var(--r); box-shadow: var(--shadow-lg); font-size: 13px;
  background: var(--panel); border: 1px solid var(--border); color: var(--ink);
  animation: toast-in .18s ease-out;
}
.toast.ok { border-color: var(--ok-line); background: var(--ok-bg); color: var(--ok-ink); }
.toast.bad { border-color: var(--hi-line); background: var(--hi-bg); color: var(--hi-ink); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px) } to { opacity: 1 } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none } .skeleton { animation: none } }

.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.busy { position: relative; color: transparent; }
.btn.busy::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 13px; height: 13px;
  border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%;
  color: var(--on-primary); animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg) } }

/* Row severity stripes need a live class, since rows are generated. */
tr.row-hi td:first-child { box-shadow: inset 3px 0 0 var(--hi); }
tr.row-overdue td:first-child { box-shadow: inset 3px 0 0 var(--med); }

.pager { display: flex; align-items: center; gap: 10px; }
.nav.is-active[aria-current="page"] { font-weight: 600; }

/* Nav items are anchors so they get real browser navigation and middle-click,
   but they should not look like body links. */
.nav { text-decoration: none; }
.nav:hover { text-decoration: none; }
.btn { text-decoration: none; }

/* ============================================================
   Attachments, occupiers, report cards and Ask LetResolve
   ============================================================ */

.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.att {
  margin: 0; border: 1px solid var(--border); border-radius: var(--r);
  overflow: hidden; background: var(--panel-2); display: flex; flex-direction: column;
}
.att-preview {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 4 / 3; background: linear-gradient(140deg, var(--panel-2), var(--info-bg));
  overflow: hidden; text-decoration: none;
}
.att-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-preview .ic { width: 30px; height: 30px; stroke: var(--ink-faint); fill: none; stroke-width: 1.5; }
.att figcaption { padding: 9px 11px; display: flex; flex-direction: column; gap: 5px; }
.att-desc { margin: 0; font-size: 12.5px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.att-desc.none { font-weight: 400; color: var(--ink-faint); font-style: italic; }
.att-meta { margin: 0; font-size: 10.5px; color: var(--ink-faint); line-height: 1.5; word-break: break-word; }
.att-actions { display: flex; gap: 6px; margin-top: 3px; }
.att-actions .btn { padding: 4px 9px; font-size: 11.5px; }

.drop.over { border-color: var(--primary); background: var(--info-bg); color: var(--primary-ink); }

/* The describe-before-upload dialog: one row per file. */
.describe-list { display: flex; flex-direction: column; gap: 12px; max-height: 46vh; overflow-y: auto; }
.describe-row { display: grid; grid-template-columns: 190px 1fr; gap: 12px; align-items: center; }
.describe-name {
  font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; display: flex; flex-direction: column;
}
.describe-name .tiny { font-weight: 400; }
@media (max-width: 640px) { .describe-row { grid-template-columns: 1fr; gap: 5px; } }

/* Occupiers */
.tenant-card {
  border: 1px solid var(--border); border-radius: var(--r); padding: 12px 14px;
  background: var(--panel-2); display: flex; flex-direction: column; gap: 8px;
}
.tenant-card + .tenant-card { margin-top: 10px; }
.tenant-head { display: flex; align-items: center; gap: 10px; }
.tenant-head b { font-family: var(--f-display); font-size: 14px; }
.tenant-details {
  margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 12px;
  font-size: 12.5px; align-items: baseline;
}
.tenant-details dt { color: var(--ink-faint); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; }
.tenant-details dd { margin: 0; color: var(--ink); }
.tenant-notes {
  margin: 0; font-size: 12.5px; color: var(--ink-muted); line-height: 1.55;
  border-left: 2px solid var(--border-strong); padding-left: 10px;
}

/* Report cards are links (web/reports.js); Ask LetResolve's answers can hold
   lists (web/ask.js). */
.rcard { text-decoration: none; color: inherit; }
.msg .bubble ul { margin: 8px 0 0; padding-left: 18px; }
.msg .bubble li { margin-bottom: 3px; }
.msg .bubble li ul { margin-top: 3px; }
/* "Who made LetResolve?" — the fixed reply, with the founder's email (web/ask.js). */
.bubble.about p a { font-weight: 600; }
.src-mail { display: inline-flex; align-items: center; gap: 6px; }
.src-mail svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; flex: none; }

/* ============================================================
   Property documents (ADR 0013) — designed and agreed before it was built
   ============================================================ */

/* A property's page: one tab each for its overview, issues, documents and occupiers. */
.property-page { display: flex; flex-direction: column; gap: 16px; }
.ptabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-top: -4px; }
.ptab {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 14px; font-weight: 600; font-size: 13.5px;
  color: var(--ink-faint); border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none;
  transition: color .12s, border-color .12s;
}
.ptab:hover { color: var(--ink); }
.ptab .cnt {
  font-size: 11px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px;
  padding: 1px 7px; color: var(--ink-muted); font-variant-numeric: tabular-nums;
}
.ptab.on { color: var(--primary-ink); border-bottom-color: var(--primary); }
.ptab.on .cnt { background: var(--info-bg); border-color: var(--info-line); color: var(--primary-ink); }

/* Overview: the latest certificates, and who lives there. */
.cert-list { display: flex; flex-direction: column; }
.cert {
  display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; align-items: center;
  padding: 12px 18px; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit;
  transition: background .12s;
}
.cert:last-child { border-bottom: 0; }
.cert:hover { background: var(--panel-2); }
.cert-t, .cert-latest { display: flex; flex-direction: column; min-width: 0; }
.cert-t b { font-size: 13.5px; }
.cert-latest b { font-weight: 600; font-size: 13px; color: var(--primary-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.occupier-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.occupier-list li { display: flex; flex-direction: column; }

/* The tab: folders on the left, what's in the open one on the right. */
.docs { display: grid; grid-template-columns: 286px minmax(0, 1fr); min-height: 560px; overflow: hidden; }
.docs.docs-loading { display: block; min-height: 0; }
.tree {
  background: var(--panel-2); border-right: 1px solid var(--border); padding: 14px 10px 12px;
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.tree-h { display: flex; align-items: center; justify-content: space-between; padding: 2px 8px 10px; }
.tree-h span { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--ink-faint); }
.tree-add {
  border: 1px solid var(--border-strong); background: var(--panel); border-radius: 7px; width: 28px; height: 28px;
  display: grid; place-items: center; color: var(--ink-muted); transition: border-color .12s, color .12s;
}
.tree-add:hover { border-color: var(--primary); color: var(--primary-ink); }
.tree-add svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.tree-list { display: flex; flex-direction: column; gap: 2px; }
.fold-row { display: flex; align-items: center; gap: 2px; position: relative; margin-left: calc(var(--depth, 0) * 22px); }
.fold-row.sub::before {
  content: ""; position: absolute; left: -9px; top: -3px; bottom: 50%; width: 11px;
  border-left: 1.5px solid var(--border-strong); border-bottom: 1.5px solid var(--border-strong); border-bottom-left-radius: 6px;
}
.chev-btn {
  width: 18px; height: 28px; flex: none; border: 0; background: transparent; padding: 0;
  display: grid; place-items: center; color: var(--ink-faint); border-radius: 5px;
}
.chev-btn:hover { color: var(--ink); background: var(--panel); }
.chev { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.chev-gap { width: 18px; flex: none; }
.fold {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 9px; font-size: 13.5px;
  color: var(--ink); text-decoration: none; flex: 1; min-width: 0; transition: background .1s;
}
.fold:hover { background: var(--panel); }
.fold.on { background: var(--panel); box-shadow: inset 3px 0 0 var(--primary), var(--shadow); font-weight: 600; color: var(--primary-ink); }
.fold-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fold .n { margin-left: auto; font-size: 11.5px; color: var(--ink-faint); font-variant-numeric: tabular-nums; font-weight: 500; }
.fold-row.sub .fi { width: 22px; height: 22px; border-radius: 6px; }
.fold-row.sub .fi svg { width: 13px; height: 13px; }
.fold.bin { color: var(--ink-muted); }
.fold.drop-over, .drow.drop-over td { background: var(--info-bg) !important; box-shadow: inset 0 0 0 1.5px var(--primary); }
.tree-sep { height: 1px; background: var(--border); margin: 8px; }
.meter-box { margin-top: auto; padding: 14px 10px 4px; font-size: 12px; color: var(--ink-muted); display: flex; flex-direction: column; gap: 3px; }
.meter-box b { color: var(--ink); font-weight: 700; font-family: var(--f-display); font-size: 15px; }

/* Folder tiles: a colour and a picture for each standard folder. */
.fi { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.fi svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.9; }
.fi.big { width: 52px; height: 52px; border-radius: 14px; }
.fi.big svg { width: 24px; height: 24px; }
.t-blue { background: var(--info-bg); color: var(--info-ink); }
.t-green { background: var(--ok-bg); color: var(--ok-ink); }
.t-teal { background: var(--prog-bg); color: var(--prog-ink); }
.t-amber { background: var(--med-bg); color: var(--med-ink); }
.t-red { background: var(--hi-bg); color: var(--hi-ink); }
.t-slate { background: var(--neut-bg); color: var(--neut-ink); }
.t-plain { background: var(--panel); color: var(--ink-muted); border: 1px solid var(--border); }

.pane { display: flex; flex-direction: column; min-width: 0; }
.pane.drop-over { box-shadow: inset 0 0 0 2px var(--primary); background: color-mix(in srgb, var(--info-bg) 40%, transparent); }
.pane-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.bc { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-faint); min-width: 0; flex: 1 1 220px; overflow: hidden; }
.bc a, .bc b { white-space: nowrap; }
.bc b { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bc a { color: var(--ink-muted); text-decoration: none; }
.bc a:hover { color: var(--primary-ink); text-decoration: underline; }
.bc b { color: var(--ink); font-family: var(--f-display); font-size: 15px; }
.bc svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; flex: none; }
.pane-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.dsearch {
  display: flex; align-items: center; gap: 7px; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 6px 10px; width: 230px; color: var(--ink-faint); font-size: 13px;
}
.dsearch:focus-within { border-color: var(--primary); box-shadow: 0 0 0 2px var(--info-bg); }
.dsearch svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; flex: none; }
.dsearch input { border: 0; outline: none; background: transparent; color: var(--ink); font: inherit; width: 100%; min-width: 0; }
.dsearch.wide { width: 100%; padding: 9px 12px; font-size: 14px; }
.kebab {
  width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; color: var(--ink-faint);
  border: 1px solid transparent; background: transparent; padding: 0; flex: none;
}
.kebab:hover, .kebab[aria-expanded="true"] { background: var(--panel-2); border-color: var(--border); color: var(--ink); }
.kebab .dots-v { width: 16px; height: 16px; fill: currentColor; }
.pane-h .kebab { border-color: var(--border-strong); background: var(--panel); }
.mob-back { display: none; }
.bin-note { white-space: nowrap; }

.folder-about { margin: 14px 18px 0; color: var(--ink-muted); font-size: 13px; line-height: 1.55; max-width: 72ch; }
.guide {
  margin: 12px 18px 4px; display: flex; gap: 12px; align-items: flex-start; background: var(--ok-bg);
  border: 1px solid var(--ok-line); border-radius: 12px; padding: 12px 14px; color: var(--ok-ink); font-size: 13px; line-height: 1.55;
}
.guide > svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; flex: none; margin-top: 1px; }
.guide b { color: var(--ink); }
.guide-where { display: block; margin-top: 4px; font-size: 11.5px; opacity: .8; }
.guide-x { margin-left: auto; border: 0; background: transparent; color: currentColor; opacity: .6; padding: 2px; border-radius: 5px; flex: none; }
.guide-x:hover { opacity: 1; }
.guide-x svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; display: block; }
.guide-chip {
  margin: 12px 18px 0; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--ok-line); background: var(--ok-bg); color: var(--ok-ink); border-radius: 999px;
  padding: 3px 10px; font-size: 12px; font-weight: 600;
}
.guide-chip svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }

table.files { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.files td:first-child { width: 100%; max-width: 0; }
table.files thead th { background: transparent; padding: 12px 12px 8px; font-weight: 700; }
table.files td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.files tbody tr:last-child td { border-bottom: 1px solid var(--border); }
table.files tr.frow, table.files tr.drow { cursor: pointer; transition: background .1s; }
table.files tr.frow:hover td, table.files tr.drow:hover td { background: var(--panel-2); }
table.files tr.picked td { background: var(--info-bg); }
table.files tr.dragging { opacity: .45; }
table.files tr:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.sort {
  border: 0; background: transparent; padding: 0; font: inherit; color: inherit; letter-spacing: inherit;
  text-transform: inherit; display: inline-flex; align-items: center; gap: 4px;
}
.sort:hover, .sort.on { color: var(--ink); }
.sort svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2.4; }
.fname { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fname-t { min-width: 0; display: flex; flex-direction: column; }
.fname-t b { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fname-t small { color: var(--ink-faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft {
  width: 32px; height: 38px; border-radius: 6px; flex: none; position: relative; background: var(--panel);
  border: 1px solid var(--border-strong); overflow: hidden; display: grid; place-items: center;
}
.ft::after {
  content: attr(data-t); position: absolute; left: 0; right: 0; bottom: 0; font-size: 8px; font-weight: 800;
  letter-spacing: .03em; color: #fff; text-align: center; padding: 2px 0; background: #6E8CA9;
}
.ft::before {
  content: ""; position: absolute; right: -1px; top: -1px; width: 10px; height: 10px; background: var(--panel-2);
  border-left: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong); border-bottom-left-radius: 3px;
}
.ft.ft-pdf::after { background: #D8443A; }
.ft.ft-word::after { background: #2B63D9; }
.ft.ft-excel::after { background: #1E8E52; }
.ft.ft-email::after { background: #6B5BD2; }
.ft.ft-text::after { background: #46617F; }
.ft.ft-img, .ft.ft-vid { border: 0; color: #fff; }
.ft.ft-img { background: linear-gradient(135deg, #8FB8D8, #4F7FA6 55%, #2E5A80); }
.ft.ft-vid { background: linear-gradient(135deg, #3A4A7A, #22305A 60%, #121B38); }
.ft.ft-img::before, .ft.ft-img::after, .ft.ft-vid::before, .ft.ft-vid::after { display: none; }
.ft svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.ft.ft-vid svg { fill: currentColor; stroke: none; width: 13px; height: 13px; }
.who { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-muted); white-space: nowrap; }
.av2 {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 9.5px; font-weight: 700;
  flex: none; background: var(--info-bg); color: var(--primary-ink);
}
.av2.tone-1 { background: var(--prog-bg); color: var(--prog-ink); }
.av2.tone-2 { background: var(--med-bg); color: var(--med-ink); }
.muted { color: var(--ink-faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
td.act { width: 1%; text-align: right; }
td.nowrap, .nowrap { white-space: nowrap; }
td.act .btn + .btn { margin-left: 4px; }
td.loc { white-space: normal; min-width: 150px; font-size: 12.5px; }
.loc-prop { color: var(--ink-muted); font-weight: 600; }
.tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; border-radius: 999px;
  padding: 2px 8px; background: var(--ok-bg); color: var(--ok-ink); border: 1px solid var(--ok-line); flex: none; white-space: nowrap;
}
.tag.tag-warn { background: var(--hi-bg); color: var(--hi-ink); border-color: var(--hi-line); }
.tag.tag-quiet { background: var(--neut-bg); color: var(--neut-ink); border-color: var(--neut-line); }

.docs-empty {
  margin: 26px 18px; padding: 34px 20px; display: flex; flex-direction: column; align-items: center; gap: 9px;
  text-align: center; color: var(--ink-faint); font-size: 13px;
}
.docs-empty b { font-family: var(--f-display); color: var(--ink); font-size: 16px; }
.dropzone {
  margin: 16px 18px 18px; border: 1.5px dashed var(--border-strong); border-radius: 12px; padding: 18px; display: flex;
  align-items: center; gap: 14px; color: var(--ink-muted); font-size: 13px; background: var(--panel-2);
  transition: border-color .12s, background .12s;
}
.dropzone .up { width: 38px; height: 38px; border-radius: 10px; background: var(--info-bg); color: var(--primary-ink); display: grid; place-items: center; flex: none; }
.dropzone .up svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.dropzone b { color: var(--ink); }
.dropzone.drop-over { border-color: var(--primary); background: var(--info-bg); }
.search-note { display: flex; align-items: center; gap: 12px; padding: 12px 18px; font-size: 13px; color: var(--ink-muted); border-bottom: 1px solid var(--border); }
.search-note .btn { margin-left: auto; }
.bin-actions { display: flex; justify-content: flex-end; padding: 12px 18px 0; }
.btn.danger { color: var(--hi-ink); }
.btn.danger:hover { border-color: var(--hi); background: var(--hi-bg); }
.btn-danger { background: var(--hi); border-color: var(--hi); color: #fff; }
.btn-danger:hover { background: var(--hi-ink); border-color: var(--hi-ink); }
.mob-only, .mob-meta { display: none; }
.storage-line { margin: 0 18px 16px; }

/* Menus by a ⋮ button. */
.menu {
  position: fixed; z-index: 80; min-width: 200px; max-width: 290px; padding: 6px; background: var(--panel);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); animation: toast-in .12s ease-out;
}
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: transparent;
  border-radius: 7px; color: var(--ink); font-size: 13px; text-align: left;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--panel-2); outline: none; }
.menu-item svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.9; flex: none; color: var(--ink-muted); }
.menu-item.danger, .menu-item.danger svg { color: var(--hi-ink); }
.menu-item.danger:hover { background: var(--hi-bg); }
.menu-sep { height: 1px; background: var(--border); margin: 5px 4px; }
.menu-note { display: flex; gap: 8px; padding: 8px 10px 6px; font-size: 11.5px; line-height: 1.45; color: var(--ink-faint); }
.menu-note svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; flex: none; margin-top: 1px; }

/* Choosing a folder to move to. */
.picker { display: flex; flex-direction: column; gap: 2px; max-height: 48vh; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--r); padding: 6px; }
.pick {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px; padding-left: calc(8px + var(--depth, 0) * 22px);
  border-radius: 8px; cursor: pointer; font-size: 13.5px;
}
.pick:hover { background: var(--panel-2); }
.pick:has(input:checked) { background: var(--info-bg); color: var(--primary-ink); font-weight: 600; }
.pick.here { opacity: .55; cursor: default; }
.pick em { margin-left: auto; font-style: normal; }
.pick input { accent-color: var(--primary); }
.name-ext { display: flex; align-items: center; gap: 8px; }
.ext-chip { font-size: 12.5px; font-weight: 600; color: var(--ink-muted); background: var(--neut-bg); border: 1px solid var(--neut-line); border-radius: var(--r-sm); padding: 7px 10px; }
.confirm-body { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink-muted); }

/* Deleting a property: what goes, in red, and a tick box before the button
   will do anything (web/properties.js). */
.delete-property { display: flex; flex-direction: column; gap: 14px; }
.danger-box {
  border: 1px solid var(--hi-line); border-left: 4px solid var(--hi); background: var(--hi-bg);
  color: var(--ink); border-radius: var(--r); padding: 14px 16px 16px;
  display: flex; flex-direction: column; gap: 9px; font-size: 14px; line-height: 1.55;
}
.danger-box p { margin: 0; }
.danger-box ul { margin: 0; padding-left: 20px; }
.danger-box li { margin: 2px 0; }
.danger-box .btn { align-self: flex-start; }
.danger-title {
  display: flex; align-items: center; gap: 9px; color: var(--hi-ink);
  font-family: var(--f-display); font-size: 16px; font-weight: 800;
}
.danger-title svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.danger-ack {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; cursor: pointer;
  border: 1px solid var(--border-strong); border-radius: var(--r); font-size: 14px; font-weight: 600; line-height: 1.5;
}
.danger-ack input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--hi); }
.danger-ack:has(input:checked) { border-color: var(--hi); background: var(--hi-bg); }
.btn-danger:disabled { opacity: .45; cursor: not-allowed; }

/* Uploads and downloads in progress. */
.tray {
  position: fixed; right: 22px; bottom: 22px; width: 360px; max-height: min(60vh, 520px); display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; z-index: 70;
}
.tray-h { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; background: var(--navy); color: #fff; font-size: 13px; font-weight: 600; }
.tray-sum { margin-left: auto; opacity: .7; font-weight: 500; font-size: 12px; white-space: nowrap; }
.tray-btn { border: 0; background: rgba(255,255,255,.1); color: #fff; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; padding: 0; }
.tray-btn:hover { background: rgba(255,255,255,.2); }
.tray-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.tray-list { overflow-y: auto; }
.tray.minimised .tray-list { display: none; }
.titem { padding: 10px 14px; border-top: 1px solid var(--border); font-size: 12.5px; }
.titem:first-child { border-top: 0; }
.titem .r { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.titem .tn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.titem em { font-style: normal; color: var(--ink-faint); margin-left: auto; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.titem em svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.4; }
.titem .tw { color: var(--ink-faint); font-size: 11.5px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; }
.titem.failed .tw { white-space: normal; }
.tray-act { border: 1px solid var(--border-strong); background: var(--panel); color: var(--ink-muted); border-radius: 6px; padding: 2px 6px; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; flex: none; }
.tray-act:hover { border-color: var(--primary); color: var(--primary-ink); }
.tray-act svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.pbar { height: 5px; border-radius: 99px; background: var(--border); margin-top: 7px; overflow: hidden; }
.pbar span { display: block; height: 100%; background: var(--primary); transition: width .2s; }
.titem.done .pbar span { background: var(--ok); }
.done-txt { color: var(--ok-ink) !important; }
.bad-txt { color: var(--hi-ink) !important; }
#toasts { bottom: calc(18px + var(--tray-space, 0px)); }
.toast.with-action { align-items: center; background: var(--navy); color: #fff; border-color: var(--navy); }
.toast-action { margin-left: auto; border: 0; background: rgba(255,255,255,.14); color: #fff; font-weight: 700; border-radius: 6px; padding: 4px 10px; }
.toast-action:hover { background: rgba(255,255,255,.26); }

/* The viewer: one document, full screen. */
body.noscroll { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 90; background: rgba(4,18,31,.94); display: flex; flex-direction: column; color: #E7EFF7; animation: toast-in .14s ease-out; }
.viewer-h { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.08); flex-wrap: wrap; }
.viewer-title { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.viewer-title > div { min-width: 0; display: flex; flex-direction: column; }
.viewer-title b { font-family: var(--f-display); font-size: 15px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-title span { font-size: 12px; color: #9DB8D1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-title .ft::before { background: #0D2942; }
.viewer-tools { display: flex; align-items: center; gap: 6px; }
.vbtn {
  height: 34px; min-width: 34px; padding: 0 9px; border-radius: 8px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06); color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 13px; font-weight: 600; text-decoration: none;
}
.vbtn:hover { background: rgba(255,255,255,.14); }
.vbtn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.viewer-count { font-size: 12px; color: #9DB8D1; padding: 0 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.viewer-b { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 18px; overflow: auto; }
.v-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.5); background: #fff; }
.v-pdf { width: min(1000px, 100%); height: 100%; border: 0; border-radius: 6px; background: #fff; }
.v-video { max-width: 100%; max-height: 100%; border-radius: 6px; background: #000; }
.v-text { width: min(1000px, 100%); height: 100%; overflow: auto; background: var(--panel); color: var(--ink); border-radius: 8px; padding: 16px; }
.v-text pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: 13px; line-height: 1.55; }
.v-sheet table { font-size: 12.5px; }
.v-sheet th { position: sticky; top: -16px; }
.v-card { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; max-width: 380px; color: #C9D8E6; }
.v-card .ft { width: 56px; height: 66px; }
.v-card .ft::after { font-size: 11px; }
.v-card .ft::before { background: #0D2942; }
.v-card b { color: #fff; font-family: var(--f-display); font-size: 17px; word-break: break-word; }
.viewer-f { padding: 12px 18px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; color: #C9D8E6; text-align: center; }

/* The Documents page: every property at a glance. */
.storage-pill {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-muted);
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; padding: 4px 11px;
}
.storage-pill b { color: var(--ink); }
.storage-pill svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.9; }
.dprops { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.dprop {
  display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--r);
  background: var(--panel); text-decoration: none; color: inherit; transition: border-color .12s, transform .12s, box-shadow .12s;
}
.dprop:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow); }
.dprop-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--info-bg); color: var(--primary-ink); flex: none; }
.dprop-ic svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; }
.dprop-t { display: flex; flex-direction: column; min-width: 0; }
.dprop-t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dprop-go { width: 14px; height: 14px; margin-left: auto; stroke: var(--ink-faint); fill: none; stroke-width: 2; flex: none; }

@media (max-width: 900px) {
  .docs { grid-template-columns: 1fr; min-height: 0; }
  .tree { display: none; }
  .mob-back {
    display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border);
    font-size: 13px; color: var(--primary-ink); font-weight: 600; background: var(--panel-2); text-decoration: none;
  }
  .mob-back svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.2; }
  tr.mob-only { display: table-row; }
  p.mob-only { display: block; }
  .pane-tools { margin-left: 0; width: 100%; flex-wrap: wrap; }
  .dsearch { flex: 1; width: auto; }
  table.files th:nth-child(2), table.files td:nth-child(2) { display: none; }
  /* Tables with fewer columns keep theirs. */
  table.files.bin-table :is(th, td), table.files.results-table :is(th, td) { display: table-cell; }
}
@media (max-width: 640px) {
  .ptabs { overflow-x: auto; scrollbar-width: none; }
  .ptab { white-space: nowrap; padding: 11px 10px; }
  table.files th:nth-child(3), table.files td:nth-child(3),
  table.files th:nth-child(4), table.files td:nth-child(4) { display: none; }
  table.files td { padding: 10px 8px; }
  table.files.bin-table :is(th, td), table.files.results-table :is(th, td) { display: table-cell; }
  table.files.bin-table :is(th, td):nth-child(3),
  table.files.results-table :is(th, td):is(:nth-child(2), :nth-child(3)) { display: none; }
  .fname { gap: 10px; }
  .fname .tag { display: none; }
  .fname-t small.mob-meta { display: block; }
  .dropzone { margin: 12px; }
  .pane-h { padding: 12px; }
  .folder-about, .guide, .guide-chip { margin-left: 12px; margin-right: 12px; }
  .tray { left: 12px; right: 12px; width: auto; bottom: 12px; }
  .cert { grid-template-columns: auto minmax(0, 1fr); padding: 12px 14px; }
  .cert-latest { grid-column: 2; }
  .viewer-h { padding: 10px; }
  .vbtn.wide span { display: none; }
  .viewer-b { padding: 8px; }
  .dprops { grid-template-columns: 1fr; }
  td.act .btn { padding: 5px 8px; }
  .pane-tools .dsearch { flex: 1 1 100%; }
  /* The back link names the parent; the path shows only where you are. */
  .bc a, .bc svg { display: none; }
}
/* Nothing to drag from on a phone or tablet: Upload is the way in. */
@media (hover: none) and (pointer: coarse) { .dropzone { display: none; } }
.v-card .btn { min-width: 200px; justify-content: center; }
.v-card .btn:not(.btn-primary) { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }

@media print {
  .side, .topbar, .rgrid, .hdr-actions { display: none !important; }
  .app { grid-template-columns: 1fr; }
  .page { padding: 0; }
  .card { border: 0; box-shadow: none; }
}

/* ============================================================
   Certificates (ADR 0014): when each gas, electrical and EPC check is due
   ============================================================ */

:root {
  --due3-bg:#FDE8D4; --due3-line:#F3C49A; --due3-ink:#9A4708; --due3:#E07A1F;
  --due6-bg:#FFF6C7; --due6-line:#EBD97A; --due6-ink:#6E5A00; --due6:#D9B300;
  --hatch:rgba(70,97,127,.16);
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --due3-bg:#3A2412; --due3-line:#6A4121; --due3-ink:#F5B57C; --due3:#F09A4E;
    --due6-bg:#2F2A0D; --due6-line:#5A4F17; --due6-ink:#EDDB7E; --due6:#E3C83A;
    --hatch:rgba(157,184,209,.16);
  }
}
:root[data-theme="dark"]{
  --due3-bg:#3A2412; --due3-line:#6A4121; --due3-ink:#F5B57C; --due3:#F09A4E;
  --due6-bg:#2F2A0D; --due6-line:#5A4F17; --due6-ink:#EDDB7E; --due6:#E3C83A;
  --hatch:rgba(157,184,209,.16);
}

.certs { display: flex; flex-direction: column; gap: 16px; }

/* The one-sentence summary at the top. */
.cert-banner {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: var(--r);
  border: 1px solid var(--ok-line); background: var(--ok-bg); color: var(--ok-ink);
  font-size: 15px; font-weight: 600; line-height: 1.5;
}
.cert-banner p { margin: 0; }
.cert-banner .due-ic { width: 24px; height: 24px; }
.cert-banner.small { padding: 10px 12px; font-size: 13px; }
.cert-banner.tone-overdue { border-color: var(--hi-line); background: var(--hi-bg); color: var(--hi-ink); }
.cert-banner.tone-soon { border-color: var(--due3-line); background: var(--due3-bg); color: var(--due3-ink); }
.cert-banner.tone-unset { border-color: var(--neut-line); background: var(--neut-bg); color: var(--neut-ink); }

/* Counts by band, which filter the table. */
.cert-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cert-tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  padding: 14px 16px 14px 20px; border: 1px solid var(--border); border-radius: var(--r); background: var(--panel);
  box-shadow: var(--shadow); color: var(--ink); cursor: pointer; font: inherit; overflow: hidden;
  transition: transform .12s, border-color .12s;
}
.cert-tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--neut); }
.cert-tile.t-overdue::before { background: var(--hi); }
.cert-tile.t-soon::before { background: var(--due3); }
.cert-tile.t-later::before { background: var(--due6); }
.cert-tile:hover { transform: translateY(-1px); border-color: var(--border-strong); }
.cert-tile.on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--info-line), var(--shadow); }
.ct-n { font-family: var(--f-display); font-size: 30px; font-weight: 800; line-height: 1.1; }
.t-overdue .ct-n { color: var(--hi-ink); }
.t-soon .ct-n { color: var(--due3-ink); }
.t-later .ct-n { color: var(--due6-ink); }
.ct-l { font-weight: 700; font-size: 13.5px; }
.ct-s { font-size: 12px; color: var(--ink-faint); }

.cert-sort { display: flex; align-items: center; gap: 8px; }
.cert-sort .sel { width: auto; }
.linkish { border: 0; background: none; padding: 0; font: inherit; color: var(--primary-ink); text-decoration: underline; cursor: pointer; }

.cert-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 10px 20px;
  border-bottom: 1px solid var(--border); font-size: 12.5px; color: var(--ink-muted);
}
.cert-legend span { display: inline-flex; align-items: center; gap: 7px; }
.cert-legend .sw { width: 22px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid var(--border-strong); }

/* The table: one row a property, one coloured cell a check. */
.cert-table { border-collapse: separate; border-spacing: 0; }
.cert-table th, .cert-table td { vertical-align: middle; }
.cert-table thead th .tiny { display: block; font-weight: 400; text-transform: none; letter-spacing: 0; }
.cert-table td { padding: 8px 8px; width: 24%; }
.cert-prop { text-align: left; padding: 12px 16px !important; font-weight: 400; min-width: 200px; }
.cert-prop a { display: block; font-family: var(--f-display); font-weight: 800; font-size: 14.5px; color: var(--ink); text-decoration: none; }
.cert-prop a:hover { text-decoration: underline; }
.cert-prop .tiny { display: block; }
.cert-edit { margin-top: 8px; }

.due {
  display: flex; flex-direction: column; gap: 3px; min-height: 78px; justify-content: center;
  padding: 10px 14px; border-radius: var(--r); border: 1px solid var(--border); background: var(--panel);
  color: var(--ink); text-decoration: none; transition: transform .12s, box-shadow .12s;
}
.due:hover { transform: translateY(-1px); box-shadow: var(--shadow); text-decoration: none; }
.due:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.due-date { font-family: var(--f-display); font-weight: 800; font-size: 15.5px; }
.due-note { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-muted); }
.due-files { font-size: 11.5px; color: var(--ink-faint); }
.due-ic { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.due.dim { opacity: .35; }

.due-overdue { background: var(--hi-bg); border-color: var(--hi-line); }
.due-overdue .due-date, .due-overdue .due-note { color: var(--hi-ink); }
.due.due-overdue { border-left: 5px solid var(--hi); }
.due-soon { background: var(--due3-bg); border-color: var(--due3-line); }
.due-soon .due-date, .due-soon .due-note { color: var(--due3-ink); }
.due.due-soon { border-left: 5px solid var(--due3); }
.due-later { background: var(--due6-bg); border-color: var(--due6-line); }
.due-later .due-date, .due-later .due-note { color: var(--due6-ink); }
.due.due-later { border-left: 5px solid var(--due6); }
.due-ok .due-note { color: var(--ok-ink); }
.due-none {
  background: repeating-linear-gradient(135deg, var(--hatch) 0 7px, transparent 7px 14px), var(--panel-2);
  border-color: var(--border);
}
.due-none .due-date { color: var(--ink-muted); font-weight: 700; }
.due-unset { background: transparent; border: 1.5px dashed var(--border-strong); }
.due-unset .due-date { color: var(--ink-faint); font-weight: 700; }
.cert-legend .sw.due-overdue { background: var(--hi-bg); border-color: var(--hi); }
.cert-legend .sw.due-soon { background: var(--due3-bg); border-color: var(--due3); }
.cert-legend .sw.due-later { background: var(--due6-bg); border-color: var(--due6); }
.cert-legend .sw.due-ok { background: var(--panel); }
.cert-legend .sw.due-unset { border-style: dashed; }

/* The same colours, small: the dashboard card and a property's Certificates card. */
.due-chip {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  border: 1px solid var(--border); background: var(--panel-2); color: var(--ink-muted); white-space: nowrap;
}
.due-chip.due-overdue { color: var(--hi-ink); }
.due-chip.due-soon { color: var(--due3-ink); }
.due-chip.due-later { color: var(--due6-ink); }
.due-chip.due-ok { color: var(--ok-ink); background: var(--ok-bg); border-color: var(--ok-line); }
.due-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cert-card { display: block; text-decoration: none; color: inherit; }
.cert-card:hover { border-color: var(--primary); text-decoration: none; }

/* The property form's dates. */
.checks-fields { border: 1px solid var(--border); border-radius: var(--r); margin: 16px 0 0; padding: 12px 14px 14px; }
.checks-fields legend { padding: 0 6px; font-weight: 700; font-size: 13px; color: var(--ink); }
.checks-fields .fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field .nogas { display: flex; align-items: center; gap: 7px; margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-muted); cursor: pointer; text-transform: none; letter-spacing: 0; }
.field .nogas input { width: 16px; height: 16px; accent-color: var(--primary); }
.inp:disabled { background: repeating-linear-gradient(135deg, var(--hatch) 0 6px, transparent 6px 12px), var(--panel-2); color: var(--ink-faint); }

@media (max-width: 900px) {
  .cert-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checks-fields .fields { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  /* Each property becomes a card: its address, then its three checks. */
  .cert-table thead { display: none; }
  .cert-table, .cert-table tbody { display: block; }
  .cert-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 12px; border-bottom: 1px solid var(--border); }
  .cert-table .cert-prop { grid-column: 1 / -1; padding: 0 0 4px !important; min-width: 0; border: 0; }
  .cert-table td { display: block; width: auto; padding: 0; border: 0; }
  .cert-table td::before { content: attr(data-label); display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); margin: 0 0 4px 2px; }
  .due { min-height: 0; padding: 8px 9px; }
  .due-date { font-size: 13.5px; }
  .due-note { font-size: 11.5px; }
  .due-files { display: none; }
  .cert-prop { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
  .cert-prop a { flex: 1 1 auto; }
  .cert-edit { margin: 0; }
}
@media (max-width: 420px) {
  .cert-table tr { grid-template-columns: 1fr; }
  .due { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
}

/* ============================================================
   Notifications — the admin's email designer (ADR 0018)
   ============================================================ */
.nt-tabs { margin: -4px 0 16px; flex-wrap: wrap; }
.nt-banner .card-b p { margin: 0 0 6px; font-size: 13px; }
.nt-banner .card-b p:last-child { margin: 0; }
.nt-banner { border-left: 4px solid var(--med); }
.nt-banner.ok { border-left-color: var(--ok); }
.nt-code { display: inline-block; min-width: 30px; padding: 2px 6px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--border); font-weight: 700; font-size: 12px; color: var(--ink-muted); text-align: center; font-variant-numeric: tabular-nums; }
.nt-yours { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; background: var(--navy); color: #fff; font-size: 11px; font-weight: 800; vertical-align: 1px; }
.nt-table td { vertical-align: middle; }
.nt-row-link { cursor: pointer; }
.nt-row-link:hover td { background: var(--panel-2); }
.nt-switch { position: relative; display: inline-block; width: 38px; height: 22px; cursor: pointer; }
.nt-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.nt-switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--border-strong); transition: background .15s; }
.nt-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.nt-switch input:checked + span { background: var(--ok); }
.nt-switch input:checked + span::after { transform: translateX(16px); }
.nt-switch input:disabled + span { opacity: .45; cursor: not-allowed; }
.nt-switch input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }

.nt-head .card-h { flex-wrap: wrap; }
.nt-head .card-h h2 { font-size: 17px; }
.nt-head .hdr-actions { flex-wrap: wrap; }
select.inp.nt-history { width: auto; max-width: 240px; min-width: 120px; min-height: 32px; padding: 5px 8px; font-size: 12.5px; }
.nt-head .hdr-actions.spacer { margin-left: auto; justify-content: flex-end; }
.acct .es-link { display: block; }
.nt-when { font-size: 13px; color: var(--ink-muted); }
.nt-editor { display: grid; grid-template-columns: minmax(230px, 280px) minmax(0, 1fr) minmax(320px, 400px); gap: 16px; align-items: start; }
.nt-editor > .card { margin: 0; }
.nt-side { position: sticky; top: 12px; }
.nt-settings .field { margin-bottom: 14px; }
.nt-settings .field label { display: block; }
.nt-inline { display: flex; align-items: center; gap: 8px; }
.nt-inline .inp { width: 100px; }
.nt-inline input[type="color"] { width: 38px; height: 34px; padding: 0; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: none; }
.nt-check-row { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-size: 13px; cursor: pointer; }
.nt-check-row input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--primary); flex: none; }
.nt-tokfield { display: flex; gap: 6px; align-items: center; }
.nt-tokfield .inp { flex: 1; min-width: 0; }
.nt-ins { flex: none; padding: 5px 8px; font-size: 11.5px; }

.nt-block { border: 1px solid var(--border); border-radius: var(--r); background: var(--panel); margin: 0 0 12px; }
.nt-block:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--info-bg); }
.nt-bhead { display: flex; align-items: center; gap: 4px; padding: 7px 10px; border-bottom: 1px solid var(--border); background: var(--panel-2); border-radius: var(--r) var(--r) 0 0; }
.nt-bhead b { font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--teal); }
.nt-ic { border: 1px solid transparent; background: transparent; border-radius: 6px; width: 26px; height: 26px; cursor: pointer; color: var(--ink-muted); font-size: 13px; }
.nt-ic:hover:not(:disabled) { border-color: var(--border); background: var(--panel); color: var(--ink); }
.nt-ic:disabled { opacity: .3; cursor: default; }
.nt-bbody { padding: 10px 12px; }
.nt-row { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.nt-row > label { width: 78px; flex: none; }
.nt-row .inp, .nt-wide { flex: 1; min-width: 0; }
.nt-link { flex: 1; display: flex; gap: 6px; min-width: 0; }
.nt-link select { flex: 1; min-width: 0; }
.nt-rich { border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--panel); }
.nt-tbar { display: flex; flex-wrap: wrap; gap: 3px; padding: 5px; border-bottom: 1px solid var(--border); background: var(--panel-2); border-radius: var(--r-sm) var(--r-sm) 0 0; }
.nt-tbar button { border: 1px solid var(--border); background: var(--panel); border-radius: 5px; padding: 3px 8px; font-size: 12px; color: var(--ink-muted); cursor: pointer; }
.nt-tbar button:hover { color: var(--ink); border-color: var(--border-strong); }
.nt-edit { min-height: 70px; padding: 10px 12px; font-size: 14px; line-height: 1.55; outline: none; }
.nt-edit p { margin: 0 0 10px; }
.nt-edit ul, .nt-edit ol { margin: 0 0 10px; padding-left: 22px; }
.nt-edit a { color: var(--primary-ink); }
.tok { display: inline-block; padding: 0 6px; border-radius: 5px; background: var(--info-bg); border: 1px solid var(--info-line); color: var(--info-ink); font-size: 12.5px; font-weight: 600; white-space: nowrap; user-select: all; }
.tok i { font-weight: 400; }
.nt-imgrow { display: grid; grid-template-columns: 110px 1fr; gap: 12px; }
.nt-thumb { display: grid; place-items: center; min-height: 80px; border: 1px dashed var(--border-strong); border-radius: var(--r-sm); background: repeating-conic-gradient(var(--panel-2) 0 25%, var(--panel) 0 50%) 0 0/14px 14px; overflow: hidden; }
.nt-thumb img { max-width: 100%; max-height: 100px; }
.nt-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

textarea.nt-htmlcode { width: 100%; min-height: 120px; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.nt-add { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 12px; border: 1.5px dashed var(--border-strong); border-radius: var(--r); }
.nt-menu { position: absolute; z-index: 60; width: 290px; max-height: 320px; overflow: auto; background: var(--panel); border: 1px solid var(--border-strong); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 4px; }
.nt-menu button { display: flex; justify-content: space-between; gap: 8px; width: 100%; border: 0; background: transparent; text-align: left; padding: 7px 9px; border-radius: 6px; font-size: 13px; color: var(--ink); cursor: pointer; }
.nt-menu button:hover { background: var(--panel-2); }
.nt-menu button span { color: var(--ink-faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }

.nt-seg { display: flex; border: 1px solid var(--border-strong); border-radius: var(--r-sm); overflow: hidden; width: fit-content; margin: 0 auto 10px; }
.nt-seg button { border: 0; background: var(--panel-2); padding: 6px 11px; font-size: 12px; font-weight: 600; color: var(--ink-muted); cursor: pointer; }
.nt-seg button.on { background: var(--navy); color: #fff; }
.nt-subject { font-size: 13px; margin: 0 0 8px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--panel-2); border: 1px solid var(--border); }
.nt-subject:empty { display: none; }
.nt-subject span { display: block; color: var(--ink-faint); font-size: 12px; }
.nt-frame { margin: 0 auto; background: #EEF2F6; border-radius: 22px; overflow: hidden; }
.nt-frame.phone { width: 340px; max-width: 100%; height: 600px; border: 9px solid #1D2A38; }
.nt-frame.computer { width: 100%; height: 600px; border: 1px solid var(--border-strong); border-radius: var(--r); }
.nt-frame iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.nt-text { white-space: pre-wrap; font-size: 12.5px; max-height: 600px; overflow: auto; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px; margin: 0; }
.nt-checks { margin-top: 12px; }
.nt-check { font-size: 12.5px; padding: 6px 9px; border-radius: 6px; margin: 0 0 5px; }
.nt-check.ok { background: var(--ok-bg); color: var(--ok-ink); }
.nt-check.bad { background: var(--hi-bg); color: var(--hi-ink); }
.nt-check.warn { background: var(--med-bg); color: var(--med-ink); }

.nt-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.nt-image { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--panel); }
.nt-image-pic { display: grid; place-items: center; height: 140px; background: repeating-conic-gradient(var(--panel-2) 0 25%, var(--panel) 0 50%) 0 0/16px 16px; }
.nt-image-pic img { max-width: 100%; max-height: 140px; }
.nt-image-b { display: grid; gap: 6px; padding: 10px; }
.nt-image-b b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-filters { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--border); }
.nt-filters .inp { width: auto; min-width: 160px; }
.nt-modal { width: min(760px, 96vw); }
.nt-sentframe { width: 100%; height: 70vh; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fff; }

.es-group { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--teal); margin: 18px 0 4px; }
.es-group:first-of-type { margin-top: 0; }
.es-row { padding: 8px 0; border-bottom: 1px solid var(--border); margin: 0; }

@media (max-width: 1250px) {
  .nt-editor { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); }
  .nt-settings { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .nt-editor { grid-template-columns: 1fr; }
  .nt-side { position: static; }
  .nt-cols, .nt-imgrow { grid-template-columns: 1fr; }
  .nt-row { flex-wrap: wrap; }
  .nt-row > label { width: 100%; }
}

/* Which documents a User sees (ADR 0019): three choices side by side on the
   Team page, and with what each means in the Add a user window. */
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--r-sm); overflow: hidden; background: var(--panel-2); }
.seg label { position: relative; padding: 5px 11px; font-size: 12.5px; font-weight: 600; color: var(--ink-muted); cursor: pointer; white-space: nowrap; }
.seg label + label { border-left: 1px solid var(--border-strong); }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg label:hover { background: var(--info-bg); color: var(--primary-ink); }
.seg label:has(input:checked) { background: var(--primary-ink); color: var(--on-primary); }
.seg label:has(input:focus-visible) { outline: 3px solid var(--primary); outline-offset: -3px; }
.seg.busy { opacity: .6; pointer-events: none; }
.access-pick { display: grid; gap: 8px; border: 0; padding: 0; margin: 16px 0 0; min-width: 0; }
.access-pick legend { padding: 0; margin-bottom: 8px; font-size: 10.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-faint); }
.access-opt { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--panel); cursor: pointer; }
.access-opt input { grid-row: span 2; margin: 3px 0 0; accent-color: var(--primary); }
.access-opt b { font-size: 13.5px; }
.access-opt span { font-size: 12.5px; color: var(--ink-muted); line-height: 1.45; }
.access-opt:hover { background: var(--panel-2); }
.access-opt:has(input:checked) { border-color: var(--primary); background: var(--info-bg); }
/* A Certificates cell for someone shown no documents: a date, not a link. */
span.due:hover { transform: none; box-shadow: none; }
.tree-note { margin: 10px 8px 0; color: var(--ink-faint); line-height: 1.45; }
@media (max-width: 720px) {
  /* On a phone each person becomes a card, so their Documents switch is in
     view rather than off the side of the table. */
  .team-table thead { display: none; }
  .team-table, .team-table tbody { display: block; }
  .team-table tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .team-table td { display: block; padding: 0; border: 0; }
  .team-table .tm-name, .team-table .tm-email, .team-table .tm-docs { flex: 1 1 100%; }
  .team-table .tm-email { overflow-wrap: anywhere; }
  .team-table .tm-docs { margin-top: 4px; }
  .team-table .tm-docs::before, .team-table .tm-seen::before { content: attr(data-label); display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); margin: 0 0 4px; }
  .team-table .tm-seen::before { display: inline; margin-right: 6px; }
  .team-table .tm-act { margin-left: auto; }
  .team-table .tm-act:empty { display: none; }
}

/* ============================================================
   Your plan (ADR 0020)
   ============================================================ */
.pm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pm { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--border); border-radius: var(--r); background: var(--panel-2); min-width: 0; }
.pm-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--ink-muted); font-weight: 600; }
.pm-h b { font-family: var(--f-display); font-size: 18px; color: var(--ink); white-space: nowrap; }
.pm-bar { height: 8px; border-radius: 999px; background: var(--neut-bg); overflow: hidden; }
.pm-bar span { display: block; height: 100%; border-radius: 999px; background: var(--gradient); }
.pm-bar.high span { background: var(--med); }
.pm-bar.full span { background: var(--hi); }
.plan-over { padding: 12px 14px; border: 1px solid var(--hi-line); border-radius: var(--r); background: var(--hi-bg); color: var(--hi-ink); font-size: 13px; }
.plan-over ul { margin: 6px 0 0; padding-left: 18px; }
.plan-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.plan-card { margin-bottom: 0; }
.plan-card .card-b { display: flex; flex-direction: column; gap: 6px; height: 100%; }
.plan-card h3 { margin: 0; font-family: var(--f-display); font-size: 17px; }
.plan-card.current { border-color: var(--primary); box-shadow: 0 0 0 2px var(--info-line), var(--shadow); }
.plan-price { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: 20px; color: var(--ink); }
.plan-allow { margin: 6px 0 10px; padding: 0; list-style: none; display: grid; gap: 5px; font-size: 13px; color: var(--ink-muted); }
.plan-allow b { color: var(--ink); }
.plan-act { margin-top: auto; }
.plan-fit { font-size: 12.5px; color: var(--ink-muted); }
.plan-fit ul { margin: 4px 0 0; padding-left: 18px; }
.seats.full b { color: var(--hi-ink); }
@media (max-width: 1080px) { .plan-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .pm-grid, .plan-cards { grid-template-columns: 1fr; } }

/* AI apps (ADR 0022): the address to paste, the guides, and the Team switch */
.ai-address-row { display: flex; gap: 8px; margin-top: 4px; }
.ai-address-row .inp { flex: 1; min-width: 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.ai-guides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ai-guide { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.ai-guide summary { cursor: pointer; font-weight: 600; }
.ai-guide ol { margin: 8px 0 6px; padding-left: 20px; }
.ai-guide li { margin-bottom: 4px; }
.ai-cannot { margin: 0; }
.ai-switch { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12.5px; }
.ai-switch input { width: 16px; height: 16px; accent-color: var(--teal); }
@media (max-width: 720px) { .ai-guides { grid-template-columns: 1fr; } }

/* The data protection warning at the top of the AI apps page: the app's red
   warning box, with "Warning" as a red label so it can't be missed. */
.ai-warning { padding: 18px 20px 20px; font-size: 14.5px; gap: 10px; }
.ai-warning .danger-title { flex-wrap: wrap; font-size: 17px; color: var(--ink); }
.ai-warning .danger-title svg { color: var(--hi); }
.ai-warning ul { display: flex; flex-direction: column; gap: 4px; }
.warn-tag {
  display: inline-block; background: var(--hi); color: #fff; border-radius: 6px; padding: 3px 9px;
  font-family: var(--f-body); font-size: 12px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; line-height: 1.4;
}
.ai-protect { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; font-size: 13.5px; }
.ai-protect b { color: var(--ink); }
.ai-protect p { margin: 4px 0 0; color: var(--ink-muted); line-height: 1.55; }
@media (max-width: 900px) { .ai-protect { grid-template-columns: 1fr; gap: 12px; } }
