/* The Pro mode guide (pro-mode-guide.html): a column of links on the left, the page they pick on the right. The look is theme.css's and
   home.css's (loaded first) - this only lays the guide out. */

.guide-main {
    align-items: flex-start;
}

.guide-layout {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
    max-width: 1200px;
}

/* ---- the links */

.guide-nav {
    flex: none;
    width: 260px;
    max-width: none;
    padding: 12px;
    text-align: left;
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}

.guide-nav-link,
.guide-nav-section {
    display: block;
    width: 100%;
    padding: 6px 10px;
    border: var(--px) solid transparent;
    background: none;
    color: var(--text-2);
    font-family: inherit;
    font-size: var(--font-base);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.guide-nav-link:hover,
.guide-nav-section:hover {
    background: var(--fill-hover);
    color: var(--text-hi);
}

.guide-nav-link[aria-current="page"] {
    background: var(--accent-wash);
    border-color: var(--gold);
    color: var(--text-hi);
}

/* "Goals" opens and closes the list under it */
.guide-nav-section {
    margin-top: 8px;
    color: var(--gold);
}

.guide-nav-section::before {
    content: '\25B8';
    display: inline-block;
    width: 1.2em;
}

.guide-nav-section[aria-expanded="true"]::before {
    content: '\25BE';
}

.guide-nav-list {
    margin: 0;
    padding: 0 0 0 12px;
    list-style: none;
}

.guide-nav-link--sub {
    padding: 3px 10px;
    font-size: var(--font-sm);
}

/* ---- the page */

.guide-content {
    flex: 1;
    min-width: 0;
    max-width: none;
    padding: 24px 32px 32px;
    text-align: left;
}

.guide-title {
    margin: 0 0 8px;
    font-size: var(--font-xl);
    font-weight: normal;
    color: var(--gold);
}

.guide-summary {
    margin: 0 0 8px;
    font-size: var(--font-lg);
    color: var(--text-hi);
}

.guide-heading {
    margin: 28px 0 10px;
    padding-bottom: 6px;
    border-bottom: var(--px) solid var(--line);
    font-size: var(--font-lg);
    font-weight: normal;
    color: var(--gold-hi);
}

.guide-content p {
    margin: 0 0 12px;
    line-height: 1.5;
}

.guide-note {
    color: var(--text-2);
}

.guide-code,
.guide-inline-code,
.guide-arguments dt,
.guide-table-code {
    font-family: Consolas, "Courier New", monospace;
    text-shadow: none;
}

.guide-code {
    margin: 0 0 8px;
    padding: 10px 14px;
    background: var(--wood-0);
    border: var(--px) solid var(--ink);
    box-shadow: var(--bevel-well);
    color: var(--gold-hi);
    font-size: var(--font-sm);
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-x: auto;
}

.guide-inline-code {
    padding: 1px 5px;
    background: var(--wood-0);
    border: 1px solid var(--line-dim);
    color: var(--gold-hi);
    font-size: 0.9em;
}

.guide-example-note {
    margin: 0 0 18px;
    color: var(--text-2);
}

.guide-arguments {
    margin: 12px 0 0;
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 8px 20px;
}

.guide-arguments dt {
    color: var(--gold-hi);
    font-size: var(--font-sm);
}

.guide-arguments dd {
    margin: 0;
    line-height: 1.5;
}

.guide-list {
    margin: 0 0 12px;
    padding-left: 22px;
    line-height: 1.5;
}

.guide-list li {
    margin-bottom: 8px;
}

.guide-see-also {
    margin-top: 28px;
    color: var(--text-2);
}

.guide-goal-link {
    color: var(--gold-hi);
    text-decoration: none;
    font-family: Consolas, "Courier New", monospace;
    text-shadow: none;
}

.guide-goal-link:hover,
.guide-goal-link:focus-visible {
    color: var(--text-hi);
    text-decoration: underline;
}

.guide-goal-index {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 6px 16px;
}

/* ---- the short name tables */

.guide-short-name-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.guide-short-names-title {
    margin: 0 0 6px;
    font-size: var(--font-base);
    font-weight: normal;
    color: var(--text-hi);
}

.guide-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-sm);
}

.guide-table td {
    padding: 3px 8px;
    border-bottom: 1px solid var(--line-dim);
}

.guide-table-code {
    width: 4.5em;
    color: var(--gold-hi);
}

/* ---- narrow screens: the links go above the page */

@media (max-width: 820px) {
    .guide-layout {
        flex-direction: column;
    }

    .guide-nav {
        position: static;
        width: 100%;
        max-height: none;
    }

    .guide-content {
        padding: 16px;
    }

    .guide-arguments {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .guide-arguments dd {
        margin-bottom: 10px;
    }
}
