*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

html {
  height: 100%;
  color-scheme: light;
  background: #eef3f1;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.45;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

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

a { color: inherit; }

#app {
  height: 100dvh;
  height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  overflow: hidden;
}

.stage {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: var(--topbar-h) 1fr;
  background:
    radial-gradient(900px 420px at 90% -10%, rgba(196, 92, 38, 0.08), transparent 50%),
    radial-gradient(700px 380px at 0% 0%, rgba(15, 61, 62, 0.07), transparent 46%),
    var(--paper);
}

.view-root {
  min-height: 0;
  overflow: hidden;
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
}

.view {
  height: 100%;
  min-height: 0;
  display: none;
}

.view.active {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow: hidden;
  flex: 1;
}

.view-fill {
  min-height: 0;
  flex: 1;
  display: grid;
  gap: 14px;
}

h1, h2, h3 { margin: 0; }

h1, .display {
  font-family: var(--display);
  font-weight: 680;
  letter-spacing: -0.03em;
}

.eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay);
}

.muted { color: var(--muted); }
.faint { color: var(--faint); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: #c5d2ce;
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-track { background: transparent; }

:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 2px;
}

@media (max-width: 1100px) {
  #app { grid-template-columns: 76px 1fr; }
  .brand-copy, .nav-btn span, .sidebar-foot span, .nav-label { display: none; }
  .nav-btn, .sidebar-foot a { justify-content: center; padding-inline: 0; }
}

@media (max-width: 860px) {
  html, body { overflow: auto; height: auto; }
  #app {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100dvh;
  }
  .sidebar {
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    padding: 10px 12px;
  }
  .nav { flex-direction: row; flex: 1; }
  .sidebar-foot { display: none; }
  .brand { padding: 0 8px 0 0; }
  .stage { min-height: calc(100dvh - 64px); }
  .view-root { overflow: visible; height: auto; }
  .view.active { height: auto; }
  .view-fill { height: auto; overflow: visible; }
}
