/* Progress detail views (js/progress.js) and the doors into them on Progress. */
/* A card on Progress that opens a detail view: the whole card is the tap target, with a › in the corner. */
a.pg-link { display: block; position: relative; color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; transition: transform .12s; }
a.pg-link::after { content: '›'; position: absolute; top: 10px; right: 14px; font-size: 1.4em; font-weight: 800; color: var(--muted); line-height: 1; }
a.pg-link:active { transform: scale(.985); }
a.pg-link:focus-visible, .pg-rows a:focus-visible, .pg-more:focus-visible { outline: 2.5px solid var(--btn-edge); outline-offset: 2px; }
.pg-more { display: inline-flex; align-items: center; gap: 2px; margin-top: 8px; font-weight: 800; font-size: var(--fs-sm); color: var(--ink); text-decoration: none; }
.pg-more .ico { width: 1em; height: 1em; }
.calendar a.cal { text-decoration: none; }
.calendar a.cal:active { transform: scale(.94); }
.mo-week .mo-days a { display: grid; justify-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: 800; color: var(--muted); text-decoration: none; }
.mo-week .mo-days a.done i { background: #FFE9A8; }
.mo-week .mo-days a.done i .ico { opacity: 1; color: #F2A33A; }
.mo-week .mo-days a.today i { outline: 2px solid #F2A33A; }
.bests a { display: flex; justify-content: space-between; width: 100%; color: inherit; text-decoration: none; }
.bests a::after { content: '›'; margin-left: 8px; color: var(--muted); font-weight: 800; }

/* The detail view header: back to Progress, then the title. */
.pg-head { margin: 0 0 6px; }
.pg-head h1 { margin: 6px 0 2px; }
.pg-head .small { margin: 0; }
.pg-back { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px 6px 4px; margin-left: -4px; border: 0; background: none; font: inherit; font-weight: 800; font-size: var(--fs-sm); color: var(--muted); cursor: pointer; border-radius: 999px; }
.pg-back:active { background: rgba(0, 0, 0, .05); }
.pg-empty { text-align: center; }
.pg-empty p { margin: 6px 0 0; }

/* One morning: ‹ date › and its parts. */
.pg-daynav { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin: 8px 0; text-align: center; }
.pg-daynav b { font-size: var(--fs-md); }
.pg-daynav .btn[disabled] { opacity: .35; }
.pg-status { display: flex; align-items: center; gap: 8px; margin: 6px 0; padding: 10px 14px; border-radius: 14px; background: #FFF1C9; font-weight: 800; }
.pg-status .ico { color: #F2A33A; }
.pg-status.rest { background: #EAF2FB; }
.pg-status.rest .ico { color: #6E9BD0; }
.pg-lift { font-weight: 800; color: #4F8A3A; }
.pg-pb { font-size: var(--fs-xs); font-weight: 800; color: #E8743B; white-space: nowrap; }
.pg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.pg-chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 8px -16px; padding: 3px 16px; }
.pg-chips.scroll::-webkit-scrollbar { display: none; }
.pg-chips .chip { flex: none; }
.pg-chips .chip.on { background: var(--tab-on); outline: 2px solid var(--btn-edge); }
.pg-walk-row { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; }
.pg-walk-row p { margin: 0; font-weight: 700; }
.pg-walk-row small { font-weight: 600; color: var(--muted); }
.pg-gets { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.pg-gets li { display: flex; align-items: center; gap: 10px; }
.pg-gets small { display: block; color: var(--muted); font-size: var(--fs-xs); }

/* Rows: an icon, a name with a line under it, a value on the right (a link when it opens something). */
.pg-rows { list-style: none; padding: 0; margin: 0; }
.pg-rows li { border-bottom: 1px dashed var(--line); }
.pg-rows li:last-child { border-bottom: 0; }
.pg-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 9px 0; color: inherit; text-decoration: none; }
.pg-row > span:first-child:not(.ic) { grid-column: 1 / 3; }
.pg-rows .ic { font-size: var(--fs-lg); width: 1.4em; text-align: center; }
.pg-rows small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.pg-rows .pg-val { font-weight: 800; text-align: right; }
a.pg-row .pg-val::after { content: ' ›'; color: var(--muted); }
.pg-headline { margin: 6px 0 4px; }
.pg-headline small { color: var(--muted); }
.chart a { cursor: pointer; }

/* The streak: a chain of suns, the next milestone, every run as a bar. */
.pg-suns { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin: 4px 0 0; }
.pg-suns i { font-style: normal; color: #F2A33A; font-size: var(--fs-md); }
.pg-suns small { align-self: center; font-weight: 800; color: var(--muted); }
.pg-mile { display: flex; align-items: center; gap: 14px; }
.pg-mile h3 { margin: 0 0 2px; }
.pg-mile p { margin: 0; }
.pg-runs { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.pg-runs li { display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'when n' 'bar bar'; gap: 3px 8px; font-size: var(--fs-sm); }
.pg-runs li > span { grid-area: when; }
.pg-runs li > b { grid-area: n; }
.pg-runs li > i { grid-area: bar; display: block; height: 8px; border-radius: 99px; background: #FFD27A; }

/* Postcards: places as rows you can tap to filter. */
.pg-places { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.pg-places button { width: 100%; text-align: left; border: 0; background: var(--cream); border-radius: 12px; padding: 10px 12px; font: inherit; color: var(--ink); cursor: pointer; }
.pg-places small { display: block; color: var(--muted); font-size: var(--fs-xs); }

/* Weeks: one row of seven per week. */
.pg-weeks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.pg-weeks li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; }
.pg-weeks .pg-wk { font-size: var(--fs-xs); font-weight: 800; color: var(--muted); }
.pg-weeks .mo-days { grid-column: 1 / -1; grid-row: 2; margin: 0; }
.pg-weeks b { grid-row: 1; grid-column: 2; font-size: var(--fs-xs); color: var(--muted); }
.pg-weeks b.good { color: #4F8A3A; }

/* The postcard pinboard in the living room (art.js): it opens over the room (keepsakes.js), like the morning-pages book in the Nook. */
.scene .pinboard { cursor: pointer; transition: transform .15s; transform-box: fill-box; transform-origin: center; }
.scene .pinboard:hover, .scene .pinboard:focus-visible { transform: scale(1.04); }
.scene .pinboard:focus-visible { outline: none; }

/* The month calendar: a Sunling face per day (progress.js monthCard). */
.mc-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin-bottom: 8px; }
.mc-head h3 { margin: 0; text-align: center; }
.mc-head .btn[disabled] { opacity: .35; }
.mc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px 4px; }
.mc-dow { text-align: center; font-size: var(--fs-2xs); font-weight: 800; color: var(--muted); padding-bottom: 2px; }
.mc-day { display: grid; justify-items: center; gap: 1px; color: var(--muted); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.mc-day .mc-face { width: 100%; max-width: 54px; aspect-ratio: 1; display: block; transition: transform .12s; }
a.mc-day:active .mc-face { transform: scale(.9); }
.mc-day small { font-size: var(--fs-2xs); font-weight: 800; line-height: 1.5; padding: 0 6px; border-radius: 99px; }
.mc-day.today small { background: #F2A33A; color: #fff; }
.mc-day.future small { opacity: .6; }
.mc-day:focus-visible { outline: 2.5px solid var(--btn-edge); outline-offset: 2px; border-radius: 12px; }
.mc-sum { margin: 10px 0 0; font-weight: 800; font-size: var(--fs-sm); text-align: center; }
.mcal .pg-more { display: flex; justify-content: center; }
.mc-key { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.mc-key li { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); }
.mc-face.sm { width: 30px; height: 30px; flex: none; }
.pg-daynav b { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.mc-face.day { width: 34px; height: 34px; }
@media (min-width: 960px) { .mc-day .mc-face { max-width: 48px; } }
