﻿/* Notes / Defence navigation shelves — compact chip + card system */
.notes-nav {
  --nn-radius: 0.85rem;
  --nn-chip-radius: 999px;
}

.notes-nav .notes-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.85rem 0 0;
}

.notes-nav .notes-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid color-mix(in srgb, var(--ink) 16%, var(--rule));
  background: #fff;
  color: var(--ink-700);
  border-radius: var(--nn-chip-radius);
  padding: 0.34rem 0.78rem;
  font-size: 0.78rem;
  font-weight: 620;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.notes-nav .notes-chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.notes-nav .notes-chip.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.notes-nav .notes-chip .notes-chip-dot {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--copper);
  flex-shrink: 0;
}

.notes-nav .notes-chip.is-on .notes-chip-dot {
  background: color-mix(in srgb, var(--copper) 70%, #fff);
}

.notes-shelf {
  margin-top: 1.35rem;
}

.notes-shelf-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.65rem;
}

.notes-shelf-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

.notes-shelf-head p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-500);
}

.notes-card-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.65rem;
}

.notes-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-height: 0;
  padding: 0.72rem 0.78rem 0.72rem 0.95rem;
  border-radius: var(--nn-radius);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, var(--rule));
  background: #fff;
  box-shadow: 0 10px 24px -22px rgba(11, 31, 51, 0.4);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.notes-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0.2rem;
  background: var(--copper);
}

.notes-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--ink) 26%, var(--rule));
  box-shadow: 0 14px 28px -20px rgba(11, 31, 51, 0.48);
  color: inherit;
}

.notes-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.notes-card-kicker {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--copper) 80%, var(--ink));
}

.notes-card-index {
  font-size: 0.7rem;
  font-weight: 650;
  color: color-mix(in srgb, var(--ink) 32%, var(--rule));
  font-variant-numeric: tabular-nums;
}

.notes-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.25;
}

.notes-card p {
  margin: 0;
  color: var(--ink-500);
  font-size: 0.78rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notes-card-cta {
  display: none;
}

.notes-card.is-wide {
  /* same compact size — no tall doors */
}

.notes-card.is-soon {
  opacity: 0.7;
}

.notes-topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1.25rem 0 0;
  max-width: 48rem;
}

.notes-topic-chips a,
.notes-topic-chips span {
  display: inline-flex;
  align-items: center;
  border-radius: var(--nn-chip-radius);
  border: 1px solid color-mix(in srgb, var(--ink) 16%, var(--rule));
  background: #fff;
  padding: 0.32rem 0.72rem;
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-700);
}

.notes-topic-chips a:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.notes-topic-chips span[aria-current="page"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

@media (max-width: 640px) {
  .notes-card-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
  }
}

@media (max-width: 420px) {
  .notes-card-grid {
    grid-template-columns: 1fr;
  }
}
