/* LiveBooks theme — plain CSS; Bootstrap 5 loaded from CDN */

:root {
  --bs-primary: #16a34a;
  --bs-success: #16a34a;
  --bs-body-color: #1e293b;
  --bs-body-bg: #f8f8f8;
  --bs-border-color: #ededed;
  --bs-link-color: #15803d;
  --bs-link-hover-color: #166534;
  --bs-font-sans-serif: "Inter", system-ui, -apple-system, sans-serif;
  --bs-body-font-family: var(--bs-font-sans-serif);
  --bs-border-radius: 0.313rem;
  --bs-border-radius-sm: 0.25rem;
  --bs-border-radius-lg: 0.5rem;
}

:root {
  --lb-brand: #16a34a;
  --lb-brand-dark: #15803d;
  --lb-text: #1e293b;
  --lb-muted: #7c7c7c;
  --lb-surface: #fff;
  --lb-border: #ededed;
  --lb-sidebar-width: 220px;
  --lb-sidebar-bg: #15803d;
  --lb-sidebar-hover: #166534;
  --lb-sidebar-active-border: #fff;
}

h1,
h2,
h3,
h4,
h5,
h6,
.form-label,
.card-title,
legend,
.lb-section-title {
  text-transform: capitalize;
}

.text-lb-brand {
  color: var(--lb-brand-dark, #15803d);
}

.btn-lb-brand {
  background-color: var(--lb-brand, #16a34a);
  border-color: var(--lb-brand, #16a34a);
  color: #fff;
}
.btn-lb-brand:hover, .btn-lb-brand:focus {
  background-color: var(--lb-brand-dark, #15803d);
  border-color: var(--lb-brand-dark, #15803d);
  color: #fff;
}

.lb-new-badge {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  padding: 0.15em 0.5em;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.12);
  border: 1px solid rgba(22, 163, 74, 0.35);
  color: var(--lb-brand-dark, #15803d);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

html {
  height: 100%;
}

body.lb-app {
  margin: 0;
  min-height: 100%;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color: var(--lb-text);
  background: #f3f3f3;
  overflow-x: clip;
}

.text-muted {
  color: var(--lb-muted) !important;
}

.card {
  border-color: var(--lb-border);
  background: var(--lb-surface);
}

.lb-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.lb-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--lb-sidebar-width);
  background: var(--lb-sidebar-bg);
  border-right: 1px solid #166534;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.75rem 0 1rem;
  z-index: 100;
  overflow-y: auto;
}

.lb-sidebar-header {
  flex-shrink: 0;
}

.lb-sidebar-user-name {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0 1rem;
  color: #fff;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  user-select: none;
}

.lb-sidebar-divider {
  border: 0;
  border-top: 2px solid #fff;
  opacity: 1;
  margin: 0 1rem;
}

.lb-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  min-height: 0;
}

.lb-sidebar-footer {
  padding: 0 0.5rem;
  margin-top: auto;
}

.lb-sign-out-form {
  margin: 0;
  padding: 0;
  width: 100%;
}

.lb-nav-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 2.5rem;
  padding: 0.5rem 1rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.3;
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.12s ease;
  width: 100%;
  text-align: left;
  border-left: 4px solid transparent;
  border-radius: 0;
}
.lb-nav-item:hover, .lb-nav-item:focus-visible {
  background-color: var(--lb-sidebar-hover);
  color: #fff;
  text-decoration: none;
}
.lb-nav-item.is-active {
  background-color: var(--lb-sidebar-hover);
  border-left-color: #fff;
  color: #fff;
  font-weight: 500;
}
.lb-nav-item .lb-nav-icon {
  flex-shrink: 0;
  opacity: 0.95;
}

.lb-nav-item--sign-out {
  color: #fff;
  font-size: 0.875rem;
}

.lb-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.75rem 0.25rem;
  user-select: none;
}

.lb-sidebar .lb-brand-text {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.lb-nav-toggle {
  position: fixed;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.lb-mobile-header,
.lb-nav-scrim {
  display: none;
}

.lb-content {
  flex: 1;
  min-width: 0;
  margin-left: var(--lb-sidebar-width);
  background: #f3f3f3;
}

.lb-main {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2rem 2.5rem 3rem;
  min-height: 100vh;
}

.lb-auth-header {
  background: var(--lb-surface);
  border-bottom: 1px solid var(--lb-border);
}

.lb-auth-header-inner {
  max-width: 52rem;
  margin: 0 auto;
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.lb-auth-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lb-auth-main {
  background: #f3f3f3;
  min-height: calc(100vh - 4rem);
}

.lb-auth-main-inner {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

.lb-auth-link {
  color: var(--lb-muted);
  text-decoration: none;
  font-size: 1.125rem;
  font-weight: 500;
}
.lb-auth-link:hover {
  color: var(--lb-brand-dark);
}

.lb-brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.lb-brand-link .lb-brand-text {
  color: var(--lb-brand-dark);
  font-size: 1rem;
  font-weight: 600;
}

.lb-page-header {
  margin-bottom: 1.75rem;
}

.lb-page-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--lb-text);
  margin-bottom: 0.375rem;
}

.lb-page-subtitle {
  font-size: 1.125rem;
  color: var(--lb-muted);
  margin: 0;
  line-height: 1.5;
}

.lb-content-card {
  background: var(--lb-surface);
  border: 1px solid var(--lb-border);
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.lb-content-card + .lb-content-card {
  margin-top: 1rem;
}

.lb-content-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--lb-text);
  margin-bottom: 0.75rem;
}

.lb-home .lb-section-title {
  font-size: 0.875rem;
}
.lb-home .lb-home-intro {
  font-size: 0.875rem;
}
.lb-home .lb-home-done-title {
  font-size: 1rem;
}
.lb-home .lb-home-done-note {
  font-size: 0.875rem;
}
.lb-home .lb-step-title {
  font-size: 1.125rem;
}
.lb-home .lb-step-desc {
  font-size: 0.875rem;
}
.lb-home .lb-step-number {
  font-size: 0.875rem;
}
.lb-home .lb-about-heading {
  font-size: 1.125rem;
}
.lb-home .lb-about-lead {
  font-size: 1rem;
}
.lb-home .lb-about-item-title {
  font-size: 1rem;
}
.lb-home .lb-about-body {
  font-size: 0.875rem;
}

.lb-welcome-hero {
  border-radius: 0.5rem;
  padding: 1.75rem 1.5rem;
  background: var(--lb-surface);
  border: 1px solid var(--lb-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 1.5rem;
}

.lb-about-heading {
  font-weight: 600;
  color: var(--lb-text);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.lb-about-lead {
  line-height: 1.55;
  color: #525252;
  margin: 0;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--lb-border);
  max-width: 40rem;
}

.lb-about-stack {
  margin: 0;
  padding: 0;
}

.lb-about-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--lb-border);
}
.lb-about-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.lb-about-item-title {
  display: block;
  font-weight: 600;
  color: var(--lb-text);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.lb-about-body {
  margin: 0;
  line-height: 1.55;
  color: var(--lb-muted);
  max-width: 40rem;
}

.lb-notification-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--lb-border);
}
.lb-notification-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.lb-notification-item:first-child {
  padding-top: 0;
}

