/* Today in the folio (the Today board, group six, 2026-10-03): Home while a journey is under way (#homeUnderway,
   29i-underway.js). The head, the day's count over the place, two cells (Weather, Beds), the day's card (tonight's bed,
   today down a line, four acts along its foot), Download & sync, the journal's line, and the journey's four words as a
   pill at the foot. #homeUnderway sits in #mainPage.folio, so the tokens resolve. */
#homeUnderway { --uw-col: 44px; background: var(--fo-paper); color: var(--fo-ink); font-family: var(--fo-sans); }

/* the head: the menu's mark, the journey's name small in the middle, Contents */
#homeUnderway .uw-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; box-sizing: content-box; height: 44px; padding: calc(env(safe-area-inset-top, 0px) + 44px) var(--fo-gutter) 0; border-bottom: 1px dashed var(--fo-hair); }
#homeUnderway .uw-word { min-height: 44px; padding: 0; border: none; background: none; font: inherit; font-size: 14px; color: var(--fo-ink); cursor: pointer; }
#homeUnderway .uw-menu { justify-self: start; width: 44px; margin-left: -12px; display: flex; align-items: center; justify-content: center; }
#homeUnderway .uw-bar .uw-word:last-child { justify-self: end; }
#homeUnderway .uw-title { margin: 0; max-width: 190px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: var(--fo-mono); font-size: 10px; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fo-ink); }

/* the day: its count, then the place in the serif */
#homeUnderway .uw-dateline { display: flex; flex-direction: column; gap: 8px; padding: 20px var(--fo-gutter) 18px; border-bottom: 1px dashed var(--fo-hair); }
#homeUnderway .uw-count { margin: 0; font-family: var(--fo-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fo-graphite); }
#homeUnderway .uw-here { display: flex; flex-direction: column; gap: 6px; }
#homeUnderway .uw-place { font-family: var(--fo-serif); font-size: 24px; letter-spacing: -0.03em; line-height: 1; }
#homeUnderway .uw-check { font-size: 12px; color: var(--fo-graphite); }
#homeUnderway .uw-check.is-failed { color: var(--fo-ink); }
#homeUnderway .uw-again, #homeUnderway .uw-link { min-height: 32px; padding: 0; border: none; background: none; font: inherit; font-size: 12px; color: var(--fo-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; cursor: pointer; }

/* the cards: a dashed edge with a short solid corner at each of its four (drawn as backgrounds, no markup) */
#homeUnderway .uw-cell, #homeUnderway .uw-day {
    --uw-corner: #A8A7A1;
    position: relative; box-sizing: border-box; border: 1px dashed rgba(26,22,20,0.28); background-color: rgba(253,252,250,0.7);
    background-image: linear-gradient(var(--uw-corner), var(--uw-corner)), linear-gradient(var(--uw-corner), var(--uw-corner)),
        linear-gradient(var(--uw-corner), var(--uw-corner)), linear-gradient(var(--uw-corner), var(--uw-corner)),
        linear-gradient(var(--uw-corner), var(--uw-corner)), linear-gradient(var(--uw-corner), var(--uw-corner)),
        linear-gradient(var(--uw-corner), var(--uw-corner)), linear-gradient(var(--uw-corner), var(--uw-corner));
    background-size: 10px 1.5px, 1.5px 10px, 10px 1.5px, 1.5px 10px, 10px 1.5px, 1.5px 10px, 10px 1.5px, 1.5px 10px;
    background-position: left top, left top, right top, right top, left bottom, left bottom, right bottom, right bottom;
    background-repeat: no-repeat; background-origin: border-box;
}
#homeUnderway .uw-tab { font-family: var(--fo-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fo-graphite); }

/* Weather | Beds */
#homeUnderway .uw-cells { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 18px var(--fo-gutter) 0; }
#homeUnderway .uw-cells .uw-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 14px 16px; font: inherit; color: var(--fo-ink); text-align: left; }
#homeUnderway button.uw-cell { cursor: pointer; }
#homeUnderway .uw-wx-deg { display: flex; align-items: center; gap: 10px; font-family: var(--fo-serif); font-size: 24px; letter-spacing: -0.02em; line-height: 1; }
#homeUnderway .uw-wx-deg .wx-day-mark { width: 18px; height: 18px; }
#homeUnderway .uw-wx-said { font-size: 12px; line-height: 1.45; color: var(--fo-graphite); }
#homeUnderway .uw-wx-next { align-self: stretch; padding-top: 6px; border-top: 1px dashed var(--fo-hair); font-family: var(--fo-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fo-graphite); }
#homeUnderway .uw-beds-cell .uw-wx-deg { align-items: baseline; gap: 8px; }
#homeUnderway .uw-beds-unit { font-family: var(--fo-sans); font-size: 12px; letter-spacing: 0; }
#homeUnderway .uw-beds-cell .uw-link { min-height: 0; }
/* the first night with no bed is within three days: the cell in the red */
#homeUnderway .uw-beds-cell.is-soon { --uw-corner: #E08A90; border-color: rgba(196,17,31,0.45); background-color: rgba(196,17,31,0.03); }
#homeUnderway .uw-beds-cell.is-soon .uw-beds-n, #homeUnderway .uw-beds-cell.is-soon .uw-link { color: var(--fo-red); }

