/* /new-design — the login page. Colours come from tokens.css only; the fonts, the page base and the small shared atoms
   (.icon, .note, .brand-accent, .sr-only) are in base.css, which every page loads (sub-plan 1814, R7 b). Text sizes follow
   Lovable's readable minimum (base 1.0625rem; the smallest text 0.8125rem). */
.shell {
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--secondary);
  padding: 1.25rem;
}
/* map LS01, C23, RU51 (ticket 2005): on a short screen (700 px high or less) the log-in page keeps less padding above and below */
@media (max-height: 700px) { .shell { padding-top: 0.5rem; padding-bottom: 0.5rem; } }
.stack { width: 100%; max-width: 32rem; display: flex; flex-direction: column; align-items: center; }

.brand { display: inline-flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; max-width: 100%; }
.brand-mark { flex: none; width: 3.5rem; height: 3.5rem; transform: translateY(4px); }
.brand-name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; line-height: 1;
  text-transform: uppercase; letter-spacing: -0.025em; white-space: nowrap; transform: translateY(4px);
}

.title { font-family: var(--font-display); font-size: 1.5rem; line-height: 2rem; font-weight: 700; text-align: center; margin: 0; letter-spacing: 0; overflow-wrap: break-word; }
.sub { margin-top: 0.25rem; text-align: center; font-size: 0.9375rem; line-height: 1.4; color: var(--muted-foreground); }

.card {
  width: 100%; margin-top: 1rem;
  background: var(--card); color: var(--card-foreground);
  border: 1px solid var(--border); border-top: 4px solid var(--primary);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-card);
  padding: 1.25rem;
}
@media (min-width: 640px) { .card { padding: 1.5rem; } }

.eyebrow { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; line-height: 1.25rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--primary); }
.eyebrow .icon { width: 1rem; height: 1rem; }
.icon-primary { color: var(--primary); }
.muted { margin-top: 0.375rem; font-size: 0.9375rem; line-height: 1.4; color: var(--muted-foreground); }

.tabs {
  display: grid; grid-template-columns: 1fr 1fr; margin-top: 1rem; padding: 0.25rem;
  border: 1px solid var(--border); border-radius: 9999px; background: var(--secondary);
  font-size: 0.875rem; font-weight: 500;
}
.tab {
  height: 2.5rem; border: 0; border-radius: 9999px; background: transparent; color: var(--muted-foreground);
  font: inherit; cursor: pointer; transition: background-color .2s, color .2s;
}
.tab[aria-selected="true"] { background: var(--primary); color: var(--primary-foreground); }

/* One grid cell for the states of one tab, so a step inside a tab never changes the card's size; the other tab's states are
   not drawn, so each tab has its own height (row 1981, `1972` § 6c: one cell for both tabs gave the log-in tab the sign-up
   form's height). Keyed on data-mode, which page.js's show() sets, never on `inert` alone: a step of the SAME tab is inert too
   and must keep its room. */
.panels { display: grid; margin-top: 1rem; }
.panels[data-mode="login"] > .panel[data-mode="signup"],
.panels[data-mode="signup"] > .panel[data-mode="login"] { display: none; }
.panel {
  grid-area: 1 / 1; display: flex; flex-direction: column; gap: 0.75rem; align-self: start;
  transition: opacity .3s var(--ease-glide);
}
.panel[inert] { opacity: 0; visibility: hidden; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .panel, .tab { transition: none; } }

.field { display: block; font-size: 0.875rem; font-weight: 600; }
.field input {
  display: block; width: 100%; margin-top: 0.25rem; padding: 0.5rem 0.75rem;
  font: inherit; font-size: 0.875rem; font-weight: 400; color: var(--foreground);
  background: var(--background); border: 1px solid var(--input); border-radius: 0.5rem;
}
.field input:focus { border-color: var(--primary); }
/* row 1981 (frontend review LOW 7), account.css's rule (row 1980): 16px on a narrow screen, or iOS zooms the page on focus */
@media (max-width: 40rem) { .field input { font-size: 1rem; } }
.field input.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.4em; }

.hint { margin-top: -0.5rem; font-size: 0.8125rem; line-height: 1.25rem; color: var(--muted-foreground); }
.strong { font-size: 0.9375rem; line-height: 1.4; font-weight: 600; color: var(--foreground); }

