/* The email-and-code flow (email_code.js). Colours come from variables each
   host defines: /signin and the Connect sheet get them from tokens.css, the
   consent page maps its own onto the same names. */
.ec-title {
  font-family: var(--font-x, Geist, -apple-system, system-ui, sans-serif);
  font-weight: 700; font-size: 30px; line-height: 1.15; letter-spacing: -0.02em;
  color: var(--ink); margin: 0 0 8px; outline: none;
}
.ec-lead { font-size: 15px; line-height: 1.5; color: var(--secondary); margin: 0 0 20px; overflow-wrap: anywhere; }
.ec-addr { color: var(--ink); font-weight: 600; }
.ec-form { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.ec-input {
  width: 100%; height: 52px; padding: 0 16px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--card); border: 1px solid var(--btn-border); border-radius: 14px; outline: none;
}
.ec-input::placeholder { color: var(--muted); opacity: 1; }
.ec-input:focus { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); }
.ec-input[aria-invalid="true"] { border-color: var(--late-text); }
.ec-btn {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; line-height: 1;
  width: 100%; height: 48px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--ink); color: var(--on-ink); font: inherit; font-size: 15px; font-weight: 600;
}
.ec-btn:disabled { opacity: 0.6; cursor: default; }
.ec-btn:focus-visible, .ec-quiet:focus-visible, .ec-terms a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ec-msg { min-height: 20px; margin: 0; font-size: 14px; line-height: 1.4; color: var(--late-text); }
.ec-msg:empty { display: none; }
.ec-msg.is-ok { color: var(--secondary); }
.ec-sent { display: inline-block; }
.ec-aside { margin: 16px 0 0; font-size: 14px; line-height: 1.5; color: var(--secondary); overflow-wrap: anywhere; }
.ec-aside a { color: inherit; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.ec-aside a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.ec-terms { margin: 16px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.ec-terms a { color: var(--secondary); text-decoration: underline; text-underline-offset: 2px; }
.ec-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin-top: 8px; }
.ec-quiet {
  min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; font-size: 14px;
  color: var(--secondary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.ec-quiet:disabled { color: var(--muted); text-decoration: none; cursor: default; font-variant-numeric: tabular-nums; }
.ec-challenge { min-height: 65px; }
.ec-challenge[hidden] { display: none; }

/* Six painted cells, one real input stretched over them. The input's own
   text and caret are invisible; every touch and key still lands on it. */
.ec-code { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.ec-cell {
  display: flex; align-items: center; justify-content: center; height: 60px; min-width: 0;
  background: var(--card); border: 1px solid var(--btn-border); border-radius: 14px;
  font-size: 26px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums;
}
.ec-cell.is-active { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); }
.ec-code-input {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; margin: 0; border: 0; outline: none;
  background: transparent; color: transparent; caret-color: transparent; font-family: inherit; font-size: 16px; opacity: 0.01;
}

/* The full screen at /signin. */
.ec-screen {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center;
  padding: max(40px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  background: var(--bg);
}
.ec-brand { flex: 0 0 auto; text-align: center; margin: 0 0 8vh; }
.ec-brand .ec-tagline { margin: 2px 0 0; font-size: 14px; color: var(--secondary-2); }
.ec-word { color: var(--ink); --wm-fs: 34px; }
.ec-word .wordmark { display: block; margin: 0 auto; width: calc(var(--wm-fs) * 64 / 28); height: auto; aspect-ratio: 64 / 22; }
.ec-panel { width: 100%; max-width: 400px; }
@media (min-width: 720px) {
  .ec-screen { justify-content: center; padding-top: 40px; }
  .ec-brand { margin-bottom: 32px; }
  .ec-panel { padding: 32px; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--r-card); box-shadow: var(--shadow); }
  .ec-panel .ec-input, .ec-panel .ec-cell { background: var(--bg); }
}
@media (max-height: 560px) {
  .ec-brand { margin-bottom: 20px; }
  .ec-screen { padding-top: 20px; }
}

/* In a host that is itself a card or a sheet. */
.ec-inline .ec-title { font-size: 24px; }
