/* The parent's page as a console, after the owner's admin (console.css): one menu (a bar along the bottom on a phone, a
   sidebar on a wider screen), white cards rounded 12px, tiles for figures, lists as rows to tap. Tap targets 44px or more.
   style.css is loaded first for the topics table and the 14-day strip; everything here is under body.console.
   The child's page (index.html) wears the same shell; its few own rules are near the end. */
.console { --muted: #5b6673; --side: #e9edf0; --tint: #eaf3fa; --warn: #a3261d; --r: 12px; --bar: 3.6rem; -webkit-font-smoothing: antialiased; }
.console h1 { font-size: 1.8rem; font-weight: 700; margin: 0 0 .3rem; }
.console h2 { font-size: 1.15rem; font-weight: 650; margin: 0 0 .6rem; letter-spacing: -.01em; }
.console h2.over { margin: 2rem 0 0; }
.console p { margin: 0 0 .9rem; }
.console .sub { color: var(--muted); margin-bottom: 1rem; }
.console .muted { color: var(--muted); }
.console .small { font-size: .875rem; }
.console .skip { position: absolute; left: -999rem; z-index: 30; padding: .75rem 1rem; background: #fff; }
.console .skip:focus { left: .5rem; top: .5rem; }

/* the shell */
.console .top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: center; height: 3rem; background: rgba(243, 245, 247, .92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); box-sizing: content-box; }
.console .name { display: inline-flex; align-items: center; font-weight: 700; font-size: 1.05rem; text-decoration: none; white-space: nowrap; color: var(--ink); }
.console .name .mark { flex: none; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; margin-right: .55rem; border-radius: 6px; background: var(--accent); color: #fff; font-weight: 800; font-size: 1rem; line-height: 1; font-style: normal; }
.console .name span { font-weight: 400; font-size: .85rem; color: var(--muted); margin-left: .4rem; }
.ico { flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.console .side { position: fixed; inset: auto 0 0 0; z-index: 20; background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.console .side .name { display: none; }
.console .side nav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; max-width: 36rem; margin: 0 auto; }
.console .side nav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; min-height: var(--bar); padding: .35rem 0; font-size: .75rem; text-decoration: none; color: var(--muted); }
.console .side nav a .ico { width: 22px; height: 22px; }
.console .side nav a[aria-current] { color: var(--accent); font-weight: 650; }
.console .side nav a[aria-current] .ico { stroke-width: 2.1; }
.console .badge { display: inline-block; min-width: 1.2rem; padding: 0 .35rem; border-radius: 99px; background: var(--warn); color: #fff; font-weight: 600; font-size: .7rem; line-height: 1.2rem; text-align: center; }
.console .side nav .badge { position: absolute; top: .3rem; left: calc(50% + .35rem); }
.console.bare .side { display: none; }
.console main { max-width: 44rem; margin: 0 auto; padding: 1.25rem 1rem calc(var(--bar) + 3rem); }
.console .flash { padding: .8rem 1rem; border-radius: var(--r); background: #e6f0ea; color: var(--right); font-weight: 600; }

/* cards, tiles, rows */
.console .panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1rem; margin: 1rem 0; box-shadow: 0 1px 2px rgba(28, 37, 48, .04); }
.console .panel > :last-child { margin-bottom: 0; }
.console .panel.calm h2 { color: var(--right); }
.console .panel.new { border-color: var(--accent); border-top-width: 3px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 1rem 0; }
.tile { display: flex; flex-direction: column; gap: .15rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: var(--r); background: #fff; min-width: 0; }
.tile strong { font-weight: 700; font-size: 1.6rem; line-height: 1.15; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.tile .label { font-size: .82rem; line-height: 1.3; color: var(--muted); }
.tile small { color: var(--muted); font-size: .78rem; }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { padding: .7rem 0; border-top: 1px solid var(--line); }
.todo li:first-child { border-top: 0; padding-top: 0; }
.todo a { display: flex; align-items: baseline; gap: .6rem; font-weight: 650; text-decoration: none; color: var(--ink); }
.todo a::before { content: ""; flex: none; width: .5rem; height: .5rem; border-radius: 50%; background: var(--warn); transform: translateY(-.1rem); }
.todo small { display: block; margin-left: 1.1rem; color: var(--muted); font-size: .875rem; }
.rows { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin: 1rem 0; }
.console .panel .rows { border: 0; border-radius: 0; margin: 0; }
.row { display: grid; grid-template-columns: 1fr auto; gap: .1rem 1rem; padding: .9rem 1rem; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.row:first-child { border-top: 0; }
.console .panel .row { padding-left: 0; padding-right: 0; }
a.row:hover { background: var(--wash); }
.row .who { font-weight: 650; }
.row .amt { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.row .what, .row .meta { grid-column: 1 / -1; font-size: .92rem; }
.row .meta { color: var(--muted); }
.row .what:empty, .row .meta:empty, .row .amt:empty { display: none; }
.tag { display: inline-block; padding: .05rem .6rem; border-radius: 99px; background: var(--tint); color: var(--accent); font-size: .75rem; font-weight: 650; vertical-align: middle; white-space: nowrap; }
.tag.ok { background: #e4f1e8; color: var(--right); }
.tag.due { background: #fdf0d9; color: #8a5200; }
.console .empty { padding: 1rem 0; color: var(--muted); }

/* buttons and forms */
.console .btn { display: inline-block; min-height: 2.9rem; padding: .8rem 1.4rem; border: 1px solid var(--accent); border-radius: var(--r); background: var(--accent); color: #fff; font-weight: 650; font-size: .95rem; line-height: 1.2; text-decoration: none; text-align: center; cursor: pointer; }
.console .btn:hover:not(:disabled) { background: #22547d; }
.console .btn.quiet { background: #fff; color: var(--accent); margin-left: 0; }
.console .btn.quiet:hover:not(:disabled) { background: var(--tint); }
.console .link { background: none; border: 0; min-height: 2.75rem; padding: 0 .2rem; text-decoration: underline; font-size: .9rem; margin: -.7rem 0; }
.console label { display: block; margin: 0 0 .35rem; font-size: .92rem; font-weight: 600; }
.console input { width: 100%; min-height: 2.9rem; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: var(--r); background: #fff; color: var(--ink); font: inherit; }
.add-child span { display: flex; gap: .5rem; }
.add-child input { flex: 1; min-width: 0; }
.add-child .small { margin: .6rem 0 0; }
.choices { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 .7rem; }
.console .account { margin: 0 0 .9rem; }
.console .account .btn { margin-right: .6rem; }

/* children */
.kids { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .75rem; margin: 1rem 0; }
.kid { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; display: flex; flex-direction: column; gap: .8rem; box-shadow: 0 1px 2px rgba(28, 37, 48, .04); }
.kid-head { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .15rem .7rem; }
.avatar { grid-row: span 2; flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--tint); color: var(--accent); font-weight: 700; font-size: 1.15rem; display: grid; place-items: center; }
.kid-name { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.kid-name:hover { color: var(--accent); }
.kid-head .tag { justify-self: start; margin: 0; }
.today { list-style: none; margin: 0; padding: 0; font-size: .92rem; color: var(--muted); flex: 1; }
.today li { display: flex; align-items: center; gap: .55rem; padding: .12rem 0; }
.today li::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; border: 1.5px solid var(--line); flex: none; }
.today li.open::before { border-color: var(--flag); background: #fdf0d9; }
.today li.done { color: var(--ink); }
.today li.done::before { border-color: var(--accent); background: var(--accent); }
.child-head { display: flex; align-items: center; gap: .7rem; margin: 1rem 0 .2rem; flex-wrap: wrap; }
.console .child-head h2 { margin: 0; flex: 1; font-size: 1.3rem; }
.console .panel .child-head { margin: 0 0 .8rem; }
.pills { display: flex; flex-wrap: wrap; gap: .4rem; margin: .8rem 0 .5rem; }
.pills button { border: 1px solid var(--line); background: #fff; border-radius: 99px; min-height: 2.75rem; padding: .3rem 1.1rem; font-weight: 600; font-size: .92rem; color: var(--soft); }
.pills button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.console .days { max-width: 32rem; margin-bottom: .7rem; }
.sections { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 0 0 .8rem; font-variant-numeric: tabular-nums; }
.sections th, .sections td { text-align: right; padding: .6rem 0 .6rem .8rem; border-top: 1px solid var(--line); font-weight: 400; vertical-align: baseline; }
.sections th:first-child, .sections td:first-child { text-align: left; padding-left: 0; }
.sections thead th { border-top: 0; padding-top: 0; font-size: .8rem; color: var(--muted); }
.sections tbody th { font-weight: 650; }
.sections tfoot th, .sections tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.sections small { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.console .kids { margin-top: 1.4rem; }
.console .skills { margin: 0 0 .7rem; }
.console .skills details { border-radius: var(--r); }
.console .skills .next { border-radius: 0 var(--r) var(--r) 0; }

@media (min-width: 700px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
/* a computer: the sidebar stays put, the page widens, rows read as columns */
@media (min-width: 900px) {
  .console .top { display: none; }
  .console.bare .top { display: flex; }
  .console .side { inset: 0 auto 0 0; display: flex; flex-direction: column; width: 15rem; padding: 1.5rem .75rem 1rem; background: var(--side); border-top: 0; border-right: 1px solid var(--line); overflow-y: auto; }
  .console .side .name { display: inline-flex; padding: 0 .75rem 1.5rem; }
  .console .side nav { display: flex; flex-direction: column; gap: .2rem; max-width: none; margin: 0; }
  .console .side nav a { flex-direction: row; justify-content: flex-start; gap: .8rem; min-height: 2.9rem; padding: 0 .75rem; border-radius: var(--r); font-size: 1rem; color: var(--ink); }
  .console .side nav a:hover { background: rgba(255, 255, 255, .6); }
  .console .side nav a[aria-current] { background: #fff; color: var(--accent); box-shadow: 0 1px 2px rgba(28, 37, 48, .06); }
  .console .side nav .badge { position: static; margin-left: auto; }
  .console:not(.bare) main { max-width: 64rem; margin-left: 15rem; margin-right: 0; padding: 2.5rem 2.5rem 5rem; }
  .rows .row { grid-template-columns: minmax(10rem, 1fr) 2fr minmax(9rem, auto) 6rem; align-items: baseline; }
  .rows .row .who { grid-column: 1; grid-row: 1; }
  .rows .row .what { grid-column: 2; grid-row: 1; }
  .rows .row .meta { grid-column: 3; grid-row: 1; }
  .rows .row .amt { grid-column: 4; grid-row: 1; }
  .rows .row .what:empty, .rows .row .meta:empty, .rows .row .amt:empty { display: block; }
}
.console .task .acts { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; }
.console .task .acts .btn { min-width: 8rem; }
.console .who-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem 1rem; }
.console .who-row h1 { margin-right: auto; }
.console .names { display: grid; gap: .6rem; margin: 1.2rem 0 1.4rem; }
.console .names .btn { font-size: 1.1rem; min-height: 3.4rem; }
@media (min-width: 900px) { .console.bare main { padding-top: 3rem; } }

/* the signed-in parent: their Google picture, or an initial in a circle */
.console .face { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 650; line-height: 1; }
.console .face.big { width: 2.5rem; height: 2.5rem; font-size: 1.05rem; }
.console .account.who { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
