/* Marketing landing styles. Loaded globally but only applied when body has
 * the .landing-mode class, which Home.razor's NotAuthorized branch sets at
 * render time. Scoped this way so we can: hide the admin sidebar + reset
 * <main> chrome for the anonymous home, without disturbing the in-app layout.
 *
 * Tokens are pulled from design-tokens.css; the only hex literals here are the
 * landing's specific paper/ink/accent palette (cream, deep-ink, ember) that
 * intentionally diverge from the in-app surface tokens.
 */

:root {
  --ld-paper: #f7f4ec;
  --ld-paper-deep: #efeadf;
  --ld-ink: #16181c;
  --ld-ink-soft: #3a3d44;
  --ld-ink-muted: #6b6e78;
  --ld-rule: #d8d2c2;
  --ld-rule-soft: #e6e0d0;
  --ld-navy: #1f2a5e;
  --ld-ember: #cf5a26;
  --ld-ember-soft: #f3dccc;
  --ld-night: #0e1117;
  --ld-night-soft: #1a1e26;

  --ld-display: "Fraunces", "Cambria", "Georgia", serif;
  --ld-body: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ld-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ld-shell: 1240px;
  --ld-gutter: 56px;
}

/* === Layout takeover for anonymous landing === */

/* `html.landing-mode` is set synchronously by MarketingLayout.razor so the
   sidebar-less chrome applies during SSR. `body.landing-mode` is kept for
   pages that toggle the class from JS interop (legacy path). */
html.landing-mode,
html.landing-mode body,
body.landing-mode {
  background: var(--ld-paper);
  color: var(--ld-ink);
  font-family: var(--ld-body);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html.landing-mode .sidebar,
html.landing-mode .sidebar-expand-handle,
body.landing-mode .sidebar,
body.landing-mode .sidebar-expand-handle {
  display: none !important;
}

html.landing-mode .page,
body.landing-mode .page {
  grid-template-columns: 1fr;
}

html.landing-mode main,
body.landing-mode main {
  width: 100%;
}

html.landing-mode .content.px-4,
body.landing-mode .content.px-4 {
  padding: 0 !important;
  max-width: none;
}

.marketing-shell {
  min-height: 100vh;
}

/* === Headline + display type === */

.ld {
  color: var(--ld-ink);
  line-height: 1.5;
}

.ld a {
  color: inherit;
}

.ld-display {
  font-family: var(--ld-display);
  font-weight: 360;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  letter-spacing: -0.02em;
  line-height: 1.02;
  color: var(--ld-ink);
  margin: 0;
}

.ld-display em {
  font-style: italic;
  font-weight: 360;
  color: var(--ld-navy);
}

.ld-eyebrow {
  font-family: var(--ld-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ld-ink-muted);
  margin: 0;
}

.ld-eyebrow .ld-eyebrow-num {
  color: var(--ld-ember);
  margin-right: 10px;
}

.ld-lede {
  font-family: var(--ld-display);
  font-weight: 350;
  font-variation-settings: "opsz" 14;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.45;
  color: var(--ld-ink-soft);
  max-width: 56ch;
  margin: 0;
}

/* === Top bar === */

.ld-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 244, 236, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--ld-rule-soft);
}

