/* Reserve scrollbar gutter so layout doesn't shift when content height changes
   (e.g. switching tabs or swapping a Turbo frame on a page). */
html { scrollbar-gutter: stable; }

/* Hide scrollbar while allowing scroll */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Reusable Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* No Tailwind utility classes in this file. It loads AFTER tailwind.css, so a
   copy of a utility here wins every tie and silently beats that utility's
   responsive variants. Copies of .grid, .grid-cols-2, md:grid-cols-3,
   lg:grid-cols-4 and .gap-4 used to live here (identical to Tailwind's own) and
   pinned `grid-cols-2 sm:grid-cols-4` to two columns at every width.
   Guarded by test/lib/stylesheets_after_tailwind_test.rb. */

.nav-link {
    display: inline-flex;
    align-items: center;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}
.nav-link:hover {
    color: #1d4ed8;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--brand-neutral-700);
    margin-bottom: 0.5rem;
}
.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--brand-neutral-300);
    border-radius: 0.375rem;
    font-size: 1rem;
}
.form-input:focus {
    outline: none;
    ring: 2px;
    ring-color: #3b82f6;
}
.description {
    font-size: 0.875rem;
    color: var(--brand-neutral-500);
}
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}
.btn-primary {
    background-color: #3b82f6;
    color: #ffffff;
}
.btn-primary:hover {
    background-color: #2563eb;
}
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}
.btn-secondary {
    background-color: var(--brand-neutral-200);
    color: var(--brand-neutral-700);
  }
  .btn-secondary:hover {
    background-color: var(--brand-neutral-300);
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding-left: 2rem;
}
.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
    border-left: 2px solid var(--brand-neutral-200);
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 0;
    width: 1rem;
    height: 1rem;
    background-color: #3b82f6;
    border-radius: 50%;
}
.timeline-content {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
}
.timeline-date {
    font-size: 0.75rem;
    color: var(--brand-neutral-400);
}
.timeline-images {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.timeline-images img {
    max-width: 70px;
    max-height: 70px;
    object-fit: cover;
    border-radius: 0.25rem;
}

/* "On this page" section rail (shared/_section_rail) — active item set by
   section_rail_controller. Design-system nav rows: hover is a Stone tint
   (Tailwind, in the partial), selected is the primary tint fill with primary
   text; 140ms control transition. No shadow, no accent bar. */
.section-rail-item {
    transition: background-color 140ms cubic-bezier(0.2, 0, 0, 1),
                color 140ms cubic-bezier(0.2, 0, 0, 1);
}
.section-rail-item.section-rail-active {
    background: var(--brand-primary-surface);
    color: var(--brand-primary-dark);
    font-weight: 600;
}
.section-rail-item.section-rail-active .section-rail-num {
    color: var(--brand-primary);
}
@media (prefers-reduced-motion: reduce) {
    .section-rail-item { transition: none; }
}
