/* Blocks: the one definition of each building block on the style page
   (styles/show). Linked right after base.css, so a later file may only
   adjust a block in its own context (".today-band .btn"), never redefine
   it. Add a block here, and to the style page, before a screen uses it. */

/* Text. Running text stops at about 70 characters, however wide its card:
   a longer line is hard to follow back to its start. Rows, tables and
   facts span their block; sentences don't. */
/* Bullets in running text are capped too; a list with its own block (rows,
   lines, links) has a class and spans its card. */
:is(.helper, .notice p, .card-body > p, .card-body :is(ul, ol):not([class]) > li) { max-width: 70ch; }

/* Buttons. One primary per screen or card: the action that does the job,
   in yellow. A plain button (white, blue text) for the others, a text
   button for a way elsewhere, an icon button where a label would only
   repeat the icon. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--control-height);
  max-width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--blue);
  font-size: var(--text-control);
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  transition: background .15s;
}

.btn:hover { background: var(--blue-soft); }
.btn > svg { flex: none; }

.btn.primary { border-color: var(--yellow); background: var(--yellow); color: var(--navy-deep); font-weight: 700; }
.btn.primary:hover { border-color: var(--yellow-hover); background: var(--yellow-hover); }
.btn.primary:disabled { opacity: .5; }

.btn.danger { color: var(--problem); }
.btn:focus-visible, .text-btn:focus-visible, .icon-btn:focus-visible { outline: 3px solid var(--blue-line); outline-offset: 1px; }

.btn.full, .full { width: 100%; }

.small-btn { min-height: var(--control-height-sm); padding: 7px 11px; font-size: var(--text-small); }

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 36px;
  padding: var(--space-1) 0;
  border: 0;
  background: none;
  color: var(--blue);
  font-size: var(--text-control);
  font-weight: 650;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.text-btn > svg { flex: none; }

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: 0;
  border-radius: var(--radius);
  background: none;
  color: var(--muted);
}

.icon-btn:hover { background: var(--blue-soft); }

/* A finger needs the full height on a phone, whatever the button. */
@media (max-width: 700px) {
  .btn, .small-btn, .text-btn { min-height: var(--control-height); }
}

/* Money is a number to compare, never a badge: an amount that is late is
   the same number in bold; the line's mark says why. */
.late-amount { color: var(--ink); font-weight: 700; }

/* A contact: a phone number or an email, the same everywhere
   (DesignHelper#contact). A small muted icon, then the value in the colour
   of the line it sits on; tapping calls or writes. */
.contact { display: inline-flex; align-items: center; gap: var(--space-1); max-width: 100%; color: inherit; font-weight: inherit; overflow-wrap: anywhere; }
.contact svg { flex: 0 0 auto; color: var(--muted); }
a.contact:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
a.contact:hover svg { color: var(--blue); }

/* States (status_label): never a coloured pill. A normal state (paid,
   present, confirmed: "green") is plain grey text; waiting on you
   ("orange") is ink text after a clock outline; can't go ahead ("red") is
   bold ink after the red dot, the one red on screen; closed ("neutral") is
   grey. A team's name is not a state: its badge (team_badge) is the small
   square in its age group's blue, with the group's shape. "outline" is a
   state on navy. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  color: var(--muted);
  font-size: var(--text-small);
  font-weight: 600;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.badge.orange { color: var(--ink); }
.badge.orange::before { content: ""; flex: none; width: 9px; height: 9px; border: 1.5px solid var(--muted); border-radius: 50%; background: var(--clock-hands); }
.badge.red { color: var(--ink); font-weight: 700; }
.badge.red::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--problem-dot); }
.badge.neutral { color: var(--muted); }
.badge.team { flex: none; gap: 4px; padding: 2px 6px; border-radius: 5px; background: var(--surface-3); color: var(--navy-3); font-size: .6875rem; font-weight: 700; white-space: nowrap; }
.badge.team::before { font-size: .5625rem; line-height: 1; }
.badge.team.age-7 { background: var(--age-7-bg); color: var(--age-7); }
.badge.team.age-9 { background: var(--age-9-bg); color: var(--age-9); }
.badge.team.age-11 { background: var(--age-11-bg); color: var(--age-11); }
.badge.team.age-13 { background: var(--age-13-bg); color: var(--age-13); }
.badge.team.age-15 { background: var(--age-15-bg); color: var(--age-15); }
.badge.team.age-17 { background: var(--age-17-bg); color: var(--age-17); }
.badge.team.age-19 { background: var(--age-19-bg); color: var(--age-19); }
.badge.team:is(.age-7, .age-13, .age-19)::before { content: "\25CF"; }
.badge.team:is(.age-9, .age-15)::before { content: "\25A0"; }
.badge.team:is(.age-11, .age-17)::before { content: "\25B2"; }
.badge.outline { padding: 3px 9px; border: 1px solid rgb(255 255 255 / 25%); border-radius: 999px; background: rgb(16 42 125 / 14%); color: var(--on-navy); font-weight: 600; letter-spacing: .04em; }

/* A team's badge and the name it belongs to, on one line; the name wraps
   under the badge when the row runs out of room. */
.team-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); min-width: 0; }
.team-line > .badge { flex: none; }

/* A mark at a line's start, the same scale as the states: the red dot for
   a problem, a clock outline for waiting on you, grey otherwise. */
.tone-dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.tone-dot.orange { width: 9px; height: 9px; border: 1.5px solid var(--muted); background: var(--clock-hands); }
.tone-dot.red { background: var(--problem-dot); }

/* Card: a white card on the grey page holding one subject, sized to its
   content: a head (title and at most one action), then its body. Never a
   card inside a card. ".section-card" (shared/section_card) and ".panel"
   are the same card; a panel clips its content, for tables and row lists
   that run to its edges. Cards in a column keep one gap between them. */
.section-card, .panel { border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.panel { overflow: hidden; }
.content > :is(.section-card, .panel, [class*=layout], [class*=grid]) + :is(.section-card, .panel) { margin-top: var(--space-4); }

.card-head, .panel-head, .section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-3);
}

.card-head, .panel-head { padding: var(--space-4) 22px var(--space-3); }
.card-head:last-child { padding-bottom: var(--space-4); }
.section-head { margin-bottom: var(--space-3); }

