:root {
    --ink: #202122;
    --paper: #fcf8ef;
    --sky: #dceaff;
    --white: #fffdf8;
    --yellow: #ffcc36;
    --purple: #d3b4ff;
    --green: #adf0c8;
    --blue: #a7cfff;
    --muted: #525056;
    --border: 2px solid var(--ink);
    --heading: "Space Grotesk", system-ui, sans-serif;
    color: var(--ink);
    background: var(--paper);
    font: 16px/1.5 "DM Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}
[hidden] { display: none !important; }

h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-family: var(--heading); }
label, legend { font-weight: 700; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
button { cursor: pointer; }

.shell {
    width: min(1176px, calc(100% - 4rem));
    margin-inline: auto;
}

.site-header {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-footer {
    margin-block-start: auto;
    padding-block: 1.4rem;
    text-align: center;
}

.site-footer > p:first-child {
    padding-block-start: .85rem;
    border-top: 1px solid #c9c2bb;
    color: var(--muted);
    font: 700 .95rem/1.5 var(--heading);
}

.site-footer #install-app { margin-top: .4rem; }
.site-footer #install-guide { margin-top: .25rem; font-size: .9rem; }
.site-footer .footer-support { margin-top: .4rem; }

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.25rem;
    font-weight: 700;
}

.site-nav a {
    display: block;
    padding: 0.4rem 0.58rem;
    border: 1px solid transparent;
    border-radius: 8px;
    text-decoration: none;
}

.site-nav a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.site-nav [aria-current=page] { border-color: var(--ink); background: var(--purple); }

.brand {
    display: inline-flex;
    align-items: center;
    font: 700 2rem/1 var(--heading);
    letter-spacing: -.07em;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 37px;
    height: 37px;
    margin-right: 0.65rem;
    border: var(--border);
    border-radius: 10px;
    background: var(--yellow);
    box-shadow: 2px 2px 0 var(--ink);
    font-size: 24px;
    letter-spacing: 0;
    transform: rotate(-7deg);
}

.brand-dot { color: #6844ae; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 44px;
    padding: 0.55rem 0.95rem;
    border: var(--border);
    border-radius: 10px;
    background: var(--white);
    box-shadow: 3px 3px 0 var(--ink);
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
}

.button:hover:enabled { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.button:active:enabled { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.button:disabled { background: #eeeae4; color: #655f5f; box-shadow: none; cursor: default; }

.button-yellow { background: var(--yellow); }
.button-blue { background: var(--blue); }
.button-green { background: var(--green); }
.button-light { background: var(--white); }

:focus-visible { outline: 3px solid #4f28aa; outline-offset: 3px; }
input { min-width: 0; }

.hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    padding: clamp(1.65rem, 4.3vw, 3.65rem);
    border: 3px solid var(--ink);
    border-radius: 23px;
    box-shadow: 7px 7px 0 var(--ink);
    background:
        radial-gradient(circle, #668ed647 1px, transparent 1.35px) 0 0 / 18px 18px,
        var(--sky);
}

.hero h1 {
    font-size: clamp(3rem, 6vw, 5.6rem);
    line-height: .94;
    letter-spacing: -.083em;
}

.hero h1 span {
    padding-inline: 0.025em 0.09em;
    margin-left: -0.025em;
    background: linear-gradient(transparent 63%, var(--yellow) 63% 91%, transparent 91%);
    white-space: nowrap;
}

.hero p {
    max-width: 30rem;
    margin: 1.2rem 0 1.55rem;
    font-size: clamp(1rem, 1.55vw, 1.17rem);
    font-weight: 600;
}

.hero form label, #link-fallback label { display: block; margin-bottom: 0.35rem; }

.source-actions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-width: 32rem;
}

.source-actions input, #planning-address {
    min-height: 44px;
    padding: 0.6rem 0.72rem;
    border: var(--border);
    border-radius: 10px;
    background: var(--white);
}
.source-actions input { width: 100%; }
.source-example { display: block; margin-top: .5rem; color: var(--muted); overflow-wrap: anywhere; }
#planning-address { width: 100%; }

.hero-art {
    display: block;
    width: 100%;
    height: auto;
    max-height: 365px;
    justify-self: center;
    object-fit: contain;
}

main.shell { padding-bottom: 3rem; }

.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    list-style: none;
    padding: 0;
    margin: 0 0 1.2rem;
}

.steps button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.7rem;
    border: var(--border);
    border-radius: 10px;
    background: var(--white);
    font-weight: 700;
}

.steps span {
    display: grid;
    place-items: center;
    flex: 0 0 1.65rem;
    height: 1.65rem;
    border: 1px solid var(--ink);
    border-radius: 7px;
    background: var(--white);
}

.steps button:disabled { color: var(--muted); cursor: default; }
.steps li.completed button { background: var(--green); }
.steps li[aria-current] button { background: var(--purple); box-shadow: 2px 2px 0 var(--ink); cursor: default; }
.steps li:not([aria-current]) button:not(:disabled):hover { box-shadow: 2px 2px 0 var(--ink); }

.step-panel { max-width: 940px; margin-inline: auto; }
.step-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.panel-body > .step-actions, fieldset > .step-actions { margin-top: 1rem; }

.loading-panel {
    max-width: 940px;
    margin: 0 auto 1.15rem;
    padding: 0.9rem;
    border: var(--border);
    border-radius: 14px;
    background: var(--sky);
    box-shadow: 4px 4px 0 var(--ink);
}

.loading-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.65rem;
}

