:root {
  --bg: #fff;
  --panel: #fff;
  --muted: #737373;
  --text: #171717;
  --border: #e6e6e6;
  --accent: #f5f5f5;
  --header-height: 56px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

a,
button {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.app {
  min-height: 100vh;
  background: var(--bg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.topbar-inner {
  width: 100%;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(23, 23, 23, 0.72);
  text-decoration: none;
}

.primary-nav a.active,
.primary-nav a:hover {
  color: var(--text);
}

.toolbar {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toolbar-search {
  display: inline-flex;
  align-items: center;
  min-width: 220px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--muted);
  background: #fff;
}

.toolbar-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 8px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(23, 23, 23, 0.72);
  text-decoration: none;
  transition: color 150ms ease, background-color 150ms ease;
}

.toolbar-chip:hover {
  color: var(--text);
}

.toolbar-divider {
  width: 1px;
  height: 16px;
  background: var(--border);
}

.toolbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: var(--text);
  transition: background-color 150ms ease, color 150ms ease;
}

.toolbar-button:hover {
  background: var(--accent);
}

.new-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 31px;
  padding: 0 12px;
  border-radius: 10px;
  background: #171717;
  color: #fafafa;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 150ms ease;
}

.new-button:hover {
  background: rgba(23, 23, 23, 0.9);
}

.toolbar-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.layout {
  width: 100%;
  padding: 0 24px;
}

.layout-grid {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 32px;
  width: 100%;
}

.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 10px);
  height: calc(100svh - 90px);
  overflow: hidden;
  margin-top: 10px;
}

.sidebar-rail {
  position: absolute;
  top: 48px;
  right: 8px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--border), transparent);
}

.sidebar-scroll {
  position: relative;
  height: 100%;
  width: 224px;
  overflow-y: auto;
  padding: 36px 8px 24px;
}

.sidebar-section + .sidebar-section {
  padding-top: 24px;
}

.sidebar-label {
  margin: 0 0 8px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(23, 23, 23, 0.52);
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 12.8px;
  font-weight: 500;
  color: rgba(23, 23, 23, 0.82);
  text-decoration: none;
}

.sidebar-link.active {
  background: var(--accent);
  color: var(--text);
}

.content {
  min-width: 0;
  padding: 40px 0 72px;
}

.content-shell {
  max-width: 40rem;
  margin: 0 auto;
}

.page-title {
  margin: 0;
  font-size: 36px;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-description {
  margin: 10px 0 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
}

.hero-grid {
  margin-top: 28px;
  display: grid;
  gap: 16px;
}

.hero-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  padding: 20px;
}

.hero-card h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
}

.hero-card p,
.hero-card li {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

.hero-card p {
  margin: 10px 0 0;
}

.hero-list {
  margin: 12px 0 0;
  padding-left: 18px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.2;
  background: #fff;
}

@media (max-width: 1100px) {
  .layout-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }
}

@media (max-width: 900px) {
  .primary-nav,
  .toolbar-search,
  .toolbar-divider {
    display: none;
  }

  .content-shell {
    max-width: 100%;
  }
}
