/* Design notes — shared brand tokens (dark rack/ops; no aurora) */
@import url("../brand.css");

.shell {
  position: relative;
  z-index: 1;
  width: min(820px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 4rem;
}

.note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
}

.note-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
  justify-content: flex-end;
}

.note-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.note-nav a:hover,
.note-nav a.active {
  color: var(--ink);
}

.note-nav a.active {
  box-shadow: inset 0 -2px 0 var(--accent);
}

.shell h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 550;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 1rem;
}

.shell h1 em {
  font-style: italic;
  color: var(--accent-2);
}

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 40rem;
  margin: 0 0 2rem;
  line-height: 1.55;
}

.shell h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 550;
  letter-spacing: -0.02em;
  margin: 2.25rem 0 0.75rem;
}

.shell p,
.shell li {
  color: var(--ink-dim);
  max-width: 42rem;
}

.shell ul {
  padding-left: 1.2rem;
}

.diagram {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  margin: 1.25rem 0;
  overflow-x: auto;
}

.diagram pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--ink);
  white-space: pre;
}

.diagram .ok {
  color: var(--ok);
}
.diagram .bad {
  color: var(--danger);
}
.diagram .dim {
  color: var(--muted);
}

.takeaway {
  margin: 2rem 0;
  padding: 1.15rem 1.25rem;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: var(--radius-lg);
}

.takeaway p {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  line-height: 1.35;
  max-width: none;
}

.siblings {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  margin: 2.5rem 0 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.siblings a {
  text-decoration: none;
  color: var(--ink-dim);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.siblings a:hover {
  border-color: var(--accent);
  color: var(--accent-2);
}

.siblings a.here {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.note-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.note-footer a {
  color: var(--accent-2);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent-2) 45%, transparent);
  text-underline-offset: 0.16em;
  margin-right: 0.75rem;
}

.note-footer a:hover {
  color: #ffe0a0;
  text-decoration-color: #ffe0a0;
}

.note-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  display: grid;
  gap: 1rem;
}

.note-list a {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 550;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent-2) 45%, transparent);
  text-underline-offset: 0.2em;
  color: var(--accent-2);
  letter-spacing: -0.02em;
}

.note-list a:hover {
  color: #ffe0a0;
  text-decoration-color: #ffe0a0;
}

.note-list p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 720px) {
  .shell {
    width: min(820px, calc(100% - 1.25rem));
    padding-bottom: 3rem;
  }

  .note-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 0;
  }

  .note-nav {
    justify-content: flex-start;
  }

  .diagram {
    padding: 0.75rem;
    margin-inline: -0.25rem;
  }

  .diagram pre {
    font-size: 0.7rem;
  }

  .siblings {
    flex-direction: column;
  }
}