/* the day's card */
#homeUnderway .uw-day { display: flex; flex-direction: column; margin: 12px var(--fo-gutter) 0; }
#homeUnderway .uw-tonight { display: flex; flex-direction: column; gap: 6px; padding: 16px; }
#homeUnderway .uw-bed { display: flex; flex-direction: column; gap: 6px; }
#homeUnderway .uw-bed + .uw-bed { margin-top: 10px; padding-top: 14px; border-top: 1px dashed var(--fo-hair); }
#homeUnderway .uw-tonight__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 22px; }
#homeUnderway .uw-name { font-family: var(--fo-serif); font-size: 24px; letter-spacing: -0.02em; line-height: 1.1; }
#homeUnderway .uw-where, #homeUnderway .uw-bed-when { font-size: 12px; line-height: 1.45; color: var(--fo-graphite); }
/* The bed's address on one line (owner, 2026-09-19); when it is in and which night, under it. */
#homeUnderway .uw-tonight .uw-where { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#homeUnderway .uw-tonight .uw-link { align-self: flex-start; margin-top: 4px; }
/* no bed tonight: the card's head in the red, as the board draws it */
#homeUnderway .uw-day:has(.uw-tonight.is-open) { --uw-corner: #E08A90; border-color: rgba(196,17,31,0.45); background-color: rgba(196,17,31,0.03); }
#homeUnderway .uw-tonight.is-open .uw-name { color: var(--fo-red); }

/* the state of an entry: Booked on a band; Not booked dashed; No bed yet in the red; travel in the pale */
#homeUnderway .uw-state { height: 22px; padding: 0 8px; display: inline-flex; align-items: center; flex-shrink: 0; box-sizing: border-box; border: 1px dashed rgba(26,22,20,0.35); font-family: var(--fo-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fo-graphite); white-space: nowrap; }
#homeUnderway .uw-state.is-booked { border: none; background: var(--fo-band, #E3E3DE); color: var(--fo-ink); }
#homeUnderway .uw-state.is-open { border: 1px solid var(--fo-red); color: var(--fo-red); }
#homeUnderway .uw-state.is-travel { border: none; background: #A8A7A1; color: var(--fo-ink); }

/* Directions, Status: a small framed word in a 44px row */
#homeUnderway .uw-doors { display: flex; gap: 8px; margin-top: 6px; }
#homeUnderway .uw-dir { position: relative; height: 32px; margin: 6px 0; padding: 0 12px; border: 1px solid rgba(26,22,20,0.92); background: transparent; font: inherit; font-size: 12px; font-weight: 500; color: var(--fo-ink); cursor: pointer; }
#homeUnderway .uw-dir::before { content: ''; position: absolute; left: 0; right: 0; top: -6px; bottom: -6px; }

