@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&family=IBM+Plex+Sans+Hebrew:wght@400;500;700&display=swap');

:root {
  --ink: #1d2433;
  --ink-soft: #55607a;
  --paper: #f3f6fb;
  --surface: #ffffff;
  --kid: #dfe9ff;
  --action: #2f5bea;
  --action-ink: #ffffff;
  --sub-bg: #1d2433;
  --sub-ink: #ffd23f;
  --sub-note: #c9d2e6;
  --line: #d5dceb;
  --danger: #b42318;
  --he: 'IBM Plex Sans Hebrew', system-ui, sans-serif;
  --en: 'Atkinson Hyperlegible', system-ui, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8ecf5;
    --ink-soft: #a3adc4;
    --paper: #121826;
    --surface: #1c2436;
    --kid: #26345a;
    --action: #6d8cff;
    --action-ink: #0e1422;
    --sub-bg: #05080f;
    --sub-note: #b5bfd6;
    --line: #2c3650;
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 var(--he);
}

[lang='en'], [dir='ltr'] { font-family: var(--en); }

a { color: var(--action); }

:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; }

.page {
  max-width: 34rem;
  margin: 0 auto;
  padding: 2.5rem 1rem 3rem;
}

h1 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; margin: 0 0 .5rem; }
h2 small { font-weight: 400; color: var(--ink-soft); font-size: .9rem; }
.lead { color: var(--ink-soft); margin: 0 0 1.75rem; }
.hint { color: var(--ink-soft); font-size: .92rem; margin-top: 0; }

.doors { display: grid; gap: .75rem; }

