/* ===========================================================================
   TE ACCOUNT
   Composition for the three customer-account pages:
     /account/set-password/   redeem the emailed link
     /account/login/          sign in
     /account/                the portal: plan, calendar promise, interview

   Runs on the TE system (te-system.css). Load that first; this file only
   composes with its tokens and adds the a-* classes these three pages need.
   Everything is scoped under .mfte, so nothing here can leak.

   SHAPE LOCK. Two radii only, both taken from te-system: --te-r-plate (14px)
   for panels, --te-r-control (6px) for controls. No third value below.

   ONE ACCENT. #FF8833 via --te-accent, functional only: the primary button, the
   group rules, the live LED. Never decorative.
   =========================================================================== */

.mfte .a-state { display: none; }
.mfte .a-state.is-active { display: block; }

/* ── Head ─────────────────────────────────────────────────────────────── */

.mfte .a-eyebrow {
  font-family: var(--te-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--te-accent);
  margin: 0 0 10px;
}

.mfte .a-headline {
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--te-heading);
  margin: 0 0 14px;
  font-weight: 700;
}

.mfte .a-accent { color: var(--te-accent); }

.mfte .a-lede {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--te-fg-soft);
  margin: 0 0 26px;
  max-width: 54ch;
}

.mfte .a-login-plate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.92fr);
  column-gap: 28px;
  align-items: center;
}

.mfte .a-login-copy {
  min-width: 0;
  grid-column: 1;
  grid-row: 1;
}

.mfte .a-login-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-column: 2;
  grid-row: 1;
}

.mfte .a-login-visual img {
  display: block;
  width: 85%;
  max-width: 408px;
  height: auto;
  aspect-ratio: 682 / 690;
}

.mfte .a-note {
  font-family: var(--te-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--te-fg-mute);
  margin: 12px 0 0;
}

/* ── Form ─────────────────────────────────────────────────────────────── */

.mfte .a-field { margin: 0 0 18px; max-width: 30rem; }

.mfte .a-label {
  display: block;
  font-family: var(--te-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--te-fg-mute);
  margin: 0 0 8px;
}

.mfte .a-input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 1rem;
  color: var(--te-fg);
  background: var(--te-module);
  border: 1px solid var(--te-plate-edge);
  border-radius: var(--te-r-control);
  padding: 14px 15px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.mfte .a-input::placeholder { color: var(--te-tick); }

.mfte .a-input:focus {
  outline: none;
  background: var(--te-plate);
  border-color: var(--te-accent);
  box-shadow: 0 0 0 3px rgba(255, 136, 51, 0.18);
}

/* Strength is a hint, not a gate: length is the only rule the server enforces,
   so the meter must never look like it is refusing a valid password. */
.mfte .a-meter {
  height: 4px;
  border-radius: var(--te-r-control);
  background: var(--te-recess);
  overflow: hidden;
  margin: 10px 0 6px;
  max-width: 30rem;
}

.mfte .a-meter__fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--te-accent);
  transition: width 0.2s ease;
}

.mfte .a-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 22px 0 0;
}

/* ── Messages ─────────────────────────────────────────────────────────── */

.mfte .a-message {
  display: none;
  border-left: 2px solid var(--te-accent);
  background: var(--te-module);
  border-radius: var(--te-r-control);
  padding: 13px 16px;
  margin: 18px 0 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--te-fg-soft);
  max-width: 44rem;
}

.mfte .a-message.is-active { display: block; }

/* ── Portal: plan strip ───────────────────────────────────────────────── */

.mfte .a-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2px;
  background: var(--te-plate-edge);
  border: 1px solid var(--te-plate-edge);
  border-radius: var(--te-r-control);
  overflow: hidden;
  margin: 0 0 30px;
}

.mfte .a-cell {
  background: var(--te-plate);
  padding: 16px 18px;
}

.mfte .a-cell__label {
  font-family: var(--te-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--te-fg-mute);
  margin: 0 0 6px;
}

.mfte .a-cell__value {
  font-size: 1.0625rem;
  line-height: 1.35;
  color: var(--te-heading);
  font-weight: 700;
  margin: 0;
}

