/* Student Guides: follow Lunisc's existing Circulars layout.
   All styling is scoped to Guides; nothing changes the global site layout. */

/* Same short-page footer behavior as Lunisc's Circulars pages. */
body:has(> main.lunisc-guides-page),
body:has(> main.lunisc-guides-detail-page) {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}
body:has(> main.lunisc-guides-page) > main,
body:has(> main.lunisc-guides-detail-page) > main {
    flex: 1 0 auto;
    min-height: 0;
}
body:has(> main.lunisc-guides-page) > .footer,
body:has(> main.lunisc-guides-detail-page) > .footer {
    margin-top: 0;
}

/* IMPORTANT: keep the standard content width. The previous revision used
   max-width:none at >=1200px and made Guides spread across the entire screen. */
main.page .container.lunisc-guides-wrap {
    width: min(calc(100% - 32px), 1120px);
    max-width: 1120px;
    margin-inline: auto;
}
.lunisc-guides-title-row {
    margin-bottom: 13px;
}

/* Compact, familiar Lunisc search control (no category/filter UI). */
.lunisc-guides-search-form {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}
.lunisc-guides-search-field {
    flex: 1;
    min-width: 0;
}
.lunisc-guides-search-field input {
    display: block;
    width: 100%;
    height: 38px;
    min-width: 0;
    padding: 0 10px;
    padding-inline-start: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 11.5px;
}
.lunisc-guides-search-form .lunisc-icon-btn {
    flex: none;
}

/* Listing uses the same row, document and pagination components as Circulars. */
.lunisc-guides-list .lunisc-guide-item {
    color: inherit;
    text-decoration: none;
}

/* Guide details share the Circulars hero and Lunisc's HTML article typography.
   Keep long reading text comfortably sized instead of spanning the viewport. */
.lunisc-guides-hero .lunisc-circulars-hero-copy {
    min-width: 0;
}
.lunisc-guides-reading {
    width: 100%;
    max-width: 880px;
    margin-top: 12px;
    padding: 18px 20px;
}
.lunisc-guides-body {
    min-width: 0;
    line-height: 1.8;
    overflow-wrap: anywhere;
}
.lunisc-guides-body > :first-child { margin-top: 0; }
.lunisc-guides-body > :last-child { margin-bottom: 0; }
.lunisc-guides-body :is(h2, h3, h4) {
    color: var(--ink);
    margin: 22px 0 10px;
    line-height: 1.4;
}
.lunisc-guides-body p { margin: 0 0 14px; }
.lunisc-guides-body :is(ul, ol) {
    padding-inline-start: 24px;
    margin: 10px 0 16px;
}
.lunisc-guides-body li { margin-bottom: 5px; }
.lunisc-guides-body table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
    border-collapse: collapse;
}
.lunisc-guides-body :is(th, td) {
    border: 1px solid var(--line);
    padding: 8px 10px;
    text-align: start;
}
.lunisc-guides-body pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.lunisc-guides-notice {
    margin: 24px 0 0;
    padding: 14px 0 0;
    border-top: 1px solid var(--line-soft);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.75;
}

@media (max-width: 680px) {
    main.page .container.lunisc-guides-wrap {
        width: calc(100% - 24px);
        max-width: none;
    }
    .lunisc-guides-title-row .page-title h1 { font-size: 26px; }
    .lunisc-guides-search-form { padding: 9px; }
    .lunisc-guides-reading { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .lunisc-guides-list .lunisc-guide-item { transition: none; }
    .lunisc-guides-list .lunisc-guide-item:hover { transform: none; }
}
