/* ==========================================================================
   The Lovable look (core.themes): the client's prototype, on our pages.
   Loaded alone by the theme's own layouts, whose root element carries the
   class lv: nothing of ours (tokens.css, base.css) is under it. Values are
   the prototype's own (its index.css and tailwind.config.ts, 16 Nov copy,
   see /styleguide-ll/).
   No HTML tags in comments: ZAP's SRI rule parses them out of served CSS.
   ========================================================================== */

@font-face { font-family: 'Inter'; src: url("fonts/Inter-300.b89ffb9519e3.woff2") format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url("fonts/Inter-400.f837d382a885.woff2") format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url("fonts/Inter-500.42b95430773b.woff2") format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url("fonts/Inter-600.75fb76ec3559.woff2") format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

/* ---- Tokens ---- */
:root.lv {
  --lv-font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --lv-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --lv-green-950: #002E1A;
  --lv-green-900: #003D22;
  --lv-green-700: #0B5233;
  --lv-green-tint: rgba(11, 82, 51, 0.08);
  --lv-gold-500: #DB9048;
  --lv-gold-600: #B8862F;
  --lv-gold-100: #F6EFE1;
  --lv-gold-50: #FBF8F2;
  --lv-ink: #111111;
  --lv-ink-55: rgba(17, 17, 17, 0.55);
  --lv-ink-muted: #707070;            /* labels in menus and the side nav */
  --lv-keyline: rgba(17, 17, 17, 0.08);
  --lv-line-card: #EFE6D4;
  --lv-line-input: #E5D5B3;
  --lv-plum: #8B3A62;
  --lv-violet: #5E4B8B;
  --lv-line-hero: #E9D9B8;
  --lv-cream: hsl(43 30% 90%);       /* sidebar-foreground */
  --lv-sidebar: #00331C;             /* the side nav (sidebar-background) */
  --lv-sidebar-accent: #084529;      /* the side nav's current page (sidebar-accent) */
  --lv-sidebar-primary: #C9A05E;     /* the side nav's gold: current page, group labels (sidebar-primary) */
  --lv-background: #F6F7F8;           /* the prototype's background: the focus ring's gap, a card's grey head */
  --lv-sidebar-border: #0E3926;       /* the side nav's dividers (sidebar-border) */
  --lv-scrim: rgba(0, 0, 0, 0.4);     /* behind every drawer, sheet and popover */
  /* The band runs corner to corner over its one box, page top to curve foot (owner-hero.tsx: 0,0 to 1,1). */
  --lv-band: linear-gradient(to bottom right, var(--lv-green-700), var(--lv-green-950));
  --lv-menu: linear-gradient(180deg, #0B5233 0%, #063D25 100%);
  --lv-head: #F7F5F0;                 /* a table's or row list's head */
  --lv-attention: #8A5D14;            /* attention ink: the attention pill, a figure not worked out */
  --lv-amber: #AB8117;                /* a count, on the same amber at 10% (compliance-amber) */
  --lv-gold-ink: #6B4E16;             /* a tile's icon on gold-100 (calm-icon) */
  --lv-attention-fill: rgba(214, 157, 69, 0.16);
  --lv-gold-line: #E5C98F;            /* the edge of a gold notice */
  --lv-red: #D33131;                  /* the danger button, a field's error (the prototype's destructive) */
  --lv-red-ink: #791F1F;
  --lv-red-fill: #FCEBEB;
  --lv-red-line: #F1C9C9;
  --lv-line-field: rgba(17, 17, 17, 0.15);
  --lv-shadow-card: 0 8px 24px -4px rgba(107, 78, 22, 0.08), 0 1px 2px rgba(107, 78, 22, 0.04);
  --lv-shadow-pop: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --lv-shadow-overlay: 0 24px 60px -8px rgba(0, 15, 8, 0.28);
  --lv-shadow-lift: 0 14px 32px -6px rgba(107, 78, 22, 0.16), 0 2px 4px rgba(107, 78, 22, 0.06);   /* a card that is a link, under the pointer */
  /* Colour fades: the prototype's transition-colors. A press, a pop and a drawer keep their own. */
  --lv-duration: 150ms;
  --lv-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --lv-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --lv-ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);   /* a drawer or a sheet sliding in */
  --lv-stagger: 40ms;                  /* between cards arriving one after another */
  --lv-curve: 64px;                    /* how far the green curves up under the page */
  --lv-overlap: 60px;                  /* how far a first card sits on the green */
  --lv-gutter: 48px;
  --lv-page-gap: 32px;                 /* between a page's blocks (OwnerHome space-y-8, space-y-6 under 768px) */
  /* The prototype's curve (owner-hero.tsx curvePath): straight sides, the
     bottom edge one quadratic arc rising by the curve depth at its middle. */
  --lv-curve-mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--lv-curve) + 1px) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M0 0H100V10Q50 -10 0 10Z'/%3E%3C/svg%3E") bottom / 100% var(--lv-curve) no-repeat;
}
@media (max-width: 1279px) { :root.lv { --lv-gutter: 32px; } }
@media (max-width: 1199px) { :root.lv { --lv-curve: 48px; } }
@media (max-width: 833px) { :root.lv { --lv-curve: 30px; --lv-gutter: 16px; } }
@media (max-width: 767px) { :root.lv { --lv-page-gap: 24px; } }

/* ---- The page before any class: box sizing, the face, headings at
   rest, links, and one focus ring for every control ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 50% 30%, #F0F2F3 0%, #F2F3F4 55%, #F5F6F7 100%) fixed, #F2F3F4;
  color: var(--lv-ink);
  font-family: var(--lv-font);
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6 { margin: 0 0 16px; color: var(--lv-ink); font-family: var(--lv-font); font-weight: 600; line-height: 1.3; text-wrap: balance; }
h1 { font-size: 28px; }
h2 { font-size: 20px; }
h3, h4 { font-size: 15px; }
.lv h1 { font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
b, strong { font-weight: 600; }
p { margin: 0 0 16px; }
code, kbd, samp { font-family: var(--lv-mono); font-size: 0.85em; }
a {
  color: var(--lv-green-700);
  text-decoration: underline;
  text-decoration-color: rgba(11, 82, 51, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color var(--lv-duration) var(--lv-ease);
}
@media (hover: hover) and (pointer: fine) { a:hover:not(.lv-btn) { text-decoration-color: currentColor; } }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  /* Transparent, not none: forced colours drop the shadow and paint the outline. */
  outline: 2px solid transparent;
  box-shadow: 0 0 0 2px var(--lv-background), 0 0 0 4px var(--lv-green-700);
}
form :is(input, button) { font: inherit; }
/* Figures line up: tabular numbers on every piece that shows money, a count, a date or a time,
   not on the body, where Inter's tabular set widens the hyphen in emails and file names. */
:is(.lv-num, .lv-count, .lv-pages span, .lv-row-value, .lv-rows-head span, .lv-tax-figures dd, .lv-tax-hint, .lv-step-a, .lv-step-facts dd,
  .lv-timeline-when, .lv-rule, .lv-field .lv-unit > input, .lv-hero-figure, .lv-key b, .lv-card-big, .lv-clock-date, .lv-range-scale,
  .lv-changes time, .lv-card-line, .lv-section-head > .lv-quiet, .lv-record-part > .lv-quiet, .lv-figure, .lv-sum dd, .lv-date,
  .lv-sort-meta, .lv-sort-val .ts-val-text, .lv-sort-pop .lv-field input, .lv-about-form .lv-about-summary,
  .lv-firm-date, .lv-firm-assign-count,
  .lv-upl-files .upload-file-size, .lv-upl-year-head h3, .lv-upl-count,
  .lv-doc-date,
  .lv-doc-bar-value, .lv-gifts-table .lv-group :is(th, td),
  :is(.lv-rules-item, .lv-rules-related > li) > .lv-name, .lv-rules-pager .lv-btn, .lv-rules-figure,
  .lv-rules-value-amount, .lv-rules-toc b) { font-variant-numeric: tabular-nums; }
main { max-width: 68rem; margin: 0 auto; padding: 24px 16px; }
.icon { display: block; flex: none; }
.lv .icon { width: 16px; height: 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); border: 0; white-space: nowrap; }
/* Under 768px a form's box takes a 44px press (a tick box's row: lv-check). */
@media (max-width: 767px) { :where(.lv) :is(.input, select.select) { min-height: 44px; } }

/* The brand mark: a shield in a ring. */
.lv-mark { display: inline-grid; flex: none; place-items: center; width: 32px; height: 32px; border: 1px solid var(--lv-line-card); border-radius: 9999px; color: var(--lv-green-700); }
.lv-mark .icon { width: 16px; height: 16px; }

/* ==========================================================================
   An estate's pages: the green header (brand, then the grouped menu), and
   the green running on behind the page title, curving up under the first
   card. The band hangs off the page's own .lv-page-head (a child of main,
   or of main's one wrapper; not one shown inside the page, as on the
   styleguide); a page without one gets the curve under the menu.
   ========================================================================== */
.lv-owner { position: relative; isolation: isolate; min-height: 100dvh; overflow-x: clip; }

/* A beneficiary with no organization (_receiver_header.html): the same shell in the prototype's
   receiver purple (BEN-STYLE-2: the same tokens, purple values). The band is set on :root from the
   greens, so it is set again here; so are a link's underline, the edge of a success message and an info notice,
   and an info notice's fill. */
.lv-receiver {
  --lv-green-950: #22123A;
  --lv-green-900: #351548;
  --lv-green-700: #4A2C6B;
  --lv-green-tint: rgba(74, 44, 107, 0.08);
  --lv-band: linear-gradient(to bottom right, var(--lv-green-700), var(--lv-green-950));
}
.lv-receiver a { text-decoration-color: rgba(74, 44, 107, 0.35); }
.lv-receiver :is(.lv-message-success, .lv-notice-info) { border-color: rgba(74, 44, 107, 0.18); }
.lv-receiver .lv-notice-info { background-color: rgba(74, 44, 107, 0.06); }

.lv-header { position: relative; z-index: 30; color: #fff; }
.lv-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--lv-band); }
.lv-owner:has(:is(main > .lv-page-head, main > :only-child > .lv-page-head)) .lv-header::before { content: none; }
.lv-owner:not(:has(:is(main > .lv-page-head, main > :only-child > .lv-page-head))) .lv-header { padding-bottom: var(--lv-curve); }
.lv-owner:not(:has(:is(main > .lv-page-head, main > :only-child > .lv-page-head))) .lv-header::before {
  -webkit-mask: var(--lv-curve-mask);
  mask: var(--lv-curve-mask);
}

