:root {
  --ga-bg: #f6f7fb;
  --ga-surface: #ffffff;
  --ga-surface-soft: #f1f3f9;
  --ga-ink: #202333;
  --ga-muted: #687086;
  --ga-line: #e3e6ef;
  --ga-brand: #4f46e5;
  --ga-brand-dark: #4038c7;
  --ga-brand-soft: #eeedff;
  --ga-success: #18794e;
  --ga-success-soft: #e9f7f0;
  --ga-warning: #9a6700;
  --ga-warning-soft: #fff7df;
  --ga-danger-soft: #fff0f0;
  --ga-radius: 18px;
  --ga-radius-sm: 12px;
  --ga-shadow: 0 14px 38px rgba(28, 32, 52, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--ga-bg);
  color: var(--ga-ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ga-brand);
}

a:hover {
  color: var(--ga-brand-dark);
}

.app-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--ga-line);
}

.app-header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ga-ink);
  text-decoration: none;
  font-weight: 760;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-link:hover {
  color: var(--ga-ink);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--ga-brand);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.app-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.nav-link-soft {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 11px;
  border-radius: 10px;
  color: #4c5264;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 620;
  white-space: nowrap;
}

.nav-link-soft:hover {
  background: var(--ga-surface-soft);
  color: var(--ga-ink);
}

.nav-link-primary {
  background: var(--ga-brand-soft);
  color: var(--ga-brand-dark);
}

.nav-link-primary:hover {
  background: #e5e3ff;
  color: var(--ga-brand-dark);
}

.account-email {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ga-muted);
  font-size: 0.82rem;
  padding-inline: 5px;
}

.logout-form {
  display: inline-flex;
  margin: 0;
}

.logout-button {
  border: 0;
  background: transparent;
}

.language-menu {
  position: relative;
}

.language-menu summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  min-width: 48px;
  text-align: center;
}

.language-menu summary::-webkit-details-marker {
  display: none;
}

.language-popover {
  position: absolute;
  z-index: 50;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  padding: 7px;
  border: 1px solid var(--ga-line);
  border-radius: 14px;
  background: var(--ga-surface);
  box-shadow: var(--ga-shadow);
}

.language-popover a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 9px;
  text-decoration: none;
  color: var(--ga-ink);
  font-size: 0.9rem;
}

.language-popover a:hover,
.language-popover a[aria-current="true"] {
  background: var(--ga-surface-soft);
}

.page-shell {
  padding-block: 56px 72px;
}

.content-narrow {
  max-width: 760px;
  margin-inline: auto;
}

.content-medium {
  max-width: 960px;
  margin-inline: auto;
}

.content-wide {
  max-width: 1080px;
  margin-inline: auto;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--ga-brand-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-heading,
.hero-heading {
  color: var(--ga-ink);
  font-weight: 790;
  letter-spacing: -0.04em;
}

.hero-heading {
  max-width: 760px;
  font-size: clamp(2.25rem, 5vw, 4.15rem);
  line-height: 1.02;
}

.page-heading {
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  line-height: 1.08;
}

.lead-copy {
  max-width: 720px;
  color: var(--ga-muted);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.65;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
  gap: 42px;
  align-items: end;
  margin-bottom: 38px;
}

.benefit-panel {
  border: 1px solid var(--ga-line);
  border-radius: var(--ga-radius);
  background: var(--ga-surface);
  padding: 22px;
}

.benefit-title {
  margin-bottom: 14px;
  font-size: 0.84rem;
  font-weight: 750;
  color: var(--ga-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.benefit-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.benefit-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 9px;
  align-items: start;
  line-height: 1.45;
}

.check-dot {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ga-brand-soft);
  color: var(--ga-brand-dark);
  font-size: 0.74rem;
  font-weight: 900;
}

.app-card {
  border: 1px solid var(--ga-line);
  border-radius: var(--ga-radius);
  background: var(--ga-surface);
  box-shadow: var(--ga-shadow);
}

.app-card-flat {
  box-shadow: none;
}

.prep-form-card {
  padding: clamp(22px, 4vw, 38px);
}

.card-title-clean {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.section-caption {
  color: var(--ga-muted);
  font-size: 0.84rem;
}

.form-label {
  margin-bottom: 7px;
  color: #353a4b;
  font-size: 0.9rem;
  font-weight: 680;
}

.form-control,
.form-select {
  min-height: 46px;
  border-color: #d9ddea;
  border-radius: var(--ga-radius-sm);
  background-color: #fff;
  color: var(--ga-ink);
}

textarea.form-control {
  min-height: 132px;
  line-height: 1.5;
}

.form-control:focus,
.form-select:focus {
  border-color: #9d98f4;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.11);
}

.form-text {
  margin-top: 7px;
  color: var(--ga-muted);
  line-height: 1.45;
}

.upload-box {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 16px;
  border: 1px dashed #bfc4d6;
  border-radius: var(--ga-radius-sm);
  background: #fbfbfd;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.upload-box:hover,
.upload-box:focus-within {
  border-color: #8882e8;
  background: #f8f7ff;
}

.upload-symbol {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--ga-brand-soft);
  color: var(--ga-brand-dark);
  font-size: 1.25rem;
  font-weight: 800;
}

.upload-copy {
  min-width: 0;
}

.upload-action {
  display: block;
  margin-bottom: 2px;
  font-weight: 700;
  color: var(--ga-ink);
}

.upload-selection {
  display: block;
  overflow: hidden;
  color: var(--ga-muted);
  font-size: 0.87rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn {
  border-radius: 11px;
  font-weight: 680;
}

.btn-primary {
  --bs-btn-bg: var(--ga-brand);
  --bs-btn-border-color: var(--ga-brand);
  --bs-btn-hover-bg: var(--ga-brand-dark);
  --bs-btn-hover-border-color: var(--ga-brand-dark);
  --bs-btn-active-bg: var(--ga-brand-dark);
  --bs-btn-active-border-color: var(--ga-brand-dark);
}

.btn-outline-primary {
  --bs-btn-color: var(--ga-brand);
  --bs-btn-border-color: #b9b5f5;
  --bs-btn-hover-bg: var(--ga-brand);
  --bs-btn-hover-border-color: var(--ga-brand);
}

.cta-button {
  min-height: 50px;
  padding-inline: 22px;
}

.loading-panel {
  min-height: 330px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 36px 20px;
}

.loading-orbit {
  width: 46px;
  height: 46px;
  margin: 0 auto 20px;
  border: 4px solid var(--ga-brand-soft);
  border-top-color: var(--ga-brand);
  border-radius: 50%;
  animation: ga-spin 0.8s linear infinite;
}

@keyframes ga-spin {
  to { transform: rotate(360deg); }
}

.result-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 28px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--ga-line);
  border-radius: 999px;
  background: var(--ga-surface);
  color: var(--ga-muted);
  font-size: 0.8rem;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.result-section {
  padding: 24px;
}

.result-section-wide {
  grid-column: 1 / -1;
}

.result-section h2 {
  margin-bottom: 14px;
  font-size: 1rem;
  font-weight: 780;
  letter-spacing: -0.01em;
}

.result-section p,
.result-section li {
  line-height: 1.62;
}

.result-section ul {
  margin-bottom: 0;
  padding-left: 1.15rem;
}

.result-section li + li {
  margin-top: 7px;
}

.guest-save {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px 20px;
  margin-bottom: 18px;
  border: 1px solid #d8d5ff;
  border-radius: var(--ga-radius);
  background: var(--ga-brand-soft);
}

.glossary-card {
  overflow: hidden;
  margin-bottom: 18px;
}

.glossary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 21px 24px 16px;
}

.glossary-header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 780;
}

