.py-hero-title { display: flex; align-items: center; gap: .85rem; margin-block: .8rem .35rem; }
.py-hero-title h1 { margin: 0; }
.py-hero-title img { width: clamp(42px, 5vw, 61px); height: auto; border-radius: .5rem; }
.py-layout { display: grid; grid-template-columns: minmax(210px, .34fr) minmax(0, 1fr); align-items: start; gap: clamp(16px, 2.8vw, 36px); }
.py-layout [hidden] { display: none !important; }
.py-sidebar { position: sticky; top: 100px; padding: 18px; }
.py-sidebar h2 { font-size: 1.3rem; margin: .2rem .3rem .6rem; }
#py-progress { color: var(--gray); font-size: .9rem; margin: 0 .3rem; }
#py-meter { width: calc(100% - .6rem); height: .48rem; margin: .6rem .3rem 1rem; border: 0; border-radius: 9px; overflow: hidden; background: var(--pale); color: var(--blue); accent-color: var(--blue); display: block; }
#py-meter::-webkit-progress-bar { background: var(--pale); }
#py-meter::-webkit-progress-value, #py-meter::-moz-progress-bar { background: var(--blue); }
.py-nav { display: grid; position: static; gap: 2px; margin: 0; padding: 0; box-shadow: none; background: transparent; }
.py-nav a { display: flex; align-items: baseline; justify-content: space-between; gap: .4rem; border-radius: 8px; padding: .55rem .65rem; line-height: 1.4; font-weight: 550; color: var(--gray); }
.py-nav a:hover { background: #f5f7fc; color: var(--ink); }
.py-nav [aria-current] { color: #233fb1; font-weight: 750; background: var(--pale); }
.py-nav [data-complete=true]::after { content: '✓'; color: #196643; font-weight: 800; }
.py-compact { display: none; }
.py-work h2 { margin: 0 0 .5rem; font-size: clamp(1.7rem, 3vw, 2.5rem); scroll-margin-top: 6rem; }
#py-concept { margin: .3rem 0 1rem; }
.py-work details { margin: 0; }
#py-task { background: #f3f5ff; border: 1px solid #dfe5ff; border-left: 4px solid #536fd8; border-radius: 12px; padding: .75rem 1rem; }
#py-task summary { cursor: pointer; font-weight: 700; }
#py-task p { margin: .4rem 0; }
#py-hint { margin-top: .65rem; color: var(--gray); }
#py-hint summary { color: #233fb1; font-size: .92rem; }
.py-work code, #py-code, #py-output, .py-editor-heading span { font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Consolas, monospace; }
.py-work code { font-size: .89em; padding: .08em .23em; border-radius: 3px; background: #e9edf7; color: var(--ink); overflow-wrap: anywhere; }
.py-work math { font-size: 1.11em; }
#py-snippet { display: inline-block; margin-bottom: .3rem; white-space: pre-wrap; }
.py-editor-heading { display: flex; align-items: center; justify-content: space-between; margin-top: 1.3rem; background: #1b2949; border-radius: 12px 12px 0 0; padding: .55rem .9rem; }
.py-editor-heading label { color: #fff; font-weight: 700; margin: 0; }
.py-editor-heading span { color: #b7c9f5; font-size: .82rem; }
#py-code { display: block; width: 100%; min-height: 205px; max-height: 75vh; resize: vertical; font-size: clamp(.86rem, 1.6vw, 1rem); line-height: 1.6; tab-size: 4; color: #eff3ff; background: #111c34; border: 2px solid #1b2949; border-radius: 0 0 12px 12px; padding: .85rem .9rem; }
.py-primary, .py-secondary, .py-result { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.py-primary { margin-top: .8rem; }
.py-primary .btn, .py-primary button, .py-secondary button { min-height: 42px; font-size: .92rem; font-weight: 700; line-height: 1.25; border-radius: 9px; padding: .58rem .85rem; letter-spacing: normal; }
.py-primary :disabled, .py-secondary :disabled { opacity: .58; cursor: default; }
.py-check, .py-stop, .py-secondary button { border: 1px solid #b9c9f1; background: #fff; color: #253f99; }
.py-stop { color: #8c323a; border-color: #e1b4bd; }
.py-secondary button:hover, .py-check:hover { background: var(--pale); }
#py-shortcut, #py-local-status { color: var(--gray); font-size: .84rem; margin: .45rem 0; }
.py-result { justify-content: space-between; margin: 1.1rem 0 .35rem; }
.py-result h3 { font-size: 1.2rem; margin: 0; }
#py-state { color: var(--gray); font-size: .84rem; }
#py-output { width: 100%; min-height: 66px; max-height: 330px; overflow: auto; margin: 0; color: var(--ink); background: #f5f7fb; border: 1px solid var(--line); padding: .7rem .85rem; font-size: .91rem; line-height: 1.55; border-radius: 9px; white-space: pre-wrap; overflow-wrap: anywhere; }
#py-verdict { background: #fff7e8; color: #603e0f; margin: .65rem 0; padding: .65rem .8rem; border-radius: 9px; }
#py-verdict[data-passed=true] { color: #20583c; background: #e9f6ec; }
.py-secondary { margin-top: .8rem; gap: .45rem; }
.py-secondary button { min-height: 36px; border-color: var(--line); font-size: .83rem; }
.py-next { display: inline-block; margin-top: .85rem; font-weight: 700; color: #2443af; }
.py-further { padding-top: 2rem; }
.py-further h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); margin: 0 0 .5rem; }
.py-further a { color: #2443af; }
.py-layout :focus-visible { outline: 3px solid #4970ef; outline-offset: 3px; }
@media (max-width: 760px) {
  .py-layout { grid-template-columns: 1fr; }
  .py-sidebar { position: static; }
  .py-nav { display: none; }
  .py-compact { display: grid; gap: .3rem; color: var(--ink); font-size: .93rem; font-weight: 650; }
  .py-compact select { width: 100%; min-height: 44px; margin: 0; }
  .py-work h2 { scroll-margin-top: 5rem; }
}
