/* The team calendar's own styles, over the app's base.css, auth.css and
   dialogs.css. The calendar's look is the one Sean picked on 2026-11-27,
   option B, bars (docs/superpowers/mockups/go/option-b.html): each booking is
   one continuous bar, solid when Confirmed or Approved, a pale fill with a
   dashed outline of the same colour while Planned. Bars carry no state words;
   the state is in words in each bar's title and aria-label and in the
   pop-up, so it is never shown by line style alone. */

/* --- The look's tokens ------------------------------------------------------------ */
:root {
  /* Each kind of booking: -solid when firm, -pale (fill) with -line (dashes)
     and -ink (text) while Planned. A visit's dock halves are a lighter solid,
     paler still while Planned. */
  --go-away-solid: #1e3a8a;
  --go-away-dock: #5b74b3;
  --go-away-pale: #eef2ff;
  --go-away-pale-dock: #f6f8ff;
  --go-away-line: #1e3a8a;
  --go-away-ink: #1e3a8a;
  --go-local-solid: #0369a1;
  --go-local-dock: #4a9cc9;
  --go-local-pale: #f0f9ff;
  --go-local-pale-dock: #f7fbff;
  --go-local-line: #0369a1;
  --go-local-ink: #075985;
  --go-til-solid: #4d7c2f;
  --go-til-pale: #f3f8ee;
  --go-til-line: #5b8c3a;
  --go-til-ink: #3f6b2f;
  --go-annual-solid: #3b2d8a;
  --go-annual-pale: #f4f2fc;
  --go-annual-line: #3b2d8a;
  --go-annual-ink: #3b2d8a;
  --go-personal-solid: #9d174d;
  --go-personal-pale: #fdf2f8;
  --go-personal-line: #9d174d;
  --go-personal-ink: #9d174d;
  /* Report writing and Job Prep: round bubbles ringed in white. */
  --go-report: #f59e0b;
  --go-report-ink: #422006;
  --go-prep: #0891b2;
  --go-prep-ink: #fff;
  --go-bubble: 1.4rem;
  --go-nv: 1.45rem;
  --go-suggested: rgba(30, 58, 138, .13);
  --go-bubble-ring: 0 0 0 2px #fff, 0 1px 3px rgba(15, 23, 42, .35);
  /* The grid: a lane per person, bars inset from the day lines. A half day
     is --go-half wide on a computer (pages/calendar.js reckons with 32 px). */
  --go-person-col: 200px;
  --go-half: 2rem;
  --go-lane: 3.3rem;
  --go-bar-top: .8rem;
  --go-bar-height: 1.85rem;
  --go-bar-radius: .55rem;
  --go-bar-inset: 2px;
  --go-dash: 2px;
  /* TIL: a thinner bar, centred in the same lane. */
  --go-til-top: 1.05rem;
  --go-til-height: 1.35rem;
  --go-til-radius: .45rem;
  /* A dotted line over a gap inside one visit (a dock-out after a weekend,
     TIL across one), in the visit's or TIL's -line colour. */
  --go-link: 2px dotted;
  --go-day-line: #e2e8f0;
  --go-row-line: #eef2f7;
  --go-weekend: #f1f5f9;
  --go-holiday: repeating-linear-gradient(45deg, #f1f5f9 0 5px, #e8edf3 5px 10px);
  /* The holiday's name is what tells it from a weekend: 6.4:1 on the band's
     darker stripe (the mockup's #94a3b8 was 2.2:1, --muted 4.0:1). */
  --go-holiday-text: #475569;
  /* A person's days from their archive date. */
  --go-archived: #e2e8f0;
  --go-today: rgba(15, 23, 42, .045);
  --go-today-edge: #0f172a;
  --go-avatar: #e2e8f0;
  --go-leader-avatar: var(--header);
  --go-leader-star: #f59e0b;
  /* Stats: small bars against the aims, dots for Away jobs. */
  --go-meter-width: 11rem;
  --go-meter-height: .75rem;
  --go-meter-track: #f1f5f9;
  --go-meter-edge: #e2e8f0;
  --go-meter-aim: #0f172a;
  --go-meter-util: #334155;
  --go-dot: .8rem;
  --go-dot-edge: #cbd5e1;
  --go-dot-ok-band: #f0fdf4;
  --go-dot-warn-band: #fffbeb;
  --go-flag-ok: #15803d;
  --go-flag-warn: #b45309;
  --go-flag-bad: #b91c1c;
}
/* A phone: a week at a time, each person's name above a full-width lane. */
@media (max-width: 560px) {
  :root {
    --go-person-col: 0px;
    --go-lane: 2.55rem;
    --go-bar-top: .35rem;
    --go-bar-height: 1.7rem;
    --go-til-top: .55rem;
    --go-til-height: 1.25rem;
    --go-bubble: 1.15rem;
    --go-nv: 1.3rem;
  }
}

/* The gate and the idle lock cover the page; what is under them is hidden
   too, so nothing shows through while they open (auth.css does the same for
   the app's header). */
body.auth-locked { overflow: hidden; }
body.auth-locked #goHeader,
body.auth-locked #view,
body.idle-locked #goHeader { visibility: hidden; }

/* --- The header ------------------------------------------------------------------ */
.go-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1rem;
  padding: .85rem 1rem;
  padding-top: max(.85rem, env(safe-area-inset-top));
  background: linear-gradient(135deg, #0f172a, #334155);
  color: #fff;
  box-shadow: var(--shadow);
}
.go-brand { min-width: 0; display: flex; align-items: center; gap: .75rem; }
/* The logo's square carries room for its dust on the right; the tile is the
   app icon's white. */
.go-logo {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.go-brand-text { min-width: 0; }
.go-title { margin: 0; font-size: 1.25rem; line-height: 1.2; }
.go-company { margin: 0; color: #cbd5e1; font-size: .88rem; }
/* Two rows at most, whatever the state or the name: the tools never wrap
   among themselves, and a long name gives way (its whole address is its
   title). On a phone, the rows are laid out below. */
.go-header-tools { display: flex; flex-wrap: nowrap; align-items: center; gap: .5rem; min-width: 0; }
.go-header-tools > * { flex: none; }
.go-header-tools > .go-who { flex: 0 1 auto; min-width: 0; }
.go-who { overflow: hidden; color: #e2e8f0; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.go-offline {
  padding: .3rem .7rem;
  border: 1px solid var(--warning-border);
  border-radius: 999px;
  background: var(--warning-bg);
  color: var(--warning-text);
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
}
/* Connecting: the server usually answers within a second of opening, so the
   pill waits a moment before it shows, rather than flashing at every start. */
.go-offline.is-connecting {
  border-color: rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .08);
  color: #e2e8f0;
  animation: go-appear .2s ease 2s both;
}
@keyframes go-appear {
  from { opacity: 0; }
  to { opacity: 1; }
}
/* Over base.css's button.secondary, which is light for light pages. */
.go-header .go-sign-out { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .3); white-space: nowrap; }

/* --- The page under it ---------------------------------------------------------- */
.go-main { max-width: 2200px; margin: 0 auto; padding: 1rem; }
.go-loading { margin: 2rem 0; color: var(--muted); text-align: center; }
.go-panel {
  max-width: 36rem;
  margin: 1.5rem auto;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--card);
  box-shadow: var(--shadow);
}
.go-panel h2 { margin-bottom: .5rem; }
.go-panel p { line-height: 1.45; }
.go-error h2 { color: var(--danger); }