.lv-viewing { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 6px 24px; box-sizing: border-box; border-bottom: 1px solid rgba(255, 255, 255, 0.15); background-color: var(--lv-green-700); }
.lv-viewing p { display: flex; align-items: center; gap: 10px; min-width: 0; margin: 0; font-size: 14px; font-weight: 600; }
.lv-viewing p > span { min-width: 0; overflow-wrap: anywhere; }
.lv-viewing p > .icon { flex: none; opacity: 0.8; }
.lv-viewing form { flex: none; margin: 0; }
.lv-exit { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 16px; border: 0; border-radius: 9999px; background-color: #fff; color: var(--lv-green-700); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: background-color var(--lv-duration) var(--lv-ease); }
@media (hover: hover) and (pointer: fine) { .lv-exit:hover { background-color: var(--lv-gold-100); } }
.lv-exit .icon { width: 14px; height: 14px; }

.lv-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; padding: 0 var(--lv-gutter); border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
.lv-brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; }
:is(.lv-header, .lv-entry-band) .lv-mark { border-color: rgba(255, 255, 255, 0.15); color: #fff; }
.lv-bar-end { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lv-org { display: grid; min-width: 0; margin: 0; padding-right: 16px; border-right: 1px solid rgba(255, 255, 255, 0.15); line-height: 1.25; text-align: right; }
:is(.lv-org, .lv-nav-org) span { color: rgba(255, 255, 255, 0.7); font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.lv-org b { overflow: hidden; font-size: 14px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
details.lv-org { padding-right: 0; border-right: 0; }
details.lv-org > summary { display: grid; padding: 4px 16px 4px 8px; border-right: 1px solid rgba(255, 255, 255, 0.15); list-style: none; cursor: pointer; }
.lv-icon { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 14px; background: none; color: rgba(255, 255, 255, 0.8); list-style: none; cursor: pointer; }
.lv-icon .icon { width: 20px; height: 20px; }
.lv-header summary::-webkit-details-marker { display: none; }
@media (hover: hover) and (pointer: fine) { .lv-icon:hover, details.lv-org > summary:hover { background-color: rgba(255, 255, 255, 0.1); color: #fff; } }
.lv-nav-open { display: none; }

/* The menus off the header: the account menu and organization switcher
   are white cards, opening down and to the right. */
.lv-menu { position: relative; }

/* The white menu: the organization switcher (lv-switcher), the account menu (lv-me-menu-list) and
   To sort's popover (lv-sort-pop, placed by its script), a white card; each item a 14px line, gold-100
   under the pointer and pressed. The two menus pop from their corner. */
:is(.lv-switcher, .lv-me-menu-list, .lv-sort-pop) { padding: 4px; border: 1px solid var(--lv-line-card); border-radius: 14px; background-color: #fff; box-shadow: var(--lv-shadow-pop); color: var(--lv-ink); text-align: left; }
:is(.lv-switcher, .lv-me-menu-list) { position: absolute; z-index: 40; animation: lv-pop-in 160ms var(--lv-ease-out); }
:is(.lv-switcher, .lv-me-menu-list) :is(a, button), .lv-sort-pop .ts-opt { display: block; width: 100%; padding: 6px 8px; border: 0; border-radius: 12px; background: none; color: var(--lv-ink); font: inherit; font-size: 14px; text-align: left; text-decoration: none; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { :is(.lv-switcher, .lv-me-menu-list) :is(a, button):hover, .lv-sort-pop .ts-opt:hover { background-color: var(--lv-gold-100); } }
@media (max-width: 767px) { :is(.lv-switcher, .lv-me-menu-list) :is(a, button), .lv-sort-pop .ts-opt { display: flex; align-items: center; min-height: 44px; } }

/* The organization switcher: under the organization, in the header, the side nav and the top bar. */
.lv-switcher { min-width: 248px; max-width: calc(100vw - 32px); line-height: 1.5; }
.lv-org > .lv-switcher { top: calc(100% + 8px); right: 0; transform-origin: top right; }
.lv-org-switcher > .lv-switcher { top: calc(100% - 4px); right: 0; left: 0; min-width: 0; transform-origin: top center; }
.lv-plain .lv-org-switcher > .lv-switcher { right: auto; min-width: 248px; transform-origin: top left; }
@media (max-width: 833px) { .lv-plain .lv-org-switcher > .lv-switcher { right: 0; left: auto; transform-origin: top right; } }
.lv-switcher form { margin: 0; }
.lv-switcher-label { margin: 4px 8px; color: var(--lv-ink-muted); font-size: 13px; font-weight: 500; }
.lv-switcher-clients { max-height: min(22.5rem, 50vh); overflow-y: auto; }
/* The clients scroll, so their box clips: a client's ring is drawn inside it. */
.lv-switcher-clients button:focus-visible { box-shadow: inset 0 0 0 2px var(--lv-green-700); }
.lv-switcher-clients + form { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--lv-line-card); }
.lv-switcher a.lv-switcher-all { margin-top: 4px; border-top: 1px solid var(--lv-line-card); border-radius: 0 0 12px 12px; color: var(--lv-ink-55); }
.lv-switcher :is(button, a):active, .lv-sort-pop .ts-opt:active { background-color: var(--lv-gold-100); }
@keyframes lv-pop-in { from { opacity: 0; transform: scale(0.97); } }

/* The grouped menu: Home, then a group per word. */
.lv-nav {
  position: static;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: auto;
  height: 48px;
  margin: 0;
  padding: 0 var(--lv-gutter);
  overflow: visible;
  border: 0;
  background: none;
  color: inherit;
}
.lv-nav-list { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.lv-nav-list > li > a, .lv-nav-group > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  text-decoration: none;
  list-style: none;
  cursor: pointer;
  white-space: nowrap;
}
.lv-nav-list > li:not(.lv-home) > a .icon { display: none; }
.lv-nav-group > summary .icon { width: 16px; height: 16px; transition: transform 150ms ease-out; }
.lv-nav-group[open] > summary .icon { transform: rotate(180deg); }
.lv-nav-group[open] > summary { background-color: rgba(255, 255, 255, 0.1); color: #fff; }
.lv-nav-list > li > a[aria-current], .lv-nav-group:has([aria-current]) > summary { border-color: rgba(255, 255, 255, 0.3); background-color: rgba(255, 255, 255, 0.12); color: #fff; font-weight: 500; }
@media (hover: hover) and (pointer: fine) { .lv-nav-list > li > a:hover, .lv-nav-group > summary:hover { color: #fff; } }
.lv-nav-group > .lv-menu-list {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 40;
  display: grid;
  gap: 2px;
  min-width: 300px;
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0 0 14px 14px;
  background: var(--lv-menu);
  box-shadow: var(--lv-shadow-overlay);
  list-style: none;
}
.lv-menu-list a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px; border-radius: 16px; color: #fff; font-size: 14px; font-weight: 500; text-decoration: none; }
.lv-menu-list a .icon { box-sizing: content-box; width: 16px; height: 16px; padding: 8px; border-radius: 14px; background-color: rgba(255, 255, 255, 0.1); }
/* An item's second line (the prototype's NAV_DESCRIPTIONS): nav_link's note. */
.lv-menu-list a small { display: block; color: rgba(255, 255, 255, 0.65); font-size: 12px; font-weight: 400; line-height: 18px; white-space: nowrap; }
.lv-menu-list a[aria-current] { background-color: rgba(255, 255, 255, 0.12); }
@media (hover: hover) and (pointer: fine) { .lv-menu-list a:hover { background-color: rgba(255, 255, 255, 0.1); } }

/* The page title sits white on the green; the green runs from the page
   top, behind the header, to just past the title, then curves. A first
   card overlaps the green; anything else starts below it. The band is one
   box, from the shell's top to the head's foot and on by --lv-band-foot,
   so its gradient runs corner to corner over the whole band: the head is
   the anchor its ::before ends at, and the shell is that box's containing block. */
.lv-owner :is(main > .lv-page-head, main > :only-child > .lv-page-head) { --lv-band-foot: calc(8px + var(--lv-curve)); margin-bottom: 24px; color: #fff; anchor-name: --lv-page-head; }
.lv-owner :is(main > .lv-page-head, main > :only-child > .lv-page-head)::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  bottom: calc(anchor(--lv-page-head bottom) - var(--lv-band-foot));
  left: 0;
  background: var(--lv-band);
  -webkit-mask: var(--lv-curve-mask);
  mask: var(--lv-curve-mask);
}
/* A browser without anchor positioning hangs the same green off the head, from far above the page top. */
@supports not (anchor-name: --lv-page-head) {
  .lv-owner :is(main > .lv-page-head, main > :only-child > .lv-page-head) { position: relative; }
  .lv-owner :is(main > .lv-page-head, main > :only-child > .lv-page-head)::before { top: -100rem; right: auto; bottom: calc(-1 * var(--lv-band-foot)); left: 50%; width: 100vw; translate: -50% 0; }
}
/* With no card on the curve the first block sits 24px under the green's foot (header-slots: 24px, the curve, 8px). */
.lv-owner :is(main > .lv-page-head, main > :only-child > .lv-page-head):not(:has(+ :is(.lv-card, .lv-cards, .lv-clock, .lv-loads))) { margin-bottom: calc(32px + var(--lv-curve) - var(--lv-page-gap)); }
.lv-owner :is(main > .lv-page-head, main > :only-child > .lv-page-head):has(+ :is(.lv-card, .lv-cards, .lv-clock, .lv-loads)) { --lv-band-foot: calc(var(--lv-overlap) + var(--lv-curve)); }
/* A first card, 24px under the title, reaches at least the green's foot, so the next block never lands on the curve. */
.lv-owner :is(main > .lv-page-head, main > :only-child > .lv-page-head) + .lv-card { min-height: calc(var(--lv-overlap) + var(--lv-curve) - 24px); }
.lv-owner :is(main > .lv-page-head, main > :only-child > .lv-page-head) :is(h1, h2) { color: #fff; }
.lv-owner :is(main > .lv-page-head, main > :only-child > .lv-page-head) p { color: rgba(255, 255, 255, 0.75); font-size: 15px; font-weight: 300; line-height: 1.625; }
.lv-owner :is(main > .lv-page-head, main > :only-child > .lv-page-head) a:not(.lv-back, .lv-segment > a) { color: #fff; text-decoration-color: rgba(255, 255, 255, 0.5); }
.lv-owner :is(main > .lv-page-head, main > :only-child > .lv-page-head):not(:has(> .lv-overline, > .lv-back)) { padding-top: 20px; }
.lv-owner :is(main > .lv-page-head, main > :only-child > .lv-page-head) > .lv-overline { color: rgba(255, 255, 255, 0.7); font-size: 11px; font-weight: 500; letter-spacing: 0.14em; line-height: 16px; text-transform: uppercase; }
.lv-terminal .lv-overline { display: none; }
/* A back link takes the overline's place at its height, so the title starts level with every other page's. */
.lv-owner :is(main > .lv-page-head, main > :only-child > .lv-page-head) > .lv-back { margin-bottom: 0; line-height: 16px; }

/* ==========================================================================
   Firms, networks and Upload only: the adviser terminal's dark green
   side nav, gold for where you are. Under 768px the side nav is a drawer
   behind the top bar's Menu button (the popover API: no script).
   ========================================================================== */
.lv-terminal { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100dvh; }
.lv-sidenav { position: sticky; inset: 0 auto auto; display: flex; flex-direction: column; gap: 6px; width: auto; height: 100dvh; margin: 0; padding: 0 12px 12px; overflow-y: auto; border: 0; background: var(--lv-sidebar); color: var(--lv-cream); }
/* The prototype's masthead: a green shield tile and the name on two lines, a divider under it. */
.lv-sidenav-top { display: flex; align-items: center; justify-content: space-between; margin: 0 -12px 6px; padding: 24px; border-bottom: 1px solid var(--lv-sidebar-border); }
.lv-sidenav-brand { display: flex; align-items: center; gap: 12px; color: var(--lv-cream); text-decoration: none; white-space: nowrap; }
.lv-sidenav-shield { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 16px; background-color: var(--lv-green-700); color: #fff; }
.lv-sidenav-shield .icon { width: 20px; height: 20px; }
.lv-sidenav-word { display: grid; line-height: 1.25; }
.lv-sidenav-word b { font-size: 18px; font-weight: 400; }
.lv-sidenav-word span { color: color-mix(in srgb, var(--lv-cream) 60%, transparent); font-size: 14px; }
.lv-sidenav .lv-sidenav-close { display: none; }
.lv-sidenav-back { margin: 0; }
.lv-sidenav-back button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: rgba(255, 255, 255, 0.7); font-size: 13px; font-weight: 500; text-align: left; cursor: pointer; transition: background-color var(--lv-duration) var(--lv-ease), color var(--lv-duration) var(--lv-ease); }
.lv-sidenav-label { margin: 16px 16px 6px; color: var(--lv-sidebar-primary); font-size: 11px; font-weight: 600; }
.lv-sidenav-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.lv-sidenav-list a { display: flex; align-items: center; gap: 12px; height: 32px; padding: 0 16px; border-radius: 9999px; color: color-mix(in srgb, var(--lv-cream) 70%, transparent); font-size: 14px; font-weight: 500; text-decoration: none; transition: background-color var(--lv-duration) var(--lv-ease), color var(--lv-duration) var(--lv-ease), box-shadow var(--lv-duration) var(--lv-ease); }
.lv-sidenav-list a .icon { width: 20px; height: 20px; color: inherit; }
.lv-sidenav-list a[aria-current] { background-color: var(--lv-sidebar-accent); box-shadow: inset 3px 0 0 var(--lv-sidebar-primary); color: var(--lv-sidebar-primary); font-weight: 600; }
.lv-sidenav-list a[aria-current] .icon { color: var(--lv-sidebar-primary); }

/* The organization: a card, and the switcher when more than one is
   reachable (white with a ring in the top bar, dark in the side nav). */
.lv-org-card { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; padding: 8px 12px; border-radius: 16px; background-color: #fff; box-shadow: 0 0 0 1px var(--lv-line-card); list-style: none; }
.lv-org-card::-webkit-details-marker { display: none; }
.lv-org-card > .icon { margin-left: auto; color: var(--lv-ink-muted); }
.lv-org-card-text { display: grid; min-width: 0; line-height: 1.3; }
/* A long name wraps to a second line before it is cut. */
.lv-org-card-text b { display: -webkit-box; overflow: hidden; font-size: 14px; font-weight: 600; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.lv-org-card-text small { overflow: hidden; color: var(--lv-ink-muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.lv-org-switcher { position: relative; }
.lv-org-switcher summary.lv-org-card { cursor: pointer; transition: transform 160ms var(--lv-ease-out), box-shadow var(--lv-duration) var(--lv-ease); }
.lv-org-switcher summary.lv-org-card:active { transform: scale(0.97); }
.lv-terminal .lv-org-card { background-color: rgba(255, 255, 255, 0.06); box-shadow: none; color: #fff; }
.lv-terminal :is(.lv-org-card-text small, .lv-org-card > .icon) { color: rgba(255, 255, 255, 0.6); }

/* The signed-in person at the foot: their menu, and Sign out beside it. */
.lv-sidenav-me { display: flex; align-items: center; gap: 4px; margin: auto -12px 0; padding: 12px 12px 0; border-top: 1px solid var(--lv-sidebar-border); }
.lv-sidenav-copy { margin: 0; padding-top: 2px; color: color-mix(in srgb, var(--lv-cream) 30%, transparent); font-size: 12px; text-align: center; }
.lv-sidenav-me .lv-org-card-text b { color: #fff; }
.lv-me-menu { position: relative; flex: 1; min-width: 0; }
.lv-me-menu summary { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; list-style: none; cursor: pointer; transition: background-color var(--lv-duration) var(--lv-ease); }
.lv-me-menu summary::-webkit-details-marker { display: none; }
.lv-monogram { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9999px; background-color: rgba(255, 255, 255, 0.12); color: #fff; font-size: 15px; font-weight: 500; line-height: 1; }
.lv-icon-btn { display: grid; flex: none; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: rgba(255, 255, 255, 0.7); cursor: pointer; transition: background-color var(--lv-duration) var(--lv-ease), color var(--lv-duration) var(--lv-ease), transform 160ms var(--lv-ease-out); }
.lv-icon-btn:active { transform: scale(0.97); }
.lv-mobile-bar { display: none; }

/* The account menu: up from the side nav's foot, down from the header's gear. */
.lv-me-menu-list { bottom: calc(100% + 6px); left: 0; min-width: 220px; transform-origin: bottom left; }
:is(.lv-header, .lv-topbar) .lv-settings > .lv-me-menu-list { top: calc(100% + 8px); right: 0; bottom: auto; left: auto; min-width: 248px; transform-origin: top right; }
/* In the estate shell the estate's own pages come first, a keyline under them. */
.lv-me-menu-pages { display: grid; gap: inherit; }
.lv-me-menu-pages:has(a) { margin-bottom: 4px; padding-bottom: 4px; border-bottom: 1px solid var(--lv-line-card); }
.lv-theme-switch { margin: 0; }

@media (hover: hover) and (pointer: fine) {
  .lv-terminal :is(.lv-sidenav-list a:not([aria-current]), .lv-sidenav-back button, .lv-me-menu summary):hover { background-color: color-mix(in srgb, var(--lv-sidebar-accent) 50%, transparent); color: var(--lv-cream); }
  .lv-icon-btn:hover { background-color: rgba(255, 255, 255, 0.1); color: #fff; }
  .lv-org-switcher summary.lv-org-card:hover { box-shadow: 0 0 0 1px var(--lv-line-card), var(--lv-shadow-pop); }
  .lv-terminal .lv-org-switcher summary.lv-org-card:hover { box-shadow: none; background-color: rgba(255, 255, 255, 0.1); }
  .lv-topbar-links :is(a, button):hover { background-color: rgba(246, 239, 225, 0.7); color: var(--lv-ink); }
}
/* Rows and menu items tint on press, at once. */
:is(.lv-sidenav-list a:not([aria-current]), .lv-sidenav-back button, .lv-me-menu summary, .lv-me-menu-list a, .lv-topbar-links a):active { background-color: var(--lv-gold-100); transition-duration: 0ms; }

/* Outside an organization (the picker): brand and account links on a top bar. */
.lv-plain { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100dvh; }
.lv-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 0 var(--lv-gutter); }
.lv-topbar-left { display: flex; align-items: center; gap: 16px; }
.lv-topbar .lv-org-card { margin: 0; padding: 6px 12px; }
.lv-topbar .lv-brand { white-space: normal; }
.lv-topbar-end { display: flex; align-items: center; gap: 4px; }
.lv-topbar .lv-icon { color: var(--lv-ink-muted); }
@media (hover: hover) and (pointer: fine) { .lv-topbar .lv-icon:hover { background-color: rgba(246, 239, 225, 0.7); color: var(--lv-ink); } }
.lv-topbar-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 14px; }
.lv-topbar-links :is(a, button) { padding: 6px 8px; border: 0; border-radius: 6px; background: none; color: var(--lv-ink-muted); font: inherit; text-decoration: none; white-space: nowrap; cursor: pointer; }

/* The page beside or under the shell, and the messages over it. */
.lv-content { min-width: 0; }
.lv-content > main { max-width: none; margin: 0; padding: 0; }
.lv-owner > .lv-content { max-width: calc(928px + 2 * 24px); margin: 0 auto; padding: 32px 24px 64px; }
.lv-terminal > .lv-content { min-height: calc(100dvh - 16px); padding: 40px min(40px, var(--lv-gutter)) 64px; }
.lv-plain > .lv-content { min-height: calc(100dvh - 64px); margin: 0 8px 8px; padding: 32px var(--lv-gutter) 48px; }
/* Messages (Django's): under the page in every shell, at the top of the entrance card; the notice's
   tones at 12px corners: info cream, success green, warning gold, error red. */
.lv-messages { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.lv-content > .lv-messages { margin-bottom: 20px; }
:is(.lv-terminal, .lv-plain) > .lv-content > .lv-messages { max-width: 1200px; }
.lv-content:has(> main > .lv-narrow) > .lv-messages { max-width: 640px; margin-inline: auto; }
.lv-terminal > .lv-content:has(> main > .lv-narrow) > .lv-messages { margin-inline: 0; }
.lv-entry-main > .lv-messages { margin-bottom: 24px; }
.lv-message { padding: 12px 16px; border: 1px solid var(--lv-line-card); border-radius: 12px; background-color: var(--lv-gold-50); color: var(--lv-ink); font-size: 14px; line-height: 1.5; }
/* Success: the green tint laid on white, so it reads the same on the grey page as in a card. */
.lv-message-success { border-color: rgba(11, 82, 51, 0.18); background-color: #fff; background-image: linear-gradient(var(--lv-green-tint), var(--lv-green-tint)); }
.lv-message-warning { border-color: var(--lv-gold-line); background-color: var(--lv-gold-100); }
.lv-message-error { border-color: var(--lv-red-line); background-color: var(--lv-red-fill); color: var(--lv-red-ink); }

/* ---- The terminal and the top bar under 768px: the side nav becomes a
   drawer that slides in from the left over a dimmed page ---- */
@media (max-width: 767px) {
  .lv-terminal, .lv-plain { display: block; }
  .lv-mobile-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; border-bottom: 1px solid var(--lv-line-card); background-color: var(--lv-background); color: var(--lv-ink); }
  .lv-mobile-bar-org { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
  .lv-mobile-bar .lv-icon-btn { width: 40px; height: 40px; border: 1px solid var(--lv-sidebar-border); border-radius: 16px; background-color: var(--lv-sidebar); color: var(--lv-cream); }
  .lv-icon-btn { width: 44px; height: 44px; }
  .lv-sidenav:not(:popover-open) { display: none; }
  .lv-sidenav { position: fixed; inset: 0 auto 0 0; width: min(320px, 90vw); height: 100dvh; box-shadow: var(--lv-shadow-overlay); transform: translateX(-100%); transition: transform 200ms var(--lv-ease-out), overlay 200ms allow-discrete, display 200ms allow-discrete; }
  .lv-sidenav:popover-open { transform: none; transition-duration: 280ms; transition-timing-function: var(--lv-ease-drawer); }
  @starting-style { .lv-sidenav:popover-open { transform: translateX(-100%); } }
  .lv-sidenav::backdrop { background-color: transparent; transition: background-color 200ms var(--lv-ease-out), overlay 200ms allow-discrete, display 200ms allow-discrete; }
  .lv-sidenav:popover-open::backdrop { background-color: var(--lv-scrim); }
  @starting-style { .lv-sidenav:popover-open::backdrop { background-color: transparent; } }
  .lv-sidenav .lv-sidenav-close { display: grid; }
  :is(.lv-sidenav-back button, .lv-me-menu summary, .lv-topbar-links :is(a, button), .lv-sidenav-list a, .lv-topbar .lv-org-card) { min-height: 44px; align-content: center; }
  .lv-topbar-links :is(a, button) { display: inline-flex; align-items: center; }
  .lv-topbar { flex-wrap: wrap; padding: 8px 16px; }
  .lv-topbar-links { margin-left: -8px; }
  .lv-topbar .lv-icon { width: 44px; height: 44px; }
  .lv-topbar-end { margin-left: auto; }
  .lv-terminal > .lv-content { min-height: 0; }
  .lv-plain > .lv-content { min-height: 0; margin: 0; padding: 20px 16px 32px; }
}

/* The drawer's own pieces (its head, the estate, Settings and Sign out at its foot) are the
   phone's copies of the bar's: hidden at this width. */
:is(.lv-nav-head, .lv-nav-org, .lv-nav-foot) { display: none; }

/* ---- Phones and narrow tablets (the prototype's 834px step): the bar keeps the menu button;
   brand, Settings and Sign out move into the menu, a drawer from the left ---- */
@media (max-width: 833px) {
  .lv-bar > .lv-brand, .lv-bar-end { display: none; }
  .lv-bar { height: 64px; }
  .lv-nav-open { display: grid; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, 0.45); border-radius: 16px; color: #fff; }
  .lv-nav:not(:popover-open) { display: none; }
  .lv-nav {
    position: fixed;
    inset: 0 auto 0 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
    width: min(320px, 90vw);
    height: 100dvh;
    max-height: none;
    padding: 16px;
    overflow-y: auto;
    background: linear-gradient(135deg, var(--lv-green-700), var(--lv-green-950));
    box-shadow: var(--lv-shadow-overlay);
    transform: translateX(-100%);
    transition: transform 200ms var(--lv-ease-out), overlay 200ms allow-discrete, display 200ms allow-discrete;
  }
  .lv-nav:popover-open { transform: none; transition-duration: 280ms; transition-timing-function: var(--lv-ease-drawer); }
  @starting-style { .lv-nav:popover-open { transform: translateX(-100%); } }
  .lv-nav::backdrop { background-color: transparent; transition: background-color 200ms var(--lv-ease-out), overlay 200ms allow-discrete, display 200ms allow-discrete; }
  .lv-nav:popover-open::backdrop { background-color: var(--lv-scrim); }
  @starting-style { .lv-nav:popover-open::backdrop { background-color: transparent; } }
  .lv-nav-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
  .lv-nav-head .lv-brand { min-width: 0; }
  .lv-nav-close { width: 44px; height: 44px; margin-right: -4px; }
  .lv-nav-org { display: grid; margin: 0 0 12px; padding: 0 12px; line-height: 1.25; }
  .lv-nav-org b { overflow-wrap: anywhere; font-size: 14px; font-weight: 400; }
  .lv-nav-list { flex-direction: column; align-items: stretch; }
  /* The prototype's drawer rows: 15px, no icons, a group's items indented 16px. */
  .lv-nav-list > li > a, .lv-nav-group > summary, .lv-nav-foot :is(summary, a) { width: 100%; height: 44px; gap: 8px; font-size: 15px; }
  .lv-nav-list > li.lv-home > a .icon { display: none; }
  .lv-nav-group > summary { justify-content: space-between; }
  .lv-menu-list a small { display: none; }
  .lv-nav-group > .lv-menu-list, .lv-nav-settings > .lv-me-menu-list { position: static; min-width: 0; margin-top: 4px; border: 0; background: none; box-shadow: none; animation: none; }
  .lv-nav-group > .lv-menu-list { gap: 4px; padding: 0; }
  .lv-nav-group > .lv-menu-list a { min-height: 44px; margin-left: 16px; padding: 0 12px; border: 1px solid transparent; border-radius: 6px; color: rgba(255, 255, 255, 0.72); font-size: 15px; font-weight: 400; }
  .lv-nav-group > .lv-menu-list a .icon { display: none; }
  .lv-nav-group > .lv-menu-list a[aria-current] { border-color: rgba(255, 255, 255, 0.3); color: #fff; font-weight: 500; }
  /* Settings and Sign out at the drawer's foot, under a keyline, as the prototype's drawer. */
  .lv-nav-foot { display: grid; gap: 4px; margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.15); }
  .lv-nav-foot :is(summary, a) { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 6px; color: rgba(255, 255, 255, 0.72); font-size: 15px; text-decoration: none; list-style: none; cursor: pointer; }
  .lv-nav-foot summary::-webkit-details-marker { display: none; }
  .lv-nav-foot summary > .icon:last-child { margin-left: auto; transition: transform 150ms ease-out; }
  .lv-nav-settings[open] > summary { background-color: rgba(255, 255, 255, 0.1); color: #fff; }
  .lv-nav-settings[open] > summary > .icon:last-child { transform: rotate(180deg); }
  .lv-nav-settings > .lv-me-menu-list { display: grid; gap: 4px; padding: 0 0 0 16px; color: #fff; }
  .lv-nav-settings > .lv-me-menu-list :is(a, button) { min-height: 44px; padding: 0 12px; border-radius: 6px; color: #fff; font-size: 15px; }
  .lv-nav-settings > .lv-me-menu-list :is(a, button):active { background-color: rgba(255, 255, 255, 0.12); }
  .lv-nav-settings .lv-me-menu-pages:has(a) { border-bottom-color: rgba(255, 255, 255, 0.15); }
  .lv-owner > .lv-content, .lv-terminal > .lv-content { padding: 24px 16px 48px; }
}
@media (max-width: 833px) and (hover: hover) and (pointer: fine) {
  .lv-nav-foot :is(summary, a):hover, .lv-nav-settings > .lv-me-menu-list :is(a, button):hover { background-color: rgba(255, 255, 255, 0.1); color: #fff; }
  .lv-nav-group > .lv-menu-list a:not([aria-current]):hover { background-color: transparent; color: #fff; }
}

/* ==========================================================================
   The Lovable pages' own pieces (themes/lovable/templates): these style
   only lv- markup, so a page built from them needs nothing of ours.
   ========================================================================== */

/* The page title, white on the green band. */
.lv-page-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.lv-page-head h1 { margin: 0; }
.lv-page-head p { margin: 0; }
/* A page's tabs sit on the green under its title (Estate and tax). */
.lv-page-head > .lv-segment { margin-top: 20px; }
/* Simple | Detailed (Estate and tax, the Report) stands at the head's top right, beside its title; under it on a phone. */
.lv-page-head:has(> .lv-view-switch) { grid-template-columns: minmax(0, 1fr) auto; }
.lv-page-head:has(> .lv-view-switch) > * { grid-column: 1; }
.lv-page-head > .lv-view-switch { grid-column: 2; grid-row: 1 / span 2; align-self: start; margin-top: 0; }
@media (max-width: 640px) {
  .lv-page-head:has(> .lv-view-switch) { grid-template-columns: minmax(0, 1fr); }
  .lv-page-head > .lv-view-switch { grid-column: 1; grid-row: auto; }
}

/* A white card, and a white panel with no line. */
.lv-card { min-width: 0; border: 1px solid var(--lv-line-card); border-radius: 16px; background-color: #fff; box-shadow: var(--lv-shadow-card); color: var(--lv-ink); }
.lv-panel { padding: 24px; border-radius: 16px; background-color: #fff; color: var(--lv-ink); }
/* A card's heading row: its title, a line under it, a link, pill or button at the right. */
.lv-card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 12px; }
.lv-card-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; font-weight: 600; line-height: 1.3; }
.lv-card-head h2 .icon { width: 20px; height: 20px; color: var(--lv-green-700); }
.lv-card-head > p { flex-basis: 100%; margin: 0; color: var(--lv-ink-55); font-size: 14px; line-height: 1.5; }
.lv-card-head > .lv-quiet { font-size: 12px; }
/* A quiet line at a card's foot, under a keyline: an icon or a gold dot, its words, a link after them. */
.lv-card-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding-top: 16px; border-top: 1px solid var(--lv-keyline); color: var(--lv-ink-55); font-size: 14px; line-height: 1.5; }
.lv-card-note > .icon { width: 16px; height: 16px; margin-top: 2px; }
.lv-dot { flex: none; width: 10px; height: 10px; border-radius: 9999px; background-color: var(--lv-gold-500); }
.lv-card-note > .lv-dot { margin-top: 6px; }
.lv-card-note .lv-link { white-space: normal; }
/* A card's foot: a keyline, then its buttons (or links) in a row 12px apart, 16px under it. */
.lv-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0; padding-top: 16px; border-top: 1px solid var(--lv-keyline); }
/* A tile (the prototype's calm card): one record of many, white with a hairline edge, no shadow;
   its icon on gold-100. The icon is also a row's mark: attention when it needs a judgement, green once done. */
.lv-tile { display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 14px; border: 0.5px solid var(--lv-line-card); border-radius: 12px; background-color: #fff; color: var(--lv-ink); }
/* A tile's body: its lines in a column 6px apart, the name first, its quiet lines at 14px (the prototype's calm-body). */
.lv-tile-body { display: flex; flex: 1; flex-direction: column; gap: 6px; min-width: 0; }
.lv-tile-body > p { margin: 0; }
.lv-tile .lv-hint { font-size: 14px; }
.lv-tile-icon { display: inline-grid; flex: none; place-items: center; width: 34px; height: 34px; border-radius: 8px; background-color: var(--lv-gold-100); color: var(--lv-gold-ink); }
.lv-tile-icon .icon { width: 16px; height: 16px; }
.lv-tile-icon-attention { background-color: var(--lv-attention-fill); color: var(--lv-attention); }
.lv-tile-icon-done { background-color: var(--lv-green-tint); color: var(--lv-green-700); }
/* The gold edge: 3px gold-500 inside the left of a card, tile, row or line that waits on someone.
   Drawn inside, so nothing moves; on a card it sits over the card's shadow. */
.lv-edge { box-shadow: inset 3px 0 0 var(--lv-gold-500); }
.lv-card.lv-edge { box-shadow: inset 3px 0 0 var(--lv-gold-500), var(--lv-shadow-card); }

.lv-section { display: grid; gap: 16px; }

/* A list of facts (dl): each a label over its value, a keyline above, as many to a row as fit. */
.lv-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 0 24px; margin: 0; }
.lv-facts > div { display: grid; align-content: start; gap: 2px; padding: 12px 0; border-top: 1px solid var(--lv-keyline); }
.lv-facts dt { color: var(--lv-ink-55); font-size: 13px; }
.lv-facts dd { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
/* A label beside its value, one pair a line. */
.lv-pairs { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 14px; }
.lv-pairs dt { color: var(--lv-ink-55); }
.lv-pairs dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
/* A sum (lv-sum): a line each, the label at the left in ink-55 and the figure at the right in 600;
   a total (lv-sum-total) is ruled off above and its label is ink in 600 too. A date stays regular. */
.lv-sum { display: grid; gap: 6px; margin: 0; font-size: 14px; }
.lv-sum > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.lv-sum dt { color: var(--lv-ink-55); }
.lv-sum dd { margin: 0; color: var(--lv-ink); font-weight: 600; text-align: right; }
.lv-sum .lv-sum-total { padding-top: 6px; border-top: 1px solid var(--lv-line-card); }
.lv-sum .lv-sum-total dt { color: var(--lv-ink); font-weight: 600; }
.lv-sum dd.lv-sum-date { font-weight: 400; }
.lv-sum [data-state="unanswered"] dd { color: var(--lv-attention); }
/* A sum a card is about (How it's worked out): the prototype's 16px lines, each figure regular and the
   totals in 600; a figure too long for its line goes under its label. */
.lv-sum-lg { gap: 8px; font-size: 16px; }
.lv-sum-lg > div { flex-wrap: wrap; }
.lv-sum-lg > div > dd { margin-left: auto; font-weight: 400; }
.lv-sum-lg > .lv-sum-total > dd { font-weight: 600; }
/* A strip of figures (lv-figures): each a label over its figure and a quiet line under it, a keyline
   between, one row wide and one a row under 834px. The ladder: 17px (lv-figures-sm), 28px, a Home
   card's 36px, the hero's 36 to 52px. */
.lv-figures { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; margin: 0; }
.lv-figures > div { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 0 24px; border-left: 1px solid var(--lv-keyline); }
.lv-figures > div:first-child { padding-left: 0; border-left: 0; }
.lv-figures :is(dt, dd:not(.lv-figure)) { margin: 0; color: var(--lv-ink-55); font-size: 13px; line-height: 1.5; }
/* A figure never breaks inside its number; a 17px fact (a kind, a period) wraps. */
.lv-figure { margin: 0; color: var(--lv-ink); font-size: 28px; font-weight: 600; line-height: 1.15; white-space: nowrap; }
.lv-figures-sm .lv-figure { font-size: 17px; line-height: 1.3; white-space: normal; overflow-wrap: anywhere; text-wrap: balance; }
@media (max-width: 833px) {
  .lv-figures { grid-auto-flow: row; }
  .lv-figures > div { padding: 12px 0; border-top: 1px solid var(--lv-keyline); border-left: 0; }
  .lv-figures > div:first-child { padding-top: 0; border-top: 0; }
}
.lv-section-title { margin: 0; color: var(--lv-ink); font-size: 20px; font-weight: 600; line-height: 1.4; }
@media (max-width: 767px) { .lv-section-title { font-size: 18px; } }

.lv-link { color: var(--lv-green-700); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .lv-link:hover { text-decoration: underline; } }
.lv-quiet { color: var(--lv-ink-55); }
/* A count inside a title reads quiet, not bold. */
:is(h2, h3) > .lv-quiet { font-weight: 400; }
/* A record's name, at its line's size; one that opens the record goes green and underlined under the pointer. */
.lv-name { color: var(--lv-ink); font-weight: 500; overflow-wrap: anywhere; }
a.lv-name { text-decoration: none; transition: color var(--lv-duration) var(--lv-ease); }
@media (hover: hover) and (pointer: fine) { a.lv-name:hover { color: var(--lv-green-700); text-decoration: underline; } }
/* A name over a quiet line, the line 2px under it. */
.lv-name-line { display: grid; justify-items: start; gap: 2px; min-width: 0; }
.lv-name-line > b { font-size: 15px; overflow-wrap: anywhere; }
.lv-name-line > .lv-hint { overflow-wrap: anywhere; }
.lv-note { margin: 0; color: var(--lv-ink-55); font-size: 14px; line-height: 1.5; }
.lv-note-attention { color: var(--lv-attention); }

/* Buttons: solid green, green on white, quiet, and red for what cannot be undone. */
.lv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid var(--lv-green-700); border-radius: 8px; background-color: var(--lv-green-700); color: #fff; font: inherit; font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color var(--lv-duration) var(--lv-ease), border-color var(--lv-duration) var(--lv-ease), color var(--lv-duration) var(--lv-ease), transform 160ms var(--lv-ease-out); }
.lv-btn .icon { width: 16px; height: 16px; }
.lv-btn-outline { background-color: #fff; color: var(--lv-green-700); }
.lv-btn-sm { height: 36px; padding: 0 12px; }
/* Under 768px every button is at least a 44px press (the prototype's touch rule); the large one stays 56px. */
@media (max-width: 767px) { .lv-btn { min-height: 44px; } }
/* The large size: the way on, and the entrance card's main action. */
.lv-btn-lg { height: auto; min-height: 56px; padding: 0 32px; font-size: 15px; }
/* The way on at a page's foot takes the row on a phone. */
@media (max-width: 639px) { .lv-page > p > .lv-btn-lg { width: 100%; } }
.lv-btn-quiet { border-color: transparent; background-color: transparent; color: var(--lv-green-700); }
.lv-btn-danger { border-color: var(--lv-red); background-color: var(--lv-red); color: #fff; }
.lv-btn-danger-quiet { border-color: transparent; background-color: transparent; color: var(--lv-red-ink); }
/* While nothing can be done yet (no file chosen, no row to import, the first rule). */
.lv-btn:is(:disabled, [aria-disabled="true"]) { opacity: 0.4; pointer-events: none; }
/* A press: in to 0.97, as every pressable piece (foundations/motion.md). */
.lv-btn:active { transform: scale(0.97); }
/* Sent, and not answered yet: the button stays pressed and takes no second press. htmx marks a
   form it sends by its button; static/js/sent.js marks one whose answer is a new page. */
:is(form[hx-post]:not([hx-trigger]).htmx-request, form[data-sent]) button:not([type="button"]) { transform: scale(0.97); pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .lv-btn:hover { background-color: var(--lv-green-900); }
  .lv-btn-outline:hover { background-color: var(--lv-green-tint); }
  .lv-btn-quiet:hover { background-color: var(--lv-green-tint); }
  .lv-btn-danger:hover { border-color: rgba(211, 49, 49, 0.9); background-color: rgba(211, 49, 49, 0.9); }
  .lv-btn-danger-quiet:hover { background-color: var(--lv-red-fill); }
}

/* Pills: covered (green) and attention (gold). */
.lv-pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 9999px; font-size: 11px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.lv-pill-covered { background-color: var(--lv-green-tint); color: var(--lv-green-700); }
.lv-pill-attention { background-color: var(--lv-attention-fill); color: var(--lv-attention); }
@media (hover: hover) and (pointer: fine) { a.lv-pill-attention:hover { background-color: rgba(214, 157, 69, 0.28); } }
.lv-pill-plain { border: 1px solid var(--lv-line-input); color: var(--lv-ink); }
.lv-pill-danger { background-color: var(--lv-red-fill); color: var(--lv-red-ink); }
.lv-pill-quiet { background-color: rgba(17, 17, 17, 0.06); color: var(--lv-ink-55); }
/* A pill that leads a row's action: the size of the action, with its icon. */
.lv-pill-lg { gap: 6px; height: 28px; padding: 0 12px; font-size: 14px; }
.lv-pill-lg .icon { width: 16px; height: 16px; }
/* A row of pills: a state and the role beside it. */
.lv-pills { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
/* On the green band: its text's colour at 16% behind its word (white on the green, ink in the terminal). */
.lv-pill-on-green { background-color: color-mix(in srgb, currentColor 16%, transparent); }
.lv-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border: 1px solid var(--lv-line-card); border-radius: 9999px; color: var(--lv-ink-55); font-size: 13px; font-weight: 400; white-space: nowrap; }

/* A label in capitals (lv-caps): a table's head, a row list's head, a group label in a card or a list. */
.lv-caps, .lv-table thead th, .lv-rows-head h3 { color: var(--lv-ink-55); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; line-height: 1.45; text-transform: uppercase; }

/* A table inside a card: tinted capitals for the head, keylines between rows. */
.lv-table-card { overflow: hidden; container-type: inline-size; }
.lv-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lv-table thead th { padding: 12px 16px; background-color: var(--lv-head); border-bottom: 1px solid var(--lv-line-card); text-align: left; white-space: nowrap; }
.lv-table :is(tbody th, td) { padding: 16px; border-bottom: 1px solid var(--lv-keyline); font-weight: 400; text-align: left; vertical-align: middle; }
.lv-table tbody tr { transition: background-color var(--lv-duration) var(--lv-ease); }
.lv-table tbody tr:last-child > * { border-bottom: 0; }
@media (hover: hover) and (pointer: fine) { .lv-table tbody tr:not(.lv-group, [data-state]):hover { background-color: var(--lv-gold-50); } }
.lv-table small { display: block; color: var(--lv-ink-55); font-size: 12px; }
.lv-table .lv-num { text-align: right; }
.lv-table tr.lv-edge > :first-child { box-shadow: inset 3px 0 0 var(--lv-gold-500); }
/* A date, a time or a tax year keeps one line (tabular above), as the prototype's gift log date. */
.lv-date { white-space: nowrap; }
.lv-table .lv-group > :is(th, td) { padding: 10px 16px; background-color: var(--lv-gold-50); color: var(--lv-ink-55); font-size: 12px; font-weight: 600; }
/* A table opts into restacking (the prototype's stack-table): the name and the amount share the
   first line, each other cell is a line of its own, "Label · value". It restacks when its card is
   phone-wide, under 640px (the prototype's sm); one with many columns (lv-table-stack-wide) when its
   card is under 780px. */
@container (max-width: 639px) {
  .lv-table-stack thead { display: none; }
  .lv-table-stack, .lv-table-stack tbody { display: block; }
  .lv-table-stack tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 16px; border-bottom: 1px solid var(--lv-keyline); }
  .lv-table-stack tbody tr:last-child { border-bottom: 0; }
  .lv-table-stack :is(tbody th, td) { display: block; grid-column: 1 / -1; padding: 0; border: 0; text-align: left; }
  .lv-table-stack [data-stack="name"] { grid-column: 1; grid-row: 1; min-width: 0; }
  .lv-table-stack [data-stack="amount"] { grid-column: 2; grid-row: 1; text-align: right; white-space: nowrap; }
  .lv-table-stack td:not([data-stack]) { text-align: left; }
  .lv-table-stack td[data-label]:not([data-stack])::before { content: attr(data-label) " \00b7  "; color: var(--lv-ink-55); font-size: 12px; }
  .lv-table-stack tr.lv-group { display: block; padding: 0; }
  .lv-table-stack tr.lv-edge > :first-child { box-shadow: none; }
  .lv-table-stack .lv-group th { padding: 10px 16px; }
}
@container (max-width: 779px) {
  .lv-table-stack-wide thead { display: none; }
  .lv-table-stack-wide, .lv-table-stack-wide tbody { display: block; }
  .lv-table-stack-wide tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 16px; border-bottom: 1px solid var(--lv-keyline); }
  .lv-table-stack-wide tbody tr:last-child { border-bottom: 0; }
  .lv-table-stack-wide :is(tbody th, td) { display: block; grid-column: 1 / -1; padding: 0; border: 0; text-align: left; }
  .lv-table-stack-wide [data-stack="name"] { grid-column: 1; grid-row: 1; min-width: 0; }
  .lv-table-stack-wide [data-stack="amount"] { grid-column: 2; grid-row: 1; text-align: right; white-space: nowrap; }
  .lv-table-stack-wide td:not([data-stack]) { text-align: left; }
  .lv-table-stack-wide td[data-label]:not([data-stack])::before { content: attr(data-label) " \00b7  "; color: var(--lv-ink-55); font-size: 12px; }
  .lv-table-stack-wide tr.lv-group { display: block; padding: 0; }
  .lv-table-stack-wide tr.lv-edge > :first-child { box-shadow: none; }
  .lv-table-stack-wide .lv-group th { padding: 10px 16px; }
}
/* More than one page of rows (_pagination.html): under the table in its card, or under a list. */
.lv-pages { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 16px; color: var(--lv-ink-55); font-size: 14px; }
.lv-pages > :first-child { justify-self: start; }
.lv-pages > :last-child { justify-self: end; }
.lv-card > .lv-pages { border-top: 1px solid var(--lv-keyline); }
:not(.lv-card) > .lv-pages { padding-inline: 0; }
@media (max-width: 767px) { .lv-pages > a { display: inline-flex; align-items: center; min-height: 44px; } }

.lv-progress { display: block; width: 100%; height: 6px; border: 0; border-radius: 9999px; background-color: var(--lv-gold-100); overflow: hidden; appearance: none; }
.lv-progress::-webkit-progress-bar { border-radius: 9999px; background-color: var(--lv-gold-100); }
.lv-progress::-webkit-progress-value { border-radius: 9999px; background-color: var(--lv-green-700); }
.lv-progress::-moz-progress-bar { border-radius: 9999px; background-color: var(--lv-green-700); }
/* A step with no page total yet: a green stretch runs across, standing
   still in the middle when motion is reduced. One run a second, as long as
   the poll that swaps the bar in again, so a new bar starts as the old one ends. */
progress.lv-progress:not([value]) { background: linear-gradient(var(--lv-green-700), var(--lv-green-700)) 50% 0 / 40% 100% no-repeat, var(--lv-gold-100); animation: lv-progress-run 1s linear infinite; }
progress.lv-progress:not([value])::-webkit-progress-bar { background-color: transparent; }
progress.lv-progress:not([value])::-moz-progress-bar { background-color: transparent; }
@keyframes lv-progress-run { from { background-position: -70% 0; } to { background-position: 170% 0; } }

/* A region that loads after its page (patterns/loading.md): it lays its cards out as the page's own,
   a skeleton of grey lines standing in until they come, dimmed while a refresh takes
   longer than 150ms (a quicker one would only flicker). */
.lv-loads { display: contents; }
/* Without script the region never arrives: its skeleton goes, and its notice says so. */
@media (scripting: none) { .lv-loads [data-skeleton] { display: none; } }
.lv-loads.htmx-request:not([aria-busy]) > * { opacity: 0.6; transition: opacity 150ms var(--lv-ease) 150ms; }
/* What arrives in place of the skeleton (static/js/loading.js marks it) fades in rising 4px,
   its first seven parts one after another and the rest with the seventh; a refresh from a tab or
   a filter shows at once. Only a backwards fill, so a refresh can dim it after. */
.lv-loads[data-arrives] > * { animation: lv-arrive 200ms var(--lv-ease-out) backwards; }
.lv-loads > :nth-child(2 of :not([hidden], .visually-hidden)) { animation-delay: var(--lv-stagger); }
.lv-loads > :nth-child(3 of :not([hidden], .visually-hidden)) { animation-delay: calc(var(--lv-stagger) * 2); }
.lv-loads > :nth-child(4 of :not([hidden], .visually-hidden)) { animation-delay: calc(var(--lv-stagger) * 3); }
.lv-loads > :nth-child(5 of :not([hidden], .visually-hidden)) { animation-delay: calc(var(--lv-stagger) * 4); }
.lv-loads > :nth-child(6 of :not([hidden], .visually-hidden)) { animation-delay: calc(var(--lv-stagger) * 5); }
.lv-loads > :nth-child(n + 7 of :not([hidden], .visually-hidden)) { animation-delay: calc(var(--lv-stagger) * 6); }
@keyframes lv-arrive { from { opacity: 0; transform: translateY(4px); } }
/* The skeleton is the region's own layout (cards, tools, section heads, rows) with grey in place
   of words: a line for text, a pill for a control. Sized here to the words they stand for. */
.lv-skeleton-line { display: block; height: 12px; border-radius: 6px; }
/* A band of light sweeps over the grey, then rests. Fixed to the screen, so one band crosses every
   line and pill together, as one surface; still, off screen, when motion is reduced. */
:is(.lv-skeleton-line, .lv-skeleton-pill) {
  background: var(--lv-keyline) linear-gradient(100deg, transparent 46%, rgba(255, 255, 255, 0.7) 50%, transparent 54%) 100% 0 / 250% 100% no-repeat fixed;
  animation: lv-shimmer 2s var(--lv-ease) infinite;
}
@keyframes lv-shimmer { 75%, to { background-position: 0 0; } }
.lv-skeleton-line:nth-child(odd) { width: 60%; }
.lv-skeleton-pill { display: inline-block; width: 104px; height: 34px; border-radius: 9999px; }
.lv-tools > .lv-skeleton-pill:only-child { width: 220px; height: 44px; }
.lv-filters > .lv-skeleton-pill:last-child { flex: 1 1 260px; max-width: 420px; }
.lv-quiet > .lv-skeleton-line { width: 220px; margin-block: 6px; }
.lv-section-head > .lv-skeleton-line:first-child { width: 160px; height: 16px; margin-block: 4px; }
.lv-section-head > .lv-skeleton-line + .lv-skeleton-line { flex-basis: 100%; max-width: 280px; margin-block: 6px; }
.lv-actions > .lv-skeleton-pill { width: 96px; height: 36px; border-radius: 8px; }
/* The Report's skeleton (taxengine/report.html): its head and tiles, what it rests on, its sections. */
.lv-rules-year-head > .lv-skeleton-line { width: 240px; height: 16px; }
.lv-report-tiles .lv-skeleton-line { width: 120px; margin-block: 6px; }
.lv-report-tiles dd > .lv-skeleton-line { height: 16px; }
.lv-card-head > .lv-skeleton-line { width: 220px; margin-block: 6px; }
.lv-report-bars > li > .lv-skeleton-line { width: 100%; margin-block: 6px; }
.lv-report-skeleton { margin: 0; padding: 24px; }
.lv-report-skeleton > .lv-skeleton-line { width: 200px; height: 16px; }
/* Home's skeleton (estates/overview.html): What needs your input, two tax years of rows. */
.lv-steps > .lv-card-head > .lv-skeleton-line { width: 200px; height: 16px; margin-block: 4px; }
.lv-steps > .lv-card-head > p > .lv-skeleton-line { width: 320px; max-width: 100%; margin-block: 6px; }
.lv-steps-year h3 > .lv-skeleton-line { width: 120px; height: 16px; margin-block: 4px; }
.lv-step > .lv-skeleton-line { width: 100%; max-width: 280px; margin-block: 6px; }
.lv-step > .lv-skeleton-line + .lv-skeleton-line { width: 64px; }
/* A list card's skeleton (lovable/_list_skeleton.html): rows of three lines, the last to the right. */
.lv-skeleton-rows > li { display: flex; align-items: center; gap: 24px; padding: 20px 24px; }
.lv-skeleton-rows > li + li { border-top: 1px solid var(--lv-keyline); }
.lv-skeleton-rows .lv-skeleton-line { width: 200px; max-width: 40%; }
.lv-skeleton-rows .lv-skeleton-line:nth-child(2) { width: 96px; }
.lv-skeleton-rows .lv-skeleton-line:last-child { width: 72px; margin-left: auto; }
/* A figure not worked out yet: a line as tall as its own. A paragraph of skeleton keeps its
   lines' margins inside it, so it is as tall as the words to come. */
p[data-skeleton] { display: flow-root; }
.lv-hero-figure > .lv-skeleton-line { width: 240px; max-width: 100%; height: 0.7em; margin-block: 0.2em; border-radius: 8px; }
.lv-gifts-line > .lv-skeleton-line { width: 200px; margin-block: 6px; }
/* Home's skeleton under its greeting (estates/overview.html): the hero, then three cards. */
.lv-hero-label > .lv-skeleton-line { width: 140px; margin-block: 6px; }
.lv-hero-note > .lv-skeleton-line { width: 180px; margin-block: 6px; }
.lv-link-card .lv-skeleton-line { width: 120px; margin-block: 6px; }
.lv-link-card > .lv-card-big > .lv-skeleton-line { width: 160px; height: 20px; margin-block: 8px; }
/* What you own's skeleton (assets/estate.html): three figures, then sections of rows. */
.lv-figures .lv-skeleton-line { width: 120px; margin-block: 6px; }
.lv-figures .lv-figure > .lv-skeleton-line { width: 160px; height: 20px; margin-block: 8px; }
/* Estate and tax's skeleton (assets/estate_tax.html): four figure cards, then rows. */
.lv-figure-card .lv-skeleton-line { width: 140px; margin-block: 6px; }
.lv-figure-card > .lv-card-big > .lv-skeleton-line { width: 180px; height: 20px; margin-block: 8px; }
@media (max-width: 767px) { .lv-filters > .lv-skeleton-pill { height: 44px; } }

/* A notice (the prototype's Notice): the card's corners, an edge, 16px in; an icon first, then its words.
   Gold by default (something is missing or waiting); lv-notice-info green (a fact to know),
   lv-notice-neutral cream (a reference), lv-notice-danger red (an error: ours, the prototype has none). */
.lv-notice { margin: 0; padding: 16px; border: 1px solid var(--lv-gold-line); border-radius: 16px; background-color: var(--lv-gold-100); color: var(--lv-ink); font-size: 15px; }
.lv-notice:has(> .icon) { display: flex; align-items: flex-start; gap: 12px; }
.lv-notice > .icon { flex: none; width: 20px; height: 20px; color: var(--lv-gold-600); }
.lv-notice:has(> .icon) > :not(.icon) { flex: 1; min-width: 0; }
.lv-notice > div { display: grid; gap: 6px; }
.lv-notice p { margin: 0; }
.lv-notice strong { font-weight: 600; }
.lv-notice .lv-link { white-space: normal; }
.lv-notice-info { border-color: rgba(11, 82, 51, 0.18); background-color: rgba(11, 82, 51, 0.06); }
.lv-notice-info > .icon { color: var(--lv-green-700); }
.lv-notice-neutral { border-color: var(--lv-line-card); background-color: var(--lv-gold-50); }
.lv-notice-neutral > .icon { color: var(--lv-attention); }
.lv-notice-danger { border-color: var(--lv-red-line); background-color: var(--lv-red-fill); color: var(--lv-red-ink); }
.lv-notice-danger > .icon { color: var(--lv-red-ink); }

.lv-disclaimer { margin: 0; color: var(--lv-ink-55); font-size: 14px; line-height: 1.5; }

/* A document's read, stage by stage (Documents, an upload, a document): a round mark
   (a tick, a cross, a dot while running), what happened, when; its checks under it. */
.lv-timeline { display: grid; margin: 0; padding: 0; list-style: none; container-type: inline-size; }
.lv-timeline > li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: start; gap: 2px 10px; padding: 8px 0; border-top: 1px solid var(--lv-keyline); font-size: 14px; }
.lv-timeline-step { font-weight: 600; }
.lv-timeline-result { display: block; color: var(--lv-ink-55); font-size: 13px; }
.lv-timeline > li[data-state="failed"] .lv-timeline-result { color: var(--lv-red-ink); }
.lv-timeline > li[data-state="running"] .lv-timeline-result { color: var(--lv-attention); }
.lv-timeline-when { color: var(--lv-ink-55); font-size: 12px; white-space: nowrap; }
/* A list too narrow for a step beside its time (an upload's row in the terminal) puts the time under the step. */
@container (max-width: 280px) {
  .lv-timeline > li { grid-template-columns: 20px minmax(0, 1fr); }
  .lv-timeline-when { grid-column: 2; white-space: normal; }
}
.lv-timeline-checks { display: grid; gap: 4px; margin: 6px 0 0; padding: 0; color: var(--lv-ink-55); font-size: 13px; list-style: none; }
.lv-timeline-checks > li { display: flex; align-items: flex-start; gap: 8px; }
.lv-timeline-checks .lv-state-mark { width: 16px; height: 16px; margin-top: 1px; font-size: 9px; }
.lv-timeline-checks .lv-progress { margin-top: 4px; }
.lv-state-mark { box-sizing: border-box; display: inline-grid; flex: none; place-items: center; width: 20px; height: 20px; border-radius: 9999px; font-size: 11px; font-weight: 600; line-height: 1; }
.lv-state-mark[data-state="done"] { background-color: var(--lv-green-700); color: #fff; }
.lv-state-mark[data-state="done"]::before { content: "\2713"; }
.lv-state-mark[data-state="failed"] { background-color: var(--lv-red-ink); color: #fff; }
.lv-state-mark[data-state="failed"]::before { content: "\2715"; }
.lv-state-mark[data-state="running"] { border: 2px solid var(--lv-gold-500); }
.lv-state-mark[data-state="running"]::before { content: ""; width: 6px; height: 6px; border-radius: 9999px; background-color: var(--lv-gold-500); }
.lv-state-mark[data-state="waiting"] { border: 2px solid var(--lv-line-field); }
.lv-state-mark:is([data-state="skipped"], [data-state="not_needed"]) { background-color: var(--lv-gold-100); color: var(--lv-ink-55); }
.lv-state-mark:is([data-state="skipped"], [data-state="not_needed"])::before { content: "\2013"; }
.lv-state-mark[data-state="check"] { background-color: var(--lv-attention-fill); color: var(--lv-attention); }
.lv-state-mark[data-state="check"]::before { content: "!"; }
/* The stage summary (Documents' tiles, an upload's rows): the stage now (its pill and result) and a
   caret over the running step's progress and the stage bar, folded over the stage list. */
.lv-stages > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 8px; min-height: 32px; list-style: none; cursor: pointer; }
@media (max-width: 767px) { .lv-stages > summary { min-height: 44px; } }
.lv-stages > summary::-webkit-details-marker { display: none; }
.lv-stages > summary > .icon { width: 14px; height: 14px; color: var(--lv-ink-55); transition: transform 200ms ease-out; }
.lv-stages[open] > summary > .icon { transform: rotate(180deg); }
.lv-stages > summary > :is(.lv-stages-progress, .lv-stages-bar) { grid-column: 1; }
.lv-stages > .lv-timeline { margin-top: 6px; }
.lv-stages-now { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.lv-stages-progress { max-width: 240px; }
.lv-stages-bar { display: flex; gap: 3px; width: 160px; }
.lv-stages-bar > span { flex: 1; height: 4px; border-radius: 9999px; background-color: var(--lv-keyline); }
.lv-stages-bar > span:is([data-state="done"], [data-state="not_needed"]) { background-color: var(--lv-green-700); }
.lv-stages-bar > span[data-state="running"] { background-color: var(--lv-gold-500); }
.lv-stages-bar > span[data-state="failed"] { background-color: var(--lv-red-ink); }

/* Chips, empty lines, a section's heading row, folds, the way back. */
.lv-empty { margin: 0; padding: 20px 24px; color: var(--lv-ink-55); font-size: 14px; list-style: none; }
.lv-section-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 16px; }
.lv-section-head > .lv-quiet { order: 2; flex-basis: 100%; font-size: 14px; }
/* A group's one-line description beside its title, where the section has no action. */
.lv-section-head-inline { align-items: baseline; gap: 4px 12px; }
.lv-section-head-inline > .lv-quiet { order: 0; flex-basis: auto; }
.lv-section-head :is(.lv-btn, .lv-link, .lv-actions) { margin-left: auto; }
.lv-fold > summary { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 24px; border-top: 1px solid var(--lv-keyline); color: var(--lv-green-700); font-size: 14px; font-weight: 500; list-style: none; cursor: pointer; }
.lv-fold > summary::-webkit-details-marker { display: none; }
.lv-fold > summary .icon { width: 16px; height: 16px; transition: transform 200ms ease-out; }
.lv-fold[open] > summary .icon { transform: rotate(180deg); }
/* A card that folds (the prototype's accordion card): a white title row of a row's 64px that turns
   gold-50 under the pointer, the card's title and a quiet line under it, the caret at the right; its body under it. */
.lv-fold-card { overflow: hidden; }
.lv-fold-card > summary { display: grid; grid-template-columns: minmax(0, 1fr) 16px; align-items: center; gap: 2px 12px; min-height: 64px; padding: 12px 24px; list-style: none; cursor: pointer; transition: background-color var(--lv-duration) var(--lv-ease); }
.lv-fold-card > summary::-webkit-details-marker { display: none; }
.lv-fold-card > summary > :not(.icon) { grid-column: 1; overflow-wrap: anywhere; }
.lv-fold-card > summary h2 { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.3; }
.lv-fold-card > summary > .icon { grid-column: 2; grid-row: 1 / span 2; width: 16px; height: 16px; color: var(--lv-ink-55); transition: transform 200ms ease-out; }
.lv-fold-card[open] > summary > .icon { transform: rotate(180deg); }
.lv-fold-card > summary:focus-visible { outline: 2px solid var(--lv-green-700); box-shadow: none; outline-offset: -2px; border-radius: 15px; }
.lv-fold-card[open] > summary:focus-visible { border-radius: 15px 15px 0 0; }
@media (hover: hover) and (pointer: fine) { .lv-fold-card > summary:hover { background-color: var(--lv-gold-50); } }
.lv-fold-card > summary:active { background-color: var(--lv-gold-100); transition-duration: 0ms; }
.lv-fold-card-body { display: grid; gap: 16px; margin: 0; padding: 0 24px 24px; }
@media (max-width: 833px) { .lv-fold-card > summary, .lv-fold-card-body { padding-inline: 16px; } }
/* A summary that spans a card that clips (a row, a fold at the card's foot) draws its ring
   inside itself: drawn outside, the card cuts it to one line. */
:is(.lv-row > details, .lv-fold:not(.lv-tax-gift > .lv-fold, .lv-rules-use)) > summary:focus-visible { box-shadow: inset 0 0 0 2px var(--lv-green-700); }
/* A fold's contents fade in as it opens, as the prototype's accordion moves (accordion-down, 0.2s
   ease-out), and go at once as it closes. Only a change of open state transitions, so a fold that
   loads open, or comes back open in a poll's swap, shows at once. */
:is(.lv-fold, .lv-row > details, .lv-fold-card, .lv-stages, .lv-review-more)::details-content { opacity: 0; transition: opacity 200ms ease-out; }
:is(.lv-fold, .lv-row > details, .lv-fold-card, .lv-stages, .lv-review-more)[open]::details-content { opacity: 1; }
/* Where the browser can move to a height of auto, a fold also opens in height. Its contents are
   cut to the growing box only while it opens: after, a popover inside can reach past it. */
@supports (interpolate-size: allow-keywords) {
  :is(.lv-fold, .lv-row > details, .lv-fold-card, .lv-stages, .lv-review-more), :is(.lv-fold, .lv-row > details, .lv-fold-card, .lv-stages, .lv-review-more)::details-content { interpolate-size: allow-keywords; }
  :is(.lv-fold, .lv-row > details, .lv-fold-card, .lv-stages, .lv-review-more)::details-content { block-size: 0; overflow-y: clip; }
  :is(.lv-fold, .lv-row > details, .lv-fold-card, .lv-stages, .lv-review-more)[open]::details-content { block-size: auto; overflow-y: visible; transition: opacity 200ms ease-out, block-size 200ms var(--lv-ease-out), content-visibility 200ms allow-discrete, overflow 0ms 200ms allow-discrete; }
}
.lv-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; color: rgba(255, 255, 255, 0.8); font-size: 14px; text-decoration: none; overflow-wrap: anywhere; }
.lv-back .icon { width: 14px; height: 14px; }
@media (hover: hover) and (pointer: fine) { .lv-back:hover { color: #fff; } }

/* A list of records in a card: each row a fold, name and chip on the
   left, the value and a caret on the right, an edit pencil beside it. */
.lv-rows { overflow: hidden; }
:where(.lv-rows) ul { margin: 0; padding: 0; list-style: none; }
/* A card of rows brings no padding, so its heading row brings its own; a keyline leads into the rows. */
.lv-rows > .lv-card-head { margin: 0; padding: 20px 24px 12px; }
.lv-rows > .lv-card-head + :is(ul, ol) > li:first-child, .lv-rows > .lv-card-head + .lv-empty { border-top: 1px solid var(--lv-keyline); }
.lv-rows-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 14px 24px; background-color: var(--lv-head); border-bottom: 1px solid var(--lv-line-card); }
.lv-rows-head h3 { margin: 0; }
.lv-rows-head span { color: var(--lv-ink-55); font-size: 13px; }
.lv-rows ul + .lv-rows-head { border-top: 1px solid var(--lv-line-card); }
.lv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; border-bottom: 1px solid var(--lv-keyline); transition: background-color var(--lv-duration) var(--lv-ease); }
/* A decision answered in its card (patterns/loading.md): the row dims once saving it passes 150ms,
   and takes the focus back when the card has answered. */
:is(.lv-row, .lv-firm-item, .lv-upl-fact, .lv-sort-row):has(form.htmx-request) { opacity: 0.6; transition: opacity 150ms var(--lv-ease) 150ms; }
:is(.lv-row, .lv-firm-item, .lv-upl-fact):focus-visible { outline: 2px solid var(--lv-green-700); outline-offset: -2px; }
.lv-card-head > .lv-notice { margin-top: 12px; }
.lv-rows li.lv-row:last-child { border-bottom: 0; }
.lv-row > details > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; align-items: center; gap: 12px; min-height: 64px; padding: 12px 8px 12px 24px; list-style: none; cursor: pointer; }
.lv-row > details > summary::-webkit-details-marker { display: none; }
.lv-row > details > summary > .icon { width: 16px; height: 16px; color: var(--lv-ink-55); transition: transform 200ms ease-out; }
.lv-row > details[open] > summary > .icon { transform: rotate(180deg); }
@media (hover: hover) and (pointer: fine) { .lv-row:has(> details > summary:hover) { background-color: var(--lv-gold-50); } }
.lv-row:has(> details > summary:active) { background-color: var(--lv-gold-100); transition-duration: 0ms; }
.lv-row-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.lv-row-name b { margin-right: 4px; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.lv-row-value { font-size: 15px; font-weight: 600; text-align: right; white-space: nowrap; }
.lv-row-more { display: grid; gap: 4px; padding: 0 24px 16px; color: var(--lv-ink-55); font-size: 14px; }
.lv-row-more p { margin: 0; }
.lv-row-more ul { display: grid; gap: 2px; padding-left: 16px; list-style: disc; }
.lv-row-edit { display: grid; place-items: center; width: 44px; height: 44px; margin: 10px 12px 0 0; border-radius: 9999px; color: var(--lv-ink-55); }
.lv-row-edit .icon { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) { .lv-row-edit:hover { background-color: var(--lv-green-tint); color: var(--lv-green-700); } }
.lv-row-plain { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; min-height: 64px; padding: 12px 24px; }
.lv-row-plain form { margin: 0; }
.lv-row-plain > .lv-row-value:last-child { grid-column: -2; }
/* A statement payment, open (Find and add gifts) or the summary of a fold row (the sandbox): payee,
   date and amount on one line, the date in its own column after the payee, as the prototype's possible gifts. */
.lv-payment-line { display: grid; grid-template-columns: minmax(0, 1fr) 126px minmax(11ch, auto); align-items: baseline; gap: 12px; }
.lv-payment-marks:empty { display: none; }

/* A page's one column, and an add or edit page's narrow one with the form in a card. */
.lv-page { display: grid; gap: var(--lv-page-gap); }
.lv-owner :is(.lv-page, .lv-narrow) > .lv-page-head:has(+ :is(.lv-card, .lv-cards, .lv-clock, .lv-loads)) { margin-bottom: calc(24px - var(--lv-page-gap)); }
.lv-narrow { display: grid; gap: var(--lv-page-gap); max-width: 640px; margin-inline: auto; }
/* A card's grey head: its title or its state at the left, one small action at the right. */
.lv-band-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 16px 24px; border-bottom: 1px solid var(--lv-line-card); background-color: var(--lv-background); }
.lv-band-head h2 { margin: 0; font-size: 17px; font-weight: 600; color: var(--lv-ink); }
/* First in its card, the head takes the card's corners inside its 1px edge, so the card need not clip. */
.lv-card > .lv-band-head:first-child { border-radius: 15px 15px 0 0; }
@media (max-width: 833px) { .lv-band-head { padding: 14px 16px; } }
.lv-form-card { display: grid; gap: 16px; padding: 24px; }
.lv-form-card > p { min-width: 0; margin: 0; line-height: 1.5; }
/* The authenticator's QR code (mfa/totp/activate_form.html). */
.lv-form-card > img { width: 200px; height: 200px; justify-self: start; }
.lv-form-card > .lv-card-head { margin-bottom: 0; }
@media (max-width: 639px) { .lv-form-card, .lv-panel { padding: 20px; } }
.lv-form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; padding-top: 4px; }
/* Log new gift, step by step (static/js/gift-steps.js): one column, "1 of 3" over an
   lv-progress; once the script runs one step shows at a time and slides in 8px from the
   side it comes from. The check step lists each step's answers with a Change link. */
.lv-gift-stephead { display: grid; gap: 12px; }
.lv-gift-stephead h2 { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.3; }
.lv-gift-stephead h2:focus { outline: none; }
.lv-gift-stephead [data-step-count] { color: var(--lv-green-700); font-variant-numeric: tabular-nums; }
.lv-gift-form { display: grid; gap: 24px; margin: 0; }
.lv-gift-step { display: grid; gap: 20px; min-width: 0; margin: 0; padding: 0; border: 0; }
.lv-gift-form [hidden], .lv-gift-steps > [hidden] { display: none; }
.lv-gift-legend { padding: 0; font-size: 17px; font-weight: 600; }
.lv-gift-section { margin: 0; padding-top: 16px; border-top: 1px solid var(--lv-keyline); font-size: 15px; font-weight: 600; }
.lv-gift-summary { display: grid; margin: 0; border: 1px solid var(--lv-keyline); border-radius: 12px; }
.lv-gift-summary > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 16px; border-top: 1px solid var(--lv-keyline); }
.lv-gift-summary > div:first-child { border-top: 0; }
.lv-gift-summary dt { color: var(--lv-ink-55); font-size: 13px; }
.lv-gift-summary dd { display: grid; gap: 2px; grid-column: 1; margin: 0; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.lv-gift-summary button { grid-column: 2; grid-row: 1 / span 2; align-self: center; min-height: 44px; padding: 0; border: 0; background: none; font-family: inherit; cursor: pointer; }
.lv-gift-treatment { display: grid; gap: 16px; }
.lv-gift-override { display: grid; gap: 20px; }
.lv-gift-override.lv-fold > summary { padding: 0; border-top: 0; }
.lv-gift-form[data-moved="on"] .lv-gift-step:not([hidden]) { animation: lv-step-on 200ms var(--lv-ease-out); }
.lv-gift-form[data-moved="back"] .lv-gift-step:not([hidden]) { animation: lv-step-back 200ms var(--lv-ease-out); }
@keyframes lv-step-on { from { opacity: 0; transform: translateX(8px); } }
@keyframes lv-step-back { from { opacity: 0; transform: translateX(-8px); } }
/* A row's buttons: at the row's end, wrapping; a select beside its button 8px off. */
.lv-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; }
.lv-actions form { display: flex; align-items: center; gap: 8px; max-width: 100%; margin: 0; }
@media (max-width: 639px) { .lv-table-stack .lv-actions { justify-content: flex-start; } }
/* An invite at a card's foot, under its rows: the prototype's add-person form. */
.lv-invite { padding: 20px 24px 24px; border-top: 1px solid var(--lv-keyline); }
.lv-invite > * { margin: 0; }
.lv-invite > * + * { margin-top: 12px; }
.lv-invite > h3 + .lv-note { margin-top: 4px; }
.lv-invite-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: end; gap: 12px; }
.lv-invite-form > .lv-form-errors { grid-column: 1 / -1; }
.lv-invite-form .lv-form-actions { grid-column: auto; padding-top: 0; }
@media (max-width: 833px) { .lv-invite { padding-left: 16px; padding-right: 16px; } }

/* The prototype's segmented switch: a white pill track, the choice solid green. */
/* Options that do not fit one row wrap onto the next, and one wider than the track wraps its words;
   a phone's track takes 16px corners, so a second row stays inside it. */
.lv-segment { display: inline-flex; flex-wrap: wrap; justify-self: start; gap: 4px; max-width: 100%; padding: 4px; border: 1px solid var(--lv-line-input); border-radius: 9999px; background-color: #fff; }
.lv-segment > * { flex: 0 1 auto; transition: background-color var(--lv-duration) var(--lv-ease), color var(--lv-duration) var(--lv-ease); }
.lv-segment label { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 9999px; color: var(--lv-ink); font-size: 14px; font-weight: 500; cursor: pointer; }
.lv-segment input { position: absolute; opacity: 0; pointer-events: none; }
.lv-segment label:has(input:checked) { background-color: var(--lv-green-700); color: #fff; }
.lv-segment label:has(input:focus-visible) { outline: 2px solid var(--lv-green-700); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .lv-segment label:not(:has(input:checked)):hover { background-color: var(--lv-green-tint); } }
.lv-segment :is(a, button) { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 16px; border: 0; border-radius: 9999px; background: none; color: var(--lv-ink); font: inherit; font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; }
.lv-segment :is(a[aria-current="page"], button[aria-selected="true"]) { background-color: var(--lv-green-700); color: #fff; }
.lv-segment :is(a, button):focus-visible { outline: 2px solid var(--lv-green-700); box-shadow: none; outline-offset: 2px; }
@media (max-width: 767px) { .lv-segment :is(a, button, label) { min-height: 44px; } }
@media (max-width: 639px) {
  .lv-segment { border-radius: 16px; }
  .lv-segment :is(a, button, label) { border-radius: 12px; }
}
@media (hover: hover) and (pointer: fine) { .lv-segment :is(a:not([aria-current]), button:not([aria-selected="true"])):hover { background-color: var(--lv-green-tint); } }
/* A tab or a chip not yet chosen tints on press, at once, as rows and menu items do. */
.lv-segment :is(a:not([aria-current]), button:not([aria-selected="true"]), label:not(:has(input:checked))):active { background-color: var(--lv-green-tint); transition-duration: 0ms; }
/* A person's or organization's initial in a circle, before its name. */
.lv-initial { display: inline-grid; flex: none; place-items: center; width: 36px; height: 36px; border-radius: 9999px; background-color: var(--lv-gold-100); color: var(--lv-attention); font-size: 14px; font-weight: 600; }
.lv-initial-sm { width: 28px; height: 28px; font-size: 12px; }
.lv-initial-done { background-color: var(--lv-green-tint); color: var(--lv-green-700); }
/* A step's number before its title (the prototype's numbered section). */
.lv-step-n { display: inline-grid; flex: none; place-items: center; width: 28px; height: 28px; border-radius: 9999px; background-color: var(--lv-green-700); color: #fff; font-size: 14px; font-weight: 600; line-height: 1; }
.lv-count { display: inline-grid; place-items: center; min-width: 20px; height: 16px; padding: 0 6px; line-height: 16px; border-radius: 9999px; background-color: rgba(171, 129, 23, 0.1); color: var(--lv-amber); font-size: 12px; font-weight: 600; }
.lv-segment :is(a[aria-current="page"], button[aria-selected="true"]) .lv-count, .lv-filter-chip[aria-current="page"] .lv-count { background-color: rgba(255, 255, 255, 0.2); color: #fff; }

/* A filter chip (the prototype's chipClass): a white pill with a gold edge, solid green when chosen. */
.lv-filter-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 16px; border: 1px solid var(--lv-line-input); border-radius: 9999px; background-color: #fff; color: var(--lv-ink); font: inherit; font-size: 12px; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color var(--lv-duration) var(--lv-ease), border-color var(--lv-duration) var(--lv-ease), color var(--lv-duration) var(--lv-ease); }
.lv-filter-chip:is([aria-current="page"], :has(> input:checked)) { border-color: var(--lv-green-700); background-color: var(--lv-green-700); color: #fff; }
.lv-filter-chip:focus-visible, .lv-filter-chip:has(> input:focus-visible) { outline: 2px solid var(--lv-green-700); box-shadow: none; outline-offset: 2px; }
.lv-filter-chip > input { position: absolute; opacity: 0; pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .lv-filter-chip:not([aria-current], :has(> input:checked)):hover { border-color: var(--lv-green-700); } }
.lv-filter-chip:not([aria-current], :has(> input:checked)):active { border-color: var(--lv-green-700); background-color: var(--lv-green-tint); transition-duration: 0ms; }
@media (max-width: 767px) { .lv-filter-chip { min-height: 44px; } }

/* The tax working (taxengine partials, the gift form, the sandbox): figures in a grid, the rule steps folded away. */
.lv-tax { overflow: hidden; }
.lv-tax-head { flex-wrap: wrap; align-items: center; margin: 0; padding: 24px 24px 0; }
.lv-tax-head h2 { margin-right: auto; }
/* The date the working assumes is a chip; a long one (a couple's order) wraps its words on a phone. */
:is(.lv-tax-head, .lv-tax-gift-head, .lv-doc-options) .lv-chip { flex-shrink: 0; max-width: 100%; height: auto; min-height: 24px; padding-block: 2px; white-space: normal; }
.lv-tax-note { margin: 12px 24px 0; }
.lv-tax-note:empty { display: none; }
.lv-tax-figures { margin: 16px 24px 0; }
.lv-tax-figures dd { display: grid; gap: 2px; font-size: 17px; font-weight: 600; }
.lv-tax-figures [data-state="unanswered"] dd { color: var(--lv-attention); }
.lv-tax-hint { color: var(--lv-ink-55); font-size: 13px; font-weight: 400; }
.lv-tax > .lv-tax-note + .lv-fold, .lv-tax > .lv-fold { margin-top: 16px; }
.lv-steps-list { display: grid; margin: 0; padding: 0 24px 16px; list-style: none; }
.lv-step-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--lv-keyline); font-size: 14px; }
.lv-step-row:first-child { border-top: 0; }
.lv-step-row small.lv-hint { display: block; }
.lv-rows > .lv-steps-list:first-child { padding-top: 8px; }
/* Your record's parts (estates/record.html): each row edged green, or gold in the group of parts
   that add to the record; number, name, (i), fact, then its state and action at the right. */
.lv-record-parts { margin: 0; padding: 0; list-style: none; }
.lv-record-part { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 16px; border-left: 5px solid var(--lv-green-700); }
.lv-record-part + .lv-record-part { border-top: 1px solid var(--lv-keyline); }
.lv-record-parts-more .lv-record-part { border-left-color: var(--lv-gold-500); }
.lv-record-parts-more .lv-step-n-plain { color: var(--lv-gold-600); }
.lv-record-part h3 { margin: 0; font-size: 17px; font-weight: 600; }
.lv-record-part > .lv-quiet { font-size: 14px; }
.lv-record-act { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.lv-record-act .lv-link { display: inline-flex; align-items: center; min-height: 44px; }
/* A plain number before a row's name: the step number without its circle. */
.lv-step-n-plain { width: 28px; height: auto; border-radius: 0; background: none; color: var(--lv-green-700); font-size: 17px; }
/* A state with nothing waiting, beside an action: a green tick and its words. */
.lv-done { display: inline-flex; align-items: center; gap: 6px; color: var(--lv-green-700); font-size: 14px; }
.lv-done .icon { width: 16px; height: 16px; }
/* A count that loads after the page (estates/_record_owned.html, _record_gifts.html) fades in;
   the link beside it was there already and stays. htmx marks what it swaps in for a moment. */
.lv-record-part > .lv-quiet, .lv-record-act > :is(.lv-pill, .lv-done) { transition: opacity var(--lv-duration) var(--lv-ease); }
.lv-record-part > .lv-quiet.htmx-added, .lv-record-act.htmx-added > :is(.lv-pill, .lv-done) { opacity: 0; }
/* An (i) after a heading: a ringed letter that opens a short note under it (static/js/info.js
   shuts it on Escape and on a press outside). */
.lv-info { position: relative; }
.lv-info > summary { position: relative; display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1px solid rgba(11, 82, 51, 0.4); border-radius: 9999px; color: var(--lv-green-700); font-size: 12px; font-weight: 600; list-style: none; cursor: pointer; }
.lv-info > summary::-webkit-details-marker { display: none; }
.lv-info[open] > summary { border-color: var(--lv-green-700); background-color: var(--lv-green-700); color: #fff; }
@media (hover: hover) and (pointer: fine) { .lv-info:not([open]) > summary:hover { background-color: var(--lv-green-tint); } }
@media (max-width: 767px) { .lv-info > summary::after { content: ""; position: absolute; inset: -8px; } }
.lv-info > p { position: absolute; top: calc(100% + 8px); left: -12px; z-index: 40; width: max-content; max-width: min(320px, 80vw); margin: 0; padding: 12px 16px; border: 1px solid var(--lv-line-card); border-radius: 12px; background-color: #fff; box-shadow: var(--lv-shadow-pop); color: var(--lv-ink); font-size: 14px; font-weight: 400; animation: lv-pop-in 160ms var(--lv-ease-out); transform-origin: 26px 0; }
.lv-rule { padding: 2px 8px; border-radius: 6px; background-color: var(--lv-gold-100); color: var(--lv-attention); font-size: 12px; font-weight: 600; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { a.lv-rule:hover { background-color: var(--lv-line-input); } }
.lv-step-a { justify-self: end; font-weight: 600; }
.lv-step-facts { display: flex; flex-wrap: wrap; grid-column: 2 / -1; gap: 4px 16px; margin: 0; color: var(--lv-ink-55); font-size: 13px; }
/* Each fact runs as a line: the label, a space, the value, wrapping at spaces only. */
.lv-step-facts :is(dt, dd) { display: inline; }
.lv-step-facts dt::after { content: " "; }
.lv-step-facts dd { margin: 0; color: var(--lv-ink); }
/* One gift's working (taxengine/_exemptions.html, _clock.html), a part of the card it sits in: the gift form's and a sandbox payment's. */
.lv-tax-gift { display: grid; min-width: 0; }
.lv-tax-gift-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.lv-tax-gift-head h3 { margin: 0 auto 0 0; }
.lv-tax-gift-note { margin: 12px 0 0; }
.lv-tax-gift .lv-tax-figures { margin: 16px 0 0; }
.lv-tax-gift .lv-pill { justify-self: start; }
.lv-tax-gift > .lv-fold { margin: 8px 0 0; }
.lv-tax-gift > .lv-fold > summary { padding: 0; }
.lv-tax-gift .lv-steps-list { padding: 0 0 16px; }
.lv-tax-gift .lv-step-row[data-answer="unreached"] { color: var(--lv-ink-55); }
.lv-tax-gift .lv-step-row { align-items: start; }
.lv-step-a .lv-tax-hint { margin-left: 8px; }

/* Fields a page writes itself: white, ink at 15%, 8px corners. */
.lv-input { box-sizing: border-box; height: 44px; padding: 0 12px; border: 1px solid var(--lv-line-field); border-radius: 8px; background-color: #fff; color: var(--lv-ink); font: inherit; font-size: 14px; }
.lv-input:focus-visible { outline: 2px solid var(--lv-green-700); box-shadow: none; outline-offset: 0; }
/* Compact, beside a small button: in a row, a bar or a filter. */
.lv-input-sm { height: 36px; }
@media (max-width: 767px) { .lv-input-sm { height: 44px; } }
/* A value to copy (lv-copy): a read-only field and the button that copies it, 8px apart, the field
   taking the room; under 834px both run full width, the button under the field. */
.lv-copy { display: flex; flex: 1 1 320px; gap: 8px; min-width: 0; }
.lv-copy .lv-input { flex: 1; min-width: 0; }
@media (max-width: 833px) {
  .lv-copy { flex-basis: 100%; flex-wrap: wrap; }
  .lv-copy .lv-btn { width: 100%; }
}
/* A list's tool row: the segment at the left, the search at the right; a keyline under it inside a card. */
.lv-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding: 16px 24px; }
.lv-tools:not(:last-child) { border-bottom: 1px solid var(--lv-keyline); }
@media (max-width: 833px) { .lv-tools { padding: 16px; } }
/* A list card: one card holds the filters, a heading row (title, count, add) and the
   records, rows edge to edge between keylines (lv-list) or a table. */
.lv-list-card { overflow: hidden; }
/* Its filters ask for the page again: the list dims once the wait passes 150ms, as a region does
   (patterns/loading.md). So do the 7-year clock's tiles under its slider, and how a gift is
   treated while the form works it out again. */
:is(.lv-list-card.htmx-request > .lv-section, .lv-clock.htmx-request .lv-figure-card, #gift-treatment.htmx-request) { opacity: 0.6; transition: opacity 150ms var(--lv-ease) 150ms; }
.lv-list-card > .lv-section { gap: 0; }
.lv-list-card .lv-section-head { padding: 16px 24px; }
.lv-list-card .lv-card-note { margin: 0 24px 16px; }
.lv-list-card :is(.lv-empty, .lv-pages, .lv-table-card) { border-top: 1px solid var(--lv-keyline); }
.lv-list-card .lv-pages { padding: 16px 24px; }
@media (max-width: 833px) {
  .lv-list-card .lv-section-head, .lv-list-card .lv-pages { padding-inline: 16px; }
  .lv-list-card .lv-card-note { margin-inline: 16px; }
}
.lv-list { margin: 0; padding: 0; border-top: 1px solid var(--lv-keyline); list-style: none; }
.lv-list > .lv-tile { border: 0; border-radius: 0; }
.lv-list > .lv-tile + .lv-tile { border-top: 1px solid var(--lv-keyline); }
.lv-search { display: flex; flex: 1 1 260px; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 420px; margin: 0; }
.lv-search .lv-input { flex: 1 1 160px; min-width: 0; }
@media (max-width: 833px) { .lv-search { max-width: none; } }
.lv-sort { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--lv-ink-55); font-size: 14px; }
.lv-sort .lv-select { width: auto; }
/* A list's filters in one row that wraps: each select a pill as wide as its choice, with the
   filter chip's height, line and type; the search takes what is left. */
.lv-filters { justify-content: flex-start; gap: 8px; }
.lv-filters select.lv-select { width: auto; max-width: 100%; height: 34px; padding: 0 32px 0 14px; border-color: var(--lv-line-input); border-radius: 9999px; background-position: right 12px center; background-size: 14px; font-size: 12px; font-weight: 500; field-sizing: content; cursor: pointer; transition: border-color var(--lv-duration) var(--lv-ease); }
@media (hover: hover) and (pointer: fine) { .lv-filters select.lv-select:hover { border-color: var(--lv-green-700); } }
@media (max-width: 767px) { .lv-filters select.lv-select { height: 44px; } }
@media (min-width: 768px) {
  .lv-filters .lv-segment { padding: 2px; }
  .lv-filters .lv-segment a { min-height: 30px; padding: 0 14px; font-size: 12px; }
  .lv-filters .lv-search :is(.lv-input, .lv-btn) { height: 34px; border-radius: 9999px; font-size: 12px; }
  .lv-filters .lv-search .lv-input { padding-inline: 14px; }
}

/* A form's fields (forms/form.html, forms/field.html).
   The control carries core.forms' class, and the wrapper our field class
   (a script hook), so these rules name elements under lv-field and set
   every property a control needs. */
.lv-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; margin: 0; }
.lv-form-grid > :is(.lv-field:has(textarea), .lv-field-description, .lv-form-errors, .lv-hint) { grid-column: 1 / -1; }
.lv-form-errors { padding: 12px 16px; border: 1px solid var(--lv-red-line); border-radius: 12px; background-color: var(--lv-red-fill); color: var(--lv-red-ink); font-size: 14px; line-height: 1.5; }
.lv-form-errors ul { margin: 0; padding: 0; list-style: none; }
.lv-field { display: grid; align-content: start; gap: 6px; min-width: 0; margin: 0; }
.lv-field[hidden] { display: none; }
.lv-label { color: var(--lv-ink); font-size: 14px; font-weight: 500; }
.lv-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.lv-fieldset > legend { margin-bottom: 6px; padding: 0; }
.lv-fieldset > legend:has(+ .lv-choices) { margin-bottom: 12px; }
.lv-field :is(input:not([type="checkbox"], [type="radio"], [type="hidden"], [type="file"]), select, textarea) {
  box-sizing: border-box;
  display: block;
  width: 100%;
  margin: 0;
  border: 1px solid var(--lv-line-field);
  border-radius: 8px;
  background-color: #fff;
  color: var(--lv-ink);
  font: inherit;
  font-size: 14px;
  box-shadow: none;
  transition: border-color var(--lv-duration) var(--lv-ease);
}
.lv-field :is(input:not([type="checkbox"], [type="radio"], [type="hidden"], [type="file"]), select) { height: 44px; padding: 0 12px; }
/* Every select, a form's or one a page writes (lv-select), has the prototype's chevron:
   lucide's chevron-down, 16px, ink at 50%, 12px from the edge (ui/select.tsx). */
:is(.lv-field select, select.lv-select):not([multiple]) {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111111' stroke-opacity='0.5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-size: 16px;
  background-repeat: no-repeat;
}
.lv-field textarea { height: 96px; padding: 12px; line-height: 1.5; resize: vertical; }
.lv-field textarea.textarea { min-height: 96px; }
/* A read-only textarea holds recovery codes: as tall as its lines, the codes in the mono face, tracked. */
.lv-field textarea[readonly] { height: auto; font-family: var(--lv-mono); letter-spacing: 0.08em; }
.lv-field input[type="file"] { box-sizing: border-box; display: block; width: 100%; height: auto; margin: 0; padding: 6px; border: 1px solid var(--lv-line-field); border-radius: 8px; background-color: #fff; color: var(--lv-ink-55); font: inherit; font-size: 14px; box-shadow: none; transition: border-color var(--lv-duration) var(--lv-ease); }
.lv-field input[type="file"]::file-selector-button { height: 32px; margin-right: 12px; padding: 0 12px; border: 1px solid var(--lv-green-700); border-radius: 6px; background-color: #fff; color: var(--lv-green-700); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
:is(.lv-field :is(input, textarea), .lv-input)::placeholder { color: var(--lv-ink-muted); }
/* Former names (people.forms.FormerNamesInput): a row each of the name and the day it changed,
   with Remove; "Add a previous name" under them adds a row. Only the half a row is missing turns red. */
.lv-names { display: grid; gap: 8px; }
.lv-names-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 12rem) auto; align-items: center; gap: 8px 12px; }
.lv-names-row > label { min-width: 0; }
.lv-names-add { justify-self: start; }
.lv-field-invalid .lv-names input:not([aria-invalid="true"]) { border-color: var(--lv-line-field); }
@media (max-width: 639px) {
  .lv-names-row { grid-template-columns: minmax(0, 1fr) auto; }
  .lv-names-row > label:first-child { grid-column: 1 / -1; }
}
.lv-field :is(input:not([type="checkbox"], [type="radio"]), select, textarea):focus-visible { outline: 2px solid var(--lv-green-700); outline-offset: 0; border-color: var(--lv-green-700); box-shadow: none; }
.lv-field :is(input:not([type="checkbox"], [type="radio"]), select, textarea):disabled { background-color: var(--lv-gold-50); color: var(--lv-ink-55); opacity: 1; cursor: not-allowed; }
.lv-field-invalid :is(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select, textarea), .lv-field :is(input:not([type="checkbox"], [type="radio"]), select, textarea)[aria-invalid="true"] { border-color: var(--lv-red); }
:is(.lv-field-invalid :is(input:not([type="checkbox"], [type="radio"]), select, textarea), .lv-field :is(input:not([type="checkbox"], [type="radio"]), select, textarea)[aria-invalid="true"]):focus-visible { outline-color: var(--lv-red); border-color: var(--lv-red); }
/* Who a gift is to (the prototype's beneficiary picker; static/js/person-picker.js): a button
   drawn as the field's select that opens a white card under it. Add new beneficiary first in
   green, a search, then the people, each with its relationship at the end and a circle that
   fills when chosen. A new beneficiary's name and relationship sit in a green-tinted box. */
.lv-gift-step > .lv-caps { margin: 0 0 -8px; }
.lv-pick { position: relative; }
.lv-pick-button { box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; height: 44px; margin: 0; padding: 0 12px; border: 1px solid var(--lv-line-field); border-radius: 8px; background-color: #fff; color: var(--lv-ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; transition: border-color var(--lv-duration) var(--lv-ease); }
.lv-pick-button > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-pick-button[data-none] > span { color: var(--lv-ink-muted); }
.lv-pick-button .icon { flex: none; width: 16px; height: 16px; color: var(--lv-ink-55); transition: transform 160ms var(--lv-ease-out); }
.lv-pick-button[aria-expanded="true"] { border-color: var(--lv-green-700); }
.lv-pick-button[aria-expanded="true"] .icon { transform: rotate(180deg); }
@media (hover: hover) and (pointer: fine) { .lv-pick-button:hover { border-color: var(--lv-green-700); } }
.lv-pick-button:focus-visible { outline: 2px solid var(--lv-green-700); outline-offset: 0; border-color: var(--lv-green-700); }
.lv-field-invalid .lv-pick-button { border-color: var(--lv-red); }
.lv-pick-pop { position: absolute; top: calc(100% + 4px); right: 0; left: 0; z-index: 40; overflow: hidden; border: 1px solid var(--lv-line-card); border-radius: 12px; background-color: #fff; box-shadow: var(--lv-shadow-pop); animation: lv-pop-in 160ms var(--lv-ease-out); transform-origin: top; }
.lv-pick-new { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; margin: 0; padding: 0 16px; border: 0; border-bottom: 1px solid var(--lv-line-card); background-color: var(--lv-green-tint); color: var(--lv-green-700); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.lv-pick-new .icon, .lv-pick-search .icon { flex: none; width: 16px; height: 16px; }
.lv-pick-search { display: flex; align-items: center; gap: 8px; padding: 0 16px; border-bottom: 1px solid var(--lv-line-card); color: var(--lv-ink-55); }
.lv-field .lv-pick-search input[type="search"] { height: 44px; padding: 0; border: 0; border-radius: 0; background: none; outline: 0; }
.lv-pick-list { max-height: 192px; overflow-y: auto; padding: 4px; }
.lv-pick-opt { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; margin: 0; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--lv-ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.lv-pick-opt::before { content: ""; flex: none; box-sizing: border-box; width: 16px; height: 16px; border: 1px solid var(--lv-line-field); border-radius: 9999px; background: #fff center / 16px no-repeat; }
.lv-pick-opt[aria-pressed="true"]::before { border-color: var(--lv-green-700); background-color: var(--lv-green-700); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.lv-pick-sec { margin-left: auto; color: var(--lv-ink-55); font-size: 13px; }
.lv-pick-none { margin: 0; padding: 8px 12px; color: var(--lv-ink-55); font-size: 13px; }
:is(.lv-pick-new, .lv-pick-opt):focus-visible { outline: 2px solid var(--lv-green-700); outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) { .lv-pick-new:hover { background-color: rgba(11, 82, 51, 0.12); } .lv-pick-opt:hover { background-color: var(--lv-gold-100); } }
.lv-pick-new:active { background-color: rgba(11, 82, 51, 0.18); }
.lv-pick-opt:active { background-color: var(--lv-gold-100); }
@media (max-width: 767px) { .lv-pick-opt { min-height: 44px; } }
.lv-new-recipient { display: grid; gap: 16px; padding: 16px; border: 1px solid rgba(11, 82, 51, 0.3); border-radius: 8px; background-color: var(--lv-green-tint); }
.lv-new-recipient-head { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 600; }
.lv-new-recipient-head .icon { width: 16px; height: 16px; color: var(--lv-green-700); }
:is(.lv-field select, .lv-pick, .lv-pick-pop, .lv-pick-opt, .lv-pick-none, .lv-new-recipient)[hidden] { display: none; }
.lv-hint { margin: 0; color: var(--lv-ink-55); font-size: 13px; line-height: 1.5; }
.lv-errors { margin: 0; padding: 0; color: var(--lv-red); font-size: 13px; list-style: none; }
/* A tick box (the prototype's checkbox): a 16px circle with a green edge, green with a white
   tick when ticked; a radio the same circle with a green dot. Its words follow 10px on, the
   box level with their first line; under 768px the row is a 44px press. The label either
   follows the box (a form's field) or wraps the box and its words (a page's own tick). */
.lv-check { display: grid; grid-template-columns: 16px minmax(0, 1fr); align-items: start; align-content: center; gap: 4px 10px; color: var(--lv-ink); font-size: 14px; font-weight: 400; line-height: 1.45; }
.lv-check > :not(input) { grid-column: 2; }
.lv-check > input, .lv-choice-radio > input { appearance: none; width: 16px; height: 16px; margin: 2px 0 0; border: 1px solid var(--lv-green-700); border-radius: 9999px; background: #fff border-box center / 16px no-repeat; cursor: pointer; transition: background-color var(--lv-duration) var(--lv-ease); }
.lv-check > input[type="checkbox"]:checked { background-color: var(--lv-green-700); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
:is(.lv-check, .lv-choice-radio) > input[type="radio"]:checked { background-image: radial-gradient(circle, var(--lv-green-700) 4px, transparent 4.5px); }
.lv-check > input:disabled { opacity: 0.5; cursor: not-allowed; }
.lv-check > label, label.lv-check { font-weight: 400; cursor: pointer; }
@media (max-width: 767px) { .lv-check { min-height: 44px; } }
@media (forced-colors: active) { :is(.lv-check, .lv-choice-radio) > input { appearance: auto; } }
/* A choice (the prototype's RecordChoices): one answer of a few, a label around its radio drawn as an
   outlined button, green-tinted under the pointer and when chosen, its edge 2px when chosen. The
   button is the radio, so the radio is not drawn; lv-choice-radio draws it before the words. */
.lv-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.lv-choice { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 16px; border: 1px solid var(--lv-green-700); border-radius: 8px; background-color: #fff; color: var(--lv-ink); font-size: 14px; font-weight: 500; line-height: 1.45; cursor: pointer; transition: background-color var(--lv-duration) var(--lv-ease); }
.lv-choice:not(.lv-choice-radio) > input { position: absolute; opacity: 0; pointer-events: none; }
.lv-choice-radio > input { flex: none; margin: 0; }
.lv-choice:has(> input:checked) { background-color: var(--lv-green-tint); box-shadow: inset 0 0 0 1px var(--lv-green-700); }
.lv-choice > input:focus-visible { box-shadow: none; }
.lv-choice:has(> input:focus-visible) { outline: 2px solid var(--lv-green-700); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .lv-choice:not(:has(> input:checked)):hover { background-color: var(--lv-green-tint); } }
.lv-unit { position: relative; }
.lv-unit > span { position: absolute; top: 0; bottom: 0; left: 12px; display: flex; align-items: center; color: var(--lv-ink-muted); pointer-events: none; }
.lv-unit-after > span { right: 12px; left: auto; }
.lv-field .lv-unit > input { padding-left: calc(12px + 1.1em); }
.lv-field .lv-unit-after > input { padding-right: calc(12px + 1.3em); padding-left: 12px; }
@media (max-width: 767px) { .lv-form-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 833px) {
  .lv-row > details > summary { grid-template-columns: minmax(0, 1fr) 20px; gap: 4px 12px; padding-left: 16px; }
  .lv-row > details > summary > .lv-row-value { grid-row: 2; text-align: left; }
  .lv-row > details > summary > .icon { grid-column: 2; grid-row: 1 / span 2; }
  .lv-row-more { padding-left: 16px; padding-right: 16px; }
  .lv-timeline > li { grid-template-columns: 20px minmax(0, 1fr); }
  .lv-timeline-when { grid-column: 2; }
  .lv-row-plain { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 16px; }
  .lv-row-plain > :last-child:not(.lv-row-value) { grid-column: 1 / -1; justify-self: start; }
  .lv-payment-line { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .lv-payment-line > .lv-date { grid-column: 1; grid-row: 2; color: var(--lv-ink-55); font-size: 13px; }
  .lv-rows-head { padding: 12px 16px; }
  .lv-rows > .lv-card-head { padding-right: 16px; padding-left: 16px; }
  .lv-empty { padding-inline: 16px; }
  .lv-step-row { grid-template-columns: auto minmax(0, 1fr); }
  .lv-step-a { grid-column: 2; justify-self: start; }
  .lv-section-head :is(.lv-btn, .lv-link) { order: 3; margin-left: 0; }
}

/* ---- The page head with no band: the adviser terminal (firms, networks, Upload only) and the top bar (signed in, no organization) ---- */
/* No green band here: the prototype's terminal pages put a 20px ink
   title on the grey, a muted line under it, and one action level with
   the title on the right. In the terminal content keeps to the left, as in the prototype. */
.lv-terminal .lv-page { max-width: 1200px; }
.lv-terminal .lv-narrow { margin-inline: 0; }
:is(.lv-terminal, .lv-plain) :is(.lv-page, .lv-narrow) { gap: 24px; }
:is(.lv-terminal, .lv-plain) .lv-page-head { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 16px; color: var(--lv-ink); }
:is(.lv-terminal, .lv-plain) .lv-page-head > * { grid-column: 1; }
:is(.lv-terminal, .lv-plain) .lv-page-head h1 { font-size: 20px; }
:is(.lv-terminal, .lv-plain) .lv-section-title { font-size: 18px; }
:is(.lv-terminal, .lv-plain) .lv-page-head p { color: var(--lv-ink-55); font-size: 14px; line-height: 1.5; }
:is(.lv-terminal, .lv-plain) .lv-page-head > .lv-btn { grid-column: 2; grid-row: 1; }
:is(.lv-terminal, .lv-plain) .lv-page-head:has(> .lv-back) > .lv-btn { grid-row: 2; }
:is(.lv-terminal, .lv-plain) .lv-page-head .lv-back { justify-self: start; margin-bottom: 4px; color: var(--lv-green-700); font-weight: 500; }
@media (hover: hover) and (pointer: fine) { :is(.lv-terminal, .lv-plain) .lv-page-head .lv-back:hover { color: var(--lv-green-900); text-decoration: underline; } }
@media (max-width: 833px) {
  :is(.lv-terminal, .lv-plain) .lv-page-head > .lv-btn, :is(.lv-terminal, .lv-plain) .lv-page-head:has(> .lv-back) > .lv-btn { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 8px; }
}

/* ---- Home (estates/overview.html): the prototype's OwnerHome ---- */

.lv-hero { padding: 24px; border-color: var(--lv-line-hero); }
.lv-hero-columns { display: grid; }
.lv-hero-columns:has(> .lv-hero-side) { grid-template-columns: minmax(min-content, 1fr) auto; }
.lv-hero-main { padding-right: 24px; }
.lv-hero-side { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 20px; padding-left: 24px; border-left: 1px solid var(--lv-keyline); }
/* The net estate as a ring: green passes on, gold the tax on the estate (estates/overview.py split). */
.lv-donut-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; }
.lv-donut { position: relative; flex: none; width: 156px; height: 156px; }
.lv-donut svg { display: block; width: 100%; height: 100%; }
.lv-donut circle { fill: none; stroke: var(--lv-green-700); stroke-width: 29.6; }
.lv-donut .lv-donut-tax { stroke: var(--lv-gold-500); }
.lv-donut-pct { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0; }
.lv-donut-pct b { font-size: 28px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.lv-donut-pct span + span { margin-top: 0; }
.lv-donut-pct span { margin-top: 4px; color: var(--lv-ink-55); font-size: 12px; }
.lv-dot-green { background-color: var(--lv-green-700); }
.lv-hero-head { display: flex; align-items: center; gap: 8px; }
.lv-hero-label { margin: 0; font-size: 15px; font-weight: 600; }
.lv-hero-figure { margin: 8px 0 0; font-size: clamp(36px, 9vw, 52px); font-weight: 600; line-height: 1.1; white-space: nowrap; }
.lv-hero-note { margin: 16px 0 0; font-size: 14px; }
.lv-hero-note + .lv-hint { margin: 4px 0 0; }
.lv-hero-empty { margin: 12px 0 0; font-size: 14px; }
.lv-hero-empty + .lv-hero-empty { margin-top: 16px; }
.lv-key { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.lv-key li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lv-key + .lv-hint { margin: 8px 0 0; }
/* The key sits at the card's right: its (i) note opens leftwards. */
.lv-key .lv-info > p { right: -12px; left: auto; transform-origin: calc(100% - 26px) 0; }

.lv-steps > p { margin: 0; font-size: 14px; }
.lv-steps ul { margin: 0; padding: 0; list-style: none; }
.lv-steps li + li { border-top: 1px solid var(--lv-keyline); }
.lv-step { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 16px; padding: 16px 0; color: var(--lv-ink); text-decoration: none; transition: background-color var(--lv-duration) var(--lv-ease); }
.lv-step small { grid-column: 1; }
.lv-step > .lv-link { grid-column: 2; }
/* Home's What needs your input: the work tied to no year, then each tax year's, newest
   first; past five years the rest wait behind a fold. */
.lv-steps-year { display: grid; padding-top: 16px; border-top: 1px solid var(--lv-keyline); }
.lv-steps-year h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0; font-size: 15px; font-weight: 600; }
.lv-steps-year h3 small { color: var(--lv-ink-55); font-size: 13px; font-weight: 400; }
.lv-steps-years { display: grid; gap: 16px; }
.lv-steps-years.lv-fold > summary { padding: 0; }
@media (hover: hover) and (pointer: fine) { .lv-step:hover { background-color: var(--lv-gold-50); } }
.lv-step:active { background-color: var(--lv-gold-100); transition-duration: 0ms; }

.lv-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lv-link-card { display: flex; flex-direction: column; min-height: 220px; padding: 24px; text-decoration: none; transition: box-shadow var(--lv-duration) var(--lv-ease), transform 160ms var(--lv-ease-out); }
a.lv-link-card:active { transform: scale(0.97); }
.lv-card-title { font-weight: 500; }
.lv-card-big { margin-top: 8px; font-size: 36px; font-weight: 600; line-height: 1.25; }
.lv-card-line { margin-top: 8px; }
.lv-card-link { margin-top: auto; padding-top: 16px; }
.lv-plum { color: var(--lv-plum); }
.lv-violet { color: var(--lv-violet); }
.lv-green { color: var(--lv-green-700); }
.lv-gold { color: var(--lv-gold-600); }
/* Two cards a row (Estate and tax's four figures), one a row under 834px. */
.lv-cards-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* A figure card: its title and (i), the figure, a quiet line or two, centred (the prototype's estate figures). */
.lv-figure-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px; text-align: center; }
.lv-figure-card .lv-card-big, .lv-figure-card .lv-card-line { margin-top: 0; }
.lv-figure-card-head { display: flex; align-items: center; gap: 8px; }
.lv-figure-card .lv-card-title { margin: 0; font-size: 15px; }
.lv-figure-card p { margin: 0; }
.lv-figure-card[data-state="unanswered"] .lv-card-big { font-size: 24px; }
/* A list ranked by amount: its filters over a card of rows, each a name, a count, a bar against
   the first row and the amount (Estate and tax's recipients). On a phone the bar goes under. */
.lv-rank-section { display: grid; gap: 16px; }
.lv-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.lv-rank { display: grid; grid-template-columns: minmax(0, 2fr) auto minmax(0, 3fr) auto; column-gap: 16px; margin: 0; padding: 8px 24px; list-style: none; }
.lv-rank-row { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; row-gap: 4px; padding: 12px 0; font-size: 14px; }
.lv-rank-row .lv-quiet { text-align: right; }
.lv-rank-row + .lv-rank-row { border-top: 1px solid var(--lv-keyline); }
.lv-rank-row b { font-weight: 500; overflow-wrap: anywhere; }
.lv-rank-row .lv-quiet { font-size: 12px; }
.lv-rank-a { font-weight: 600; text-align: right; white-space: nowrap; }
.lv-rank-bar { display: block; width: 100%; height: 6px; border: 0; border-radius: 9999px; background: var(--lv-gold-100); appearance: none; }
.lv-rank-bar::-webkit-meter-bar { height: 6px; border: 0; border-radius: 9999px; background: var(--lv-gold-100); }
.lv-rank-bar::-webkit-meter-optimum-value { border-radius: 9999px; background: var(--lv-green-700); }
.lv-rank-bar::-moz-meter-bar { border-radius: 9999px; background: var(--lv-green-700); }
.lv-rank-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin: 0; padding: 16px 24px; border-top: 1px solid var(--lv-keyline); color: var(--lv-ink-55); font-size: 13px; }
@media (max-width: 639px) {
  .lv-rank { grid-template-columns: minmax(0, 1fr) auto; padding-inline: 16px; }
  .lv-rank-row .lv-quiet { grid-row: 2; text-align: left; }
  .lv-rank-bar { grid-column: 1 / -1; grid-row: 3; }
}
/* The 7-year clocks tab: one form of the death date picked on a slider, and what it shows. */
.lv-clock { display: grid; gap: 16px; }
.lv-clock-card { display: grid; gap: 4px; padding: 24px; }
.lv-clock-card p { margin: 0; }
.lv-clock-card > .lv-cards { margin-top: 12px; }
.lv-clock-who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 16px; }
.lv-clock-who .lv-select { flex: 0 1 240px; min-width: 0; }
.lv-clock-owes { font-weight: 600; }
.lv-clock .lv-search { max-width: none; }
.lv-clock-how { margin-top: 16px; background-color: var(--lv-gold-50); box-shadow: none; }
.lv-clock-how > summary { min-height: 44px; padding-block: 8px; }
.lv-clock-how > summary h3 { margin: 0; font-size: 14px; font-weight: 500; }
.lv-clock-date { margin: 0; font-size: 24px; font-weight: 600; line-height: 1.25; }
/* A slider: a gold track and a green thumb, a 44px reach; its scale of dates under it. */
.lv-range { display: block; width: 100%; height: 44px; margin: 0; background: none; appearance: none; cursor: pointer; }
.lv-range::-webkit-slider-runnable-track { height: 8px; border-radius: 9999px; background-color: var(--lv-gold-100); }
.lv-range::-moz-range-track { height: 8px; border-radius: 9999px; background-color: var(--lv-gold-100); }
.lv-range::-webkit-slider-thumb { width: 20px; height: 20px; margin-top: -6px; border: 0; border-radius: 9999px; background-color: var(--lv-green-700); appearance: none; }
.lv-range::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 9999px; background-color: var(--lv-green-700); }
.lv-range:focus-visible { outline: 2px solid var(--lv-green-700); outline-offset: 2px; border-radius: 9999px; }
.lv-range-scale { display: flex; justify-content: space-between; gap: 8px; margin: 4px 0 0; padding: 0; color: var(--lv-ink-55); font-size: 12px; list-style: none; }
@media (max-width: 639px) { .lv-range-scale li:nth-child(even) { display: none; } }
@media (hover: hover) and (pointer: fine) {
  .lv-link-card:hover { box-shadow: var(--lv-shadow-lift); }
  .lv-link-card:hover .lv-card-link { text-decoration: underline; }
}
.lv-link-card:focus-visible { outline: 2px solid var(--lv-green-700); box-shadow: var(--lv-shadow-card); outline-offset: 2px; }

.lv-changes { display: grid; margin: 0; padding: 0; list-style: none; }
.lv-changes li { display: grid; gap: 4px; padding: 12px 24px; border-top: 1px solid var(--lv-keyline); }
.lv-changes small { color: var(--lv-ink-55); font-size: 12px; overflow-wrap: anywhere; }

@media (max-width: 1199px) {
  .lv-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 833px) {
  .lv-hero-columns:has(> .lv-hero-side) { grid-template-columns: minmax(0, 1fr); }
  .lv-hero-main { padding-right: 0; }
  .lv-hero-side { padding: 24px 0 0; margin-top: 24px; border-left: 0; border-top: 1px solid var(--lv-keyline); }
  .lv-cards { grid-template-columns: minmax(0, 1fr); }
  .lv-link-card { min-height: 0; }
  .lv-changes li { padding-right: 16px; padding-left: 16px; }
}

/* ---- What you own (assets/estate.html, _item.html, _offer.html, form.html) ---- */

.lv-found-from h2 { margin: 0; font-size: 15px; }
.lv-found-from ul { display: grid; gap: 2px; margin: 0; padding-left: 16px; }

.lv-offer { grid-template-columns: minmax(0, 1fr); }
.lv-offer > .lv-actions { justify-content: flex-start; padding: 0 24px 16px; }
@media (max-width: 833px) { .lv-offer > .lv-actions { padding-left: 16px; padding-right: 16px; } }

/* ---- Find and add gifts (gifts/review.html): payments to review ---- */
/* The Document log's list card: the payee picked under the filters, then a row per payment,
   its answers at the right and More details under it. */
/* Not a gift's popover opens past the card's foot: the card lets it, its rows clear so no
   square corner shows past the rounded one. */
.lv-review-card { overflow: visible; }
.lv-review-card .lv-review-row { background-color: transparent; }
.lv-review-payee { display: grid; gap: 8px; padding: 16px 24px; border-bottom: 1px solid var(--lv-keyline); }
.lv-list-card .lv-review-payee > .lv-section-head { padding: 0; }
.lv-review-row { flex-wrap: wrap; row-gap: 0; }
.lv-review-row > .lv-actions { flex: none; flex-wrap: wrap; justify-content: flex-end; max-width: 24rem; }
.lv-review-row > .lv-actions > form > .lv-btn { height: auto; padding-block: 8px; line-height: 18px; white-space: normal; }
.lv-review-notes { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; color: var(--lv-ink-55); font-size: 13px; }
.lv-docs-more.lv-review-more > summary { position: static; width: fit-content; margin-top: 4px; padding: 0; }
/* Not a gift opens a popover under its button: what the payment was, the payee's rule, then Save.
   Escape or a press outside shuts it (static/js/info.js); one opens at a time. */
.lv-review-not { position: relative; }
.lv-review-not > summary { list-style: none; }
.lv-review-not > summary::-webkit-details-marker { display: none; }
.lv-review-not > summary .icon { transition: transform 200ms ease-out; }
.lv-review-not[open] > summary .icon { transform: rotate(180deg); }
.lv-review-not > form { position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; display: grid; justify-items: start; gap: 16px; width: 24rem; max-width: none; padding: 16px; border: 1px solid var(--lv-line-card); border-radius: 12px; background-color: #fff; box-shadow: var(--lv-shadow-pop); transform-origin: top right; animation: lv-pop-in 160ms var(--lv-ease-out); }
.lv-review-not .lv-field { width: 100%; }
/* A decision answered in place (patterns/loading.md): the payment dims once saving it passes
   150ms, its new words and buttons fade in, and one that has left its tab goes quiet, then folds
   away (static/js/review-list.js). Notes with nothing in them take no room. */
.lv-review-row { transition: opacity 150ms var(--lv-ease); }
.lv-review-row:has(form.htmx-request) { opacity: 0.6; transition-delay: 150ms; }
.lv-review-row[data-leaving] { overflow: hidden; animation: lv-leave 200ms var(--lv-ease-out) forwards; }
@keyframes lv-leave { from { height: var(--lv-leave-from); } to { height: 0; padding-block: 0; border-bottom-width: 0; opacity: 0; } }
/* The tab a payment has gone to: its new count fades in. */
.lv-count[data-ticked] { animation: lv-count-in 150ms var(--lv-ease-out); }
@keyframes lv-count-in { from { color: transparent; } }
.lv-review-row:focus-visible { outline: 2px solid var(--lv-green-700); outline-offset: -2px; }
/* Rows with an id are the list's own: the skeleton's rows have none, and stay still. */
:is(.lv-review-said, .lv-review-row[id] > .lv-actions) > * { transition: opacity 200ms var(--lv-ease-out); }
@starting-style { :is(.lv-review-said, .lv-review-row[id] > .lv-actions) > * { opacity: 0; } }
.lv-review-row[id] > .lv-actions:not(:has(*)) { display: none; }
.lv-review-row :is(.lv-name, .lv-date, .lv-row-value) { transition: color 200ms var(--lv-ease-out); }
.lv-review-row[data-moved] :is(.lv-name, .lv-date, .lv-row-value) { color: var(--lv-ink-55); }
.lv-review-notes:not(:has(> :not(.lv-review-said), > .lv-review-said > *)) { display: none; }
.lv-review-refused { color: var(--lv-red-ink); }
/* The list worked through to its end: the one moment it marks, a card whose green round comes in
   from 0.9 a beat after the card, and its tick is drawn after that. */
.lv-review-done { display: grid; justify-items: start; gap: 8px; padding: 24px; }
.lv-review-done[hidden] { display: none; }
.lv-review-done > p { margin: 0; color: var(--lv-ink-55); }
.lv-review-done-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 9999px; background-color: var(--lv-green-tint); color: var(--lv-green-700); animation: lv-done-in 280ms var(--lv-ease-out) 160ms backwards; }
.lv-review-done-icon .icon { width: 20px; height: 20px; }
@keyframes lv-done-in { from { opacity: 0; transform: scale(0.9); } }
.lv-review-done-icon path { stroke-dasharray: 1; animation: lv-done-tick 280ms var(--lv-ease-out) 280ms backwards; }
@keyframes lv-done-tick { from { stroke-dashoffset: 1; } }
/* On a phone the answers go under the payment, from the left; Not a gift's popover opens under
   the whole payment, the row's width. */
@media (max-width: 639px) {
  .lv-review-payee { padding-inline: 16px; }
  .lv-review-row { position: relative; }
  .lv-review-row > .lv-actions { flex-basis: 100%; justify-content: flex-start; max-width: none; padding-top: 8px; }
  .lv-review-not { position: static; }
  .lv-review-not > form { right: 16px; left: 16px; width: auto; }
}

/* ---- About you (people/profile.html) ---- */
/* The profile form (or, read-only, its plain twin) follows the title: its
   first card sits on the green, as a first .lv-card does. */
.lv-owner main > .lv-page > .lv-page-head:has(+ .lv-about-form) { --lv-band-foot: calc(var(--lv-overlap) + var(--lv-curve)); margin-bottom: calc(24px - var(--lv-page-gap)); }
.lv-about-form { display: grid; gap: var(--lv-page-gap); margin: 0; }

/* Each section is a folding card (lv-fold-card): its title row and summary sit on the grey head,
   with a keyline under them when open; its body opens on a note at most 68 characters wide. */
:is(.lv-about-form > .lv-fold-card, .lv-about-name) > summary { background-color: var(--lv-background); }
:is(.lv-about-form > .lv-fold-card, .lv-about-name)[open] > summary { border-bottom: 1px solid var(--lv-keyline); }
:is(.lv-about-form > .lv-fold-card, .lv-about-name) > .lv-fold-card-body { padding-top: 20px; }
.lv-about-facts > div { padding-top: 0; border-top: 0; }
.lv-about-intro { max-width: 68ch; text-wrap: pretty; }
.lv-about-form :is(.lv-field-late_spouse_died_on, .lv-field-late_spouse_estate) { max-width: 14rem; }

/* One thing asked in parts: its name once, the parts side by side. */
.lv-about-group { display: grid; gap: 12px; min-width: 0; margin: 0; padding: 20px 0 0; border: 0; border-top: 1px solid var(--lv-keyline); }
.lv-about-group > legend { float: left; width: 100%; margin: 0; padding: 0; color: var(--lv-ink); font-size: 15px; font-weight: 600; }
/* Fields in a row line up by their boxes, so an error under one never
   lifts the other; "or" keeps a label's height above it to sit level. */
.lv-about-pair { align-items: start; }
/* Rows of fields sit a form's 20px apart: the group's 12px and 8px more. */
.lv-about-group > :is(.lv-about-pair, .lv-field) + :is(.lv-about-pair, .lv-field) { margin-top: 8px; }
.lv-about-hint { max-width: 68ch; text-wrap: pretty; }

/* The late spouse is asked about for a widowed owner, and shown whenever
   one of its fields came back with an error. */
/* A part of a card under its own heading: the late spouse inside "You". */
.lv-about-part { display: grid; gap: 16px; padding-top: 20px; border-top: 1px solid var(--lv-keyline); }
.lv-about-part > h3 { margin: 0; font-size: 15px; font-weight: 600; }
.lv-about-late { display: none; }
.lv-about-form:has(input[name="marital_status"][value="widowed"]:checked) .lv-about-late,
.lv-about-late:has(.lv-field-invalid) { display: grid; }
/* The date of the final order is asked only of the divorced. */
.lv-about-form:not(:has(input[name="marital_status"][value="divorced"]:checked)) .lv-field-final_order_on:not(.lv-field-invalid) { display: none; }
/* The planning note follows the marital status as it is picked, before Save: married or civil
   partners plan jointly, anyone else alone (people.models.planning_mode_for). */
.lv-about-form:has(input[name="marital_status"]:is([value="married"], [value="civil_partnership"]):checked) .lv-plan-alone,
.lv-about-form:not(:has(input[name="marital_status"]:is([value="married"], [value="civil_partnership"]):checked)) :is(.lv-plan-couple, .lv-about-spouse:not(:has(.lv-field-invalid))) { display: none; }
/* Each section opens with the page; its one-line summary is for when it is folded. */
/* One Save for every section, under the cards. Full width on a phone. */
.lv-about-save { display: flex; }

@media (max-width: 767px) {
  .lv-about-form :is(.lv-field-late_spouse_died_on, .lv-field-late_spouse_estate) { max-width: none; }
  .lv-about-save .lv-btn { width: 100%; }
}

/* ---- Connections (people/person_list.html, people/_connection.html) ---- */
/* Rows in a list card: initial or icon, name, one line of facts, the edit
   pencil top right; the row lines up with the card's heading. */
.lv-conn-tile { position: relative; padding-inline: 24px; }
@media (max-width: 833px) { .lv-conn-tile { padding-inline: 16px; } }
.lv-conn-tile:has(.lv-conn-pencil) > .lv-tile-body { padding-right: 24px; }
.lv-conn-email { overflow-wrap: anywhere; }
.lv-conn-pencil { position: absolute; top: 12px; right: 18px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9999px; color: var(--lv-ink-55); transition: color var(--lv-duration) var(--lv-ease), background-color var(--lv-duration) var(--lv-ease); }
@media (max-width: 767px) { .lv-conn-pencil { top: 4px; right: 4px; width: 44px; height: 44px; } .lv-conn-tile:has(.lv-conn-pencil) > .lv-tile-body { padding-right: 40px; } }
.lv-conn-pencil .icon { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) { .lv-conn-pencil:hover { background-color: var(--lv-green-tint); color: var(--lv-green-700); } }

/* ---- Documents (documents/list.html, documents/_list_rows.html) ---- */
/* One quiet tile per file (the prototype's calm card): its kind's icon,
   name and facts, the stage it is at as the one pill, the stages folded. */
.lv-docs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (max-width: 1199px) { .lv-docs-grid { grid-template-columns: minmax(0, 1fr); } }
.lv-docs-tile > .lv-tile-icon[data-pages="many"] { box-shadow: 3px 3px 0 -1px #fff, 3px 3px 0 0 var(--lv-line-input); }
.lv-docs-tile .lv-actions { justify-content: flex-start; }
/* The Tiles switch: tiles inside the list card's padding. */
.lv-list-card .lv-docs-grid { padding: 0 24px 24px; }
@media (max-width: 833px) { .lv-list-card .lv-docs-grid { padding: 0 16px 16px; } }
/* A row: delete on the left, More details on the right, its fold under the
   row at full width (the owner's 30 Nov design). */
.lv-docs-view { margin-left: auto; }
.lv-docs-tile { position: relative; flex-wrap: wrap; row-gap: 0; }
.lv-docs-tile > .lv-tile-body { padding-right: 120px; }
.lv-docs-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.lv-docs-delete { display: grid; flex: none; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: var(--lv-red-ink); }
.lv-docs-delete .icon { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) { .lv-docs-delete:hover { background-color: var(--lv-red-fill); } }
.lv-docs-more { flex: 1 0 100%; }
.lv-docs-more > summary { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 8px; border-radius: 8px; color: var(--lv-green-700); font-size: 14px; font-weight: 500; list-style: none; cursor: pointer; }
.lv-docs-more > summary::-webkit-details-marker { display: none; }
.lv-docs-more > summary .icon { width: 14px; height: 14px; transition: transform 200ms ease-out; }
.lv-docs-more[open] > summary .icon { transform: rotate(180deg); }
.lv-docs-more-body { display: grid; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--lv-keyline); }
.lv-docs-stages.lv-fold > summary { padding: 0; border-top: 0; }
.lv-docs-stages > .lv-timeline { margin-top: 8px; }
.lv-docs-more-body .ts-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 767px) {
  .lv-docs-tile > .lv-tile-body { padding-right: 0; padding-bottom: 36px; }
  .lv-docs-more > summary { top: auto; bottom: 8px; min-height: 44px; }
}


/* ---- To sort (documents/inbox.html, documents/_inbox_row.html) ---- */
/* The rows keep the ts- classes static/js/to-sort.js selects on; the
   ones that carry a look (Change, Cancel and File again shown by state,
   File filling on the row under the pointer) are styled here beside the
   lv- rules. The popover's insides are written by the script: its own
   ts- classes, styled under .lv-sort-pop, beside the shared lv- pieces. */
.lv-sort-rows { margin: 0; padding: 0; list-style: none; }

/* One row: the lead and the name with File beside it, the three values under the name. */
.lv-sort-row { border-top: 1px solid var(--lv-keyline); transition: background-color var(--lv-duration) var(--lv-ease); }
.lv-sort-rows > .lv-sort-row:first-child { border-top: 0; }
.lv-sort-row[data-changing] { box-shadow: inset 3px 0 0 var(--lv-green-700); }
.lv-sort-row[data-state="filed"] { transition: background-color 200ms var(--lv-ease-out); }
/* htmx marks the row it swaps in for a moment: a filed row settles from a stronger green. */
.lv-sort-row.htmx-added { background-color: var(--lv-green-tint); }
@media (hover: hover) and (pointer: fine) {
  .lv-sort-row[data-state="to-sort"]:hover { background-color: var(--lv-gold-50); }
  /* The row under the pointer is the one File will file: its button fills. */
  .lv-sort-row[data-state="to-sort"]:hover .ts-file { background-color: var(--lv-green-700); color: #fff; }
}
.lv-sort-line:focus-within .ts-file { background-color: var(--lv-green-700); color: #fff; }
.lv-sort-line { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; grid-template-areas: "lead doc act" ". vals vals"; align-items: center; gap: 12px; min-height: 64px; padding: 16px 24px; }
.lv-sort-line:not(:has(.lv-sort-vals)) { grid-template-areas: "lead doc act"; }
.lv-sort-line:focus-visible { box-shadow: inset 0 0 0 2px var(--lv-green-700); }
.lv-sort-lead { grid-area: lead; align-self: start; }
.lv-sort-doc { grid-area: doc; }
.lv-sort-conf, .lv-sort-row[data-state="filed"] .lv-name { color: var(--lv-ink-55); }
.lv-sort-question { margin: 4px 0 0; color: var(--lv-ink); font-size: 14px; }
.lv-sort-row:has([data-changed]) .lv-sort-question { display: none; }
.lv-sort-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.lv-sort-act { display: flex; grid-area: act; align-self: start; justify-content: flex-end; }
.lv-sort-act .ts-form { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin: 0; }
.lv-sort-act .ts-file { min-width: 64px; }
/* Filed: Change; changing: Cancel and File again. */
.lv-sort-row[data-state="filed"]:not([data-changing]) :is(.ts-file, .ts-cancel), .lv-sort-row[data-changing] .ts-change { display: none; }

/* Each value is a field-like button that opens the popover; filed, plain text. */
.lv-sort-vals { display: flex; flex-wrap: wrap; grid-area: vals; align-items: flex-start; gap: 8px; min-width: 0; }
.lv-sort-cell { min-width: 0; max-width: 100%; }
.lv-sort-period { display: grid; justify-items: start; gap: 4px; }
.lv-sort-label { flex: none; color: var(--lv-ink-55); font-size: 13px; font-weight: 400; }
.lv-sort-val { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 36px; margin: 0; padding: 0 12px; border: 1px solid var(--lv-line-field); border-radius: 8px; background-color: #fff; color: var(--lv-ink); font: inherit; font-size: 14px; font-weight: 500; text-align: left; cursor: pointer; transition: background-color var(--lv-duration) var(--lv-ease), border-color var(--lv-duration) var(--lv-ease), transform 160ms var(--lv-ease-out); }
.lv-sort-val .icon { display: block; flex: none; width: 16px; height: 16px; color: var(--lv-ink-55); }
.lv-sort-val .ts-val-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-sort-val:enabled:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .lv-sort-val:enabled:hover { border-color: var(--lv-green-700); background-color: var(--lv-green-tint); } }
.lv-sort-val:focus-visible { outline: 2px solid var(--lv-green-700); outline-offset: 2px; box-shadow: none; }
.lv-sort-val[aria-expanded="true"] { border-color: var(--lv-green-700); background-color: #fff; box-shadow: 0 0 0 3px var(--lv-green-tint); }
.lv-sort-val[data-changed] { border-color: var(--lv-green-700); color: var(--lv-green-700); font-weight: 600; }
.lv-sort-val[data-changed] .icon { color: var(--lv-green-700); }
.lv-sort-val[data-none] { color: var(--lv-ink-55); }
.lv-sort-val[data-empty] { border: 1px dashed var(--lv-gold-500); background-color: var(--lv-gold-50); color: var(--lv-attention); }
.lv-sort-val:disabled { min-height: 0; padding: 0; border-color: transparent; background: none; color: var(--lv-ink); cursor: default; }
.lv-sort-val:disabled .icon { display: none; }
.lv-sort-row[data-state="filed"]:not([data-changing]) .lv-sort-vals, .lv-sort-vals:has(.lv-sort-still) { column-gap: 24px; }
.lv-sort-still { display: inline-flex; align-items: baseline; gap: 8px; color: var(--lv-ink); font-size: 14px; font-weight: 500; }
.lv-sort-period .ts-hint { padding-left: 2px; }

/* Why a row needs a judgement, a notice under it (lv-notice): indented under the name, its Confirm on the same line. */
.lv-sort-why { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: -4px 24px 16px 72px; }
.lv-sort-why + .lv-sort-why { margin-top: -8px; }
.lv-sort-why > span { flex: 1 1 240px; min-width: 0; }
.lv-sort-why form { margin: 0; }

/* The popover the script fills (one value at a time, placed by the script
   at --ts-origin): the white menu, its options the menu's items. */
.lv-sort-pop { position: fixed; z-index: 40; width: 360px; max-height: min(440px, 72vh); overflow: auto; overscroll-behavior: contain; transform-origin: var(--ts-origin, 20px 0); }
.lv-sort-pop[data-anim] { transition: opacity 160ms var(--lv-ease-out), transform 160ms var(--lv-ease-out); }
@starting-style { .lv-sort-pop[data-anim] { opacity: 0; transform: scale(0.97); } }
.lv-sort-pop .ts-pop-head { padding: 8px 8px 6px; }
.lv-sort-pop .ts-pop-title { margin: 0; color: var(--lv-ink); font-size: 14px; font-weight: 600; }
.lv-sort-pop .ts-pop-note { margin: 2px 0 0; line-height: 1.45; }
/* An option's Section text truncates rather than pushing the option past the popover. */
.lv-sort-pop .ts-opts { display: grid; grid-template-columns: minmax(0, 1fr); }
.lv-sort-pop .ts-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lv-sort-pop .ts-opt[aria-pressed="true"] { background-color: var(--lv-green-tint); color: var(--lv-green-700); font-weight: 600; }
.lv-sort-pop .ts-opt:focus-visible { box-shadow: inset 0 0 0 2px var(--lv-green-700); }
.lv-sort-pop .ts-opt > span:first-child { flex: none; white-space: nowrap; }
.lv-sort-pop .ts-opt-sec { flex: 0 1 auto; min-width: 0; overflow: hidden; color: var(--lv-ink-55); font-size: 12px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.lv-sort-pop .ts-opt-read { margin-left: 8px; color: var(--lv-ink-55); font-size: 12px; font-weight: 500; }
.lv-sort-pop .ts-opt-group { margin: 6px 0 0; padding: 8px 8px 4px; border-top: 1px solid var(--lv-keyline); }
/* The period: two dates, a line for what is wrong with them, Cancel and Use this period. */
.lv-sort-pop .ts-pform { padding: 0 0 4px; }
.lv-sort-pop .ts-pfields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 6px 8px 0; }
.lv-sort-pop .ts-pform > .ts-pop-note { padding: 0 8px; }
.lv-sort-pop .ts-perr { margin: 8px 8px 0; }
.lv-sort-pop .ts-perr:empty { display: none; }
.lv-sort-pop .ts-pfoot { display: flex; justify-content: flex-end; gap: 12px; margin-top: 12px; padding: 12px 8px 4px; border-top: 1px solid var(--lv-keyline); }
.lv .ts-scrim { position: fixed; inset: 0; z-index: 39; background: var(--lv-scrim); transition: opacity 200ms var(--lv-ease-out); }
@starting-style { .lv .ts-scrim { opacity: 0; } }

@media (max-width: 833px) {
  .lv-sort-line { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "doc act" "vals vals"; padding: 14px 16px; }
  .lv-sort-line:not(:has(.lv-sort-vals)) { grid-template-areas: "doc act"; }
  .lv-sort-lead { display: none; }
  .lv-sort-why { margin: -4px 16px 14px; }
}
@media (max-width: 767px) {
  /* The name and each value take a 44px press beyond what they show. */
  .lv-sort-doc > a.lv-name { position: relative; justify-self: stretch; }
  .lv-sort-doc > a.lv-name::after { content: ""; position: absolute; inset: -11px 0; }
  .lv-sort-val { position: relative; }
  .lv-sort-val::after { content: ""; position: absolute; inset: -4px -3px; }
  .lv-sort-val:disabled { border-width: 0; border-style: none; }
  .lv-sort-val:disabled::after { content: none; }
  .lv-sort-row[data-state="filed"]:not([data-changing]) .lv-sort-period { display: inline-grid; vertical-align: top; }
  /* The popover becomes a bottom sheet, within thumb reach. */
  .lv-sort-pop[data-sheet] { top: auto; right: 0; bottom: 0; left: 0; width: auto; max-height: 82dvh; padding: 8px 8px calc(12px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0; transform-origin: 50% 100%; }
  .lv-sort-pop[data-sheet]::before { content: ""; display: block; width: 36px; height: 4px; margin: 2px auto 6px; border-radius: 9999px; background: var(--lv-line-card); }
  .lv-sort-pop[data-sheet][data-anim] { transition: transform 280ms var(--lv-ease-drawer); }
  @starting-style { .lv-sort-pop[data-sheet][data-anim] { opacity: 1; transform: translateY(100%); } }
  .lv-sort-pop .ts-pfoot .lv-btn { flex: 1; }
}

/* ---- Access, My access (estates/access.html, people/my_access.html) ---- */
.lv-access-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
@media (max-width: 833px) { .lv-access-row > .lv-actions { justify-content: flex-start; } }

/* ---- Audit log (audit/event_log.html) ---- */
.lv-access-log { table-layout: fixed; }
.lv-access-log thead th:first-child { width: 88px; }
.lv-access-log thead th:last-child { width: 32%; }
@container (min-width: 640px) { .lv-access-log td { padding-block: 12px; } }
.lv-access-log .lv-date { font-variant-numeric: tabular-nums; }
.lv-access-what { font-weight: 600; }
.lv-access-what + .lv-pill { margin-left: 6px; }
/* Who and what it was done to sit under the sentence; a long address breaks at its "@". */
.lv-access-log .lv-access-who > div { min-width: 0; }
.lv-access-log .lv-access-who small { overflow-wrap: anywhere; }
/* Details: the pairs run on one line, the code under them. */
.lv-access-details { display: grid; gap: 4px; }
.lv-access-details .lv-pairs { display: flex; flex-wrap: wrap; gap: 2px 6px; font-size: 12px; }
.lv-access-details .lv-pairs dd + dt { margin-left: 8px; }
.lv-access-details code { color: var(--lv-ink-55); font-size: 12px; overflow-wrap: anywhere; }

/* ---- Firm Dashboard (firms/overview.html) and the firm pages' shared card pieces ---- */
.lv-firm-counts { display: flex; flex-wrap: wrap; gap: 4px 0; }
.lv-firm-counts span + span::before { content: "\00b7"; margin: 0 8px; color: var(--lv-ink-55); }
.lv-firm-page [data-state="waiting"] { color: var(--lv-attention); }

/* The route: three stat tiles, as the prototype's Dashboard tiles. */
.lv-firm-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.lv-firm-tiles > li { display: grid; }
.lv-firm-tile { display: grid; align-content: start; gap: 4px; padding: 16px 20px; color: var(--lv-ink); text-decoration: none; transition: box-shadow var(--lv-duration) var(--lv-ease), transform 160ms var(--lv-ease-out); }
@media (hover: hover) and (pointer: fine) { .lv-firm-tile:hover { box-shadow: var(--lv-shadow-lift); } }
.lv-firm-tile:active { transform: scale(0.97); }
.lv-firm-tile:focus-visible { outline: 2px solid var(--lv-green-700); box-shadow: var(--lv-shadow-card); outline-offset: 2px; }
/* The prototype's MI tile (MiStat): a 14px label in 500 over the strip's 28px figure (lv-figure). */
.lv-firm-tile-label { color: var(--lv-ink-55); font-size: 14px; font-weight: 500; }
.lv-firm-tile-figure small { margin-left: 6px; color: var(--lv-ink-55); font-size: 14px; font-weight: 500; }

/* A card with a list of rows divided by keylines. */
.lv-firm-card { overflow: hidden; }
.lv-firm-card > p:not(.lv-empty) { margin: 0; padding: 0 24px 16px; }
.lv-firm-list { margin: 0; padding: 0; list-style: none; }
.lv-firm-list > li + li, .lv-rows .lv-firm-list > li:first-child { border-top: 1px solid var(--lv-keyline); }
.lv-firm-item { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 24px; }
:is(.lv-firm-item, .lv-firm-assign-row) > .lv-name-line { flex: 1; }
.lv-firm-alert { border-color: var(--lv-gold-line); }
.lv-firm-group { margin: 0; padding: 12px 24px 8px; }
.lv-firm-date { display: grid; flex: none; place-items: center; width: 44px; height: 44px; border: 1px solid var(--lv-line-card); border-radius: 8px; color: var(--lv-ink-55); font-size: 11px; line-height: 1.1; }
.lv-firm-date b { color: var(--lv-ink); font-size: 15px; }

/* Waiting on your clients beside Recent changes. */
.lv-firm-columns { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; gap: 24px; }
.lv-firm-side { display: grid; gap: 24px; }
.lv-firm-waiting { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 16px 24px; }
.lv-firm-waiting-count { color: var(--lv-attention); }
.lv-firm-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.lv-firm-chips form { margin: 0; }

@media (max-width: 1199px) { .lv-firm-columns { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 833px) { .lv-firm-counts { flex-direction: column; } .lv-firm-counts span + span::before { content: none; } }
@media (max-width: 833px) {
  .lv-firm-tiles { grid-template-columns: minmax(0, 1fr); gap: 0; border: 1px solid var(--lv-line-card); border-radius: 16px; background-color: #fff; box-shadow: var(--lv-shadow-card); overflow: hidden; }
  .lv-firm-tiles > li + li { border-top: 1px solid var(--lv-keyline); }
  .lv-firm-tile { grid-template-columns: minmax(0, 1fr) auto; border: 0; border-radius: 0; box-shadow: none; }
  /* Here the tiles are rows of one card: no lift, no press-in; a press fills the row, as a menu item's does. */
  .lv-firm-tile:active { background-color: var(--lv-gold-100); transform: none; }
  .lv-firm-tile:focus-visible { outline-offset: -2px; box-shadow: none; }
  .lv-firm-tile > :not(.lv-firm-tile-figure) { grid-column: 1; }
  .lv-firm-tile-figure { grid-column: 2; grid-row: 1 / span 3; align-self: center; font-size: 20px; }
  .lv-firm-item, .lv-firm-waiting, .lv-firm-group { padding-left: 16px; padding-right: 16px; }
  .lv-firm-card > p:not(.lv-empty) { padding-left: 16px; padding-right: 16px; }
  .lv-firm-item { flex-wrap: wrap; }
}
@media (max-width: 833px) and (hover: hover) and (pointer: fine) { .lv-firm-tile:hover { box-shadow: none; } }

/* ---- Upload, batch, records chain, will review, delete (documents/upload.html, batch.html, _batch_rows.html, chain.html, confirm_delete.html, papers/detail.html, stage partials) ---- */
/* The drop zone (the prototype's VaultDropZone): the file input lies,
   invisible, over the whole zone, so a click or a drop lands in it;
   static/js/upload.js marks data-dragging and lists the files chosen. */
.lv-upl-zone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 240px; padding: 32px 24px; border: 2px dashed var(--lv-line-input); border-radius: 12px; background-color: var(--lv-gold-50); text-align: center; transition: border-color var(--lv-duration) var(--lv-ease), background-color var(--lv-duration) var(--lv-ease); }
.lv-upl-zone[data-dragging] { border-color: var(--lv-green-700); background-color: var(--lv-green-tint); }
@media (hover: hover) and (pointer: fine) { .lv-upl-zone:hover { border-color: rgba(11, 82, 51, 0.5); } }
.lv-upl-zone:has(input:focus-visible) { outline: 2px solid var(--lv-green-700); outline-offset: 2px; }
.lv-upl-zone-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 9999px; background-color: var(--lv-green-tint); color: var(--lv-green-700); transition: background-color var(--lv-duration) var(--lv-ease), color var(--lv-duration) var(--lv-ease), transform 200ms ease-out; }
.lv-upl-zone[data-dragging] .lv-upl-zone-icon { background-color: var(--lv-green-700); color: #fff; transform: translateY(-2px); }
.lv-upl-zone-icon .icon { width: 24px; height: 24px; }
.lv-upl-zone > div { display: grid; justify-items: center; gap: 4px; margin: 0; }
.lv-upl-zone label { color: var(--lv-ink); font-size: 15px; font-weight: 600; }
.lv-upl-zone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.lv-upl-zone ul { position: relative; }
.lv-upl-hint { max-width: 32rem; }
.lv-upl-choose { margin-top: 4px; pointer-events: none; }
/* The press lands on the file input over the zone: the button that shows takes it. */
.lv-upl-zone:not([data-dragging]):active .lv-upl-choose { transform: scale(0.97); }
.lv-upl-files { max-height: 16rem; margin: 0; padding: 0; overflow-y: auto; border: 1px solid var(--lv-line-card); border-radius: 8px; font-size: 14px; list-style: none; }
.lv-upl-files li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 12px; }
.lv-upl-files li + li { border-top: 1px solid var(--lv-keyline); }
.lv-upl-files .upload-file-name { min-width: 0; overflow-wrap: anywhere; }
.lv-upl-files .upload-file-size { flex: none; color: var(--lv-ink-55); }
.lv-upl-send { justify-content: space-between; }
.lv-upl-send .lv-btn { min-width: 9rem; }

/* A short drop zone on another page (documents/_drop_zone.html with a title):
   one row, icon, words and Choose files; the send row shows once a file is chosen. */
.lv-upl-compact { display: grid; gap: 12px; margin: 0; }
.lv-upl-compact .lv-upl-zone { flex-direction: row; justify-content: flex-start; gap: 16px; min-height: 0; padding: 20px 24px; text-align: left; }
.lv-upl-compact .lv-upl-zone-icon { flex: none; width: 40px; height: 40px; border-radius: 8px; }
.lv-upl-compact .lv-upl-zone-icon .icon { width: 20px; height: 20px; }
.lv-upl-compact .lv-upl-zone-text { flex: 1 1 12rem; justify-items: start; gap: 2px; min-width: 0; }
.lv-upl-zone-text p { margin: 0; }
.lv-upl-compact .lv-upl-zone-title { font-size: 18px; }
.lv-upl-compact .lv-upl-choose { flex: none; margin-top: 0; }
.lv-upl-compact .lv-upl-send:has(button:disabled) { display: none; }
@media (max-width: 599px) { .lv-upl-compact .lv-upl-zone { flex-wrap: wrap; } }

/* Add your gifts (gifts/review.html): the drop zone, then the other ways in. */
.lv-add-gifts { display: grid; gap: 16px; padding: 24px; }
.lv-add-gifts > .lv-note { margin: 0; }
.lv-add-ways { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

.lv-upl-steps { display: grid; gap: 0; margin: 0; padding: 8px 24px; list-style: none; }
.lv-upl-steps li { display: flex; gap: 14px; padding: 14px 0; }
.lv-upl-steps li + li { border-top: 1px solid var(--lv-keyline); }
.lv-upl-steps p { margin: 0; color: var(--lv-ink-55); font-size: 13px; line-height: 1.5; }
.lv-upl-steps .lv-upl-step-title { color: var(--lv-ink); font-size: 15px; font-weight: 600; }

/* One upload (the prototype's Just arrived): four figures, then a line per file. */
.lv-upl-batch { overflow: hidden; }
.lv-upl-figures { padding: 20px 24px; border-bottom: 1px solid var(--lv-line-card); }
.lv-upl-figures > div[data-attention] .lv-figure { color: var(--lv-attention); }
.lv-upl-rows { margin: 0; padding: 0; list-style: none; }
/* A fixed actions column keeps the stages lined up. */
.lv-upl-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 12rem; align-items: start; gap: 8px 20px; padding: 16px 24px; }
.lv-upl-row + .lv-upl-row { border-top: 1px solid var(--lv-keyline); }
.lv-upl-do { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 12px; }
.lv-upl-do form { margin: 0; }

/* The records chain (the prototype's CoverageGrid): a line per tax year,
   one segment per month a bank statement covers, its gaps under it. */
.lv-upl-chain { overflow: hidden; }
.lv-upl-chain-state { display: flex; flex: 1 1 20rem; align-items: flex-start; gap: 10px; margin: 0; font-size: 14px; line-height: 1.5; }
.lv-upl-chain-state > .icon { flex: none; width: 20px; height: 20px; color: var(--lv-gold-600); }
.lv-upl-chain-state[data-state="done"] > .icon { color: var(--lv-green-700); }
.lv-upl-year { padding: 14px 24px; }
.lv-upl-year + .lv-upl-year { border-top: 1px solid var(--lv-keyline); }
.lv-upl-year-head { display: grid; grid-template-columns: 20px 6.5rem minmax(0, 1fr) 15rem; align-items: center; gap: 4px 12px; }
.lv-upl-year-head h3 { margin: 0; font-size: 15px; font-weight: 600; white-space: nowrap; }
.lv-upl-months { display: flex; gap: 3px; min-width: 0; }
.lv-upl-months > span, .lv-upl-key { flex: 1; min-width: 0; height: 12px; border: 1px solid var(--lv-gold-500); border-radius: 6px; }
.lv-upl-months > span[data-held], .lv-upl-key[data-held] { border-color: var(--lv-green-700); background-color: var(--lv-green-700); }
.lv-upl-count { text-align: right; }
.lv-upl-gaps { display: grid; gap: 2px; margin: 8px 0 0 32px; padding: 0; color: var(--lv-attention); font-size: 13px; list-style: none; }
.lv-upl-gaps li { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.lv-upl-gaps .lv-link { display: inline-flex; flex: none; align-items: center; gap: 4px; font-size: 13px; }
.lv-upl-gaps .lv-link .icon { width: 12px; height: 12px; }
.lv-upl-evidence { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0 0 32px; padding: 0; font-size: 13px; list-style: none; }
.lv-upl-evidence:empty { display: none; }
.lv-upl-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 12px 24px; border-top: 1px solid var(--lv-line-card); background-color: var(--lv-head); color: var(--lv-ink-55); font-size: 12px; }
.lv-upl-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.lv-upl-key { flex: none; width: 12px; height: 12px; }
.lv-upl-list ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.lv-upl-list .lv-link { white-space: normal; }

/* An estate paper and its will review: the file, then one card per fact read. */
.lv-upl-paper-file { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.lv-upl-paper-file > div:nth-child(2) { flex: 1 1 12rem; min-width: 0; }
.lv-upl-facts { margin: 0; padding: 0; list-style: none; }
.lv-upl-fact { display: grid; gap: 8px; padding: 16px 24px; }
.lv-upl-fact + .lv-upl-fact { border-top: 1px solid var(--lv-keyline); }
.lv-upl-fact-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.lv-upl-fact-value { margin: 0; font-size: 17px; font-weight: 600; }
.lv-upl-fact-do { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.lv-upl-fact-do form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.lv-upl-correct .lv-input { width: 14rem; max-width: 100%; }

@media (max-width: 833px) {
  .lv-upl-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 0; padding: 14px 16px; }
  .lv-upl-figures > div { padding: 0 12px; border-top: 0; border-left: 1px solid var(--lv-keyline); }
  .lv-upl-figures > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .lv-upl-row { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; }
  .lv-upl-do { justify-content: flex-start; }
  .lv-upl-year, .lv-upl-legend, .lv-upl-fact { padding-inline: 16px; }
  .lv-upl-year-head { grid-template-columns: 20px minmax(0, 1fr); }
  .lv-upl-months, .lv-upl-count { grid-column: 2; text-align: left; }
  .lv-upl-gaps, .lv-upl-evidence { margin-left: 32px; }
  .lv-upl-steps { padding-inline: 16px; }
  .lv-upl-zone { min-height: 200px; padding: 24px 16px; }
}

/* ---- Firm Clients (firms/clients.html) ---- */
.lv-firm-assign-filter { padding: 16px 24px; border-bottom: 1px solid var(--lv-keyline); }
.lv-firm-table thead th, .lv-firm-table thead th.lv-num { white-space: normal; }
.lv-firm-client { font-weight: 600; }
.lv-firm-table .lv-firm-client small { max-width: 18em; font-weight: 400; white-space: normal; overflow-wrap: anywhere; }
.lv-firm-rows .lv-actions { margin-left: auto; }
.lv-firm-form { padding: 0 24px 24px; }
.lv-firm-form .lv-form-actions { padding-top: 0; }
@container (max-width: 779px) {
  .lv-firm-table tbody .lv-firm-client { display: grid; justify-content: start; gap: 2px; font-size: 15px; overflow-wrap: anywhere; }
  .lv-firm-table .lv-actions { justify-content: flex-start; padding-top: 8px; }
}
/* Wide, its eight columns keep 12px cells (24px the first). A word never breaks inside: a long
   name and the heads wrap at spaces, and the row's buttons wrap, so the table keeps to its card.
   The middle columns take only their longest word (width 0), leaving the room to the name and the buttons. */
@container (min-width: 780px) {
  .lv-firm-table :is(thead th, tbody th, td) { padding-left: 12px; padding-right: 12px; }
  .lv-firm-table :is(thead th, tbody th, td):first-child { padding-left: 24px; }
  .lv-firm-table thead th:not(:first-child, :last-child) { width: 0; }
  .lv-firm-table :is(.lv-num, td:nth-last-child(2)) { white-space: nowrap; }
}
@media (max-width: 833px) {
  .lv-firm-assign-filter { padding: 16px; }
  .lv-firm-form { padding: 0 16px 16px; }
  .lv-firm-rows .lv-actions { margin-left: 48px; }
}

/* ---- Firm Settings (firms/settings.html) ---- */
.lv-firm-settings { max-width: 768px; }
.lv-firm-settings .lv-firm-item { padding-bottom: 20px; }
.lv-firm-settings .lv-firm-form { display: grid; gap: 20px; }

/* ---- Assign staff and clients (firms/client_staff.html, firms/staff_clients.html) ---- */
/* One switch row per person or client; static/js/assign.js counts the
   switches on and filters a long list. Off rows fade, their level reads
   No access, and the nobody-can-open line shows when every switch is off. */
.lv-firm-assign { margin: 0; overflow: visible; }
.lv-firm-assign [hidden] { display: none; }
.lv-firm-assign fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.lv-firm-assign-filter .lv-input { width: 100%; }
.lv-firm-assign-list { margin: 0; padding: 0; list-style: none; }
.lv-firm-assign-list li + li { border-top: 1px solid var(--lv-keyline); }
.lv-firm-assign-row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 24px; cursor: pointer; transition: background-color var(--lv-duration) var(--lv-ease); }
@media (hover: hover) and (pointer: fine) { .lv-firm-assign-row:hover { background-color: var(--lv-gold-50); } }
.lv-firm-assign-row .lv-initial { transition: opacity var(--lv-duration) var(--lv-ease); }
.lv-firm-assign-row:not(:has(:checked)) .lv-initial { opacity: 0.4; }
.lv-firm-assign-level { flex: none; color: var(--lv-green-700); font-size: 14px; font-weight: 500; }
.lv-firm-assign-row:not(:has(:checked)) .lv-firm-assign-level { color: var(--lv-ink-55); font-weight: 400; }
.lv-firm-assign-row:has(:checked) .lv-firm-assign-off,
.lv-firm-assign-row:not(:has(:checked)) .lv-firm-assign-on { display: none; }
.lv-firm-assign-self { display: none; }
.lv-firm-assign-row:not(:has(:checked)) .lv-firm-assign-self { display: block; color: var(--lv-attention); }
.lv-firm-assign .assign-switch { appearance: none; position: relative; flex: none; width: 40px; height: 24px; margin: 0; border: 0; border-radius: 9999px; background-color: var(--lv-line-field); cursor: pointer; transition: background-color var(--lv-duration) var(--lv-ease); }
.lv-firm-assign .assign-switch::before { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 9999px; background-color: #fff; box-shadow: var(--lv-shadow-pop); transition: transform var(--lv-duration) var(--lv-ease); }
.lv-firm-assign .assign-switch:checked { background-color: var(--lv-green-700); }
.lv-firm-assign .assign-switch:checked::before { transform: translateX(16px); }
.lv-firm-assign .assign-switch:focus-visible { outline: 2px solid var(--lv-green-700); box-shadow: none; outline-offset: 2px; }
@media (forced-colors: active) {
  .lv-firm-assign .assign-switch { border: 1px solid CanvasText; }
  .lv-firm-assign .assign-switch:checked { background-color: Highlight; }
  .lv-firm-assign .assign-switch::before { background-color: CanvasText; }
}
.lv-firm-assign-none { display: none; padding: 16px 24px; }
.lv-firm-assign:not(:has(.assign-switch:checked)) .lv-firm-assign-none { display: block; }
.lv-firm-assign-actions { position: sticky; bottom: 0; z-index: 1; align-items: center; padding: 16px 24px; border-top: 1px solid var(--lv-keyline); border-radius: 0 0 15px 15px; background-color: rgba(255, 255, 255, 0.92); }
.lv-firm-assign-count { margin: 0 0 0 auto; }
/* What happens to a change, under the switches: a note, not the disclaimer. */
@media (max-width: 833px) {
  .lv-firm-assign-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 16px; }
  .lv-firm-assign-row .lv-initial { display: none; }
  .lv-firm-assign-level { grid-column: 1; grid-row: 2; }
  .lv-firm-assign .assign-switch { grid-column: 2; grid-row: 1 / span 2; }
  .lv-firm-assign-none, .lv-firm-assign-actions { padding-left: 16px; padding-right: 16px; }
}

/* ---- Team (tenancy/members.html, invite.html) and the firm confirm pages ---- */
.lv-firm-team { max-width: 928px; }
.lv-firm-role { display: flex; flex: none; align-items: center; gap: 8px; margin: 0; }
@media (max-width: 833px) {
  .lv-firm-member { display: grid; grid-template-columns: 36px auto minmax(0, 1fr); column-gap: 12px; }
  .lv-firm-member > :not(.lv-initial, .lv-name-line) { grid-column: 2; justify-self: start; }
  .lv-firm-member .lv-actions { margin-left: 0; }
}

/* ---- Network Dashboard (networks/overview.html) ---- */
.lv-firm-network-page { max-width: 928px; }
.lv-firm-sees { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 12px; }
.lv-firm-sees .lv-firm-group { padding-top: 4px; }
.lv-firm-sees ul { display: grid; gap: 8px; margin: 0; padding: 0 24px 12px; list-style: none; font-size: 14px; }
.lv-firm-sees li { display: flex; align-items: flex-start; gap: 8px; }
.lv-firm-sees li .icon { flex: none; margin-top: 2px; }
.lv-firm-sees [data-sees="yes"] .icon { color: var(--lv-green-700); }
.lv-firm-sees [data-sees="no"] .icon { color: var(--lv-ink-55); }
@media (max-width: 833px) {
  .lv-firm-sees { grid-template-columns: minmax(0, 1fr); }
  .lv-firm-sees ul { padding-left: 16px; padding-right: 16px; }
}

/* ---- Firm list rows on phones (firms/clients.html, networks/overview.html, tenancy/members.html): the name keeps its line ---- */
@media (max-width: 833px) {
  .lv-firm-rows .lv-firm-item:not(.lv-firm-member) > .lv-name-line { flex-basis: calc(100% - 48px); }
  .lv-firm-rows .lv-firm-item:not(.lv-firm-member) > :is(.lv-pill, .lv-pills) { margin-left: 48px; }
  .lv-firm-rows .lv-firm-item:not(.lv-firm-member) > :is(.lv-pill, .lv-pills) + .lv-actions { margin-left: auto; }
  .lv-firm-member > .lv-name-line { grid-column: 2 / -1; }
}

/* ---- Document (documents/detail.html, _detail_body.html and its partials, text.html, data.html) ---- */
.lv-doc-title { overflow-wrap: anywhere; }
.lv-doc-status { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 12px; margin-top: 4px; }
.lv-doc-status > .lv-pill { flex: none; }
/* The file's own name under a title that is not it: any length or characters, two lines at most. */
.lv-doc-file { display: flex; flex: 1 1 0; align-items: flex-start; gap: 6px; min-width: 0; font-size: 14px; line-height: 22px; opacity: 0.85; }
.lv-doc-file > .icon { flex: none; width: 16px; height: 16px; margin-top: 3px; }
.lv-doc-file > span { display: -webkit-box; overflow: hidden; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.lv-doc :is(.lv-notice, .lv-facts) :is(p, dd, .lv-link) { overflow-wrap: anywhere; white-space: normal; }
.lv-doc .lv-facts > div:has(> .lv-doc-filename) { grid-column: 1 / -1; }
.lv-doc-inline { display: inline-flex; margin: 0; }

/* The first card: what it is and whose, then what can be done with it. */
.lv-doc-card .lv-card-head { margin-bottom: 4px; }
.lv-doc-blocker { margin-bottom: 20px; font-size: 14px; }
.lv-doc-blocker .lv-doc-inline { justify-self: start; }
.lv-doc-why .lv-pill { max-width: 100%; height: auto; margin: 2px 0; white-space: normal; }
.lv-doc-whose, .lv-doc-check { display: inline; }
.lv-doc-whose { overflow-wrap: anywhere; }
.lv-doc-check .lv-hint, .lv-doc-whose .lv-hint { display: block; }
.lv-doc-check .lv-doc-inline { margin-top: 6px; }

.lv-doc-act { align-items: flex-start; }
.lv-doc-card > .lv-doc-act:first-child { padding-top: 0; border-top: 0; }
.lv-doc-act form { margin: 0; }
/* "File as" carries the kind and whose: a long one wraps inside the button. */
.lv-doc-act .lv-btn-lg { max-width: 100%; padding-block: 8px; white-space: normal; text-align: center; }
.lv-doc-act-file, .lv-doc-act-next { display: grid; gap: 6px; min-width: 0; }
/* The next file's name: one line, cut where it runs past the button's room. */
.lv-doc-act-next { width: min(100%, 320px); justify-items: start; }
.lv-doc-next-name { justify-self: stretch; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; contain: inline-size; }

/* Correct before filing: the fold under the buttons, its fields two by two. */
.lv-doc-correct { margin: 0 -24px -24px; }
.lv-doc-correct[open] > summary { border-bottom: 1px solid var(--lv-keyline); }
.lv-doc-correct-form { padding: 20px 24px 24px; }
.lv-doc-correct-form > .lv-check { grid-column: 1 / -1; }

/* The folds (lv-fold-card): one that loads its contents starts with a keyline and a link. */
.lv-doc-slot { border-top: 1px solid var(--lv-keyline); }
.lv-doc-slot > .lv-link { display: block; padding: 16px 24px; }
.lv-doc-slot > .lv-link:focus-visible { box-shadow: inset 0 0 0 2px var(--lv-green-700); }
.lv-doc-hidden { opacity: 0.7; }

/* The document page's stage lists start with no keyline. */
.lv-doc .lv-timeline > li:first-child { border-top: 0; }
/* A section whose figures or text the reader may not see renders empty: no gap for it. */
.lv-doc > .lv-loads > .lv-section:not(:has(*)) { display: none; }

/* How it was read: the kinds it was chosen from, the parts of the file. */
.lv-doc-kind { padding-top: 16px; border-top: 1px solid var(--lv-keyline); }
.lv-doc-options, .lv-doc-parts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.lv-doc-parts { display: grid; gap: 4px; margin-bottom: 4px; }

/* Does it balance: the state, then the sum as a statement prints it (lv-sum). */
.lv-doc-balance-state { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; font-size: 14px; }

/* The figures and statement rows: each row a button that opens what is behind it. */
.lv-doc-found { display: grid; }
.lv-doc-found-lede { padding: 16px 24px; }
.lv-doc-rows { margin: 0; padding: 0; list-style: none; }
.lv-doc-rows-head { border-top: 1px solid var(--lv-line-card); }
.lv-doc-row { border-top: 1px solid var(--lv-keyline); }
.lv-doc-rows-head + .lv-doc-rows > .lv-doc-row:first-child { border-top: 0; }
/* The button keeps dp-row-head (static/js/document-page.js finds a row by it). */
.lv-doc-row-head { display: grid; grid-template-columns: minmax(0, 1fr) auto 16px; align-items: center; gap: 4px 16px; width: 100%; min-height: 64px; margin: 0; padding: 12px 24px; border: 0; background: none; color: var(--lv-ink); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.lv-doc-row-head > .icon { grid-column: 3; grid-row: 1; align-self: center; width: 16px; height: 16px; color: var(--lv-ink-55); transition: transform 200ms ease-out; }
.lv-doc-row-head[aria-expanded="true"] > .icon { transform: rotate(180deg); }
.lv-doc-row-head:focus-visible { outline: 2px solid var(--lv-green-700); box-shadow: none; outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) {
  .lv-doc-row-head { transition: background-color var(--lv-duration) var(--lv-ease); }
  .lv-doc-row-head:hover { background-color: var(--lv-gold-50); }
}
.lv-doc-row-head:active { background-color: var(--lv-gold-100); transition-duration: 0ms; }
.lv-doc-value { grid-column: 2; white-space: normal; overflow-wrap: anywhere; }
.lv-doc-src { grid-column: 1 / 3; overflow-wrap: anywhere; }
.lv-doc-src q, .lv-doc-where q { quotes: "\201C" "\201D"; }
.lv-doc-src mark, .lv-doc-where mark { padding: 0 2px; border-radius: 6px; background-color: var(--lv-gold-100); color: inherit; }
.lv-doc-entry .lv-doc-row-head { grid-template-columns: 96px minmax(0, 1fr) auto 16px; }
.lv-doc-entry .lv-doc-row-head > .icon { grid-column: 4; }
.lv-doc-date { white-space: nowrap; }
.lv-doc-cat { grid-column: 2 / 4; }
.lv-doc-entry[data-proposed] .lv-doc-cat { color: var(--lv-attention); }
.lv-doc-more { display: grid; gap: 16px; padding: 4px 24px 20px; background-color: var(--lv-gold-50); }
.lv-doc-more[hidden] { display: none; }
/* A row opened in the document page's fold fades in as a fold's contents do, and goes at once.
   A row saved comes back open (htmx marks it for a moment) and does not fade again. */
.lv-doc-slot .lv-doc-more { transition: opacity 200ms ease-out; }
@starting-style { .lv-doc-slot :not(.htmx-added) > .lv-doc-more { opacity: 0; } }
.lv-doc-more-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 24px; padding-top: 12px; }
.lv-doc-fix-line { display: flex; gap: 8px; }
.lv-doc-fix-line .lv-input { flex: 1; min-width: 0; }
.lv-doc-more > .lv-actions { justify-content: flex-start; }
.lv-doc-snapshot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; font-size: 13px; }
.lv-actions .lv-doc-snapshot { column-gap: 12px; }
.lv-doc-snapshot .lv-progress { width: 120px; }
.lv-doc-snapshot-state { display: inline-flex; align-items: center; gap: 8px; }

/* Under the folds: the next to sort, this document, and what was done with it. */
.lv-doc-aside { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--lv-page-gap); }
.lv-doc-aside > .lv-doc-next { grid-column: 1 / -1; gap: 4px; }

/* On a phone, File stays in reach at the foot of the screen. */
.lv-doc-bar { display: none; }

/* What was read, a page at a time; and either view as a page of its own. */
.lv-doc-sheet { overflow: hidden; }
.lv-doc-sheet > .lv-doc-pages { padding: 0 24px; }
.lv-doc-pages { display: grid; }
.lv-doc-pages > .lv-hint:only-child { padding: 20px 0; }
.lv-doc-page { display: grid; gap: 12px; padding: 20px 0; border-top: 1px solid var(--lv-keyline); scroll-margin-top: 24px; }
.lv-doc-page:first-child { border-top: 0; }
.lv-doc-page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.lv-doc-page-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.lv-doc-page-facts dd { display: grid; gap: 4px; }
.lv-doc-page-facts dd > .lv-pill { justify-self: start; }
.lv-doc-bar-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px 40px; align-items: center; gap: 8px; }
.lv-doc-meter { width: 100%; height: 6px; border: 0; border-radius: 9999px; background: var(--lv-gold-100); appearance: none; }
.lv-doc-meter::-webkit-meter-bar { height: 6px; border: 0; border-radius: 9999px; background: var(--lv-gold-100); }
.lv-doc-meter::-webkit-meter-optimum-value { border-radius: 9999px; background: var(--lv-green-700); }
.lv-doc-meter-warning::-webkit-meter-optimum-value { background: var(--lv-gold-500); }
.lv-doc-meter::-moz-meter-bar { border-radius: 9999px; background: var(--lv-green-700); }
.lv-doc-meter-warning::-moz-meter-bar { background: var(--lv-gold-500); }
.lv-doc-bar-value { color: var(--lv-ink-55); text-align: right; }
.lv-doc-page-body { display: grid; gap: 8px; min-width: 0; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.lv-doc-page-body p { margin: 0; }
.lv-doc-page-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 13px; }
.lv-doc-page-body :is(th, td) { padding: 6px 8px; border: 1px solid var(--lv-keyline); text-align: left; vertical-align: top; }
.lv-doc-page-body th { background-color: var(--lv-head); font-weight: 600; }
.lv-fold-card-body > .page-text-slot .lv-doc-pages { margin: 0 -24px; padding: 0 24px; border-top: 1px solid var(--lv-keyline); }

@media (max-width: 833px) {
  .lv-doc-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 0; }
  .lv-doc-facts > div { padding: 0 12px; border-top: 0; border-left: 1px solid var(--lv-keyline); }
  .lv-doc-facts > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .lv-doc-act > *, .lv-doc-act .lv-btn { width: 100%; }
  .lv-doc-row-head, .lv-doc-slot > .lv-link, .lv-doc-found-lede, .lv-doc-more { padding-inline: 16px; }
  .lv-fold-card-body > .page-text-slot .lv-doc-pages { margin-inline: -16px; padding-inline: 16px; }
  .lv-doc-sheet > .lv-doc-pages { padding: 0 16px; }
  .lv-doc-point .lv-doc-row-head { grid-template-columns: minmax(0, 1fr) 16px; }
  .lv-doc-point .lv-doc-value, .lv-doc-point .lv-doc-src { grid-column: 1; text-align: left; }
  .lv-doc-point .lv-doc-row-head > .icon { grid-column: 2; grid-row: 1 / span 3; }
  .lv-doc-entry .lv-doc-row-head { grid-template-columns: minmax(0, 1fr) auto 16px; }
  .lv-doc-entry .lv-doc-row-head > .icon { grid-column: 3; grid-row: 2; }
  .lv-doc-date { grid-column: 1 / -1; font-size: 12px; }
  .lv-doc-who { grid-column: 1; grid-row: 2; }
  .lv-doc-amount { grid-column: 2; grid-row: 2; }
  .lv-doc-cat { grid-column: 1 / -1; }
  .lv-doc-bar-row { grid-template-columns: minmax(0, 1fr) 64px 36px; }
  /* Room under the page (and a message under it) for the bar. */
  .lv-content:has(.lv-doc-bar) { padding-bottom: 120px; }
  .lv-doc-bar { position: fixed; inset: auto 0 0; z-index: 20; display: flex; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--lv-line-card); background-color: #fff; box-shadow: 0 -8px 24px -8px rgba(107, 78, 22, 0.12); }
  .lv-doc-bar .lv-btn { flex: 1; min-width: 0; height: 44px; overflow: hidden; text-overflow: ellipsis; }
  .lv-doc-bar .lv-btn-outline { flex: none; }
}
@media (max-width: 359px) {
  .lv-doc-facts { grid-template-columns: minmax(0, 1fr); }
  .lv-doc-facts > div, .lv-doc-facts > div:nth-child(odd) { padding: 0; border-left: 0; }
}
@media (max-width: 639px) {
  .lv-doc-correct { margin: 0 -20px -20px; }
  .lv-doc-correct-form { padding: 20px; }
}

/* ---- Gift log (gifts/list.html): the prototype's GiftLogger ---- */
.lv-gifts-summary { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 24px; padding: 24px; }
.lv-gifts-summary-main { min-width: 0; }
@media (max-width: 639px) { .lv-gifts-summary { padding: 20px; } }
.lv-gifts-line { margin: 8px 0 0; }
.lv-gifts-standing { padding-bottom: 20px; }
.lv-gifts-standing .lv-tax-figures + .lv-tax-figures { margin-top: 20px; }
.lv-gifts-standing .lv-tax-figures .lv-pill { justify-self: start; }
.lv-gifts-verify form { display: flex; justify-content: flex-end; margin: 0; }
.lv-gifts-table tbody tr:not(.lv-group) > td { vertical-align: baseline; }
.lv-gifts-who small { margin-top: 2px; overflow-wrap: anywhere; }
/* The rows of the month the Report's gift timeline opened the log at (?month=). */
.lv-gifts-table tr[data-state="highlight"] > td { background-color: var(--lv-gold-100); }
.lv-gifts-table tr[data-state="highlight"] > td:first-child { box-shadow: inset 3px 0 0 var(--lv-gold-500); }
.lv-gifts-who .lv-pills { margin-top: 6px; }
.lv-gifts-more.lv-fold > summary { width: fit-content; min-height: 32px; margin-top: 4px; padding: 0; border-top: 0; }
.lv-gifts-more > :not(summary) { max-width: 360px; margin: 6px 0 4px; }
.lv-clock-years { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.lv-clock-years > span { height: 6px; border-radius: 9999px; background: var(--lv-gold-100); }
.lv-clock-years > [data-passed] { background: var(--lv-gold-500); }
.lv-gifts-amount { white-space: nowrap; }
.lv-gifts-share { white-space: nowrap; }
.lv-gifts-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* It restacks when its card is under 900px: a couple's seven columns need about 870px, Edit and Delete included. */
@container (max-width: 899px) {
  .lv-gifts-table thead { display: none; }
  .lv-gifts-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 14px 16px; border-bottom: 1px solid var(--lv-keyline); }
  .lv-gifts-table tbody tr:last-child { border-bottom: 0; }
  .lv-table.lv-gifts-table tr > :is(th, td) { display: block; padding: 0; border: 0; }
  .lv-gifts-table .lv-group { padding: 10px 16px; background-color: var(--lv-gold-50); }
  .lv-table.lv-gifts-table .lv-group > :is(th, td) { padding: 0; background: none; }
  .lv-gifts-table .lv-group .lv-gifts-verify { grid-column: 1 / -1; }
  .lv-gifts-table .lv-group .lv-gifts-verify:empty { display: none; }
  .lv-gifts-verify form { justify-content: flex-start; }
  .lv-gifts-who { grid-column: 1; grid-row: 1; }
  .lv-gifts-amount { grid-column: 2; grid-row: 1; align-self: start; }
  .lv-gifts-table .lv-date { grid-column: 1; color: var(--lv-ink-55); font-size: 13px; }
  .lv-gifts-status { grid-column: 2; justify-self: end; }
  .lv-gifts-share { grid-column: 1 / -1; text-align: left; color: var(--lv-ink-55); font-size: 13px; }
  .lv-gifts-share:empty { display: none; }
  .lv-gifts-label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .lv-gifts-table td:has(> .lv-actions) { grid-column: 1 / -1; }
  .lv-gifts-table .lv-actions { justify-content: flex-start; }
  .lv-gifts-table tr:not(.lv-group) > td:last-child:empty { display: none; }
  .lv-table.lv-gifts-table tr[data-state="highlight"] { background-color: var(--lv-gold-100); box-shadow: inset 3px 0 0 var(--lv-gold-500); }
  .lv-table.lv-gifts-table tr[data-state="highlight"] > td { background: none; box-shadow: none; }
}

/* ---- Delete gift, Import gifts, Import preview (gifts/confirm_delete.html, import.html, import_preview.html) ---- */
.lv-gifts-preview tr[data-state="error"] { background-color: var(--lv-red-fill); }
.lv-gifts-error { color: var(--lv-red-ink); font-size: 13px; }

/* ---- Entrance pages (allauth/layouts/base.html, entrance.html, account, invitations, error, 429) ----
   The green band carries the brand and curves under one narrow white card
   with the shield on top. allauth's account pages for a signed-in person
   sit in the app instead (allauth/layouts/manage.html). */
.lv-entry { min-height: 100dvh; }
.lv-entry-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 20px var(--lv-gutter) calc(24px + var(--lv-overlap) + var(--lv-curve));
  background: var(--lv-band);
  color: #fff;
  -webkit-mask: var(--lv-curve-mask);
  mask: var(--lv-curve-mask);
}
.lv-entry-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.lv-entry-links a { color: rgba(255, 255, 255, 0.8); font-size: 14px; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .lv-entry-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; } }
@media (max-width: 833px) { .lv-entry-links a { display: inline-flex; align-items: center; min-height: 44px; } }

.lv-entry-main {
  position: relative;
  box-sizing: border-box;
  width: calc(100% - 2 * 16px);
  max-width: 448px;
  margin: calc(-1 * (var(--lv-overlap) + var(--lv-curve))) auto 64px;
  padding: 40px;
  border: 1px solid var(--lv-line-card);
  border-radius: 16px;
  background-color: #fff;
  color: var(--lv-ink);
}
.lv-entry-shield { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 12px; background-color: var(--lv-green-700); color: #fff; }
.lv-entry-shield .icon { width: 28px; height: 28px; }

.lv-entry-head { display: grid; gap: 4px; margin-bottom: 32px; }
.lv-entry-card .lv-entry-head { text-align: center; }
.lv-entry-head h1 { margin: 0; }
.lv-entry-head p { margin: 0; color: var(--lv-ink-55); font-size: 14px; line-height: 1.5; }
.lv-entry-head strong { color: var(--lv-ink); overflow-wrap: anywhere; }

.lv-entry-form { display: grid; gap: 16px; margin: 0; }
.lv-entry-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: -4px; }
.lv-entry-row > :only-child { margin-left: auto; }
.lv-entry-submit { box-sizing: border-box; width: 100%; margin-top: 8px; }
.lv-entry-card > .lv-entry-submit { margin-top: 0; }
.lv-entry-foot { margin: 24px 0 0; color: var(--lv-ink-55); font-size: 14px; text-align: center; }

/* An invitation: who is asking, the facts beside their labels, the choices one under another. */
.lv-entry-from { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 16px; font-size: 14px; font-weight: 600; text-align: center; overflow-wrap: anywhere; }
.lv-entry-facts { margin: 0 0 16px; }
.lv-entry-note { margin: 0 0 20px; }
.lv-entry-choices { flex-direction: column; }

@media (max-width: 833px) {
  .lv-entry-band { padding-top: 16px; }
}
@media (max-width: 639px) { .lv-entry-main { padding: 32px; } }

/* ---- Your organizations (tenancy/picker.html) ---- */
.lv-entry-org { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 24px; border: 0; background: none; color: var(--lv-ink); font: inherit; text-align: left; cursor: pointer; transition: background-color var(--lv-duration) var(--lv-ease); }
.lv-entry-org > .lv-name-line { flex: 1; }
.lv-entry-org > .icon { flex: none; color: var(--lv-ink-55); }
.lv-entry-org:focus-visible { outline: 2px solid var(--lv-green-700); box-shadow: none; outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) { .lv-entry-org:hover { background-color: var(--lv-gold-50); } .lv-entry-org:hover > .icon { color: var(--lv-green-700); } }
.lv-entry-org:active { background-color: var(--lv-gold-100); transition-duration: 0ms; }
@media (max-width: 833px) { .lv-entry-org { padding-inline: 16px; } }

/* ---- Tax rules (taxengine/rule_list.html, rule_detail.html, constant_list.html, sandbox.html and their partials) ---- */
/* No prototype screen for a rule, the bands and rates or the sandbox:
   built from the shared pieces, the list after TaxRulesLogic's cards. */
.lv-rules-page { grid-template-columns: minmax(0, 1fr); }
.lv-rules-page > *, .lv-rules-page .lv-section > * { min-width: 0; }
.lv-rules-page .lv-section { grid-template-columns: minmax(0, 1fr); }
.lv-rules-spec { margin: 0; }
.lv-rules-caps { margin: 8px 0 0; }
.lv-rules-this { background-color: var(--lv-green-700); color: #fff; }

/* The list: find, then each rule a card, as the prototype's accordion cards. */
.lv-rules-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; }
.lv-rules-search { flex: 1 1 100%; min-width: 0; }
.lv-rules-filter .lv-select { flex: 0 1 220px; min-width: 0; }
.lv-rules-filter-go { display: inline-flex; gap: 4px; margin-left: auto; }
.lv-rules-links { gap: 8px 24px; }
.lv-rules-list, .lv-rules-related, .lv-rules-payments { margin: 0; padding: 0; list-style: none; }
.lv-rules-list { display: grid; gap: 8px; }
.lv-rules-item, .lv-rules-related > li { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 4px 16px; }
.lv-rules-related > li { min-height: 64px; padding: 14px 24px; }
:is(.lv-rules-item, .lv-rules-related > li) > .lv-name { grid-row: 1 / span 2; align-self: start; font-size: 14px; white-space: nowrap; }
.lv-rules-item-text { margin: 0; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.lv-rules-item-meta { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 0; }
.lv-rules-related { overflow: hidden; }
.lv-rules-related > li + li { border-top: 1px solid var(--lv-keyline); }

/* Bands and rates: the prototype's constants list, name and words left, value right. */
.lv-rules-constant > .lv-row-value { grid-column: -2; }
.lv-rules-constant-about { display: grid; gap: 2px; min-width: 0; font-size: 13px; }
.lv-rules-constant-about b { font-size: 15px; font-weight: 600; }
.lv-rules-constant-about code { font-size: 12px; overflow-wrap: anywhere; }
.lv-rules-constant-note { margin-top: 4px; }
.lv-rules-constant-rules { display: flex; flex-wrap: wrap; align-items: center; grid-column: 1 / -1; gap: 4px; margin: 0; font-size: 13px; }

/* One rule. */
.lv-rules-doc { overflow: hidden; }
.lv-rules-pager { gap: 8px 16px; font-size: 13px; }
.lv-rules-pager > .lv-actions { justify-content: flex-start; }
.lv-rules-wording { margin: 0; font-size: 20px; overflow-wrap: anywhere; }
.lv-rules-figure { color: var(--lv-green-700); font-weight: 600; text-decoration: underline dotted; text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .lv-rules-figure:hover { background-color: var(--lv-green-tint); } }
.lv-rules-body h3 { margin: 8px 0 0; font-size: 15px; font-weight: 600; letter-spacing: 0; }
.lv-rules-body > h3:first-child, .lv-rules-body > :first-child h3:first-child { margin-top: 0; }
.lv-rules-body p { margin: 0; }
.lv-rules-listing, .lv-rules-formula { margin: 0; overflow-x: auto; border-radius: 8px; background-color: var(--lv-gold-50); border: 1px solid var(--lv-line-card); font-family: var(--lv-mono); line-height: 1.6; }
.lv-rules-formula { padding: 14px 16px; font-size: 13px; white-space: pre-wrap; }
.lv-rules-fn { display: grid; gap: 6px; }
.lv-rules-fn-name { font-size: 14px; overflow-wrap: anywhere; }
.lv-rules-also { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 14px; }
.lv-rules-fn-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 6px; font-size: 13px; }
.lv-rules-values { padding-top: 16px; border-top: 1px solid var(--lv-keyline); }
.lv-rules-values .lv-card-head h3 { margin: 0; }
.lv-rules-value-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; margin: 0; }
.lv-rules-value { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: start; gap: 2px 12px; transition: background-color var(--lv-duration) var(--lv-ease), border-color var(--lv-duration) var(--lv-ease); }
.lv-rules-value dt { min-width: 0; font-size: 12px; overflow-wrap: anywhere; }
.lv-rules-value dd { margin: 0; }
.lv-rules-value-amount { display: grid; justify-items: end; font-size: 17px; font-weight: 600; }
.lv-rules-value-amount small { color: var(--lv-ink-55); font-size: 12px; font-weight: 400; }
.lv-rules-value-label { grid-column: 1 / -1; font-size: 14px; }
.lv-rules-value-meta { grid-column: 1 / -1; }
.lv-rules-value:target, .lv-rules-value.is-traced { border-color: var(--lv-gold-500); background-color: var(--lv-gold-50); }
.lv-rules-body > .lv-fold > summary { margin: 0 -24px; }
.lv-rules-tests > :not(summary) { margin: 8px 0 0; }
.lv-rules-tests ul { padding-left: 16px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.lv-rules-code[hidden], .lv-rules-example[hidden] { display: none; }
.lv-rules-code-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.lv-rules-code-name { font-size: 14px; font-weight: 600; }
.lv-rules-listing { display: grid; grid-template-columns: minmax(100%, max-content); padding: 8px 0; font-size: 12px; }
.lv-rules-line { padding-right: 12px; white-space: pre; }
.lv-rules-line:target { background-color: var(--lv-attention-fill); }
.lv-rules-line-marked, .lv-rules-line-partly { background-color: var(--lv-attention-fill); }
.lv-rules-number { display: inline-block; width: 4ch; margin-right: 2ch; color: var(--lv-ink-55); text-align: right; user-select: none; }
.lv-rules-gutter { display: inline-flex; gap: 4px; width: 8rem; padding-left: 8px; vertical-align: top; }
.lv-rules-wide .lv-rules-gutter { width: 15rem; }
.lv-rules-gutter .lv-rule { padding: 0 6px; font-size: 11px; }
.lv-rules-gutter-partly { color: var(--lv-attention); font-size: 11px; font-weight: 600; }
.lv-rules-helpers { display: grid; gap: 4px; }
.lv-rules-helper > summary { flex-wrap: wrap; margin: 0 -24px; padding: 8px 24px; }
.lv-rules-helper > summary code { color: var(--lv-ink); }
.lv-rules-helper > summary .lv-hint { font-weight: 400; }
.lv-rules-helper-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.lv-rules-helper > summary > .icon { margin-left: auto; }
.lv-rules-helper > .lv-rules-listing { margin-bottom: 12px; }
.lv-rules-uses { margin: 12px 0 4px; color: var(--lv-ink-55); font-size: 13px; font-weight: 600; }
.lv-rules-use > summary { flex-wrap: wrap; padding: 0; }
.lv-rules-use > summary > .icon { margin-left: auto; }
/* The example's title is its card's title. */
.lv-rules-example > h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.lv-rules-working { padding: 0; }
.lv-rules-working .lv-step-row[data-this] { background-color: var(--lv-gold-50); }
.lv-rules-no-rule { width: 0; }

/* The contents: a sheet from the right, scrolled to this rule. */
.lv-rules-contents:popover-open { display: grid; align-content: start; }
.lv-rules-contents { inset: 0 0 0 auto; width: min(30rem, 100vw); max-height: none; height: 100dvh; margin: 0; padding: 0 0 24px; overflow-y: auto; border: 0; border-left: 1px solid var(--lv-line-card); background-color: #fff; box-shadow: var(--lv-shadow-overlay); color: var(--lv-ink); }
.lv-rules-contents { transform: translateX(100%); transition: transform 200ms var(--lv-ease-out), overlay 200ms allow-discrete, display 200ms allow-discrete; }
.lv-rules-contents:popover-open { transform: none; transition-duration: 280ms; transition-timing-function: var(--lv-ease-drawer); }
@starting-style { .lv-rules-contents:popover-open { transform: translateX(100%); } }
.lv-rules-contents::backdrop { background-color: transparent; transition: background-color 200ms var(--lv-ease-out), overlay 200ms allow-discrete, display 200ms allow-discrete; }
.lv-rules-contents:popover-open::backdrop { background-color: var(--lv-scrim); }
@starting-style { .lv-rules-contents:popover-open::backdrop { background-color: transparent; } }
.lv-rules-contents-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 16px 16px 16px 24px; background-color: #fff; border-bottom: 1px solid var(--lv-line-card); font-size: 13px; }
.lv-rules-contents-head h2 { margin: 0 auto 0 0; font-size: 17px; font-weight: 600; }
.lv-rules-sec > summary { color: var(--lv-ink); font-weight: 500; }
.lv-rules-sec-name { flex: 1; min-width: 0; padding: 10px 0; }
.lv-rules-toc { margin: 0; padding: 0 12px 8px; list-style: none; }
.lv-rules-toc a { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 2px 12px; padding: 8px 12px; border-radius: 12px; color: var(--lv-ink); font-size: 13px; text-decoration: none; }
.lv-rules-toc .lv-rule { align-self: start; justify-self: start; }
.lv-rules-toc span { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.lv-rules-toc small { grid-column: 2; color: var(--lv-ink-55); font-size: 12px; }
.lv-rules-toc a[aria-current="page"] { background-color: var(--lv-green-tint); }
@media (hover: hover) and (pointer: fine) { .lv-rules-toc a:not([aria-current]):hover { background-color: var(--lv-gold-50); } }

/* The engine code beside a rule's code, the card rule-code.js opens. */
/* The engine's code beside a rule code (static/js/rule-code.js writes the card and places it). */
.lv .code-card { position: fixed; z-index: 45; width: min(46rem, calc(100vw - 16px)); max-height: min(30rem, var(--code-card-room, 70vh)); padding: 16px; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--lv-line-card); border-radius: 12px; background-color: #fff; box-shadow: var(--lv-shadow-overlay); color: var(--lv-ink); }
.lv .code-card { transition: opacity var(--lv-duration) var(--lv-ease); }
@starting-style { .lv .code-card { opacity: 0; } }
.lv .code-card .lv-rules-code-head { margin-bottom: 8px; }

/* The sandbox: the year's totals, then each payment a fold. */
.lv-rules-year-head { align-items: center; margin: 0; }
.lv-rules-year { display: flex; gap: 8px; margin: 0; }
/* The year's totals are the small figures (lv-figures-sm), each on one line; five of them stand one
   a row under 1200px, where five columns are too narrow for a total. */
.lv-rules-year-card .lv-figure { white-space: nowrap; }
@media (max-width: 1199px) {
  .lv-rules-year-card .lv-figures { grid-auto-flow: row; }
  .lv-rules-year-card .lv-figures > div { padding: 12px 0; border-top: 1px solid var(--lv-keyline); border-left: 0; }
  .lv-rules-year-card .lv-figures > div:first-child { padding-top: 0; border-top: 0; }
}
.lv-rules-sandbox-empty > .lv-note-attention { padding: 0 24px 20px; }
/* A sandbox payment is a fold row: the payment's line and its marks take the room before the caret. */
.lv-rules-payments summary > :not(.icon) { grid-column: 1 / -2; }
.lv-rules-payments summary > .icon { grid-column: -2; grid-row: 1; }
.lv-rules-pay-more { display: grid; gap: 24px; padding: 8px 24px 24px; border-top: 1px solid var(--lv-keyline); }
.lv-rules-part { display: grid; gap: 6px; }
.lv-rules-part h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: 0; }
.lv-rules-part > p { margin: 0; font-size: 14px; line-height: 1.5; }
.lv-rules-trace { padding: 0; }
.lv-rules-step[data-decided] { background-color: var(--lv-gold-50); }
.lv-rules-decides { color: var(--lv-attention); }
.lv-rules-substeps { grid-column: 2 / -1; padding-left: 12px; border-left: 2px solid var(--lv-line-card); }
/* The sandbox's every-payment check. */
.lv-rules-tally { display: grid; gap: 4px; }
.lv-rules-tally-q { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 500; }
.lv-rules-step [data-code]:not(a), .lv-rules-tally-q [data-code] { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
.lv-rules-tally .lv-step-facts { grid-column: auto; }

@media (max-width: 833px) {
  .lv-rules-filter .lv-select { flex: 1 1 100%; }
  .lv-rules-filter-go { margin-left: 0; }
  .lv-rules-item, .lv-rules-related > li { grid-template-columns: minmax(0, 1fr); }
  .lv-rules-related > li { padding: 14px 16px; }
  :is(.lv-rules-item, .lv-rules-related > li) > .lv-name { grid-row: auto; }
  .lv-rules-wording { font-size: 17px; }
  .lv-rules-pay-more { padding: 8px 16px 16px; }
  .lv-rules-substeps { grid-column: 1 / -1; }
  .lv-rules-gutter { width: 5.5rem; }
  .lv-rules-wide .lv-rules-gutter { width: 10rem; }
}
/* A fold at a padded card's edges follows its 20px padding. */
@media (max-width: 639px) {
  .lv-rules-body > .lv-fold > summary, .lv-rules-helper > summary { margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
}

/* ==========================================================================
   From page to page: what changed cross-fades, 150ms, and the header and the
   side menu keep still. Only where motion is welcome: the reduced-motion rule
   below cannot reach a page transition, so it is not asked for at all.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation-duration: 150ms; animation-timing-function: var(--lv-ease); }
  .lv-header { view-transition-name: lv-header; }
  .lv-sidenav { view-transition-name: lv-sidenav; }
}

/* ==========================================================================
   Reduced motion: nothing moves. Every transition is instant and every
   animation stops, so a colour or a state still changes, at once, and the
   running stretch stands still in the middle. One rule here, after every
   piece, so no piece's own transition can win over it.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .lv *, .lv *::before, .lv *::after, .lv *::backdrop { transition-duration: 0s !important; animation: none !important; }
  :is(.lv-org-switcher summary.lv-org-card, .lv-icon-btn, .lv-sort-val, .lv-firm-tile, a.lv-link-card, .lv-btn):active { transform: none; }
  .lv-upl-zone:not([data-dragging]):active .lv-upl-choose { transform: none; }
  :is(form[hx-post]:not([hx-trigger]).htmx-request, form[data-sent]) button:not([type="button"]) { transform: none; }
}
/* Apart from the rule above: a browser without the fold's contents box drops this one alone. */
@media (prefers-reduced-motion: reduce) { .lv *::details-content { transition-duration: 0s !important; } }

/* The Sandbox's inheritance tax report (taxengine/report.html). */
.lv-report { --lv-page-gap: 16px; }
.lv-report-head .lv-rules-year-head { margin-bottom: 16px; }
/* The four totals: each a label over its figure; a range wraps on its own words, never over its neighbour. */
.lv-report-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; margin: 0 0 16px; }
.lv-report-tiles > div { display: grid; align-content: start; gap: 6px; min-width: 0; padding: 14px 16px; border: 1px solid var(--lv-line-card); border-radius: 12px; }
.lv-report-tiles dt { color: var(--lv-ink-55); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.lv-report-tiles dd { margin: 0; color: var(--lv-ink); font-size: 20px; font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lv-report-tiles > .lv-report-tile-total { border-color: var(--lv-green-700); background-color: var(--lv-green-tint); }
.lv-report-tiles > [data-state="unanswered"] dd { color: var(--lv-attention); font-size: 16px; }
/* What the report rests on: a bar each, its share and what is on the record. */
.lv-report-bars { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.lv-report-bars > li { display: grid; grid-template-columns: 150px minmax(0, 1fr) 48px; grid-template-areas: "label bar pct" "label text text"; align-items: center; gap: 4px 16px; }
.lv-report-bar-label { grid-area: label; align-self: start; font-size: 14px; font-weight: 600; line-height: 24px; }
.lv-report-meter { grid-area: bar; width: 100%; height: 10px; border: 0; border-radius: 9999px; background: var(--lv-gold-100); appearance: none; }
.lv-report-meter::-webkit-meter-bar { height: 10px; border: 0; border-radius: 9999px; background: var(--lv-gold-100); }
.lv-report-meter::-webkit-meter-optimum-value { border-radius: 9999px; background: var(--lv-green-700); }
.lv-report-meter::-webkit-meter-suboptimum-value, .lv-report-meter::-webkit-meter-even-less-good-value { border-radius: 9999px; background: var(--lv-gold-500); }
.lv-report-meter:-moz-meter-optimum::-moz-meter-bar { border-radius: 9999px; background: var(--lv-green-700); }
.lv-report-meter:-moz-meter-sub-optimum::-moz-meter-bar, .lv-report-meter:-moz-meter-sub-sub-optimum::-moz-meter-bar { border-radius: 9999px; background: var(--lv-gold-500); }
.lv-report-bar-pct { grid-area: pct; font-size: 14px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.lv-report-bars > [data-state="unanswered"] .lv-report-bar-pct { color: var(--lv-attention); }
.lv-report-bar-text { grid-area: text; color: var(--lv-ink-55); font-size: 13px; }
.lv-report-bar-text .lv-link { margin-left: 6px; font-size: 13px; }
.lv-report-why { display: grid; gap: 6px; margin: 16px 0 0; padding: 12px 16px; border: 1px solid var(--lv-gold-line); border-radius: 12px; background-color: var(--lv-attention-fill); color: var(--lv-attention); font-size: 13px; list-style: none; }
@media (max-width: 600px) {
  .lv-report-bars > li { grid-template-columns: minmax(0, 1fr) 48px; grid-template-areas: "label pct" "bar bar" "text text"; }
}
.lv-report-toolbar { display: flex; justify-content: flex-end; gap: 4px; margin-bottom: -8px; }
/* Each section folds; its title row keeps a quiet line of what it comes to. */
.lv-report-section > summary .lv-note { margin: 0; color: var(--lv-ink-55); font-size: 13px; }
.lv-report-people { grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); }
.lv-report-panel { padding: 16px 20px; border: 1px solid var(--lv-line-card); border-radius: 12px; }
.lv-report-panel > h3, .lv-report-donor > h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
/* A report table: in a keyline frame of its own, nil cells quiet, a total a full-weight row on gold. */
.lv-report-table-wrap { overflow-x: auto; border: 1px solid var(--lv-line-card); border-radius: 12px; }
.lv-report-table { font-size: 14px; }
.lv-report-table :is(tbody th, td) { padding: 12px 16px; }
.lv-report-table thead th { padding: 10px 16px; color: var(--lv-ink-55); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.lv-report-table .lv-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lv-report-table .lv-report-nil { color: var(--lv-ink-55); font-weight: 400; }
.lv-report-table tr.lv-report-total > :is(th, td) { border-top: 1px solid var(--lv-line-input); background-color: var(--lv-gold-50); color: var(--lv-ink); font-weight: 600; }
.lv-report-rule-col { width: 1%; white-space: nowrap; text-align: right; }
.lv-report-rule-col .lv-rule + .lv-rule { margin-left: 4px; }
/* Gifts: the donor's figures, the timeline, then the table. */
.lv-report-donor + .lv-report-donor { padding-top: 24px; border-top: 1px solid var(--lv-keyline); }
.lv-report-donor { display: grid; gap: 16px; }
.lv-report-donor > h3 { margin: 0; }
.lv-report-gift-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 12px; margin: 0; }
.lv-report-gift-figures > div { display: grid; align-content: start; gap: 4px; padding: 12px 16px; border-radius: 12px; background-color: var(--lv-gold-50); }
.lv-report-gift-figures dt { color: var(--lv-ink-55); font-size: 12px; }
.lv-report-gift-figures dd { margin: 0; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lv-report-gift-figures > [data-state="unanswered"] { background-color: var(--lv-attention-fill); }
.lv-report-gift-figures > [data-state="unanswered"] dd { color: var(--lv-attention); }
.lv-report-gift-table td:nth-child(2) { min-width: 180px; }
.lv-report-gift-table td:nth-child(2) b { display: block; font-weight: 600; }
.lv-report-gift-table tr[data-state="unanswered"] > td:first-child { box-shadow: inset 3px 0 0 var(--lv-gold-500); }
/* The working: a heading per death, a lettered heading per step, each sum a fold showing its result. */
.lv-report-death { margin: 8px 0 0; padding: 10px 16px; border-radius: 12px; background-color: var(--lv-green-tint); color: var(--lv-green-700); font-size: 16px; font-weight: 600; }
.lv-report-block { display: grid; gap: 10px; }
.lv-report-block > h3 { display: flex; align-items: center; gap: 10px; margin: 8px 0 0; font-size: 16px; font-weight: 600; }
.lv-report-block > .lv-quiet { margin: 0; font-size: 13px; }
.lv-report-letter { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 9999px; background-color: var(--lv-green-700); color: #fff; font-size: 13px; font-weight: 600; }
.lv-report-letter-sm { width: 22px; height: 22px; font-size: 11px; }
.lv-report-sum { border: 1px solid var(--lv-line-card); border-radius: 12px; }
.lv-report-sum > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto 16px; align-items: center; gap: 12px; min-height: 52px; padding: 10px 16px; list-style: none; cursor: pointer; border-radius: 12px; }
.lv-report-sum > summary::-webkit-details-marker { display: none; }
.lv-report-sum > summary:focus-visible { outline: 2px solid var(--lv-green-700); outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) { .lv-report-sum > summary:hover { background-color: var(--lv-gold-50); } }
.lv-report-sum-title { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.lv-report-sum-result { font-size: 14px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.lv-report-sum > summary > .icon { width: 16px; height: 16px; color: var(--lv-ink-55); transition: transform 200ms ease-out; }
.lv-report-sum[open] > summary > .icon { transform: rotate(180deg); }
.lv-report-sum-body { display: grid; gap: 12px; padding: 4px 16px 16px; border-top: 1px solid var(--lv-keyline); }
.lv-report-sum-body > .lv-note { margin: 8px 0 0; }
.lv-report-lines .lv-rule { margin-left: 4px; vertical-align: 1px; }
/* The gift timeline (taxengine/_report_timeline.html): an inline SVG, so positions are attributes. */
.report-tl { margin: 0; padding: 12px 16px 14px; border: 1px solid var(--lv-line-card); border-radius: 12px; }
.report-tl-scroll { overflow-x: auto; }
.report-tl svg { display: block; width: 100%; min-width: 640px; height: auto; overflow: visible; font-family: inherit; }
.report-tl-axis { stroke: var(--lv-line-input); stroke-width: 3; }
.report-tl-mark { stroke: var(--lv-line-input); stroke-width: 2; }
.report-tl-tick, .report-tl-date { fill: var(--lv-ink-55); font-size: 14px; }
.report-tl-date { font-size: 13px; }
.report-tl-earlier { fill: var(--lv-gold-50); stroke: var(--lv-line-card); stroke-dasharray: 4 4; }
.report-tl-gift circle { fill: var(--lv-green-700); fill-opacity: 0.85; stroke: #fff; stroke-width: 2; }
.report-tl-trust circle { fill: var(--lv-gold-500); }
.report-tl-open circle { fill: #fff; stroke: var(--lv-attention); stroke-width: 3; stroke-dasharray: 5 3; }
.report-tl-amount { fill: var(--lv-ink); font-size: 15px; font-weight: 600; }
.report-tl-key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; color: var(--lv-ink-55); font-size: 12px; }
.report-tl-key > span { display: inline-flex; align-items: center; gap: 6px; }
.report-tl-dot { display: inline-block; width: 10px; height: 10px; border-radius: 9999px; background-color: var(--lv-green-700); }
.report-tl-dot-trust { background-color: var(--lv-gold-500); }
.report-tl-dot-open { border: 2px dashed var(--lv-attention); background-color: #fff; }
/* The gift timeline's years opened out (static/js/gift-timeline.js): without the script, only the seven years show. */
.report-tl { position: relative; }
.report-tl-head[hidden], .report-tl-tip[hidden] { display: none; }
.report-tl-hits { display: none; }
.report-tl-wash, .report-tl-year { visibility: hidden; opacity: 0; }
.report-tl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 32px; margin-bottom: 8px; }
.report-tl-head p { margin: 0; }
.report-tl-title { color: var(--lv-ink); font-size: 14px; font-weight: 600; }
.report-tl-hint { color: var(--lv-ink-55); font-size: 12px; }
.report-tl-back { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border: 1px solid var(--lv-line-card); border-radius: 9999px; background-color: #fff; color: var(--lv-green-700); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: background-color var(--lv-duration) var(--lv-ease); }
@media (hover: hover) and (pointer: fine) { .report-tl-back:hover { background-color: var(--lv-gold-100); } }
.report-tl-back:focus-visible { outline: 2px solid var(--lv-green-700); outline-offset: 2px; }
.report-tl:not([data-open]) :is(.report-tl-back, .report-tl-title, .report-tl-hint-year), .report-tl[data-open] .report-tl-hint-years { display: none; }
.report-tl[data-open] .report-tl-hint-year { margin-left: auto; }
.report-tl[data-live]:not([data-open]) .report-tl-hits { display: inline; }
.report-tl[data-live] svg :is(text, line, circle, .report-tl-earlier) { pointer-events: none; }
.report-tl-hits rect, .report-tl-month rect, .report-tl-cluster rect { fill: transparent; pointer-events: visible; }
.report-tl-band, .report-tl-month, .report-tl-cluster { outline: none; cursor: pointer; text-decoration: none; }
.report-tl-band[aria-disabled="true"], .report-tl-before { cursor: default; }
.report-tl-band rect { transition: fill var(--lv-duration) var(--lv-ease); }
.report-tl-band:is(:hover, :focus-visible) rect { fill: var(--lv-gold-100); }
.report-tl-band[aria-disabled="true"]:is(:hover, :focus-visible) rect { fill: var(--lv-gold-50); }
.report-tl-month:is(:hover, :focus-visible) rect { fill: var(--lv-gold-100); }
:is(.report-tl-band, .report-tl-month, .report-tl-cluster):focus-visible rect { stroke: var(--lv-green-700); stroke-width: 2; }
.report-tl:has(.report-tl-before:is(:hover, :focus-visible)) .report-tl-earlier { stroke: var(--lv-ink-55); }
.report-tl-cluster:hover rect { stroke: var(--lv-ink-55); stroke-width: 1.5; }
.report-tl-wash { fill: var(--lv-gold-50); transition: transform 280ms var(--lv-ease-drawer), opacity 200ms var(--lv-ease), visibility 0ms 200ms; }
.report-tl[data-open] .report-tl-wash { visibility: visible; opacity: 1; transition: transform 280ms var(--lv-ease-drawer), opacity 200ms var(--lv-ease); }
.report-tl-gift { transition: transform 280ms var(--lv-ease-drawer), opacity 200ms var(--lv-ease), visibility 0ms; }
.report-tl-gift text, .report-tl-years { transition: opacity 200ms var(--lv-ease), visibility 0ms; }
.report-tl[data-open] :is(.report-tl-years, .report-tl-gift text, .report-tl-gift[data-out]) { visibility: hidden; opacity: 0; transition: transform 280ms var(--lv-ease-drawer), opacity 200ms var(--lv-ease), visibility 0ms 200ms; }
.report-tl-year { transition: opacity 200ms var(--lv-ease), visibility 0ms 200ms; }
.report-tl-year[data-shown] { visibility: visible; opacity: 1; transition: opacity 200ms var(--lv-ease); }
.report-tl-tip { position: absolute; z-index: 20; box-sizing: border-box; width: max-content; max-width: min(360px, calc(100% - 16px)); padding: 10px 12px; border: 1px solid var(--lv-line-card); border-radius: 12px; background-color: #fff; box-shadow: var(--lv-shadow-pop); color: var(--lv-ink); font-size: 13px; line-height: 1.4; text-align: left; }
.report-tl-tip p { margin: 0; }
.report-tl-tip-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.report-tl-tip-head span, .report-tl-tip-count, .report-tl-tip-date, .report-tl-tip-more, .report-tl-tip-to small { color: var(--lv-ink-55); }
.report-tl-tip-count { margin-top: 2px; }
.report-tl-tip-count b { color: var(--lv-ink); }
.report-tl-tip-gifts { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: baseline; gap: 4px 8px; margin: 8px 0 0; padding: 8px 0 0; border-top: 1px solid var(--lv-line-card); list-style: none; }
.report-tl-tip-gifts li { display: contents; }
.report-tl-tip-gifts .report-tl-dot { align-self: center; }
.report-tl-tip-date, .report-tl-tip-gifts b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.report-tl-tip-gifts b { text-align: right; }
.report-tl-tip-to { overflow-wrap: anywhere; }
.report-tl-tip-to small { display: block; font-size: 12px; }
.report-tl-tip-more { margin-top: 8px; }
.lv-report-gift-table td.lv-num small { white-space: normal; font-weight: 400; }
.lv-report-gift-table td:nth-child(2) { min-width: 150px; }
/* A wide table or the timeline scrolls inside its frame: no grid track grows past the card. */
.lv-report .lv-fold-card-body, .lv-report-donor { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.lv-report-gift-figures { grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); }
.lv-report-gift-table td.lv-num small { white-space: nowrap; }
.lv-report-table td:is(:nth-last-child(2), :nth-last-child(3)) { white-space: nowrap; }
.lv-report-table th[scope="row"] { min-width: 180px; }
.lv-report-gift-figures > [data-state="unanswered"] dd { font-size: 15px; }
.lv-report-table thead th { white-space: normal; }
/* The gift table fits the 876px frame at desktop width: 12px cells; the "To" column wraps, a pill never does. */
.lv-report-gift-table :is(tbody th, td, thead th) { padding-inline: 12px; }
/* Step D: a tax a recipient owes is underlined in the danger colour; hovering or focusing it shows ET-20's note. */
.lv-report-owed { border-bottom: 2px solid var(--lv-red); cursor: help; }
td:has(> .lv-report-owed) { position: relative; }
.lv-report-owed:focus-visible { outline: 2px solid var(--lv-green-700); outline-offset: 4px; border-radius: 6px; }
/* Plain tip under the figure; where anchors are supported it is placed on the viewport instead (the frame would clip it). */
.lv-report-tip { position: absolute; top: 100%; right: 0; z-index: 20; display: none; box-sizing: border-box; width: min(320px, calc(100vw - 32px)); margin-top: 8px; padding: 8px 12px; border-radius: 8px; background-color: var(--lv-ink); color: #fff; font-size: 13px; font-weight: 400; text-align: left; white-space: normal; }
.lv-report-tip::before { content: ""; position: absolute; inset: -8px 0; z-index: -1; }
.lv-report-owed:is(:hover, :focus) + .lv-report-tip, .lv-report-tip:hover { display: block; }
@supports (anchor-scope: --owed) {
  .lv-report-owed { anchor-name: --owed; }
  td:has(> .lv-report-owed) { anchor-scope: --owed; }
  .lv-report-tip { position: fixed; position-anchor: --owed; top: anchor(bottom); right: auto; left: max(16px, min(anchor(left), calc(100vw - min(320px, 100vw - 32px) - 16px))); position-try-fallbacks: flip-block; }
}
/* The IHT403 downloads under the totals: a line per person, its button in a column of its own. */
.lv-report-get-list { display: grid; margin: 4px 0 0; padding: 0; list-style: none; }
.lv-report-get-list > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 24px; padding: 14px 0; border-top: 1px solid var(--lv-line-card); }
.lv-report-get-list > li:last-child { padding-bottom: 0; }
.lv-report-get-who { display: grid; gap: 4px; min-width: 0; }
.lv-report-get-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--lv-ink); font-size: 16px; font-weight: 600; }
.lv-report-get-name .lv-chip { height: auto; min-height: 24px; white-space: normal; }
.lv-report-get-last { color: var(--lv-ink-55); font-size: 14px; }
.lv-report-get-action { display: grid; justify-items: end; gap: 4px; }
.lv-report-get-action .lv-tax-hint { max-width: 320px; text-align: right; white-space: normal; }
@media (max-width: 600px) {
  .lv-report-get-list > li { grid-template-columns: minmax(0, 1fr); }
  .lv-report-get-action { justify-items: stretch; }
  .lv-report-get-action .lv-btn { width: 100%; }
  .lv-report-get-action .lv-tax-hint { max-width: none; text-align: left; }
}
/* The IHT403 panel: who set a figure under it, and the row of fields that adds spending by hand. */
.lv-report-iht403 { display: grid; gap: 12px; min-width: 0; }
.lv-report-iht403 > h4 { margin: 8px 0 0; font-size: 14px; font-weight: 600; }
.lv-report-iht403 td .lv-tax-hint { display: block; margin-top: 2px; white-space: normal; }
.lv-report-iht403-add { justify-content: flex-start; }
