/* My tracker on the GROW member portal (public/portal-tracker.js), every
   class beginning pt-. The tracker it was ported from (lib/member-tracker.js
   names it), in GROW's look: the owner's mockup's white cards, pills and
   Jost type (styles.css's portal-* rules), and the member portal's status
   colours: to submit lilac, orange in the last week, danger text once the
   deadline has passed; submitted sky; an offer green; rejected and not
   submitted neutral. GROW's partners are on the light blue of the
   mockup's events card.

   Colours come only from the palette in portal.css, as var(--p-...), and
   white: see the note there (test/portal-colours.test.js). */

.pt-page { display: flex; flex-direction: column; gap: 22px; margin-top: 27px; }
.pt-page > .portal-card { min-width: 0; }
.pt-card-head { align-items: flex-start; }
.pt-card-sub { margin: 2px 0 0; font-size: 14px; line-height: 20px; color: var(--p-muted); }
.pt-sub-title { margin: 0; font-size: 16px; font-weight: 400; color: var(--p-ink); }
.pt-failed { max-width: 720px; }
.pt-failed-actions { margin: 14px 0 0; }

/* Small sky badge for GROW's partners, and the quieter tags. */
.pt-badge {
  display: inline-flex; align-items: center; flex: none; padding: 2px 9px; border-radius: 999px;
  background: var(--p-sky); color: var(--p-sky-ink); font-size: 11.5px; line-height: 16px; white-space: nowrap;
}
.pt-tag {
  display: inline-flex; align-items: center; flex: none; padding: 1px 8px; border-radius: 999px;
  background: var(--p-sep); color: var(--p-muted); font-size: 11.5px; line-height: 16px; white-space: nowrap;
}
.pt-link {
  border: 0; background: none; padding: 0; font: inherit; color: var(--p-blue);
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.pt-link:hover { color: var(--p-blue-dark); }

/* ---------- Add firms ---------- */
.pt-picker.is-collapsed { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; padding: 16px 22px; }
.pt-add-firms { min-height: 40px; padding: 0 20px; font-size: 14.5px; }
.pt-picker-blurb { flex: 1 1 280px; min-width: 0; font-size: 15px; line-height: 21px; color: var(--p-muted); }
.pt-picker-count { font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--p-muted); white-space: nowrap; }
.pt-picker-head { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--p-sep); }
.pt-picker-head .pt-minimise { margin-left: auto; }

/* The two tabs: GROW partners first, and the one chosen solid blue. */
.pt-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.pt-tab {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--p-line); background: #fff; color: var(--p-muted); font-size: 15px; cursor: pointer;
}
.pt-tab:hover { background: var(--p-hover); color: var(--p-ink); }
.pt-tab.is-on { background: var(--p-blue); border-color: var(--p-blue); color: #fff; }
.pt-tab.is-on .pt-badge { background: #fff; color: var(--p-blue); }
.pt-tab:focus-visible { outline: 2px solid var(--p-blue); outline-offset: 2px; }
.pt-panel { margin-top: 16px; }

.pt-partners-lede, .pt-form-lede { margin: 0 0 14px; max-width: 780px; font-size: 15px; line-height: 22px; color: var(--p-muted); }
.pt-partner-list { list-style: none; margin: 0; padding: 16px; display: grid; gap: 14px; background: var(--p-sky); border-radius: 16px; }
.pt-partner { background: #fff; border-radius: 14px; padding: 14px 16px 16px; }
.pt-partner-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pt-partner-name { margin: 0; font-size: 17px; font-weight: 400; line-height: 1.3; color: var(--p-ink); }
.pt-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.pt-chip {
  display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: start; width: 100%; min-height: 44px;
  margin: 0; padding: 10px 12px; border: 1px solid var(--p-line); border-radius: 12px; background: #fff;
  color: var(--p-ink); font: inherit; text-align: left; cursor: pointer;
}
.pt-chip:hover { border-color: var(--p-blue); background: var(--p-hover); }
.pt-chip.is-on { border-color: var(--p-blue); background: var(--p-blue-pale); }
.pt-chip[aria-disabled="true"] { cursor: default; }
.pt-chip:focus-visible { outline: 2px solid var(--p-blue); outline-offset: 2px; }
.pt-chip-box {
  display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; box-sizing: border-box;
  border: 1.5px solid var(--p-box); border-radius: 6px; background: #fff; color: var(--p-blue); font-size: 14px; line-height: 1;
}
.pt-chip.is-on .pt-chip-box { background: var(--p-blue); border-color: var(--p-blue); color: #fff; }
.pt-chip-text { display: flex; flex-direction: column; min-width: 0; }
.pt-chip-title { font-size: 15px; line-height: 20px; color: var(--p-ink); }
.pt-chip-meta { font-size: 13px; line-height: 18px; color: var(--p-muted); }
.pt-chip-foot { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; margin-top: 7px; }
.pt-chip-where { font-size: 12.5px; color: var(--p-blue); }
.pt-chip.is-on .pt-chip-where { color: var(--p-ink); }
.pt-soon { margin-top: 16px; }
.pt-soon-title { margin: 0 0 8px; font-size: 15px; font-weight: 400; color: var(--p-muted); }
.pt-soon-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pt-soon-list li {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding: 5px 6px 5px 14px;
  border: 1px solid var(--p-line); border-radius: 999px; background: #fff; font-size: 14px; color: var(--p-ink);
}
.pt-soon-name { overflow-wrap: anywhere; }
.pt-partners-foot { margin: 14px 0 0; font-size: 14px; color: var(--p-muted); }
.pt-partners-off p { margin: 0 0 12px; font-size: 15px; color: var(--p-muted); }
.pt-partners-off .portal-pill + .portal-pill { margin-left: 6px; }

/* Any firm, and Edit details: two columns where there is room. */
.pt-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; max-width: 780px; }
.pt-form-grid-one { grid-template-columns: minmax(0, 1fr); }
.pt-form-grid .portal-field input, .pt-form-grid .portal-field select { width: 100%; min-height: 44px; box-sizing: border-box; }
.pt-form-grid > .pt-check, .pt-field-url, .pt-firm-hint { grid-column: 1 / -1; }
.pt-firm-hint { margin: -4px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--p-sky); color: var(--p-sky-ink); font-size: 14px; line-height: 20px; }
.pt-form-actions { margin-top: 16px; }
.pt-form .portal-error { max-width: 780px; }
.pt-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; line-height: 20px; color: var(--p-ink); cursor: pointer; }
.pt-check input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--p-blue); }