.btn {
  display: inline-block;
  border: 0;
  border-radius: 12px;
  background: var(--action);
  color: var(--action-ink);
  font: 600 1.05rem/1 var(--he);
  padding: .95rem 1.25rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn-alt { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.link { background: none; border: 0; color: var(--action); font: inherit; cursor: pointer; padding: 0; }

.form { display: grid; gap: 1rem; margin-bottom: 1.25rem; }
.form label { display: grid; gap: .35rem; font-weight: 500; }
.form .check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
input, select, textarea {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: .7rem .8rem;
  width: 100%;
}
.check input { width: auto; margin-top: .3rem; }

.error {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  border-radius: 10px;
  padding: .7rem .9rem;
}

.notice-bar {
  background: color-mix(in srgb, var(--sub-ink) 22%, var(--surface));
  border-radius: 10px;
  padding: .7rem .9rem;
}

.bar { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1rem; }

.add-sibling summary { cursor: pointer; font-weight: 600; color: var(--action); }

.or { color: var(--ink-soft); margin: 1rem 0 .4rem; }
.btn-google { display: inline-flex; align-items: center; gap: .55rem; }
.add-sibling[open] summary { margin-bottom: .6rem; }

.card {
  background: var(--surface);
  border-radius: 16px;
  padding: 1.1rem 1.1rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
}

/* the pairing code: shown big, once */
.code {
  font: 700 clamp(1.6rem, 8vw, 2.4rem)/1 var(--en);
  letter-spacing: .15em;
  white-space: nowrap;
  background: var(--sub-bg);
  color: var(--sub-ink);
  border-radius: 10px;
  padding: .8rem 1rem;
  text-align: center;
  margin: .25rem 0 .75rem;
}
.code-input { font: 700 1.6rem/1 var(--en); letter-spacing: .35em; text-align: center; }

/* the correction, shown like a subtitle line under the kid's message */
.subs {
  background: var(--sub-bg);
  color: var(--sub-ink);
  border-radius: 6px;
  padding: .45rem .7rem .5rem;
  font-family: var(--en);
  font-weight: 700;
  font-size: 1rem;
  text-shadow: 0 1px 0 #000;
  animation: subs-in .25s ease-out;
}
.subs + .subs { margin-top: -.15rem; }
.subs .wrong { color: var(--sub-note); font-weight: 400; text-decoration: line-through; text-decoration-thickness: 1px; }
.subs .why {
  display: block;
  font: 400 .85rem/1.4 var(--he);
  color: var(--sub-note);
  text-shadow: none;
  margin-top: .15rem;
}
@keyframes subs-in { from { opacity: 0; transform: translateY(-3px); } }

/* parent: one child's page */
h1 small, h2 small { font-weight: 400; color: var(--ink-soft); font-size: .6em; }
.child-link { color: inherit; text-decoration: none; border-bottom: 2px solid var(--action); }
.alert-bar {
  background: color-mix(in srgb, var(--danger) 12%, var(--surface));
  border-inline-start: 4px solid var(--danger);
  border-radius: 8px;
  padding: .7rem .9rem;
}
section + section { margin-top: 1.75rem; }
.week h2, .last-week h2 { margin-bottom: .75rem; }
/* the week strip: one dot per day, Sunday first; a filled dot is a day of practice */
.strip { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); gap: .25rem; padding: 0; margin: 0 0 .6rem; }
.strip li { display: grid; justify-items: center; gap: .3rem; }
.strip .dot { width: 2.1rem; height: 2.1rem; border-radius: 50%; border: 2px solid var(--line); background: transparent; }
.strip .done .dot { background: var(--action); border-color: var(--action); }
.strip .future .dot { border-style: dashed; opacity: .55; }
.strip .day { font-size: .85rem; color: var(--ink-soft); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.numbers { margin: 0; }
.lists { display: grid; gap: 1.1rem; }
.lists h3 { font-size: 1rem; margin: 0 0 .3rem; }
.plain { margin: 0; padding-inline-start: 1.2rem; }
.plain li + li { margin-top: .15rem; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; }
.chips span { background: var(--kid); border-radius: 999px; padding: .15rem .65rem; font-family: var(--en); font-size: .95rem; }
.chats { list-style: none; padding: 0; margin: 0; }
.chats li + li { border-top: 1px solid var(--line); }
.chats a { display: grid; gap: .1rem; padding: .7rem 0; color: inherit; text-decoration: none; }
.chats a:hover .when, .chats a:focus-visible .when { text-decoration: underline; }
.chats .when { font-weight: 600; }
.chats .count { font-size: .9rem; color: var(--ink-soft); }
.chats .line { font-size: .95rem; }
.flag { color: var(--danger); font-weight: 600; }
.device { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .7rem 0; }
.device > span { display: grid; gap: .1rem; }
.open-kid { display: grid; gap: .4rem; margin-top: 1rem; }

/* parent: a read-only conversation */
.transcript { display: flex; flex-direction: column; gap: .9rem; margin-top: 1rem; }
.transcript .msg { max-width: 85%; display: flex; flex-direction: column; gap: .3rem; }
.transcript .msg.kid { align-self: flex-start; }
.transcript .msg.tutor { align-self: flex-end; }
.transcript .bubble { padding: .6rem .85rem; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--en); }
.transcript .bubble.he { font-family: var(--he); }
.transcript .kid .bubble { background: var(--kid); }
.transcript .tutor .bubble { background: var(--surface); border: 1px solid var(--line); }
.transcript .voice-tag { display: block; font: .8rem var(--he); color: var(--ink-soft); }
.transcript .stamp { font-size: .75rem; color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* plan 3: the footer with the cancel link, payments and cancellation pages */
.site-foot { max-width: 40rem; margin: 2rem auto 1.5rem; padding: 0 1rem; text-align: center; font-size: .9rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.25rem; }
.site-foot a { color: var(--ink-soft); }

/* the legal pages: long text, read top to bottom */
.legal h2 { margin: 2rem 0 .4rem; }
.legal p, .legal ul { margin: 0 0 .75rem; }
.legal ul { padding-inline-start: 1.25rem; }
.legal li { margin-bottom: .35rem; }
.legal .lead { margin-bottom: 1.25rem; }
.quiet { color: var(--ink-soft); font-size: .92rem; margin-inline-start: .5rem; }
.history { width: 100%; border-collapse: collapse; font-size: .95rem; }
.history th, .history td { text-align: start; padding: .45rem .25rem; border-bottom: 1px solid var(--line); }
.history .num { direction: ltr; text-align: end; white-space: nowrap; }
.danger { background: var(--danger); }