.card-head h2, .panel-head h2, .section-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--ink);
  font-size: var(--text-heading);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.2px;
}

:is(.card-head, .panel-head, .section-head) > a.text-btn { padding: 0; }
:is(.card-head, .panel-head, .section-head) > a.text-btn:hover { text-decoration: underline; }

.card-body { padding: var(--space-3) 22px 22px; }
.card-note { max-width: 70ch; margin: 10px 0 0; color: var(--muted); font-size: var(--text-small); line-height: 1.5; }

@media (max-width: 700px) {
  .card-head, .panel-head { padding: var(--space-4) var(--space-4) var(--space-2); }
  .card-body { padding: var(--space-2) var(--space-4) var(--space-4); }
}

/* Page header (shared/page_head): the way back, what this is (the
   eyebrow), the title, an optional line under it, and the page's actions
   on the right. On a phone the actions go under the title, full width. */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4) var(--space-5);
  margin-bottom: var(--space-5);
}

.page-head > :first-child { flex: 1 1 20rem; min-width: 0; }
.page-head h1 { margin: 0; line-height: 1.15; overflow-wrap: anywhere; }
.page-head > :first-child > p { max-width: 70ch; margin-top: var(--space-2); color: var(--muted); font-size: var(--text-small); }

.head-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: var(--space-3); color: var(--blue); font-size: var(--text-small); font-weight: 600; }

/* The small line over a title that says what it belongs to: a season, a
   club, a team. Quiet, so the title leads. */
.eyebrow { margin-bottom: var(--space-2); color: var(--muted); font-size: var(--text-small); font-weight: 600; letter-spacing: .04em; }

.head-actions, .row-actions, .form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.head-actions { gap: var(--space-2); }
.head-actions form, .row-actions form { margin: 0; }

/* Page header with an avatar (shared/page_head with `avatar`): the head of
   a page about one person (the library's page_header · back · avatar).
   The way back, then the avatar at 72 (60 on a phone), the name and a line
   under it, and the page's actions on the right. On a phone the way back
   and the first action share the top line; "head-extra" actions wait for
   a laptop. */
.page-head.has-avatar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "back back" "main actions"; align-items: center; gap: 14px var(--space-5); }
.page-head.has-avatar > .head-back { grid-area: back; justify-self: start; margin: 0; }
.page-head-person { grid-area: main; display: flex; align-items: center; gap: 18px; min-width: 0; }
.page-head.has-avatar h1 { font-size: 1.875rem; letter-spacing: -.02em; }
.page-head-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 6px 0 0; color: var(--muted); font-size: var(--text-label); }
.page-head.has-avatar > .head-actions { grid-area: actions; }
.avatar.avatar-72 { width: 72px; height: 72px; overflow: hidden; background: var(--navy); color: var(--yellow); font-family: var(--display); font-size: 1.875rem; font-style: italic; font-weight: 400; }

@media (max-width: 700px) {
  .page-head.has-avatar { grid-template-areas: "back actions" "main main"; gap: var(--space-3); }
  .page-head.has-avatar > .head-back { font-size: var(--text-body); }
  .page-head-person { gap: 14px; }
  .page-head.has-avatar h1 { font-size: 1.5rem; }
  .page-head-meta { margin-top: 4px; font-size: var(--text-small); }
  .page-head.has-avatar .head-actions .btn { width: auto; min-height: 40px; }
  .head-extra { display: none; }
  .avatar.avatar-72 { width: 60px; height: 60px; font-size: 1.5rem; }
}

/* Hero (shared/hero): the one thing on the page that matters most now, on
   navy: a yellow line saying why it's first, the thing itself, a grey line
   of detail, and its actions (the yellow one does the job). At most one per
   page, under the header. */
.hero {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4) var(--space-6);
  margin-bottom: var(--space-5);
  padding: 22px var(--space-5);
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--navy);
  color: var(--on-navy);
}

.hero-main { flex: 1 1 24rem; min-width: 0; }
.hero-eyebrow { display: flex; align-items: center; gap: var(--space-2); margin: 0; color: var(--yellow); font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.hero-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
.hero-title { margin: 10px 0 0; color: var(--on-navy); font-size: 1.375rem; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; }
.hero-title a { color: inherit; }
.hero-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
/* A time or a score, big, in the display face. */
.hero-figure { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) 10px; margin-top: 10px; }
.hero-figure strong { font-family: var(--display); font-size: 2.75rem; font-style: italic; font-weight: 400; line-height: 1; }
.hero-note { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); margin: 6px 0 0; color: var(--on-navy-muted); font-size: var(--text-label); }
.hero .badge.team:is(.age-17, .age-19) { box-shadow: inset 0 0 0 1px #8fa6d4; }
.hero-actions { position: relative; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.hero-actions .btn { min-height: 48px; padding-inline: 18px; border-radius: 12px; font-size: var(--text-body); }
.hero-actions .btn:not(.primary) { border-color: transparent; background: var(--navy-2); color: var(--on-navy); }
.hero-actions .btn:not(.primary):hover { background: var(--navy-3); }
.hero a:focus-visible { outline-color: var(--yellow); }

@media (max-width: 700px) {
  .hero { padding: 18px; }
  .hero-title { font-size: 1.1875rem; }
  .hero-figure strong { font-size: 2.25rem; }
  .hero-actions { flex: 1 1 100%; }
  .hero-actions .btn { flex: 1 1 auto; min-height: var(--control-height-lg); }
}

/* Game hero (matches/game_hero): a game at the top of its page, on navy.
   The team and a grey line, the opponent big in the display face, the
   meeting time in yellow and the kickoff in white; the actions after. Once
   there is a score it is a scoreboard: home team left, the score yellow in
   the middle. */
.game-hero {
  position: relative;
  isolation: isolate;
  margin-bottom: var(--space-5);
  padding: 24px 28px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--navy);
  color: var(--on-navy);
}
.game-hero-eyebrow { margin-bottom: 10px; }
.game-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0; color: var(--on-navy-muted); font-size: var(--text-label); }
.game-hero .badge.team:is(.age-17, .age-19) { box-shadow: inset 0 0 0 1px #8fa6d4; }
.game-hero-body { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4) 32px; }
.game-hero-main { flex: 1 1 18rem; min-width: 0; }
.game-hero-lead { margin: 14px 0 0; color: var(--on-navy-muted); font-size: var(--text-body); }
.game-hero-opponent { margin: 8px 0 0; font-family: var(--display); font-size: 2.75rem; font-style: italic; font-weight: 400; line-height: 1.05; text-transform: uppercase; overflow-wrap: anywhere; }
.game-hero-lead + .game-hero-opponent { margin-top: 0; }
.game-hero-place, .game-hero-note { margin: 2px 0 0; color: var(--on-navy-muted); font-size: var(--text-body); }
.game-hero-times { display: flex; gap: 32px; }
.game-hero-times small { display: block; color: var(--on-navy-muted); font-size: .75rem; }
.game-hero-times strong { display: block; font-family: var(--display); font-size: 2.125rem; font-style: italic; font-weight: 400; line-height: 1.1; }
.game-hero-times .is-meeting { color: var(--yellow); }
.game-hero .hero-actions { flex: 0 0 auto; }
.game-hero-score { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 40px; margin: 18px 0 0; font-size: inherit; }
.game-hero-side { display: flex; flex-direction: column; text-align: right; }
.game-hero-side:last-child { text-align: left; }
.game-hero-crest { display: flex; margin-bottom: 6px; }
.game-hero-side:not(:last-child) .game-hero-crest { justify-content: flex-end; }
.game-hero-side:last-child .game-hero-crest { justify-content: flex-start; }
.game-hero-side b { font-size: 1.375rem; font-weight: 700; overflow-wrap: break-word; }
.game-hero-side small { margin-top: 2px; color: var(--on-navy-muted); font-size: .75rem; font-weight: 400; }
.game-hero-score .match-result { font-family: var(--display); font-size: 4.5rem; font-style: italic; font-weight: 400; line-height: 1; color: var(--yellow); white-space: nowrap; }
.game-hero-score .match-result span { padding: 0 .08em; color: inherit; }
.game-hero.is-scoreboard .game-hero-note { margin-top: var(--space-4); text-align: center; font-size: var(--text-label); }
.game-hero.is-scoreboard .hero-actions { justify-content: center; margin-top: var(--space-4); }
.game-hero a:focus-visible { outline-color: var(--yellow); }

