/* ============================================================
   ROOM INSPECTIONS: ONE COMPONENT SET, THREE ROLES

   Administrator, sub-administrator and tenant all read the same
   checklist, so they use the same components. What differs is which
   controls are rendered, not how an item looks. Three visual systems
   for one document is how a tenant ends up agreeing to something that
   does not look like what the inspector filled in.

   Everything is scoped under .ins so it cannot leak into the admin
   shell or the tenant shell, which have their own type scales.

   WHY IT IS THIS TIGHT. The old page put a text box under all 54 items
   whether or not there was anything to write in it, and gave each item
   four full-width buttons. That is a page four screens long, three of
   them empty. Here a normal item is one row, and only an item with
   something wrong opens up.
   ============================================================ */

.ins {
  --ins-accent:  #2E6E4C;
  --ins-soft:    #eaf3ec;
  --ins-ink:     #141a19;
  --ins-muted:   #5f6b76;
  --ins-line:    #e2e8e5;
  --ins-card:    #fff;
  --ins-ok:      #1c6741;
  --ins-ok-bg:   #e9f4ee;
  --ins-warn:    #9a5504;
  --ins-warn-bg: #fdf6ec;
  --ins-bad:     #a81f14;
  --ins-bad-bg:  #fbeceb;

  /* Roughly 1250px, then it stops. A checklist stretched to the full
     1400px container puts the item on the left and its buttons on the
     right with a hand-span of nothing between them. */
  max-width: 78rem;
  margin: 0 auto;
  color: var(--ins-ink);
}

.ins *, .ins *::before, .ins *::after { box-sizing: border-box; }

/* ---------- page heading ---------- */
.ins-title { margin: 0 0 .2rem; font-size: 1.35rem; font-weight: 800;
             letter-spacing: -.01em; }
.ins-sub { margin: 0 0 1rem; color: var(--ins-muted); font-size: .9rem;
           line-height: 1.5; max-width: 62ch; }

/* ---------- start an inspection ---------- */
.ins-start { background: var(--ins-card); border: 1px solid var(--ins-line);
             border-radius: .7rem; padding: .9rem; margin-bottom: 1rem; }
