/* Shared PeteLabs site styles: typography, palette, page header,
   home cards, and the automatic breadcrumb bar. Loaded on every page. */
:root {
  --bg: #FEF9EF;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #555555;
  --rule: #ecece8;
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html,
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-variant-numeric: inherit;
}

svg text {
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.toolbar {
  margin: 0 0 16px;
  padding: 0 2px;
}

.page-header {
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #a39b8c;
}

.page-title {
  margin: 0;
  font-family: "Nunito", "Plus Jakarta Sans", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: #33312e;
}

.brand-logo {
  display: block;
  height: 36px;
  width: auto;
  flex: none;
}

.brand-link {
  display: block;
  flex: none;
  line-height: 0;
  border: 0;
  text-decoration: none;
  border-radius: 6px;
}

.brand-link:focus-visible {
  outline: 2px solid #3c3d42;
  outline-offset: 3px;
}

/* Home and section index cards. */
.home-header {
  justify-content: space-between;
}

.home-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.home-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 20px;
  background: var(--surface);
  border: 1px solid #cdc6b8;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.home-card::after {
  content: "\2192";
  color: #a39b8c;
  font-weight: 500;
}

.home-card:hover {
  border-color: #a39b8c;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
  transform: translateY(-1px);
}

.home-card:focus-visible {
  outline: 2px solid #3c3d42;
  outline-offset: 3px;
}

/* Automatic breadcrumb bar (filled by /assets/nav.js). Sits directly
   under the .page-header rule. Hidden when empty so the home page
   can omit it. */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 10px 0 0;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.breadcrumbs:empty {
  display: none;
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 3px;
}

.breadcrumbs a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.breadcrumbs a:focus-visible {
  outline: 2px solid #3c3d42;
  outline-offset: 2px;
}

.breadcrumbs [aria-current="page"] {
  color: #3c3d42;
  font-weight: 600;
}

.breadcrumbs .crumb-sep {
  margin: 0 0.5em;
  color: #b4ab9c;
  font-weight: 400;
  user-select: none;
}

@media (max-width: 480px) {
  main {
    padding: 16px 10px 40px;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .brand-logo {
    height: 27px;
  }

  .page-header {
    padding-bottom: 5px;
  }

  .breadcrumbs {
    margin-top: 8px;
    font-size: 0.75rem;
  }

  .toolbar {
    margin-bottom: 12px;
  }

  .home-links {
    margin-top: 16px;
  }
}
