/* The Thinking Child — parent portal */
:root {
  --ink: #1F2A44;
  --muted: #4F5A70;
  --cream: #FFF8EF;
  --card: #FFFFFF;
  --line: #E8DCCB;
  --coral: #B8432B;
  --coral-ink: #8A3220;
  --sun: #FFC857;
  --ok: #1E6B50;
  --m-secure: #3FB28A;
  --m-practising: #9CC3F0;
  --m-learning: #FFC857;
  --m-revisit: #F4A6A0;
  --m-not_started: #E6E1D8;
  --radius: 18px;
  --serif: Fraunces, Georgia, "Times New Roman", serif;
  --sans: Nunito, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--cream); font-size: 16px; line-height: 1.5; }
a { color: var(--ink); text-underline-offset: 2px; }
a:hover { color: var(--coral); }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(28px, 4vw, 40px); }
h2 { font-family: var(--serif); font-weight: 700; font-size: 22px; }
h3 { font-size: 16px; margin-top: 16px; }
p { margin: 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--sun); padding: 8px 12px; z-index: 10; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.mt { margin-top: 24px; }
.ok { color: var(--ok); }
.warn { color: var(--coral-ink); }
.due { color: var(--coral-ink); }

/* ---- top bar ---- */
.topbar { background: var(--ink); color: var(--cream); }
.topbar-in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--cream); font-family: var(--serif); font-weight: 700; font-size: 19px; }
.brand:hover { color: var(--sun); }
.brand-dark { color: var(--ink); font-size: 24px; }
.mainnav { display: flex; flex-wrap: wrap; gap: 4px 20px; flex: 1 1 auto; font-weight: 700; font-size: 15px; }
.mainnav a { color: var(--cream); text-decoration: none; padding: 10px 0; border-bottom: 3px solid transparent; }
.mainnav a:hover { color: var(--sun); }
.mainnav a[aria-current="page"] { color: var(--sun); border-bottom-color: var(--sun); }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--sun); color: var(--ink); font-size: 12px; text-align: center; }
.kids { display: flex; flex-wrap: wrap; gap: 8px; }
.kid { font-weight: 700; font-size: 14px; padding: 10px 16px; border-radius: 999px; border: 1.5px solid var(--cream); color: var(--cream); text-decoration: none; }
.kid:hover { color: var(--ink); background: var(--cream); }
.kid.on { background: var(--sun); border-color: var(--sun); color: var(--ink); font-weight: 800; }