.ld-nav-inner {
  max-width: var(--ld-shell);
  margin: 0 auto;
  padding: 18px var(--ld-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.ld-wordmark {
  font-family: var(--ld-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ld-ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ld-wordmark::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--ld-ember);
  display: inline-block;
}

.ld-wordmark .ld-wordmark-dot {
  color: var(--ld-ink-muted);
  font-weight: 400;
}

.ld-nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.ld-nav-links a {
  font-family: var(--ld-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ld-ink-soft);
  text-decoration: none;
  transition: color 0.18s ease;
}

.ld-nav-links a:hover {
  color: var(--ld-ember);
}

a.ld-nav-cta,
a.ld-nav-cta:link,
a.ld-nav-cta:visited,
a.ld-nav-cta:hover,
a.ld-nav-cta:active {
  font-family: var(--ld-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ld-paper);
  background: var(--ld-ink);
  padding: 9px 16px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.18s ease;
}

a.ld-nav-cta:hover,
a.ld-nav-cta:active {
  background: var(--ld-navy);
  transform: translateY(-1px);
}

/* === Shell + sections === */

.ld-shell {
  max-width: var(--ld-shell);
  margin: 0 auto;
  padding: 0 var(--ld-gutter);
}

.ld-section {
  padding: 96px 0;
  border-top: 1px solid var(--ld-rule-soft);
}

.ld-section:first-of-type {
  border-top: none;
}

/* === Hero === */

.ld-hero {
  padding: 96px 0 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 64px;
  align-items: end;
  position: relative;
}

.ld-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px 0;
  height: 1px;
  background: var(--ld-rule-soft);
}

.ld-hero-eyebrow {
  margin-bottom: 32px;
}

.ld-hero h1.ld-display {
  font-size: clamp(48px, 6.5vw, 96px);
  margin-bottom: 32px;
  max-width: 13ch;
}

.ld-hero-meta {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-bottom: 8px;
}

.ld-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* States are enumerated explicitly so we beat app.css's :visited rule, which
 * has specificity (0,0,1,1) and would otherwise repaint a visited link to
 * --brand-primary — invisible against the ink/ember button fills. */
a.ld-cta-primary,
a.ld-cta-primary:link,
a.ld-cta-primary:visited,
a.ld-cta-primary:hover,
a.ld-cta-primary:active,
a.ld-cta-ghost,
a.ld-cta-ghost:link,
a.ld-cta-ghost:visited,
a.ld-cta-ghost:hover,
a.ld-cta-ghost:active {
  font-family: var(--ld-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

a.ld-cta-primary,
a.ld-cta-primary:link,
a.ld-cta-primary:visited {
  background: var(--ld-ink);
  color: var(--ld-paper);
  padding: 14px 22px;
  border-radius: 999px;
}

a.ld-cta-primary:hover,
a.ld-cta-primary:active {
  background: var(--ld-navy);
  color: var(--ld-paper);
  transform: translateY(-1px);
}

a.ld-cta-primary .ld-arrow {
  transition: transform 0.18s ease;
}

a.ld-cta-primary:hover .ld-arrow {
  transform: translateX(3px);
}

a.ld-cta-ghost,
a.ld-cta-ghost:link,
a.ld-cta-ghost:visited {
  color: var(--ld-ink);
  padding: 13px 18px;
  border: 1px solid var(--ld-rule);
  border-radius: 999px;
  background: transparent;
}

a.ld-cta-ghost:hover,
a.ld-cta-ghost:active {
  border-color: var(--ld-ember);
  color: var(--ld-ember);
  background: transparent;
}

.ld-hero-pricing {
  font-family: var(--ld-mono);
  font-size: 11.5px;
  color: var(--ld-ink-muted);
  letter-spacing: 0.04em;
}

.ld-hero-pricing strong {
  color: var(--ld-ink);
  font-weight: 500;
}

/* === Section: bicolumn editorial === */

.ld-bicolumn {
  display: grid;
  grid-template-columns: minmax(0, 0.32fr) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

.ld-bicolumn-side {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ld-bicolumn-side h2.ld-display {
  font-size: clamp(28px, 3vw, 40px);
  max-width: 10ch;
}

.ld-bicolumn-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ld-ink-soft);
  max-width: 62ch;
}

.ld-bicolumn-body p {
  margin: 0;
}

.ld-bicolumn-body strong {
  color: var(--ld-ink);
  font-weight: 500;
}

/* === Demo: markdown → dashboard === */

.ld-demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 32px;
  align-items: stretch;
  margin-top: 48px;
}

.ld-demo-card {
  background: #ffffff;
  border: 1px solid var(--ld-rule-soft);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 0 rgba(22, 24, 28, 0.04), 0 24px 48px -36px rgba(22, 24, 28, 0.25);
}

.ld-demo-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ld-rule-soft);
  background: #fbf9f2;
}

