/* -------------------------------------------------------------------------
   Index Generator — priority-first layout
   Priority: Title → Login → Steps → Actions
   Secondary: Description / Benefits (disclosure)
   ------------------------------------------------------------------------- */

:root {
  --color-green: #4caf50;
  --color-green-hover: #43a047;
  --color-green-dark: #3d8b40;
  --color-text: #1a1a1a;
  --color-text-muted: #6b6b6b;
  --color-border: #d8d8d8;
  --color-divider: #e6e6e6;
  --color-bg-white: #ffffff;
  --color-bg-panel: #f7f7f7;
  --color-bg-auth: #e0e0e0;
  --color-bg-badge: #f2f2f2;
  --color-advisory: #e67e22;
  --font-family: "Source Sans 3", "Segoe UI", sans-serif;
  --radius-sm: 4px;
  --radius-md: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.45;
  color: var(--color-text);
  background: var(--color-bg-white);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* -------------------------------------------------------------------------
   Priority 1 — Title header
   ------------------------------------------------------------------------- */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
  padding: 0.85rem 1.25rem 0.85rem 1.75rem;
  border-bottom: 1px solid var(--color-divider);
  background: var(--color-bg-white);
}

.app-title {
  margin: 0;
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #000;
}

.app-tagline {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.app-header__actions {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.app-header__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem 1rem;
}

.header-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-green);
  text-decoration: none;
}

.header-link:hover,
.header-link:focus-visible {
  text-decoration: underline;
}

.header-link--contact {
  flex-shrink: 0;
  white-space: nowrap;
}

.header-dot {
  display: inline-block;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--color-green);
  flex-shrink: 0;
}

/* -------------------------------------------------------------------------
   Main split: work panel + login
   ------------------------------------------------------------------------- */

.app-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.work-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  background: var(--color-bg-panel);
}

.work-panel__scroll {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1.25rem;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 1.5rem 2rem 1.25rem;
}

.work-panel__bar {
  flex-shrink: 0;
  width: 100%;
  padding: 0.75rem 2rem 1rem;
  background: var(--color-bg-panel);
  position: relative;
  z-index: 2;
}

.priority-block {
  background: var(--color-bg-white);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem 1.15rem;
}

.priority-label {
  margin: 0 0 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* -------------------------------------------------------------------------
   Priority 3 — Numbered steps
   ------------------------------------------------------------------------- */

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.steps__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
}

.steps__item p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--color-text);
}

.steps__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--color-green);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.steps__item--advisory p {
  color: var(--color-advisory);
}

.steps__item--advisory .steps__num {
  background: var(--color-advisory);
}

.steps-advisory {
  margin: 0.85rem 0 0;
  font-size: 0.98rem;
  color: var(--color-advisory);
}

/* -------------------------------------------------------------------------
   Priority 4 — Assessment action cards
   ------------------------------------------------------------------------- */

.action-intro {
  margin: -0.35rem 0 0.85rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.action-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.action-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
  padding: 0.9rem 1rem 0.9rem 1.15rem;
  background: var(--color-bg-white);
  border: 2px solid var(--color-green);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease, transform 0.15s ease;
}

.action-card:hover,
.action-card:focus-visible {
  background: rgba(76, 175, 80, 0.08);
  border-color: var(--color-green-hover);
  box-shadow: 0 2px 10px rgba(76, 175, 80, 0.22);
  transform: translateY(-1px);
}

.action-card:focus-visible {
  outline: 2px solid var(--color-green-dark);
  outline-offset: 2px;
}

.action-card:active {
  transform: translateY(0);
  box-shadow: none;
}

.action-card__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  min-width: 0;
}

.action-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
}

.action-card__desc {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.action-card__affordance {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-green);
  color: #fff;
}

.action-card:hover .action-card__affordance,
.action-card:focus-visible .action-card__affordance {
  background: var(--color-green-hover);
}

/* Shared button styles (forms / other CTAs) */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.15rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease;
}

.btn--primary {
  background: var(--color-bg-white);
  border-color: var(--color-green);
  color: var(--color-text);
  box-shadow: none;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: rgba(76, 175, 80, 0.08);
  border-color: var(--color-green);
  box-shadow: none;
  transform: none;
}

.btn--outline {
  background: var(--color-bg-white);
  border-color: var(--color-green);
  color: var(--color-text);
}

.btn--outline:hover,
.btn--outline:focus-visible {
  background: rgba(76, 175, 80, 0.08);
}

.btn--lg {
  min-height: 3.4rem;
  font-size: 1.05rem;
}

.btn:focus-visible {
  outline: 2px solid var(--color-green-dark);
  outline-offset: 2px;
}

.submission-note {
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.submit-status {
  margin: 0.75rem 0 0;
  padding: 0.85rem 1rem;
  max-width: 100%;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #1f3d1f;
  background: #eef8ee;
  border: 1px solid #c8e6c9;
  border-radius: var(--radius-md);
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

.submit-status p {
  margin: 0;
}

.submit-status__note {
  margin-top: 0.55rem;
}

.submit-status--error {
  color: #7a1c1c;
  background: #fdecec;
  border-color: #f5b5b5;
}

/* -------------------------------------------------------------------------
   Secondary — progressive disclosure
   ------------------------------------------------------------------------- */

.secondary-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.disclosure {
  background: var(--color-bg-white);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
}

.disclosure__summary {
  cursor: pointer;
  list-style: none;
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-text);
  user-select: none;
}

.disclosure__summary::-webkit-details-marker {
  display: none;
}

.disclosure__summary::before {
  content: "+";
  display: inline-block;
  width: 1.1rem;
  margin-right: 0.35rem;
  color: var(--color-green);
  font-weight: 700;
}

.disclosure[open] .disclosure__summary::before {
  content: "–";
}

.disclosure__summary:hover,
.disclosure__summary:focus-visible {
  color: #000;
}

.disclosure__body {
  padding: 0 1rem 0.95rem;
  border-top: 1px solid var(--color-divider);
}

.disclosure__body p {
  margin: 0.7rem 0 0;
  font-size: 0.92rem;
  color: var(--color-text);
}

.disclosure__body p:first-child {
  margin-top: 0.75rem;
}

/* -------------------------------------------------------------------------
   Powered by
   ------------------------------------------------------------------------- */

.powered-by {
  margin: 0;
}

.powered-by__label {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.powered-by__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
}

.powered-by__badge {
  display: inline-block;
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
  color: #4a4a4a;
  background: var(--color-bg-badge);
  border-radius: var(--radius-sm);
}

/* -------------------------------------------------------------------------
   Priority 2 — Login panel
   ------------------------------------------------------------------------- */

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  padding: 1.5rem;
  background: var(--color-bg-auth);
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */

@media (max-width: 960px) {
  html,
  body {
    overflow: auto;
  }

  .app-shell {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
  }

  .app-main {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .auth-panel {
    min-height: 70vh;
    order: -1;
  }

  .work-panel {
    overflow: hidden;
  }

  .work-panel__scroll {
    overflow-x: hidden;
    overflow-y: auto;
  }
}

@media (max-width: 560px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.85rem 1.1rem;
  }

  .work-panel__scroll {
    padding: 1.1rem;
  }

  .work-panel__bar {
    padding: 0.75rem 1.1rem 1rem;
  }
}
