/* Styles that only the internal portal needs. Colors, type, the sidebar shell
   and lesson content come from the shared /style.css; this file lays the
   portal out around the two teams and quiets the shared "banner" styling so
   it reads like a handbook, not a dashboard. Everything is scoped to
   body.internal-portal so the learning platform is untouched. */

/* --- No entrance animations: pages just appear --- */
.internal-portal .view-section.active-view,
.internal-portal .mentor-card,
.internal-portal .card {
    animation: none;
}

/* ==========================================================================
   Landing
   ========================================================================== */
.internal-portal .portal-card {
    max-width: 980px;
    text-align: left;
}
.internal-portal .portal-hero {
    text-align: center;
    margin-bottom: 28px;
}
.internal-portal .portal-tagline {
    max-width: 560px;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 0 44px 0;
}
.quick-link {
    display: inline-flex;
    align-items: center;
    padding: 11px 20px;
    color: #ffffff;
    background: rgba(10, 10, 10, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: var(--radius);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
}
.quick-link:hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}
.quick-link.primary {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--bg-sidebar);
    font-weight: 700;
}
.quick-link.primary:hover {
    background: var(--accent-gold);
    filter: brightness(1.08);
}

/* The boxes: the same cards as the Prep Team stream picker (shared style.css).
   These are links, not buttons. */
.internal-portal .portal-stream-card {
    text-decoration: none;
    font: inherit;
    color: #ffffff;
}
.internal-portal .portal-stream-card h3 {
    margin-bottom: 10px;
}
.internal-portal .portal-cta-header {
    margin-top: 12px;
}
.stream-blurb {
    color: #b9b9b9;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 22px 0;
}
.internal-portal .portal-stream-card:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}
.empty-note {
    color: var(--text-muted);
    font-size: 0.92rem;
    font-style: normal;
    line-height: 1.6;
}
.empty-note.on-dark {
    color: #b9b9b9;
    text-align: center;
}

/* ==========================================================================
   Inside a team: tabs, sidebar, pages
   ========================================================================== */
.internal-portal .stream-btn {
    display: inline-block;
    text-decoration: none;
}

/* Sidebar lists everything in the current team */
.internal-portal .nav-menu {
    padding-top: 20px;
}
.internal-portal .nav-item {
    margin-bottom: 2px;
    padding: 10px 12px;
    font-weight: 500;
    line-height: 1.35;
    text-decoration: none;
}
.internal-portal .nav-item:hover {
    transform: none;
}
.internal-portal .nav-item.nav-tool {
    margin-bottom: 6px;
}
.internal-portal .nav-heading {
    display: block;
    padding: 20px 12px 6px 12px;
    color: #8f8f8f;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
}
.internal-portal .nav-heading:hover {
    color: #ffffff;
}
.internal-portal .nav-heading.active {
    color: var(--accent-gold);
}
.internal-portal .nav-tool + .nav-heading {
    padding-top: 22px;
}

/* Page content: left aligned, readable line length */
.internal-portal .content-body > .view-section {
    max-width: 860px;
}
.page-head {
    margin-bottom: 28px;
}
.crumb {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.5;
}
.crumb a {
    color: var(--text-muted);
    text-decoration: none;
}
.crumb a:hover {
    color: var(--text-dark);
    text-decoration: underline;
}
.crumb:empty {
    display: none;
}
.page-head h2 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.15;
    color: var(--text-dark);
}
.page-lede {
    margin-top: 10px;
    max-width: 62ch;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.65;
}
.sub-head {
    margin: 34px 0 12px 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
}
.index-list {
    list-style: none;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 8px;
}
.index-list li + li {
    border-top: 1px solid var(--border-color);
}
.index-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 18px;
    color: var(--text-dark);
    font-size: 0.96rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
}
.index-list a:hover {
    background: #f4f4f4;
}
.row-title i {
    margin-right: 10px;
    color: var(--text-muted);
}
.row-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
}
.row-meta i {
    font-size: 0.7rem;
    color: #9a9a9a;
}
.internal-portal #home-overview-card {
    padding: 0;
    border: none;
    box-shadow: none;
    background: none;
    margin-bottom: 24px;
}
.internal-portal .mentor-row {
    margin-bottom: 32px;
}
.internal-portal .lesson-body {
    margin-bottom: 28px;
}