.ld-demo-chrome-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ld-rule);
}

.ld-demo-chrome-label {
  margin-left: 8px;
  font-family: var(--ld-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ld-ink-muted);
}

.ld-demo-body {
  padding: 22px 22px 26px;
  flex: 1;
}

.ld-demo-code {
  font-family: var(--ld-mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ld-ink);
  margin: 0;
  white-space: pre-wrap;
}

.ld-demo-code .tok-h { color: var(--ld-navy); font-weight: 500; }
.ld-demo-code .tok-key { color: var(--ld-ember); }
.ld-demo-code .tok-str { color: #2f6b3a; }
.ld-demo-code .tok-comment { color: var(--ld-ink-muted); font-style: italic; }
.ld-demo-code .tok-dim { color: var(--ld-ink-muted); }

.ld-demo-arrow {
  align-self: center;
  font-family: var(--ld-mono);
  color: var(--ld-ember);
  font-size: 28px;
  font-weight: 500;
}

.ld-demo-render-title {
  font-family: var(--ld-display);
  font-variation-settings: "opsz" 60;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ld-navy);
  margin: 0 0 4px;
}

.ld-demo-render-sub {
  font-family: var(--ld-body);
  font-size: 12px;
  color: var(--ld-ink-muted);
  margin: 0 0 16px;
}

.ld-demo-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ld-demo-tile {
  border: 1px solid var(--ld-rule-soft);
  border-radius: 6px;
  padding: 12px;
  background: #fdfcf7;
}

.ld-demo-tile-name {
  font-family: var(--ld-body);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ld-ink);
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.ld-demo-tile-name::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ld-status, var(--ld-rule));
  flex-shrink: 0;
}

