/* "My space" ([ef_account]). Colours come from the --ef-* contract
   (ef-tokens.css), so the page follows the theme's light and dark modes. */

/* `hidden` must win over the display rules below (a form is display:grid here). */
.ef-acct [hidden] { display: none !important; }
.ef-acct { max-width: 640px; margin: 0 auto; display: grid; gap: 28px; color: var(--ef-text); }
.ef-acct__head { display: grid; gap: 6px; }
.ef-acct__kicker { margin: 0; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; color: var(--accent, var(--ef-primary)); }
.ef-acct__h1 { margin: 0; font-family: var(--serif, Georgia, serif); font-weight: 600; font-size: clamp(28px, 4vw, 34px); color: var(--head, var(--ef-text)); letter-spacing: -.01em; text-wrap: balance; }
.ef-acct__lede { margin: 4px 0 0; color: var(--ef-text-subtle); line-height: 1.6; max-width: 56ch; }
.ef-acct__h2 { margin: 0 0 12px; font-family: var(--serif, Georgia, serif); font-weight: 600; font-size: 21px; color: var(--head, var(--ef-text)); }

.ef-acct__card { background: var(--ef-bg-soft); border: 1px solid var(--ef-border); border-radius: 16px; padding: 22px; display: grid; gap: 14px; }
.ef-acct__form { display: grid; gap: 8px; }
.ef-acct__label { font-weight: 600; font-size: 14px; }
.ef-acct__row { display: flex; gap: 10px; flex-wrap: wrap; }
.ef-acct__row input { flex: 1 1 220px; min-width: 0; font: inherit; font-size: 16px; color: var(--ef-text); background: var(--surface, #fff); border: 1.5px solid var(--ef-border); border-radius: 10px; padding: 11px 14px; }
.ef-acct__row input:focus { outline: none; border-color: var(--ef-primary); box-shadow: 0 0 0 3px var(--ef-tint); }
.ef-acct__code { letter-spacing: .4em; font-variant-numeric: tabular-nums; font-family: ui-monospace, Menlo, Consolas, monospace; max-width: 220px; }

.ef-acct__btn { display: inline-block; font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; background: var(--ef-primary); color: var(--on-fill, #fff); border: 0; border-radius: 10px; padding: 11px 18px; }
.ef-acct__btn:hover { background: var(--ef-primary-dark); color: var(--on-fill, #fff); }
.ef-acct__btn[disabled] { opacity: .6; cursor: progress; }
.ef-acct__btn--ghost { background: transparent; color: var(--ef-text); border: 1.5px solid var(--ef-border); }
.ef-acct__btn--ghost:hover { background: transparent; border-color: var(--ef-primary); color: var(--ef-primary); }
.ef-acct__link { font: inherit; font-size: 14px; background: none; border: 0; padding: 0; color: var(--ef-primary); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ef-acct__links { display: flex; gap: 18px; flex-wrap: wrap; margin: 4px 0 0; }
.ef-acct__danger { color: var(--ef-wrong-text); }
/* Buttons that are links: the theme's `.ef-content a` would otherwise repaint them in the link colour. */
.ef-acct a.ef-acct__btn, .ef-acct a.ef-acct__btn:hover { color: var(--on-fill, #fff); text-decoration: none; }
.ef-acct a.ef-acct__btn--ghost { color: var(--ef-text); }
.ef-acct a.ef-acct__btn--ghost:hover { color: var(--ef-primary); }
.ef-acct__btn:focus-visible, .ef-acct__link:focus-visible { outline: 2px solid var(--ef-primary); outline-offset: 2px; }

.ef-acct__sent { margin: 0 0 4px; line-height: 1.5; }
.ef-acct__msg { margin: 0; min-height: 1.2em; font-size: 14px; color: var(--ef-text-subtle); }
.ef-acct__msg.is-error { color: var(--ef-wrong-text); }
.ef-acct__small, .ef-acct__free { margin: 0; font-size: 13.5px; color: var(--ef-text-muted); line-height: 1.55; }
.ef-acct__free { color: var(--ef-text-subtle); }

.ef-acct__or { display: flex; align-items: center; gap: 12px; color: var(--ef-text-muted); font-size: 13px; }
.ef-acct__or::before, .ef-acct__or::after { content: ""; flex: 1; height: 1px; background: var(--ef-border); }
.ef-acct__google { min-height: 44px; }

.ef-acct__sec { border-top: 1px solid var(--ef-border); padding-top: 22px; }
.ef-acct__empty { margin: 0; color: var(--ef-text-muted); line-height: 1.55; }
.ef-acct__moved { margin: 0 0 10px; font-weight: 600; color: var(--ef-correct-text); }
.ef-acct__tests, .ef-acct__acts { list-style: none; margin: 0 0 14px; padding: 0; display: grid; }
.ef-acct__tests li, .ef-acct__acts li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--ef-border-light); }
.ef-acct__tests li { grid-template-columns: 56px minmax(0, 1fr) auto; }
.ef-acct__lvl { font-weight: 700; font-family: var(--serif, Georgia, serif); font-size: 18px; color: var(--ef-primary); }
.ef-acct__what { min-width: 0; overflow-wrap: anywhere; }
.ef-acct__score { font-variant-numeric: tabular-nums; color: var(--ef-text-subtle); font-size: 14px; }
.ef-acct time { color: var(--ef-text-muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* The theme spaces `.ef-content ul` and `p` for articles; inside My space the
   layout above owns spacing, so neutralise those at a matching specificity. */
.ef-acct ul, .ef-acct ol { padding-left: 0; }
.ef-acct ul.ef-acct__hw, .ef-acct li > * { margin-top: 0; }
.ef-acct p.ef-acct__hwn { margin: 4px 0 0; }
.ef-acct ul.ef-acct__hw { margin-bottom: 0; }

/* progress */
.ef-acct__cheer { margin: 0 0 16px; font-size: 16px; line-height: 1.5; }
.ef-acct__tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 20px; }
.ef-acct__tile { border: 1px solid var(--ef-border); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; align-content: start; background: var(--surface, #fff); }
.ef-acct__tile strong { font-family: var(--serif, Georgia, serif); font-size: 28px; font-weight: 600; line-height: 1.1; color: var(--head, var(--ef-text)); font-variant-numeric: tabular-nums; }
.ef-acct__tile span { font-size: 13px; color: var(--ef-text-subtle); line-height: 1.35; }
.ef-acct__tile em { display: block; font-style: normal; color: var(--ef-correct-text); font-weight: 600; margin-top: 2px; }
.ef-acct__tile.is-streak { background: var(--ef-secondary); border-color: var(--ef-tint); }
.ef-acct__tile.is-streak strong { color: var(--ef-primary); }
.ef-acct__heat { margin: 0; }
.ef-acct__heat figcaption { font-size: 13px; color: var(--ef-text-muted); margin: 0 0 8px; }
.ef-acct__heat-grid { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; max-width: 300px; }
.ef-acct__heat-grid span, .ef-acct__heat-key span { display: block; aspect-ratio: 1; border-radius: 3px; background: var(--ef-border-light); }
.ef-acct__heat-grid .l1, .ef-acct__heat-key .l1 { background: color-mix(in srgb, var(--ef-primary) 45%, var(--ef-border-light)); }
.ef-acct__heat-grid .l2, .ef-acct__heat-key .l2 { background: color-mix(in srgb, var(--ef-primary) 75%, var(--ef-border-light)); }
.ef-acct__heat-grid .l3, .ef-acct__heat-key .l3 { background: var(--ef-primary); }
.ef-acct__heat-grid .is-future { background: transparent; }
.ef-acct__heat-key { display: flex; align-items: center; gap: 3px; margin-top: 8px; font-size: 12px; color: var(--ef-text-muted); }
.ef-acct__heat-key span { width: 11px; }
@media (max-width: 560px) { .ef-acct__tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* daily challenge (includes/daily.php) — the one thing to do today */
.ef-acct__defi { display: grid; gap: 14px; }
.ef-acct__defi-main { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; border: 1px solid var(--ef-border); border-radius: 14px; padding: 16px 18px; background: var(--ef-bg-soft); }
.ef-acct__defi.is-done .ef-acct__defi-main { background: transparent; }
.ef-acct__defi-icon { flex: none; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: var(--ef-secondary); }
.ef-acct__defi-text { flex: 1 1 220px; min-width: 0; display: grid; gap: 2px; }
.ef-acct__defi-text .ef-acct__h2 { margin: 0; }
.ef-acct__defi-kicker { margin: 0; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ef-text-muted); font-weight: 600; }
.ef-acct__defi-state { margin: 0; font-size: 14px; color: var(--ef-text-subtle); }
.ef-acct__defi.is-done .ef-acct__defi-state { color: var(--ef-correct-text); font-weight: 600; }
.ef-acct__defi-foot { display: flex; gap: 14px 18px; align-items: center; flex-wrap: wrap; }
.ef-acct__defi-week { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.ef-acct__defi-week li { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--ef-text-muted); background: var(--ef-border-light); }
.ef-acct__defi-week li.is-won { background: var(--ef-correct-bg); color: var(--ef-correct-text); }
.ef-acct__defi-week li.is-played { background: var(--ef-tint); color: var(--ef-text-subtle); }
.ef-acct__defi-week li.is-today { background: transparent; box-shadow: inset 0 0 0 2px var(--ef-primary); color: var(--ef-primary); }
.ef-acct__defi-streak { margin: 0; font-size: 14px; font-weight: 600; color: var(--ef-text); }

/* homework */
.ef-acct__hw { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ef-acct__hwi { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 1px solid var(--ef-border); border-left: 4px solid var(--ef-primary); border-radius: 12px; padding: 14px 16px; background: var(--surface, #fff); }
.ef-acct__hwi.is-late { border-left-color: var(--ef-wrong-border); }
.ef-acct__hwi.is-done { border-left-color: var(--ef-correct-border); background: transparent; }
.ef-acct__hwm { display: grid; gap: 3px; min-width: 0; flex: 1 1 260px; }
.ef-acct__hwt { font-weight: 600; overflow-wrap: anywhere; }
.ef-acct__hws { font-size: 13px; color: var(--ef-text-muted); }
.ef-acct__hwi.is-late .ef-acct__hws { color: var(--ef-wrong-text); font-weight: 600; }
.ef-acct__hwi.is-done .ef-acct__hws { color: var(--ef-correct-text); }
.ef-acct__hwn { margin: 4px 0 0; font-size: 14px; color: var(--ef-text-subtle); white-space: pre-line; }
.ef-acct__hwa { display: flex; gap: 14px; align-items: center; }

.ef-acct__foot { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; border-top: 1px solid var(--ef-border); padding-top: 22px; }
.ef-acct__foot .ef-acct__msg { flex-basis: 100%; }

@media (max-width: 480px) {
	.ef-acct__card { padding: 18px 16px; }
	.ef-acct__acts li { grid-template-columns: minmax(0, 1fr) auto; }
	.ef-acct__acts time { grid-column: 1 / -1; }
}
