
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@600;700;800&display=swap");
:root {
  --bg: #f1efe7;
  --surface: #fbfaf6;
  --ink: #1b2732;
  --muted: #5d6b76;
  --line: rgba(27,39,50,.14);
  --sea: #0e7c8a;
  --sea-strong: #0a5f6b;
  --land: #b07d2c;
  --good: #2b8a4e;
  --bad: #c0392b;
  --r: 16px;
  --shadow: 0 1px 2px rgba(27,39,50,.05), 0 10px 28px rgba(27,39,50,.07);
  color-scheme: light;
}
html, body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y;
}
body {
  font: 17px/1.45 Nunito, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
main { max-width: 720px; margin: 0 auto; padding: 28px 18px 64px; }
h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; text-wrap: balance; }
p { margin: 8px 0; }

body.login { height: 100vh; height: 100dvh; overflow: hidden; overscroll-behavior: none; touch-action: none; display: flex; flex-direction: column; }
.login-bar { flex: none; height: 0; background: var(--bg); }
body.login main {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  max-width: 420px; width: 100%; margin: 0 auto;
  padding: 24px 18px calc(24px + env(safe-area-inset-bottom, 0px));
}
body.login h1 { margin-bottom: 8px; }
body.login form { margin-top: 16px; width: 100%; }