.ins-start h2 { margin: 0 0 .7rem; font-size: .95rem; font-weight: 700; }
.ins-start-row { display: grid; gap: .5rem; grid-template-columns: 1fr; }
@media (min-width: 44rem) {
  .ins-start-row { grid-template-columns: 2fr 1.5fr auto; align-items: center; }
}
.ins-start select { width: 100%; min-height: 2.6rem; padding: .45rem .6rem;
                    border: 1px solid #d5ddda; border-radius: .5rem; font: inherit;
                    font-size: .9rem; background: #fff; color: var(--ins-ink); }

/* ---------- buttons ---------- */
/* IT HAS TO LOOK PRESSABLE. These were white on a white card with a pale grey
   hairline, and they read as a list of words rather than three controls. A
   button that has to be identified by trying it is not a button. */
.ins-btn { width: auto; min-height: 2.5rem; padding: .45rem .95rem;
           border: 1px solid #bcc9c3; border-radius: .5rem; background: #f2f5f4;
           color: #26333c; font: inherit; font-size: .87rem; font-weight: 650;
           cursor: pointer; white-space: nowrap;
           box-shadow: 0 1px 0 rgba(20,26,25,.05); }
.ins-btn:hover { background: #e8edeb; border-color: #9fb0a8; }
.ins-btn:active { background: #dde4e1; box-shadow: none; transform: translateY(1px); }
.ins-btn-solid { background: var(--ins-accent); border-color: var(--ins-accent);
                 color: #fff; }
.ins-btn-solid:hover { background: #256040; border-color: #256040; }
.ins-btn:disabled { opacity: .5; cursor: default; }
/* Removing something is not the same act as saving it, and should not be one
   tap away from looking identical. */
.ins-btn-warn { border-color: #d8b6b2; color: var(--ins-bad); background: #fdf4f3; }
.ins-btn-warn:hover { background: var(--ins-bad-bg); border-color: #c69790; }
.ins-btn:focus-visible, .ins select:focus-visible, .ins input:focus-visible,
.ins textarea:focus-visible { outline: 2px solid var(--ins-accent); outline-offset: 1px; }

/* ---------- the list of inspections ---------- */
.ins-rows { display: grid; gap: .5rem; }
.ins-row { display: block; width: 100%; text-align: left; background: var(--ins-card);
           border: 1px solid var(--ins-line); border-left: 3px solid #cdd6d2;
           border-radius: .6rem; padding: .7rem .85rem; font: inherit; cursor: pointer; }
.ins-row:hover { border-color: #c2cec9; border-left-color: var(--ins-accent); }
.ins-row-open { border-left-color: var(--ins-warn); }
.ins-row-gone { border-left-color: var(--ins-line); opacity: .65; }
.ins-row-done { border-left-color: var(--ins-ok); }
.ins-row-top { display: flex; justify-content: space-between; align-items: baseline;
               gap: .6rem; flex-wrap: wrap; }
.ins-row-top b { font-size: .95rem; }
.ins-row-sub { display: block; color: var(--ins-muted); font-size: .83rem;
               margin-top: .15rem; }
.ins-row-bad { display: inline-block; color: var(--ins-warn); font-size: .82rem;
               font-weight: 650; margin-top: .25rem; }
.ins-row-note { display: block; color: var(--ins-muted); font-size: .78rem;
                margin-top: .2rem; font-style: italic; }

.ins-listbar { display: flex; justify-content: flex-end; margin-bottom: .5rem; }

.ins-pill { font-size: .71rem; font-weight: 700; padding: .15rem .5rem;
            border-radius: 1rem; white-space: nowrap; }
.ins-pill-ok   { background: var(--ins-ok-bg);   color: var(--ins-ok); }
.ins-pill-wait { background: var(--ins-warn-bg); color: var(--ins-warn); }
.ins-pill-act  { background: var(--ins-warn-bg); color: var(--ins-warn); }
.ins-pill-dead { background: #eef1f3;            color: var(--ins-muted); }

/* ============================================================
   THE STICKY HEAD

   Who, which room, what kind, how far through, and the action that
   moves it forward. It stays put because an inspector who cannot see
   what is left will sign with holes in the form.

   --tb-h only exists below 900px, where admin-nav.css fixes a bar over
   everything; on desktop the fallback applies and this sits at the top
   of the viewport.
   ============================================================ */
.ins-head { background: var(--ins-card); border: 1px solid var(--ins-line);
            border-radius: .7rem; padding: .75rem .9rem; margin-bottom: .9rem;
            box-shadow: 0 1px 3px rgba(20,26,25,.05); }
/* Sticky only where it earns it. The office page is a form somebody works
   down for several minutes, so the count and the action follow them. The
   tenant page is a summary, and its shell already has a sticky header of its
   own at top:0 which this would sit on top of. */
.ins-head-stick { position: sticky; top: var(--tb-h, 0px); z-index: 30; }

.ins-head-top { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.ins-head-top h2 { margin: 0; font-size: 1.05rem; font-weight: 750;
                   letter-spacing: -.005em; }

/* Tenant, kind, inspector, date. Four facts on one line, not four cards. */
.ins-meta { display: flex; flex-wrap: wrap; gap: .15rem .9rem; margin-top: .3rem;
            color: var(--ins-muted); font-size: .82rem; }
.ins-meta b { color: var(--ins-ink); font-weight: 650; }

.ins-prog { display: flex; align-items: center; gap: .6rem; margin-top: .55rem; }
.ins-prog-txt { font-size: .82rem; font-weight: 650; color: var(--ins-warn);
                white-space: nowrap; font-variant-numeric: tabular-nums; }
.ins-done .ins-prog-txt { color: var(--ins-ok); }
.ins-track { flex: 1 1 auto; height: .35rem; border-radius: 1rem;
             background: #eaeeec; overflow: hidden; }
.ins-fill { display: block; height: 100%; width: 0; background: var(--ins-warn);
            transition: width .2s ease; }
.ins-done .ins-fill { background: var(--ins-ok); }

.ins-acts { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem;
            margin-top: .6rem; }

/* WHERE THE ACTION WAS, NOT AT THE BOTTOM OF THE PAGE.
   Save now sits in the head; its answer used to be written into the message
   line under the signatures, fifty-four rows below. Pressing the button and
   seeing nothing is indistinguishable from a button that does not work, which
   is exactly what it was reported as. */
.ins-head-say { margin-left: auto; font-size: .82rem; font-weight: 650;
                min-height: 1.2em; }
.ins-head-say-ok  { color: var(--ins-ok); }
.ins-head-say-bad { color: var(--ins-bad); }
@media (max-width: 34rem) {
  .ins-head-say { flex: 1 1 100%; margin-left: 0; }
}

/* ---------- summary strip ---------- */
/* One row, not four KPI cards. These are counts on a 54-line form, not
   quarterly figures. */
.ins-sum { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .9rem; }
.ins-stat { display: inline-flex; align-items: baseline; gap: .3rem;
            padding: .3rem .6rem; border-radius: 1rem; background: #eef1f0;
            font-size: .8rem; color: var(--ins-muted); }
.ins-stat b { font-size: .92rem; font-weight: 750; color: var(--ins-ink);
              font-variant-numeric: tabular-nums; }
.ins-stat-ok    { background: var(--ins-ok-bg); color: var(--ins-ok); }
.ins-stat-ok b  { color: var(--ins-ok); }
.ins-stat-warn   { background: var(--ins-warn-bg); color: var(--ins-warn); }
.ins-stat-warn b { color: var(--ins-warn); }
.ins-stat-bad   { background: var(--ins-bad-bg); color: var(--ins-bad); }
.ins-stat-bad b { color: var(--ins-bad); }

/* ---------- section navigation ---------- */
/* Ten sections is more than fits on one screen, so there is a way to
   jump. On a phone the strip scrolls sideways, which is the one place
   horizontal scrolling is right: a single row nobody has to read. */
.ins-nav { display: flex; gap: .3rem; overflow-x: auto; padding-bottom: .4rem;
           margin-bottom: .8rem; scrollbar-width: thin;
           -webkit-overflow-scrolling: touch; }
.ins-chip { flex: 0 0 auto; padding: .3rem .65rem; border: 1px solid #d5ddda;
            border-radius: 1rem; background: #fff; font: inherit; font-size: .79rem;
            font-weight: 600; color: #3d4a53; cursor: pointer; white-space: nowrap; }
.ins-chip:hover { border-color: var(--ins-accent); color: var(--ins-accent); }
.ins-chip-done { background: var(--ins-ok-bg); border-color: #c7e2d4;
                 color: var(--ins-ok); }
.ins-chip-bad { background: var(--ins-warn-bg); border-color: #f0dcc0;
                color: var(--ins-warn); }

/* ============================================================
   THE CHECKLIST

   Two columns from 62rem up. Not because it is pretty: ten sections in
   one column on a wide screen is a metre of scrolling beside an empty
   half-page.
   ============================================================ */
.ins-grid { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 62rem) { .ins-grid { grid-template-columns: 1fr 1fr; } }

.ins-card { background: var(--ins-card); border: 1px solid var(--ins-line);
            border-radius: .7rem; padding: .85rem; scroll-margin-top: 8rem; }
.ins-card-head { display: flex; align-items: center; gap: .5rem;
                 margin-bottom: .5rem; }
.ins-card-head h3 { margin: 0; font-size: .93rem; font-weight: 700; }
.ins-count { font-size: .78rem; font-weight: 650; color: var(--ins-muted);
             font-variant-numeric: tabular-nums; white-space: nowrap; }
.ins-card-done .ins-count { color: var(--ins-ok); }

/* MOST ITEMS ARE FINE. An inspector marking 54 lines one at a time
   stops reading properly around section four and the form starts
   lying. This fills only the blanks, so the work becomes finding the
   exceptions rather than confirming the rule. */
.ins-rest { width: auto; min-height: 1.9rem; padding: .2rem .6rem; margin-left: auto;
            border: 1px solid #c7e2d4; border-radius: 1rem;
            background: var(--ins-ok-bg); color: var(--ins-ok);
            font: inherit; font-size: .76rem; font-weight: 650; cursor: pointer;
            white-space: nowrap; }
.ins-rest:hover { background: #dceee4; }

.ins-item { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
            padding: .4rem 0; border-top: 1px solid #f1f4f3; }
.ins-item:first-of-type { border-top: 0; }
.ins-label { flex: 1 1 8rem; min-width: 0; font-size: .87rem; line-height: 1.35; }
.ins-checks { display: block; color: var(--ins-muted); font-size: .74rem;
              line-height: 1.35; margin-top: .1rem; }

/* ---------- the segmented control ---------- */
/* Four joined buttons the width of the label, not four stacked bars.
   This is the single change that takes the form from four screens to
   one and a half. */
.ins-seg { flex: 0 0 auto; display: grid; grid-template-columns: repeat(4, 5.7rem); gap: .3rem; }
/* 6.51.0: each condition wears its own colour before it is chosen, and the
   chosen one is filled, ringed and ticked so it reads at a glance. */
.ins-seg button { min-height: 2.6rem; padding: .3rem .45rem; border: 1.5px solid #c3cbd0;
                  border-radius: .5rem; background: #fff; font: inherit;
                  font-size: .84rem; font-weight: 700; color: #4a545c;
                  cursor: pointer; white-space: nowrap; transition: background-color .12s, box-shadow .12s; }
.ins-seg .c-good            { border-color: #9fcfb3; background: #f1f9f4; color: #17603b; }
.ins-seg .c-needs_attention { border-color: #e6bd72; background: #fff7e8; color: #7a4a00; }
.ins-seg .c-damaged         { border-color: #e8a59d; background: #fff2f1; color: #a01b10; }
.ins-seg .c-not_applicable  { border-color: #c3cbd0; background: #f5f7f8; color: #4a545c; }
.ins-seg button:hover:not(.on) { filter: brightness(.96); }
.ins-seg button:focus-visible { outline: 2px solid var(--ins-accent); outline-offset: 2px; }
.ins-seg button:disabled { cursor: default; }
.ins-seg .on { color: #fff; border-color: transparent; }
.ins-seg .on.c-good            { background: #1c6741; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1c6741; }
.ins-seg .on.c-needs_attention { background: #9a5504; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #9a5504; }
.ins-seg .on.c-damaged         { background: #a81f14; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #a81f14; }
.ins-seg .on.c-not_applicable  { background: #5f6b76; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #5f6b76; }

/* ---------- the row only opens when there is something in it ---------- */
/* A note box under every line is 54 empty boxes. It appears when the
   item is marked as a problem, or when there is already a note. */
.ins-more { flex: 1 1 100%; margin: .1rem 0 .3rem; }

/* The offer of a note on an item that is fine.
   HIDDEN UNTIL SOMEBODY IS ON THE ROW. Shown always, it is fifty-four green
   underlined links down the page, and on a phone fifty-four extra lines,
   which is the empty space this redesign existed to remove. Hover covers a
   mouse; focus-within covers a thumb, because tapping a condition button puts
   the focus inside the row, which is exactly the moment somebody might want
   to write something about it. */
.ins-addwrap { flex: 0 0 auto; display: none; }
.ins-item:hover .ins-addwrap,
.ins-item:focus-within .ins-addwrap { display: block; }
.ins-note { width: 100%; min-height: 2.2rem; padding: .35rem .55rem;
            border: 1px solid #dfe6e3; border-radius: .45rem; font: inherit;
            font-size: .83rem; }
.ins-addnote { width: auto; min-height: 1.7rem; padding: 0; border: 0;
               background: none; font: inherit; font-size: .76rem; font-weight: 600;
               color: var(--ins-accent); cursor: pointer; text-decoration: underline;
               text-underline-offset: 2px; }
.ins-item-bad { background: var(--ins-warn-bg); border-radius: .4rem;
                padding-left: .45rem; padding-right: .45rem; }

/* AN UNANSWERED LINE LOOKS EXACTLY LIKE ANY OTHER until you notice no button
   is pressed, which on line 41 of 54 nobody does. Signing is refused while any
   line is blank, so the inspector was left pressing a button that could not
   work and hunting for lines they could not see. Turned on only while they
   have asked what is left, so a form being filled in is not a wall of red. */
.ins-blanks .ins-item-blank { background: #fdf0ef; border-radius: .4rem;
                              padding-left: .45rem; padding-right: .45rem;
                              box-shadow: inset 3px 0 0 var(--ins-bad); }
.ins-blanks .ins-item-blank .ins-label::after {
    content: " not answered"; color: var(--ins-bad); font-size: .74rem;
    font-weight: 700; }

.ins-chip-left { background: #fdf0ef; border-color: #e6c4c0; color: var(--ins-bad); }

/* ---------- general notes ---------- */
.ins-gen { background: var(--ins-card); border: 1px solid var(--ins-line);
           border-radius: .7rem; padding: .85rem; margin-top: 1rem; }
.ins-gen h3 { margin: 0 0 .45rem; font-size: .93rem; font-weight: 700; }
.ins-gen textarea { width: 100%; min-height: 4.5rem; padding: .5rem .6rem;
                    border: 1px solid #dfe6e3; border-radius: .5rem; font: inherit;
                    font-size: .87rem; resize: vertical; }
.ins-gen p { margin: 0; font-size: .87rem; line-height: 1.55; }

/* ============================================================
   CONFIRMATION

   Three compact status rows, not three cards. The signature that is
   actually due gets the form; the other two are facts.
   ============================================================ */
.ins-confirm { background: var(--ins-card); border: 1px solid var(--ins-line);
               border-radius: .7rem; padding: .85rem; margin-top: 1rem;
               scroll-margin-top: 8rem; }
.ins-confirm h3 { margin: 0 0 .6rem; font-size: .93rem; font-weight: 700; }
.ins-sigs { display: grid; gap: .3rem; }
.ins-sig { display: flex; align-items: baseline; justify-content: space-between;
           gap: .7rem; padding: .45rem .6rem; background: #f6f8f7;
           border-radius: .45rem; font-size: .85rem; }
.ins-sig-who { font-weight: 650; }
.ins-sig-val { text-align: right; color: var(--ins-muted); font-size: .8rem; }
.ins-sig-done .ins-sig-val { color: var(--ins-ok); }
.ins-sig-due { background: var(--ins-warn-bg); }
.ins-sig-due .ins-sig-val { color: var(--ins-warn); font-weight: 650; }

.ins-sign { margin-top: .7rem; padding-top: .7rem; border-top: 1px solid var(--ins-line); }
.ins-sign p { margin: 0 0 .5rem; color: #4b5563; font-size: .85rem; line-height: 1.5; }
.ins-lab { display: block; font-weight: 650; font-size: .84rem; margin-bottom: .25rem; }
.ins-sign input { width: 100%; max-width: 20rem; min-height: 2.6rem;
                  padding: .5rem .6rem; border: 1px solid #d5ddda;
                  border-radius: .5rem; font: inherit; margin-bottom: .55rem; }

.ins-warn { padding: .5rem .65rem; border-radius: .45rem;
            background: var(--ins-warn-bg); color: var(--ins-warn);
            font-size: .82rem; line-height: 1.5; }

/* ============================================================
   REPORT MODE

   A finished inspection is not a form. It stops offering controls and
   starts reading like the record it is, with what went wrong first.
   ============================================================ */
.ins-report-head { background: var(--ins-ok-bg); border: 1px solid #c7e2d4;
                   border-radius: .7rem; padding: .8rem .9rem; margin-bottom: .9rem; }
.ins-report-head b { display: block; font-size: 1rem; color: var(--ins-ok); }
.ins-report-head span { display: block; color: #3d4a53; font-size: .85rem;
                        margin-top: .15rem; }
/* Not finished yet, so not green: a summary to check, not a record. */
.ins-report-open { background: var(--ins-warn-bg); border-color: #f0dcc0; }
.ins-report-open b { color: var(--ins-warn); }

.ins-issues { background: var(--ins-card); border: 1px solid #f0dcc0;
              border-left: 3px solid var(--ins-warn); border-radius: .7rem;
              padding: .85rem; margin-bottom: .9rem; }
.ins-issues h3 { margin: 0 0 .5rem; font-size: .93rem; font-weight: 700;
                 color: var(--ins-warn); }
.ins-issue { padding: .45rem 0; border-top: 1px solid #f4ece0; }
.ins-issue:first-of-type { border-top: 0; }
.ins-issue b { display: block; font-size: .87rem; font-weight: 650; }
.ins-issue span { display: block; font-size: .81rem; color: var(--ins-muted);
                  margin-top: .1rem; }
.ins-issue-tag { display: inline-block; font-size: .71rem; font-weight: 700;
                 padding: .1rem .45rem; border-radius: 1rem; margin-left: .35rem; }
.ins-tag-needs_attention { background: var(--ins-warn-bg); color: var(--ins-warn); }
.ins-tag-damaged { background: var(--ins-bad-bg); color: var(--ins-bad); }

/* Read-only rows: the verdict as text, no controls at all. */
.ins-verdict { flex: 0 0 auto; font-size: .78rem; font-weight: 700;
               padding: .1rem .5rem; border-radius: 1rem; white-space: nowrap; }
.ins-v-good            { background: var(--ins-ok-bg);   color: var(--ins-ok); }
.ins-v-needs_attention { background: var(--ins-warn-bg); color: var(--ins-warn); }
.ins-v-damaged         { background: var(--ins-bad-bg);  color: var(--ins-bad); }
.ins-v-not_applicable  { background: #eef1f3;            color: var(--ins-muted); }
.ins-v-none            { background: #eef1f3;            color: var(--ins-muted); }
.ins-said { flex: 1 1 100%; font-size: .81rem; color: var(--ins-muted);
            margin-top: .1rem; }

.ins-fold { margin-bottom: .9rem; }
.ins-fold > summary { cursor: pointer; padding: .6rem .85rem;
                      background: var(--ins-card); border: 1px solid var(--ins-line);
                      border-radius: .7rem; font-size: .88rem; font-weight: 650;
                      list-style: none; }
.ins-fold > summary::-webkit-details-marker { display: none; }
.ins-fold > summary::after { content: " \25be"; color: var(--ins-muted); }
.ins-fold[open] > summary { border-radius: .7rem .7rem 0 0; }
.ins-fold[open] > summary::after { content: " \25b4"; }
.ins-fold-body { padding-top: .9rem; }

/* ---------- messages ---------- */
.ins-say { margin: .6rem 0 0; font-size: .85rem; min-height: 1.2em; }
.ins-say-ok  { color: var(--ins-ok); }
.ins-say-bad { color: var(--ins-bad); }
.ins-muted { color: var(--ins-muted); font-size: .87rem; }
.ins-hide { display: none !important; }

/* ============================================================
   PHONES

   Nothing is shrunk to fit; the pieces that cannot hold a row give up
   the row. Checked at 320, 360, 375, 390, 412, 430 and 768.
   ============================================================ */
@media (max-width: 34rem) {
  .ins-item { align-items: flex-start; }
  .ins-label { flex: 1 1 100%; }
  /* The control gets the full width once the label is above it, which
     is what makes four thumb-sized targets rather than four slivers. */
  .ins-seg { grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; gap: .35rem; }
  .ins-seg button { min-width: 0; min-height: 2.9rem;
                    padding: .3rem .2rem; overflow: hidden;
                    text-overflow: ellipsis; font-size: .82rem; }
  .ins-head { padding: .6rem .7rem; }
  .ins-acts .ins-btn { flex: 1 1 auto; }
  .ins-card { padding: .7rem; }
}

/* Below this the four condition labels cannot share a line legibly, so
   they go two by two rather than being truncated to nothing. */
@media (max-width: 22.5rem) {
  .ins-seg { display: grid; grid-template-columns: 1fr 1fr; }
}

/* On a phone the head measured 278-400px tall (33-65% of the screen) and
   over half of a landscape one, so pinning it buried the checklist under
   it. There it scrolls away and the one-line section strip is pinned. */
@media (max-width: 34rem), (max-height: 34rem) and (pointer: coarse) {
  .ins-head-stick { position: static; }
  .ins-bar { position: sticky; top: var(--tb-h, 0px); z-index: 30; }
}
@media (max-width: 34rem) and (prefers-color-scheme: dark) {
  body.has-admin-nav .ins-bar { background: #121815; }
}

/* Two even columns instead of a ragged wrap. The forward action and the
   message take a whole row; dense fills the gap the full row leaves. */
@media (max-width: 34rem) {
  .ins-acts { display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: row dense; }
  .ins-acts .ins-btn { width: 100%; white-space: normal; padding-left: .5rem; padding-right: .5rem; }
  .ins-acts .ins-btn-solid, .ins-acts .ins-head-say { grid-column: 1 / -1; }
}

/* ============================================================
   RAISING A REPAIR

   The chip sits with the description of what is wrong, because that
   is the text it copies. Quiet when there is nothing raised, and a
   plain fact once there is.
   ============================================================ */
.ins-rep { display: inline-block; margin-top: .3rem; padding: .25rem .6rem;
           border: 1px dashed #c9b48f; border-radius: 1rem;
           background: #fff; color: var(--ins-warn); font: inherit;
           font-size: .76rem; font-weight: 650; cursor: pointer;
           text-decoration: none; }
.ins-rep:hover { background: var(--ins-warn-bg); border-style: solid; }
.ins-rep-on { border: 1px solid #c7e2d4; background: var(--ins-ok-bg);
              color: var(--ins-ok); cursor: pointer; }
.ins-rep-on:hover { background: #dceee4; }
.ins-stat-rep { background: #eef2f7; color: #3c5670; }
.ins-stat-rep b { color: #24384d; }

/* ---------- the dialog ---------- */
/* It writes to a different collection and puts a job in front of the
   office, so it asks rather than firing off a record from one tap. */
.ins-modal { position: fixed; inset: 0; z-index: 90; display: flex;
             align-items: center; justify-content: center; padding: 1rem;
             background: rgba(20,26,25,.45); }
.ins-modal[hidden] { display: none; }
.ins-modal-card { width: 100%; max-width: 30rem; max-height: 90vh; overflow-y: auto;
                  background: var(--ins-card); border-radius: .8rem;
                  padding: 1.1rem; box-shadow: 0 10px 40px rgba(20,26,25,.25); }
.ins-modal-card h3 { margin: 0 0 .2rem; font-size: 1.05rem; font-weight: 750; }
.ins-modal-from { margin: 0 0 .9rem; color: var(--ins-muted); font-size: .84rem; }
.ins-modal-card input, .ins-modal-card textarea, .ins-modal-card select {
  width: 100%; min-height: 2.6rem; padding: .5rem .6rem; border: 1px solid #d5ddda;
  border-radius: .5rem; font: inherit; font-size: .88rem; margin-bottom: .7rem;
  background: #fff; color: var(--ins-ink); }
.ins-modal-card textarea { min-height: 4.5rem; resize: vertical; }
.ins-modal-two { display: grid; gap: 0 .6rem; grid-template-columns: 1fr 1fr; }
.ins-modal-acts { display: flex; gap: .5rem; justify-content: flex-end;
                  margin-top: .3rem; }

@media (max-width: 30rem) {
  .ins-modal { padding: .6rem; align-items: flex-end; }
  .ins-modal-two { grid-template-columns: 1fr; }
  .ins-modal-acts .ins-btn { flex: 1 1 auto; }
}

/* A flag on the item, not a repair. Some things want looking at again next
   month rather than a job raising today. */
.ins-follow { display: flex; align-items: center; gap: .35rem; margin-top: .3rem;
              font-size: .78rem; color: var(--ins-muted); cursor: pointer; }
.ins-follow input { width: auto; min-height: 0; margin: 0; accent-color: var(--ins-accent); }

/* How many lines are still blank, on the button that will go and find
   them. The button keeps its name: renaming the one somebody is
   looking for is worse than disabling it. */
.ins-btn-n { display:inline-block; margin-left:.4rem; padding:.05rem .4rem;
             border-radius:1rem; background:rgba(255,255,255,.25);
             font-size:.74rem; font-weight:700; }

/* Photos on a damaged item. span.* so .ins-issue span cannot restyle them.
   contain, never cover: cropping a photo can crop out the damage. */
span.ins-photos { display: block; flex: 1 1 100%; margin: .5rem 0 .2rem; }
span.ins-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 15rem));
                 align-items: start; gap: .75rem; margin-bottom: .6rem; }
span.ins-pcard { display: flex; flex-direction: column; overflow: hidden; background: #fff;
                 border: 1px solid var(--ins-line); border-radius: .6rem; }
/* The img is taken out of flow so a portrait photo cannot stretch the box
   past 4:3; it is letterboxed inside it instead. */
.ins-pthumb { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; min-height: 0;
              overflow: hidden; padding: 0; border: 0; border-radius: 0; background: #1f2937; cursor: zoom-in; }
.ins-pthumb img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.ins-pthumb img:not([src]) { visibility: hidden; }
span.ins-pwait { position: absolute; inset: 0; display: flex; align-items: center;
                 justify-content: center; padding: .5rem; text-align: center;
                 color: #e5e7eb; font-size: .9rem; font-weight: 600; pointer-events: none; }
span.ins-pwait:empty { display: none; }
span.ins-pacts { display: flex; border-top: 1px solid var(--ins-line); }
span.ins-pacts button { flex: 1 1 0; min-height: 2.6rem; padding: 0 .3rem; border: 0;
                        border-left: 1px solid var(--ins-line); border-radius: 0; background: #fff;
                        font: inherit; font-size: .88rem; font-weight: 650; color: #1f2937; cursor: pointer; }
span.ins-pacts button:first-child { border-left: 0; }
span.ins-pacts button:hover { background: #f3f5f4; }
span.ins-pacts .ins-pdel { color: var(--ins-bad); }

span.ins-padd { display: flex; flex-wrap: wrap; gap: .5rem; }

/* A photo on its way up: shown at once from the phone, plainly not saved. */
span.ins-pcard-pending .ins-pthumb { cursor: default; }
span.ins-pstate { position: absolute; inset: auto 0 0 0; display: flex; flex-direction: column; gap: .3rem;
                  padding: .5rem .6rem; background: rgba(17,24,39,.78); color: #fff;
                  font-size: .88rem; text-align: left; }
span.ins-pstate b { font-weight: 700; }
span.ins-pbar { display: block; height: .3rem; overflow: hidden; border-radius: 1rem; background: rgba(255,255,255,.25); }
span.ins-pbar i { display: block; width: 40%; height: 100%; border-radius: 1rem; background: #fff;
                  animation: ins-pbar 1.1s ease-in-out infinite; }
@keyframes ins-pbar { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { span.ins-pbar i { animation: none; width: 100%; opacity: .6; } }
span.ins-pcard-failed { border-color: var(--ins-bad); }
span.ins-pcard-failed span.ins-pstate { inset: 0; justify-content: center; background: rgba(127,29,29,.86); }
span.ins-pnote { flex: 1 1 auto; display: flex; align-items: center; justify-content: center;
                 min-height: 2.6rem; color: #4b5563; font-size: .88rem; font-weight: 650; }
/* A photo question on a finished building check. */
.bh-qphoto { margin-top: .6rem; }
.bh-qphoto > b { display: block; margin-bottom: .3rem; font-size: .92rem; color: #1f2937; }

/* One row per part of the item. An empty part is its name and two buttons
   on one line; its photos, once there are some, take the full row. */
span.ins-ppart { display: block; }
span.ins-ppart-named { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
                       padding: .6rem 0; border-top: 1px solid var(--ins-line); }
span.ins-ppart-named:first-child { border-top: 0; padding-top: .2rem; }
span.ins-ppart-h { display: block; flex: 1 1 9rem; font-size: .92rem; font-weight: 700; color: #1f2937; }
span.ins-ppart-n { display: inline-block; min-width: 1.4rem; margin-left: .3rem; padding: 0 .4rem;
                   border-radius: 1rem; background: var(--ins-ok-bg); color: var(--ins-ok);
                   font-size: .8rem; text-align: center; }
span.ins-ppart-named span.ins-pgrid { flex: 1 1 100%; margin-bottom: 0; }
.ins-photo-add { position: relative; display: inline-flex; align-items: center; gap: .3rem; min-height: 2.6rem;
                 white-space: nowrap;
                 padding: .45rem .85rem; border: 1px dashed var(--ins-accent); border-radius: .5rem;
                 color: var(--ins-accent); font-weight: 700; font-size: .9rem; cursor: pointer;
                 background: #fff; }
/* Once a photo exists the offer to add another is secondary. */
.ins-photo-add-sm { min-height: 2.2rem; padding: .3rem .7rem; border-style: solid;
                    border-color: #bcc9c3; color: #26333c; font-weight: 650; font-size: .86rem; }
/* Not display:none: some phones will not open a picker for a hidden input. */
.ins-photo-add input { position: absolute; width: 1px; height: 1px; opacity: 0;
                       overflow: hidden; pointer-events: none; }
.ins-photo-busy { font-weight: 600; color: #4b5563; font-size: .9rem; }

@media (max-width: 30rem) {
  span.ins-pgrid { grid-template-columns: 1fr; }
  /* Under a part the pair shares one row rather than two full-width rows each. */
  span.ins-ppart-named span.ins-padd { flex: 1 1 100%; flex-wrap: nowrap; }
  span.ins-ppart-named .ins-photo-add { flex: 1 1 0; min-width: 0; padding-left: .4rem; padding-right: .4rem; }
  .ins-photo-add { flex: 1 1 8rem; justify-content: center; }
}

/* ---------- full-screen photo viewer (js/photo-viewer.js) ---------- */
html.pv-open { overflow: hidden; }
/* Above the install prompt (2147483000), below the staging banner, whose
   height --env-h pushes the toolbar down rather than under it. */
.pv { position: fixed; inset: 0; z-index: 2147483100; display: flex; flex-direction: column;
      background: #0b0d0f; color: #fff; }
.pv[hidden] { display: none; }
.pv-bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem;
          padding: calc(.5rem + var(--env-h, 0px) + env(safe-area-inset-top, 0px)) .75rem .5rem; }
.pv-count { font-size: .95rem; font-weight: 650; }
.pv-tools { display: flex; gap: .4rem; margin-left: auto; }
.pv-btn { min-width: 2.75rem; height: 2.75rem; padding: 0; border: 1px solid rgba(255,255,255,.25);
          border-radius: .55rem; background: rgba(255,255,255,.08); color: #fff;
          font: inherit; font-size: 1.3rem; font-weight: 700; cursor: pointer; }
.pv-btn:hover { background: rgba(255,255,255,.18); }
.pv-fit { padding: 0 .7rem; font-size: .9rem; }
.pv-x { font-size: 1.7rem; }
.pv-stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex;
            align-items: center; justify-content: center; touch-action: none; }
.pv-img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center center;
          user-select: none; -webkit-user-drag: none; cursor: zoom-in; }
.pv-zoomed .pv-img { cursor: grab; }
.pv-msg { position: absolute; padding: 1rem; text-align: center; color: #e5e7eb; font-size: .95rem; }
.pv-nav { position: absolute; top: 50%; z-index: 2; width: 3rem; height: 3.5rem; padding: 0;
          transform: translateY(-50%); border: 0; border-radius: .6rem;
          background: rgba(0,0,0,.5); color: #fff; font-size: 2.2rem; line-height: 1; cursor: pointer; }
.pv-prev { left: .5rem; }
.pv-next { right: .5rem; }
.pv-nav[hidden] { display: none; }
.pv-cap { padding: .6rem .9rem calc(.8rem + env(safe-area-inset-bottom, 0px));
          text-align: center; color: #e5e7eb; font-size: .95rem; }

/* The office's view of the answers on an application or a lease. */
.ins-answers .fx-back { margin: .5rem 0 0; display: grid; gap: .5rem; }
.ins-answers .fx-back > div { display: grid; grid-template-columns: minmax(8rem, 14rem) 1fr; gap: .75rem; align-items: start; }
.ins-answers .fx-back dt { margin: 0; font-size: .9rem; font-weight: 700; color: #4b5563; }
.ins-answers .fx-back dd { margin: 0; font-size: .92rem; color: #1f2937; }
.ins-qnote { display: block; margin-top: .3rem; }
@media (max-width: 30rem) {
  .ins-answers .fx-back > div { grid-template-columns: 1fr; gap: .2rem; }
}

/* ---------- summary & repair estimate (bottom of a completed inspection) ---------- */
.ins-est { background: var(--ins-card); border: 1px solid var(--ins-line);
           border-top: 3px solid var(--ins-accent); border-radius: .7rem;
           padding: .85rem; margin-top: 1rem; }
.ins-est h3 { margin: 0 0 .55rem; font-size: .98rem; font-weight: 700; color: var(--ins-ink); }
.ins-est h4 { margin: .8rem 0 .3rem; font-size: .86rem; font-weight: 700; color: var(--ins-ink); }
.ins-est-note { padding: .55rem .7rem; border-radius: .45rem; background: var(--ins-warn-bg);
                color: var(--ins-warn); font-size: .82rem; font-weight: 600; line-height: 1.5;
                margin-bottom: .7rem; }
.ins-est-text { margin: 0; font-size: .87rem; line-height: 1.55; white-space: pre-wrap;
                color: var(--ins-ink); overflow-wrap: break-word; }
.ins-est-lines { border-top: 1px solid var(--ins-line); }
.ins-est-line { display: flex; justify-content: space-between; align-items: baseline;
                gap: .8rem; padding: .4rem 0; border-bottom: 1px solid var(--ins-line);
                font-size: .86rem; color: var(--ins-ink); }
.ins-est-line span { min-width: 0; overflow-wrap: break-word; }
.ins-est-line b { flex: 0 0 auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ins-est-totals { margin: .7rem 0; }
.ins-est-total { font-weight: 700; border-bottom: 2px solid var(--ins-accent); }
.ins-est-meta { margin: .6rem 0 0; color: var(--ins-muted); font-size: .78rem; line-height: 1.45; }
.ins-est textarea, .ins-est input[type="text"] { width: 100%; padding: .6rem .6rem;
                border: 1px solid #d5ddda; border-radius: .5rem; font: inherit; font-size: .87rem;
                background: #fff; color: var(--ins-ink); box-sizing: border-box; }
.ins-est textarea { margin-bottom: .7rem; resize: vertical; }
.ins-est-edit { display: grid; grid-template-columns: minmax(0, 1fr) 8rem auto; gap: .4rem;
                margin-bottom: .45rem; align-items: center; }
.ins-est .ins-est-totals .ins-lab { margin-top: .6rem; }
.ins-est .ins-est-totals input { max-width: 14rem; }
@media (max-width: 34rem) {
  .ins-est-edit { grid-template-columns: minmax(0, 1fr) auto; padding-bottom: .45rem;
                  border-bottom: 1px dashed var(--ins-line); }
  .ins-est-edit .ins-est-desc { grid-column: 1 / -1; }
  .ins-est .ins-est-totals input { max-width: none; }
}
.ins-est select { width: 100%; padding: .55rem .5rem; border: 1px solid #d5ddda; border-radius: .5rem;
                  font: inherit; font-size: .87rem; font-weight: 400; background: #fff; color: var(--ins-ink); }
.ins-est-card { border: 1px solid var(--ins-line); border-radius: .6rem; padding: .7rem; margin-bottom: .6rem;
                background: #fbfcfb; }
.ins-est-card .ins-lab { margin-bottom: .55rem; }
.ins-est-card input[type="text"], .ins-est-card textarea, .ins-est-card select { margin-top: .25rem; font-weight: 400; }
.ins-est-card textarea { margin-bottom: 0; }
.ins-est-cardhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.ins-est-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
.ins-est-item { padding: .1rem 0 .45rem; border-bottom: 1px solid var(--ins-line); }
.ins-est-item .ins-est-line { border-bottom: 0; padding-bottom: .1rem; }
.ins-est-sub { margin: .1rem 0 .3rem; color: var(--ins-muted); font-size: .8rem; line-height: 1.45;
               overflow-wrap: break-word; }
.ins-est-comment { margin: .2rem 0 .35rem; font-size: .85rem; line-height: 1.5; white-space: pre-wrap;
                   overflow-wrap: break-word; color: var(--ins-ink); }
.ins-est-photos { display: flex; flex-wrap: wrap; gap: .4rem; margin: .35rem 0; }
.ins-est-ph { position: relative; margin: 0; width: 5.2rem; aspect-ratio: 1; border-radius: .4rem;
              overflow: hidden; background: #eef1f3; border: 1px solid var(--ins-line); }
.ins-est-ph img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; font-size: .65rem; }
.ins-est-phdel { position: absolute; top: .15rem; right: .15rem; padding: .25rem .5rem; border: 0;
                 border-radius: 1rem; background: rgba(20, 26, 25, .7); color: #fff; font-size: 1rem;
                 line-height: 1; cursor: pointer; }
.ins-est-addph { display: inline-flex; align-items: center; cursor: pointer; margin-top: .2rem; }
.ins-est-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .4rem 0 .6rem; }
.ins-est-check { display: flex; align-items: center; gap: .45rem; margin: .5rem 0; font-size: .85rem; }
.ins-est-check input { width: auto; }
.ins-est-money { margin-bottom: .6rem; }
.ins-est-owed, .ins-est-owed b { color: var(--ins-bad); }
.ins-est-office { padding: .45rem .7rem; border-radius: .45rem; background: #eef1f3; color: #3d4a53;
                  font-size: .8rem; font-weight: 600; margin-bottom: .6rem; }
.ins-est-hist { margin-top: .8rem; }
.ins-est-rev { padding: .45rem 0; border-bottom: 1px solid var(--ins-line); font-size: .82rem; }
.ins-est-rev ul { margin: .25rem 0 0; padding-left: 1.1rem; color: var(--ins-muted); }
.ins-est-rev li { overflow-wrap: break-word; }

/* ---------- tabs: one part of the inspection at a time ---------- */
.ins-head { margin-bottom: .5rem; }
.ins-bar { position: sticky; top: calc(var(--tb-h, 0px) + var(--ins-head-h, 0px)); z-index: 29;
           background: var(--bg-primary, #f8fafc); padding: .35rem 0 .4rem; margin-bottom: .6rem;
           box-shadow: 0 1px 0 var(--ins-line); }
.ins-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: .25rem;
            background: #e8eeeb; border-radius: .6rem; padding: .2rem; }
.ins-tab { min-width: 0; min-height: 2.4rem; padding: .3rem .35rem; border: 0; border-radius: .45rem;
           background: transparent; color: #3d4a53; font: inherit; font-size: .84rem; font-weight: 650;
           cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center;
           line-height: 1.15; }
.ins-tab:hover { color: var(--ins-accent); }
.ins-tab[aria-selected="true"] { background: var(--ins-card); color: var(--ins-accent);
                                 box-shadow: 0 1px 3px rgba(20,26,25,.12); }
.ins-tab small { display: block; font-size: .7rem; font-weight: 600; color: var(--ins-muted);
                 white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ins-tab small.ins-tab-bad { color: var(--ins-bad); }
.ins-tab small.ins-tab-due { color: var(--ins-warn); }
.ins-tab small.ins-tab-ok { color: var(--ins-ok); }
.ins-bar .ins-nav { margin-top: .35rem; padding-bottom: 0; }
.ins-panel > :first-child { margin-top: 0; }
.ins-panel .ins-est, .ins-panel .ins-confirm, .ins-panel .ins-gen { margin-top: 0; }
.ins-gen { margin-bottom: .7rem; }
/* The estimate's Save stays in reach while somebody works down the lines. */
.ins-est-savebar { position: sticky; bottom: 0; z-index: 5; background: var(--ins-card);
                   padding: .55rem 0; margin-bottom: 0; border-top: 1px solid var(--ins-line); }
.ins-top { position: fixed; right: 1rem; bottom: 4.6rem; z-index: 40; padding: .5rem .8rem;
           border: 1px solid var(--ins-accent); border-radius: 1.2rem; background: var(--ins-card);
           color: var(--ins-accent); font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer;
           box-shadow: 0 2px 8px rgba(20,26,25,.15); }
/* A finished section with nothing wrong folds to its heading. */
.ins-card-shut > :not(.ins-card-head) { display: none; }
.ins-card-head[data-fold] { cursor: pointer; }
.ins-card-head[data-fold] h3::after { content: " \25be"; color: var(--ins-muted); font-weight: 400; }
.ins-card-shut .ins-card-head[data-fold] h3::after { content: " \25b8"; }
.ins-card-shut .ins-card-head { margin-bottom: 0; }
.ins-fine { font-size: .78rem; color: var(--ins-ok); font-weight: 650; }
body.ins-detail-open .ins-title, body.ins-detail-open .ins-sub { display: none; }
@media (max-width: 34rem) {
  .ins-tab { font-size: .78rem; padding: .25rem .15rem; }
  .ins-top { right: .75rem; }
  /* Three to a row: the head is what stood between a phone and the tabs. */
  .ins-acts { grid-template-columns: 1fr 1fr 1fr; gap: .35rem; }
  .ins-acts .ins-btn { min-height: 2.2rem; padding: .3rem .35rem; font-size: .8rem; }
  .ins-meta { gap: .1rem .7rem; font-size: .8rem; }
  .ins-report-head { padding: .55rem .7rem; margin-bottom: .6rem; }
}

/* ---------- adding and removing lines on one inspection ---------- */
.ins-del { flex: 0 0 auto; padding: .3rem .6rem; border: 1px solid var(--ins-line);
           border-radius: .4rem; background: #fff; color: var(--ins-muted); font-size: 1.05rem;
           line-height: 1; cursor: pointer; }
.ins-del:hover { color: var(--ins-bad); border-color: #e6c4c0; background: var(--ins-bad-bg); }
.ins-item-custom .ins-label::after { content: " added"; color: var(--ins-accent); font-size: .72rem; font-weight: 700; }
.ins-lines { padding: .55rem .2rem .2rem; display: grid; gap: .45rem; }
.ins-gone { font-size: .8rem; color: var(--ins-muted); display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.ins-restore { border: 1px dashed #c2cec9; background: #fff; color: var(--ins-ink); border-radius: 1rem;
               padding: .2rem .6rem; font: inherit; font-size: .78rem; cursor: pointer; }
.ins-addline { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.ins-addline .ins-newline { flex: 1 1 12rem; min-width: 0; margin: 0; }
.ins-btn-sm { padding: .45rem .7rem; font-size: .82rem; }
@media (max-width: 34rem) {
  .ins-item { position: relative; }
  .ins-item .ins-label { padding-right: 2.4rem; }
  .ins-del { position: absolute; top: .35rem; right: .35rem; }
}

/* THE LIST (6.49.0). A table at desk width, a card per inspection on a phone;
   one set of markup, rearranged by the grid below. */
.il-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.il-head .ins-sub { margin-bottom: .9rem; }
body.ins-detail-open .il-new { display: none; }
.ins-start { margin-bottom: 1rem; }

.il-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .6rem; margin-bottom: .9rem; }
.il-card { background: var(--ins-card); border: 1px solid var(--ins-line); border-radius: .6rem;
  padding: .6rem .8rem; border-left: 4px solid var(--ins-line); }
.il-card span { display: block; color: var(--ins-muted); font-size: .78rem; }
.il-card b { font-size: 1.35rem; font-weight: 800; }
.il-card-all { border-left-color: var(--ins-accent); }
.il-card-draft { border-left-color: #d79a1e; }
.il-card-tenant { border-left-color: #2f6fb0; }
.il-card-done { border-left-color: var(--ins-ok); }
.il-card-gone { border-left-color: #9aa5a0; }

.il-dupbar { display: flex; gap: .75rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: var(--ins-warn-bg); color: var(--ins-warn); border: 1px solid #f0dcbc; border-radius: .6rem;
  padding: .55rem .8rem; margin-bottom: .8rem; font-size: .85rem; }

.il-tabs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .2rem; margin-bottom: .7rem; scrollbar-width: thin; }
.il-tab { flex: 0 0 auto; border: 1px solid var(--ins-line); background: var(--ins-card); color: var(--ins-ink);
  border-radius: 999px; padding: .4rem .8rem; font-size: .85rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.il-tab span { display: inline-block; min-width: 1.4rem; margin-left: .2rem; padding: 0 .35rem; border-radius: 999px;
  background: var(--ins-soft); color: var(--ins-accent); font-size: .75rem; text-align: center; }
.il-tab[aria-selected="true"] { background: var(--ins-accent); border-color: var(--ins-accent); color: #fff; }
.il-tab[aria-selected="true"] span { background: rgba(255, 255, 255, .22); color: #fff; }

.il-panel { position: relative; background: var(--ins-card); border: 1px solid var(--ins-line); border-radius: .7rem; padding: .8rem; }
.il-filters { display: grid; grid-template-columns: 2fr repeat(5, minmax(0, 1fr)) auto; gap: .5rem; align-items: end; margin-bottom: .7rem; }
.il-f span { display: block; font-size: .75rem; font-weight: 600; color: var(--ins-muted); margin-bottom: .2rem; }
.il-f input, .il-f select { width: 100%; min-height: 2.4rem; padding: .35rem .5rem; border: 1px solid #cfd8d4;
  border-radius: .45rem; background: #fff; color: var(--ins-ink); font: inherit; font-size: .88rem; }

.il-row { display: grid; align-items: center; gap: .6rem;
  grid-template-columns: 6.6rem 3.6rem minmax(8rem, 1.4fr) 5.4rem minmax(9rem, 1.3fr) 8.5rem 5.2rem 8rem;
  padding: .55rem .5rem; border-top: 1px solid var(--ins-line); font-size: .87rem; cursor: pointer; }
.il-row:hover { background: #f6faf7; }
.il-headrow { cursor: default; border-top: 0; background: #f3f6f4; border-radius: .4rem; font-size: .76rem;
  font-weight: 700; color: var(--ins-muted); text-transform: uppercase; letter-spacing: .02em; }
.il-headrow:hover { background: #f3f6f4; }
.il-c { min-width: 0; overflow-wrap: anywhere; }
.il-room b { color: var(--ins-accent); }
.il-tenant small, .il-status small { display: block; color: var(--ins-muted); font-size: .76rem; margin-top: .1rem; }
.il-dup { display: inline-block; margin-left: .35rem; padding: 0 .4rem; border-radius: .3rem; background: var(--ins-warn-bg);
  color: var(--ins-warn); font-size: .72rem; font-weight: 700; }
.il-t-gone { color: var(--ins-muted); }

.il-badge { display: inline-block; padding: .12rem .5rem; border-radius: .35rem; font-size: .76rem; font-weight: 700; }
.il-b-draft { background: #fdf3df; color: #8a5a00; }
.il-b-tenant { background: #e6f0fa; color: #1f5b96; }
.il-b-office { background: #f1e9fa; color: #6a3d99; }
.il-b-done { background: var(--ins-ok-bg); color: var(--ins-ok); }
.il-b-gone { background: #eef1f0; color: #5f6b76; }

.il-prog { display: flex; align-items: center; gap: .45rem; }
.il-prog-n { flex: 0 0 auto; font-variant-numeric: tabular-nums; font-size: .82rem; }
.il-bar { flex: 1 1 auto; height: .45rem; border-radius: 999px; background: #e7ece9; overflow: hidden; }
.il-bar i { display: block; height: 100%; border-radius: inherit; background: var(--ins-ok); }
.il-t-draft .il-bar i { background: #e0a526; }
.il-t-tenant .il-bar i { background: #3b82c4; }
.il-t-office .il-bar i { background: #8a5cc2; }
.il-t-gone .il-bar i { background: #a9b3ae; }

.il-issues { display: inline-block; padding: .1rem .45rem; border-radius: .35rem; background: #eef1f0;
  color: #5f6b76; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.il-issues-on { background: var(--ins-bad-bg); color: var(--ins-bad); }

.il-acts { display: flex; gap: .3rem; justify-content: flex-end; }
.il-go { min-height: 2.1rem; padding: .25rem .8rem; font-size: .84rem; }
.il-more { width: 2.1rem; min-height: 2.1rem; border: 1px solid var(--ins-line); border-radius: .45rem;
  background: #fff; color: var(--ins-ink); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.il-more:hover { background: var(--ins-soft); }

.il-menu { position: absolute; z-index: 30; min-width: 11rem; background: #fff; border: 1px solid #cfd8d4;
  border-radius: .55rem; box-shadow: 0 10px 24px rgba(20, 26, 25, .14); padding: .3rem; }
.il-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: .5rem .65rem;
  border-radius: .35rem; font: inherit; font-size: .87rem; color: var(--ins-ink); cursor: pointer; }
.il-menu button:hover, .il-menu button:focus-visible { background: var(--ins-soft); }
.il-menu .il-warn { color: var(--ins-bad); }

.il-empty { margin: 0; padding: 1.4rem .5rem; text-align: center; color: var(--ins-muted); }
.il-foot { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap;
  padding-top: .7rem; border-top: 1px solid var(--ins-line); margin-top: .2rem; font-size: .85rem; }
.il-size select { margin-left: .35rem; min-height: 2.1rem; border: 1px solid #cfd8d4; border-radius: .4rem; padding: .2rem .4rem; }
.il-pages { display: flex; gap: .3rem; align-items: center; flex-wrap: wrap; }
.il-pg { min-width: 2.1rem; min-height: 2.1rem; padding: .2rem .55rem; border: 1px solid var(--ins-line); border-radius: .4rem;
  background: #fff; color: var(--ins-ink); font: inherit; font-size: .85rem; cursor: pointer; }
.il-pg:disabled { opacity: .45; cursor: default; }
.il-pg[aria-current="page"] { background: var(--ins-accent); border-color: var(--ins-accent); color: #fff; font-weight: 700; }
.il-gap { padding: 0 .2rem; color: var(--ins-muted); }

@media (max-width: 64rem) {
  .il-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .il-f-q { grid-column: 1 / -1; }
  .il-row { grid-template-columns: 6rem 3.4rem minmax(7rem, 1.4fr) minmax(8rem, 1.3fr) 7.5rem 5rem 7.5rem; }
  .il-row .il-type, .il-headrow span:nth-child(4) { display: none; }
}

/* A phone: one card per inspection, the same cells rearranged. */
@media (max-width: 48rem) {
  .il-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .il-card:first-child { grid-column: 1 / -1; }
  .il-filters { grid-template-columns: 1fr 1fr; }
  .il-clear { grid-column: 1 / -1; }
  .il-panel { padding: .5rem; background: transparent; border: 0; }
  .il-headrow { display: none; }
  .il-row { grid-template-columns: 1fr auto; grid-template-areas:
      "room status" "tenant tenant" "meta meta" "prog find" "acts acts";
    gap: .35rem .6rem; background: var(--ins-card); border: 1px solid var(--ins-line); border-radius: .7rem;
    padding: .75rem; margin-bottom: .6rem; }
  .il-row:hover { background: var(--ins-card); }
  .il-room { grid-area: room; font-size: 1rem; }
  .il-room b::before { content: "Room "; }
  .il-status { grid-area: status; text-align: right; }
  .il-status small { max-width: 11rem; margin-left: auto; }
  .il-tenant { grid-area: tenant; }
  .il-date { grid-area: meta; color: var(--ins-muted); font-size: .8rem; }
  .il-row .il-type { display: none; }
  .il-prog { grid-area: prog; }
  .il-find { grid-area: find; }
  .il-acts { grid-area: acts; justify-content: stretch; }
  .il-go { flex: 1 1 auto; }
  .il-foot { justify-content: center; }
  .il-count { width: 100%; text-align: center; }
}

/* 6.49.0, after a look at both widths: the bell sits over the head's right
   corner, and on a phone the filters fold away and the counts are one strip. */
.il-head { padding-right: 3.6rem; }
.il-ftoggle { display: none; }
@media (max-width: 48rem) {
  .il-head { padding-right: 3rem; }
  .il-cards { display: flex; overflow-x: auto; gap: .45rem; scrollbar-width: none; }
  .il-card { flex: 0 0 auto; padding: .4rem .65rem; border-left-width: 3px; }
  .il-card:first-child { grid-column: auto; }
  .il-card span { font-size: .7rem; }
  .il-card b { font-size: 1.05rem; }
  .il-ftoggle { display: block; grid-column: 1 / -1; }
  .il-filters .il-f:not(.il-f-q), .il-filters .il-clear { display: none; }
  .il-filters.il-filters-open .il-f, .il-filters.il-filters-open .il-clear { display: block; }
}
#inspList { position: relative; }   /* the row menu is placed against it */

/* THE TENANT'S INSPECTIONS (6.50.0). A list beside the open inspection on a
   wide screen; on a phone the list, then the inspection with a Back button. */
.ti .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ti-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin-bottom: .9rem; }
.ti-card { background: var(--ins-card); border: 1px solid var(--ins-line); border-left: 4px solid var(--ins-accent);
  border-radius: .6rem; padding: .55rem .75rem; }
.ti-card span { display: block; color: var(--ins-muted); font-size: .76rem; }
.ti-card b { font-size: 1.3rem; font-weight: 800; }
.ti-card-done { border-left-color: var(--ins-ok); }
.ti-card-act { border-left-color: #d79a1e; }
.ti-card-bad { border-left-color: var(--ins-bad); }

.ti-wrap { display: grid; grid-template-columns: minmax(17rem, 22rem) minmax(0, 1fr); gap: 1rem; align-items: start; }
.ti-listcol { background: var(--ins-card); border: 1px solid var(--ins-line); border-radius: .7rem; padding: .7rem; }
.ti-tools { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; margin-bottom: .6rem; }
.ti-q { grid-column: 1 / -1; }
.ti-tools input, .ti-tools select { width: 100%; min-height: 2.4rem; padding: .35rem .55rem; border: 1px solid #cfd8d4;
  border-radius: .45rem; background: #fff; color: var(--ins-ink); font: inherit; font-size: .88rem; }
.ti-tools .ins-btn { grid-column: 1 / -1; }
.ti-row { position: relative; }
.ti-row-on { border-color: var(--ins-accent); box-shadow: 0 0 0 1px var(--ins-accent) inset; background: var(--ins-soft); }
.ti-row-type { display: block; font-size: .86rem; margin-top: .1rem; }
.ti-bad { color: var(--ins-bad); font-weight: 600; }
.ti-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap;
  margin-top: .6rem; font-size: .82rem; color: var(--ins-muted); }
.ti-size select { min-height: 2rem; border: 1px solid #cfd8d4; border-radius: .4rem; margin-left: .25rem; }
.ti-pages { display: flex; gap: .25rem; }
.ti-pg { min-width: 2rem; min-height: 2rem; border: 1px solid var(--ins-line); border-radius: .4rem; background: #fff;
  color: var(--ins-ink); font: inherit; cursor: pointer; }
.ti-pg:disabled { opacity: .45; cursor: default; }
.ti-pg[aria-current="page"] { background: var(--ins-accent); border-color: var(--ins-accent); color: #fff; font-weight: 700; }

.ti-state { padding: 1.2rem .6rem; text-align: center; color: var(--ins-muted); font-size: .9rem; }
.ti-state b, .ti-state span { display: block; margin-bottom: .4rem; }
.ti-state-bad { color: var(--ins-bad); }
.ti-spin { display: inline-block; width: 1rem; height: 1rem; margin-right: .45rem; vertical-align: -.15rem;
  border: 2px solid var(--ins-line); border-top-color: var(--ins-accent); border-radius: 50%; animation: ti-spin .8s linear infinite; }
@keyframes ti-spin { to { transform: rotate(360deg); } }

.ti-detail { min-width: 0; }
.ti-pick { display: grid; place-items: center; min-height: 12rem; border: 1px dashed #cfd8d4; border-radius: .7rem;
  color: var(--ins-muted); }
.ti-showing .ti-pick { display: none; }
.ti-back { display: none; }
.ti-tabs { display: flex; gap: .25rem; overflow-x: auto; border-bottom: 1px solid var(--ins-line); margin: .2rem 0 .8rem;
  scrollbar-width: none; }
.ti-tab { flex: 0 0 auto; border: 0; border-bottom: 3px solid transparent; background: none; padding: .55rem .7rem;
  font: inherit; font-size: .88rem; font-weight: 600; color: var(--ins-muted); cursor: pointer; white-space: nowrap; }
.ti-tab span { display: inline-block; margin-left: .2rem; padding: 0 .35rem; border-radius: 999px; background: #eef1f0;
  font-size: .72rem; color: var(--ins-ink); }
.ti-tab[aria-selected="true"] { color: var(--ins-accent); border-bottom-color: var(--ins-accent); }

.ti-box { background: var(--ins-card); border: 1px solid var(--ins-line); border-radius: .65rem; padding: .75rem .85rem;
  margin-bottom: .75rem; }
.ti-box h3 { margin: 0 0 .45rem; font-size: .95rem; }
.ti-box p { margin: 0 0 .5rem; font-size: .88rem; line-height: 1.5; }
.ti-box ul { margin: 0 0 .6rem; padding-left: 1.1rem; font-size: .88rem; }
.ti-box li { margin: .2rem 0; }
.ti-act { border-color: #f0dcbc; background: var(--ins-warn-bg); }
.ti-issues { border-color: #efc9c4; background: var(--ins-bad-bg); }
.ti-good { border-color: #cfe5d8; background: var(--ins-ok-bg); }
.ti-two { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.ti-two .ti-box { margin-bottom: .75rem; }
.ti-btns { display: flex; gap: .4rem; flex-wrap: wrap; }
.ti a.ins-btn { display: inline-flex; align-items: center; text-decoration: none; color: var(--ins-ink); }
.ti-kv { display: flex; justify-content: space-between; gap: .6rem; padding: .3rem 0; border-top: 1px solid var(--ins-line);
  font-size: .87rem; }
.ti-kv:first-of-type { border-top: 0; }
.ti-kv span { color: var(--ins-muted); }
.ti-small { margin: .45rem 0 .5rem; font-size: .8rem; color: var(--ins-muted); }
.ti-tag { margin-left: .35rem; padding: .1rem .45rem; border-radius: .35rem; font-size: .72rem; vertical-align: .1rem; }
.ti-tag-prop { background: var(--ins-warn-bg); color: var(--ins-warn); }
.ti-tag-final { background: var(--ins-ok-bg); color: var(--ins-ok); }

.ti-h { margin: .9rem 0 .45rem; font-size: .92rem; }
.ti-sec { margin-bottom: .45rem; }
.ti-sec > summary { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ti-sec-t { font-weight: 700; }
.ti-chips { display: inline-flex; gap: .25rem; flex-wrap: wrap; }
.ti-chip { display: inline-block; padding: .05rem .4rem; border-radius: .3rem; background: #eef1f0; color: var(--ins-muted);
  font-size: .72rem; font-weight: 700; }
.ti-chip-ok { background: var(--ins-ok-bg); color: var(--ins-ok); }
.ti-chip-warn { background: var(--ins-warn-bg); color: var(--ins-warn); }
.ti-chip-bad { background: var(--ins-bad-bg); color: var(--ins-bad); }

.ti-hint { margin: 0 0 .5rem; font-size: .82rem; color: var(--ins-muted); }
.ti-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .55rem; }
.ti-ph { display: flex; flex-direction: column; padding: 0; border: 1px solid var(--ins-line); border-radius: .55rem;
  background: #fff; overflow: hidden; cursor: zoom-in; text-align: left; font: inherit; }
.ti-ph img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #e7ece9; }
.ti-ph span { padding: .35rem .5rem; font-size: .76rem; color: var(--ins-ink); }
.ti-ph-bad img { opacity: .3; }
.ti-empty { margin: .4rem 0; color: var(--ins-muted); font-size: .9rem; }

.ti-time { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid var(--ins-line); }
.ti-time li { position: relative; margin: 0 0 .8rem; padding-left: .4rem; }
.ti-time li::before { content: ""; position: absolute; left: -1.38rem; top: .3rem; width: .65rem; height: .65rem;
  border-radius: 50%; background: var(--ins-accent); border: 2px solid #fff; }
.ti-time b { display: block; font-size: .88rem; font-weight: 600; }
.ti-time span { font-size: .78rem; color: var(--ins-muted); }

@media (max-width: 64rem) {
  .ti-wrap { grid-template-columns: 1fr; }
  .ti-pick { display: none; }
  .ti-showing .ti-listcol, body.ti-open .ti-cards { display: none; }
  .ti-back { display: inline-flex; }
}
@media (max-width: 40rem) {
  .ti-cards { grid-template-columns: 1fr 1fr; }
  .ti-two { grid-template-columns: 1fr; }
  .ti-btns .ins-btn { flex: 1 1 100%; justify-content: center; }
}

/* The tenant shell styles every button as a full-width green one; these are not. */
.ti .ti-tab { width: auto; padding: .55rem .7rem; border-radius: 0; background: none; color: var(--ins-muted); font-weight: 600; }
.ti .ti-tab[aria-selected="true"] { color: var(--ins-accent); }
.ti .ti-pg { width: auto; padding: .2rem .5rem; border-radius: .4rem; background: #fff; color: var(--ins-ink); font-weight: 600; }
.ti .ti-pg[aria-current="page"] { background: var(--ins-accent); color: #fff; }
.ti .ti-ph { width: auto; padding: 0; border-radius: .55rem; background: #fff; color: var(--ins-ink); font-weight: 400; }
.ti .ti-row { color: var(--ins-ink); }
.ti .ti-sec > summary { justify-content: flex-start; list-style: none; text-align: left; }
.ti .ti-sec > summary::-webkit-details-marker { display: none; }
.ti .ti-sec-t { flex: 1 1 auto; color: var(--ins-ink); }

/* The estimate as it is read (6.51.0): light cards, one per question, so the
   repair cost, what comes off the deposit and what is left never blur together. */
.ins-est-sec { margin: .7rem 0; padding: .65rem .8rem; border: 1px solid var(--ins-line); border-radius: .6rem; }
.ins-est-sec h4 { margin-top: 0; }
.ins-est-sec-cond { background: #f6f8f7; }
.ins-est-sec-rep { background: #f3f7fc; border-color: #d5e3f2; }
.ins-est-sec-rep h4 { color: #1f4f80; }
.ins-est-sec-rep .ins-est-lines, .ins-est-sec-rep .ins-est-item { border-color: #dbe6f2; }
.ins-est-sec-rep .ins-est-total { border-bottom-color: #2f6fb0; }
.ins-est-sec-dep { background: #f1f8f3; border-color: #cfe5d8; }
.ins-est-sec-dep h4 { color: #1c6741; }
.ins-est-sec-dep .ins-est-line { border-color: #d9eadf; }
.ins-est-r-deduct, .ins-est-r-deduct b { color: #7a4a00; }
.ins-est-r-arrears, .ins-est-r-arrears b { color: #a01b10; }
.ins-est-r-left { margin-top: .45rem; padding: .5rem .65rem; border: 1.5px solid #1c6741; border-radius: .5rem;
  background: #fff; color: #1c6741; }
.ins-est-r-left b { color: #1c6741; }
.ins-est-r-left.ins-est-owed { border-color: #a81f14; background: #fff2f1; }
.ins-est-r-left.ins-est-owed, .ins-est-r-left.ins-est-owed b { color: #a81f14; }
.ti .ti-charges { background: #f1f8f3; border-color: #cfe5d8; }

/* Dark mode on the office pages darkens the page but not the cards (see
   css/admin-nav.css), so only text drawn straight on the page needs lifting. */
@media (prefers-color-scheme: dark) {
  body.has-admin-nav .il-head h1 { color: #eef3f0; }
  body.has-admin-nav .il-head .ins-sub { color: #c9d4ce; }
}
@media (max-width: 48rem) and (prefers-color-scheme: dark) {
  body.has-admin-nav .il-f span, body.has-admin-nav .il-foot, body.has-admin-nav .il-size { color: #c9d4ce; }
}
/* A thumb, not a cursor: 44px targets wherever the pointer is a finger. */
@media (pointer: coarse) {
  .ins-btn, .il-go, .il-more, .il-pg, .ti-pg { min-height: 2.75rem; min-width: 2.75rem; }
}

/* Building health (6.52.0). Its third condition is Urgent, which had no colour
   of its own, so a chosen Urgent was white on white. Three conditions, three columns. */
.ins-seg .c-urgent    { border-color: #e8a59d; background: #fff2f1; color: #a01b10; }
.ins-seg .on.c-urgent { color: #fff; border-color: transparent; background: #a81f14; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #a81f14; }
.ins-seg.ins-seg-3 { grid-template-columns: repeat(3, 5.7rem); }
@media (max-width: 34rem) {
  .ins-seg.ins-seg-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
#bhList { position: relative; }
.il-card-urgent { border-left-color: var(--ins-bad); }
.il-issues-warn { background: var(--ins-warn-bg); color: var(--ins-warn); }
.il-bh .il-filters { grid-template-columns: 2fr repeat(3, minmax(0, 1fr)) auto; }
.il-bh .il-row { grid-template-columns: 6.6rem minmax(9rem, 1.3fr) minmax(10rem, 1.4fr) 8.5rem minmax(7rem, 1fr) 8rem; }
@media (max-width: 64rem) {
  .il-bh .il-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .il-bh .il-row { grid-template-columns: 6rem minmax(8rem, 1.2fr) minmax(9rem, 1.3fr) 7.5rem minmax(6rem, 1fr) 7.5rem; }
}
@media (max-width: 48rem) {
  .il-bh .il-filters { grid-template-columns: 1fr 1fr; }
  .il-bh .il-row { grid-template-columns: 1fr auto; grid-template-areas: "date status" "tenant tenant" "prog find" "acts acts"; }
  .il-bh .il-date { grid-area: date; color: var(--ins-ink); font-size: 1rem; font-weight: 700; }
}

/* Tenant repairs (6.53.0): the tenant list styles, a repair per card. */
.ti .ti-act { width: auto; padding: .35rem .8rem; border-radius: .45rem; background: #fff; color: var(--ins-ink);
  border: 1px solid #cfd8d4; font-weight: 600; font-size: .85rem; }
.ti .tr-tools { grid-template-columns: 1fr auto; }
.ti .tr-tools .ins-btn { grid-column: auto; }
.ti .tr-row { display: block; padding: .7rem .8rem; margin-bottom: .5rem; cursor: default; color: var(--ins-ink); }
.ti .tr-row .ti-act { margin-top: .45rem; }
.ti .tr-desc { display: block; margin-top: .3rem; font-size: .86rem; line-height: 1.45; white-space: pre-wrap; }
.ti .tr-fixed { display: block; margin-top: .35rem; padding: .35rem .55rem; border-radius: .4rem; background: var(--ins-ok-bg);
  color: #14401f; font-size: .85rem; }
.ti .tr-draft { border-left: 4px solid #d79a1e; }
.ti .tr-tenant { border-left: 4px solid #3b82c4; }
.ti .tr-done.ins-row, .ti .tr-row.tr-done { border-left: 4px solid var(--ins-ok); }
.ti .tr-gone { border-left: 4px solid #a9b3ae; opacity: .85; }
.ti .il-badge { white-space: nowrap; }
@media (max-width: 40rem) {
  .ti .tr-tools { grid-template-columns: 1fr; }
}

/* Tenant lease (6.54.0): the current lease leads, with what to do next. */
.ti .tl-lease { border: 1px solid var(--ins-line); border-left: 4px solid #a9b3ae; border-radius: .6rem; padding: .8rem .9rem;
  margin-bottom: .7rem; background: var(--ins-card); color: var(--ins-ink); }
.ti .tl-current { border-color: #cfe5d8; box-shadow: 0 1px 0 rgba(0, 0, 0, .02); }
.ti .tl-draft { border-left-color: #d79a1e; }
.ti .tl-tenant { border-left-color: #3b82c4; }
.ti .tl-done { border-left-color: var(--ins-ok); }
.ti .tl-head { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; align-items: baseline; }
.ti .tl-say { margin: .45rem 0 .2rem; font-size: .88rem; color: var(--ins-ink); }
.ti .tl-prog { margin: .5rem 0 .3rem; }
.ti .tl-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .35rem .8rem; margin-top: .55rem; font-size: .85rem; }
.ti .tl-kv b { display: block; font-size: .72rem; font-weight: 600; color: var(--ins-muted); text-transform: uppercase; letter-spacing: .02em; }
.ti .tl-acts { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: .7rem; }
.ti .ti-act.tl-go { background: var(--ins-accent); border-color: var(--ins-accent); color: #fff; }
.ti .tl-tools { grid-template-columns: minmax(0, 16rem); }
