:root {
  --bg: #f6f8f7;
  --panel: #ffffff;
  --ink: #17211f;
  --muted: #5d6d68;
  --subtle: #dce6e2;
  --line: #d8e2de;
  --accent: #13a89e;
  --accent-dark: #087c75;
  --amber: #c18420;
  --risk: #b9473f;
  --good: #0f8b5f;
  --shadow: 0 18px 50px rgba(21, 40, 36, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 20px;
  background: #10201d;
  color: #f4fbf8;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, #24b8a9, #f2c166);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #10201d;
}

.brand h1,
.topbar h2,
.summary-panel h3,
.method-panel h3,
.section-heading h3,
.project-title h2,
.panel h3 {
  margin: 0;
  letter-spacing: 0;
}

.brand h1 {
  font-size: 22px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #e7f6f2;
  text-align: left;
  border-radius: 8px;
  padding: 13px 14px;
  cursor: pointer;
  font-weight: 700;
}

.nav-item.active,
.nav-item:hover {
  background: #f4fbf8;
  color: #10201d;
}

.sidebar-note {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-note span {
  display: block;
  color: #8ee2d7;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
}

.sidebar-note p {
  color: #b9cbc6;
  font-size: 13px;
  line-height: 1.5;
  margin: 8px 0 0;
}

.main {
  padding: 28px;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.topbar h2 {
  font-size: clamp(26px, 4vw, 42px);
}

.ghost-link,
.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 800;
  border: 1px solid var(--line);
  background: var(--panel);
}

.primary-link {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.view {
  display: none;
}

.active-view {
  display: block;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  gap: 18px;
  margin-bottom: 28px;
}

.summary-panel,
.method-panel,
.panel,
.project-card,
.doc-reader {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.summary-panel,
.method-panel,
.panel,
.project-card {
  padding: 22px;
}

.summary-panel h3,
.method-panel h3 {
  font-size: 26px;
  margin-bottom: 10px;
}

.summary-panel p,
.method-panel li,
.project-card p,
.panel p,
.panel li {
  color: var(--muted);
  line-height: 1.65;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.stat-pill,
.badge,
.doc-category {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: #e9f7f4;
  color: var(--accent-dark);
}

.method-panel ol {
  margin: 12px 0 0;
  padding-left: 22px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 26px 0 14px;
}

.section-heading h3 {
  font-size: 24px;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.compact-heading {
  align-items: flex-start;
  margin-top: 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.project-card {
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.project-card-header,
.project-title {
  display: flex;
  gap: 16px;
  align-items: center;
}

.project-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 8px;
  background: #edf4f1;
  padding: 6px;
}

.project-card h4 {
  font-size: 22px;
  margin: 0 0 5px;
}

.project-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.metric-grid,
.detail-grid,
.risk-grid,
.doc-grid {
  display: grid;
  gap: 14px;
}

.metric-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 16px;
}

.metric {
  padding: 14px;
  border-radius: 8px;
  background: #f3f7f5;
  border: 1px solid var(--line);
}

.metric strong {
  display: block;
  font-size: 26px;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 22px;
  border-radius: 8px;
  color: white;
  background:
    linear-gradient(120deg, rgba(16, 32, 29, 0.92), rgba(19, 168, 158, 0.82)),
    url("./assets/bottlehero/level_01_start.jpg") center / cover;
}

.project-title h2 {
  font-size: clamp(28px, 5vw, 48px);
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.detail-grid {
  grid-template-columns: 1.1fr 0.9fr;
  margin-bottom: 18px;
}

.panel h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.timeline-list,
.compact-list {
  margin: 0;
  padding-left: 20px;
}

.risk-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.risk-card {
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #f0d8d6;
  background: #fff7f5;
}

.risk-card strong {
  color: var(--risk);
}

.screenshot-section {
  margin-bottom: 18px;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.screenshot-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
  color: inherit;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.screenshot-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 16px 34px rgba(21, 40, 36, 0.12);
}

.screenshot-card img {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: #e8f1ee;
}

.screenshot-card span {
  display: grid;
  gap: 4px;
  padding: 10px;
}

.screenshot-card strong {
  color: var(--ink);
  font-size: 14px;
}

.screenshot-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.doc-section {
  margin-top: 20px;
}

.doc-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 16px;
}

.doc-list {
  display: grid;
  gap: 8px;
  align-content: start;
}

.doc-button {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.doc-button.active,
.doc-button:hover {
  border-color: var(--accent);
  background: #f1fbf8;
}

.doc-button strong {
  display: block;
  margin-bottom: 4px;
}

.doc-button span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.doc-reader {
  padding: 0;
  overflow: hidden;
}

.doc-reader-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #fbfdfc;
}

.doc-reader-header h3 {
  margin: 0 0 6px;
}

.markdown {
  padding: 22px;
  max-height: 72vh;
  overflow: auto;
  background: #ffffff;
  color: var(--ink);
}

.markdown h1,
.markdown h2,
.markdown h3 {
  color: var(--ink);
}

.markdown h1 {
  font-size: 28px;
}

.markdown h2 {
  font-size: 22px;
  margin-top: 30px;
}

.markdown p,
.markdown li {
  color: #33423f;
  line-height: 1.72;
}

.markdown code {
  background: #edf4f1;
  color: #17312d;
  padding: 2px 5px;
  border-radius: 5px;
}

.markdown pre {
  overflow: auto;
  padding: 14px;
  border-radius: 8px;
  background: #10201d;
  color: #e8fbf6;
}

.markdown pre code {
  display: block;
  background: transparent;
  color: #f6fffc;
  padding: 0;
  border-radius: 0;
  white-space: pre;
}

.markdown blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  border-left: 4px solid var(--accent);
  background: #f4fbf8;
  color: #263d39;
}

.markdown blockquote p {
  margin: 0;
  color: #263d39;
}

.markdown table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  background: #ffffff;
  color: #263d39;
}

.markdown th,
.markdown td {
  border: 1px solid var(--line);
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}

.markdown th {
  background: #eef7f4;
  color: #17312d;
}

.sync-panel {
  border-left: 4px solid var(--amber);
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .hero-grid,
  .detail-grid,
  .doc-layout {
    grid-template-columns: 1fr;
  }

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

  .topbar,
  .project-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