@media (max-width: 700px) {
  .game-hero { padding: 20px; }
  .game-hero-opponent { font-size: 2.25rem; }
  .game-hero-times { gap: 28px; }
  .game-hero-times strong { font-size: 1.875rem; }
  .game-hero-body .hero-actions { flex: 1 1 100%; }
  .game-hero .hero-actions .btn { flex: 1 1 auto; min-height: 46px; }
  .game-hero-score { gap: 8px; margin-top: 14px; }
  .game-hero-side { text-align: left; }
  .game-hero-side:last-child { text-align: right; }
  .game-hero-side b { font-size: .8125rem; }
  .game-hero-score .match-result { font-size: 2.5rem; }
  .game-hero-side { min-width: 0; }
  .game-hero.is-scoreboard .game-hero-note { margin-top: 12px; text-align: left; }
}

/* Light pitch lines behind a navy block (a hero, a game's or a person's
   header): the halfway line, the centre circle and the spot. */
.pitch-lines { position: absolute; top: 0; bottom: 0; right: 22%; z-index: -1; width: 1px; background: rgb(255 255 255 / 7%); }
.pitch-lines::before, .pitch-lines::after { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 50%; }
.pitch-lines::before { width: 230px; height: 230px; border: 1px solid rgb(255 255 255 / 7%); }
.pitch-lines::after { width: 7px; height: 7px; background: rgb(255 255 255 / 12%); }
.hero { isolation: isolate; }

/* Section title: the small grey heading over a card or a list, outside it,
   with an optional link to everything on the right. */
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin: 0 var(--space-1) 10px; }
.section-title h2 { margin: 0; color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.section-title a { font-size: var(--text-label); font-weight: 600; }

/* A heading inside a row list, over the lines of one area. */
.row-group { margin: 0; padding: var(--space-3) 18px 6px; color: var(--faint); font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; list-style: none; }
.row-group:not(:first-child) { border-top: 1px solid var(--line-soft); }
.row-group + .row-item { border-top: 0; }

/* Ways to the page's related lists, under its header. */
.page-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
  margin: 0 0 var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--line);
}

.page-tools p { margin: 0; }
.page-tools .text-btn { padding: 0; }

@media (max-width: 700px) {
  .page-head { flex-direction: column; align-items: stretch; gap: var(--space-3); margin-bottom: var(--space-5); }
  .page-head > :first-child { flex: none; }
  .page-head h1, .content h1 { font-size: var(--text-title-phone); }
  .head-actions { width: 100%; }
  .head-actions > * { flex: 1 1 140px; }
  .head-actions .btn { width: 100%; }
  .page-tools { gap: var(--space-2) var(--space-4); }
}

/* Notice: what the reader must know about the whole page before acting,
   in a sentence or two, with at most one link. */
.notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px;
  margin-bottom: var(--space-5);
  padding: 18px 20px;
  border: 1px solid var(--blue-line);
  border-radius: var(--radius);
  background: var(--blue-soft);
  color: var(--blue);
}

.notice > div { flex: 1; min-width: 200px; }
.notice svg { flex-shrink: 0; }
.notice strong { color: var(--blue-deep); font-size: var(--text-small); font-weight: 650; }
.notice p { margin-top: 5px; color: var(--muted); font-size: var(--text-small); line-height: 1.6; }
.notice .text-btn { color: var(--blue); }

@media (max-width: 700px) {
  .notice { gap: 9px; padding: 14px; }
  .notice .text-btn { margin-left: 28px; }
}

/* Tabs: two or three views of one list. */
.tabs { display: flex; gap: 22px; max-width: 100%; margin: 20px 0; overflow-x: auto; border-bottom: 1px solid var(--line); }

.tabs a, .tabs button {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font-size: var(--text-body);
  font-weight: 600;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.tabs a.selected, .tabs button.selected { border-color: var(--blue); color: var(--blue); }

/* A tab's count: a neutral pill; the red dot only when the count is a
   problem, the clock when it waits on the viewer (tab_count). */
.tab-count { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: .75rem; font-weight: 700; }
.tab-count.problem::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--problem-dot); }
.tab-count.waiting::before { content: ""; width: 9px; height: 9px; border: 1.5px solid var(--muted); border-radius: 50%; background: var(--clock-hands); }