/* --- The calendar page (pages/calendar.js) ------------------------------------ */
/* The quarter bar, white under the header: year arrows round the quarter
   tabs, a phone's week pager, Today. */
.go-cal-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1rem;
  margin: -1rem -1rem 1rem;
  padding: .6rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.go-quarters { display: flex; align-items: center; gap: .35rem; }
.go-year { min-width: 2.75rem; padding: 0 .2rem; font-weight: 800; text-align: center; }
.go-quarter-tab {
  min-height: 36px;
  padding: .35rem .8rem;
  border-radius: .65rem;
  background: #f1f5f9;
  color: var(--label);
  box-shadow: inset 0 0 0 1px #e2e8f0;
}
.go-quarter-tab.is-on { background: var(--header); color: var(--text); box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .12); }
.go-round {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--text);
  box-shadow: inset 0 0 0 1px #e2e8f0;
}
.go-round .icon { width: 1.2rem; height: 1.2rem; }
.go-week-pager { display: flex; align-items: center; gap: .4rem; }
.go-week-label { min-width: 7rem; font-weight: 700; text-align: center; }
.go-btn-icon { width: 1.15rem; height: 1.15rem; margin-right: .3rem; fill: currentColor; flex: none; }

/* The board: the quarter's title, its key and the grid. */
.go-board {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--card);
  box-shadow: var(--shadow);
}
.go-board-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .5rem 1rem; }
.go-board-note { margin: .2rem 0 0; color: var(--muted); font-size: .88rem; }
.go-holidays-missing {
  margin: .75rem 0 0;
  padding: .55rem .8rem;
  border: 1px solid var(--warning-border);
  border-radius: .7rem;
  background: var(--warning-bg);
  color: var(--warning-text);
  font-size: .9rem;
  font-weight: 600;
}
.go-empty { margin: 1rem 0 .25rem; }
.go-key { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem 1.1rem; margin: .75rem 0 .25rem; color: var(--label); font-size: .8rem; }
.go-key-item { display: inline-flex; align-items: center; gap: .4rem; }
.go-key-bar { display: inline-block; width: 2rem; height: .95rem; border-radius: .3rem; }
.go-key-bar.is-firm { background: var(--go-solid); }
.go-key-bar.is-planned { background: var(--go-pale); border: var(--go-dash) dashed var(--go-line); }
.go-key-bar.is-dock { width: 1rem; }
.go-key-bar.is-thin { height: .6rem; }
.go-key-bubble { display: inline-flex; align-items: center; justify-content: center; width: 1.15rem; height: 1.15rem; border-radius: 50%; box-shadow: var(--go-bubble-ring); }
.go-key-bubble[data-role="report"] { background: var(--go-report); color: var(--go-report-ink); }
.go-key-bubble[data-role="prep"] { background: var(--go-prep); color: var(--go-prep-ink); }
.go-key-bubble .go-bar-icon { width: .7rem; height: .7rem; }
.go-key-band { display: inline-block; width: 1.1rem; height: 1.1rem; border-radius: .2rem; }
.go-key-band.is-weekend { background: var(--go-weekend); box-shadow: inset 0 0 0 1px var(--go-day-line); }
.go-key-band.is-holiday { background: var(--go-holiday); }
.go-key-band.is-today { background: var(--go-today); box-shadow: inset 2px 0 0 var(--go-today-edge); }

/* --- The grid (features/grid.js) ------------------------------------------------ */
/* A row per person, the name column sticky while the quarter scrolls sideways;
   each lane a grid with a column per half day. Cells fill the columns in
   order; bars, links and labels are placed on theirs (an absolutely placed
   grid child's box is its grid area), so a bar spans its run's halves. */
.go-grid-scroll { overflow-x: auto; margin-top: .75rem; border-top: 1px solid var(--go-day-line); }
.go-grid { position: relative; width: max-content; min-width: 100%; }
.go-grid-head, .go-row { display: flex; }
.go-grid-head { border-bottom: 1px solid var(--border); background: var(--card); }
.go-corner, .go-person { position: sticky; left: 0; z-index: 6; flex: none; width: var(--go-person-col); background: var(--card); }
/* The whole head's height, so the dates scrolled under it are covered. */
.go-corner { display: flex; align-items: flex-end; padding: 0 .25rem .45rem 0; color: var(--label); font-size: .72rem; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }
.go-days, .go-lane { flex: none; display: grid; grid-template-columns: repeat(var(--go-halves), var(--go-half)); }
/* A month's name stays in view beside the names while its days scroll by,
   and goes with them (held inside its month's box). */