/* Rule 5: one LED strip on the page, and every item in it has one. This is it. */
.mfte .a-led {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--te-accent);
  margin-right: 8px;
  vertical-align: baseline;
  box-shadow: 0 0 0 2px rgba(255, 136, 51, 0.22);
}

/* ── Portal: the calendar promise ─────────────────────────────────────── */

.mfte .a-promise {
  background: var(--te-module);
  border-radius: var(--te-r-control);
  padding: 22px 24px;
  margin: 0 0 34px;
}

.mfte .a-promise__title {
  font-size: 1.125rem;
  line-height: 1.4;
  color: var(--te-heading);
  font-weight: 700;
  margin: 0 0 8px;
}

.mfte .a-promise__body {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--te-fg-soft);
  margin: 0;
  max-width: 60ch;
}

/* ── Portal: the interview read-back ──────────────────────────────────── */

.mfte .a-group { margin: 0 0 26px; }

.mfte .a-group__label {
  font-family: var(--te-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--te-accent);
  margin: 0 0 10px;
}

.mfte .a-answers {
  border-top: 1px solid var(--te-rule);
}

.mfte .a-answer {
  display: grid;
  grid-template-columns: minmax(140px, 30%) 1fr;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--te-rule);
}

.mfte .a-answer__label {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--te-fg-mute);
  margin: 0;
}

.mfte .a-answer__value {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--te-fg);
  margin: 0;
  overflow-wrap: anywhere;
}

/* The three silences the intake distinguishes stay distinguishable here.
   "Nothing to add" is an answer; "Left for later" is a question still open;
   "Not answered" was never reached. Flattening them loses the follow-up list. */
.mfte .a-answer__value.is-quiet {
  color: var(--te-tick);
  font-style: italic;
}

.mfte .a-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mfte .a-list li {
  font-size: 0.875rem;
  line-height: 1.3;
  color: var(--te-fg-soft);
  background: var(--te-module);
  border-radius: var(--te-r-control);
  padding: 6px 10px;
}

/* ── Portal: footer row ───────────────────────────────────────────────── */

.mfte .a-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  border-top: 1px solid var(--te-rule);
  margin: 30px 0 0;
  padding: 20px 0 0;
}

.mfte .a-linkish {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.875rem;
  color: #ff8833;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.mfte .a-linkish:hover { color: var(--te-accent-dim); }

/* ── Working ──────────────────────────────────────────────────────────── */

.mfte .a-working {
  display: none;
  align-items: center;
  gap: 9px;
  font-family: var(--te-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.75rem;
  color: var(--te-fg-mute);
}

.mfte .a-working.is-active { display: inline-flex; }

.mfte .a-working__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--te-accent);
  animation: a-pulse 1.1s ease-in-out infinite;
}

@keyframes a-pulse {
  0%, 100% { opacity: 0.28; }
  50% { opacity: 1; }
}

@media (max-width: 640px) {
  .mfte .a-answer { grid-template-columns: 1fr; gap: 4px; }
  .mfte .a-actions .te-btn { width: 100%; justify-content: center; }
  .mfte .a-foot { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 767px) {
  .mfte .a-login-plate {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 28px;
  }

  .mfte .a-login-copy,
  .mfte .a-login-visual {
    grid-column: 1;
  }

  .mfte .a-login-copy { grid-row: 1; }
  .mfte .a-login-visual { grid-row: 2; }

  .mfte .a-login-visual img {
    max-width: 238px;
    margin: 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mfte .a-working__dot { animation: none; opacity: 0.7; }
  .mfte .a-meter__fill,
  .mfte .a-input { transition: none; }
}

/* The cascade note in te-system.css applies here too: master.css forces
   `font-family: Sebino !important` on p/a/li/span unlayered, and an unlayered
   !important is the weakest author declaration there is, so a layered rule
   beats it. Only the headline needs to win — the rest inherit Sebino anyway,
   which is what this page wants. */
@layer site {
  body.mf-typescale.mf-typescale .mfte .a-headline.a-headline {
    font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
    line-height: 1.18;
    font-weight: 700;
  }
}