.loading-heading h2 { font-size: 1.12rem; }
#loading-detail { color: var(--muted); font-size: 0.88rem; overflow-wrap: anywhere; }
#loading-percent { font: 700 1rem/1 var(--heading); white-space: nowrap; }

.loading-icon {
    display: grid;
    place-items: center;
    width: 2.15rem;
    height: 2.15rem;
    border: var(--border);
    border-radius: 8px;
    background: var(--yellow);
    box-shadow: 2px 2px 0 var(--ink);
    transform: rotate(-7deg);
    font-size: 1.25rem;
}

.loading-track { position: relative; }

#loading-progress {
    display: block;
    width: 100%;
    height: 1rem;
    appearance: none;
    overflow: hidden;
    border: var(--border);
    border-radius: 7px;
    background: var(--white);
    accent-color: #68d59a;
}

#loading-progress::-webkit-progress-bar { background: var(--white); }
#loading-progress::-webkit-progress-value {
    background: repeating-linear-gradient(120deg, #68d59a 0 9px, #aef1c8 9px 16px);
    box-shadow: inset -2px 0 var(--ink);
    transition: width 140ms ease-out;
}
#loading-progress::-moz-progress-bar {
    background: repeating-linear-gradient(120deg, #68d59a 0 9px, #aef1c8 9px 16px);
    box-shadow: inset -2px 0 var(--ink);
}
#loading-progress:indeterminate::-webkit-progress-value { visibility: hidden; }
#loading-progress:indeterminate::-moz-progress-bar { visibility: hidden; }

.loading-sweep {
    display: none;
    position: absolute;
    inset: 2px;
    overflow: hidden;
    border-radius: 5px;
    pointer-events: none;
}

#loading-progress:indeterminate + .loading-sweep { display: block; }

