/* A calm, readable journal: clear numbers, restrained colour, no painted frames. */
.dashboard-page { --dashboard-line: #dedfd9; color: #203739; font-family: system-ui, sans-serif; width: 100%; max-width: 1280px; margin: auto; padding: 0 8px 40px; }
.dashboard-page *, .dashboard-page *::before, .dashboard-page *::after { box-sizing: border-box; }
.dashboard-page .eyebrow { color: #577570; font: 650 .69rem/1.5 system-ui,sans-serif; letter-spacing: .16em; text-transform: uppercase; }
.dashboard-page h3 { letter-spacing: -.025em; }
.dashboard-page button { border: 1px solid #cbd4ce; border-image: none; border-radius: 10px; background: #fffdf8; padding: 12px 18px; color: #254c43; font: 600 .85rem/1.4 system-ui,sans-serif; box-shadow: none; cursor: pointer; }
.dashboard-page button:focus-visible, .dashboard-page summary:focus-visible { outline: 3px solid #248775; outline-offset: 4px; }
.dashboard-page button:hover { background: #e9f0e9; }
.dashboard-page button:disabled { opacity: .6; cursor: wait; }
.dashboard-page .dashboard-intro { display: flex; min-height: 180px; justify-content: space-between; align-items: center; gap: 24px; padding: 28px 0 32px; border: 0; }
.dashboard-page .dashboard-intro::before, .dashboard-page .dashboard-intro::after { display: none; }
.dashboard-page .dashboard-intro h2 { font: 500 clamp(2rem,4vw,3.3rem)/1.12 Georgia,serif; letter-spacing: -.045em; color: #203d35; }
.dashboard-page .dashboard-intro p:last-child { margin-top: 14px; color: #64736e; font-size: .95rem; }
.dashboard-page .dashboard-continue { flex-shrink: 0; color: #fff; background: #274e43; border-color: #274e43; padding: 15px 22px; }
.dashboard-page .dashboard-continue:hover { background: #173d33; }
.dashboard-continue span { padding-left: 24px; }
.dashboard-overview { display: grid; grid-template-columns: 1.25fr repeat(3,1fr); gap: 14px; }
.dashboard-page .dashboard-metric { min-width: 0; min-height: 165px; border: 1px solid var(--dashboard-line); border-image: none; border-radius: 15px; background: #fffdf8; padding: 22px; transform: none; box-shadow: 0 3px 12px #233c2f04; }
.dashboard-page .dashboard-metric h3 { margin: 0 0 23px; color: #5c6d67; font: 600 .8rem/1.3 system-ui,sans-serif; }
.dashboard-page .dashboard-metric > strong { font: 600 clamp(2rem,3vw,2.8rem)/1 system-ui,sans-serif; letter-spacing: -.055em; color: #203d35; }
.dashboard-page .dashboard-metric p { font: 400 .73rem/1.6 system-ui,sans-serif; color: #62736b; }
.dashboard-page .dashboard-metric.is-main-score { background: #274e43; border-color: #274e43; }
.dashboard-page .is-main-score h3, .dashboard-page .is-main-score p { color: #cee0d5; }
.dashboard-page .is-main-score > strong { color: #fffdf5; }
.dashboard-page .dashboard-icon { display: none; }
.dashboard-save-note { color: #62736b; font-size: .75rem; line-height: 1.7; margin: 15px 0 30px; }
.dashboard-game-panel, .dashboard-run-panel { margin: 28px 0; padding: 26px; background: #fffdf8; border: 1px solid var(--dashboard-line); border-radius: 16px; }
.dashboard-game-panel h3, .dashboard-run-panel h3 { margin: 0; font: 550 1.35rem/1.3 system-ui,sans-serif; }
.dashboard-game-panel > p, .dashboard-run-panel > p { color: #66746c; font-size: .8rem; margin: 8px 0 22px; }
.dashboard-game-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.dashboard-game-card { display: grid; gap: 7px; padding: 17px; background: #f4f5ef; border-radius: 10px; border: 1px solid #e6e8df; }
.dashboard-game-card h4 { margin: 0 0 4px; color: #4f6558; font-size: .77rem; font-weight: 600; }
.dashboard-game-card > strong { font-size: 1.4rem; font-weight: 600; letter-spacing: -.04em; }
.dashboard-game-card span, .dashboard-game-card small { font-size: .7rem; color: #67756a; }
.dashboard-table-scroll { overflow-x: auto; }
.dashboard-history-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .78rem; }
.dashboard-history-table th { padding: 12px 10px; border-bottom: 1px solid #cbd4ce; color: #6a7a70; font-weight: 550; white-space: nowrap; }
.dashboard-history-table td { padding: 17px 10px; border-bottom: 1px solid #eceee6; line-height: 1.5; }
.dashboard-history-table td:first-child { min-width: 150px; max-width: 300px; }
.dashboard-history-table td strong { display: block; font-weight: 600; }
.dashboard-history-table td small { display: block; color: #68796d; font-size: .7rem; }
.dashboard-page .dashboard-section-heading { margin: 36px 0 16px; }
.dashboard-page .dashboard-section-heading h3 { font: 500 1.65rem/1.2 Georgia,serif; color: #284638; }
.dashboard-page .dashboard-metrics { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; margin: 0 0 30px; }
.dashboard-page .dashboard-metrics .dashboard-metric { padding: 18px; min-height: 146px; background: #f3f4ec; }
.dashboard-page .dashboard-metric.is-memory::before, .dashboard-page .dashboard-metric.is-memory::after { display: none; }
.dashboard-page .dashboard-metrics .dashboard-metric > strong { font-size: 2rem; }
.dashboard-page .dashboard-content { grid-template-columns: minmax(0,1fr) 260px; gap: 20px; }
.dashboard-page .dashboard-group, .dashboard-page .dashboard-accuracy, .dashboard-page .dashboard-empty { border: 1px solid var(--dashboard-line); border-image: none; border-radius: 12px; background: #fffdf8; box-shadow: none; }
.dashboard-page .dashboard-group > summary { grid-template-columns: 44px minmax(100px,1fr) 90px 48px 48px 16px; min-height: 84px; gap: 12px; padding: 16px; }
.dashboard-page .dashboard-group-glyph { width: 40px; height: 44px; border: 0; border-radius: 8px; background: #edf0e5; transform: none; font-size: 1.6rem; }
.dashboard-page .dashboard-group-title > strong { font: 600 1rem/1.3 system-ui,sans-serif; }
.dashboard-page .dashboard-decks { background: #f7f7f0; border-radius: 0 0 12px 12px; }
.dashboard-page .dashboard-empty { padding: 28px; }
.dashboard-page .dashboard-empty h3 { font: 500 1.6rem/1.2 Georgia,serif; }
.dashboard-page .dashboard-empty button { color: #fff; background: #274e43; border-color: #274e43; }
.dashboard-page .dashboard-closing { margin: 40px 0 0; opacity: .65; }
body.dashboard-home .hero { background: #fffdf8; border: 1px solid #e0e3d9; box-shadow: 0 4px 20px #203d3508; }
body.dashboard-home .learning-nav { background: #eff2e9; border: 0; box-shadow: none; }
body.dashboard-home .learning-nav button { background: transparent; border: 0; border-image: none; border-radius: 8px; color: #506756; font-family: system-ui,sans-serif; font-size: .82rem; box-shadow: none; }
body.dashboard-home .learning-nav button[aria-current="page"] { background: #dce7db; color: #203f32; }
body.dashboard-home .active-profile { background: #edf2e7; border-color: #d9e2d4; box-shadow: none; }
.dashboard-page .dashboard-accuracy { padding: 20px; }
.dashboard-page .dashboard-accuracy .dashboard-section-heading { margin-top: 0; }
.dashboard-page .dashboard-accuracy-row > span { font-family: system-ui,sans-serif; }
.dashboard-page .dashboard-accuracy-row i b { background: #426e5a; }
.account-actions { display: flex; flex-wrap: wrap; gap: 12px 20px; margin: 4px 0 18px; }
.account-actions button { padding: 0; background: none; border: 0; color: #254d46; font: 600 .82rem/1.5 system-ui,sans-serif; text-decoration: underline; cursor: pointer; }
.profile-field[hidden] { display: none; }
.profile-login:has(#register-name-field:not([hidden])) .profile-form-copy { margin-bottom: 28px; }
@media(max-width:1000px) {
  .dashboard-overview { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-page .dashboard-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .dashboard-page .dashboard-content { grid-template-columns: 1fr; }
}
@media(max-width:600px) {
  .dashboard-page { padding: 0 0 24px; }
  .dashboard-page .dashboard-intro { display: block; padding: 20px 0 24px; }
  .dashboard-page .dashboard-intro h2 { max-width: 320px; }
  .dashboard-page .dashboard-continue { margin-top: 20px; }
  .dashboard-overview { gap: 10px; }
  .dashboard-page .dashboard-metric { padding: 17px; min-height: 174px; }
  .dashboard-page .dashboard-metric h3 { font-size: .75rem; margin-bottom: 20px; }
  .dashboard-game-panel, .dashboard-run-panel { padding: 18px 14px; margin: 20px 0; }
  .dashboard-game-cards { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .dashboard-game-card { padding: 13px; }
  .dashboard-page .dashboard-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-page .dashboard-group > summary { grid-template-columns: 36px minmax(0,1fr) 44px 44px 12px; gap: 8px; padding: 12px; }
  .dashboard-page .dashboard-group-progress { display: none; }
  .dashboard-page .dashboard-section-heading { gap: 12px; }
  .dashboard-page .dashboard-metrics .dashboard-metric { grid-column: auto; }
  .dashboard-page .dashboard-groups { order: 0; }
  .dashboard-page .dashboard-accuracy { order: 1; }
  .dashboard-history-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .dashboard-history-table, .dashboard-history-table tbody { display: block; width: 100%; }
  .dashboard-history-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 18px 0; border-top: 1px solid #e0e5da; }
  .dashboard-history-table td { display: block; padding: 0; border: 0; min-width: 0; }
  .dashboard-history-table td:first-child { grid-column: 1/-1; max-width: none; }
  .dashboard-history-table td::before { content: attr(data-label); display: block; color: #6a7a70; font-size: .65rem; margin-bottom: 3px; }
  .dashboard-history-table td:first-child::before { display: none; }
}
