/* The parent's class card, in the design's dark look with a green accent. */
@font-face { font-family: Figtree; src: url('../fonts/Figtree-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: Figtree; src: url('../fonts/Figtree-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: Figtree; src: url('../fonts/Figtree-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
:root {
  --bg: #0B0C0D;
  --surface: #1B1C1E;
  --sheet: #1E1F22;
  --raised: #26272A;
  --border: #2B2C30;
  --primary: #16D488;
  --on-primary: #041D12;
  --text: #FFFFFF;
  --muted: #A1A1AA;
  --selected: #1A4033;
  --success: #1A4033;
  --success-text: #16D488;
  --warning: #3E3423;
  --warning-text: #F5B43C;
  --warning-border: #7B5E2C;
  --danger: #F05D5E;
  --grey: #26272A;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Figtree, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.4;
}
.page { max-width: 480px; margin: 0 auto; padding: 20px 16px 32px; }
h1 { font-size: 26px; font-weight: 700; margin: 0; }
h2 { font-size: 18px; font-weight: 700; margin: 0 0 4px; }
p { margin: 0; }
button { font: inherit; cursor: pointer; }
a { color: var(--primary); }
.muted { color: var(--muted); font-size: 13px; }
.small { font-size: 12px; }
.danger { color: var(--danger); }
.good { color: var(--success-text); }
.owed { color: var(--warning-text); margin-top: 8px; }
.warn { color: var(--warning-text); }
.head { margin: 4px 0 18px; }
.head .brand { display: block; width: 74px; height: 20px; margin-bottom: 22px; background-position: left center; }
.head h1 { margin-top: 4px; }
.head.pro { display: flex; align-items: center; gap: 14px; }
.logo {
  flex: none; width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, #16D488, #0E7C9E); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 20px;
}
.avatar {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--selected); color: var(--primary);
  display: grid; place-items: center; font-weight: 700;
}
.note { padding: 12px 14px; border-radius: 16px; margin-bottom: 10px; font-size: 13px; background: var(--surface); }
.note.warning { background: var(--warning); color: var(--text); }
.note.danger { background: rgba(230, 80, 80, .16); border: 1px solid rgba(230, 80, 80, .45); color: var(--text); }
.note.danger .small { margin-top: 4px; opacity: .85; }
.note.info { background: rgba(80, 120, 230, .16); border: 1px solid rgba(80, 120, 230, .4); color: var(--text); }
.note.ok { background: rgba(60, 200, 130, .10); border: 1px solid rgba(60, 200, 130, .45); color: var(--text); }
.note.ok .small { margin-top: 4px; opacity: .85; }
.note.grey { background: var(--grey); }
.note.success { background: var(--success); }
.card {
  background: var(--surface); border-radius: 20px;
  padding: 16px; margin-bottom: 12px;
}
.card.fee { background: var(--surface); border: 1px solid var(--warning-border); }
.card.fee .muted { margin-top: 4px; }
.card.paid { background: var(--success); }
.card.iconed { display: flex; gap: 14px; align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.mark {
  flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--raised);
  display: grid; place-items: center; color: var(--text);
}
.mark.good { background: rgba(22, 212, 136, .18); color: var(--primary); }
.mark.round { border-radius: 50%; background: var(--selected); color: var(--primary); }
.mark.big { width: 72px; height: 72px; }
.mark.big svg { width: 34px; height: 34px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.button svg { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; }
.huge { font-size: 32px; font-weight: 700; line-height: 1.15; }
.row.top { align-items: center; margin-top: 2px; }
.pill {
  display: inline-block; border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 600;
  background: var(--raised); color: var(--muted); white-space: nowrap;
}
.pill.good { background: rgba(22, 212, 136, .16); color: var(--primary); }
.pill.warn { background: var(--warning); color: var(--warning-text); }
.pill.danger { background: rgba(240, 93, 94, .16); color: var(--danger); }
.squares { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.squares span { flex: 1 0 22px; max-width: 40px; height: 22px; border-radius: 6px; background: var(--raised); }
.squares span.on { background: var(--primary); }
.squares span.miss { background: rgba(230, 80, 80, .75); }
.card.list { padding: 6px 16px; }
.card.list > .link { margin-bottom: 10px; }
.row.line { padding: 12px 0; margin: 0; align-items: center; }
.row.line + .row.line { margin-top: 0; padding-top: 12px; border-top: 1px solid var(--border); }
button.item {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 0;
  background: none; border: 0; color: var(--text); text-align: left;
}
button.item + button.item { border-top: 1px solid var(--border); }
button.item .strong, button.item .muted { display: block; }
.chev { color: var(--muted); }
.card.ask { padding: 22px 18px; }
.card.ask h2 { font-size: 22px; margin: 16px 0 6px; }
.thanks { text-align: center; padding: 22vh 8px 0; }
.thanks .mark { margin: 0 auto 22px; }
.thanks h1 { margin-bottom: 8px; }
.thanks .button { margin-top: 28px; }
.row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.row + .row { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.big { font-size: 30px; font-weight: 700; }
.strong { font-weight: 600; }
.segments { display: flex; gap: 4px; margin: 10px 0; }
.segments span { flex: 1; height: 6px; border-radius: 3px; background: var(--raised); }
.segments span.on { background: var(--primary); }
.card.frozen .segments span.on { background: var(--muted); }
.card.frozen { color: var(--muted); }
.link {
  background: none; border: 0; padding: 0; color: var(--primary);
  font-size: 14px; font-weight: 600; text-align: left;
}
.center { display: block; width: 100%; text-align: center; }
a.link { text-decoration: none; }
.button {
  display: block; width: 100%; padding: 15px; border-radius: 999px;
  border: 0; background: var(--primary); color: var(--on-primary); font-weight: 600;
  text-align: center; text-decoration: none; margin-top: 12px;
}
.button.outline { background: var(--raised); color: var(--text); border: 0; }
.button:disabled { opacity: .5; }
.copy {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: var(--raised); border-radius: 12px;
  padding: 10px 12px; margin-top: 8px; font-size: 13px;
}
.copy span { overflow-wrap: anywhere; }
.footer { text-align: center; margin-top: 28px; color: var(--muted); }
.footer a { text-decoration: none; }
.footer .kept { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 6px; }
.wordmark {
  display: inline-block; width: 46px; height: 14px;
  background: url('../pakka-wordmark.svg') center / contain no-repeat;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chip {
  border: 1px solid transparent; background: var(--raised); color: var(--text);
  border-radius: 999px; padding: 8px 14px; font-size: 13px;
}
.chip.on { background: var(--selected); border-color: var(--primary); color: var(--primary); }
textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 12px; margin-top: 8px; resize: vertical;
}
textarea:focus { outline: none; border-color: var(--primary); }
.label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 20px 0 8px 4px; }
.backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  display: flex; align-items: flex-end; justify-content: center; z-index: 10;
}
.panel {
  background: var(--sheet); width: 100%; max-width: 480px; max-height: 88vh; overflow: auto;
  border-radius: 24px 24px 0 0; padding: 22px 16px 24px;
}
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  background: var(--raised); color: var(--text); border-radius: 12px; padding: 10px 16px;
  font-size: 13px; z-index: 20;
}

/* GO.4 · The batch page: one row per child, and the last-4 check. */
button.row.child {
  width: 100%; font: inherit; color: var(--text); background: none; border: 0;
  padding: 12px 0; text-align: left; cursor: pointer; align-items: center;
}
button.row.child + button.row.child { border-top: 1px solid var(--border); }
#last4 {
  width: 100%; font: inherit; font-size: 22px; letter-spacing: .3em; text-align: center;
  color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px;
}
#last4:focus { outline: none; border-color: var(--primary); }

/* N4.2 · A way to pay that copies on a tap. */
button.card.tap { width: 100%; border: 0; color: var(--text); text-align: left; font: inherit; }
button.card.tap .strong, button.card.tap .muted { display: block; }
.card.iconed { align-items: center; }

/* Class updates from the teacher. */
.update { padding: 12px 0; }
.update + .update { border-top: 1px solid var(--border); }
.update p:first-child { white-space: pre-line; }
.update-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.update-head p { margin: 0; }
.card.iconed .button { margin-top: 12px; }

/* C.2 · The make-up switch in the can't-make-it sheet. */
.toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; margin-top: 12px; text-align: left; font: inherit; color: inherit; cursor: pointer;
}
.switch {
  position: relative; flex: none; width: 46px; height: 26px; border-radius: 13px;
  background: var(--surface-raised, #2a2a2e);
}
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; transition: transform .15s;
}
.switch.on { background: var(--primary, #4fd08b); }
.switch.on::after { transform: translateX(20px); }

/* W.C2 · The one-time "Turn on updates" card, at the top. */
.card.ask { border: 1px solid var(--primary, #4fd08b); background: rgba(79, 208, 139, .08); }
.card.ask .button { margin-top: 12px; width: auto; padding: 0 22px; }
.card.step { display: flex; gap: 12px; align-items: flex-start; }
.card.step .num {
  flex: none; width: 24px; height: 24px; border-radius: 50%; text-align: center; line-height: 24px;
  font-size: 12px; font-weight: 600; background: rgba(79, 208, 139, .16); color: var(--primary, #4fd08b);
}

/* PC.B2 · Offline: paying waits for the internet. */
.offline [data-action="pay"], .offline [data-action="i-paid"], .offline [data-action="upi-pick"] { pointer-events: none; opacity: .45; }
