/* Phase 9 cloud app -- light, clean, mobile-first. Pico (classless) provides the
   base; this adds the app shell + the reused panel classes from the existing
   builders (deployment/overview.py, bear_panel.py) so their HTML renders here. */

:root { --line: #e7e5e4; --ink: #1c1917; --sub: #78716c; }
body { margin: 0; }

/* minmax(0,1fr): without the 0, the content column refuses to shrink below its
   intrinsic width, so wide tables / long text overflow off-screen. */
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }

.nav {
  background: #fafaf9; border-right: 1px solid var(--line);
  padding: 16px 12px; display: flex; flex-direction: column;
}
.nav .brand { font-weight: 700; font-size: 13px; margin-bottom: 16px; }
.nav ul { list-style: none; padding: 0; margin: 0; }
.nav li { margin: 0; }
.nav a {
  display: block; padding: 8px 10px; border-radius: 6px;
  text-decoration: none; color: var(--ink); font-size: 14px;
}
.nav a:hover { background: var(--line); }
.nav a.active { background: var(--ink); color: #fff; }
.nav .foot { margin-top: auto; font-size: 11px; color: var(--sub); line-height: 1.5; }

.content { padding: 20px 28px; max-width: 1100px; min-width: 0; }
.content > h1 { font-size: 20px; margin: 0 0 14px; }

/* reused panel vocabulary */
.panel {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 16px; margin-bottom: 16px;
  overflow-x: auto;            /* wide tables scroll inside the panel, not the page */
}
.panel p { overflow-wrap: anywhere; }
.panel pre { overflow-wrap: anywhere; white-space: pre-wrap; }
.panel h2 { font-size: 15px; margin: 0 0 8px; }
.panel h3 { font-size: 13px; margin: 12px 0 4px; }
.muted { color: var(--sub); }
.small { font-size: 12px; }
.neg { color: #b91c1c; }
.num { text-align: right; }
.ticker { font-weight: 600; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #f5f5f4; vertical-align: top; }
details summary { color: var(--ink); }

@media (max-width: 720px) {
  .shell { grid-template-columns: 1fr; }
  .nav { flex-direction: row; flex-wrap: wrap; gap: 4px; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav .brand { width: 100%; }
  .nav .foot { display: none; }
  .content { padding: 16px; }
}