.lb-notification-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--lb-brand);
  flex-shrink: 0;
  margin-top: 0.375rem;
}

.lb-get-started {
  margin-bottom: 1.5rem;
}

.lb-step {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--lb-border);
}
.lb-step:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.lb-step:first-child {
  padding-top: 0;
}

.lb-step-number {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 1px;
}

.lb-step-pending {
  background: #ededed;
  color: #525252;
}

.lb-step-done {
  background: var(--lb-brand);
  color: #fff;
}

.lb-step-body {
  flex: 1;
  min-width: 0;
}

.lb-step-title {
  font-weight: 600;
  color: var(--lb-text);
  margin-bottom: 0.25rem;
}

.lb-step-desc {
  color: var(--lb-muted);
  line-height: 1.5;
  margin-bottom: 0;
}

.lb-step-action {
  margin-top: 0.625rem;
}

.lb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  font-weight: 600;
  color: var(--lb-brand-dark, #15803d);
  margin-bottom: 0.875rem;
}
.lb-eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--lb-brand, #16a34a);
  box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.12);
  flex-shrink: 0;
}

.lb-hero-pro {
  border-radius: 0.5rem;
  overflow: hidden;
  padding: 2rem 1.5rem;
  background: radial-gradient(circle at 0% 0%, rgba(22, 163, 74, 0.1), transparent 42%), radial-gradient(circle at 100% 100%, rgba(21, 128, 61, 0.08), transparent 38%), linear-gradient(180deg, #fff 0%, #f8f8f8 100%);
  border: 1px solid rgba(21, 128, 61, 0.1);
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.05);
}
@media (min-width: 768px) {
  .lb-hero-pro {
    padding: 2.75rem 3rem;
  }
}

.lb-hero-pro-heading {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: clamp(1.25rem, 3.2vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--lb-text);
  margin: 0;
}

.lb-hero-pro-lede {
  font-size: 1.125rem;
  line-height: 1.55;
  color: #525252;
  max-width: 40rem;
  margin: 0;
}