.sum { color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.tries { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 18px; }
.try { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.try-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.try .when { color: var(--muted); font-size: 14px; }
.try .pct { color: var(--sea); font-size: 22px; line-height: 1; }
.try.open { border-style: dashed; background: transparent; }
.card-text { min-width: 0; }
.card > .btn { flex: none; white-space: nowrap; }
.card-text .sum { margin-top: 2px; font-weight: 700; }
.lead { color: var(--muted); margin: 0 0 16px; }
h2.block { margin: 32px 0 4px; }
.res-subj { margin: 16px 0 8px; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; max-width: none; }
.filters select {
  width: 100%; min-width: 0; padding: 12px 28px 12px 12px; border-radius: 14px; font-weight: 700; font-size: 15px;
  appearance: none; -webkit-appearance: none; box-shadow: var(--shadow);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6b76' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center / 16px;
}
.res-list { display: grid; gap: 10px; }
.res-row {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 14px; column-gap: 12px; row-gap: 10px; align-items: center;
  padding: 14px 12px 12px 14px; background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--sea); border-radius: var(--r); color: inherit; text-decoration: none; box-shadow: var(--shadow);
}
.res-row:hover { border-color: var(--sea); }
.ico-tile {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--sea) 14%, var(--surface)); color: var(--sea);
}
.ico-tile svg { width: 24px; height: 24px; }
.ico-tile.big { width: 64px; height: 64px; border-radius: 18px; }
.ico-tile.big svg { width: 34px; height: 34px; }
.rr-main { display: grid; gap: 2px; min-width: 0; }
.rr-title { font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.rr-sub { color: var(--muted); font-size: 14px; }
.rr-score { display: grid; justify-items: end; gap: 3px; }
.rr-pct { font-size: 26px; line-height: 1; color: var(--sea); }
.rr-pct.low { color: var(--land); }
.rr-pct.none { color: var(--muted); }
.rr-best { color: var(--muted); font-size: 13px; white-space: nowrap; }
.rr-chev { color: var(--muted); font-size: 24px; line-height: 1; }
.rr-foot { grid-column: 1 / -1; color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.ok-mark {
  flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  background: var(--good); color: #fff; font-size: 11px; font-weight: 800;
}
.dt-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.dt-head h1 { margin: 0 0 2px; }
.dt-head .sum { margin: 0; }
.card.stat { display: grid; grid-template-columns: 1fr 1fr; padding: 20px 18px; }
.card.stat > div { display: grid; gap: 8px; align-content: start; }
.card.stat > div + div { border-left: 1px solid var(--line); padding-left: 18px; }
.st-label { color: var(--muted); font-size: 14px; }
.st-big { font-size: 44px; line-height: 1; color: var(--ink); }
.st-big.low { color: var(--land); }
.st-delta { color: var(--muted); font-size: 15px; font-weight: 800; }
.st-delta.up { color: var(--good); }
.st-delta.down { color: var(--land); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; margin: 12px 0; }
.tile {
  display: grid; justify-items: center; gap: 2px; padding: 14px 8px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
}
.tile b { font-size: 22px; line-height: 1.1; }
.tile span { color: var(--muted); font-size: 14px; }
.dt-open { margin: 14px 0; }
.more-card { padding: 4px 16px; }
.more-card .more + .more { border-top: 1px solid var(--line); }
.more > summary { cursor: pointer; font-weight: 800; padding: 12px 0; }
.more.warn > summary { color: var(--land); }
.more p.sum { font-weight: 600; margin: 0 0 4px; }
.atts { list-style: none; margin: 8px 0 0; padding: 0; }
.att { padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.att-top { display: flex; justify-content: space-between; gap: 10px; color: var(--ink); }
.att-top b { color: var(--sea); }
.att-meta { margin-top: 2px; overflow-wrap: anywhere; }
.kids { display: grid; gap: 0; margin: 8px 0 4px; }
.kid-card .sum { margin-top: 4px; }
.try .left { color: var(--land); font-size: 14px; }
.try-name { font-weight: 800; margin-top: 6px; }
.try-meta { color: var(--muted); font-size: 14px; margin-top: 2px; }
.mark { margin: 0 0 10px; font-size: 13px; font-weight: 800; letter-spacing: .08em; color: var(--sea); }
form { display: grid; gap: 10px; max-width: 420px; margin-top: 18px; }
input {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
input:focus { outline: 2px solid var(--sea); outline-offset: 1px; }
button, .btn {
  font: 800 16px/1 Nunito, system-ui, sans-serif;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: #0e7c8a;
  color: #fff;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
}
button:hover, .btn:hover { background: #0a5f6b; }
button:focus-visible, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--land); outline-offset: 2px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.top button { background: transparent; color: var(--sea); padding: 8px 0; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  margin: 12px 0;
  box-shadow: var(--shadow);
}
.card:has(> a) { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card p { margin: 0; font-weight: 800; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 13px; font-weight: 800; }
.err { color: var(--bad); font-weight: 700; }
.shell {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg); color: var(--ink);
  font: 800 15px/1.2 Nunito, system-ui, sans-serif;
  padding-top: 0;
}
@media (max-width: 760px) {
  .shell { padding-top: env(safe-area-inset-top, 0px); }
  .login-bar { height: env(safe-area-inset-top, 0px); }
}
form.acct { max-width: none; margin-top: 0; gap: 8px; }
form.acct .checks { display: flex; flex-wrap: wrap; gap: 8px 14px; }
form.acct label.chk { display: flex; gap: 6px; align-items: center; font-weight: 700; }
form.acct label.chk input { width: auto; padding: 0; border: 0; }
select {
  font: inherit; color: var(--ink); background: var(--surface);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
}
.tools { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
button.quiet, button.warn { background: transparent; padding: 8px 0; }
button.quiet { color: var(--sea); }
button.warn { color: var(--bad); }
.once { font-weight: 800; user-select: all; }
.try-time { margin-top: 6px; font-weight: 800; font-size: 15px; }
.shell .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 6px 14px; box-sizing: border-box; max-width: 720px; margin: 0 auto; }
.shell .back {
  display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; box-shadow: var(--shadow);
}
.shell .back:hover { border-color: var(--sea); }
.shell .acts { display: flex; align-items: center; gap: 6px; }
.shell form { display: flex; margin: 0; }
.shell .ico {
  width: 40px; height: 40px; padding: 0; border-radius: 12px; display: inline-grid; place-items: center;
  background: transparent; color: var(--ink); border: 0; cursor: pointer;
}
.shell .ico:hover { background: var(--surface); }
.shell .ico.on { background: var(--surface); color: var(--sea); box-shadow: inset 0 0 0 1px var(--line); }
.shell .ico svg { width: 22px; height: 22px; }
.frame-page { margin: 0; overflow: hidden; max-width: 100%; background: var(--bg); touch-action: pan-y; }
.frame-page iframe { width: 100%; border: 0; display: block; background: #fbfaf6; }