.glossary-table {
  margin-bottom: 0;
}

.glossary-table > :not(caption) > * > * {
  padding: 13px 16px;
  border-color: #eceef4;
}

.glossary-table thead th {
  background: #f8f9fc;
  color: #53596b;
  font-size: 0.78rem;
  font-weight: 780;
  letter-spacing: 0.025em;
}

.glossary-table tbody td:first-child,
.glossary-table tbody td:nth-child(2) {
  font-weight: 620;
}

.glossary-table tbody tr:hover td {
  background: #fafaff;
}

.glossary-table .new-term td {
  background: #fff9e9;
}

.more-card {
  padding: 24px;
}

.more-actions {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 24px;
  align-items: start;
}

.more-divider {
  height: 100%;
  padding-left: 24px;
  border-left: 1px solid var(--ga-line);
}

.auth-wrap,
.billing-wrap,
.error-wrap {
  max-width: 580px;
  margin-inline: auto;
}

.auth-card,
.billing-card,
.error-card {
  padding: clamp(26px, 5vw, 42px);
}

.simple-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 14px;
  background: var(--ga-brand-soft);
  color: var(--ga-brand-dark);
  font-size: 1.15rem;
  font-weight: 850;
}

.price-line {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-block: 18px 4px;
}

.price-value {
  font-size: clamp(2.5rem, 7vw, 3.8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
}

.price-period {
  color: var(--ga-muted);
}

.billing-features {
  display: grid;
  gap: 11px;
  margin-block: 25px;
  padding: 18px;
  border-radius: 14px;
  background: var(--ga-surface-soft);
}

.billing-feature {
  display: grid;
  grid-template-columns: 21px 1fr;
  gap: 9px;
  align-items: start;
  font-size: 0.92rem;
}

.status-box {
  margin-bottom: 18px;
  padding: 13px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.status-success {
  background: var(--ga-success-soft);
  color: #14613f;
}

.status-info {
  background: var(--ga-brand-soft);
  color: #4038a5;
}

.status-warning {
  background: var(--ga-warning-soft);
  color: #765000;
}

.fair-use {
  color: var(--ga-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.jobs-card {
  overflow: hidden;
}

.jobs-table {
  margin: 0;
}

.jobs-table > :not(caption) > * > * {
  padding: 14px 18px;
  border-color: #eceef4;
}

.jobs-table thead th {
  background: #f8f9fc;
  color: var(--ga-muted);
  font-size: 0.77rem;
  font-weight: 780;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.empty-state {
  padding: 54px 24px;
  text-align: center;
}

.empty-state-mark {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--ga-surface-soft);
  color: var(--ga-muted);
  font-weight: 800;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
  }

  .benefit-panel {
    max-width: 640px;
  }

  .account-email {
    display: none;
  }
}

@media (max-width: 700px) {
  .page-shell {
    padding-block: 34px 54px;
  }

  .app-header-inner {
    min-height: 60px;
    gap: 10px;
  }

  .brand-link {
    font-size: 0;
  }

  .brand-mark {
    font-size: 13px;
  }

  .app-nav {
    gap: 2px;
  }

  .nav-link-soft {
    min-height: 36px;
    padding: 7px 8px;
    font-size: 0.8rem;
  }

  .nav-hide-mobile {
    display: none;
  }

  .hero-heading {
    font-size: clamp(2.15rem, 12vw, 3.1rem);
  }

  .result-header,
  .guest-save,
  .glossary-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .result-section-wide {
    grid-column: auto;
  }

  .more-actions {
    grid-template-columns: 1fr;
  }

  .more-divider {
    padding-left: 0;
    padding-top: 20px;
    border-left: 0;
    border-top: 1px solid var(--ga-line);
  }

  .glossary-table > :not(caption) > * > * {
    padding: 11px 12px;
  }
}