.lb-hero-pro-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.875rem;
  margin-top: 1.75rem;
}
@media (min-width: 768px) {
  .lb-hero-pro-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

.lb-stat-mini {
  height: 100%;
  padding: 1.125rem 1.25rem;
  border: 1px solid var(--lb-border);
  border-radius: 0.5rem;
  background: var(--lb-surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.lb-stat-mini strong {
  display: block;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--lb-text);
  margin-bottom: 0.35rem;
}
.lb-stat-mini p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--lb-muted);
}

.lb-hero-pro-actions {
  margin-top: 1.75rem;
}

.btn-lb-brand-hero {
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px 0 rgba(22, 163, 74, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn-lb-brand-hero:hover, .btn-lb-brand-hero:focus {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px 0 rgba(22, 163, 74, 0.22);
}

.lb-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--lb-muted);
  margin-bottom: 0.75rem;
}

.lb-billing-page {
  max-width: 36rem;
}

.lb-billing-card {
  border: 1px solid var(--lb-border);
  background: var(--lb-surface);
}
.lb-billing-card .lb-eyebrow {
  margin-bottom: 0.25rem;
}

.lb-billing-badge {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.35em 0.75em;
}

.lb-billing-actions {
  padding-top: 0.25rem;
}
.lb-billing-actions .btn-link {
  text-decoration: none;
  vertical-align: baseline;
}
.lb-billing-actions .btn-link:hover {
  text-decoration: underline;
}

@media (max-width: 767.98px) {
  body.lb-app.lb-app--signed-in:has(.lb-nav-toggle:checked) {
    overflow: hidden;
  }
  .lb-shell {
    flex-direction: column;
  }
  .lb-mobile-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 150;
    flex-shrink: 0;
    padding: 0.625rem 1rem;
    padding-top: max(0.625rem, env(safe-area-inset-top));
    background: var(--lb-surface);
    border-bottom: 1px solid var(--lb-border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  }
  .lb-mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin: -0.375rem 0 -0.375rem -0.375rem;
    padding: 0;
    border: none;
    border-radius: 0.313rem;
    background: transparent;
    color: var(--lb-text);
    cursor: pointer;
    flex-shrink: 0;
  }
  .lb-mobile-menu-btn:hover, .lb-mobile-menu-btn:focus-visible {
    background: #ededed;
    outline: none;
  }
  .lb-mobile-menu-btn .lb-nav-icon {
    width: 22px;
    height: 22px;
  }
  .lb-mobile-brand {
    flex: 1;
    min-width: 0;
  }
  .lb-mobile-brand .lb-brand-text {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--lb-brand-dark);
    letter-spacing: -0.01em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .lb-nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(30, 41, 59, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    cursor: pointer;
  }
  .lb-nav-toggle:checked ~ .lb-nav-scrim {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .lb-sidebar {
    width: min(17.5rem, 88vw);
    max-width: none;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
  .lb-nav-toggle:checked ~ .lb-sidebar {
    transform: translateX(0);
  }
}
@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) {
  .lb-sidebar,
  .lb-nav-scrim {
    transition: none;
  }
}
@media (max-width: 767.98px) {
  .lb-nav-item {
    min-height: 2.75rem;
    font-size: 1rem;
  }
  .lb-sidebar-user-name {
    font-size: 1.125rem;
    padding-top: max(0, env(safe-area-inset-top));
  }
  .lb-content {
    margin-left: 0;
    width: 100%;
  }
  .lb-main {
    padding: 1.25rem 1rem 2.5rem;
    padding-bottom: max(2.5rem, 1.5rem + env(safe-area-inset-bottom));
    min-height: auto;
  }
  .lb-page-header {
    margin-bottom: 1.25rem;
  }
  .lb-page-subtitle {
    font-size: 1rem;
  }
  .lb-content-card,
  .lb-welcome-hero {
    padding: 1.125rem 1rem;
  }
  .lb-welcome-hero {
    margin-bottom: 1.25rem;
  }
  .lb-step {
    gap: 0.75rem;
  }
  .lb-hero-pro {
    padding: 1.5rem 1rem;
  }
  .lb-billing-actions .btn {
    width: 100%;
  }
  .lb-auth-header-inner {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.625rem;
  }
  .lb-auth-header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
  }
  .lb-auth-link {
    font-size: 1rem;
  }
  .lb-auth-main-inner {
    padding: 1.5rem 1rem 2.5rem;
    padding-bottom: max(2.5rem, 1.5rem + env(safe-area-inset-bottom));
  }
  .card .card-body.p-4 {
    padding: 1.25rem !important;
  }
}
@media (max-width: 399.98px) {
  .lb-auth-header-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .lb-auth-header-actions {
    justify-content: stretch;
  }
  .lb-auth-header-actions .btn,
  .lb-auth-header-actions .lb-auth-link {
    flex: 1;
    text-align: center;
  }
}