/* ---------- the summary strip ---------- */
.pt-summary { display: flex; align-items: center; gap: 14px 22px; flex-wrap: wrap; }
.pt-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.pt-stat {
  position: relative; display: flex; flex-direction: column; justify-content: center; min-width: 128px; padding: 12px 16px 12px 20px;
  background: #fff; border: 1px solid var(--p-line); border-radius: 14px; overflow: hidden;
}
.pt-stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--p-sep); }
.pt-stat-lilac::before { background: var(--p-lilac); }
.pt-stat-orange::before { background: var(--p-orange); }
.pt-stat-sky::before { background: var(--p-sky); }
.pt-stat-green::before { background: var(--p-green); }
.pt-stat-n { font-size: 28px; line-height: 1.1; color: var(--p-ink); }
.pt-stat-l { margin-top: 2px; font-size: 13px; line-height: 17px; color: var(--p-muted); }
.pt-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.pt-writing, .pt-horizons {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 6px 0 14px; box-sizing: border-box;
  background: #fff; border: 1px solid var(--p-line); border-radius: 999px; font-size: 14px; color: var(--p-muted);
}
.pt-writing { padding-right: 14px; }
.pt-writing input {
  width: 58px; height: 32px; box-sizing: border-box; padding: 0 8px; border: 1px solid var(--p-line); border-radius: 8px;
  font: inherit; font-size: 15px; color: var(--p-ink); text-align: right; background: #fff;
}
.pt-horizons-label { margin-right: 2px; }
.pt-horizon {
  min-width: 40px; height: 34px; padding: 0 8px; border: 0; border-radius: 999px; background: none;
  color: var(--p-muted); font: inherit; font-size: 14px; cursor: pointer;
}
.pt-horizon:hover { background: var(--p-hover); color: var(--p-ink); }
.pt-horizon.is-on { background: var(--p-blue); color: #fff; }
.pt-horizon:focus-visible, .pt-writing input:focus-visible { outline: 2px solid var(--p-blue); outline-offset: 2px; }

/* ---------- the timelines ---------- */
.pt-notice { margin: 14px 0 0; padding: 9px 12px; border-radius: 10px; background: var(--p-note); color: var(--p-note-ink); font-size: 14px; line-height: 20px; }
.pt-empty-title { margin: 16px 0 4px; font-size: 18px; line-height: 1.35; color: var(--p-ink); }
.pt-empty-text { margin: 10px 0 0; max-width: 720px; font-size: 15px; line-height: 22px; color: var(--p-muted); }
.pt-empty-title + .pt-empty-text { margin-top: 4px; }
.pt-horizon-empty { padding: 8px 0 4px; }

/* The timeline scrolls sideways inside its card, never the page. */
.pt-scroll { margin-top: 12px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; padding-bottom: 8px; }
.pt-scroll:focus-visible { outline: 2px solid var(--p-blue); outline-offset: 2px; border-radius: 6px; }
.pt-inner { position: relative; min-width: 100%; }
.pt-head { display: flex; }
.pt-corner {
  position: sticky; left: 0; z-index: 3; flex: none; width: var(--pt-label); height: 30px; box-sizing: border-box;
  background: #fff; border-bottom: 1px solid var(--p-line);
}
.pt-months { position: relative; flex: none; height: 30px; box-sizing: border-box; border-bottom: 1px solid var(--p-line); }
.pt-month {
  position: absolute; bottom: 0; height: 30px; box-sizing: border-box; display: flex; align-items: flex-end;
  padding: 0 0 6px 8px; border-left: 1px solid var(--p-sep); font-size: 12.5px; color: var(--p-muted); white-space: nowrap;
}
/* A month's name stays just right of the corner while any of its column
   shows, so the month a timeline opens part way through (today's) is
   named rather than hidden under the corner or off the edge. */
.pt-month-name { position: sticky; left: calc(var(--pt-label) + 8px); }
/* The year beside a month, and the writing load's caption, are words to
   read, so they are muted text (4.5:1 and more on white), never the pale
   grey of a checkbox's outline. */
.pt-year { color: var(--p-muted); }
.pt-row { display: flex; align-items: stretch; min-height: 72px; border-bottom: 1px solid var(--p-sep); }
.pt-label {
  position: sticky; left: 0; z-index: 3; flex: none; display: flex; align-items: center; gap: 10px;
  width: var(--pt-label); box-sizing: border-box; padding: 9px 12px 9px 0; background: #fff; border-right: 1px solid var(--p-line);
}
.pt-label-text { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-width: 0; }
.pt-firm { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 15px; line-height: 20px; color: var(--p-ink); }
.pt-firm-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-route { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 18px; color: var(--p-muted); }
.pt-when { align-self: flex-start; max-width: 100%; font-size: 12.5px; line-height: 18px; color: var(--p-muted); }
.pt-when-orange { padding: 0 8px; border-radius: 999px; background: var(--p-orange); color: var(--p-orange-ink); }
.pt-when-overdue { color: var(--p-danger); }
.pt-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.pt-row.is-overdue .pt-label { box-shadow: inset 3px 0 0 var(--p-danger); padding-left: 10px; }
.pt-track { position: relative; flex: none; min-height: 100%; }
.pt-grid span { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--p-sep); }