.ld-demo-tile[data-status="on-track"] { --ld-status: #2f8f4f; }
.ld-demo-tile[data-status="blocked"] { --ld-status: #b73b3b; }
.ld-demo-tile[data-status="in-progress"] { --ld-status: #2a6fb5; }
.ld-demo-tile[data-status="draft"] { --ld-status: #d9a52c; }

.ld-demo-tile-line {
  height: 3px;
  background: var(--ld-rule-soft);
  border-radius: 2px;
  margin-top: 4px;
}

.ld-demo-tile-line.short { width: 60%; }

/* === Audience: three cards === */

.ld-audience {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.ld-audience-card {
  border-top: 1px solid var(--ld-ink);
  padding-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ld-audience-num {
  font-family: var(--ld-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ld-ember);
}

.ld-audience-name {
  font-family: var(--ld-display);
  font-variation-settings: "opsz" 36;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ld-navy);
  margin: 0;
}

.ld-audience-blurb {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ld-ink-soft);
  margin: 0;
}

/* === Pricing === */

.ld-pricing {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.ld-plan {
  border: 1px solid var(--ld-rule);
  border-radius: 12px;
  padding: 36px 32px 32px;
  background: #fdfcf7;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.ld-plan-pro {
  background: var(--ld-ink);
  color: var(--ld-paper);
  border-color: var(--ld-ink);
  position: relative;
  overflow: hidden;
}

.ld-plan-pro::after {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 360px;
  height: 360px;
  background: radial-gradient(closest-side, rgba(207, 90, 38, 0.35), transparent 70%);
  pointer-events: none;
}

.ld-plan-tag {
  font-family: var(--ld-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ld-ink-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.ld-plan-pro .ld-plan-tag {
  color: var(--ld-ember-soft);
}

.ld-plan-name {
  font-family: var(--ld-display);
  font-variation-settings: "opsz" 72;
  font-size: 36px;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ld-ink);
}

.ld-plan-pro .ld-plan-name {
  color: var(--ld-paper);
}

.ld-plan-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.ld-plan-price-amount {
  font-family: var(--ld-display);
  font-variation-settings: "opsz" 96;
  font-size: 56px;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--ld-navy);
}

.ld-plan-pro .ld-plan-price-amount {
  color: var(--ld-paper);
}

.ld-plan-price-period {
  font-family: var(--ld-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ld-ink-muted);
}

.ld-plan-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14.5px;
  color: var(--ld-ink-soft);
}

.ld-plan-pro .ld-plan-list {
  color: rgba(247, 244, 236, 0.78);
}

.ld-plan-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 1.5;
}

.ld-plan-list li::before {
  content: "+";
  font-family: var(--ld-mono);
  color: var(--ld-ember);
  font-weight: 500;
  flex-shrink: 0;
  width: 14px;
}

a.ld-plan-cta,
a.ld-plan-cta:link,
a.ld-plan-cta:visited,
a.ld-plan-cta:hover,
a.ld-plan-cta:active {
  font-family: var(--ld-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.ld-plan-free a.ld-plan-cta,
.ld-plan-free a.ld-plan-cta:link,
.ld-plan-free a.ld-plan-cta:visited {
  border: 1px solid var(--ld-ink);
  color: var(--ld-ink);
  background: transparent;
}

.ld-plan-free a.ld-plan-cta:hover,
.ld-plan-free a.ld-plan-cta:active {
  background: var(--ld-ink);
  color: var(--ld-paper);
}

.ld-plan-pro a.ld-plan-cta,
.ld-plan-pro a.ld-plan-cta:link,
.ld-plan-pro a.ld-plan-cta:visited,
.ld-plan-pro a.ld-plan-cta:hover,
.ld-plan-pro a.ld-plan-cta:active {
  background: var(--ld-ember);
  color: var(--ld-paper);
}

.ld-plan-pro a.ld-plan-cta:hover {
  transform: translateY(-1px);
}

/* === Why now: editorial pullquote === */

.ld-pullquote {
  margin-top: 40px;
  padding: 56px 0;
  border-top: 1px solid var(--ld-ink);
  border-bottom: 1px solid var(--ld-ink);
}

.ld-pullquote-text {
  font-family: var(--ld-display);
  font-variation-settings: "opsz" 144;
  font-style: italic;
  font-weight: 350;
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--ld-ink);
  max-width: 22ch;
  margin: 0 0 24px;
}

.ld-pullquote-attribution {
  font-family: var(--ld-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ld-ink-muted);
  display: flex;
  align-items: center;
  gap: 14px;
}

.ld-pullquote-attribution::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--ld-ink-muted);
}

/* === Final CTA + footer === */

.ld-final {
  background: var(--ld-night);
  color: var(--ld-paper);
  margin-top: 40px;
}

.ld-final-inner {
  max-width: var(--ld-shell);
  margin: 0 auto;
  padding: 120px var(--ld-gutter) 80px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 64px;
  align-items: end;
}

.ld-final h2.ld-display {
  font-size: clamp(40px, 5.4vw, 76px);
  color: var(--ld-paper);
  max-width: 14ch;
}

.ld-final h2.ld-display em {
  color: var(--ld-ember);
}

.ld-final-meta {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 8px;
}

.ld-final-meta p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(247, 244, 236, 0.72);
  max-width: 38ch;
}

a.ld-final-cta,
a.ld-final-cta:link,
a.ld-final-cta:visited,
a.ld-final-cta:hover,
a.ld-final-cta:active {
  align-self: start;
  background: var(--ld-ember);
  color: var(--ld-paper);
  padding: 16px 26px;
  border-radius: 999px;
  font-family: var(--ld-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  transition: transform 0.18s ease, background 0.18s ease;
}

a.ld-final-cta:hover,
a.ld-final-cta:active {
  transform: translateY(-1px);
  background: #e36a30;
}

.ld-footer {
  background: var(--ld-night-soft);
  color: rgba(247, 244, 236, 0.6);
}

.ld-footer-inner {
  max-width: var(--ld-shell);
  margin: 0 auto;
  padding: 28px var(--ld-gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--ld-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.ld-footer-inner a {
  color: rgba(247, 244, 236, 0.78);
  text-decoration: none;
}

.ld-footer-inner a:hover {
  color: var(--ld-ember);
}

/* === Entrance motion === */

.ld-fade {
  opacity: 0;
  transform: translateY(8px);
  animation: ld-fade-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.ld-fade-1 { animation-delay: 0.05s; }
.ld-fade-2 { animation-delay: 0.18s; }
.ld-fade-3 { animation-delay: 0.32s; }
.ld-fade-4 { animation-delay: 0.46s; }

@keyframes ld-fade-in {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .ld-fade {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* === Responsive === */

@media (max-width: 960px) {
  :root { --ld-gutter: 28px; }
  .ld-hero { grid-template-columns: 1fr; gap: 24px; padding: 30px; align-items: start; }
  .ld-hero h1.ld-display { margin-bottom: 0; }
  .ld-bicolumn { grid-template-columns: 1fr; gap: 32px; }
  .ld-bicolumn-side { position: static; }
  .ld-demo { grid-template-columns: 1fr; }
  .ld-demo-arrow { transform: rotate(90deg); }
  .ld-audience { grid-template-columns: 1fr; }
  .ld-pricing { grid-template-columns: 1fr; }
  .ld-final-inner { grid-template-columns: 1fr; gap: 32px; padding: 30px; }
  .ld-section { padding: 30px; }
  .ld-nav-links { display: none; }
}

/* =================================================================== */
/* === Auth shell (Identity Login / Register / etc.) ================ */
/* =================================================================== */
/*
 * Activated via body.auth-mode set by _Layout.cshtml. The Identity area's
 * _Layout loads this stylesheet so the editorial tokens (--ld-*) are
 * available, then applies the auth chrome below. Split-screen layout:
 *   • Left: brand panel (wordmark + editorial headline + lede)
 *   • Right: white form card on cream
 * Falls back to single-column on narrow viewports.
 */

body.auth-mode {
  background: var(--ld-paper);
  color: var(--ld-ink);
  font-family: var(--ld-body);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  min-height: 100vh;
}

/* .ld-auth carries the same chrome whether body.auth-mode is set or not, so the
 * Blazor migration (which can't easily set the body class from a component) reuses
 * exactly one rule for both the legacy Razor Pages chrome and the new Blazor pages. */
.ld-auth {
  min-height: 100vh;
  background: var(--ld-paper);
  color: var(--ld-ink);
  font-family: var(--ld-body);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

.ld-auth-brand {
  background: var(--ld-paper);
  padding: 48px var(--ld-gutter) 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  border-right: 1px solid var(--ld-rule-soft);
  overflow: hidden;
}

.ld-auth-brand::before {
  content: "";
  position: absolute;
  inset: auto -20% -30% -10%;
  height: 60%;
  background: radial-gradient(closest-side, rgba(31, 42, 94, 0.10), transparent 75%);
  pointer-events: none;
}

.ld-auth-brand-top {
  position: relative;
  z-index: 1;
}

.ld-auth-brand-middle {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 26px;
  max-width: 38ch;
}

.ld-auth-brand-middle .ld-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.ld-auth-brand-headline {
  font-family: var(--ld-display);
  font-weight: 360;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  font-size: clamp(40px, 4.6vw, 64px);
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0;
  color: var(--ld-ink);
}

.ld-auth-brand-headline em {
  font-style: italic;
  font-weight: 360;
  color: var(--ld-navy);
}

.ld-auth-brand-lede {
  font-family: var(--ld-display);
  font-weight: 350;
  font-variation-settings: "opsz" 14;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ld-ink-soft);
  margin: 0;
  max-width: 42ch;
}

.ld-auth-brand-footer {
  position: relative;
  z-index: 1;
  font-family: var(--ld-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ld-ink-muted);
}

.ld-auth-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px var(--ld-gutter);
  background: var(--ld-paper-deep);
}

.ld-auth-card {
  width: 100%;
  max-width: 460px;
  background: #ffffff;
  border: 1px solid var(--ld-rule-soft);
  border-radius: 12px;
  padding: 44px 44px 40px;
  box-shadow: 0 1px 0 rgba(22, 24, 28, 0.04), 0 24px 60px -36px rgba(22, 24, 28, 0.25);
}

.ld-auth-card-eyebrow {
  font-family: var(--ld-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ld-ember);
  margin: 0 0 14px;
}

.ld-auth-card-title {
  font-family: var(--ld-display);
  font-variation-settings: "opsz" 96;
  font-weight: 360;
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--ld-ink);
}

.ld-auth-card-sub {
  font-family: var(--ld-body);
  font-size: 14px;
  color: var(--ld-ink-muted);
  margin: 0 0 28px;
  line-height: 1.5;
}

/* === Form === */

.ld-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ld-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ld-form-label {
  font-family: var(--ld-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ld-ink-soft);
}

.ld-form-input {
  font-family: var(--ld-body);
  font-size: 15px;
  padding: 12px 14px;
  background: #fdfcf7;
  border: 1px solid var(--ld-rule);
  border-radius: 8px;
  color: var(--ld-ink);
  width: 100%;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  outline: none;
  box-sizing: border-box;
}

.ld-form-input::placeholder {
  color: var(--ld-ink-muted);
}

.ld-form-input:hover {
  background: #ffffff;
  border-color: var(--ld-ink-muted);
}

.ld-form-input:focus {
  background: #ffffff;
  border-color: var(--ld-navy);
  box-shadow: 0 0 0 3px rgba(31, 42, 94, 0.12);
}

.ld-form-input.input-validation-error {
  border-color: #b73b3b;
  background: #fdf5f5;
}

.ld-form-input.input-validation-error:focus {
  box-shadow: 0 0 0 3px rgba(183, 59, 59, 0.18);
}

.ld-form-error {
  font-family: var(--ld-body);
  font-size: 12.5px;
  color: #b73b3b;
  min-height: 1em;
}

.ld-form-summary {
  font-family: var(--ld-body);
  font-size: 13px;
  color: #b73b3b;
  background: #fdf0f0;
  border: 1px solid rgba(183, 59, 59, 0.25);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 4px;
}

.ld-form-summary:empty {
  display: none;
}

/* Validation summary is a <div> with nested <ul>; reset the bullets so the
   summary feels like a single error block rather than a list. */
.ld-form-summary ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ld-form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ld-body);
  font-size: 14px;
  color: var(--ld-ink-soft);
}

.ld-form-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--ld-rule);
  background: #fdfcf7;
  border-radius: 4px;
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  margin: 0;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.ld-form-check input[type="checkbox"]::before {
  content: "";
  width: 8px;
  height: 8px;
  transform: scale(0);
  transition: transform 0.12s ease;
  background: var(--ld-ember);
  border-radius: 2px;
}

.ld-form-check input[type="checkbox"]:checked {
  border-color: var(--ld-ink);
  background: #ffffff;
}

.ld-form-check input[type="checkbox"]:checked::before {
  transform: scale(1);
}

.ld-form-check label {
  cursor: pointer;
  user-select: none;
}

button.ld-form-submit {
  font-family: var(--ld-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  background: var(--ld-ink);
  color: var(--ld-paper);
  border: none;
  padding: 14px 22px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
  transition: background 0.18s ease, transform 0.06s ease;
}

button.ld-form-submit:hover {
  background: var(--ld-navy);
}

button.ld-form-submit:active {
  transform: translateY(1px);
}

button.ld-form-submit:focus-visible {
  outline: 2px solid var(--ld-ember);
  outline-offset: 3px;
}

.ld-form-helpers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--ld-rule-soft);
  font-family: var(--ld-body);
  font-size: 13.5px;
}

.ld-form-helpers-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

a.ld-form-helper,
a.ld-form-helper:link,
a.ld-form-helper:visited {
  color: var(--ld-ink-soft);
  text-decoration: none;
  border-bottom: 1px dotted var(--ld-rule);
  transition: color 0.18s ease, border-color 0.18s ease;
}

a.ld-form-helper:hover {
  color: var(--ld-ember);
  border-bottom-color: var(--ld-ember);
}

a.ld-form-helper-strong,
a.ld-form-helper-strong:link,
a.ld-form-helper-strong:visited {
  color: var(--ld-ink);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--ld-ink);
}

