/* Homepage: a quiet reading surface, with one opening panel and one workbench.
   Loaded only here; shared skill diagrams and other pages keep their layout. */
.home-dashboard {
    gap: 28px;
}

.home-user-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 23%);
    align-items: stretch;
    gap: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--palette-border);
    border-radius: 16px 16px 0 0;
    background: var(--palette-white);
    box-shadow: none;
}

.home-user-hero:not(:has(.home-continue)) {
    grid-template-columns: 1fr;
}

.home-opening-copy {
    min-width: 0;
    padding: 20px 26px 16px;
}

.home-user-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.home-user-hero .lead {
    font-size: .9rem;
}

.home-user-hero .home-plan-list {
    margin: 0;
    gap: 0;
}

.home-user-hero .home-plan-item {
    overflow: visible;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.home-user-hero .home-plan-item + .home-plan-item {
    border-top: 1px solid var(--palette-border);
}

.home-user-hero .home-plan-card-link {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 6px;
    min-height: 44px;
    border-radius: 6px;
}


/* Quiet task annotations occupy at most 35% of the row, including on narrow screens. */
.home-user-hero .home-plan-card-link:has(.home-plan-meta:not([hidden])) {
    grid-template-columns: 28px minmax(0, 1fr) minmax(0, 35%);
}
.home-plan-meta {
    display: grid;
    min-width: 0;
    justify-items: end;
    align-content: center;
    gap: 2px;
    color: var(--color-text-muted);
    font-size: .74rem;
    font-weight: 400;
    line-height: 1.3;
    text-align: right;
    white-space: nowrap;
}
.home-plan-meta[hidden], .home-plan-meta [hidden] {
    display: none;
}
.home-plan-meta > :not([hidden]) {
    max-width: 100%;
}

.home-user-hero .schedule-task-icon {
    width: 28px;
    height: 28px;
}

.home-user-hero .home-plan-card-link strong {
    color: var(--color-heading);
    font-size: .88rem;
    font-weight: 500;
    line-height: 1.4;
}

.home-opening-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-top: 12px;
    font-size: .8rem;
}

.home-opening-links a {
    text-decoration: none;
}

.home-opening-links a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.home-continue {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 150px;
    padding: 24px 16px;
    background: var(--palette-primary);
    color: var(--palette-white);
    font-size: 1.22rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background .15s ease;
}

.home-continue:hover {
    background: var(--palette-primary-hover);
    color: var(--palette-white);
    text-decoration: none;
}

.home-continue:focus-visible {
    outline: 3px solid var(--palette-white);
    outline-offset: -7px;
    background: var(--palette-primary-hover);
}

.home-continue-destination {
    max-width: 26ch;
    font-size: .82rem;
    font-weight: 400;
    line-height: 1.45;
    color: rgba(var(--palette-white-rgb), .88);
    overflow-wrap: anywhere;
}

.home-dashboard-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 1fr);
    gap: 32px;
    align-items: start;
}

.home-guidance-fact-stack {
    align-content: start;
    gap: 24px;
}

.home-text-section {
    position: relative;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.home-text-section > h2 {
    width: 100%;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--palette-border);
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.35;
}

.home-text-section > .home-eyebrow {
    display: none;
}

.home-text-section .home-card-link,
.home-text-section .home-guidance-item a {
    font-weight: 500;
}

.home-text-section .compact-block-skill-chart {
    padding: 6px 4px;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    transform: none;
}

.home-text-section .compact-block-skill-chart:hover,
.home-text-section .compact-block-skill-chart:focus-visible {
    background: var(--palette-surface-muted);
    border-color: var(--palette-border);
}

.home-text-section .home-guidance-list {
    margin-top: 12px;
}

.home-text-section .home-guidance-item {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.home-text-section .home-guidance-item h3 {
    font-weight: 600;
}

.home-text-section .home-guidance-item p {
    font-size: .86rem;
    line-height: 1.5;
}

.home-text-section .home-guidance-item a {
    font-size: .82rem;
}

.home-text-section:has(> .fast-edit-button) > h2 {
    padding-right: 32px;
}

.home-text-section .home-guidance-item:has(> .fast-edit-button) {
    padding-right: 34px;
}

.home-text-section > .fast-edit-button,
.home-text-section .home-guidance-item > .fast-edit-button {
    top: 0;
    right: 0;
}

.home-dashboard .home-lesson-deadlines {
    grid-template-columns: 1fr;
    gap: 4px;
}

.home-dashboard .home-lesson-deadline {
    min-height: 0;
    border: 0;
    border-left: 2px solid var(--palette-border-strong);
    border-radius: 0;
    background: transparent;
    color: var(--palette-slate);
    box-shadow: none;
    transform: none;
}

.home-dashboard .home-lesson-deadline.is-urgent {
    border-left-color: var(--palette-danger);
}

.home-dashboard .home-lesson-deadline-link {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 3px 12px;
    padding: 6px 34px 6px 12px;
}

.home-dashboard .home-lesson-deadline-link strong {
    font-size: .8rem;
    font-weight: 500;
}

.home-dashboard .home-lesson-deadline-link:hover strong {
    color: var(--palette-primary-hover);
    text-decoration: underline;
}

.home-dashboard .home-lesson-deadline-link span {
    -webkit-line-clamp: 1;
}

.home-dashboard .home-update-notification-content {
    display: block;
    padding: 6px 34px 6px 12px;
    font-size: .8rem;
}

.home-update-notification-content summary {
    cursor: pointer;
    width: fit-content;
}

.home-update-notification-content summary:hover .home-update-prompt,
.home-update-notification-content summary:focus-visible .home-update-prompt {
    color: var(--palette-primary-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.home-update-notification-content time {
    margin-left: 8px;
    white-space: nowrap;
}

.home-update-details {
    padding: 10px 0 4px;
    max-width: 75ch;
    line-height: 1.5;
}

.home-update-details > strong {
    display: block;
    margin-bottom: 6px;
}

.home-update-details ul {
    margin: 6px 0;
    padding-left: 20px;
}

.home-dashboard .home-demo-card {
    padding: 0;
    overflow: hidden;
    border-radius: 0 0 16px 16px;
    background: var(--palette-surface-muted);
    box-shadow: none;
}

.home-demo-intro {
    padding: 22px;
    background: var(--palette-white);
}

.home-demo-intro .home-demo-summary {
    margin: 12px 0 0;
}

.home-demo-card .home-demo-embed {
    width: 100%;
    margin: 0;
    border-top: 1px solid rgba(var(--palette-border-strong-rgb), 0.88);
    background: var(--palette-white);
}

.home-demo-card .applet-figure,
.home-demo-card .applet-frame-shell {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.home-demo-card .applet-frame-shell,
.home-demo-card .applet-frame {
    background: var(--palette-white);
}

.home-demo-card .applet-frame-expand {
    right: 12px;
}

.home-demo-empty {
    margin: 0;
    padding: 22px;
}

@media (max-width: 760px) {
    .home-dashboard-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .home-opening-copy {
        padding: 18px;
    }
    .home-user-hero {
        grid-template-columns: minmax(0, 1fr) 165px;
    }
    .home-continue {
        font-size: 1.05rem;
    }
}

@media (max-width: 520px) {
    .home-user-hero {
        grid-template-columns: 1fr;
    }
    .home-continue {
        min-height: 64px;
        padding: 16px;
    }
}
