/* =============================================================================
   Mathis page stylesheet.

   Loaded AFTER styles.css and modern.css, and only by /mathis/. It adds what
   the shared sheets do not have -- the browser mock-up, the roadmap states, the
   closing quote -- and never redefines a shared class, so the other pages are
   untouched.

   Mathis gets its own accent (warm amber) instead of the teal/blue of NativeX:
   the brief asks for a distinct identity, and a page that reused the product
   palette would read as a NativeX section rather than as a product of its own.
   The accent is declared once per theme, and every rule below reads it through
   --mx-accent, so a theme that is added later only has to set the tokens.
   ========================================================================== */

/* --- Tokens ---------------------------------------------------------------
   Retro is the base sheet, so the default values below are the Win9x ones. */
:root {
  --mx-accent: #804000;
  --mx-accent-2: #808000;
  --mx-accent-soft: #efefef;
  --mx-ink: #000000;
  --mx-dim: #303030;
  --mx-surface: #ffffff;
  --mx-line: #7a7a7a;
  --mx-radius: 0;
  --mx-radius-sm: 0;
  --mx-shadow: 1px 1px 0 #000;
}

[data-skin="modern"] {
  --mx-accent: #b45309;
  --mx-accent-2: #0f766e;
  --mx-accent-soft: rgba(180, 83, 9, .10);
  --mx-ink: var(--m-ink);
  --mx-dim: var(--m-dim);
  --mx-surface: var(--m-surface);
  --mx-line: var(--m-border-2);
  --mx-radius: var(--m-radius);
  --mx-radius-sm: var(--m-radius-sm);
  --mx-shadow: var(--m-shadow);
}

[data-skin="modern"][data-mode="dark"] {
  --mx-accent: #f0a35e;
  --mx-accent-2: #2dd4bf;
  --mx-accent-soft: rgba(240, 163, 94, .14);
}

/* --- Hero ---------------------------------------------------------------- */

/* The product name carries the page, so the subtitle sits inside the h1 as a
   second line: one heading, two registers. Keeping it in the h1 also keeps the
   document outline honest -- the subtitle is not a section of its own. */
.mx-h1-sub {
  display: block;
  margin-top: 10px;
  font-size: .44em;
  font-weight: 500;
  line-height: 1.3;
  color: var(--mx-dim);
  letter-spacing: .01em;
}
[data-skin="retro"] .mx-h1-sub { font-size: .55em; }

[data-skin="modern"] .mx-hero .eyebrow {
  background: var(--mx-accent-soft);
  border-color: color-mix(in srgb, var(--mx-accent) 35%, transparent);
  color: var(--mx-accent);
}

/* --- The browser mock-up -------------------------------------------------
   Drawn entirely in CSS. Nothing here is borrowed from an existing browser:
   it is the layout Mathis actually has -- title bar, tab strip, toolbar, side
   panel, viewport, status bar -- with its own placeholder screen. */
.mx-window {
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
  background: var(--mx-surface);
  border: 1px solid var(--mx-line);
  border-radius: var(--mx-radius);
  box-shadow: var(--mx-shadow);
  overflow: hidden;
  font-size: 12px;
  line-height: 1.4;
}