a.ld-form-helper-strong:hover {
  color: var(--ld-ember);
  border-bottom-color: var(--ld-ember);
}

/* === External sign-in (Google etc.) ===
   Renders below the password submit when SignInManager.GetExternalAuthenticationSchemesAsync()
   returns one or more registered schemes. */

.ld-form-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 12px;
  font-family: var(--ld-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ld-ink-muted);
}

.ld-form-divider::before,
.ld-form-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--ld-rule-soft);
}

.ld-form-external {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

a.ld-form-external-btn,
a.ld-form-external-btn:link,
a.ld-form-external-btn:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--ld-paper);
  color: var(--ld-ink);
  border: 1px solid var(--ld-rule);
  font-family: var(--ld-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

a.ld-form-external-btn:hover {
  border-color: var(--ld-ink);
  background: var(--ld-ink);
  color: var(--ld-paper);
}

a.ld-form-external-btn:focus-visible {
  outline: 2px solid var(--ld-ember);
  outline-offset: 3px;
}

/* === Status alerts (ConfirmEmail success/error) === */

.ld-alert {
  font-family: var(--ld-body);
  font-size: 14px;
  line-height: 1.5;
  border-radius: 8px;
  padding: 14px 16px;
  border: 1px solid;
  margin-bottom: 20px;
}

.ld-alert-success {
  color: #1f6336;
  background: #ebf6ee;
  border-color: rgba(47, 143, 79, 0.28);
}

.ld-alert-error {
  color: #872c2c;
  background: #fdf0f0;
  border-color: rgba(183, 59, 59, 0.28);
}

/* === Body copy inside the auth card === */

.ld-auth-card-body {
  font-family: var(--ld-body);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ld-ink-soft);
  margin: 0 0 14px;
}