@media (max-width: 700px) {
  .tabs { gap: 18px; }
  .tabs a, .tabs button { min-height: 40px; font-size: var(--text-label); }
}

/* Choice chips (choice_chips): one choice among a few known options (a
   team, a payment method, a child), side by side as rounded chips; the
   chosen one is navy. Each chip is a link that applies its choice. More
   than six options is a select. ".compact" is the smaller size that sits
   beside a list's tabs, as its filter. */
.choice-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.choice-chips a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink); font-size: var(--text-label); font-weight: 600; white-space: nowrap; }
.choice-chips a:hover { background: var(--blue-soft); }
.choice-chips a.selected { background: var(--navy); box-shadow: none; color: var(--on-navy); }
.choice-chips.compact a { min-height: 32px; padding: 0 12px; box-shadow: inset 0 0 0 1px var(--line); font-size: var(--text-small); }

/* Progress: how much of a whole is done, one blue on a grey track; the
   overdue part is blue hatching. Under it, its legend in grey. On navy,
   white on the navy line. */
.progress { display: flex; height: 10px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.progress span { flex: none; }
.progress .done { background: var(--blue); }
.progress .late, .progress-key .late::before { background: repeating-linear-gradient(135deg, var(--blue) 0 3px, var(--blue-line) 3px 6px); }
.progress-key { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin: var(--space-2) 0 0; color: var(--muted); font-size: .75rem; }
.progress-key span { display: inline-flex; align-items: center; gap: 6px; }
.progress-key span::before { content: ""; width: 10px; height: 8px; border-radius: 2px; }
.progress-key .done::before { background: var(--blue); }
.progress-key .open::before { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-strong); }
.hero .progress { height: 8px; background: var(--navy-3); }
.hero .progress .done { background: #fff; }
.hero .progress .late { background: repeating-linear-gradient(135deg, #fff 0 3px, var(--navy-3) 3px 6px); }

/* Figures (shared/_figures): up to four big numbers side by side in one
   panel, each with what it is and a note; a figure that counts a list opens
   it over the whole cell, and a link in its note stays its own. Only where
   the number is the answer. Two to a row on phones. */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(13.75rem, 1fr)); }
.figure { position: relative; min-width: 0; margin: 0; padding: 20px 24px; border-left: 1px solid var(--surface-3); }
.figure:first-child { border-left: 0; }
.figure:has(.figure-open):hover { background: var(--surface-2); }
.figure small, .figure > span { display: block; color: var(--muted); font-size: var(--text-small); }
.figure strong { display: block; margin: 4px 0 2px; color: var(--ink); font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.figure-open { color: inherit; }
.figure-open::after { content: ""; position: absolute; inset: 0; }
.figure > span a { position: relative; z-index: 1; color: var(--blue); }
.figure > span a:hover { color: var(--blue-deep); }

/* Bar chart (shared/_bar_chart): one value a month, one blue on grey, the
   value over each bar, this month navy, months to come a grey dash; each
   bar opens its month. On phones the bars lie down, one line a month, and
   the months to come drop out. */
.bar-chart { display: grid; grid-template-columns: repeat(var(--bars, 12), minmax(0, 1fr)); gap: 10px; align-items: end; height: 220px; margin: 0; padding: 0; list-style: none; }
.bar-chart li { min-width: 0; height: 100%; }
.bar-cell { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; height: 100%; color: var(--muted); font-size: .75rem; }
a.bar-cell:hover .bar { background: var(--blue-deep); }
.bar-value { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar { width: 100%; max-width: 44px; height: calc(var(--size) * 1.6px); min-height: 2px; border-radius: 6px 6px 2px 2px; background: var(--blue); }
.bar-chart .is-now .bar { background: var(--navy); }
.bar-chart .is-now .bar-label { color: var(--ink); font-weight: 700; }
.bar-chart .is-future .bar { height: 4px; border-radius: 2px; background: var(--line); }
.bar-long { display: none; }

@media (max-width: 700px) {
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figure { padding: 14px 16px; border-left: 0; }
  .figure:nth-child(odd):not(:last-child) { border-right: 1px solid var(--surface-3); }
  .figure:nth-child(odd):nth-last-child(n+3), .figure:nth-child(even):nth-last-child(n+2) { border-bottom: 1px solid var(--surface-3); }
  .figure small, .figure > span { font-size: .75rem; }
  .figure strong { margin: 2px 0; font-size: 22px; }

  .bar-chart { display: block; height: auto; }
  .bar-chart li { height: auto; }
  .bar-cell { display: grid; grid-template-columns: 64px minmax(0, 1fr) 118px; gap: 10px; align-items: center; height: auto; padding: 8px 0; font-size: var(--text-small); color: var(--ink); }
  .bar-chart .is-future { display: none; }
  .bar-chart .bar-label { grid-row: 1; grid-column: 1; }
  .bar-chart .bar { grid-row: 1; grid-column: 2; width: calc(var(--size) * 1%); max-width: none; height: 10px; border-radius: 5px; }
  .bar-chart .bar-value { grid-row: 1; grid-column: 3; text-align: right; font-weight: 600; }
  .bar-short { display: none; }
  .bar-long { display: inline; }
}

/* More actions: the page's less frequent jobs, folded under one button
   beside its main action (a <details>, closed like the account menu). */
.more-menu { position: relative; width: fit-content; }
.more-menu > summary { list-style: none; cursor: pointer; }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-menu-panel { position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; display: grid; min-width: 240px; padding: var(--space-2); border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 18px 40px rgb(17 28 58 / 16%); }
.more-menu-panel :is(a, button) { display: flex; align-items: center; width: 100%; min-height: 40px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: var(--text-label); font-weight: 500; text-align: left; cursor: pointer; }
.more-menu-panel :is(a, button):hover { background: var(--surface-2); color: var(--ink); }
.more-menu-panel form { margin: 0; }
.more-menu-panel hr { margin: var(--space-1) 0; border: 0; border-top: 1px solid var(--line); }

/* Numbers: a few figures worth a glance, each opening the list it counts
   (a.stat). The label, the figure, a note. No colour of their own: a
   figure that needs doing says so in its words, or the band around it. */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: var(--space-3); margin: var(--space-5) 0; }

.stat {
  position: relative;
  display: block;
  padding: var(--space-4) 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  cursor: default;
}

a.stat { cursor: pointer; }
a.stat:hover { border-color: var(--line-strong); }
.stat:disabled { opacity: 1; }
.stat > div { display: flex; align-items: center; justify-content: space-between; gap: 5px; color: var(--muted); font-size: var(--text-small); }
.stat svg { color: var(--blue); }
.stat > strong { display: block; margin: 10px 0 6px; color: var(--navy-2); font-size: 28px; font-weight: 700; letter-spacing: -1px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat > small { color: var(--muted); font-size: var(--text-small); }

@media (max-width: 700px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: var(--space-4) 0; }
  .stat { padding: 14px var(--space-3); }
  .stat > strong { font-size: 24px; }
}

/* Empty state (shared/empty_state): what is missing, what will appear,
   and at most one action. */
.empty { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); padding: 2.5rem var(--space-5); text-align: center; }
.empty h3 { color: var(--muted); font-size: var(--text-subheading); font-weight: 500; }
.empty p { max-width: 32rem; color: var(--muted); font-size: var(--text-small); line-height: 1.8; }

/* Rows inside a card (.rows): lines that only show something, opening
   nothing (an order's items, a child's kit). Lines that open something are
   a row list (shared/_row). */
.rows { margin: 0; padding: 0; list-style: none; }
.rows li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 11px 0; }
.rows li + li { border-top: 1px solid var(--line); }
.rows strong { font-size: var(--text-body); }
.row-what { display: flex; flex-direction: column; gap: 3px; }
.row-what small { color: var(--muted); font-size: var(--text-small); }
.rows li > :is(.charge-what, .row-what) { flex: 1 1 12rem; min-width: 0; }
:is(.rows li, .settings-row, .card-head, .panel-head, .section-head) > :is(.btn, .small-btn, .text-btn, .badge, form) { flex: 0 0 auto; max-width: 100%; }