/* ==========================================================================
   Daily Reflection form
   ========================================================================== */
.reflection-form,
.rf-done {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 760px;
}
.rf-trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.rf-row {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 20px;
    margin-bottom: 30px;
}
.rf-field {
    margin-bottom: 30px;
}
.rf-row .rf-field {
    margin-bottom: 0;
}
.rf-label {
    display: block;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-dark);
}
.rf-num {
    display: inline-block;
    min-width: 1.6em;
}
.rf-help {
    margin: 3px 0 10px 0;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}
.rf-input {
    display: block;
    width: 100%;
    padding: 11px 12px;
    background: #ffffff;
    color: var(--text-dark);
    border: 1px solid #b5b5b5;
    border-radius: var(--radius);
    font-size: 0.95rem;
    line-height: 1.5;
}
.rf-label + .rf-input {
    margin-top: 8px;
}
textarea.rf-input {
    min-height: 92px;
    resize: vertical;
}
.rf-input:focus {
    outline: 2px solid var(--bg-sidebar);
    outline-offset: 1px;
    border-color: var(--bg-sidebar);
}
.rf-input.has-error {
    border-color: #b3261e;
}
.rf-error {
    margin: 6px 0 0 0;
    color: #b3261e;
    font-size: 0.85rem;
    font-weight: 600;
}
.rf-mark {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 0 0;
}
.rf-mark-label {
    color: var(--text-muted);
    font-weight: 600;
}
.rf-mark .rf-input.rf-mark-input {
    width: 96px;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
}
.rf-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px 18px;
    padding-top: 4px;
}
.rf-submit {
    background: var(--bg-sidebar);
    color: #ffffff;
    border: 1px solid var(--bg-sidebar);
    border-radius: var(--radius);
    padding: 13px 26px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
}
.rf-submit:hover {
    filter: brightness(1.4);
}
.rf-submit:focus-visible,
.rf-link:focus-visible,
.index-list a:focus-visible,
.stream-btn:focus-visible,
.nav-item:focus-visible,
.nav-heading:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}
.index-list a:focus-visible,
.stream-btn:focus-visible {
    outline-color: var(--bg-sidebar);
}
.rf-submit:disabled {
    opacity: 0.6;
    cursor: default;
    filter: none;
}
.rf-status {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    flex: 1 1 260px;
}
.rf-status.is-error {
    color: #b3261e;
    font-weight: 600;
}
.rf-done {
    outline: none;
}
.rf-done h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 8px;
}
.rf-done p {
    color: var(--text-muted);
    line-height: 1.6;
}
.rf-done-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 22px;
    margin-top: 24px;
}
.rf-link {
    color: var(--text-dark);
    font-weight: 600;
}

/* ==========================================================================
   Phones
   ========================================================================== */
@media (max-width: 768px) {
    .internal-portal .portal-card {
        text-align: left;
    }
    .quick-links {
        margin-bottom: 28px;
    }
    .quick-link {
        flex: 1 1 100%;
        justify-content: center;
    }
    
    .internal-portal .nav-menu {
        padding-top: 12px;
    }
    .internal-portal .chapters-list {
        align-items: center;
    }
    .internal-portal .nav-heading {
        flex-shrink: 0;
        padding: 8px 4px 8px 12px;
        white-space: nowrap;
    }
    .internal-portal .nav-item {
        flex-shrink: 0;
        margin-bottom: 0;
    }
    .internal-portal .stream-selector {
        gap: 8px;
    }
    .internal-portal .stream-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .page-head h2 {
        font-size: 1.55rem;
    }
    .index-list a {
        padding: 14px 14px;
    }
    .reflection-form,
    .rf-done {
        padding: 20px 16px;
    }
    .rf-row {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    .rf-submit {
        width: 100%;
    }
}