/* A bar from the day it opens to its deadline, in its status colour;
   rolling, a dashed outline (apply early). The colour is the tone's,
   carried by currentColor to the bar and the dots. */
.pt-tone-lilac { color: var(--p-lilac); }
.pt-tone-orange { color: var(--p-orange); }
.pt-tone-overdue { color: var(--p-danger); }
.pt-bar { position: absolute; top: 50%; height: 8px; margin-top: -4px; border-radius: 999px; background: currentColor; }
.pt-bar.pt-tone-overdue { color: var(--p-sep); }
.pt-bar.is-rolling { box-sizing: border-box; height: 12px; margin-top: -6px; background: none; border: 2px dashed currentColor; }
.pt-end { position: absolute; top: 50%; z-index: 2; display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.pt-end-open { transform: translate(calc(-100% + 6px), -50%); }
.pt-end-open.is-edge { transform: translate(-6px, -50%); flex-direction: row-reverse; }
.pt-end-close { transform: translate(-7px, -50%); }
.pt-end-close.is-edge { transform: translate(calc(-100% + 7px), -50%); flex-direction: row-reverse; }
.pt-dot-open { width: 8px; height: 8px; border-radius: 50%; border: 2px solid currentColor; background: #fff; }
.pt-dot-close { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; background: currentColor; box-shadow: 0 0 0 1px currentColor; }
.pt-date { padding: 0 4px; border-radius: 6px; background: #fff; font-size: 12px; line-height: 16px; color: var(--p-ink); }
.pt-tone-overdue .pt-date { color: var(--p-danger); }

/* Today, a GROW blue line through every row. */
.pt-today { position: absolute; top: 30px; bottom: 0; z-index: 1; width: 2px; margin-left: -1px; background: var(--p-blue); }
.pt-today::before { content: ""; position: absolute; top: -4px; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--p-blue); }

/* The writing load by month: pale blue, orange in a crunch. */
.pt-crunch { display: flex; align-items: stretch; height: 100px; }
.pt-crunch-label { align-items: flex-end; padding-bottom: 8px; font-size: 13px; line-height: 18px; color: var(--p-muted); border-right: 1px solid var(--p-line); }
.pt-crunch-sub { display: block; font-size: 12px; color: var(--p-muted); }
.pt-loads { display: flex; align-items: stretch; flex: none; padding-top: 24px; box-sizing: border-box; }
.pt-load {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  height: 100%; box-sizing: border-box; padding: 0 10px;
}
.pt-load-n { margin-bottom: 3px; font-size: 12px; line-height: 15px; color: var(--p-blue); }
.pt-load-fill { display: block; width: 100%; max-width: 64px; border-radius: 6px 6px 0 0; background: var(--p-blue-pale); }
.pt-load.is-crunch .pt-load-n { color: var(--p-orange-ink); }
.pt-load.is-crunch .pt-load-fill { background: var(--p-orange); }

/* Submitted: a sky line from the day it went in, a marker for each step. */
/* Card and dialog titles the focus is moved to (tabindex="-1"): a place to
   start from, not a control, so no ring. */
.pt-card-head .portal-card-title:focus, .pt-dialog .portal-dialog-title:focus { outline: none; }

.pt-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; font-size: 13px; color: var(--p-muted); }
.pt-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.pt-follow-row { min-height: 0; }
.pt-follow-row .pt-track { height: var(--pt-row-h); }
.pt-follow-row .pt-label { min-height: 60px; }
.pt-tick {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--p-sky); color: var(--p-sky-ink); font-size: 13px;
}
.pt-follow-line { position: absolute; height: 3px; border-radius: 999px; background: var(--p-sky); }
.pt-marker, .pt-marker-key { box-sizing: border-box; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; }
.pt-marker { position: absolute; z-index: 2; margin: -7px 0 0 -7px; cursor: default; }
.pt-marker-key { display: inline-block; }
.pt-marker-sky { background: var(--p-sky); box-shadow: 0 0 0 1.5px var(--p-sky-ink); }
.pt-marker-orange { background: var(--p-orange); box-shadow: 0 0 0 1.5px var(--p-orange-ink); }
.pt-marker-green { background: var(--p-green); box-shadow: 0 0 0 1.5px var(--p-green-ink); }
.pt-marker-neutral { background: var(--p-sep); box-shadow: 0 0 0 1.5px var(--p-muted); }
.pt-marker.is-submitted { width: 16px; height: 16px; margin: -8px 0 0 -8px; }
/* A marker moved down a lane hangs from the line on a stem. */
.pt-marker::before {
  content: ""; position: absolute; left: 50%; bottom: 100%; width: 1px; margin-left: -0.5px;
  height: calc(var(--pt-stem, 0px) - 12px); background: var(--p-line);
}
.pt-marker::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 6px); z-index: 5; transform: translateX(-50%);
  padding: 4px 8px; border-radius: 6px; background: var(--p-ink); color: #fff; font-size: 12px; line-height: 16px;
  white-space: nowrap; opacity: 0; pointer-events: none;
}
.pt-marker:hover::after, .pt-marker:focus::after { opacity: 1; }
.pt-marker:focus-visible { outline: 2px solid var(--p-blue); outline-offset: 3px; }

