/* CRUX's paper/forest palette. Load after the shared language styles so
   translated labels retain the same readable sizes at every breakpoint. */
:root {
  --ink: #253b2d;
  --muted: #53634f;
  --green: #294632;
  --accent: #566b38;
  --control-border: #78866f;
}

body { font-size: 16px; }
button, input, select, textarea { color: var(--ink); }
.sidebar { flex-wrap: wrap; gap: 16px 30px; }
.sidebar .nav { flex: 1 1 760px; }
html[lang] .sidebar .nav button {
  color: var(--muted);
  font-size: .875rem;
  min-height: 44px;
  padding: 11px 12px;
}
html[lang] .sidebar .nav button.active {
  background: #e2e8d4;
  color: var(--ink);
  border-bottom: 3px solid var(--green);
  font-weight: 700;
}
.nav .badge { font-size: .75rem; }
.brand small { font-size: .625rem; color: var(--muted); }
.breadcrumb, .demo-label { font-size: .8125rem; color: var(--muted); }
.top-actions .switcher button,
.top-actions .language-switch button { font-size: .875rem; min-height: 36px; }
.switcher button { color: #46573f; }
.switcher button.on { color: var(--green); font-weight: 700; }
.page-title p, .crux-story > p { font-size: 1rem; color: var(--muted); }
.crux-story > p { max-width: 390px; line-height: 1.75; }
.crux-story h1 em, .crux-handnote { color: var(--accent); }
.crux-handnote { position: static; margin: 28px 0 0 35%; }
.crux-dateline { font-size: .75rem; letter-spacing: 1.2px; color: var(--muted); flex-wrap: wrap; gap: 10px; }
.crux-section-heading { font-size: .75rem; color: var(--muted); letter-spacing: 1px; flex-wrap: wrap; }
.crux-start > span { font-size: .875rem; color: var(--muted); }
.crux-photo { padding-bottom: 70px; }
.crux-photo figcaption { flex-wrap: wrap; gap: 4px 12px; }
.crux-photo figcaption span { font-size: .75rem; color: var(--muted); letter-spacing: .5px; }
.crux-notebook .muted, .crux-quote cite { font-size: .875rem; color: var(--muted); }
.crux-quote { color: var(--accent); }
.eyebrow { font-size: .8125rem; letter-spacing: 1.2px; }
.btn, .btn.sm, .page-title .btn, .text-btn,
.tabs button, .metric-tabs button { font-size: .875rem; }
.btn { min-height: 44px; }
.btn.outline, .iconbtn, .search, .language-switch,
.modal input, .modal select, .modal textarea { border-color: var(--control-border); }
.iconbtn { color: var(--ink); min-width: 36px; min-height: 36px; }
.search, .modal input, .modal select, .modal textarea,
.chat-compose input { font-size: 1rem; }
input::placeholder, textarea::placeholder { color: #5c6958; opacity: 1; }
.btn:hover { filter: brightness(.94); }
.text-btn:hover { text-decoration: underline; text-underline-offset: 4px; }
:where(button, a, input, select, textarea):focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}
.pill, .date-pill { font-size: .8125rem; }
.pill.green { color: #3e5d20; }
.pill.orange { color: #825033; }
.pill.blue { color: #38596e; }
.stat-top, .view-home .stat-top { font-size: .875rem; }
.stat-foot, .view-home .stat-foot { font-size: .8125rem; color: var(--muted); }
.positive, .view-home .stat-foot .positive { color: #49632f; font-size: .875rem; }
.stat-value small, .datebox small { font-size: .8125rem; }
.upcoming-info h4, .crux-next .upcoming-info h4 { font-size: 1rem; }
.upcoming-info p { font-size: .875rem; }
.chart text { fill: var(--muted); font-size: 13px; }
.chart-line { stroke: var(--accent); stroke-width: 3; }
.legend, .daydot { color: var(--muted); font-size: .8125rem; }
.bar { height: 6px; background: #dce2d2; }
.bar span { background: var(--accent); }
.ex-body p, .list-row p, .project-card p, .session-note,
.goal p, .chat-hint, .lesson-progress { font-size: .875rem; }
.ex-bottom { flex-wrap: wrap; gap: 10px; }
.goal-top, .project-meta { font-size: .875rem; }
.list-row .grow { min-width: 0; }
.list-row h3 { line-height: 1.4; }
.tabs button.selected { border-bottom-width: 3px; font-weight: 700; }
.metric-tabs button.on { font-weight: 700; }

/* The base .card background used to overwrite the timer's dark surface. */
.card.timer-card {
  background-color: var(--green);
  border-color: var(--green);
  color: #fffef8;
}
.timer-card .eyebrow { color: #d8dfac; }
.timer-card p { color: #e1e8d9; font-size: .875rem; }
.timer-card .btn.outline { color: #fffef8; border-color: #b8c7a8; }
.timer-settings { flex-wrap: wrap; }
.timer-settings button { background: #3e5a43; color: #fffef8; border: 1px solid #b8c7a8; font-size: .875rem; min-height: 40px; }
.timer-card :where(button, a):focus-visible,
.bubble.mine :where(button, a):focus-visible { outline-color: #d8dfac; }
.bubble { font-size: 1rem; }
.bubble small { color: #53634f; font-size: .8125rem; }
.bubble.mine small { color: #e1e8d9; }
.chat-person small, .chat-header small { font-size: .8125rem; }
.reference-clip { min-width: 0; max-width: 100%; }
.reference-clip small { color: #4d6044; }
.cal-head, .cal-time { font-size: .875rem; }
.cal-event { font-size: .8125rem; }
.cal-event b { font-size: .875rem; }
.cal-event.short, .cal-event.short b { font-size: .75rem; }
.learn-art .eyebrow { color: #48563c; }
.learn-art .big-letter { opacity: 1; }
.modal p, .article ul { font-size: 1rem; }
.modal label, .range-label { color: var(--muted); font-size: .875rem; }
.athlete-table { font-size: .875rem; }
.athlete-table th, .athlete-name small { font-size: .8125rem; }
.footer, .footer button { font-size: .8125rem; color: var(--muted); }

@media (max-width: 900px) {
  .crux-opening { grid-template-columns: 1fr; }
  .crux-photo { width: 90%; margin: 0 auto; }
  .crux-notebook { grid-template-columns: 1fr; }
  .crux-story > p { max-width: 520px; }
  .sidebar .nav { flex-wrap: nowrap; }
  .crux-handnote { display: none; }
}
@media (max-width: 600px) {
  .crux-story h1 { font-size: clamp(2.5rem, 11vw, 3.375rem); }
  .crux-story > p { font-size: 1rem; }
  .crux-photo figcaption b { font-size: 20px; }
  .crux-dateline { font-size: .75rem; }
  .crux-section-heading { font-size: .75rem; }
  .page-title h1 { font-size: 2rem; overflow-wrap: break-word; }
  .list-row { flex-wrap: wrap; gap: 10px; }
  .list-row .grow { flex-basis: calc(100% - 50px); }
  .list-row > .iconbtn { margin-left: 44px; }
  .crux-next { padding: 22px; }
  .chat-compose input { font-size: 1rem; }
  .chart text { font-size: 16px; }
  .project-meta { flex-wrap: wrap; gap: 6px 15px; }
}

/* Keep the selected pupil visible while editing their plan. */
.athlete-switcher { margin: 0 0 28px; padding: 22px; background: #e8ebdd; border: 1px solid var(--control-border); border-radius: 3px; }
.athlete-switcher-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 16px; }
.athlete-switcher-heading h2 { font-size: 1rem; }
.athlete-switcher-heading > span { font-size: .875rem; }
.athlete-options { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.athlete-option { display: flex; align-items: center; gap: 10px; padding: 14px 12px; background: var(--paper); color: var(--ink); text-align: left; border: 1px solid var(--control-border); border-radius: 3px; }
.athlete-option > span:nth-child(2) { min-width: 0; flex: 1; }
.athlete-option b { display: block; font-size: .875rem; }
.athlete-option small { display: block; font-size: .8125rem; line-height: 1.5; margin-top: 5px; }
.athlete-option[aria-pressed=true] { background: var(--green); color: #fffef8; border-color: var(--green); }
.athlete-option[aria-pressed=true] small { color: #e1e8d9; }
.athlete-option[aria-pressed=true] .avatar { color: var(--green); background: #d8dfac; }
.athlete-option:hover:not([aria-pressed=true]) { background: #f0f3e8; }
.athlete-option:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.athlete-selection { width: 12px; flex-shrink: 0; }
@media(max-width:1200px) { .athlete-options { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) {
  .athlete-switcher { padding: 16px; }
  .athlete-options { grid-template-columns: 1fr; gap: 8px; }
  .athlete-option { padding: 10px 12px; }
  .athlete-option small { margin-top: 2px; }
}