@media (max-width: 480px) {
  .rows li > :is(.charge-what, .row-what) { flex-basis: 100%; }
}

/* Toolbar (shared/list_toolbar): search and filters for the list under it,
   every control the same height; on a phone the search takes the row. */
.list-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 22px 0 var(--space-4); }
.list-toolbar > * { box-sizing: border-box; min-height: var(--control-height); }
.list-toolbar > .search { width: 340px; padding: 0 var(--space-3); }
.list-toolbar > .search input { height: 100%; padding: 0; }
.list-toolbar > select { width: auto; min-width: 150px; max-width: 220px; padding: 0 var(--space-6) 0 var(--space-3); font-size: var(--text-small); }
.list-toolbar > .view-switch { align-items: stretch; margin: 0 0 0 auto; padding: 3px; }
.list-toolbar > .view-switch a { display: flex; align-items: center; justify-content: center; padding: 0 var(--space-4); }

@media (max-width: 700px) {
  .list-toolbar { gap: var(--space-2); }
  .list-toolbar > .search { flex: 1 1 100%; width: auto; }
  .list-toolbar > select, .list-toolbar > .view-switch { flex: 1 1 140px; max-width: none; margin: 0; }
  .list-toolbar > .view-switch a { flex: 1; }
}

/* Facts (dl.facts, DesignHelper#fact): labels beside their values for one
   record; a missing value says so, with the action that adds it. */
.facts { display: grid; grid-template-columns: minmax(96px, max-content) minmax(0, 1fr); margin: 0; }
.facts dt, .facts dd { padding: 10px 0; border-top: 1px solid var(--line); }
.facts > :nth-child(-n+2) { border-top: 0; }
.facts dt { padding-right: var(--space-5); color: var(--muted); font-size: var(--text-small); }
.facts dd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; margin: 0; color: var(--ink); font-size: var(--text-body); font-weight: 600; overflow-wrap: anywhere; }
.facts dd a:not(.btn, .contact) { color: var(--blue); }
.fact-missing { color: var(--muted); font-weight: 500; }
.fact-missing a { color: var(--blue); font-weight: 700; }

/* Split facts (dl.facts.facts-split): figures and states in a card, the
   label on the left and the value on the right, as on a statement. */
.facts.facts-split { grid-template-columns: minmax(0, 1fr) auto; }
.facts-split dt, .facts-split dd { padding: 8px 0; border-top-color: var(--line-soft); font-size: var(--text-label); line-height: 1.3; }
.facts-split dt { padding-right: var(--space-3); }
.facts-split dd { justify-content: flex-end; text-align: right; font-variant-numeric: tabular-nums; }
.facts-split dd a:not(.btn, .contact) { font-weight: 600; }
.facts-split dd .badge { padding: 0; font-size: var(--text-label); line-height: 1.3; }
.facts-split dd > a { padding-block: 0; }

/* Card alert (p.card-alert): the one line in a card the reader must act
   on, on a quiet grey fill, led by its mark: the red dot ("red") when it
   is a problem, the clock ("orange") when it waits. A bold first part,
   then a grey line. */
.card-alert { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 var(--space-3); padding: 12px 14px; border-radius: var(--radius); background: var(--surface-3); color: var(--muted); font-size: var(--text-label); line-height: 1.4; }
.card-alert::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: 2px; border-radius: 50%; }
.card-alert.red::before { background: var(--problem-dot); }
.card-alert.orange::before { width: 12px; height: 12px; border: 1.6px solid var(--muted); box-sizing: border-box; background: var(--clock-hands); }
.card-alert strong { display: block; color: var(--ink); font-weight: 700; }

/* A card head's quiet note on the right, in place of its action: a
   count or a summary. */
.card-head-note { color: var(--muted); font-size: var(--text-label); }

/* Needs you (shared/needs): what this person has to do, most urgent first,
   as a row list whose lines lead with their dot and open where it is done.
   A plain white card: yellow is kept for the page's one main action. */
.needs .badge { margin: var(--space-1) var(--space-1) 0 0; }
.needs-note { padding: 0 22px var(--space-4); }
.needs-calm { display: flex; align-items: center; gap: 10px; margin: 0; padding: 6px 22px 18px; color: var(--ok); font-size: var(--text-body); font-weight: 600; }

@media (max-width: 700px) {
  .needs-calm { padding: var(--space-1) var(--space-4) var(--space-4); }
}

