/* Le Défi du jour — the shell around a daily game.
   The boards, keyboards and score cards are ef-grilles.css; this file is only
   the frame: which puzzle it is, which track you're on, and what you get to
   keep afterwards. Same --ef-* palette, and --surface/--ink wherever something
   has to survive dark mode. */

/* Playing widens .ef-gr to 1240px so a board can breathe — but the daily's
   header, track switcher and result card are reading matter and want a column,
   so they stay narrow inside the wide shell. */
.ef-defi--on .ef-defi__meta,
.ef-defi--on .ef-defi__tracks,
.ef-defi--on .ef-defi__note,
.ef-defi--on .ef-defi__ask,
.ef-defi--on .ef-defi__preview { max-width: 640px; margin-inline: auto; }

/* The word games hide the lede while playing — a puzzle wants the screen. Here
   the game is on screen from the first second, and the one line saying what
   this page IS is the only introduction a first-time visitor gets. */
.ef-defi--on .ef-gr__lede { display: block; max-width: 52ch; margin-left: auto; margin-right: auto; }

/* which puzzle this is */
.ef-defi__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: .4rem .7rem; margin: 0 auto .9rem; }
.ef-defi__no { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700;
  color: var(--ef-primary, #733428); background: var(--ef-secondary, #FFF0EE);
  border-radius: 999px; padding: .25rem .7rem; }
.ef-defi__game { font-family: var(--ef-serif, Georgia, serif); font-size: 1.05rem;
  color: var(--ef-primary-dark, #4a2119); }
.ef-defi__flame { font-size: .82rem; font-weight: 600; color: var(--ef-text-muted, #8a7a73); }

/* previewing another date: unmistakably not the live page */
.ef-defi__preview { text-align: center; font-size: .82rem; font-weight: 600;
  color: var(--ef-primary-dark, #4a2119); background: var(--ef-tint, #F6DED7);
  border-radius: 10px; padding: .4rem .8rem; margin: 0 auto .8rem; }

/* the two tracks */
.ef-defi__ask { text-align: center; font-size: .86rem; font-weight: 600;
  color: var(--ef-text-subtle, #6b5b54); margin: 0 auto .5rem; }
.ef-defi__tracks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .6rem; margin: 0 auto .5rem; }
.ef-defi__track { display: flex; flex-direction: column; align-items: center; gap: .2rem;
  text-align: center; padding: .8rem .9rem; border-radius: 14px; cursor: pointer;
  background: var(--ef-bg-soft, #FFFBF9); border: 1.5px solid var(--ef-border-light, #F0E4E0);
  color: var(--ef-text, #4a3b35); }
.ef-defi__track.is-on { background: var(--ef-secondary, #FFF0EE); border-color: var(--ef-primary, #733428); }
.ef-defi__track-name { font-family: var(--ef-serif, Georgia, serif); font-size: 1.05rem;
  color: var(--ef-primary-dark, #4a2119); }
.ef-defi__track-sub { font-size: .76rem; color: var(--ef-text-muted, #8a7a73); }
/* Answered: the gate shrinks to a switch and gets out of the game's way. */
.ef-defi__tracks.is-compact { display: flex; justify-content: center; gap: .4rem; max-width: none; }
.ef-defi__tracks.is-compact .ef-defi__track { flex: 0 0 auto; flex-direction: row; gap: .45rem;
  padding: .3rem .8rem; border-radius: 999px; }
.ef-defi__tracks.is-compact .ef-defi__track-name { font-size: .88rem; }
.ef-defi__tracks.is-compact .ef-defi__track-sub { font-size: .7rem; }
.ef-defi__note { margin-bottom: 1.2rem; }

.ef-defi__stage { margin-top: .4rem; }

/* the card that ends the day */
.ef-defi__result { max-width: 480px; margin: 1.6rem auto 0; text-align: center;
  padding: 1.2rem 1.1rem 1rem; border-radius: 16px;
  background: var(--ef-bg-soft, #FFFBF9); border: 1.5px solid var(--ef-tint-strong, #EFC9BE); }
/* Doubled up on purpose: this is an <h2> inside post content, and the theme's
   own heading rule wins against a single class. */
.ef-defi .ef-defi__result-h { font-family: var(--ef-serif, Georgia, serif); font-size: 1.3rem;
  line-height: 1.25; color: var(--ef-primary-dark, #4a2119); margin: 0 0 .3rem; }
.ef-defi__score { font-size: 1.6rem; font-weight: 700; color: var(--ef-primary, #733428); margin: .1rem 0 .4rem; }
.ef-defi__streak-line { font-size: .92rem; font-weight: 600; color: var(--ef-text, #4a3b35); margin: 0 0 .2rem; }
/* Tabular figures so the countdown doesn't jitter a pixel every second. */
.ef-defi__next { font-size: .82rem; color: var(--ef-text-muted, #8a7a73); margin: 0 0 .9rem;
  font-variant-numeric: tabular-nums; }
.ef-defi__result-bar { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
/* The fallback when there's no clipboard API: the text, selectable, in place. */
.ef-defi__share-text { display: block; width: 100%; margin: .6rem auto 0; min-height: 4.5em;
  font-family: inherit; font-size: .82rem; line-height: 1.5; text-align: center;
  border-radius: 10px; padding: .5rem; resize: vertical;
  border: 1px solid var(--ef-border, #E5D4CE); background: var(--surface, #fff); color: var(--ink, #4a3b35); }

@media (max-width: 600px) {
  .ef-defi__game { font-size: .95rem; }
  .ef-defi__score { font-size: 1.35rem; }
}

/* Shown to Aurélie only, while the daily is still closed to students. */
.ef-defi__closed { max-width: 640px; margin: 0 auto 18px; padding: 10px 14px; border-radius: 10px; border: 1px dashed var(--ef-primary); color: var(--ef-text); background: var(--ef-secondary); font-size: 14px; text-align: center; }
