/* =========================================================
   Base / Reset / App Shell
   ========================================================= */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--md-on-surface);
  background: var(--md-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--d-med) var(--ease-standard),
              color var(--d-med) var(--ease-standard);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--md-on-surface);
  margin: 0;
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  user-select: none;
}

/* ---------- App Shell ---------- */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.content {
  min-width: 0;       /* allow content to shrink in grid */
  padding: var(--s-8) var(--s-10);
  overflow-x: hidden;
}

/* Page wrapper inside content */
.page {
  max-width: var(--content-max);
  margin: 0 auto;
  animation: pageIn var(--d-long) var(--ease-emphasized);
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-6);
  margin-bottom: var(--s-8);
  flex-wrap: wrap;
}

.page__title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.page__subtitle {
  margin-top: var(--s-2);
  color: var(--md-on-surface-muted);
  font-size: 14px;
}

/* Breadcrumb */
.crumbs {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 13px;
  color: var(--md-on-surface-muted);
  margin-bottom: var(--s-3);
}

.crumbs__link {
  cursor: pointer;
  padding: 2px 8px;
  border-radius: var(--r-full);
  transition: background var(--d-short) var(--ease-standard);
}
.crumbs__link:hover { background: var(--md-surface-variant); }
.crumbs__sep { color: var(--md-on-surface-subtle); }

/* Responsive */
@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; }
  .content { padding: var(--s-6) var(--s-5); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Utility */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