/* TODAY, down a line */
#homeUnderway .uw-today { display: flex; flex-direction: column; padding: 14px 16px 16px; border-top: 1px dashed rgba(26,22,20,0.28); }
#homeUnderway .uw-band { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; font-family: var(--fo-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fo-graphite); }
#homeUnderway .uw-ruled { display: flex; flex-direction: column; }
#homeUnderway .uw-item { position: relative; display: grid; grid-template-columns: var(--uw-col) 18px minmax(0, 1fr); column-gap: 8px; padding-bottom: 18px; }
#homeUnderway .uw-item > * { grid-column: 3; }
/* An absolutely placed grid child takes its column's box: the mark is placed from the row's own edge. */
#homeUnderway .uw-item > .uw-dot { grid-column: auto; }
/* the line, and the entry's mark on it */
#homeUnderway .uw-item::before { content: ''; position: absolute; left: calc(var(--uw-col) + 8px + 9px); top: 0; bottom: 0; border-left: 1px solid #A8A7A1; }
#homeUnderway .uw-ruled > .uw-item:first-child::before { top: 10px; }
#homeUnderway .uw-ruled > .uw-item:last-child::before { bottom: auto; height: 5px; }
#homeUnderway .uw-ruled > .uw-item:only-child::before { display: none; }
#homeUnderway .uw-dot { position: absolute; left: calc(var(--uw-col) + 8px + 9px - 3.5px); top: 6px; width: 7px; height: 7px; box-sizing: border-box; border-radius: 50%; border: 1.2px solid var(--fo-ink); background: #FDFCFA; }
#homeUnderway .uw-item.is-done .uw-dot, #homeUnderway .uw-item.is-now-pale .uw-dot { border: none; background: #A8A7A1; }
#homeUnderway .uw-item.is-untimed .uw-dot { border-style: dashed; }
#homeUnderway .uw-item.is-next .uw-dot { left: calc(var(--uw-col) + 8px + 9px - 4.5px); top: 5px; width: 9px; height: 9px; border: none; background: var(--fo-red); }
#homeUnderway .uw-item.is-next .uw-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--fo-red); animation: uw-pulse 3.2s cubic-bezier(.22,1,.36,1) infinite; }
@keyframes uw-pulse { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(2.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #homeUnderway .uw-item.is-next .uw-dot::after { animation: none; opacity: 0; } }
/* the entry: one press from the time to the state; the time hangs in the margin */
#homeUnderway .uw-open { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; min-height: 22px; padding: 0; border: none; background: none; font: inherit; color: var(--fo-ink); text-align: left; cursor: pointer; }
#homeUnderway .uw-item .uw-time { position: absolute; left: 0; top: 3px; width: var(--uw-col); font-family: var(--fo-mono); font-size: 12px; white-space: nowrap; }
#homeUnderway .uw-what { flex: 1; min-width: 0; padding-top: 1px; font-size: 14px; line-height: 1.3; }
#homeUnderway .uw-item.is-next .uw-what { font-family: var(--fo-serif); font-size: 16px; letter-spacing: -0.015em; line-height: 1.1; }
#homeUnderway .uw-item.is-done .uw-time, #homeUnderway .uw-item.is-done .uw-what { color: #A8A7A1; }
#homeUnderway .uw-item.is-done .uw-what { text-decoration: line-through; text-decoration-thickness: 1px; }
#homeUnderway .uw-item.is-done .uw-state { opacity: .55; }
#homeUnderway .uw-soon, #homeUnderway .uw-route { margin-top: 4px; font-family: var(--fo-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fo-graphite); }
/* NOW: a red rule across the line at the clock's time */
#homeUnderway .uw-now { position: relative; display: grid; grid-template-columns: var(--uw-col) 18px minmax(0, 1fr); column-gap: 8px; align-items: center; height: 14px; margin: -6px 0 12px; font-family: var(--fo-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fo-red); }
#homeUnderway .uw-now::before { content: ''; position: absolute; left: calc(var(--uw-col) + 8px + 9px); top: 0; bottom: 0; border-left: 1px solid #A8A7A1; }
#homeUnderway .uw-now__rule { position: relative; border-top: 1.5px solid var(--fo-red); }
#homeUnderway .uw-free { display: flex; flex-direction: column; gap: 4px; padding: 0 0 6px calc(var(--uw-col) + 34px); }
#homeUnderway .uw-free__say { font-family: var(--fo-serif); font-style: italic; font-size: 16px; letter-spacing: -0.01em; }
#homeUnderway .uw-free__line { font-size: 12px; color: var(--fo-graphite); }
#homeUnderway .uw-quiet { margin: 0; padding: 16px; font-size: 12px; color: var(--fo-ink); }

/* the four acts along the card's foot */
#homeUnderway .uw-add-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px dashed rgba(26,22,20,0.28); }
#homeUnderway .uw-act { height: 44px; padding: 0; border: none; background: none; font: inherit; font-size: 12px; font-weight: 500; color: var(--fo-ink); cursor: pointer; white-space: nowrap; }

/* DOWNLOAD & SYNC: a card when it asks for something, one quiet line when it does not */
#homeUnderway .uw-off-cell.is-asking { display: flex; flex-direction: column; gap: 10px; margin: 12px var(--fo-gutter) 0; padding: 14px 16px 12px; }
#homeUnderway .uw-off-cell.is-asking .uw-off-line { display: contents; }
#homeUnderway .uw-off-cell.is-asking .uw-off-said { display: contents; }
#homeUnderway .uw-off-cell.is-asking .uw-off-stamp { position: absolute; top: 10px; right: 16px; }
#homeUnderway .uw-off-cell.is-asking .uw-off-text { font-size: 14px; line-height: 1.45; }
#homeUnderway .uw-off-cell.is-asking .uw-off-acts { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px dashed var(--fo-hair); }
#homeUnderway .uw-off-cell.is-asking .uw-door:not([data-act="sync"]) { height: 36px; padding: 0 16px; border: 1px solid rgba(26,22,20,0.92); background: transparent; font: inherit; font-size: 12px; font-weight: 500; color: var(--fo-ink); cursor: pointer; }
#homeUnderway .uw-off-cell.is-asking .uw-door[data-act="sync"]:only-child { margin-left: auto; }
#homeUnderway .uw-off-cell.is-quiet { display: flex; margin: 14px var(--fo-gutter) 0; border: none; background: none; }
#homeUnderway .uw-off-cell.is-quiet > .uw-tab { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#homeUnderway .uw-off-cell.is-quiet .uw-off-line { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
#homeUnderway .uw-off-cell.is-quiet .uw-off-said { font-size: 12px; line-height: 1.4; color: var(--fo-graphite); }
#homeUnderway .uw-off-stamp { margin-right: 6px; font-family: var(--fo-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fo-graphite); }
#homeUnderway .uw-off-cell.is-asking .uw-off-stamp { height: 22px; padding: 0 8px; display: inline-flex; align-items: center; margin: 0; border: 1px solid var(--fo-ink); color: var(--fo-ink); }
#homeUnderway .uw-door[data-act="sync"] { min-height: 36px; padding: 0; border: none; background: none; font: inherit; font-size: 12px; color: var(--fo-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; cursor: pointer; }
#homeUnderway .uw-off-cell.is-quiet .uw-door[data-act="sync"] { flex-shrink: 0; color: var(--fo-graphite); }

/* the journal's line */
#homeUnderway .uw-journal { margin: 12px var(--fo-gutter) 0; font-size: 12px; line-height: 1.4; color: var(--fo-graphite); }
#homeUnderway .uw-journal__say { font-family: var(--fo-serif); font-style: italic; font-size: 14px; }
#homeUnderway .uw-journal .uw-link { min-height: 0; }

/* the skeleton: bones breathing where words will be */
#homeUnderway .uw-bone { display: block; height: 12px; width: 70%; background: var(--fo-band, #E3E3DE); animation: fo-breathe 1.6s ease-in-out infinite; }
#homeUnderway .uw-bone.is-deg { height: 24px; width: 40%; }
#homeUnderway .uw-bone.is-name { height: 24px; width: 60%; }
#homeUnderway .uw-bone.is-time { position: absolute; left: 0; top: 3px; width: 36px; }
#homeUnderway .uw-item.is-bone .uw-open { display: block; }
#homeUnderway .uw-wait { margin: 0 16px 12px; font-size: 12px; color: var(--fo-graphite); }
#homeUnderway .uw-check .uw-wait { margin: 0; }
/* The words wait their turn: nothing in the first moment, then "Checking", then what to do (timed as the Wall's are). */
#homeUnderway .uw-wait.is-soon { opacity: 0; animation: uw-say 0s linear 1.2s forwards, uw-gone 0s linear 8s forwards; }
#homeUnderway .uw-wait.is-late { display: none; animation: uw-come 0s linear 8s forwards; }
@keyframes uw-say { to { opacity: 1; } }
@keyframes uw-gone { to { display: none; } }
@keyframes uw-come { to { display: block; } }

/* room under everything for the pill */
#homeUnderway .uw-fill { flex: 1 0 auto; min-height: calc(110px + env(safe-area-inset-bottom, 0px)); }

/* the journey's four words, a pill at the foot, Boswell apart at its right in the paper */
#homeUnderway .tp-views { position: fixed; left: 20px; right: 20px; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); z-index: 30; height: 58px; padding: 6px; box-sizing: border-box; display: flex; gap: 4px; border-radius: 82px; background: rgba(215,215,208,0.5); -webkit-backdrop-filter: blur(16px) saturate(1.8); backdrop-filter: blur(16px) saturate(1.8); box-shadow: inset 0 0 10px rgba(0,0,0,0.08); border: 1px solid rgba(253,252,250,0.6); }
#homeUnderway .tp-view { padding: 0 11px; border: none; border-radius: 9999px; background: none; font: inherit; font-size: 12px; font-weight: 500; color: var(--fo-ink); cursor: pointer; }
#homeUnderway .tp-gap { flex-grow: 1; }
#homeUnderway .tp-view.is-door { padding: 0 14px; background: #FDFCFA; }