.btn {
  height: 2.75rem; width: 100%; border: 0; border-radius: 9999px;
  background: var(--primary); color: var(--primary-foreground);
  font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer;
}
.btn:hover { background: var(--ring); }
/* The retry under a fault (row 1981): Lovable's outline variant, so it never reads as the form's own submit. */
.btn-outline { background: var(--background); color: var(--foreground); border: 1px solid var(--input); }
.btn-outline:hover { background: var(--accent); color: var(--accent-foreground); }
.btn-outline[hidden] { display: none; }

.consent {
  padding: 0.75rem; border: 1px dashed var(--primary); border-radius: 0.5rem;
  background: var(--accent); color: var(--accent-foreground);
  font-size: 0.875rem; line-height: 1.4;
}
/* B1 (sub-plan 1836): the consent tick, a phone-sized target with its label beside it. */
.consent-check { display: flex; align-items: flex-start; gap: 0.5rem; margin-top: 0.5rem; cursor: pointer; }
.consent-check input { flex: none; width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--primary); }
/* Row 1984 (copy review, LOW 4): the referral box is OPTIONAL and must not read as the required consent above it: a plain
   solid border, the page's own background, and its tick in the same phone-sized target. Drawn only under a campaign code. */
.referral {
  margin-top: 0.75rem; padding: 0.75rem; border: 1px solid var(--border, #d4d4d8); border-radius: 0.5rem;
  font-size: 0.875rem; line-height: 1.4;
}
.referral .consent-check { margin-top: 0; }

.confirm { padding: 1rem; border-radius: 0.5rem; background: var(--accent); color: var(--accent-foreground); align-self: start; }
.state-title { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.confirm-text { margin-top: 0.5rem; font-size: 0.9375rem; line-height: 1.4; }
.email-out { overflow-wrap: anywhere; }
.callout { padding: 0.75rem; border-radius: 0.5rem; background: var(--accent); color: var(--accent-foreground); font-size: 0.9375rem; line-height: 1.4; }
/* Empty, the status line stays IN the page (a live region that appears together with its text is often not announced);
   it takes no room: no padding, and a negative margin cancels the panel's row gap. */
.callout:empty { padding: 0; margin-top: -0.75rem; }
/* B1 (sub-plan 1836): a refusal is told apart from a done-line by a SHAPE, not colour alone (frontend review): a solid bar. */
.callout[data-tone="refused"]:not(:empty) { border-left: 0.25rem solid var(--primary); }
.callout[data-tone="done"]:not(:empty) { border: 1px solid var(--primary); }
/* row 1978 (`1972` § 6d): a fault, apart from a refusal — the destructive mark the account page uses */
.callout[data-tone="error"]:not(:empty) { border: 1px solid var(--destructive); border-left-width: 0.25rem; }   /* an outline, not a bar alone: not colour only */
/* row 1981 (frontend review 3): and a mark before the sentence, so a fault differs from a refusal by a shape as well as a
   line: a disc with a bang, drawn in CSS alone (two gradient bars on the --destructive disc; no url, so no reference leaves
   the page, test_new_design C). EMPTY content: nothing is read out (the empty string is the pseudo-element's aria-hidden),
   and the sentence stays the line's only text. Not a child element, because say() writes the line with textContent. */
.callout[data-tone="error"]:not(:empty)::before {
  content: ""; display: inline-block; width: 1.125em; height: 1.125em; margin-right: 0.5rem; vertical-align: -0.2em;
  border-radius: 50%;
  background:
    linear-gradient(var(--card), var(--card)) 50% 22% / 0.16em 0.42em no-repeat,
    linear-gradient(var(--card), var(--card)) 50% 80% / 0.16em 0.16em no-repeat,
    var(--destructive);
}
/* Row 1841 (Frej 2026-11-09): sign-up closed. The disabled controls look disabled (shell.css's `.btn:disabled` values);
   the sentence beside them says why, so the state is not carried by the fading alone. */
[data-panel="signup-form"][data-closed="true"] .btn:disabled,
[data-panel="signup-form"][data-closed="true"] input:disabled { opacity: 0.5; cursor: not-allowed; }

/* The link under the card (sub-plan 1813, R8): back to the website. */
.back { display: inline-flex; align-items: center; gap: 0.375rem; margin-top: 1rem; min-height: 2.75rem; color: var(--muted-foreground); font-size: 0.875rem; text-decoration: none; }
.back:hover { color: var(--foreground); text-decoration: underline; }
.back .icon { width: 1rem; height: 1rem; }