/* ---- layout ---- */
.main { padding-top: 28px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 20px; }
.pagehead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; }
.eyebrow { font-size: 14px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.pill { font-weight: 800; padding: 10px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cardhead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.k { font-family: var(--sans); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.big { font-family: var(--serif); font-size: 24px; font-weight: 700; line-height: 1.2; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.empty { max-width: 640px; }

/* ---- buttons & forms ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--card); color: var(--ink); font: inherit; font-weight: 800; font-size: 15px; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--cream); color: var(--ink); }
.btn-primary { background: var(--coral); border-color: var(--coral); color: #fff; }
.btn-primary:hover { background: var(--coral-ink); border-color: var(--coral-ink); color: #fff; }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.btn-block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 4px; font: inherit; color: var(--coral-ink); text-decoration: underline; cursor: pointer; }
.form { display: flex; flex-direction: column; gap: 8px; }
.form label { font-weight: 800; font-size: 15px; margin-top: 6px; }
.form input:not([type=checkbox]), .form select, .form textarea {
  font: inherit; font-size: 16px; padding: 12px 14px; border: 1.5px solid #C9BBA6; border-radius: 12px; background: var(--cream); color: var(--ink); width: 100%;
}
.form input:disabled { color: var(--muted); background: #F4EEE5; }
.form button { margin-top: 10px; align-self: flex-start; }
.form .btn-block { align-self: stretch; }
.form-tight { gap: 6px; }
.hint { font-size: 13px; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600 !important; font-size: 15px !important; line-height: 1.45; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--coral); }
.check-lg { padding: 10px 0; border-bottom: 1px solid var(--line); }
.inline { display: inline; }

/* ---- flash ---- */
.flash { padding: 12px 16px; border-radius: 12px; font-weight: 700; }
.flash-ok { background: #E3F4EC; color: var(--ok); }
.flash-error { background: #FBE6E2; color: var(--coral-ink); }

/* ---- lists ---- */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rows li:last-child { border-bottom: 0; }
.rows-top li { align-items: flex-start; }
.chips { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: var(--m-revisit); padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 14px; }
.tag { display: inline-block; font-size: 13px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--m-not_started); white-space: nowrap; }
.tag-ok { background: #CDEFE0; color: var(--ok); }
.tag-warn { background: #FBE0DA; color: var(--coral-ink); }

/* ---- plan ---- */
.plan { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 0; }
.plan-subj { font-weight: 800; min-width: 64px; }
.al { font-family: var(--serif); font-size: 28px; font-weight: 700; }
.al-target { color: var(--ok); }
.plan-lg .al { font-size: 38px; }
.plancard { gap: 8px; }

/* ---- milestone ---- */
.milestone { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; background: var(--m-secure); border-radius: var(--radius); padding: 14px 20px; }
.milestone-k { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.milestone-t { font-weight: 800; font-size: 18px; }
.milestone-d { font-size: 14px; margin-left: auto; }

/* ---- mastery ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 2px; min-height: 72px; }
.tile-name { font-weight: 800; font-size: 15px; line-height: 1.25; }
.tile-status { font-size: 13px; font-weight: 600; }
.m-secure { background: var(--m-secure); }
.m-practising { background: var(--m-practising); }
.m-learning { background: var(--m-learning); }
.m-revisit { background: var(--m-revisit); }
.m-not_started { background: var(--m-not_started); }
.legend { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.mbar-row { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 12px; }
.mbar-label { font-weight: 800; }
.mbar { width: 100%; height: 18px; border-radius: 6px; overflow: hidden; display: block; }
.f-secure { fill: var(--m-secure); } .f-practising { fill: var(--m-practising); } .f-learning { fill: var(--m-learning); }
.f-revisit { fill: var(--m-revisit); } .f-not_started { fill: var(--m-not_started); }

/* ---- chart ---- */
.chart { width: 100%; height: auto; font-family: var(--sans); }
.chart .axis { stroke: #C9BBA6; }
.chart .grid { stroke: #F0E8DC; }
.chart .tick { font-size: 12px; fill: var(--muted); }
.chart .val { font-size: 12px; fill: var(--muted); font-weight: 700; }
.chart .val.strong { fill: var(--ink); font-weight: 800; }
.chart .bar { fill: var(--m-practising); }
.chart .bar-last { fill: var(--ink); }

/* ---- notes ---- */
.note { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.note:last-child { border-bottom: 0; padding-bottom: 0; }
.note-k { font-size: 13px; font-weight: 800; color: var(--muted); }

/* ---- tabs ---- */
.tabs { display: flex; gap: 8px; }
.tab { font-weight: 800; font-size: 15px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--ink); text-decoration: none; background: var(--card); }
.tab.on { background: var(--ink); color: var(--cream); }

/* ---- schedule ---- */
.sessions { list-style: none; margin: 0; padding: 0; }
.session { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.session:last-child { border-bottom: 0; }
.session-main { display: flex; gap: 14px; align-items: center; min-width: 0; }
.session-date { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 14px; background: var(--cream); border: 1px solid var(--line); flex: 0 0 auto; }
.session-date .d { font-family: var(--serif); font-weight: 700; font-size: 20px; line-height: 1; }
.session-date .m { font-size: 12px; font-weight: 800; text-transform: uppercase; }
.session-side { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.is-cancelled .session-main { opacity: .6; text-decoration: line-through; }
.makeup summary { list-style: none; }
.makeup summary::-webkit-details-marker { display: none; }
.makeup[open] { flex-basis: 100%; }
.makeup[open] summary { margin-bottom: 8px; }
.makeup form { background: var(--cream); padding: 14px; border-radius: 14px; max-width: 520px; }

/* ---- messages ---- */
.thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 78%; padding: 12px 16px; border-radius: 16px; }
.msg-them { background: var(--cream); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-me { background: #E7EEF9; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg-meta { display: block; font-size: 12px; font-weight: 800; color: var(--muted); margin-bottom: 4px; }
.compose { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 8px; }

/* ---- footer ---- */
.foot { border-top: 1px solid var(--line); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding-top: 18px; padding-bottom: 28px; font-size: 14px; color: var(--muted); }

/* ---- sign-in pages ---- */
.auth-body { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; }
.auth { width: 100%; max-width: 440px; padding: 48px 20px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.auth-card { width: 100%; padding: 28px; gap: 14px; }
.auth-links { text-align: center; font-weight: 700; }
.auth-help { font-size: 14px; color: var(--muted); text-align: center; }

@media (max-width: 640px) {
  .mainnav { order: 3; flex-basis: 100%; gap: 2px 16px; }
  .kids { order: 2; }
  .grid2 { grid-template-columns: 1fr; }
  .msg { max-width: 92%; }
  .mbar-row { grid-template-columns: 60px 1fr; }
  .mbar-row .small { grid-column: 2; }
  .milestone-d { margin-left: 0; }
}
.rows li > strong, .rows li > .tag { white-space: nowrap; }

/* ===== public site ===== */
.sitebar { background: var(--cream); border-bottom: 1px solid var(--line); }
.sitebar-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; padding-top: 14px; padding-bottom: 14px; }
.sitebar .brand { color: var(--ink); font-size: 21px; }
.sitenav { display: flex; flex-wrap: wrap; gap: 6px 22px; flex: 1 1 auto; font-weight: 800; font-size: 15px; }
.sitenav a { text-decoration: none; padding: 8px 0; border-bottom: 3px solid transparent; }
.sitenav a[aria-current="page"] { border-bottom-color: var(--coral); }
.sitecta { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-lg { min-height: 54px; padding: 14px 26px; font-size: 17px; }
.btn-sun { background: var(--sun); border-color: var(--sun); }
.btn-sun:hover { background: #F5B92E; }
.btn-ink { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.btn-ink:hover { background: #0F1729; color: var(--cream); }
.btn-light { background: transparent; border-color: var(--cream); color: var(--cream); }
.btn-light:hover { background: var(--cream); color: var(--ink); }
.strong { font-weight: 800; }
.kicker { font-weight: 800; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--coral-ink); margin: 0 0 8px; }
.lead { font-size: 19px; line-height: 1.6; color: var(--muted); }
.hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.hero-copy { flex: 1 1 500px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.hero-copy h1 { font-size: clamp(38px, 5.5vw, 60px); line-height: 1.05; }
.hero-card { flex: 1 1 380px; padding: 26px; border-radius: 24px; }
.hero-note { background: var(--cream); border-radius: 14px; padding: 14px; font-size: 15px; }
.tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.band { padding: 64px 0; }
.band-ink { background: var(--ink); color: var(--cream); }
.band-sun { background: var(--sun); }
.band-white { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-title { font-size: clamp(30px, 4vw, 40px); margin-bottom: 28px; }
.band-sun .lead { color: var(--ink); }
.band-split { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between; }
.band-split > div { flex: 1 1 520px; }
.band-split .band-title { margin-bottom: 10px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
.steps h3 { font-size: 21px; margin: 6px 0 8px; }
.steps p { color: #E6E1D8; font-size: 17px; }
.step-n { font-family: var(--serif); font-size: 44px; color: var(--sun); }
.section { padding-top: 64px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 22px; }
.sectionhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; }
.section h2 { font-size: clamp(28px, 4vw, 40px); }
.cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.cards2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.prog h3 { font-size: 21px; }
.tag.st-open { background: var(--m-secure); color: var(--ink); }
.tag.st-full { background: var(--m-revisit); color: var(--ink); }
.tag.st-request { background: var(--sun); color: var(--ink); }
.teachers { flex-direction: row; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.emma { flex: 0 1 320px; width: 100%; max-width: 320px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 24px; }
.emma-ph { background: var(--sun); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 120px; font-weight: 700; }
.teachers-copy { flex: 1 1 480px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.teachers-copy h3 { font-size: 18px; margin: 0; }
.quote { margin: 0; background: var(--cream); border-radius: 20px; padding: 24px; font-size: 19px; line-height: 1.5; }
.sitefoot { background: var(--ink); color: var(--cream); padding-top: 56px; }
.sitefoot a { color: var(--cream); }
.sitefoot-in { display: flex; flex-wrap: wrap; gap: 32px 64px; justify-content: space-between; }
.sitefoot-in > div { flex: 1 1 420px; display: flex; flex-direction: column; gap: 14px; }
.foot-title { font-family: var(--serif); font-size: 34px; font-weight: 700; }
.foot-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 16px; }
.copy { font-size: 13px; color: #B9C0CF; padding-top: 32px; padding-bottom: 24px; }
.narrowpage { max-width: 820px; }
.ttable { display: flex; flex-direction: column; gap: 12px; }
.trow { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; }
.trow h3 { font-size: 18px; margin: 0; }
.trow-main { flex: 1 1 380px; display: flex; flex-direction: column; gap: 4px; }
.trow-side { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tabs-site { flex-wrap: wrap; }
.form-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 18px; }
.form-grid2 > div { display: flex; flex-direction: column; gap: 4px; }
.form-grid2 .span-all { grid-column: 1 / -1; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.thanks { gap: 16px; }
.choose { text-decoration: none; gap: 6px; }
.choose:hover { border-color: var(--ink); }
.quiz { gap: 16px; }
.qcard { border: 1px solid var(--line); margin: 0; }
.qcard legend { font-weight: 800; font-size: 18px; padding: 0; margin-bottom: 8px; float: left; width: 100%; }
.qn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--sun); font-size: 15px; margin-right: 6px; }
.opt { padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; clear: both; }
.opt:hover { border-color: var(--ink); }
.prose h2 { margin-top: 18px; }
.prose p, .prose li { font-size: 17px; line-height: 1.65; }
@media (max-width: 640px) {
  .sitenav { order: 3; flex-basis: 100%; }
  .hero { padding-top: 36px; }
  .tiles-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
