/* B's T225 hand-off: Home as one centred, compact column (design\home-centred-column.html: its sizes and spacing, in
   our own font, surfaces and the brand's accent).
   The look (E, T225): the greeting and the figures' numbers in the display face, the rest in the body face; every card
   on the panels' surface, radius 10, no ring; hairlines between rows; small type (labels 13 px, captions 12 px) in the
   soft ink, 7:1 or more on a card; "See all" and links in the accent ink (4.5:1 under any allowed accent); the marks
   in "Needs you" are 8 px dots coloured by kind (a failing mailbox red, money and a full mailbox amber, a ticket the
   accent), 3:1 or more on the card; 28 px between sections, 20 on a phone. */
:root { --home-dot-warn: #A8650F; }
@media (prefers-color-scheme: dark) { :root:not(.theme-light) { --home-dot-warn: var(--mustard); } }
:root.theme-dark { --home-dot-warn: var(--mustard); }
.panel-content.is-home { max-width: none; }
.home-page { width: 100%; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; padding-block: 8px 40px; }
.home-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.home-head h1 { margin: 0; font: 700 26px/1.2 var(--display); letter-spacing: -0.01em; }
.home-sub { margin: 4px 0 0; font-size: var(--t-small); color: var(--ink-soft); }
.home-sub:empty { display: none; }
.home-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.home-actions .btn { min-height: 44px; padding-inline: 16px; }
.home-col { display: flex; flex-direction: column; gap: 28px; }
/* the figures: three a row at most (220 px or wider in 760), more wrap at the same size */
.home-col > .home-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 0; }
.home-col .home-tile { flex-direction: row; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 10px; min-width: 0; background: var(--surface); box-shadow: var(--panel-lift); }
.home-col a.home-tile:hover { background: color-mix(in oklab, var(--ink) 4%, var(--surface)); }
.home-col a.home-tile:hover .tile-big { text-decoration: none; }
.home-tile .tile-text { display: flex; flex-direction: column; min-width: 0; }
.home-tile .tile-label { font-size: 13px; line-height: 1.3; color: var(--ink-soft); }
.home-tile .tile-big { margin-top: 12px; font: 700 22px/1.1 var(--display); font-variant-numeric: tabular-nums; color: var(--ink); }
.home-tile .tile-caption { margin-top: 2px; font-size: 12px; line-height: 1.3; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-tile .dash-spark { flex: none; width: 70px; height: 34px; align-self: flex-end; margin: 0; }
/* sections: a title (and "See all") above one card */
.home-sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0 2px 8px; }
.home-sec-head h2 { margin: 0; font: 600 14px/1.3 var(--body); color: var(--ink); }
.home-more { font: 600 13px/1.3 var(--body); background: none; border: 0; padding: 0; color: var(--accent-ink); cursor: pointer; text-decoration: none; }
.home-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.home-card { border-radius: 10px; background: var(--surface); box-shadow: var(--panel-lift); padding: 2px 16px; }
.home-rows { display: flex; flex-direction: column; }
.home-row { display: flex; gap: 12px; align-items: center; min-height: 44px; padding: 10px 0; box-sizing: border-box; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--row-line); }
.home-row:last-child { border-bottom: 0; }
a.home-row:hover .home-row-text { text-decoration: underline; text-underline-offset: 3px; }
.home-row-text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.home-row-when { flex: none; font-size: 13px; color: var(--ink-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.home-row-when.lead { flex: 0 0 62px; }
.home-dot { flex: none; width: 8px; height: 8px; border-radius: 999px; overflow: hidden; font-size: 0; line-height: 0; color: transparent; background: var(--ink-muted); }
.kind-failing .home-dot { background: var(--danger); }
.kind-unpaid .home-dot, .kind-full .home-dot { background: var(--home-dot-warn); }
.kind-ticket .home-dot, .kind-setup .home-dot { background: var(--accent-ink); }
/* your places: equal small cards, a sentence and one button */
.home-places { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.place-card { border-radius: 10px; background: var(--surface); box-shadow: var(--panel-lift); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.place-card h3 { margin: 0; font: 600 14px/1.3 var(--body); color: var(--ink); }
.place-state { margin: 0; flex-grow: 1; font-size: 13px; line-height: 1.4; color: var(--ink-soft); }
.place-card .btn { align-self: flex-start; min-height: 44px; padding-inline: 14px; }
.home-start { padding: 14px 16px; display: grid; gap: 10px; }
.home-start p { margin: 0; }
.home-foot { display: flex; justify-content: flex-end; margin-top: -12px; }
/* Customize home (F on b48f06e: the rows were scattered, the tick high on the right and its name low on the left):
   one line a row from 900 px up (the sheet is 600 px wide there): the grip, the tick and its name together on the
   left; "Open in a new tab" and Move up / Move down on the right. On a phone the options wrap under the name,
   indented to it. A row is a quiet filled strip, radius 10, no ring; the grip and the name's tick line up. */
.custom-sub { margin: 14px 0 4px; font: 600 var(--t-small)/1.3 var(--body); color: var(--ink-soft); }
.custom-list { display: grid; gap: 6px; }
.custom-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; padding: 6px 10px; border: 0; border-radius: 10px; background: var(--field-quiet); min-height: 56px; box-sizing: border-box; }
.custom-row .custom-grip { flex: none; width: 18px; height: 18px; cursor: grab; touch-action: none; color: var(--ink-muted); }
.custom-row > input[type=checkbox] { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.custom-row > label { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; min-height: 44px; cursor: pointer; overflow-wrap: anywhere; }
.custom-row .opts { grid-column: auto; margin-left: auto; display: flex; flex-wrap: nowrap; align-items: center; gap: 4px 10px; }
.custom-row .opts .tick.small { white-space: nowrap; font-weight: 600; }
.custom-row .custom-move { display: inline-flex; gap: 4px; }
.custom-row .custom-move .btn { white-space: nowrap; }
@media (min-width: 900px) { .sheet { width: min(600px, 100vw); } }
@media (max-width: 899px) { .custom-row .opts { flex: 1 0 100%; flex-wrap: wrap; margin-left: 0; padding-left: 58px; } .custom-row:not(.movable) .opts { padding-left: 30px; } }   /* under the name: past the grip and the tick, or the tick alone */
@media (max-width: 599px) { .home-page { gap: 20px; padding-block: 0 24px; } .home-col { gap: 20px; } .home-head h1 { font-size: 22px; }
  .home-actions { width: 100%; } .home-actions .btn { flex: 1 1 0; justify-content: center; } }
/* T225 fit (the orchestrator's walk at 1568, Fri 2:41 PM): no orphans. In the full column (700 px or more) the cards
   in a row share it equally and the rows come out even: the figures all in one row when there are four (three when
   three, 3 + 3 when six); the places in rows of three when there are three, six or nine, of four when four, seven (4 + 3) or eight,
   two when two. Narrower, they wrap as before. Body text 14 px as the drawing (rows and the places' buttons too). */
.home-page { container: homecol / inline-size; }
@container homecol (min-width: 700px) {
  .home-col > .home-tiles, .home-places { grid-template-columns: repeat(var(--fit-n, 3), minmax(0, 1fr)); }
  .home-col > .home-tiles:has(> :nth-child(4):last-child) { --fit-n: 4; }
  .home-col > .home-tiles:has(> :nth-child(2):last-child), .home-places:has(> :nth-child(2):last-child) { --fit-n: 2; }
  .home-col > .home-tiles:has(> :only-child), .home-places:has(> :only-child) { --fit-n: 1; }
  .home-places:has(> :nth-child(4n):last-child) { --fit-n: 4; }
  .home-places:has(> :nth-child(3n):last-child) { --fit-n: 3; }
  .home-places:has(> :nth-child(7):last-child) { --fit-n: 4; }   /* 4 + 3, not 3 + 3 + 1 */
}
.home-row-text { font-size: 14px; }
.place-card .btn { font-size: 14px; }
/* T225 960 (the orchestrator, Sat 2:44 PM, on a screen about 2550 px wide): 760 px read narrow and small there, and
   four figures in 760 cut their captions short. The column is 960 px wide when Home's own area is 1400 px or wider (a
   big screen, or 1568 with the menu folded), 760 below. No text in a figure or a place card is ever cut short: a
   figure is a small grid, the label and the number on the left, the chart beside the number, and the caption under
   both across the card's whole width, wrapping as long as it needs (a long address breaks anywhere). */
.panel-content.is-home { container: home / inline-size; }
@container home (min-width: 1400px) { .home-page { max-width: 960px; } }
.home-col .home-tile { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto 1fr; gap: 0 12px; align-items: end; }
.home-tile .tile-text { display: contents; }
.home-tile .tile-label { grid-column: 1 / -1; align-self: start; }
.home-tile .tile-big { grid-column: 1; }
.home-tile .dash-spark { grid-column: 2; grid-row: 2; }
.home-tile .tile-caption { grid-column: 1 / -1; align-self: start; margin-top: 4px; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.place-card h3, .place-state, .place-card .btn { overflow-wrap: anywhere; }