/* Where (shared/venue): one block for a place, wherever a game's or a
   training's venue shows. Google's embedded map on top,
   then the field, its address and the page's facts, how it was found, and
   the three map apps as equal buttons on one line at any width (a long app
   name is cut, never wrapped). The caller gives it its card (.venue-panel)
   and its heading. */
.venue-panel { padding: 0; overflow: hidden; }
.venue-map { position: relative; display: block; height: 160px; margin: 0; overflow: hidden; background: var(--surface-3); line-height: 0; }
.venue-map iframe { display: block; width: 100%; height: 100%; border: 0; }
/* For staff before there is a position: a quiet street grid, never a fake map. */
.venue-pending { display: flex; align-items: center; justify-content: center; line-height: 1.4; background-color: var(--surface-3); background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 32px 32px; }
.venue-pending span { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; padding: 6px var(--space-3); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: var(--text-small); text-align: center; }
.venue-body { padding: 18px 20px; }
.venue-body .facts dd small { display: block; color: var(--muted); font-size: var(--text-small); font-weight: 400; }
.venue-note { margin: var(--space-2) 0 0; color: var(--muted); font-size: var(--text-small); }
.venue-apps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); margin-top: var(--space-4); }
.venue-apps .btn, .hero-actions .venue-apps .btn:not(.primary) { min-width: 0; min-height: 44px; padding-inline: 6px; overflow: hidden; border-color: transparent; border-radius: 12px; background: var(--surface-3); color: var(--ink); font-size: var(--text-small); white-space: nowrap; text-overflow: ellipsis; }
/* Waze only on phones, where its link opens the app: on a computer (a fine
   pointer that can hover) its web map refuses the link, so Google and Apple
   share the row. */
@media (hover: hover) and (pointer: fine) {
  .venue-apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .venue-apps .venue-waze { display: none; }
}
/* The one "Como chegar" button (directions: true): the same light look, at
   the end of the field's row, with how the place was found under the field. */
.venue-body.has-directions { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: center; }
.venue-body.has-directions .venue-note { grid-column: 1; }
.venue-place { display: grid; gap: 2px; margin: 0; font-weight: 700; color: var(--ink); }
.venue-place small { color: var(--muted); font-size: var(--text-small); font-weight: 400; }
.venue-directions { grid-area: 1 / 2; min-height: 42px; white-space: nowrap; border-color: transparent; border-radius: 12px; background: var(--surface-3); color: var(--ink); }
.venue-directions:hover { background: var(--line); }
/* The same light buttons when the block opens inside a navy hero. */
.hero-actions .venue-apps .btn:not(.primary):hover { background: var(--line); }
@media (max-width: 700px) {
  .venue-map { height: 120px; }
  .venue-body { padding: var(--space-4); }
}

/* Forms: labels above fields (base.css), two columns where fields pair
   up, one on a phone. A helper line under what it explains, an error next
   to its field, and the actions last, after a divider. */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.form-grid > * { min-width: 0; }
.form-section { margin: 25px 0 0; font-size: var(--text-small); font-weight: 600; }
.helper { display: block; margin: 15px 0; color: var(--muted); font-size: var(--text-small); line-height: 1.7; }
.helper svg { margin-right: var(--space-1); vertical-align: middle; }

.checkbox { display: flex; flex-direction: row; align-items: flex-start; gap: 9px; font-size: var(--text-small); line-height: 1.5; }
.checkbox input { width: 15px; height: 15px; margin-top: .2em; accent-color: var(--blue); }

.form-actions { margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.form-actions .btn { flex: 0 1 auto; width: auto; }

[aria-invalid="true"] { border-color: var(--problem); outline: 2px solid var(--problem); outline-offset: 1px; }
.field-error { display: block; margin: var(--space-1) 0 0; color: var(--problem); font-size: var(--text-small); font-weight: 600; line-height: 1.4; }

/* What went wrong with a form (shared/form_errors), and other errors. */
.error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
  padding: 13px var(--space-4);
  border: 1px solid var(--problem-bg);
  border-radius: var(--radius);
  background: var(--problem-bg);
  color: var(--problem);
  font-size: var(--text-small);
}

.form-errors { display: block; margin-bottom: 18px; font-size: var(--text-body); line-height: 1.5; }
.form-errors ul { margin-top: var(--space-2); padding-left: 20px; }
.form-errors strong { display: block; }
.form-errors > ul:first-child:has(> li:only-child) { margin: 0; padding: 0; list-style: none; }

@media (max-width: 800px) {
  input:is([type=checkbox], [type=radio]), .checkbox input { width: 20px; height: 20px; }
  .checkbox { min-height: 24px; }
}

@media (max-width: 700px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 480px) {
  .form-actions > * { flex: 1 1 140px; }
  .form-actions .btn { width: 100%; }
}

/* Form panel (form_panel, board B-Painel): a short task that keeps the
   page underneath. On a computer a side panel 480px wide on the right; on
   a phone a sheet from the bottom with a grab handle. Its head: a grey
   line (the eyebrow, which may lead with a team badge), the title, and a
   grey 40×40 close button at the top right (44×44 on a phone). Its form's
   fields 16px apart, and the buttons at the panel's foot: Cancel, then
   the one yellow primary; on a phone only the primary, across the foot.
   Two ways in: the "modal" frame (shared/modal) loaded from the server,
   or a <dialog class="form-dialog"> in the page. Rules about a form's
   context are wrapped in :where() so a screen's own form can adjust them. */
.modal-backdrop { position: fixed; inset: 0; z-index: 110; display: flex; justify-content: flex-end; background: rgb(17 28 58 / 45%); }

.modal,
.form-dialog {
  width: 480px;
  max-width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  padding: 28px 32px;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  box-shadow: -12px 0 32px rgb(17 28 58 / 18%);
  color: var(--ink);
  overflow: auto;
}

.modal { position: relative; display: flex; flex-direction: column; }
.modal-backdrop .modal { outline: none; }
.form-dialog { margin: 0 0 0 auto; }
.form-dialog::backdrop { background: rgb(17 28 58 / 45%); }
/* On opening the panel, or its title, takes focus (modal and dialog
   controllers): it shows no ring; the close button and the fields do. */
