:root {
  --blue: #4ca1da;
  --action: #175f92;
  --yellow: #ffd500;
  --green: #a6c262;
  --ink: #203746;
  --muted: #637180;
  --line: #e1ebef;
  --paper: #f0f7fb;
  --white: #fff;
  --radius: 22px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: radial-gradient(ellipse at 95% 24%, #e4efdf80, transparent 45%), radial-gradient(ellipse at 8% 10%, #dcedf880, transparent 50%), var(--paper); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; font-size: 15px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
a, button, summary, input, select, textarea { touch-action: manipulation; }
:where(a, button, summary, input, select, textarea):focus-visible { outline: 3px solid var(--action); outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 34px; line-height: 1.2; letter-spacing: -1.3px; font-weight: 750; }
h2 { margin-bottom: 16px; font-size: 18px; line-height: 1.35; font-weight: 650; letter-spacing: -.4px; }
h3 { font-size: 15px; font-weight: 600; }
small { font-size: 12px; }
strong { font-weight: 650; font-variant-numeric: tabular-nums; }
img { max-width: 100%; }
.icon { display: inline-block; width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip { position: fixed; top: -80px; left: 16px; z-index: 50; padding: 12px; background: #fff; }
.skip:focus { top: 8px; }
.muted, .form-intro { color: var(--muted); }
.site-header { height: 82px; background: #ffffffd9; border-bottom: 1px solid #ffffff; }
.header-inner { height: 100%; max-width: 1240px; margin: auto; display: flex; align-items: center; gap: 22px; padding: 0 40px; }
.wordmark { flex: 0 0 146px; color: var(--action); font-size: 38px; font-weight: 850; font-style: italic; letter-spacing: -2.5px; line-height: 1; }
.wordmark span { color: #769839; }
.mobile-brandbar { display: none; }
.partners { display: flex; flex: 1; align-items: center; gap: 18px; }
.partners img, .partner-divider { flex-shrink: 0; }
.school-logo { width: 148px; height: 64px; object-fit: contain; }
.nuti-logo { width: 108px; height: 36px; object-fit: contain; }
.liikuma-logo { width: 128px; height: 54px; object-fit: contain; }
.partner-divider { height: 28px; width: 1px; background: var(--line); }
.languages { display: flex; align-items: center; gap: 2px; }
.languages button { width: 34px; height: 36px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; }
.languages button.active { background: #edf5fb; color: var(--action); }
.languages button:hover { background: var(--paper); }
.languages-mobile { display: none; }
.language-picker { position: relative; display: block; }
.language-picker select { width: 48px; min-height: 44px; padding: 0 17px 0 8px; border: 0; border-radius: 8px; background: #edf5fb; color: var(--action); appearance: none; font-size: 11px; font-weight: 650; }
.language-picker .icon { position: absolute; top: 17px; right: 6px; width: 10px; height: 10px; transform: rotate(90deg); pointer-events: none; color: var(--action); }
.notification-button { width: 36px; height: 40px; display: grid; place-items: center; position: relative; }
.notification-dot { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--action); top: 7px; right: 5px; border: 1px solid #fff; }
.account-menu { position: relative; }
.account-menu > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; list-style: none; font-size: 13px; font-weight: 500; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu > summary > .icon { width: 13px; height: 13px; transform: rotate(90deg); color: var(--muted); }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #e5efd2; color: #45602d; font-size: 14px; font-weight: 700; }
.account-name { max-width: 156px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-dropdown { position: absolute; top: 54px; right: 0; z-index: 40; width: 228px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 8px 24px #26323e12; }
.account-dropdown a, .account-dropdown button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 11px 12px; text-align: left; border: 0; border-radius: 5px; background: transparent; font-size: 14px; }
.account-dropdown a:hover, .account-dropdown button:hover { background: var(--paper); }
.account-dropdown form { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; background: #e8f2fa; color: var(--action); border-radius: 5px; font-size: 11px; }
.main-nav { display: flex; align-items: center; gap: 8px; max-width: 1240px; margin: auto; padding: 20px 40px 0; }
.main-nav a { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 11px 18px; border-radius: 24px; color: #526575; font-size: 14px; }
.main-nav a:hover { background: #ffffffa8; color: var(--ink); }
.main-nav a[aria-current] { background: var(--action); box-shadow: 0 5px 14px #175f9220; color: #fff; font-weight: 650; }
.main-nav .admin-nav { margin-left: auto; font-size: 13px; }
.container { width: 100%; max-width: 1240px; min-height: calc(100vh - 146px); margin: auto; padding: 28px 40px 56px; }
.auth-body .header-inner { max-width: 1200px; margin: auto; }
.auth-body .wordmark { flex-basis: 118px; }
.auth-body .container { width: 100%; max-width: 1200px; margin: 0 auto; }
.home-body { background: radial-gradient(ellipse at 4% 12%, #4ca1da24, transparent 52%), radial-gradient(ellipse at 96% 48%, #a6c2622b, transparent 52%), radial-gradient(ellipse at 18% 94%, #ffd50018, transparent 50%), #f8faf8; }
.sport-auth { background: radial-gradient(ellipse at 80% 42%, #e8f1dc85, transparent 48%), #f7faf9; }
.home-body .site-header, .sport-auth .site-header { background: #ffffffb3; border-color: #e8efed; }
.home-body .header-inner, .sport-auth .header-inner { max-width: 1240px; }
.home-body .home-main { max-width: 1240px; padding: 20px 40px 30px; min-height: calc(100svh - 82px); }
.home-hero { display: grid; grid-template-columns: .9fr 1.1fr; grid-template-rows: 1fr auto; align-items: center; min-height: min(720px, calc(100svh - 132px)); }
.home-copy { position: relative; z-index: 2; padding: 30px 0 42px 10px; }
.home-label { display: flex; align-items: center; gap: 9px; width: fit-content; margin-bottom: 25px; color: #506c66; font-size: 12px; font-weight: 600; }
.home-label .icon { width: 18px; height: 18px; color: #658335; }
.home-copy h1 { max-width: 470px; color: #164d70; font-size: clamp(52px, 5.5vw, 78px); font-weight: 800; line-height: 1.04; letter-spacing: -3.6px; text-wrap: balance; }
.home-copy > p { max-width: 330px; margin: 24px 0 30px; color: #5a706e; font-size: 17px; line-height: 1.65; text-wrap: balance; }
.home-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.home-actions .button { min-height: 52px; padding: 14px 26px; border-radius: 28px; font-size: 15px; }
.home-actions .home-join { background: var(--yellow); color: #263c42; box-shadow: 0 6px 18px #ddbc1226; }
.home-actions .home-join:hover { background: #ffe14a; }
.home-join .icon { width: 18px; height: 18px; }
.home-actions .home-login { background: transparent; border-color: #cbd9d9; color: #164d70; }
.home-actions .home-login:hover { background: #eaf1ef; }
.home-art { grid-column: 2; grid-row: 1; min-width: 0; overflow: clip; }
.sport-art { position: relative; width: 100%; aspect-ratio: 1; isolation: isolate; }
.sport-track { display: block; width: 100%; height: 100%; }
.sport-shoes { position: absolute; width: 106%; max-width: none; height: auto; left: -3%; top: 18%; transform: rotate(-9deg); filter: drop-shadow(0 24px 18px #22566c30); }
.home-details { grid-column: 1 / -1; display: flex; align-items: center; gap: 40px; margin: 6px 10px 0; padding: 24px 0 8px; border-top: 1px solid #dfe9e5; list-style: none; color: #5a706e; font-size: 13px; }
.home-details li { display: flex; align-items: center; gap: 9px; }
.home-details .icon { width: 18px; height: 18px; color: #658335; }
.beta-home { padding-bottom: 44px; }
.beta-home .home-main { min-height: calc(100svh - 126px); }
.beta-ticker { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; min-height: 44px; background: var(--action); color: #fff; }
.beta-ticker-window { flex: 1; min-width: 0; overflow: hidden; }
.beta-ticker-track { display: flex; width: max-content; animation: beta-scroll 32s linear infinite; }
.beta-ticker-copy { flex-shrink: 0; display: flex; align-items: center; justify-content: center; min-width: calc(100vw - 44px); padding: 0 28px; gap: 18px; white-space: nowrap; font-size: 12px; font-weight: 500; }
.beta-dot { width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: var(--yellow); }
.beta-pause { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border: 0; border-left: 1px solid #ffffff26; background: transparent; color: #fff; }
.beta-pause:hover { background: #ffffff15; }
.beta-pause:focus-visible { outline-color: #fff; outline-offset: -4px; }
.beta-play-symbol, .beta-pause[aria-pressed=true] .beta-pause-symbol { display: none; }
.beta-pause[aria-pressed=true] .beta-play-symbol { display: block; }
.beta-ticker.is-paused .beta-ticker-track { animation-play-state: paused; }
@keyframes beta-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .beta-ticker-track { animation: none; width: 100%; }
  .beta-ticker-copy { min-width: 0; width: 100%; padding: 10px 16px; gap: 10px; white-space: normal; font-size: 11px; }
  .beta-ticker-copy + .beta-ticker-copy, .beta-pause { display: none; }
}
.auth-stage { display: grid; grid-template-columns: minmax(0,1fr) 440px; align-items: center; gap: 44px; max-width: 1100px; margin: 16px auto 0; }
.auth-stage .auth-layout { width: 100%; margin: 0; }
.auth-art { min-width: 0; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 26px; }
.page-heading h1 { margin: 0; }
.page-heading p { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.page-date { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.page-date .icon { width: 16px; height: 16px; }
.eyebrow { display: block; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.heading-accent { color: var(--muted); font-weight: 400; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 9px; min-height: 46px; padding: 12px 20px; border: 1px solid transparent; border-radius: 14px; background: var(--action); color: #fff; font-size: 14px; font-weight: 650; line-height: 1.4; text-align: center; }
.button:hover { background: #104c77; }
.button-dark { background: var(--action); }
.button-outline { background: #fff; border-color: #c7d0da; color: var(--ink); }
.button-outline:hover { background: var(--paper); }
.button-danger { background: #aa3028; color: #fff; }
.button-danger:hover { background: #90261f; }
.today-panel { position: relative; isolation: isolate; min-height: 268px; padding: 30px 36px; border: 0; border-radius: 28px; overflow: hidden; color: #fff; background: radial-gradient(ellipse at 96% 4%, #73bcd9, transparent 56%), linear-gradient(112deg, #145b86 5%, #217dab 60%, #60acbb); box-shadow: 0 14px 32px #216b8f18; }
.today-panel::before { content: ''; position: absolute; z-index: -1; width: 310px; height: 310px; top: -95px; right: 150px; border-radius: 50%; border: 1px solid #ffffff26; }
.today-panel::after { content: ''; position: absolute; z-index: -1; width: 260px; height: 260px; right: -80px; bottom: -130px; border-radius: 50%; background: #bfd87252; }
.today-content { position: relative; z-index: 2; width: 59%; }
.today-art { position: absolute; z-index: 1; width: 41%; max-width: 430px; height: auto; right: 22px; top: 50%; transform: translateY(-50%) rotate(-6deg); filter: drop-shadow(0 18px 12px #11446130); pointer-events: none; }
.today-result h2 { margin-bottom: 12px; font-size: 14px; font-weight: 600; color: #e1f4ff; }
.today-value { display: flex; align-items: baseline; gap: 13px; margin-bottom: 8px; }
.today-value strong { font-size: clamp(48px, 5.2vw, 76px); font-weight: 750; line-height: 1.05; letter-spacing: -3px; overflow-wrap: anywhere; min-width: 0; }
.today-value > span { font-size: 15px; color: #e1f4ff; }
.today-status { font-size: 13px; color: #e1f4ff; }
.today-actions { display: flex; align-items: center; gap: 24px; margin-top: 24px; }
.today-actions .button { background: var(--yellow); color: #243c47; border-radius: 24px; box-shadow: 0 5px 12px #12496826; }
.today-actions .button:hover { background: #ffe24c; }
.today-actions .button:focus-visible { outline-color: #fff; }
.month-place { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #e1f4ff; }
.month-place strong { font-size: 20px; color: #fff; }
.saved-state { font-size: 14px; color: #fff; padding: 12px 18px; border-radius: 24px; background: #ffffff18; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin: 22px 0 28px; }
.metric { position: relative; min-width: 0; padding: 21px 22px; background: #ffffffeb; border: 1px solid #fff; border-radius: 20px; box-shadow: 0 5px 20px #22485d05; }
.metric-symbol { display: grid; place-items: center; width: 34px; height: 34px; position: absolute; right: 19px; top: 18px; border-radius: 12px; background: #e5f3fc; color: #276f9a; }
.metric .metric-symbol { font-size: inherit; }
.metric-symbol .icon { width: 18px; height: 18px; }
.metric-month .metric-symbol { background: #edf4dd; color: #5b772e; }
.metric-total .metric-symbol { background: #fff3cc; color: #8a7020; }
.metric-average .metric-symbol { background: #dff2ee; color: #327a6a; }
.metric-label, .metric > span:not(.metric-symbol) { padding-right: 38px; }
.metric > span, .metric-label > span { font-size: 13px; color: var(--muted); }
.metric strong { display: block; margin-top: 15px; font-size: clamp(24px,2.6vw,32px); line-height: 1.25; letter-spacing: -1px; overflow-wrap: anywhere; font-weight: 750; }
.metric small { display: block; margin-top: 4px; }
.metric-label { display: flex; align-items: center; gap: 5px; }
.metric-info { position: relative; }
.metric-info summary { display: grid; place-items: center; width: 28px; height: 24px; color: var(--muted); font-family: Georgia, serif; font-size: 14px; list-style: none; }
.metric-info summary::-webkit-details-marker { display: none; }
.metric-info p { position: absolute; right: -24px; top: 32px; z-index: 20; width: 280px; max-width: 80vw; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 6px 20px #26323e15; font-size: 13px; line-height: 1.6; }
.dashboard-grid { display: grid; grid-template-columns: 1.12fr 1fr; gap: 22px; align-items: start; }
.panel { padding: 26px; background: #ffffffeb; border: 1px solid #ffffff; border-radius: var(--radius); box-shadow: 0 6px 24px #22485d05; }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin: 0 0 12px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading > a { display: grid; place-items: center; width: 34px; height: 34px; margin-top: -2px; color: #526575; border-radius: 50%; background: #edf4f7; }
.section-heading > a:hover { background: var(--paper); color: var(--action); }
.section-subtitle { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.activity-row { display: grid; grid-template-columns: 1fr auto 18px; align-items: center; gap: 8px 12px; min-height: 57px; padding: 12px 0; font-size: 13px; }
.activity-row:last-child { border-bottom: 0; }
.activity-row > time { font-variant-numeric: tabular-nums; }
.activity-row > .icon { grid-column: 3; grid-row: 1; width: 14px; height: 14px; color: #83909d; }
.activity-row > strong { grid-column: 2; grid-row: 1; }
.activity-bar { grid-column: 1 / 3; grid-row: 2; display: block; width: 100%; height: 5px; overflow: hidden; }
.activity-track { fill: #edf5f9; }
.activity-fill { fill: #7ab6d6; }
.activity-status { grid-column: 1 / 3; grid-row: 3; margin-top: -2px; font-size: 12px; color: var(--muted); }
.activity-row:hover > time { color: var(--action); }
.leaders-panel { background: linear-gradient(155deg, #fffef5, #ffffff 62%); }
.leader-title { display: flex; align-items: center; gap: 12px; }
.leader-symbol { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: #fff0b5; color: #8b6a12; }
.leader-row { display: grid; grid-template-columns: 24px 38px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 17px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.leader-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #e7f1f8; color: #356783; font-weight: 650; }
.leader-place-1 .leader-avatar { background: #fff0b5; color: #88671a; }
.leader-place-3 .leader-avatar { background: #e9f0dc; color: #5b733e; }
.leader-row:last-child { border-bottom: 0; }
.leader-row > strong { text-align: right; }
.leader-row small { display: block; font-size: 11px; font-weight: 400; }
.leader-name { overflow-wrap: anywhere; }
.rank { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.rank-1 { color: #836400; }
.rank-2 { color: #526d80; }
.rank-3 { color: #59753e; }
.empty { margin: 0; padding: 22px 0; color: var(--muted); font-size: 14px; }
.pill { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 5px; background: #eef3e7; color: #44622f; font-size: 12px; }
.pill-warning { background: #fff5d5; color: #855000; }
.pending { color: #855000 !important; }
.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 550; }
input, select, textarea { width: 100%; min-width: 0; max-width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #bac5d0; border-radius: 6px; background: #fff; color: var(--ink); }
textarea { resize: vertical; }
input[type=checkbox] { width: 18px; height: 18px; min-height: 0; flex-shrink: 0; accent-color: var(--action); }
input[type=file] { padding: 8px; font-size: 13px; }
input[type=file]::file-selector-button { padding: 5px 8px; margin-right: 12px; border: 0; border-radius: 4px; background: var(--paper); color: var(--ink); }
.check-field { display: flex; align-items: start; gap: 10px; }
.check-field label { order: 2; font-weight: 400; }
.check-field input { order: 1; margin-top: 3px; }
.help { margin: 7px 0; color: var(--muted); font-size: 12px; }
.help ul { padding-left: 18px; }
.field-error, .errorlist { color: #a12a23; font-size: 13px; }
.errorlist { padding: 12px 16px; border-radius: 6px; background: #fff0ef; list-style: none; }
.form-layout { max-width: 510px; margin: 12px auto; }
.auth-layout { max-width: 440px; margin-top: 32px; }
.form-panel { padding: 34px; }
.form-panel h1 { margin-bottom: 26px; font-size: 26px; }
.form-intro { margin-top: -12px; margin-bottom: 24px; font-size: 13px; }
.form-panel form > .button { width: 100%; margin-top: 4px; }
.auth-links { margin-top: 24px; text-align: center; color: var(--action); font-size: 13px; }
.auth-links a:hover { text-decoration: underline; }
.recovery-help { margin-top: 18px; color: var(--muted); font-size: 12px; }
.recovery-help summary { width: fit-content; margin: auto; }
.recovery-help p { margin: 12px 0 0; text-align: center; }
.profile-links { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; }
.danger-link { color: #a12a23; }
.photo-hint { margin: -4px 0 24px; font-size: 13px; color: var(--muted); }
.photo-hint p { margin-bottom: 6px; }
.photo-hint small { font-size: 12px; }
.notice { padding: 12px 16px; border-radius: 6px; background: #fff7dd; color: #75531b; font-size: 13px; line-height: 1.6; }
.confirmation { max-width: 480px; margin: 14px auto; padding: 32px; text-align: center; }
.confirmation h1 { font-size: 25px; margin-bottom: 24px; }
.confirm-date { color: var(--muted); margin-bottom: 12px; font-size: 14px; }
.confirm-number { display: block; font-size: clamp(36px,7vw,64px); font-weight: 650; line-height: 1.15; letter-spacing: -1.5px; overflow-wrap: anywhere; }
.confirm-unit { margin: 6px 0 26px; color: var(--muted); font-size: 13px; }
.confirmation > .muted { margin-bottom: 26px; font-size: 13px; }
.confirmation form > .button { width: 100%; }
.back-link { display: inline-block; margin-top: 20px; color: var(--muted); font-size: 13px; }
.back-link:hover { text-decoration: underline; }
.messages { margin-bottom: 22px; }
.message { margin: 0 0 10px; padding: 12px 16px; border: 1px solid #c6dcc0; border-radius: 7px; background: #f2f8ef; font-size: 13px; }
.message.error { background: #fff0ef; border-color: #e6bbb7; }
.filters { display: flex; align-items: end; gap: 14px; margin-bottom: 22px; padding: 0; }
.filters .field { flex: 1; margin: 0; }
.filters .search-field { flex: 1.4; }
.filters > .button { min-width: 85px; }
.table-panel { padding: 0; overflow: hidden; }
.results-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.results-table th, .results-table td { padding: 17px 14px; text-align: right; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.results-table th:first-child, .results-table td:first-child, .results-table th:nth-child(2) { text-align: left; }
.results-table thead { background: #eaf4fa; color: #546e81; font-size: 12px; }
.results-table thead th { font-weight: 500; }
.results-table tbody th { font-weight: 500; }
.results-table small, .admin-row small, .notification-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 400; }
.results-table tr:last-child td, .results-table tr:last-child th { border-bottom: 0; }
.results-table .own-row { background: #f0f6fb; }
.you-tag { margin-left: 6px; padding: 2px 5px; border-radius: 4px; color: var(--action); background: #e0eef8; font-size: 10px; }
.mobile-results { display: none; }
.inline-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inline-form label { font-size: 13px; }
.inline-form input { width: auto; max-width: 100%; }
.history-row { display: flex; align-items: center; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.history-row:last-child { border: 0; }
.history-row time { font-variant-numeric: tabular-nums; }
.history-row strong { margin-left: auto; }
.history-row a { font-size: 12px; color: var(--action); }
.detail-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start; }
.stack { display: grid; gap: 20px; }
.timeline-item { margin-left: 3px; padding: 0 0 24px 18px; border-left: 2px solid var(--line); font-size: 14px; }
.timeline-item > small, .timeline-item > strong, .timeline-item > span { display: block; }
.timeline-item > small { color: var(--muted); font-size: 12px; }
.timeline-item > strong { margin: 5px 0; }
.timeline-item p { margin: 7px 0; white-space: pre-line; overflow-wrap: anywhere; }
.appeal { padding: 16px; margin-bottom: 20px; border-radius: 8px; background: var(--paper); overflow-wrap: anywhere; }
.appeal p { white-space: pre-line; }
.notification-row { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.notification-row:last-child { border: 0; }
.notification-row.unread { padding-left: 15px; border-left: 3px solid var(--blue); }
.notification-row a { align-self: center; color: var(--action); font-size: 13px; }
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.tabs a { min-height: 40px; padding: 9px 12px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 13px; }
.tabs a[aria-current] { color: var(--action); border-color: var(--blue); }
.tabs span { display: inline-block; margin-left: 4px; font-size: 11px; }
.admin-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 17px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.admin-row:last-child { border: 0; }
.admin-row strong { overflow-wrap: anywhere; }
.admin-row .button { min-height: 38px; padding: 8px 12px; font-size: 12px; }
.evidence-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.evidence-grid img { width: 100%; height: 230px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
.pagination { display: flex; justify-content: space-between; margin-top: 20px; color: var(--action); font-size: 13px; }
@media (min-width: 1680px) {
  .container { padding-top: 36px; }
}
@media (max-width: 1200px) {
  .wordmark { flex-basis: 110px; }
  .container { padding: 30px 26px 46px; }
  .header-inner { gap: 16px; padding: 0 24px; }
  .main-nav { padding-left: 26px; padding-right: 26px; }
  .account-name { max-width: 112px; }
  .metrics { gap: 14px; }
  .metric { padding: 20px 18px; }
  .dashboard-grid { gap: 20px; }
}
@media (max-width: 1080px) {
  .account-name { display: none; }
  .results-table { display: none; }
  .table-panel { background: transparent; border: 0; overflow: visible; }
  .mobile-results { display: block; }
  .mobile-results-heading { display: flex; justify-content: space-between; padding: 0 18px 10px 52px; color: var(--muted); font-size: 12px; }
  .mobile-result { margin-bottom: 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
  .mobile-result.own-row { background: #f0f6fb; }
  .mobile-result > summary { display: grid; grid-template-columns: 20px minmax(0,1fr) auto 14px; align-items: center; gap: 12px; min-height: 66px; padding: 14px 18px; list-style: none; }
  .mobile-result > summary::-webkit-details-marker { display: none; }
  .mobile-result > summary > .icon { width: 13px; height: 13px; color: var(--muted); }
  .mobile-result[open] > summary > .icon { transform: rotate(90deg); }
  .mobile-name { font-size: 14px; overflow-wrap: anywhere; }
  .mobile-score { text-align: right; font-size: 16px; }
  .mobile-score small { display: block; font-size: 10px; font-weight: 400; }
  .mobile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; margin: 0 18px 18px 50px; padding-top: 16px; border-top: 1px solid var(--line); }
  .mobile-stats dt { margin-bottom: 4px; font-size: 12px; color: var(--muted); }
  .mobile-stats dd { margin: 0; font-size: 14px; font-variant-numeric: tabular-nums; }
  .mobile-stats small { display: block; font-size: 11px; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .site-header { height: auto; }
  .header-inner { min-height: 104px; height: auto; padding: 12px 24px 10px; flex-wrap: wrap; gap: 5px 14px; }
  .wordmark { flex: 1; }
  .auth-body .wordmark { flex: 1; }
  .partners { order: 5; flex: 0 0 100%; justify-content: center; }
  .home-copy h1 { font-size: 58px; letter-spacing: -2.5px; }
  .home-copy > p { font-size: 15px; }
  .home-actions .button { padding: 12px 20px; min-height: 48px; font-size: 14px; }
  .auth-stage { grid-template-columns: minmax(0,1fr) 410px; gap: 12px; }
  .main-nav a { padding: 10px 14px; font-size: 13px; }
  .main-nav .admin-nav { padding: 10px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .today-art { width: 41%; right: 10px; }
  .today-panel { padding: 28px; }
  .today-actions { gap: 16px; }
  .month-place { flex-direction: column; align-items: start; gap: 0; }
}
@media (max-width: 720px) {
  .site-header { height: auto; }
  .header-inner { min-height: 68px; height: auto; padding: 10px 12px; flex-wrap: nowrap; gap: 12px; }
  .site-header .wordmark, .site-header .notification-button, .site-header .account-menu { display: none; }
  .partners { order: 0; flex: 1; min-width: 0; max-width: 420px; justify-content: flex-start; gap: 8px; }
  .partners img { flex: 1 1 0; min-width: 0; width: 0; height: 46px; }
  .partners .school-logo { flex-grow: 1.2; max-width: 120px; }
  .partners .nuti-logo { max-width: 108px; }
  .partners .liikuma-logo { flex-grow: 1.1; max-width: 124px; }
  .partner-divider { display: none; }
  .mobile-brandbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 16px 4px; }
  .mobile-brandbar .wordmark { flex: 0 0 auto; font-size: 54px; letter-spacing: -3.5px; }
  .auth-body .mobile-brandbar { justify-content: center; }
  .mobile-account { display: flex; align-items: center; gap: 12px; }
  .languages { gap: 0; }
  .languages-desktop { display: none; }
  .languages-mobile { display: block; flex-shrink: 0; margin-left: auto; }
  .languages button { width: 30px; height: 34px; font-size: 11px; }
  .notification-button { width: 28px; }
  .account-menu > summary { gap: 0; min-height: 36px; }
  .account-menu > summary > .icon { display: none; }
  .avatar { width: 32px; height: 32px; }
  .account-dropdown { top: 44px; }
  .main-nav { position: fixed; z-index: 30; top: auto; bottom: 0; left: 0; right: 0; width: 100%; min-height: 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); padding: 7px 5px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fffffffa; box-shadow: 0 -3px 20px #24485a09; }
  .main-nav a { display: flex; flex-direction: column; justify-content: center; gap: 5px; margin: 0; padding: 7px 2px; min-height: 52px; font-size: 10px; line-height: 1.2; border-radius: 14px; }
  .main-nav a[aria-current] { background: #e5f2fb; color: var(--action); box-shadow: none; }
  .main-nav a .icon { width: 20px; height: 20px; }
  .main-nav .admin-nav { display: none; }
  .container { width: 100%; margin: 0; min-height: 0; padding: 24px 16px 98px; }
  .auth-body .container { padding: 26px 16px 40px; }
  .auth-body .mobile-brandbar .wordmark { flex: 0 0 auto; }
  .home-body .home-main { padding: 24px 22px 24px; }
  .home-hero { grid-template-columns: 1fr; grid-template-rows: auto auto auto; min-height: 0; }
  .home-copy { padding: 8px 4px 0; }
  .home-label { margin-bottom: 18px; font-size: 11px; }
  .home-copy h1 { max-width: 320px; font-size: 51px; line-height: 1.05; letter-spacing: -2.4px; }
  .home-copy > p { max-width: 300px; margin: 18px 0 22px; font-size: 14px; text-wrap: pretty; }
  .home-actions { gap: 10px; }
  .home-actions .button { min-height: 46px; padding: 12px 23px; font-size: 14px; }
  .home-art { grid-column: 1; grid-row: 2; width: 100%; max-width: 390px; margin: -4px auto -12px; }
  .home-details { justify-content: space-between; gap: 12px; margin: 0; padding: 18px 0 0; font-size: 10px; }
  .home-details li { gap: 6px; }
  .home-details .icon { width: 15px; height: 15px; }
  .auth-stage { display: block; margin: 0 auto; }
  .auth-art { display: none; }
  h1 { font-size: 28px; }
  .page-heading { margin-bottom: 22px; gap: 12px; }
  .page-heading > .button { min-height: 40px; padding: 9px 12px; font-size: 12px; }
  .page-date { font-size: 12px; }
  .today-panel { min-height: 252px; padding: 24px; border-radius: 24px; }
  .today-content { width: 100%; }
  .today-result { padding-right: 136px; }
  .today-result h2 { margin-bottom: 10px; }
  .today-art { width: 48%; right: 0; top: 39px; transform: rotate(-7deg); }
  .today-value { flex-wrap: wrap; gap: 4px; }
  .today-value strong { width: 100%; font-size: 50px; letter-spacing: -2px; }
  .today-value > span { font-size: 13px; }
  .today-status { font-size: 12px; }
  .today-actions { justify-content: space-between; gap: 14px; margin-top: 24px; }
  .today-actions .button { font-size: 13px; padding: 12px 16px; }
  .month-place { flex-direction: column; align-items: end; gap: 0; font-size: 10px; }
  .month-place strong { font-size: 18px; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); margin: 16px 0 22px; gap: 12px; }
  .metric { padding: 18px; border-radius: 18px; }
  .metric > span:not(.metric-symbol), .metric-label { display: flex; min-height: 36px; align-items: start; padding-right: 26px; }
  .metric > span, .metric-label > span { font-size: 12px; line-height: 1.5; }
  .metric strong { margin-top: 6px; font-size: 28px; }
  .metric-symbol { width: 28px; height: 28px; top: 16px; right: 13px; border-radius: 10px; }
  .metric-symbol .icon { width: 16px; height: 16px; }
  .metric-average .metric-symbol { display: none; }
  .metric-average .metric-label { padding-right: 0; gap: 0; }
  .metric-info summary { width: 22px; }
  .metric-info p { right: -8px; }
  .dashboard-grid { gap: 18px; }
  .panel { padding: 22px 20px; border-radius: 20px; }
  .section-heading h2 { font-size: 16px; }
  .activity-row, .leader-row { font-size: 13px; }
  .leader-row { gap: 8px; }
  .leader-row { grid-template-columns: 18px 32px minmax(0,1fr) auto; }
  .leader-avatar { width: 30px; height: 30px; font-size: 12px; }
  .leader-row > strong { font-size: 14px; }
  .form-layout, .auth-layout { margin: 0 auto; }
  .form-panel { padding: 24px; }
  .form-panel h1 { font-size: 24px; }
  .profile-links { flex-wrap: wrap; }
  .confirmation { padding: 26px 22px; margin-top: 0; }
  .confirmation h1 { font-size: 23px; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .filters .search-field { grid-column: 1; }
  .filters > .button { align-self: end; }
  .field label { font-size: 12px; }
  .mobile-result > summary { padding: 14px; gap: 10px; }
  .mobile-name { font-size: 13px; }
  .mobile-stats { margin-left: 44px; }
  .mobile-score { font-size: 15px; }
  .mobile-results-heading { padding-left: 44px; }
  .table-panel { padding: 0; }
  .history-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; font-size: 13px; }
  .history-row strong { grid-column: 2; grid-row: 1; }
  .history-row a { grid-column: 2; text-align: right; }
  .history-row .pill { justify-self: start; }
  .history-row .muted { grid-column: 1; font-size: 12px; }
  .page-heading:has(.inline-form) { flex-wrap: wrap; }
  .inline-form { width: 100%; }
  .inline-form input { flex: 1; }
  .admin-row { flex-wrap: wrap; gap: 12px; }
  .notification-row { font-size: 13px; }
  .tabs { gap: 2px; }
  .tabs a { font-size: 12px; padding: 9px; }
  .evidence-grid img { height: 170px; }
}
@media (prefers-reduced-motion: no-preference) {
  a, button { transition: background-color .15s ease, color .15s ease, box-shadow .15s ease; }
}