.go-month { grid-row: 1; min-width: 0; margin: .35rem 0 .1rem; }
.go-month > span {
  position: sticky;
  left: var(--go-person-col);
  display: inline-block;
  padding-left: .4rem;
  border-left: 2px solid var(--header);
  color: var(--label);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.go-day { grid-row: 2; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: .05rem; padding: .15rem 0 .45rem; color: var(--label); }
.go-day-name { font-size: .7rem; font-weight: 600; }
.go-day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  color: var(--text);
  font-size: .95rem;
  font-weight: 800;
}
.go-day.is-off .go-day-number { color: var(--muted); }
.go-day.is-today .go-day-number { background: var(--go-today-edge); color: #fff; }
.go-day-holiday {
  max-width: calc(100% - 4px);
  padding: .05rem .35rem;
  overflow: hidden;
  border-radius: 999px;
  background: #f1f5f9;
  box-shadow: inset 0 0 0 1px var(--border);
  color: var(--label);
  font-size: .6rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.go-row { border-bottom: 1px solid var(--go-row-line); }
.go-person { display: flex; align-items: center; gap: .6rem; padding: .35rem .25rem .35rem 0; min-width: 0; }
.go-avatar {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--go-avatar);
  color: var(--text);
  font-size: .85rem;
  font-weight: 800;
}
.go-avatar.is-leader { background: var(--go-leader-avatar); }
.go-avatar-star {
  position: absolute;
  right: -4px;
  bottom: -3px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--go-leader-star);
  color: #fff;
  box-shadow: 0 0 0 2px var(--card);
}
.go-avatar-star .icon { width: .65rem; height: .65rem; }
.go-person-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.go-person-name { overflow: hidden; font-size: .92rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.go-person-role, .go-person-archived { overflow: hidden; color: var(--muted); font-size: .74rem; text-overflow: ellipsis; white-space: nowrap; }
/* The star says team leader on a computer; the words are for screen readers
   there, and shown on a phone. */
.go-person-leader { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.go-icon-btn {
  flex: none;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: .6rem;
  background: transparent;
  color: var(--label);
}
.go-icon-btn:hover:not(:disabled) { background: #f1f5f9; color: var(--text); }
.go-icon-btn .icon { width: 1.1rem; height: 1.1rem; }

/* A lane: day lines only, weekends and holidays shaded, today a soft band
   with a navy edge, an archived person's days greyed. Clipped sideways only,
   so a bubble can ride above it. */
.go-lane { position: relative; grid-template-rows: var(--go-lane); overflow-x: clip; }
.go-cell { min-width: 0; }
.go-cell[data-half="am"] { box-shadow: inset 1px 0 0 var(--go-day-line); }
.go-cell.is-weekend { background: var(--go-weekend); }
.go-cell.is-holiday { background: var(--go-holiday); }
.go-cell.is-archived { background: var(--go-archived); }
.go-cell.is-today { box-shadow: inset 0 0 0 999px var(--go-today); }
.go-cell.is-today[data-half="am"] { box-shadow: inset 2px 0 0 var(--go-today-edge), inset 0 0 0 999px var(--go-today); }
.go-holiday-name {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 .2rem;
  text-align: center;
  pointer-events: none;
}
.go-holiday-name > span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: var(--go-holiday-text);
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.15;
  text-transform: uppercase;
}
.go-lane > .go-booking { left: var(--go-bar-inset); right: var(--go-bar-inset); z-index: 1; }
.go-lane > .go-booking:is([data-role="dockIn"], [data-role="dockOut"]) { z-index: 2; }
.go-lane > .go-booking:is(.joins-left, .is-cut-left) { left: 0; }
.go-lane > .go-booking:is(.joins-right, .is-cut-right) { right: 0; }
.go-lane > .go-booking:is([data-role="report"], [data-role="prep"]) { left: calc(50% - var(--go-bubble) / 2); right: auto; z-index: 3; }
/* A run that goes on past what is shown: square, and open, at that end. */
.go-booking.is-cut-left { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.go-booking.is-cut-right { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.go-booking.is-planned.is-cut-left { border-left: 0; }
.go-booking.is-planned.is-cut-right { border-right: 0; }
.go-bar-icon { flex: none; width: 1rem; height: 1rem; fill: currentColor; }
.go-booking:is([data-role="report"], [data-role="prep"]) .go-bar-icon { width: .8rem; height: .8rem; }
.go-bar-name { overflow: hidden; text-overflow: ellipsis; }
/* The dotted line over a weekend or holiday inside one booking, through the
   middle of its bars. */
.go-link {
  position: absolute;
  top: calc(var(--go-bar-top) + var(--go-bar-height) / 2 - 1px);
  left: 0;
  right: 0;
  height: 0;
  border-top: var(--go-link) var(--go-line);
  pointer-events: none;
}
/* A bar too short for its name: the name just after it. */
.go-bar-after {
  position: absolute;
  top: calc(var(--go-bar-top) + (var(--go-bar-height) - 1.3rem) / 2);
  left: .3rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  height: 1.3rem;
  padding: 0 .3rem;
  border-radius: .3rem;
  background: rgba(255, 255, 255, .85);
  color: var(--go-ink);
  font-size: .74rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
}
.go-bar-after .go-bar-icon { width: .9rem; height: .9rem; }

/* --- The site lists (features/sites-lists.js) ----------------------------------- */
/* Side by side, stacked on a phone; each site a tile, its side coloured as
   its bars will be, with the plane (Away) or car (Local). */
.go-sites { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.go-sites > section {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--card);
  box-shadow: var(--shadow);
}
.go-sites-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; margin-bottom: .65rem; }
.go-sites h3 { margin: 0; }
.go-sites-note { margin: .15rem 0 0; color: var(--muted); font-size: .8rem; }
.go-site-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .55rem; margin: 0; padding: 0; list-style: none; }
.go-site { display: flex; min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: .75rem; background: var(--card); }
.go-site-side { flex: none; display: flex; align-items: center; justify-content: center; width: 2.3rem; background: var(--go-away-solid); color: #fff; }
.go-site[data-travel="local"] .go-site-side { background: var(--go-local-solid); }
.go-site-side .icon { width: 1.15rem; height: 1.15rem; }
.go-site-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; padding: .45rem .3rem .5rem .6rem; }
.go-site-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .4rem; }
.go-site-name { font-size: .9rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.go-site-client { color: var(--muted); font-size: .8rem; }
.go-site-meta { margin-top: .25rem; color: var(--label); font-size: .76rem; }
.go-site-ticks { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .3rem; }
.go-site-tag {
  display: inline-block;
  padding: .04rem .4rem;
  border-radius: .35rem;
  box-shadow: inset 0 0 0 1px var(--border);
  color: var(--label);
  font-size: .68rem;
  font-weight: 700;
  white-space: nowrap;
}
.go-site-tag.is-frequency { flex: none; background: var(--header); box-shadow: none; color: var(--text); }
.go-site-tag.is-built-in { flex: none; background: #f1f5f9; box-shadow: none; }
.go-site > .go-icon-btn { align-self: flex-start; margin: .2rem .2rem 0 0; }
.go-site-archived { margin-top: .25rem; color: var(--muted); font-size: .74rem; font-weight: 600; }
/* Shown by Show archived: greyed, and never picked up (features/drag.js). */
.go-site.is-archived { border-style: dashed; background: #f8fafc; }
.go-site.is-archived .go-site-side { background: var(--go-archived); color: var(--muted); }
.go-site.is-archived :is(.go-site-name, .go-site-client, .go-site-meta, .go-site-ticks) { opacity: .6; }
.go-sites.is-editable .go-site.is-archived { cursor: default; }
.go-sites-archived { grid-column: 1 / -1; justify-self: end; min-height: 32px; color: var(--label); font-size: .88rem; }

/* --- The people and site dialogs ------------------------------------------------- */
.app-dialog.go-dialog { width: min(96vw, 600px); }
.app-dialog.go-archive-warning { width: min(96vw, 440px); }
.go-form { display: flex; flex-direction: column; gap: .85rem; }
.go-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.go-form legend { width: 100%; margin-bottom: .35rem; }
.go-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.go-form-row.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.go-field { display: flex; flex-direction: column; gap: .25rem; }
/* The label's small capitals are for the label only. */
.go-field :is(input, select), .go-field-note, .go-choice, .go-tick { letter-spacing: normal; text-transform: none; }
.go-field :is(input, select) { margin-top: 0; font-weight: 400; }
.go-field-note { color: var(--muted); font-size: .8rem; font-weight: 400; line-height: 1.35; }
.go-choices { display: flex; flex-wrap: wrap; gap: .4rem; }
.go-choice {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 40px;
  padding: .4rem .75rem;
  border: 1px solid var(--border);
  border-radius: .7rem;
  color: var(--text);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
}
.go-choice:has(input:checked) { border-color: var(--accent); background: #f8fafc; box-shadow: inset 0 0 0 1px var(--accent); }
.go-choice:has(input:disabled) { cursor: default; opacity: .7; }
.go-choice-icon { width: 1.05rem; height: 1.05rem; fill: currentColor; }
.go-ticks { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; }
.go-tick { display: inline-flex; align-items: center; gap: .45rem; min-height: 36px; color: var(--text); font-size: .95rem; font-weight: 500; cursor: pointer; }
.go-tick input { width: 1.15rem; height: 1.15rem; }
.go-recurring-fields {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  padding: .85rem;
  border: 1px solid #e2e8f0;
  border-radius: .75rem;
  background: #f8fafc;
}
.go-read-only { margin: 0; color: var(--warning-text); }
.go-form .dialog-actions { margin-top: .25rem; }

/* --- Bookings: colour by kind, solid or dashed by state ---------------------------- */
/* Base styles. The grid (features/grid.js) places each .go-booking on its
   run's columns in its person's lane and gives it data-role (site, dockIn,
   dockOut, til, annual, personal, report, prep), data-travel (away, local)
   on a visit's site and dock bars, and is-firm or is-planned. The colours
   also serve the grid's dotted links and short bars' names, and the key. */
:is(.go-booking, .go-link, .go-bar-after, .go-key-bar, .go-popup)[data-travel="away"] { --go-solid: var(--go-away-solid); --go-pale: var(--go-away-pale); --go-line: var(--go-away-line); --go-ink: var(--go-away-ink); }
:is(.go-booking, .go-link, .go-bar-after, .go-key-bar, .go-popup)[data-travel="local"] { --go-solid: var(--go-local-solid); --go-pale: var(--go-local-pale); --go-line: var(--go-local-line); --go-ink: var(--go-local-ink); }
:is(.go-booking, .go-key-bar)[data-travel="away"]:is([data-role="dockIn"], [data-role="dockOut"]) { --go-solid: var(--go-away-dock); --go-pale: var(--go-away-pale-dock); }
:is(.go-booking, .go-key-bar)[data-travel="local"]:is([data-role="dockIn"], [data-role="dockOut"]) { --go-solid: var(--go-local-dock); --go-pale: var(--go-local-pale-dock); }
:is(.go-booking, .go-link, .go-bar-after, .go-key-bar)[data-role="til"] { --go-solid: var(--go-til-solid); --go-pale: var(--go-til-pale); --go-line: var(--go-til-line); --go-ink: var(--go-til-ink); }
:is(.go-booking, .go-link, .go-bar-after, .go-key-bar, .go-popup)[data-role="annual"] { --go-solid: var(--go-annual-solid); --go-pale: var(--go-annual-pale); --go-line: var(--go-annual-line); --go-ink: var(--go-annual-ink); }
:is(.go-booking, .go-link, .go-bar-after, .go-key-bar, .go-popup)[data-role="personal"] { --go-solid: var(--go-personal-solid); --go-pale: var(--go-personal-pale); --go-line: var(--go-personal-line); --go-ink: var(--go-personal-ink); }
.go-booking {
  position: absolute;
  top: var(--go-bar-top);
  height: var(--go-bar-height);
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: 0 .5rem;
  border-radius: var(--go-bar-radius);
  overflow: hidden;
  white-space: nowrap;
  font-size: .78rem;
  font-weight: 700;
}
.go-booking.is-firm { background: var(--go-solid); color: #fff; }
.go-booking.is-planned { background: var(--go-pale); color: var(--go-ink); border: var(--go-dash) dashed var(--go-line); }
/* A dock half, joined to its visit's end: square where they meet. */
.go-booking:is([data-role="dockIn"], [data-role="dockOut"]) { justify-content: center; padding: 0; }
.go-booking.joins-left { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.go-booking.joins-right { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.go-booking.is-firm.joins-left { box-shadow: inset 1px 0 0 rgba(255, 255, 255, .55); }
.go-booking.is-planned.joins-left { border-left: 1px solid var(--go-line); }
.go-booking.is-planned.joins-right { border-right: 0; }
.go-booking[data-role="til"] { top: var(--go-til-top); height: var(--go-til-height); border-radius: var(--go-til-radius); font-size: .7rem; }
/* Report writing and Job Prep: round, in the middle of an empty half, or
   riding on a bar's top edge (on-bar). */
.go-booking:is([data-role="report"], [data-role="prep"]) {
  top: calc(var(--go-bar-top) + (var(--go-bar-height) - var(--go-bubble)) / 2);
  width: var(--go-bubble);
  height: var(--go-bubble);
  padding: 0;
  justify-content: center;
  border-radius: 50%;
  box-shadow: var(--go-bubble-ring);
  z-index: 3;
}
.go-booking.on-bar:is([data-role="report"], [data-role="prep"]) { top: calc(var(--go-bar-top) - var(--go-bubble) / 2); }
.go-booking[data-role="report"] { background: var(--go-report); color: var(--go-report-ink); }
.go-booking[data-role="prep"] { background: var(--go-prep); color: var(--go-prep-ink); }

/* --- Placing and changing visits (features/drag.js) ---------------------------------- */
/* Every bar is a button (its pop-up); a visit's bars are dragged while the
   calendar can be edited, its end by the handle at its last day. */
.go-booking { cursor: pointer; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.go-grid.is-editable .go-booking:is([data-role="site"], [data-role="dockIn"], [data-role="dockOut"], [data-role="til"]) { cursor: grab; }
.go-booking.is-dragging { opacity: .55; }
/* Its edit on the way to the server: drawn as dropped, and not pressed again
   until the save settles (pages/calendar.js). */
.go-grid .go-booking.is-saving, .go-grid.is-editable .go-booking.is-saving[data-role] { cursor: progress; }
.go-resize { position: absolute; top: 0; right: 0; bottom: 0; width: 12px; cursor: ew-resize; touch-action: none; }
.go-resize::after { content: ""; position: absolute; top: 28%; bottom: 28%; right: 4px; width: 2px; border-radius: 1px; background: currentColor; opacity: .55; }
/* The next-visit icon (features/grid.js): a round white button with a navy ring,
   centred on the end of the visit's last site day, on its top edge (option B). */
.go-next-visit {
  position: absolute;
  z-index: 4;
  top: .1rem;
  right: calc(var(--go-nv) / -2);
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--go-nv);
  min-width: 0;
  height: var(--go-nv);
  min-height: 0;
  padding: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--go-away-solid);
  box-shadow: inset 0 0 0 2px var(--go-away-solid), 0 1px 3px rgba(15, 23, 42, .3);
  cursor: pointer;
}
.go-next-visit:hover { background: var(--go-away-pale); }
.go-next-visit:focus-visible { outline: 2px solid var(--go-today-edge); outline-offset: 2px; }
.go-nv-icon { width: .8rem; height: .8rem; fill: currentColor; }
/* The days a suggestion would put the next visit on, while the panel is open. */
.go-cell.is-suggested { background-image: linear-gradient(var(--go-suggested), var(--go-suggested)); }
.go-day.is-suggested {
  background-image: linear-gradient(var(--go-suggested), var(--go-suggested));
  box-shadow: inset 0 3px 0 var(--go-away-solid);
}
/* TIL that found no free half within 60 days. */
.go-til-short {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  margin: 0 6px 0 auto;
  border-radius: 50%;
  background: var(--go-flag-warn);
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
}
/* Where a drag would land: the halves it would take, red where it can't. */
.go-cell.is-drop { box-shadow: inset 0 0 0 999px rgba(30, 58, 138, .14); }
.go-cell.is-drop.is-refused { box-shadow: inset 0 0 0 999px rgba(185, 28, 28, .18); }
.go-drag-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9500;
  padding: .35rem .65rem;
  border-radius: .6rem;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .3);
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
}
body.go-dragging { cursor: grabbing; -webkit-user-select: none; user-select: none; }
body.go-dragging :is(.go-booking, .go-cell, .go-site) { cursor: grabbing; }
/* Sites to drag onto a day, or tap and then tap the day (.go-placing). */
.go-sites.is-editable .go-site { cursor: grab; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.go-site.is-dragging { opacity: .6; }
.go-site.go-placing { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.go-grid.go-placing .go-lane { cursor: copy; }
.go-placing-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
  margin: .75rem 0 0;
  padding: .4rem .45rem .4rem .8rem;
  border: 1px solid var(--go-away-line);
  border-radius: .7rem;
  background: var(--go-away-pale);
  color: var(--go-away-ink);
  font-size: .9rem;
  font-weight: 600;
}

/* --- A booking's pop-up (features/popup.js) ------------------------------------------ */
/* A card beside the bar, pointing at it (option B); at the foot of the screen
   on a phone. Its head takes the booking's colours, dashed while Planned. */
.go-popup[data-role="report"] { --go-pale: #fffbeb; --go-line: var(--go-report); --go-ink: var(--go-report-ink); }
.go-popup[data-role="prep"] { --go-pale: #ecfeff; --go-line: var(--go-prep); --go-ink: #155e75; }
.go-popup {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: min(25rem, calc(100vw - 16px));
  border-radius: 1rem;
  background: var(--card);
  box-shadow: 0 22px 60px rgba(15, 23, 42, .3), 0 0 0 1px rgba(15, 23, 42, .08);
  outline: none;
}
.go-pop-card { max-height: calc(100vh - 16px); overflow-y: auto; border-radius: inherit; }
.go-pop-arrow { position: absolute; width: 16px; height: 16px; background: var(--card); box-shadow: -1px 1px 0 rgba(15, 23, 42, .08); transform: rotate(45deg); }
.go-popup[data-side="right"] .go-pop-arrow { left: -8px; }
.go-popup[data-side="left"] .go-pop-arrow { right: -8px; box-shadow: 1px -1px 0 rgba(15, 23, 42, .08); }
.go-popup[data-side="below"] .go-pop-arrow { top: -8px; background: var(--go-pale, var(--card)); }
.go-popup[data-side="above"] .go-pop-arrow { bottom: -8px; }
.go-popup[data-side="docked"] .go-pop-arrow { display: none; }
.go-pop-grab { display: none; }
.go-pop-head {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .8rem .9rem;
  border-bottom: 2px dashed var(--go-line, var(--border));
  border-radius: 1rem 1rem 0 0;
  background: var(--go-pale, #f8fafc);
  color: var(--go-ink, var(--text));
}
.go-popup.is-firm .go-pop-head,
.go-popup:is([data-role="report"], [data-role="prep"]) .go-pop-head { border-bottom-style: solid; }
.go-pop-icon { flex: none; width: 1.3rem; height: 1.3rem; fill: currentColor; }
.go-pop-title { min-width: 0; }
.go-pop-title h2 { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.go-pop-what { margin: .1rem 0 0; color: #334155; font-size: .82rem; }
.go-pop-state {
  display: inline-flex;
  align-items: center;
  padding: .05rem .5rem;
  border: 1.5px dashed var(--go-line, var(--border));
  border-radius: 999px;
  background: #fff;
  color: var(--go-ink, var(--text));
  font-size: .72rem;
  font-weight: 800;
}
.go-pop-state.is-firm { border-style: solid; border-color: var(--go-solid, var(--accent)); background: var(--go-solid, var(--accent)); color: #fff; }
.go-pop-close {
  flex: none;
  width: 2.2rem;
  min-width: 2.2rem;
  height: 2.2rem;
  min-height: 2.2rem;
  margin-left: auto;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .8);
  color: var(--text);
}
.go-pop-close .icon { width: 1.1rem; height: 1.1rem; }
.go-pop-body { padding: .75rem .9rem .25rem; }
.go-pop-facts { display: grid; grid-template-columns: 7.2rem 1fr; gap: .4rem .75rem; margin: 0; font-size: .9rem; }
.go-pop-facts dt { color: var(--muted); }
.go-pop-facts dd { min-width: 0; margin: 0; font-weight: 600; }
.go-pop-facts dd small { display: block; color: var(--muted); font-size: .8rem; font-weight: 400; }
.go-pop-facts dd small.go-pop-short { color: var(--go-flag-warn); font-weight: 700; }
.go-pop-other { display: block; }
.go-pop-tilbar { display: flex; gap: 2px; margin: .3rem 0 .1rem; }
.go-pop-tilbar i { flex: 1 1 0; max-width: 1.5rem; height: .55rem; border-radius: 2px; }
.go-pop-tilbar i.is-planned { border: 1.5px dashed var(--go-til-line); background: var(--go-til-pale); }
.go-pop-tilbar i.is-firm { background: var(--go-til-solid); }
.go-pop-stamps { margin: .7rem 0 0; padding-top: .6rem; border-top: 1px solid #e2e8f0; color: var(--label); font-size: .82rem; line-height: 1.55; }
.go-pop-read-only { margin: .5rem 0 0; color: var(--warning-text); font-size: .82rem; }
.go-pop-actions { display: flex; flex-wrap: wrap; gap: .5rem; padding: .75rem .9rem .9rem; }
.go-pop-actions button { min-height: 42px; }
.go-pop-actions .go-ghost-danger { margin-left: auto; background: #fff; color: var(--danger); box-shadow: inset 0 0 0 1px #fecaca; }
.go-pop-dim { position: fixed; inset: 0; z-index: 59; background: rgba(15, 23, 42, .4); }
/* The next-visit panel (features/next-visit-panel.js) is a .go-popup. */
.go-nv .go-pop-body { padding-bottom: .9rem; }
.go-nv-intro { margin: 0 0 .6rem; color: var(--label); font-size: .88rem; }
.go-suggestions { display: flex; flex-direction: column; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.go-suggestion {
  width: 100%;
  justify-content: flex-start;
  min-height: 44px;
  padding: .5rem .8rem;
  border-radius: .8rem;
  background: var(--go-away-pale);
  color: var(--go-away-ink);
  box-shadow: inset 0 0 0 1.5px var(--go-away-line);
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
}
.go-suggestion:hover { background: #e0e7ff; }
.go-nv-changeover { margin-top: .8rem; padding: .65rem .75rem; border: 1px dashed var(--go-flag-warn); border-radius: .8rem; background: #fffbeb; color: #78350f; font-size: .88rem; }
.go-nv-changeover p { margin: 0 0 .55rem; }
.go-nv-changeover .go-pop-read-only { margin: .5rem 0 0; }
.app-dialog.go-clash-warning,
.app-dialog.go-hand-warning { width: min(96vw, 440px); }

/* --- The quarter's Deleted list (features/deleted-list.js) ----------------------------- */
.go-deleted {
  margin-top: 1rem;
  padding: .55rem 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--card);
  box-shadow: var(--shadow);
}
.go-deleted summary { display: flex; align-items: center; gap: .5rem; min-height: 36px; font-weight: 700; cursor: pointer; }
.go-deleted-count { min-width: 1.5rem; padding: .05rem .45rem; border-radius: 999px; background: #f1f5f9; color: var(--label); font-size: .78rem; text-align: center; }
.go-deleted-list { display: flex; flex-direction: column; margin: .35rem 0 .2rem; padding: 0; list-style: none; }
.go-deleted-item { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem 0; border-top: 1px solid var(--go-row-line); }
.go-deleted-text { display: flex; flex-direction: column; min-width: 0; }
.go-deleted-what { font-size: .92rem; font-weight: 700; }
.go-deleted-when, .go-deleted-by { color: var(--muted); font-size: .8rem; }
.go-deleted-none { margin: .35rem 0 .45rem; }
.go-deleted-item .compact-btn { flex: none; }

/* --- Stats: small bars against the aims, dots for Away jobs ------------------------ */
/* Base styles only; Task 16 sets each part's left and width. */
.go-meter {
  position: relative;
  width: var(--go-meter-width);
  max-width: 100%;
  height: var(--go-meter-height);
  border-radius: 999px;
  background: var(--go-meter-track);
  box-shadow: inset 0 0 0 1px var(--go-meter-edge);
}
.go-meter > .is-firm,
.go-meter > .is-planned { position: absolute; top: 0; bottom: 0; }
.go-meter > .is-firm { left: 0; border-radius: 999px 0 0 999px; background: var(--go-away-solid); }
.go-meter > .is-planned { border: 1.5px dashed var(--go-away-solid); border-left: 0; border-radius: 0 999px 999px 0; background: var(--go-away-pale); }
.go-meter > .go-aim { position: absolute; top: -.25rem; bottom: -.25rem; width: 2px; background: var(--go-meter-aim); }
.go-meter.is-util > .is-firm { background: var(--go-meter-util); }
.go-meter.is-util > .is-planned { border-color: var(--go-meter-util); background: var(--go-meter-track); }
.go-meter.is-leave > .is-firm { background: var(--go-annual-solid); }
.go-meter.is-leave > .is-planned { border-color: var(--go-annual-line); background: var(--go-annual-pale); }
.go-dots { display: flex; gap: 3px; }
.go-dots > i { width: var(--go-dot); height: var(--go-dot); border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1.5px var(--go-dot-edge); }
.go-dots > .in-ok-band { background: var(--go-dot-ok-band); }
.go-dots > .in-warn-band { background: var(--go-dot-warn-band); }
.go-dots > .is-firm { background: var(--go-away-solid); box-shadow: none; }
.go-dots > .is-planned { background: var(--go-away-pale); box-shadow: none; border: 1.5px dashed var(--go-away-solid); }
.go-flag { font-size: .8rem; font-weight: 800; }
.go-flag.is-ok { color: var(--go-flag-ok); }
.go-flag.is-short, .go-flag.is-warn { color: var(--go-flag-warn); }
.go-flag.is-bad { color: var(--go-flag-bad); }

/* --- A new version, offered (features/update-banner.js) -------------------------- */
.go-update {
  position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: max-content;
  max-width: calc(100vw - 2rem);
  padding: .6rem .6rem .6rem 1rem;
  border-radius: 1rem;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}
.go-update button { background: var(--header); color: var(--text); min-height: 40px; }

/* --- Leave and the bubbles (features/leave-tools.js, bubble-tools.js) --------------- */
/* Put in: option B's tools in the quarter bar, each with its colour, the one
   armed ringed (the grid is .go-placing meanwhile). */
.go-put { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-left: auto; }
.go-put-label { color: var(--label); font-size: .74rem; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }
.go-tool {
  gap: .4rem;
  min-height: 36px;
  padding: .35rem .75rem;
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--border);
}
.go-tool:hover:not(:disabled) { background: #f8fafc; }
.go-tool.is-on { background: var(--go-away-pale); color: var(--go-away-ink); box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 2px var(--accent); }
.go-tool-swatch { flex: none; width: .8rem; height: .8rem; border-radius: 3px; }
.go-tool[data-tool="annual"] .go-tool-swatch { background: var(--go-annual-solid); }
.go-tool[data-tool="personal"] .go-tool-swatch { background: var(--go-personal-solid); }
.go-tool[data-tool="report"] .go-tool-swatch { border-radius: 50%; background: var(--go-report); }
.go-tool[data-tool="prep"] .go-tool-swatch { border-radius: 50%; background: var(--go-prep); }
/* Leave bars and bubbles move by dragging while the calendar can be edited;
   while a tool is armed, a press anywhere in the lanes is the tool's. */
.go-grid.is-editable .go-booking:is([data-role="annual"], [data-role="personal"], [data-role="report"], [data-role="prep"]) { cursor: grab; }
.go-grid.go-placing .go-booking { cursor: copy; }
.go-grid.go-placing .go-lane { -webkit-user-select: none; user-select: none; }
/* A bubble's pop-up lists the visits it may link to; the one linked is
   pressed. */
.go-pop-links { margin: .75rem 0 0; }
.go-pop-links-head { margin: 0 0 .35rem; color: var(--label); font-size: .74rem; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }
.go-pop-links ul { display: grid; gap: .3rem; max-height: 11.5rem; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.go-link-option {
  width: 100%;
  min-height: 36px;
  padding: .35rem .65rem;
  border-radius: .6rem;
  background: #f8fafc;
  color: var(--text);
  font-weight: 600;
  justify-content: flex-start;
  text-align: left;
  box-shadow: inset 0 0 0 1px var(--border);
}
.go-link-option[aria-pressed="true"] { background: var(--go-pale); color: var(--go-ink); box-shadow: inset 0 0 0 2px var(--go-line); }
.go-link-none { margin: .35rem 0 0; color: var(--muted); font-size: .82rem; }

@media (max-width: 560px) {
  /* Two rows: the name of the calendar and Sign out; then the pages, with
     the name signed in, or the Offline pill in its place. */
  .go-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: .6rem .5rem;
    padding-left: 16px;
    padding-right: 16px;
  }
  .go-header-tools { display: contents; }
  .go-brand { grid-area: 1 / 1 / 2 / 3; }
  .go-header .go-sign-out { grid-area: 1 / 3; }
  .go-nav { grid-area: 2 / 1; }
  .go-offline, .go-who { grid-area: 2 / 2 / 3 / 4; justify-self: end; max-width: 100%; }
  .go-offline { white-space: normal; text-align: center; }
  .go-offline:not([hidden]) ~ .go-who { display: none; }
  .go-company { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .go-main { padding: .75rem 16px; }
  .go-sites { grid-template-columns: 1fr; }
  .go-site-list { grid-template-columns: 1fr; }
  .go-form-row, .go-form-row.is-three { grid-template-columns: 1fr; }

  /* A week at a time: the quarter tabs across, the week's pager under them. */
  .go-cal-bar { gap: .45rem; margin: -.75rem -16px .75rem; padding: .5rem 16px; }
  .go-quarters { width: 100%; }
  .go-quarter-tab { flex: 1 1 0; padding: .3rem .2rem; }
  .go-week-pager { flex: 1 1 auto; justify-content: space-between; }
  /* The Put in tools in one row, by their short names. */
  .go-put { width: 100%; margin-left: 0; flex-wrap: nowrap; gap: .3rem; }
  .go-put-label { display: none; }
  .go-tool { flex: 1 1 0; min-width: 0; min-height: 34px; padding: .2rem .35rem; gap: .3rem; font-size: .8rem; }
  .go-tool-swatch { width: .6rem; height: .6rem; }
  .go-board { margin: 0 -16px 1rem; padding: .6rem 16px .25rem; border-right: 0; border-left: 0; border-radius: 0; box-shadow: none; }
  .go-board-months, .go-board-note { display: none; }

  /* Each name above its own lane, the lane the screen's width; the dates
     stay in view while the team scrolls by. */
  .go-grid-scroll { overflow-x: visible; }
  .go-grid { width: auto; }
  .go-grid-head { position: sticky; top: 0; z-index: 7; }
  .go-corner, .go-month { display: none; }
  .go-days, .go-lane { flex: 1 1 auto; grid-template-columns: repeat(var(--go-halves), minmax(0, 1fr)); }
  .go-day { padding: .3rem 0 .45rem; }
  .go-day-number { min-width: 1.55rem; height: 1.55rem; font-size: .86rem; }
  .go-day-holiday { padding: 0 .25rem; font-size: .55rem; }
  .go-row { flex-direction: column; border-bottom: 0; }
  .go-person { position: static; width: auto; gap: .4rem; padding: .45rem 0 .1rem; background: transparent; }
  .go-avatar { width: 1.35rem; height: 1.35rem; font-size: .68rem; }
  .go-avatar-star { right: -3px; bottom: -2px; width: .75rem; height: .75rem; }
  .go-avatar-star .icon { width: .5rem; height: .5rem; }
  .go-person-text { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: .4rem; }
  .go-person-name { font-size: .86rem; }
  .go-person-role, .go-person-archived { font-size: .72rem; }
  .go-person-leader { position: static; width: auto; height: auto; overflow: visible; clip: auto; color: var(--go-til-ink); font-weight: 700; }
  .go-lane { border-bottom: 1px solid var(--go-day-line); }
  .go-booking { gap: .25rem; padding: 0 .35rem; font-size: .72rem; }
  .go-booking[data-role="til"] { font-size: .66rem; }
  .go-bar-icon { width: .85rem; height: .85rem; }
  .go-booking:is([data-role="report"], [data-role="prep"]) .go-bar-icon { width: .65rem; height: .65rem; }
  .go-bar-after { font-size: .68rem; }
  .go-next-visit { top: -.2rem; }
  .go-nv-icon { width: .7rem; height: .7rem; }

  /* The pop-up at the foot of the screen, over a dimmed page. */
  .go-popup { top: auto; right: 0; bottom: 0; left: 0; width: auto; border-radius: 1.1rem 1.1rem 0 0; box-shadow: 0 -12px 40px rgba(15, 23, 42, .3); }
  .go-pop-card { max-height: 85vh; padding-bottom: env(safe-area-inset-bottom); }
  .go-pop-arrow { display: none; }
  .go-pop-grab { display: block; width: 2.6rem; height: .3rem; margin: .5rem auto 0; border-radius: 999px; background: #cbd5e1; }
  .go-pop-head { margin-top: .4rem; border-radius: 0; }
  .go-pop-facts { grid-template-columns: 6.4rem 1fr; font-size: .86rem; }
  .go-pop-actions button { flex: 1 1 0; }
  .go-pop-actions .go-ghost-danger { margin-left: 0; }
  .go-deleted { margin: 1rem 0 0; }
  .go-deleted-item { flex-wrap: wrap; }
}

/* --- The way between pages, in the header ------------------------------------------ */
.go-nav { display: flex; gap: .25rem; padding: .2rem; border-radius: .8rem; background: rgba(255, 255, 255, .1); }
.go-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: .25rem .8rem;
  border-radius: .6rem;
  color: #e2e8f0;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
}
.go-nav a:hover { background: rgba(255, 255, 255, .12); }
.go-nav a[aria-current="page"] { background: #fff; color: var(--text); }

/* --- The stats page (pages/stats.js) ----------------------------------------------- */
.go-stats-wrap { overflow-x: auto; }
.go-stats-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.go-stats-table th {
  padding: .5rem .6rem;
  border-bottom: 1px solid var(--border);
  color: var(--label);
  font-size: .72rem;
  letter-spacing: .035em;
  text-align: left;
  text-transform: uppercase;
  vertical-align: bottom;
}
.go-stats-table thead th small { display: block; color: var(--muted); font-size: .75rem; font-weight: 500; letter-spacing: 0; text-transform: none; }
.go-stats-table td, .go-stats-table th[scope="row"] { padding: .55rem .6rem; border-bottom: 1px solid var(--go-row-line); vertical-align: middle; }
.go-stats-table th[scope="row"] { color: var(--text); font-size: .9rem; letter-spacing: 0; text-transform: none; }
.go-stats-who { min-width: 11rem; }
.go-stats-who .go-person { padding: 0; }
.go-stats-who small { display: block; font-weight: 500; }
.go-stats-team > * { border-top: 2px solid var(--border); border-bottom: 0; font-weight: 700; }
.go-val { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .45rem; white-space: nowrap; }
.go-num { font-size: 1rem; font-variant-numeric: tabular-nums; }
.go-of { color: var(--muted); font-size: .82rem; }
.go-planned { color: #94a3b8; font-size: .8rem; font-weight: 600; }
.go-no-aim { color: var(--muted); font-size: .8rem; font-weight: 500; }
.go-stats-table .go-meter, .go-stats-table .go-dots { margin-top: .3rem; }
.go-stats-problem { margin: 1rem 0; }
.go-stats-none { margin: 1rem 0; }
.go-stats-swatch.is-firm { background: var(--go-away-solid); }
.go-stats-swatch.is-planned { background: var(--go-away-pale); border: 1.5px dashed var(--go-away-solid); }
.go-stats-aim { display: inline-block; width: 2px; height: 1.1rem; background: var(--go-meter-aim); }

@media (max-width: 560px) {
  /* A card for each person, a line for each figure under their name. */
  .go-nav { padding: .15rem; }
  .go-nav a { min-height: 32px; padding: .2rem .6rem; font-size: .86rem; }
  .go-stats-wrap { overflow-x: visible; }
  .go-stats-table, .go-stats-table tbody, .go-stats-table tfoot, .go-stats-table tr, .go-stats-table th[scope="row"], .go-stats-table td { display: block; }
  .go-stats-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .go-stats-table tbody, .go-stats-table tfoot { display: flex; flex-direction: column; gap: .6rem; }
  .go-stats-table tfoot { margin-top: .6rem; }
  .go-stats-row, .go-stats-team { padding: .65rem .75rem; border: 1px solid var(--border); border-radius: .9rem; background: var(--card); }
  .go-stats-team { background: #f8fafc; }
  .go-stats-table th[scope="row"], .go-stats-table td { padding: 0; border: 0; }
  .go-stats-team > * { border-top: 0; }
  .go-stats-who { min-width: 0; margin-bottom: .35rem; }
  .go-stats-table td { display: grid; grid-template-columns: 5.2rem 1fr; align-items: center; gap: .1rem .5rem; padding: .3rem 0; border-top: 1px solid #f1f5f9; font-size: .86rem; }
  .go-stats-table td::before { content: attr(data-label); grid-row: 1 / span 2; color: var(--muted); font-size: .76rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
  .go-stats-table .go-meter { width: 100%; margin-top: .1rem; }
  .go-stats-table .go-dots { margin-top: .1rem; }
  .go-val { white-space: normal; }
}
