/* Home and documentation share the palette in theme.css. */
.cover, .module-section, .guide-shell { max-width: 1140px; margin-inline: auto; }
.cover { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr); align-items: center; gap: clamp(30px, 5vw, 84px); padding: clamp(62px, 9vw, 130px) 0; }
.edition { color: var(--muted); font: 600 12px/1.5 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .06em; }
.edition span { margin-left: .5rem; padding: 2px 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--accent); }
.cover h1 { margin: 20px 0 16px; font-size: clamp(64px, 7.7vw, 115px); line-height: .96; letter-spacing: -.085em; font-weight: 750; }
.cover h1 em { font-family: "Instrument Serif", "Iowan Old Style", Georgia, serif; font-weight: 500; letter-spacing: -.09em; color: var(--accent); }
.cover-copy > p { font-size: clamp(16px, 1.4vw, 20px); line-height: 1.62; max-width: 48ch; }
.cover-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; margin-top: 28px; }
.cover-actions .button { border-radius: 999px; }
.cover-link, .module-heading a { font-weight: 600; font-size: 14px; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.event-demo { position: relative; padding: 0 22px 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 7px 8px 0 var(--raised); min-width: 0; }
.demo-head { padding: 13px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; font-weight: 600; }
.demo-icon { color: var(--accent); font-size: 21px; font-weight: 450; }
.demo-head small { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 500; }
.demo-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin: 16px 0; }
.demo-tabs button { border: 1px solid transparent; padding: 4px 11px; font-size: 13px; border-radius: 30px; background: transparent; color: var(--muted); }
.demo-tabs button[aria-selected="true"] { color: var(--text); background: var(--raised); border-color: var(--line); }
.demo-author { display: flex; align-items: center; gap: 7px; font-size: 14px; }
.demo-author .mark { width: 31px; height: 31px; font-size: 20px; border-radius: 50%; margin-right: 2px; }
.demo-author .mark span { font-size: 9px; }
.demo-author small { color: white; background: #5160b8; font: 700 9px/16px system-ui; padding: 0 4px; border-radius: 3px; }
.demo-panel { margin: 8px 0 0 40px; padding: 14px; border-radius: 5px 9px 9px 5px; background: var(--raised); border-left: 3px solid #9381ff; }
.demo-1 { border-color: #d76ca2; }
.demo-2 { border-color: #57a892; }
.demo-body { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; }
.demo-mention { color: var(--accent); font-size: 12px; overflow-wrap: anywhere; }
.demo-body h2 { font-size: 17px; line-height: 1.2; margin: 5px 0; }
.demo-body p { font-size: 13px; }
.demo-medal { width: 63px; height: 65px; flex-shrink: 0; display: grid; place-content: center; text-align: center; border: 1px solid #b6a9ef80; background: repeating-linear-gradient(145deg, transparent 0px 5px, #9080d31c 5px 6px), #2d283f; color: #d4cbf6; border-radius: 12px; }
.demo-medal b { font: italic 30px/1 Georgia, serif; }
.demo-medal span { font: 600 9px/1.5 system-ui; text-transform: uppercase; letter-spacing: .12em; }
.demo-reward { font-size: 12px; margin-top: 13px; border-top: 1px solid var(--line); padding-top: 8px; }
.demo-reward i, .guide-ranks i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; background: #e34c4c; box-shadow: 0 0 0 1px #8888; }
.demo-1 .demo-reward i { background: #d76ca2; }
.demo-2 .demo-reward i { background: #57a892; }
.module-section { border-top: 1px solid var(--line); padding-top: 28px; }
.module-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.module-heading h2, .guide-section h2 { font-size: clamp(22px, 2.4vw, 34px); letter-spacing: -.055em; line-height: 1.18; }
.module-index { display: grid; grid-template-columns: 1fr 1fr; gap: 0 42px; }
.module-index a { position: relative; padding: 20px 32px 20px 0; border-bottom: 1px solid var(--line); }
.module-index h3 { font-size: 18px; letter-spacing: -.035em; }
.module-index p { font-size: 14px; margin-top: 3px; }
.module-index b { position: absolute; right: 2px; top: 21px; color: var(--accent); }
.guide-shell { display: grid; grid-template-columns: 190px minmax(0, 720px); gap: clamp(30px, 6vw, 100px); padding: 56px 0 8px; justify-content: center; }
.guide-index { align-self: start; position: sticky; top: 24px; border-left: 1px solid var(--line); padding-left: 15px; }
.guide-index strong, .guide-index a { display: block; padding: 4px 0; font-size: 14px; }
.guide-index a { color: var(--muted); }
.guide-index a:hover, .guide-index a[aria-current="location"] { color: var(--accent); }
.guide-title h1 { margin: 9px 0 16px; }
.guide-article p, .guide-article li, .guide-article dd { font-size: 16px; line-height: 1.7; }
.guide-section { border-top: 1px solid var(--line); padding: 26px 0 8px; margin-top: 28px; scroll-margin-top: 15px; }
.guide-section h2 { margin-bottom: 16px; }
.guide-section p, .guide-section ol, .guide-section dl { margin: 10px 0; }
.guide-section ol { padding-left: 24px; }
.guide-section li { margin: 8px 0; }
.guide-section li::marker { color: var(--accent); font-weight: 700; }
.guide-section dt { font-weight: 700; }
.guide-section dd { color: var(--muted); margin: 0 0 12px; }
.guide-section strong, .guide-section b { color: var(--text); }
.guide-section :not(.guide-code) > code { font-size: .88em; color: var(--text); }
.guide-ranks { padding: 0; display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.guide-ranks li { padding: 3px 8px; background: var(--raised); border-radius: 6px; margin: 0; font-size: 14px; }
.guide-ranks small { color: var(--muted); }
.guide-ranks .rank-10 { background: #f5c940; }
.guide-ranks .rank-20 { background: #3ba765; }
.guide-ranks .rank-50 { background: #010101; }
.guide-ranks .rank-100 { background: #9359da; }
.guide-code { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 15px; margin: 10px 0; display: flex; align-items: flex-start; gap: 12px; }
.guide-code code { font: 13px/1.65 ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; flex: 1; min-width: 0; }
.guide-code button { flex: none; }
.module-summary { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 0 18px; }
.module-summary a { border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; font-size: 12px; }
.module-summary strong { margin-left: 4px; color: var(--muted); }
@media (max-width: 780px) {
    .cover { grid-template-columns: 1fr; padding: 42px 0; gap: 28px; }
    .cover-copy > p { max-width: 55ch; }
    .event-demo { max-width: 540px; width: calc(100% - 7px); }
    .guide-shell { grid-template-columns: 1fr; gap: 24px; padding-top: 24px; }
    .guide-index { position: static; display: flex; flex-wrap: wrap; gap: 4px 12px; }
    .guide-index strong { width: 100%; }
    .guide-index a { font-size: 13px; }
}
@media (max-width: 580px) {
    .module-index { grid-template-columns: 1fr; }
    .module-heading { flex-wrap: wrap; }
    .event-demo { padding: 0 12px 15px; }
    .demo-panel { margin-left: 8px; }
    .demo-medal { width: 50px; height: 53px; }
    .top { flex-wrap: wrap; gap: 8px; }
    .top nav { gap: 12px; flex-wrap: wrap; }
    .guide-code { flex-wrap: wrap; }
}