.form-dialog [tabindex="-1"]:focus { outline: none; }

.panel-close { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--radius); background: var(--surface-3); color: var(--ink); }
.panel-close:hover { background: var(--blue-soft); }
.panel-close svg { stroke-width: 2.4; }
.close-modal { position: absolute; top: 28px; right: 32px; }

.modal > .eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); min-height: 20px; margin: 0 52px 0 0; color: var(--muted); font-size: var(--text-label); font-weight: 400; letter-spacing: 0; }
.modal > h2,
.form-dialog > h2 { margin: var(--space-1) 52px 0 0; color: var(--ink); font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; overflow-wrap: anywhere; }
.form-dialog > h2 { margin: 0 0 var(--space-4); }
.modal > h2 + p { margin: 20px 0 0; color: var(--muted); font-size: var(--text-label); line-height: 1.5; }
.form-dialog form[method=dialog] { margin-top: var(--space-3); }

:where(.modal) form { margin-top: 20px; }
:where(.modal) > form { display: flex; flex: 1 0 auto; flex-direction: column; gap: var(--space-4); }
:where(.modal > form) > :not(.form-actions) { margin-block: 0; }
.modal :is(input:not([type=checkbox], [type=radio], [type=hidden], [type=submit]), select, textarea) { font-size: var(--text-input); }
.modal input[type=file] { width: 100%; }
:where(.modal > form, .form-dialog form) > .form-actions { flex-wrap: nowrap; gap: 10px; padding-top: 20px; border-top: 0; }
:where(.modal > form) > .form-actions { margin-top: auto; }
:where(.modal, .form-dialog) .form-actions > .btn { flex: 1 1 0; }
:where(.modal, .form-dialog) .form-actions > .btn.primary { flex-grow: 2; }
.modal > form + .helper { margin: 10px 0 0; color: var(--faint); font-size: 12px; line-height: 1.5; }

@media (max-width: 700px) {
  .modal-backdrop { align-items: flex-end; }
  .modal-backdrop .modal,
  .form-dialog { inset: auto 0 0; width: 100%; max-width: none; height: auto; max-height: calc(100dvh - 28px); margin: 0; padding: 26px 20px 28px; border-radius: 20px 20px 0 0; box-shadow: 0 -12px 32px rgb(17 28 58 / 18%); }
  .modal::before,
  .form-dialog::before { content: ""; position: absolute; top: 10px; left: 50%; width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); transform: translateX(-50%); }
  .panel-close { width: 44px; height: 44px; }
  .close-modal { top: 26px; right: 20px; }
  .modal > .eyebrow { margin-right: 56px; }
  .modal > h2, .form-dialog > h2 { margin-right: 56px; font-size: 22px; letter-spacing: 0; }
  .form-dialog > h2 { margin-right: 0; }
  .modal > h2 + p { margin-top: 14px; }
  :where(.modal) form { margin-top: 16px; }
  :where(.modal) > form { gap: 14px; }
  .modal .form-actions > [data-action~="modal#close"] { display: none; }
  :where(.modal, .form-dialog) .form-actions > .btn.primary { min-height: 52px; font-size: var(--text-input); }
}

/* Table: columns with headers, for values people compare across records.
   It scrolls sideways inside its card when it must, with a soft shadow at
   the edge that has more; ".record-table" (components.css) turns each row
   into a small card of label and value on a phone. */
.table-panel {
  overflow: auto;
  background:
    linear-gradient(to right, var(--surface) 30%, transparent) left / 40px 100% local,
    linear-gradient(to left, var(--surface) 30%, transparent) right / 40px 100% local,
    radial-gradient(farthest-side at 0 50%, rgb(14 25 59 / 15%), transparent) left / 14px 100% scroll,
    radial-gradient(farthest-side at 100% 50%, rgb(14 25 59 / 15%), transparent) right / 14px 100% scroll,
    var(--surface);
  background-repeat: no-repeat;
}

/* A column heading, in every table: small grey capitals, spaced out, on
   the table's own white. */
thead th { background: none; color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

.table-panel td .badge,
/* A row's actions sit at its right end on a computer (the phone card
   lays them out on its own). */
@media (min-width: 1101px) {
  .table-panel td.record-actions { text-align: right; }
  .table-panel td.record-actions .row-actions { justify-content: flex-end; flex-wrap: nowrap; gap: var(--space-2); }
}

.table-panel td.record-actions :is(.btn, .text-btn, summary),
.table-panel td .row-actions :is(.btn, .text-btn) { white-space: nowrap; overflow-wrap: normal; }

.table-more { padding: 0 22px 18px; }

@media (min-width: 1101px) {
  .table-panel td.wrap-cell { min-width: 12rem; white-space: normal; }
}

/* Toast: what just happened, at the bottom, centred on the content. */
.flash-area { display: contents; }

.toast {
  position: fixed;
  bottom: 25px;
  left: calc(50% + 120px);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: 90vw;
  padding: 15px 22px;
  border: 1px solid var(--blue);
  border-radius: var(--radius);
  background: var(--navy-2);
  box-shadow: 0 8px 25px rgb(21 53 34 / 13%);
  color: var(--on-navy);
  font-size: var(--text-small);
  transform: translateX(-50%);
}

.toast svg { color: var(--yellow); }

@media (max-width: 1200px) {
  .toast { left: calc(50% + 100px); }
}

@media (max-width: 960px) {
  .toast { left: calc(50% + 90px); }
}

@media (max-width: 700px) {
  .toast { bottom: 18px; left: 50%; width: max-content; }
}

/* Row list: things of one kind people scan and open, one line each
   (shared/_row, the only way to draw one). The whole line opens its page:
   the title is the link, stretched over the line, which turns grey on hover
   and ends with the arrow. On the left the date tile, or the time under a
   day's heading; then the team and the title over one grey line; on the
   right a figure or one state badge, and a button only for a job other
   than opening. A line that opens a dialog has a button for its title,
   stretched the same way. A line without either is the same, without hover
   or arrow. */
.row-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  /* The grey of a hovered line keeps the list's rounded corners. */
  overflow: hidden;
}

/* Inside a card or panel the list is the card's own body: no second frame,
   and its lines run to the card's edges, like a table in a card. */