.ld-auth-card-body strong {
  color: var(--ld-ink);
  font-weight: 500;
}

.ld-auth-card-body code {
  font-family: var(--ld-mono);
  font-size: 13px;
  background: var(--ld-paper);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--ld-ember);
}

/* === Stack of CTA buttons/links on info pages === */

.ld-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--ld-rule-soft);
}

/* === Top bar that lives inside the auth layout's left rail === */

.ld-auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ld-auth-topbar .ld-wordmark {
  font-size: 13px;
}

.ld-auth-topbar-meta {
  font-family: var(--ld-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ld-ink-muted);
}

/* === Responsive: collapse split-screen below 900px === */

@media (max-width: 900px) {
  .ld-auth { grid-template-columns: 1fr; }
  .ld-auth-brand {
    padding: 28px var(--ld-gutter) 32px;
    gap: 28px;
    border-right: none;
    border-bottom: 1px solid var(--ld-rule-soft);
  }
  .ld-auth-brand-middle { max-width: none; }
  .ld-auth-brand-headline { font-size: clamp(32px, 7vw, 44px); }
  .ld-auth-stage { padding: 32px var(--ld-gutter) 48px; }
  .ld-auth-card { padding: 32px 28px 28px; border-radius: 10px; }
}

/* === Docs (/docs/{slug}) === */

