.app-root {
  padding: 20px;
}

.layout-shell {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: var(--space-5);
  align-items: start;
  max-width: 1500px;
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 20px;
}

.sidebar-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: none;
  padding: 12px 16px 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: var(--space-3);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.brand-icon {
  display: block;
  width: 100%;
  max-width: 79px;
  height: auto;
  flex: 0 0 auto;
  filter: none;
}

.brand-wordmark {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: var(--text);
}

.sidebar-brand h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.sidebar-copy {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.45;
}

.sidebar-nav {
  display: grid;
  gap: 7px;
}

.sidebar-actions {
  margin-top: var(--space-5);
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 10px;
}

.dev-auth-badge {
  margin-top: 14px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 44px;
  box-sizing: border-box;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: .94rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease;
}

.sidebar-link:hover {
  background: var(--surface-muted);
  color: var(--accent);
}

.sidebar-link:focus-visible,
.sidebar-utility-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sidebar-link-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.sidebar-link-active:hover {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.sidebar-utility-link {
  gap: var(--space-3);
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 2px 14px 1px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 580;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: color 140ms ease, opacity 140ms ease;
}

.sidebar-utility-link:hover {
  color: var(--accent-hover);
  opacity: 0.92;
}

.content-shell {
  min-width: 0;
}

.app-shell {
  width: 100%;
  max-width: 1200px;
}

.page-header {
  margin-bottom: 20px;
}

.app-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-5);
}

.app-page-header-copy {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  padding-top: 10px;
}

.app-page-header-copy::before {
  content: none;
}

.app-page-header h1 {
  margin: 0;
  color: #233755;
  font-size: clamp(2.15rem, 4vw, 2.55rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.app-page-header-title-main {
  color: #233755;
}

.app-page-header-title-accent {
  color: #6ca02b;
}

.app-page-header-subtitle {
  margin: 8px 0 0;
  max-width: 64ch;
  color: var(--text-muted);
  font-size: 0.96rem;
  line-height: 1.5;
}

.app-page-header-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: var(--space-3);
  min-width: min-content;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  color: #2563eb;
  font-weight: 700;
}

.lede {
  margin: 0;
  max-width: 56ch;
  color: var(--text-muted);
}

.page-actions {
  display: flex;
  align-items: center;
}

.feedback-trigger {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 25;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 1.55rem;
  font-weight: 800;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.feedback-trigger:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  filter: saturate(1.05);
}

.feedback-trigger:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.25);
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .app-root {
    padding: 24px 14px 40px;
  }

  .layout-shell {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .sidebar {
    position: static;
  }

  .page-header {
    margin-bottom: 18px;
  }

  .app-page-header {
    flex-direction: column;
    align-items: start;
    gap: var(--space-4);
  }

  .app-page-header-copy {
    padding-top: 8px;
  }

  .app-page-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .feedback-trigger {
    right: 16px;
    bottom: 16px;
    width: 52px;
    height: 52px;
  }
}

.sidebar-nav-icon { width: 20px; height: 20px; flex: 0 0 20px; }