.loading-sweep::before {
    content: '';
    display: block;
    width: 30%;
    height: 100%;
    border-radius: inherit;
    background: repeating-linear-gradient(120deg, #68d59a 0 9px, #aef1c8 9px 16px);
    animation: loading-search 1.1s ease-in-out infinite alternate;
}

@keyframes loading-search {
    from { transform: translateX(0); }
    to { transform: translateX(233.33%); }
}

@keyframes loading-pulse {
    from { opacity: 0.45; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    #loading-progress::-webkit-progress-value { transition: none; }
    .loading-sweep::before {
        margin-inline: auto;
        animation: loading-pulse 1.2s ease-in-out infinite alternate;
    }
}

.panel {
    min-width: 0;
    overflow: clip;
    border: var(--border);
    border-radius: 17px;
    background: var(--white);
    box-shadow: 5px 5px 0 var(--ink);
}

.panel-header {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    min-height: 68px;
    padding: 0.75rem 1rem;
    border-bottom: var(--border);
}

.panel-purple { background: var(--purple); }
.panel-yellow { background: var(--yellow); }
.panel-header h2 { font-size: clamp(1.3rem, 2.2vw, 1.65rem); line-height: 1.07; letter-spacing: -.04em; }
.panel-icon {
    display: grid;
    place-items: center;
    flex: 0 0 2rem;
    height: 2rem;
    border: var(--border);
    border-radius: 8px;
    background: var(--white);
    font-weight: 700;
    font-size: 1.15rem;
}

.panel-body { padding: 1rem; }

.status { margin: 0 0 0.8rem; color: #4d2371; font-weight: 700; overflow-wrap: anywhere; }
.status:empty { display: none; }
.planning-feedback { max-width: 940px; margin-inline: auto; }
#retry-planning { margin: 0 0 1rem; }
#link-status, #link-fallback { margin-top: 0.8rem; }

.ics-warning {
    margin-top: .6rem;
    padding: .4rem .65rem;
    border-inline-start: 3px solid #a46b10;
    border-radius: 4px;
    background: #fff3d5;
    font-size: .86rem;
}

.share-actions { position: relative; }
.share-actions summary { list-style: none; cursor: pointer; }
.share-actions summary::-webkit-details-marker { display: none; }
.share-actions[open] summary span { transform: rotate(180deg); }

.share-options {
    position: absolute;
    inset-block-start: calc(100% + .45rem);
    inset-inline-end: 0;
    z-index: 4;
    display: grid;
    gap: .45rem;
    width: min(20rem, calc(100vw - 4rem));
    padding: .65rem;
    border: var(--border);
    border-radius: 10px;
    background: var(--white);
    box-shadow: 3px 3px 0 var(--ink);
}

.share-options .button { justify-content: flex-start; white-space: normal; }
.share-options .ics-warning { margin-top: .15rem; }

@media (prefers-reduced-motion: no-preference) {
    .button { transition: transform 130ms ease, box-shadow 130ms ease; }
    .share-actions[open] .share-options { animation: open-share .2s ease-out both; }
}

@keyframes open-share {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

fieldset { min-inline-size: 0; padding: 0; margin: 0; border: 0; }

.planning-source { padding: 0.65rem 0 0.9rem; }
.planning-source + .planning-source { border-top: 1px solid #c9c2bb; }
.source-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.55rem;
}
.source-heading h3 { min-width: 0; font-size: 0.92rem; overflow-wrap: anywhere; }

.text-button {
    background: none;
    border: 0;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 0.13em;
    font-size: 0.9rem;
    font-weight: 700;
}
.text-button:hover { color: #543292; }

.choices {
    display: grid;
    gap: 4px;
    grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
    max-height: 26rem;
    overflow: auto;
    margin-top: 0.55rem;
    padding: 3px;
    scrollbar-color: #78688d transparent;
}

.choices label {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.43rem 0.55rem;
    border: 1px solid #ddd7cd;
    border-radius: 7px;
    background: #fff;
    font-size: 0.91rem;
    font-weight: 500;
    cursor: pointer;
}

.choices label:has(:checked) { background: var(--green); border-color: #47815f; font-weight: 700; }
.choices input { accent-color: #1d653b; width: 1rem; height: 1rem; flex: none; margin: 0.19rem 0 0; }

#course-count { margin: 0.3rem 0 0.65rem; font-size: .91rem; color: var(--muted); }
.course-actions { display: flex; gap: 0.9rem; }

.planning-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.planning-toolbar > .step-actions { margin-inline-start: auto; }

#schedule-count { font-weight: 700; }
#schedule-count:empty { display: none; }
#schedule-freshness { margin-top: .25rem; color: var(--muted); font-size: .85rem; }

.empty-planning {
    display: grid;
    justify-items: center;
    gap: .45rem;
    min-height: 13rem;
    align-content: center;
    padding: 1rem 0.65rem;
    text-align: center;
}
.empty-planning p { color: var(--muted); }
.empty-planning h3 { font-size: 1.35rem; letter-spacing: -.04em; }

.empty-icon {
    display: grid;
    place-items: center;
    width: 3.05rem;
    height: 3.05rem;
    margin-bottom: 0.32rem;
    border: var(--border);
    border-radius: 12px;
    background: var(--green);
    box-shadow: 3px 3px 0 var(--ink);
    transform: rotate(-8deg);
    font-size: 1.55rem;
}

.planning-day {
    margin-top: 0.95rem;
    padding: 0.7rem;
    border: 1px solid #ccc5b8;
    border-radius: 10px;
}

.planning-day h4 {
    display: inline-block;
    margin-bottom: 0.35rem;
    padding: 0.22rem 0.65rem;
    border: 1px solid var(--ink);
    border-radius: 20px;
    background: var(--blue);
    font-size: 0.93rem;
}
.planning-day:nth-child(even) h3 { background: var(--purple); }

.planning-event {
    display: grid;
    width: 100%;
    text-align: left;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.08rem 0.85rem;
    margin-top: 0.38rem;
    padding: 0.55rem 0.65rem;
    border: 0;
    border-inline-start: 5px solid var(--course-accent);
    border-radius: 7px;
    background: var(--course-color);
    overflow-wrap: anywhere;
}
.planning-event span { font-size: .88rem; font-weight: 700; white-space: nowrap; }
.planning-event small { color: var(--muted); grid-column: 2; }

@media (max-width: 850px) {
    .hero { gap: 0.7rem; }
    .hero h1 { font-size: clamp(2.55rem, 7.2vw, 4.3rem); }
}

@media (max-width: 610px) {
    .shell { width: calc(100% - 2rem); }
    .site-header { flex-wrap: wrap; gap: 0.55rem; padding-block: 0.75rem; }
    .site-nav { width: 100%; justify-content: flex-start; gap: 0.2rem; font-size: 0.84rem; }
    .site-nav a { padding-inline: 0.35rem; }
    .hero { grid-template-columns: minmax(0, 1fr); padding: 1.2rem; border-radius: 16px; box-shadow: 4px 4px 0 var(--ink); }
    .hero h1 { font-size: clamp(2.55rem, 11vw, 3.6rem); }
    .hero p { margin-block: .8rem 1rem; }
    .hero-art { max-height: 180px; max-width: 350px; margin-top: .18rem; }
    .steps { gap: 0.35rem; }
    .steps button { flex-direction: column; justify-content: center; gap: 0.2rem; padding: 0.35rem 0.15rem; font-size: .75rem; }
    .steps span { flex-basis: auto; width: 1.55rem; height: 1.55rem; }
    .source-actions > .text-button { width: 100%; text-align: left; }
    .panel-header { min-height: 58px; }
    .panel-body { padding: .85rem; }
}

@media (max-width: 365px) {
    .source-actions .button { padding-inline: 0.55rem; }
    .planning-event { grid-template-columns: minmax(0, 1fr); }
    .planning-event small { grid-column: 1; }
}


.home-guide-link {
    display: inline-block;
    margin-top: 0.85rem;
    font-weight: 700;
    text-underline-offset: 0.2em;
}

.home-guide {
    margin: 2.3rem 0 0.5rem;
    scroll-margin-top: 1rem;
}

.home-guide h2 {
    font-size: clamp(1.75rem, 3.3vw, 2.55rem);
    letter-spacing: -.055em;
}

.home-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
    margin: 0.85rem 0 1rem;
    padding: 0;
    list-style: none;
    counter-reset: instructions;
}

.home-steps li {
    padding: 0.9rem;
    border: var(--border);
    border-radius: 13px;
    box-shadow: 3px 3px 0 var(--ink);
    background: var(--white);
    counter-increment: instructions;
}

.home-steps li::before {
    content: counter(instructions);
    display: grid;
    place-items: center;
    width: 1.7rem;
    height: 1.7rem;
    margin-bottom: 0.4rem;
    border: 1px solid var(--ink);
    border-radius: 7px;
    background: var(--purple);
    font-weight: 700;
}

.home-steps li:nth-child(2)::before { background: var(--blue); }
.home-steps li:nth-child(3)::before { background: var(--green); }
.home-steps li:nth-child(4)::before { background: var(--yellow); }
.home-steps h3 { font-size: 1.05rem; }
.home-steps p, .home-save { color: var(--muted); }
.home-steps p { font-size: .92rem; }

#planning-courses label {
    border-inline-start: 5px solid var(--course-accent);
}

#planning-courses label:has(:checked) {
    background: var(--course-color);
    border-color: var(--course-accent);
}

.view-options {
    position: sticky;
    inset-block-start: 0.5rem;
    z-index: 3;
    display: inline-flex;
    gap: 0.25rem;
    margin: 1rem 0 0.6rem;
    padding: 0.25rem;
    border: var(--border);
    border-radius: 10px;
    background: var(--sky);
}

.view-options button {
    padding: 0.38rem 0.58rem;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    font-weight: 700;
}

.view-options [aria-pressed=true] {
    border-color: var(--ink);
    background: var(--purple);
}

.calendar-tools {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem;
    min-height: 3.4rem;
    margin-bottom: 0.75rem;
}

#calendar-period {
    text-align: center;
    font-family: var(--heading);
    font-weight: 700;
    line-height: 1.2;
    text-transform: capitalize;
}

.calendar-viewport {
    width: 100%;
    height: var(--calendar-height);
    overflow: clip;
    border: var(--border);
    border-radius: 10px;
    background: var(--white);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    min-width: 0;
    height: 100%;
    overflow: clip;
    background: #dcd4c9;
    gap: 1px;
}

.calendar-weekday {
    padding: 0.38rem;
    background: var(--purple);
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
}

.calendar-cell {
    min-width: 0;
    min-height: 5rem;
    padding: 0.35rem;
    background: var(--white);
}

.calendar-month { grid-template-rows: auto repeat(6, minmax(0, 1fr)); }
.calendar-month .calendar-cell { min-height: 0; overflow: hidden; }
.calendar-cell.outside-month { background: #f0ede6; }

.calendar-date {
    display: inline-grid;
    place-items: center;
    min-width: 1.65rem;
    min-height: 1.65rem;
    margin: 0 0 0.2rem;
    padding: 0.12rem;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 700;
}

button.calendar-date { background: var(--sky); border-color: var(--ink); }
button.calendar-date[aria-pressed=true] { background: var(--yellow); }

.calendar-week {
    --time-axis-width: 4rem;
    --week-columns: var(--time-axis-width) repeat(7, minmax(0, 1fr));
    grid-template-columns: var(--week-columns);
    grid-template-rows: 4.65rem minmax(0, 1fr);
    gap: 0;
}

.calendar-week.has-week-notices { grid-template-rows: 4.65rem auto minmax(0, 1fr); }

.calendar-week > .calendar-weekday { height: 4.65rem; }
.week-date[aria-current=date] { background: var(--yellow); }
.week-date .today-label { display: block; margin: 0; }

.week-all-day {
    min-width: 0;
    padding: 0.3rem;
    border-block-start: 1px solid #dcd4c9;
    border-inline-start: 1px solid #dcd4c9;
    background: var(--white);
}

.week-all-day-label { font-size: .73rem; font-weight: 700; }

.week-time-axis, .week-track {
    position: relative;
    min-height: 0;
    background-color: var(--white);
}

.week-time-axis { background-color: #f4efe5; }

.week-hour {
    position: absolute;
    inset-inline-end: 0.5rem;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.week-hour-last { transform: translateY(-100%); }

.week-track {
    border-inline-start: 1px solid #dcd4c9;
    background-image: linear-gradient(to bottom, #dcd4c9 0 1px, transparent 1px);
    background-size: 100% calc(100% / var(--week-hours));
}

.week-track-today { background-color: #fff6d7; }

.calendar-week .week-session {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    overflow: hidden;
    margin: 0;
    padding: 0.24rem 0.33rem;
    border-inline-start-width: 3px;
    border-inline-end: 2px solid var(--white);
    border-block-end: 2px solid var(--white);
    border-radius: 6px;
    font-size: .78rem;
    line-height: 1.25;
}

.week-session :is(span, strong, small) { max-width: 100%; }
.week-session span { font-size: .68rem; white-space: nowrap; }

.calendar-week .week-session-short {
    padding-block: 0.18rem;
    font-size: .7rem;
    line-height: 1.05;
}
.week-session-short span { font-size: .62rem; }
.week-session-short strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.week-session-short small, .week-session-tiny span { display: none; }

.calendar-chip {
    display: block;
    width: 100%;
    overflow: hidden;
    margin-bottom: 0.25rem;
    border: 0;
    text-align: left;
    border-inline-start: 3px solid var(--course-accent);
    border-radius: 4px;
    padding: 0.13rem 0.25rem;
    background: var(--course-color);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
    font-weight: 700;
}

.calendar-extra { color: var(--muted); font-size: 0.7rem; }

@media (max-width: 850px) {
    .home-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 410px) {
    .home-steps { grid-template-columns: 1fr; }
}

.planning-event:hover, .calendar-chip:hover { box-shadow: inset 0 0 0 1px var(--ink); }

.session-detail {
    width: min(30rem, calc(100% - 2rem));
    max-height: calc(100% - 2rem);
    padding: 0;
    overflow: auto;
    border: var(--border);
    border-radius: 14px;
    background: var(--white);
    color: var(--ink);
    box-shadow: 5px 5px 0 var(--ink);
}

.session-detail::backdrop { background: #20212288; }

.session-detail .panel-header {
    justify-content: space-between;
    background: var(--course-color, var(--purple));
    overflow-wrap: anywhere;
}

.session-detail .button { min-height: 36px; padding: 0.15rem 0.6rem; font-size: 1.2rem; }

.session-detail dl {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.55rem 1rem;
    margin: 0;
    padding: 1rem;
    overflow-wrap: anywhere;
}

.session-detail dt { font-weight: 700; }
.session-detail dd { margin: 0; }
.session-detail dd ul { margin: 0; padding-inline-start: 1.2rem; }

.choice-filter {
    display: grid;
    gap: 0.3rem;
    margin-bottom: 0.65rem;
}

.choice-filter input, .calendar-shortcuts select {
    min-height: 42px;
    max-width: 100%;
    padding: 0.38rem 0.6rem;
    border: var(--border);
    border-radius: 8px;
    background: var(--white);
    font: inherit;
}

.choice-filter input { width: min(100%, 24rem); }
.choice-filter p { font-size: .9rem; color: var(--muted); }
.choice-filter #course-count { margin: 0; }

.course-filter-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.8rem;
}

.course-filter-tools button[aria-pressed=true] {
    color: var(--ink);
    background: var(--green);
    border-radius: 5px;
    padding-inline: .4rem;
}

.group-filter {
    padding: 0.6rem 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #c9c2bb;
    border-radius: 8px;
    background: var(--sky);
}

.group-filter > p { color: var(--muted); font-size: .9rem; }
.formation-groups { margin-block: .45rem; }
.group-options { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .2rem; }

.group-options label {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .55rem;
    border: 1px solid #8c819a;
    border-radius: 7px;
    background: var(--white);
    font-weight: 600;
    cursor: pointer;
}

.group-options label:has(:checked) { border-color: var(--ink); background: var(--green); }
.group-options input { margin: 0; accent-color: #1d653b; }

.choice-groups {
    display: grid;
    gap: 0.4rem;
    max-height: min(48vh, 28rem);
    margin-top: 0.65rem;
    padding: 3px;
    overflow-y: auto;
}

#planning-courses > label {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid #ddd7cd;
    border-inline-start: 5px solid var(--course-accent);
    border-radius: 7px;
    background: #fff;
    font-size: .91rem;
    font-weight: 500;
    cursor: pointer;
}

#planning-courses input {
    accent-color: #1d653b;
    flex: none;
    width: 1rem;
    height: 1rem;
    margin: 0.19rem 0 0;
}

.course-group, .notice-options {
    padding: 0.55rem 0.65rem;
    border: 1px solid #c9c2bb;
    border-radius: 8px;
}

.course-group summary, .notice-options summary {
    font-weight: 700;
    cursor: pointer;
}

.course-group .choices { grid-template-columns: 1fr; max-height: none; }
.notice-options { margin-top: 0.75rem; background: var(--sky); }
.notice-options .choices { grid-template-columns: 1fr; max-height: 12rem; }
.notice-options label:has(:checked) { background: var(--course-color); border-color: var(--course-accent); }

.calendar-shortcuts {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 0.7rem;
    min-height: 4.25rem;
    margin-bottom: 0.75rem;
}

#calendar-today { grid-column: 2; grid-row: 1; }

.calendar-shortcuts label { display: block; font-size: .85rem; margin-bottom: 0.15rem; }
.calendar-shortcuts select { width: 100%; }
#week-picker, #month-picker { min-width: 0; }

.calendar-cell[aria-current=date] {
    background: #fff2be;
    box-shadow: inset 0 0 0 2px #7e5a0c;
}

.calendar-cell-header { display: flex; align-items: start; flex-wrap: wrap; gap: 0.25rem; }
.today-label {
    display: inline-block;
    margin-inline-start: 0.2rem;
    padding: 0.08rem 0.18rem;
    color: var(--ink);
    font-size: .68rem;
    font-weight: 700;
}
.planning-day h4[aria-current=date] { background: var(--yellow); }
.planning-day .today-label { margin-inline-start: 0.5rem; }

.calendar-extra {
    display: inline-block;
    padding: 0.15rem 0.2rem;
    border: 0;
    background: transparent;
    font-weight: 700;
    text-decoration: underline;
}

#day-sessions { padding: 0.6rem 1rem 1rem; }

.course-group-count {
    float: right;
    margin-inline-start: 0.4rem;
    color: var(--muted);
    font-size: .85rem;
}

.planning-week + .planning-week {
    margin-top: 1.55rem;
    padding-top: 0.9rem;
    border-top: var(--border);
}

.planning-week > h3 {
    margin-top: 0.8rem;
    font-size: 1rem;
}

.planning-day-range h4 {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    column-gap: 0.5rem;
}
.range-separator { font-weight: 500; }

.week-notice-band {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: var(--week-columns);
}

.week-notice-chip {
    z-index: 1;
    align-self: center;
    width: auto;
    min-width: 0;
    margin: 0.25rem;
}

.week-notice-dates {
    margin-inline-start: 0.5rem;
    font-size: .7rem;
    font-weight: 500;
}

.week-notice-band .week-all-day-label { z-index: 2; }

.week-date.calendar-holiday:not([aria-current]),
.calendar-cell.calendar-holiday:not([aria-current]) { background: #eee3f9; }

.week-track.calendar-holiday:not(.week-track-today) { background-color: #f9f3fc; }

.day-status-holiday {
    display: inline-block;
    padding: 0.06rem 0.35rem;
    border: 1px solid #67468a;
    border-radius: 20px;
    background: #fff;
    color: #472b63;
    font-size: .68rem;
    font-weight: 700;
    white-space: nowrap;
}

.week-date .day-status-holiday { display: table; margin: 0.18rem auto 0; }

.day-status-empty {
    display: block;
    margin-top: 0.15rem;
    color: var(--muted);
    font-size: .7rem;
    font-weight: 500;
}

.week-track .day-status-empty { padding: 0.25rem; text-align: center; }

.calendar-month .calendar-cell-header { row-gap: 0; }
.calendar-month .calendar-date { margin-bottom: 0.1rem; }

.calendar-month .today-label {
    flex-basis: 100%;
    margin: 0;
    padding-block: 0.05rem;
    line-height: 1.2;
}

.calendar-month .calendar-chip {
    margin-bottom: 0.15rem;
    padding-block: 0.09rem;
    line-height: 1.18;
}

.calendar-month .calendar-extra { padding-block: 0.1rem; line-height: 1.25; }

.stats-panel { max-width: 940px; margin: 0 auto 2rem; }
.stats-panel h1 { font-size: clamp(1.35rem, 3vw, 1.85rem); }

.support-actions { display: flex; align-items: flex-start; flex-wrap: wrap; gap: .65rem; }
.support-actions .button { white-space: normal; }
.support-panel #support-note { margin-top: .55rem; color: var(--muted); font-size: .9rem; }
.support-panel h2 { margin-top: 1.35rem; }
.support-panel .stats-totals { margin: .65rem 0 .45rem; }
.support-panel #github-status { margin-top: .6rem; color: var(--muted); }

.stats-totals {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    margin: 1.2rem 0 1.8rem;
}

.stats-total {
    position: relative;
    min-width: 0;
    padding: 1rem;
    border: var(--border);
    border-radius: 10px;
    background: var(--sky);
    box-shadow: 3px 3px 0 var(--ink);
}

.stats-total:nth-child(3n+2) { background: var(--green); }
.stats-total:nth-child(3n) { background: var(--yellow); }
.stats-total dd { margin: 0; font: 700 2.15rem/1.3 var(--heading); overflow-wrap: anywhere; }
.stats-total dt { display: flex; align-items: center; gap: .2rem; }

.stat-info { flex: none; }
.stat-info summary {
    display: grid;
    width: 1.75rem;
    height: 1.75rem;
    place-items: center;
    border-radius: 6px;
    list-style: none;
    cursor: pointer;
}
.stat-info summary::-webkit-details-marker { display: none; }
.stat-info-mark {
    position: relative;
    width: 20px;
    height: 20px;
    border: 1px solid var(--ink);
    border-radius: 6px;
    background: #f3eaff;
    box-shadow: 1px 1px 0 var(--ink);
    color: var(--ink);
}
.stat-info-mark::before, .stat-info-mark::after {
    content: '';
    position: absolute;
    left: calc(50% - 1px);
    width: 2px;
    border-radius: 1px;
    background: currentColor;
}
.stat-info-mark::before { top: 3px; height: 2px; }
.stat-info-mark::after { top: 7px; height: 7px; }
.stat-info summary:hover .stat-info-mark, .stat-info[open] .stat-info-mark { background: var(--purple); }
.stat-info[open] .stat-info-mark { box-shadow: none; }
.stat-info p {
    position: absolute;
    z-index: 2;
    inset: calc(100% + .35rem) .55rem auto;
    padding: .65rem .75rem;
    border: 1px solid var(--ink);
    border-radius: 9px;
    background: var(--white);
    box-shadow: 2px 2px 0 var(--ink);
    font-size: .86rem;
    line-height: 1.45;
}

.stats-table { overflow: auto; margin-top: 0.6rem; }
.stats-table table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.stats-table th, .stats-table td { padding: 0.55rem 0.6rem; border-bottom: 1px solid #bcb2a5; text-align: right; white-space: nowrap; }
.stats-table th:first-child { text-align: left; }
.stats-table thead { background: var(--sky); }

@media (max-width: 610px) {
    .stats-totals { grid-template-columns: minmax(0, 1fr); }
    .stats-total { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.25rem 0.6rem; }
    .stats-total dd { font-size: 1.75rem; }
    .stats-table table { table-layout: fixed; }
    .stats-table th, .stats-table td { padding: 0.4rem 0.2rem; font-size: clamp(0.65rem, 2vw, 0.8rem); white-space: normal; overflow-wrap: anywhere; }
    .stats-table th:first-child { width: 20%; }
}

.week-date-button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    text-underline-offset: 0.16em;
    text-decoration: underline;
}

@media (max-width: 610px) {
    .calendar-week { --time-axis-width: 2.45rem; }
    .calendar-weekday { padding-inline: 0.12rem; font-size: .66rem; }
    .week-hour { inset-inline-end: 0.25rem; font-size: .62rem; }
    .week-all-day-label { padding-inline: 0.15rem; font-size: .58rem; line-height: 1.2; }
    .calendar-month .calendar-cell { padding: 0.18rem; }
    .calendar-date { min-width: 1.35rem; min-height: 1.35rem; font-size: .7rem; }
    .calendar-cell-header { column-gap: 0.1rem; }
    .calendar-chip { padding-inline: 0.12rem; font-size: .64rem; }
    .calendar-month .calendar-extra { font-size: .61rem; overflow-wrap: anywhere; }
    .calendar-week .week-session { padding-inline: 0.12rem; font-size: .62rem; }
    .week-session small { display: none; }
    .week-session span { overflow: hidden; font-size: .59rem; text-overflow: ellipsis; }
    .day-status-holiday { max-width: 100%; padding-inline: 0.13rem; font-size: .56rem; }
    .day-status-empty, .today-label { font-size: .59rem; overflow-wrap: anywhere; }
}