/* ---------- lists: no dates yet, not submitted, submitted ---------- */
.pt-undated { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--p-sep); }
.pt-undated .portal-list { margin-top: 6px; }
.pt-list-row { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; padding: 12px 0; }
.pt-list-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pt-list-main .pt-route { white-space: normal; }
.pt-steps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pt-steps-none { font-size: 13px; color: var(--p-muted); }
.pt-controls { margin-top: 10px; border-top: 1px solid var(--p-sep); }

/* ---------- the dialogs ---------- */
.pt-dialog .portal-field input, .pt-dialog .portal-field select, .pt-dialog .portal-field textarea { width: 100%; box-sizing: border-box; min-height: 44px; }
.pt-dialog .portal-error { margin: 0 0 12px; }
.pt-dialog .portal-dialog-sub { overflow-wrap: anywhere; }
.pt-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 14px; font-size: 14px; color: var(--p-muted); }
.pt-dialog-note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; font-size: 14px; line-height: 20px; color: var(--p-muted); }
.pt-action-list { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; }
.pt-action {
  display: flex; align-items: center; min-height: 44px; box-sizing: border-box; padding: 8px 14px; border: 1px solid var(--p-line);
  border-radius: 12px; background: #fff; color: var(--p-ink); font: inherit; font-size: 15px; text-align: left; text-decoration: none; cursor: pointer;
}
:where(.portal-body) a.pt-action { color: var(--p-ink); }
.pt-action:hover { background: var(--p-hover); border-color: var(--p-blue); }
.pt-action.is-danger { color: var(--p-danger); }
.pt-action.is-danger:hover { background: var(--p-danger-pale); border-color: var(--p-danger); }
.pt-action:focus-visible { outline: 2px solid var(--p-blue); outline-offset: 2px; }
.pt-stages { margin: 4px 0 10px; padding: 0; border: 0; }
.pt-stages legend { padding: 0; margin-bottom: 4px; font-size: 13px; color: var(--p-muted); }
.pt-stage { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 0; border-top: 1px solid var(--p-sep); }
.pt-stage-check { flex: 1 1 auto; }
.pt-stage-date {
  flex: none; width: 170px; min-height: 40px; box-sizing: border-box; padding: 6px 10px; border: 1px dashed var(--p-line);
  border-radius: 10px; background: #fff; color: var(--p-muted); font: inherit; font-size: 15px;
}
.pt-stage.is-done .pt-stage-date { border-style: solid; color: var(--p-ink); }

