/* Tips & how-to — FAQ index and article pages.
   Container width and gutters match .main-section (1160px / 2rem) so these pages
   line up with the rest of the site. */

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.faq-hero__inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 3rem 2rem 1.5rem;
}

.faq-hero__title {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-extra-bold);
    margin: 0 0 0.75rem;
    line-height: var(--line-height-tight);
}

.faq-hero__lede {
    max-width: 60ch;
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
    margin: 0;
}

.faq-body__inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 2rem 3.5rem;
}

/* ── Jump links ───────────────────────────────────────────────────────────── */
.faq-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 2.5rem;
}

.faq-toc__link {
    font-size: var(--font-size-sm);
    text-decoration: none;
    color: inherit;
    padding: 6px 14px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 999px;
    transition: border-color 0.15s, background-color 0.15s;
}

.faq-toc__link:hover {
    border-color: rgba(0, 0, 0, 0.4);
    background: rgba(0, 0, 0, 0.04);
    text-decoration: none;
}

/* ── Groups & accordion ───────────────────────────────────────────────────── */
.faq-group {
    margin-bottom: 3rem;
    scroll-margin-top: 90px; /* clears the sticky nav when jumped to */
}

.faq-group__title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    margin: 0 0 1rem;
}

.faq-list {
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.faq-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    /* Clears the sticky nav when linked to directly as /faq/#tip-<slug> */
    scroll-margin-top: 90px;
    transition: background-color 0.4s ease;
}

/* Brief flash on the entry opened via a #tip- link, so it is obvious which one
   was targeted when several are already expanded. Removed again by faq_index.html. */
.faq-item--targeted {
    background-color: rgba(23, 114, 75, 0.09);
}

@media (prefers-reduced-motion: reduce) {
    .faq-item {
        transition: none;
    }
}

.faq-item__q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    cursor: pointer;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    list-style: none;
}

/* Hide the native disclosure triangle in both engines */
.faq-item__q::-webkit-details-marker { display: none; }
.faq-item__q::marker { content: ''; }

.faq-item__marker {
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    position: relative;
}

.faq-item__marker::before,
.faq-item__marker::after {
    content: '';
    position: absolute;
    background: currentColor;
    transition: transform 0.18s ease;
}

.faq-item__marker::before {
    top: 5px; left: 0; width: 12px; height: 2px;
}

.faq-item__marker::after {
    top: 0; left: 5px; width: 2px; height: 12px;
}

.faq-item[open] .faq-item__marker::after {
    transform: scaleY(0);
}

.faq-item__a {
    max-width: 68ch;
    padding: 0 0 1.25rem;
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
}

.faq-item__a p {
    margin: 0 0 0.75rem;
}

.faq-item__more {
    display: inline-block;
    margin-top: 0.25rem;
}

.faq-empty {
    padding: 2rem 0;
    color: #888;
}

/* ── Article page ─────────────────────────────────────────────────────────── */
.article__media {
    position: relative;
    width: 100%;
    height: clamp(200px, 32vw, 380px);
    overflow: hidden;
}

.article__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.article__credit {
    position: absolute;
    right: 10px;
    bottom: 8px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.article__header,
.article__content,
.article__related {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 2rem;
}

.article__header {
    padding-top: 2.5rem;
}

.article__back {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.article__back:hover {
    border-bottom-color: currentColor;
    text-decoration: none;
}

.article__title {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-extra-bold);
    line-height: var(--line-height-tight);
    margin: 0.5rem 0 1.5rem;
}

/* Measure-limited body copy for readability */
.article__lede,
.article__body,
.article__fallback-note {
    max-width: 68ch;
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
}

.article__lede p {
    font-size: var(--font-size-lg);
    margin: 0 0 1rem;
}

.article__body p {
    margin: 0 0 1rem;
}

/* ── Rich text authored in the admin (nh3-sanitised HTML) ─────────────────── */
.article__body h2 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin: 2rem 0 0.75rem;
}

.article__body h3 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    margin: 1.5rem 0 0.5rem;
}

.article__body h2:first-child,
.article__body h3:first-child {
    margin-top: 0;
}

.article__body ul,
.article__body ol {
    margin: 0 0 1rem;
    padding-left: 1.35rem;
}

.article__body li {
    margin-bottom: 0.35rem;
}

.article__body a,
.faq-item__a a,
.col-intro__text a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article__body a:hover,
.faq-item__a a:hover,
.col-intro__text a:hover {
    text-decoration-thickness: 2px;
}

/* Rich text inside the accordion answers — smaller rhythm than a full article */
.faq-item__a h2,
.faq-item__a h3 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    margin: 1rem 0 0.4rem;
}

.faq-item__a ul,
.faq-item__a ol {
    margin: 0 0 0.75rem;
    padding-left: 1.35rem;
}

.faq-item__a li {
    margin-bottom: 0.25rem;
}

.article__fallback-note {
    color: #888;
    font-style: italic;
}

.article__related {
    padding-top: 2rem;
    padding-bottom: 3.5rem;
}

.article__related-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    margin: 0 0 0.75rem;
}

.article__related-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.article__related-list a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.article__related-list a:hover {
    border-bottom-color: currentColor;
    text-decoration: none;
}

/* ── Front-page tips block ────────────────────────────────────────────────── */
.tips-block {
    max-width: 1160px;
    margin: 0 auto;
    padding: 3.5rem 2rem;
}

.tips-block__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.tips-card {
    display: block;
    padding: 1.25rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, transform 0.15s;
}

.tips-card:hover {
    border-color: rgba(0, 0, 0, 0.35);
    transform: translateY(-2px);
    text-decoration: none;
}

.tips-card__title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    margin: 0 0 0.5rem;
}

.tips-card__text {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    margin: 0;
    color: #555;
}

/* ── Route-page tips ──────────────────────────────────────────────────────────
   Given its own panel so it reads as a distinct aside rather than trailing off
   the end of the route description. Preceded by a .route-divider in the template. */
.route-tips {
    margin-top: 2.5rem;
    margin-bottom: 3rem;
    padding: 1.75rem;
    background: rgba(23, 114, 75, 0.05);
    border: 1px solid rgba(23, 114, 75, 0.16);
    border-radius: 12px;
}

.route-tips__eyebrow {
    margin: 0 0 0.35rem;
}

.route-tips__title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    margin: 0 0 1rem;
}

.route-tips__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.route-tips__list a {
    display: inline-block;
    font-size: var(--font-size-sm);
    text-decoration: none;
    color: inherit;
    padding: 6px 14px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 999px;
    transition: border-color 0.15s, background-color 0.15s;
}

.route-tips__list a:hover {
    border-color: rgba(0, 0, 0, 0.4);
    background: rgba(0, 0, 0, 0.04);
    text-decoration: none;
}

@media (max-width: 768px) {
    .faq-hero__inner { padding: 1.75rem 1.25rem 1rem; }
    .faq-hero__title { font-size: var(--font-size-2xl); }
    .faq-body__inner { padding: 0 1.25rem 2rem; }
    .article__header,
    .article__content,
    .article__related { padding-left: 1.25rem; padding-right: 1.25rem; }
    .article__title { font-size: var(--font-size-2xl); }
    .tips-block { padding: 2rem 1.25rem; }
}