:is(.panel, .section-card, .card-body) > .row-list { border-radius: 0; box-shadow: none; }
.card-body > .row-list { margin-inline: -22px; }
.card-body > .row-list:last-child { margin-bottom: -22px; }
@media (min-width: 701px) { .card-body > .row-list > .row-item { padding-inline: 22px; } } /* in line with the card's title */
.section-card:has(> .card-body > .row-list) { overflow: hidden; }

@media (max-width: 700px) {
  .card-body > .row-list { margin-inline: calc(-1 * var(--space-4)); }
  .card-body > .row-list:last-child { margin-bottom: calc(-1 * var(--space-4)); }
}

.row-item { position: relative; display: flex; align-items: center; gap: var(--space-2) var(--space-4); padding: var(--space-3) var(--space-4); }
.row-item + .row-item { border-top: 1px solid var(--line-soft); }
.row-item:has(.row-open):hover { background: var(--surface-2); }
.row-item:has(.row-open:focus-visible) { outline: 2px solid var(--blue); outline-offset: -2px; }

.row-open { color: var(--ink); }
.row-open::after { content: ""; position: absolute; inset: 0; }
.row-open:focus-visible { outline: none; }
/* A title that opens a dialog (`dialog`) is a button: no button look. */
button.row-open { padding: 0; border: 0; background: none; text-align: left; }

.row-lead { display: flex; flex: 0 0 auto; align-items: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.row-main { display: grid; flex: 1 1 auto; gap: 2px; min-width: 0; }
.row-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); min-width: 0; }
.row-title { font-size: var(--text-body); font-weight: 600; overflow-wrap: anywhere; }
.row-main small { color: var(--muted); font-size: var(--text-small); line-height: 1.4; }
/* A short grey word after the title, on its line: an item's size. */
.row-head .row-tag { color: var(--muted); font-size: var(--text-small); }
.row-aside { display: flex; flex: 0 0 auto; align-items: center; gap: var(--space-2); font-size: var(--text-heading); font-weight: 700; font-variant-numeric: tabular-nums; }
.row-aside .badge { font-size: var(--text-small); }
.row-action { position: relative; z-index: 1; flex: 0 0 auto; }
.row-item > svg { flex: 0 0 auto; color: var(--faint); }
/* A cancelled session stays listed, struck through, so nobody turns up. */
.row-item.is-cancelled .row-title { text-decoration: line-through; color: var(--muted); }

/* A shirt number in a list (the library's shirt_number): the number in the
   display face on a small grey tile, at a row's start, as the Equipa boards
   draw the roster. A player who can't play keeps the same tile; an inactive
   one greys it with the rest of the line (.row-item.is-inactive). */
.shirt-number { display: flex; flex: none; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: var(--surface-3); color: var(--ink); font-family: var(--display); font-size: 1.0625rem; font-style: italic; font-weight: 400; line-height: 1; }
.row-item.is-inactive, .row-item.is-inactive :is(.row-title, .row-main small, .shirt-number) { color: var(--faint); }

/* A date in a list (the library's date_tile): the weekday over the day of
   the month. Today's tile is navy, "Hoje" in yellow; a cancelled day is
   struck through in grey; a date outside the season shows in full under
   the tile. */
.date-tile { position: relative; display: flex; flex: none; flex-direction: column; align-items: center; justify-content: center; width: 44px; height: 48px; border-radius: var(--radius); background: var(--surface-3); color: var(--ink); }
.date-tile small { color: var(--muted); font-size: .625rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.date-tile b { font-size: 1.125rem; line-height: 1.1; }
.date-tile.today { background: var(--navy); color: var(--on-navy); }
.date-tile.today small { color: var(--yellow); }
.date-tile.cancelled { color: var(--muted); }
.date-tile.cancelled b { text-decoration: line-through; }
.date-tile-out { position: absolute; top: 100%; margin-top: 2px; color: var(--muted); font-size: .625rem; white-space: nowrap; }

/* In a narrow list (a side column) a state goes under the title, in line
   with it, so the title keeps its width. */
.row-list { container-type: inline-size; }
@container (max-width: 460px) {
  .row-item { flex-wrap: wrap; }
  .row-main { flex: 1 1 0; }
  .row-aside { order: 3; flex-basis: 100%; }
  .row-item:has(> .row-lead) .row-aside { padding-left: calc(52px + var(--space-4)); }
}

/* On a phone the badge and the button go under the title; the arrow goes. */
@media (max-width: 700px) {
  .row-item { flex-wrap: wrap; padding: var(--space-3) 14px; }
  .row-main { flex-basis: 12rem; }
  .row-item > svg { display: none; }
}

/* The heading over a group of rows: a week's dates, a day. */
.list-heading {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 26px 0 var(--space-3);
  color: var(--muted);
  font-size: var(--text-small);
  font-weight: 700;
  letter-spacing: .6px;
}

.list-heading::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}

.list-group + .list-group .list-heading { margin-top: 18px; }



/* Segmented control (the library's segmented): one choice out of a few,
   side by side on a grey track, the chosen one filled navy with white text.
   It is a real form control: a fieldset of radio inputs, each in its label,
   so Tab reaches it, the arrows move the choice and a screen reader names
   the group by its legend. The input stays in the page, only invisible.
   On a phone the segments grow to a finger's height. A screen may colour a
   chosen segment by what it means (the roll call's states, training.css). */
.segmented { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 3px; min-width: 0; margin: 0; padding: 3px; border: 0; border-radius: var(--radius); background: var(--surface-3); }
.segmented label { position: relative; display: flex; align-items: center; justify-content: center; min-height: 32px; margin: 0; padding: 0 var(--space-1); border-radius: 7px; color: var(--muted); font-size: .75rem; font-weight: 600; line-height: 1.2; text-align: center; cursor: pointer; }
.segmented input { position: absolute; inset: 0; margin: 0; opacity: 0; pointer-events: none; }
.segmented label:hover { color: var(--ink); }
.segmented label:has(input:checked) { background: var(--navy); color: var(--on-navy); }
.segmented label:has(input:focus-visible) { outline: 3px solid var(--blue-line); outline-offset: 1px; }
.segmented:disabled label { cursor: default; opacity: .6; }

@media (max-width: 700px) {
  .segmented { gap: 4px; border-radius: 11px; }
  .segmented label { min-height: 38px; border-radius: 8px; font-size: var(--text-small); }
}