/* ---------- narrow: a phone, or a narrow window ---------- */
/* Each row's words and buttons sit above its bar, the width of the card,
   and stay put while the months scroll sideways beneath them. */
.pt-inner.is-narrow .pt-row { flex-direction: column; min-height: 0; }
.pt-inner.is-narrow .pt-label {
  width: var(--pt-view); flex-wrap: wrap; align-items: flex-start; gap: 8px; padding: 12px 0 6px; border-right: 0;
}
.pt-inner.is-narrow .pt-label-text { flex-basis: 100%; }
.pt-inner.is-narrow .pt-actions { flex-basis: 100%; }
.pt-inner.is-narrow .pt-row.is-overdue .pt-label { padding-left: 10px; }
.pt-inner.is-narrow .pt-row > .pt-track { height: 38px; min-height: 38px; }
.pt-inner.is-narrow .pt-follow-row > .pt-track { height: var(--pt-row-h); }
.pt-inner.is-narrow .pt-follow-row .pt-label { min-height: 0; flex-wrap: nowrap; align-items: center; }
.pt-inner.is-narrow .pt-follow-row .pt-label-text { flex-basis: auto; }
.pt-inner.is-narrow .pt-crunch { flex-direction: column; height: auto; }
.pt-inner.is-narrow .pt-crunch-label { width: var(--pt-view); padding: 12px 0 0; border-right: 0; }
.pt-inner.is-narrow .pt-loads { height: 84px; }

@media (max-width: 760px) {
  .pt-page { gap: 16px; margin-top: 22px; }
  .pt-picker.is-collapsed { padding: 16px 18px; }
  .pt-add-firms { min-height: 44px; }
  /* The count is in the strip below; the title and Minimise share a line. */
  .pt-picker-head .pt-picker-count { display: none; }
  .pt-tab { flex: 1 1 auto; justify-content: center; padding: 0 14px; }
  .pt-partner-list { padding: 10px; gap: 10px; }
  .pt-partner { padding: 12px; }
  .pt-chips { grid-template-columns: minmax(0, 1fr); }
  .pt-form-grid { grid-template-columns: minmax(0, 1fr); }
  .pt-form-grid .portal-field input, .pt-form-grid .portal-field select, .pt-dialog .portal-field input,
  .pt-dialog .portal-field textarea, .pt-writing input, .pt-stage-date { font-size: 16px; }
  .pt-summary { align-items: stretch; }
  .pt-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; gap: 10px; }
  .pt-stat { min-width: 0; padding: 10px 12px 10px 18px; }
  .pt-stat-n { font-size: 24px; }
  .pt-toolbar { width: 100%; margin-left: 0; }
  /* A finger's 44px: the writing time's box and each view button. */
  .pt-writing input { height: 44px; }
  .pt-horizons { flex-wrap: wrap; }
  .pt-horizon { min-width: 44px; height: 44px; }
  .pt-list-row { flex-direction: column; align-items: stretch; }
  .pt-list-row .pt-actions { flex-wrap: wrap; }
  .pt-stage-date { width: 150px; }
  .pt-dialog .portal-dialog-actions .portal-pill { min-height: 44px; }
}
@media (max-width: 380px) {
  .pt-horizon { padding: 0 6px; }
  .pt-writing, .pt-horizons { padding-left: 10px; }
}