.mx-titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  background: linear-gradient(180deg,
              color-mix(in srgb, var(--mx-accent) 12%, var(--mx-surface)),
              var(--mx-surface));
  border-bottom: 1px solid var(--mx-line);
}
.mx-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.mx-dot--a { background: #e06c5a; }
.mx-dot--b { background: #e0b34a; }
.mx-dot--c { background: #57a06a; }
.mx-titlebar__name {
  margin-left: 8px;
  font-weight: 700;
  color: var(--mx-ink);
  letter-spacing: .02em;
}

.mx-tabs { display: flex; align-items: flex-end; gap: 4px; padding: 8px 10px 0; }
.mx-tab {
  max-width: 42%;
  padding: 7px 12px;
  border: 1px solid var(--mx-line);
  border-bottom: none;
  border-radius: var(--mx-radius-sm) var(--mx-radius-sm) 0 0;
  background: color-mix(in srgb, var(--mx-ink) 5%, transparent);
  color: var(--mx-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mx-tab.is-active {
  background: var(--mx-surface);
  color: var(--mx-ink);
  font-weight: 600;
  box-shadow: inset 0 2px 0 var(--mx-accent);
}
.mx-tab--plus { max-width: none; padding: 7px 10px; border-color: transparent; background: transparent; }

.mx-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid var(--mx-line);
  border-bottom: 1px solid var(--mx-line);
}
.mx-nav-btn {
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: var(--mx-radius-sm);
  color: var(--mx-dim);
  background: color-mix(in srgb, var(--mx-ink) 5%, transparent);
}
/* Back and forward are dimmed on purpose: on a fresh tab there is nowhere to
   go, and the real application disables them for exactly that reason. */
.mx-nav-btn.is-off { opacity: .35; }
.mx-omnibox {
  flex: 1 1 auto;
  min-width: 0;
  padding: 5px 12px;
  border: 1px solid var(--mx-line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--mx-ink) 4%, transparent);
  color: var(--mx-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
[data-skin="retro"] .mx-omnibox { border-radius: 0; }

.mx-body { display: flex; min-height: 170px; }
.mx-side {
  flex: none;
  width: 44px;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border-right: 1px solid var(--mx-line);
  background: color-mix(in srgb, var(--mx-ink) 3%, transparent);
}
.mx-side__item {
  width: 20px;
  height: 20px;
  border-radius: var(--mx-radius-sm);
  background: color-mix(in srgb, var(--mx-ink) 12%, transparent);
}
.mx-side__item.is-active { background: var(--mx-accent); opacity: .75; }

.mx-viewport {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px 18px;
  text-align: center;
}
.mx-viewport__title { font-size: 15px; font-weight: 700; color: var(--mx-ink); }
.mx-viewport__text { margin: 0; max-width: 34ch; color: var(--mx-dim); }
.mx-viewport__meta {
  margin-top: 4px;
  padding: 3px 10px;
  border: 1px solid color-mix(in srgb, var(--mx-accent) 40%, transparent);
  border-radius: 999px;
  background: var(--mx-accent-soft);
  color: var(--mx-accent);
  font-family: var(--mono);
  font-size: 11px;
}
[data-skin="retro"] .mx-viewport__meta { border-radius: 0; }

.mx-status {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 12px;
  border-top: 1px solid var(--mx-line);
  background: color-mix(in srgb, var(--mx-ink) 4%, transparent);
  color: var(--mx-dim);
  font-size: 11px;
}
.mx-status__right { white-space: nowrap; }

/* --- Pull quote ---------------------------------------------------------- */
.mx-quote {
  margin: 34px auto 0;
  max-width: 62ch;
  padding: 18px 22px;
  border-left: 3px solid var(--mx-accent);
  background: var(--mx-accent-soft);
  border-radius: 0 var(--mx-radius-sm) var(--mx-radius-sm) 0;
  color: var(--mx-ink);
  font-size: 1.06rem;
  line-height: 1.55;
}

/* --- State cards ---------------------------------------------------------
   The badge sits on the same row as the title and must never be squeezed by a
   long heading, hence the flex: none on the badge and the wrap on the row. */
.mx-state .card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mx-state .card-head h3 { margin: 0; min-width: 0; }
.mx-state .card-head .badge { flex: none; }
.mx-state .card code { word-break: break-word; }

.mx-facts { margin-top: 30px; }
.mx-facts .v span { color: var(--mx-accent); }

/* --- "What Mathis is not yet" -------------------------------------------- */
.mx-not {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.mx-not li {
  position: relative;
  padding: 14px 16px 14px 44px;
  border: 1px solid var(--mx-line);
  border-radius: var(--mx-radius-sm);
  background: var(--mx-surface);
  color: var(--mx-dim);
}
/* A dash rather than a cross: this section states limits, it does not mark
   failures. */
.mx-not li::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 1.35em;
  width: 12px;
  height: 2px;
  background: var(--mx-accent);
}
.mx-not b { color: var(--mx-ink); }

/* --- Roadmap -------------------------------------------------------------
   The shared .timeline already draws the rail and the bullets; only the
   "current" state is new -- the shared sheet knows done and not-done, and a
   roadmap needs the step being worked on to be visible. */
.mx-roadmap .tl-item.current::before {
  background: var(--mx-accent);
  box-shadow: 0 0 0 3px var(--mx-accent-soft);
}
[data-skin="modern"] .mx-roadmap .tl-item.current::before {
  background: var(--mx-accent);
  box-shadow: 0 0 0 4px var(--mx-accent-soft);
}
.mx-roadmap .tl-item h4 { flex-wrap: wrap; gap: 8px; }
.mx-roadmap .tl-item .badge { flex: none; }

/* --- Forecast timeline ----------------------------------------------------
   An ordered list of steps: a date column, a rail with a dot per step, and a
   card. Built from real elements rather than the shared .timeline pseudo-
   elements, so each part can carry its own state. */
:root {
  --mx-done: #008000;
  --mx-next: #c0c0c0;
  --mx-rail-next: #a0a0a0;
  --mx-halo: #e8d0b0;
}
[data-skin="modern"] {
  --mx-done: #12b3a3;
  --mx-next: #cdeeea;
  --mx-rail-next: #dfe5ec;
  --mx-halo: #f6dcc4;
}
[data-skin="modern"][data-mode="dark"] {
  --mx-done: #2dd4bf;
  --mx-next: #1f4b47;
  --mx-rail-next: #2a3442;
  --mx-halo: #5a3b20;
}

.mx-plan { list-style: none; margin: 36px 0 0; padding: 0; max-width: 900px; }
.mx-step {
  display: grid;
  grid-template-columns: 168px 40px minmax(0, 1fr);
  grid-template-areas: "when mark body";
  column-gap: 12px;
}
.mx-step__when {
  grid-area: when;
  padding-top: 17px;
  text-align: right;
  font-family: var(--mono);
  font-size: .84rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--mx-ink);
}
.mx-step__when small {
  display: block;
  margin-top: 2px;
  font-weight: 400;
  font-size: .74rem;
  color: var(--mx-dim);
}
.mx-step.is-current .mx-step__when { color: var(--mx-accent); }

/* The rail is the right border of the mark column, and each dot hangs over it.
   Each step colours the rail from its row's top down to the next step, so the
   colour changes where the work stands. */
.mx-step__mark {
  grid-area: mark;
  box-sizing: border-box;
  width: 22px;
  border-right: 4px solid var(--mx-rail-next);
}
.mx-step__dot {
  width: 24px;
  height: 24px;
  margin: 14px 0 0 8px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: var(--mx-next);
}
.mx-step.is-done .mx-step__mark { border-right-color: var(--mx-done); }
.mx-step.is-done .mx-step__dot { background: var(--mx-done); }
.mx-step.is-current .mx-step__mark { border-right-color: var(--mx-accent); }
/* Where the work stands: a larger dot in the accent, ringed. */
.mx-step.is-current .mx-step__dot {
  width: 30px;
  height: 30px;
  margin: 11px 0 0 5px;
  border: 5px solid var(--mx-halo);
  background: var(--mx-accent);
}
/* The rail starts at the first dot and stops at the last one. */
.mx-step:first-child .mx-step__mark { margin-top: 26px; }
.mx-step:first-child .mx-step__dot { margin-top: -12px; }
.mx-step:last-child .mx-step__mark { align-self: start; height: 26px; }

.mx-step__body {
  grid-area: body;
  min-width: 0;
  margin-bottom: 16px;
  padding: 14px 18px 15px;
  border: 1px solid var(--mx-line);
  border-radius: var(--mx-radius-sm);
  background: var(--mx-surface);
}
.mx-step__body h3 {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 1.04rem;
}
.mx-step__body .badge { flex: none; }
.mx-step__body p { margin: 6px 0 0; font-size: .93rem; color: var(--mx-dim); }
.mx-step.is-current .mx-step__body {
  border-color: var(--mx-accent);
  background: var(--mx-accent-soft);
}
/* Steps ahead are forecasts, not facts: the card steps back a little. */
.mx-step.is-next .mx-step__body { background: transparent; }
.mx-here {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--mx-accent);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
[data-skin="retro"] .mx-here { border-radius: 0; }
[data-skin="retro"] .mx-step__dot { border-radius: 0; }

@media (max-width: 640px) {
  .mx-step {
    grid-template-columns: 30px minmax(0, 1fr);
    grid-template-areas: "mark when" "mark body";
    column-gap: 10px;
  }
  .mx-step__when { padding-top: 0; margin: 2px 0 6px; text-align: left; }
  .mx-step__when small { display: inline; margin: 0 0 0 6px; }
  .mx-step__mark { width: 17px; }
  .mx-step__dot { margin: 0 0 0 3px; }
  .mx-step.is-current .mx-step__dot { margin: -3px 0 0 0; }
  .mx-step:first-child .mx-step__mark { margin-top: 12px; }
  .mx-step:first-child .mx-step__dot { margin-top: -12px; }
  .mx-step:last-child .mx-step__mark { height: 12px; }
  .mx-step__body { padding: 12px 14px; }
}

/* --- Journal -------------------------------------------------------------
   Une entrée = une date et un fait. La date porte l'accent parce que c'est
   l'information qui décide si l'on continue de lire. */
.mx-log { margin-top: 28px; display: grid; gap: 14px; }
.mx-log__item {
  padding: 18px 20px;
  border: 1px solid var(--mx-line);
  border-left: 3px solid var(--mx-accent);
  border-radius: 0 var(--mx-radius-sm) var(--mx-radius-sm) 0;
  background: var(--mx-surface);
}
.mx-log__item time {
  display: block;
  margin-bottom: 4px;
  color: var(--mx-accent);
  font-family: var(--mono);
  font-size: .82rem;
  letter-spacing: .02em;
}
.mx-log__item h3 { margin: 0 0 6px; }
.mx-log__item p { margin: 0; color: var(--mx-dim); }

/* --- Subscribe ----------------------------------------------------------- */
.mx-subscribe { margin-top: 26px; }
.mx-subscribe .card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mx-subscribe .card-head h3 { margin: 0; min-width: 0; }
.mx-subscribe .card-head .badge { flex: none; }

/* L'URL du flux se copie à la main : elle doit rester lisible entière, donc
   elle a le droit de se couper n'importe où plutôt que de déborder. */
.mx-feed-url {
  margin: 12px 0 0;
  padding: 9px 12px;
  border: 1px solid var(--mx-line);
  border-radius: var(--mx-radius-sm);
  background: color-mix(in srgb, var(--mx-ink) 4%, transparent);
  overflow-wrap: anywhere;
  word-break: break-all;
}
.mx-feed-url code { font-size: .84rem; color: var(--mx-ink); background: none; padding: 0; }

.mx-fineprint { margin-top: 10px; font-size: .86rem; color: var(--mx-dim); opacity: .92; }

/* --- Closing ------------------------------------------------------------- */
.mx-closing {
  margin: 12px auto 16px;
  max-width: 40ch;
  font-size: 1.32rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--mx-ink);
}
[data-skin="modern"] .mx-closing {
  background: linear-gradient(100deg, var(--mx-accent), var(--mx-accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Dans le bloc .cta, le fond est deja un degrade teal/bleu et le texte y est
   blanc. Un second degrade ambre par-dessus donnait une phrase quasi illisible
   -- vu a la capture, pas suppose. La phrase de cloture y reste donc pleine,
   blanche, et c'est le fond qui porte la couleur. */
.cta .mx-closing,
[data-skin="modern"] .cta .mx-closing {
  background: none;
  color: #fff;
  -webkit-text-fill-color: #fff;
}
[data-skin="retro"] .cta .mx-closing { color: var(--mx-ink); -webkit-text-fill-color: var(--mx-ink); }

/* --- Language menu: an entry that is announced, not linked ----------------
   English does not exist for this page yet. The entry stays visible so the menu
   keeps the shape it has everywhere else, but it is a span: a link to a missing
   page would be worse than a language announced as coming. */
.lang-menu__item.is-soon { opacity: .55; cursor: default; }

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 900px) {
  .mx-window { max-width: 100%; font-size: 11px; }
  .mx-body { min-height: 150px; }
}

@media (max-width: 560px) {
  .mx-h1-sub { font-size: .5em; }
  /* The side panel is the first thing a narrow window drops, in the mock-up as
     in the application. */
  .mx-side { display: none; }
  .mx-tab { max-width: 50%; }
  .mx-status { font-size: 10px; }
  .mx-not li { padding: 12px 14px 12px 38px; }
  .mx-closing { font-size: 1.14rem; }
}

/* Animations stay light, and disappear entirely for readers who ask for it. */
@media (prefers-reduced-motion: reduce) {
  .mx-window { transition: none; }
}