.ld-docs {
  min-height: 100vh;
  background: var(--ld-paper);
  color: var(--ld-ink);
}

.ld-docs-nav {
  border-bottom: 1px solid var(--ld-rule-soft);
  padding: 18px var(--ld-gutter);
  background: var(--ld-paper);
  position: sticky;
  top: 0;
  z-index: 5;
}

.ld-docs-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
}

.ld-docs-nav-links {
  display: flex;
  gap: 24px;
  flex: 1;
  margin-left: 24px;
}

.ld-docs-nav-links a {
  color: var(--ld-ink-soft, #4a4a4a);
  text-decoration: none;
  font-family: var(--ld-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ld-docs-nav-links a:hover,
.ld-docs-nav-links a.ld-docs-nav-active {
  color: var(--ld-ink);
}

.ld-docs-nav-cta {
  font-family: var(--ld-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 16px;
  border: 1px solid var(--ld-ink);
  border-radius: 999px;
  color: var(--ld-ink);
  text-decoration: none;
}

.ld-docs-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px var(--ld-gutter) 96px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.ld-docs-index {
  position: sticky;
  top: 84px;
  border-right: 1px solid var(--ld-rule-soft);
  padding-right: 24px;
}

.ld-docs-index-eyebrow {
  font-family: var(--ld-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ld-ember, #c25a2a);
  margin: 0 0 16px;
}

.ld-docs-index ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ld-docs-index li a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--ld-ink-soft, #4a4a4a);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
}

.ld-docs-index li a:hover {
  background: var(--ld-paper-deep, #efeadf);
  color: var(--ld-ink);
}

.ld-docs-index li.is-active a {
  background: var(--ld-ink);
  color: var(--ld-paper);
  font-weight: 500;
}

.ld-docs-article {
  min-width: 0;
}

/* Legal pages reuse .ld-prose typography but render without a sidebar, so they
   get their own centered container with a reading-friendly column width. */
.ld-legal-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px var(--ld-gutter) 96px;
}

.ld-legal-meta {
  font-family: var(--ld-mono);
  font-size: 13px;
  color: var(--ld-ink-soft, #4a4a4a);
  margin: 0 0 24px;
}

/* Honeypot bot-trap: positioned off-screen so humans never see or interact with it.
   Real users leave the field empty; autofill bots fill every text input and the
   server drops the submission. */
.ld-form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}


.ld-prose {
  font-family: var(--ld-body);
  color: var(--ld-ink);
  line-height: 1.65;
  font-size: 16px;
}

.ld-prose h1 {
  font-family: var(--ld-display, var(--ld-body));
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.1;
  margin: 0 0 24px;
  letter-spacing: -0.01em;
}

.ld-prose h2 {
  font-family: var(--ld-display, var(--ld-body));
  font-size: 24px;
  margin: 48px 0 16px;
  letter-spacing: -0.005em;
}

.ld-prose h3 {
  font-size: 18px;
  margin: 32px 0 12px;
  font-weight: 600;
}

.ld-prose p { margin: 0 0 16px; }
.ld-prose ul, .ld-prose ol { margin: 0 0 16px; padding-left: 22px; }
.ld-prose li { margin-bottom: 6px; }
.ld-prose li > p { margin-bottom: 6px; }

.ld-prose code {
  font-family: var(--ld-mono);
  font-size: 0.9em;
  background: var(--ld-paper-deep, #efeadf);
  padding: 1px 6px;
  border-radius: 4px;
}

.ld-prose pre {
  background: var(--ld-ink);
  color: var(--ld-paper);
  padding: 16px 20px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: var(--ld-mono);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 16px;
}

.ld-prose pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

.ld-prose blockquote {
  border-left: 3px solid var(--ld-ember, #c25a2a);
  padding: 4px 16px;
  margin: 0 0 16px;
  color: var(--ld-ink-soft, #4a4a4a);
  font-style: italic;
}

.ld-prose table {
  border-collapse: collapse;
  margin: 0 0 16px;
  width: 100%;
  font-size: 14px;
}

.ld-prose th, .ld-prose td {
  border: 1px solid var(--ld-rule-soft);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}

.ld-prose th {
  background: var(--ld-paper-deep, #efeadf);
  font-weight: 600;
}

.ld-prose a {
  color: var(--ld-ember, #c25a2a);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ld-prose a:hover { text-decoration-thickness: 2px; }

@media (max-width: 900px) {
  .ld-docs-shell {
    grid-template-columns: 1fr;
    padding: 24px var(--ld-gutter) 64px;
    gap: 32px;
  }
  .ld-docs-index {
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--ld-rule-soft);
    padding-right: 0;
    padding-bottom: 16px;
  }
  .ld-docs-nav-links { gap: 16px; margin-left: 0; }
}
