:root {
  color-scheme: light;
  --ink: #2d3a4f;
  --muted: #617087;
  --accent: #ac3e27;
  --good: #18794b;
  --card: #fff;
  --line: #e5ebf2;
  font-family: "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: linear-gradient(180deg, #dff1ff, #fff7e8); min-height: 100vh; }
button, input, textarea { font: inherit; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(28px, 5vw, 42px); }
h2 { margin-bottom: 8px; }
.eyebrow { margin-bottom: 6px; color: var(--accent); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.account-body { display: grid; place-items: center; padding: 24px; }
.login-card { width: min(460px, 100%); padding: clamp(26px, 6vw, 48px); border-radius: 30px; background: var(--card); box-shadow: 0 20px 60px rgba(45, 58, 79, .18); text-align: center; }
.login-owl { font-size: 72px; margin-bottom: 12px; }
.login-card p:not(.eyebrow) { color: var(--muted); line-height: 1.55; }
.login-form { display: grid; gap: 10px; margin: 26px 0 18px; text-align: left; }
.login-form label { font-weight: 700; margin-top: 8px; }
.login-form input, .login-form textarea { width: 100%; min-height: 52px; padding: 12px 15px; border: 2px solid #cbd6e3; border-radius: 13px; background: #fff; color: var(--ink); }
.login-form textarea { resize: vertical; }
.login-form input:focus, .login-form textarea:focus { outline: 3px solid rgba(74, 163, 255, .35); border-color: #4aa3ff; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #286fae; outline-offset: 4px; }
.login-help { margin: 12px 0 20px; text-align: left; line-height: 1.55; }
.login-help summary { cursor: pointer; color: #286fae; font-weight: 700; padding: 10px 0; }
.login-help p { margin: 8px 0 0; }
[data-system-update] { margin-top: 12px; }
[data-update-status] { font-size: .9rem; margin-top: 8px; }
button:disabled { opacity: .65; cursor: wait; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 20px; border: 0; border-radius: 13px; font-weight: 800; text-decoration: none; cursor: pointer; }
.primary-button { background: var(--good); color: #fff; box-shadow: 0 5px 0 #167746; }
.primary-button:hover { filter: brightness(1.05); }
.primary-button:active { transform: translateY(3px); box-shadow: 0 2px 0 #167746; }
.secondary-button { background: #edf2f7; color: var(--ink); }
.login-form .primary-button { margin-top: 14px; }
.account-link { display: inline-block; margin: 4px 0 20px; color: #286fae; font-weight: 700; }
.login-card small { display: block; color: var(--muted); }
.form-error { padding: 12px 14px; border-radius: 12px; background: #ffe5df; color: #9c2f23; text-align: left; }
.parent-body { background: #f2f7fb; }
.parent-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px max(22px, calc((100vw - 1120px) / 2)); background: linear-gradient(135deg, #dff1ff, #fff7e8); }
.parent-header h1 { margin-bottom: 4px; }
.parent-header p:last-child { margin: 0; color: var(--muted); }
.parent-content { width: min(1120px, calc(100% - 32px)); margin: 28px auto 60px; display: grid; gap: 24px; }
.download-card, .child-card { background: var(--card); border-radius: 24px; padding: clamp(20px, 4vw, 32px); box-shadow: 0 8px 28px rgba(45, 58, 79, .1); }
.download-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; border: 2px solid #bfe6d2; }
.download-card p, .child-heading p { margin-bottom: 0; color: var(--muted); }
.download-button { flex: none; }
.unavailable { color: var(--muted); font-weight: 700; }
.child-heading { display: flex; align-items: center; gap: 16px; }
.child-heading > div:nth-child(2) { flex: 1; }
.child-heading h2 { margin-bottom: 4px; }
.child-avatar { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 50%; background: #fff1c9; font-size: 38px; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 26px 0; }
.summary-grid div { display: grid; gap: 5px; padding: 18px; border-radius: 16px; background: #f2f7fb; text-align: center; }
.summary-grid strong { font-size: 30px; }
.summary-grid span { color: var(--muted); }
.table-wrap { overflow-x: auto; }
.progress-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.progress-table th, .progress-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.progress-table th { color: var(--muted); }
.progress-table th:nth-child(n+2), .progress-table td:nth-child(n+2) { text-align: right; }
.download-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.download-actions .download-button { flex: 1 1 auto; min-width: min(230px, 100%); }
.metric-detail { margin: -8px 0 18px; color: var(--muted); font-weight: 700; }
.child-actions { display: flex; gap: 12px; }
.child-actions form { flex: 1; }
.child-actions button { width: 100%; }
@media (max-width: 680px) {
  .parent-header, .download-card { align-items: stretch; flex-direction: column; }
  .parent-header form, .parent-header button { width: 100%; }
  .child-heading { flex-wrap: wrap; }
  .child-heading .secondary-button { width: 100%; }
  .summary-grid { gap: 8px; }
  .summary-grid div { padding: 12px 6px; }
  .summary-grid strong { font-size: 25px; }
  .download-actions, .child-actions { flex-direction: column; }
}
