/* Кабинет учителя: компактное сворачиваемое меню, шапка в одну строку, единая сетка отступов (8px). */
:root{interpolate-size:allow-keywords}
.rails-teacher-shell{--teacher-gutter:32px;grid-template-columns:260px minmax(0,1fr);transition:grid-template-columns .2s ease}
.rails-teacher-shell.is-collapsed{grid-template-columns:72px minmax(0,1fr)}
.rails-teacher-shell .visually-hidden,.rails-teacher-shell.is-collapsed .desktop-sidebar .sidebar-label{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* Сайдбар: шапка закреплена, прокручивается только список разделов. */
.rails-teacher-shell .desktop-sidebar{overflow:hidden;border-right:1px solid #262a2f}
.rails-teacher-shell .teacher-sidebar [data-slot=sidebar-inner]{height:100%;min-height:0;padding:0;display:flex;flex-direction:column}
.rails-teacher-shell .teacher-sidebar [data-slot=sidebar-header]{flex:none;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:8px;height:72px;padding:0 12px 0 20px}
.rails-teacher-shell .teacher-sidebar .sidebar-brand{display:flex;align-items:center;min-width:0}
.rails-teacher-shell .teacher-sidebar .brand-wordmark{width:128px;height:34px}
.rails-teacher-shell .sidebar-toggle{flex:none;display:grid;place-items:center;width:32px;height:32px;padding:0;border:0;border-radius:8px;background:transparent;color:#aab1bb;cursor:pointer}
.rails-teacher-shell .sidebar-toggle:hover{background:#3d4249;color:#fff}
.rails-teacher-shell .sidebar-toggle:focus-visible{outline:2px solid #c0cdf2;outline-offset:2px}
.rails-teacher-shell .sidebar-toggle svg{transition:transform .2s ease}
.rails-teacher-shell .mobile-sidebar .sidebar-toggle{display:none}
.rails-teacher-shell .teacher-sidebar [data-slot=sidebar-content]{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:4px 10px 24px;gap:0;scrollbar-width:thin;scrollbar-color:transparent transparent;overscroll-behavior:contain}
.rails-teacher-shell .teacher-sidebar [data-slot=sidebar-content]:hover,.rails-teacher-shell .teacher-sidebar [data-slot=sidebar-content]:focus-within{scrollbar-color:rgba(255,255,255,.18) transparent}
.rails-teacher-shell .teacher-sidebar [data-slot=sidebar-content]::-webkit-scrollbar{width:6px}
.rails-teacher-shell .teacher-sidebar [data-slot=sidebar-content]::-webkit-scrollbar-track{background:transparent}
.rails-teacher-shell .teacher-sidebar [data-slot=sidebar-content]::-webkit-scrollbar-thumb{background:transparent;border-radius:3px}
.rails-teacher-shell .teacher-sidebar [data-slot=sidebar-content]:hover::-webkit-scrollbar-thumb{background:rgba(255,255,255,.18)}

/* Пункты меню: 40px, иконка 18px, все левые края на 20px от края сайдбара. */
.rails-teacher-shell .teacher-sidebar [data-slot=sidebar-menu],.rails-teacher-shell .teacher-sidebar .teacher-platform-nav [data-slot=sidebar-menu]{gap:2px}
.rails-teacher-shell .teacher-sidebar [data-slot=sidebar-menu-button]{position:relative;height:40px;min-height:40px;padding:0 10px;gap:12px;border-radius:10px;font-size:15px;font-weight:500;line-height:1.2;white-space:nowrap;box-shadow:none}
.rails-teacher-shell .teacher-sidebar [data-slot=sidebar-menu-button]>svg{width:18px;height:18px;flex:none;opacity:.85}
.rails-teacher-shell .teacher-sidebar [data-slot=sidebar-menu-button]>span{min-width:0;overflow:hidden;text-overflow:ellipsis}
.rails-teacher-shell .teacher-sidebar [data-slot=sidebar-menu-button][data-active=true]{background:#4a515b;color:#fff;font-weight:600;box-shadow:none}
.rails-teacher-shell .teacher-sidebar [data-slot=sidebar-menu-button][data-active=true]>svg{opacity:1}
.rails-teacher-shell .teacher-sidebar .nav-count{margin-left:auto;min-width:22px;height:20px;padding:0 6px;border-radius:6px;display:grid;place-items:center;font-size:12px;font-weight:600;line-height:1}

/* Олимпиады: категория ближе к своему блоку, заголовок олимпиады — аккордеон. */
.rails-teacher-shell .teacher-sidebar .teacher-olympiads-nav{margin-top:16px;padding-top:20px;border-top:1px solid #444a52}
.rails-teacher-shell .teacher-sidebar .teacher-nav-category{margin:0 10px 8px;font-size:11px;line-height:16px;letter-spacing:.1em}
.rails-teacher-shell .teacher-olympiad>summary{list-style:none}
.rails-teacher-shell .teacher-olympiad>summary::-webkit-details-marker{display:none}
.rails-teacher-shell .teacher-sidebar .teacher-olympiad-heading{display:flex;align-items:center;gap:12px;margin:0;min-height:52px;padding:6px 10px;border-radius:10px;cursor:pointer;color:#f0f2f5}
.rails-teacher-shell .teacher-sidebar .teacher-olympiad-heading:hover{background:#3d4249}
.rails-teacher-shell .teacher-sidebar .teacher-olympiad-heading:focus-visible{outline:2px solid #c0cdf2;outline-offset:2px}
.rails-teacher-shell .teacher-sidebar .teacher-olympiad-heading .icon-box{width:32px;height:32px;flex:none;border-radius:9px;display:grid;place-items:center;margin:0}
.rails-teacher-shell .teacher-olympiad-copy{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.rails-teacher-shell .teacher-olympiad-copy strong{font-size:14px;font-weight:650;line-height:1.3;color:#f0f2f5}
.rails-teacher-shell .teacher-olympiad-copy small{font-size:12px;line-height:1.3;color:#b3bac4}
.rails-teacher-shell .teacher-olympiad-chevron{flex:none;color:#aab1bb;transition:transform .2s ease}
.rails-teacher-shell .teacher-olympiad[open] .teacher-olympiad-chevron{transform:rotate(180deg)}
.rails-teacher-shell .teacher-olympiad::details-content{block-size:0;overflow:hidden;transition:block-size .2s ease,content-visibility .2s allow-discrete}
.rails-teacher-shell .teacher-olympiad[open]::details-content{block-size:auto}
.rails-teacher-shell .teacher-sidebar .teacher-olympiad-links{margin:4px 0 0 18px;width:calc(100% - 18px);padding-left:8px;border-left:1px solid #4b5159;gap:2px}
.rails-teacher-shell .teacher-sidebar .teacher-olympiad-links [data-slot=sidebar-menu-button]{height:36px;min-height:36px;padding:0 10px;font-size:14px;gap:10px}
.rails-teacher-shell .teacher-sidebar .teacher-olympiad-links [data-slot=sidebar-menu-button]>svg{width:16px;height:16px}

/* Узкое меню: только иконки по центру колонки 72px. */
.rails-teacher-shell.is-collapsed .desktop-sidebar [data-slot=sidebar-header]{justify-content:center;padding:0}
.rails-teacher-shell.is-collapsed .desktop-sidebar .sidebar-brand{display:none}
.rails-teacher-shell.is-collapsed .desktop-sidebar .sidebar-toggle svg{transform:rotate(180deg)}
.rails-teacher-shell.is-collapsed .desktop-sidebar [data-slot=sidebar-content]{padding:4px 12px 24px}
.rails-teacher-shell.is-collapsed .desktop-sidebar [data-slot=sidebar-menu-button]{width:48px;padding:0;justify-content:center}
.rails-teacher-shell.is-collapsed .desktop-sidebar .nav-count{position:absolute;top:3px;right:3px;min-width:16px;height:16px;padding:0 4px;border-radius:8px;font-size:10px;background:#7d8fd6;color:#fff}
.rails-teacher-shell.is-collapsed .desktop-sidebar .teacher-nav-category{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.rails-teacher-shell.is-collapsed .desktop-sidebar .teacher-olympiads-nav{margin-top:12px;padding-top:12px}
.rails-teacher-shell.is-collapsed .desktop-sidebar .teacher-olympiad-heading{width:48px;min-height:40px;padding:4px 0;justify-content:center}
.rails-teacher-shell.is-collapsed .desktop-sidebar .teacher-olympiad-heading .icon-box{margin:0}
.rails-teacher-shell.is-collapsed .desktop-sidebar .teacher-olympiad-chevron,.rails-teacher-shell.is-collapsed .desktop-sidebar .teacher-olympiad-links{display:none}
.rails-teacher-shell.is-collapsed .desktop-sidebar .teacher-olympiad::details-content{block-size:0}

/* Шапка: одна строка 64px, школа с многоточием, левый край совпадает с контентом. */
.rails-teacher-shell .dashboard-header{height:64px;min-height:64px;flex-wrap:nowrap;gap:24px;padding:0 var(--teacher-gutter)}
.rails-teacher-shell .teacher-header-title{flex:1 1 auto;min-width:0;gap:8px}
.rails-teacher-shell .teacher-header-school{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:500;color:#67738a}
.rails-teacher-shell .teacher-account{flex:none;margin-left:auto;gap:8px;width:auto;max-width:60%}
.rails-teacher-shell .teacher-account-name{display:inline-flex;align-items:center;gap:8px;min-width:0;max-width:280px;padding:4px 8px 4px 4px;border-radius:20px;color:#384765;font-size:14px;font-weight:600}
.rails-teacher-shell .teacher-account-name:hover,.rails-teacher-shell .teacher-account-name[aria-current=page]{background:#eef2f8}
.rails-teacher-shell .teacher-account-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rails-teacher-shell .teacher-avatar{flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#e4e9fb;color:#3f5bb5;font-size:13px;font-weight:700;letter-spacing:.02em}
.rails-teacher-shell .teacher-avatar.is-large{width:56px;height:56px;font-size:20px}

/* Контент: заголовок и кнопка в одной строке, подзаголовок рядом с H1. */
.rails-teacher-shell .dashboard-content{padding:32px var(--teacher-gutter) 48px}
.rails-teacher-shell .dashboard-content>.cabinet-notice,.rails-teacher-shell .dashboard-content>.cabinet-error{margin:0 0 24px}
.rails-teacher-shell .dashboard-title{display:flex;align-items:flex-start;gap:16px}
.rails-teacher-shell .dashboard-title-copy{flex:1;min-width:0}
.rails-teacher-shell .dashboard-title-row{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.rails-teacher-shell .dashboard-title h1{font-size:32px;line-height:1.2}
.rails-teacher-shell .dashboard-title-row>.btn{flex:none;min-height:44px;padding:10px 18px;margin:0}
.rails-teacher-shell .dashboard-title p:not(.teacher-section-context){margin-top:8px;font-size:15px}
.rails-teacher-shell .teacher-section-context{margin-bottom:8px}
.rails-teacher-shell .dashboard-stats,.rails-teacher-shell .class-strip{margin-top:24px}
.rails-teacher-shell .empty-state{margin-top:24px;padding:40px 24px;border-radius:16px}
.rails-teacher-shell .empty-state h2{font-size:22px;margin:0 0 8px}
.rails-teacher-shell .empty-state p{margin:0 0 20px;line-height:1.6}
.rails-teacher-shell .class-invite{margin-top:24px}
.rails-teacher-shell .dashboard-footer{display:none}

/* Поиск по классу: поле, фильтр и кнопка одной высоты в стиле полей ЛК. */
.rails-teacher-shell .table-search{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:0 22px 20px}
.rails-teacher-shell .table-search>label{flex:1 1 280px;min-width:0;display:flex;font-size:0}
.rails-teacher-shell .table-search input[type=search]{flex:1;min-width:0;width:100%;height:40px;padding:0 14px;border:1px solid #e0e5ef;border-radius:10px;background:#fbfcff;color:#27304d;font-size:14px}
.rails-teacher-shell .table-search select{flex:none;width:auto;max-width:220px;height:40px;padding:0 36px 0 14px;border:1px solid #e0e5ef;border-radius:10px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d879a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center/16px;-webkit-appearance:none;appearance:none;color:#384765;font-size:14px;cursor:pointer}
.rails-teacher-shell .table-search select:focus{outline:none;border-color:#6985e2;box-shadow:0 0 0 3px #dce5ff}
.rails-teacher-shell .table-search .btn{flex:none;width:auto;height:40px;min-height:40px;padding:0 18px;font-size:14px}

/* Фото учителя вместо инициалов. */
.rails-teacher-shell .teacher-avatar{overflow:hidden}
.rails-teacher-shell .teacher-avatar.is-large{width:72px;height:72px;font-size:24px}
.rails-teacher-shell .teacher-avatar.has-photo{background:#e4e9fb}
.rails-teacher-shell .teacher-avatar img{display:block;width:100%;height:100%;object-fit:cover;border-radius:50%}
.teacher-avatar-editor{display:flex;align-items:center;gap:16px;margin:16px 0 24px}
.teacher-avatar-preview{flex:none;display:block}
.teacher-avatar-body{min-width:0;display:flex;flex-direction:column;gap:8px}
.teacher-avatar-hint{font-size:13px;line-height:1.5;color:#72839d}
.teacher-avatar-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.teacher-avatar-form{display:flex;flex-wrap:wrap;gap:8px;margin:0}
.teacher-avatar-actions form.button_to{margin:0}
.teacher-avatar-actions .btn{min-height:40px;height:40px;padding:0 16px;font-size:14px;cursor:pointer}
.teacher-avatar-pick:focus-within{outline:3px solid #849ff0;outline-offset:2px}
.teacher-avatar-error{margin:0}

/* Страница профиля. */
.teacher-profile{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:24px;margin-top:24px;align-items:start}
.teacher-profile-card{background:#fff;border:1px solid #e5eaf3;border-radius:16px;padding:24px}
.teacher-profile-card h2{font-size:18px;letter-spacing:-.02em}
.teacher-profile-person{display:flex;align-items:center;gap:16px;margin-bottom:24px}
.teacher-profile-person p{margin-top:4px;color:#72839d;font-size:14px}
.teacher-profile-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.teacher-profile-fields .field{margin:0}
.teacher-profile-actions{display:flex;justify-content:flex-end;margin-top:24px}
.teacher-profile-actions .btn{min-height:44px;padding:10px 24px}
.teacher-profile-form .form-errors{margin-bottom:16px}
.teacher-profile-facts{margin:16px 0 0;display:flex;flex-direction:column}
.teacher-profile-facts>div{display:grid;grid-template-columns:96px minmax(0,1fr);gap:16px;padding:12px 0;border-top:1px solid #eef1f6}
.teacher-profile-facts>div:first-child{border-top:0;padding-top:0}
.teacher-profile-facts dt{color:#72839d;font-size:14px}
.teacher-profile-facts dd{margin:0;font-size:14px;color:#384765;overflow-wrap:anywhere}
.teacher-profile-facts dd a{color:#4e66c4;font-weight:600}
.teacher-school-switch{display:flex;flex-direction:column;gap:8px}
.teacher-school-switch .field{margin:0}
.teacher-school-switch .btn{align-self:flex-start;min-height:40px;padding:8px 16px}

@media(prefers-reduced-motion:reduce){.rails-teacher-shell,.rails-teacher-shell .sidebar-toggle svg,.rails-teacher-shell .teacher-olympiad-chevron,.rails-teacher-shell .teacher-olympiad::details-content{transition:none}}
@media(max-width:1200px){.teacher-profile{grid-template-columns:1fr}}
@media(max-width:1000px){
  .rails-teacher-shell,.rails-teacher-shell.is-collapsed{--teacher-gutter:24px;grid-template-columns:minmax(0,1fr)}
  .rails-teacher-shell .mobile-sidebar [data-slot=sidebar-inner]{height:100%}
  .rails-teacher-shell .mobile-sidebar [data-slot=sidebar-header]{padding-right:56px}
  .rails-teacher-shell .sidebar-open{flex:none;width:40px;height:40px;margin-left:-8px;border-radius:10px;display:grid;place-items:center;color:#4c5874}
}
@media(max-width:700px){
  .teacher-profile-fields{grid-template-columns:1fr}
}
@media(max-width:600px){
  .rails-teacher-shell,.rails-teacher-shell.is-collapsed{--teacher-gutter:16px}
  .rails-teacher-shell .dashboard-header{height:56px;min-height:56px;gap:8px;padding:0 var(--teacher-gutter)}
  .rails-teacher-shell .teacher-header-title{flex-basis:auto}
  .rails-teacher-shell .teacher-header-school{font-size:13px}
  .rails-teacher-shell .teacher-account{width:auto;max-width:none;gap:4px}
  .rails-teacher-shell .teacher-account-name{flex:none;max-width:none;padding:0}
  .rails-teacher-shell .teacher-account-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .rails-teacher-shell .teacher-class-trigger{max-width:96px;font-size:13px}
  .rails-teacher-shell .parent-family-divider{display:none}
  .rails-teacher-shell .dashboard-content{padding:24px var(--teacher-gutter) 40px}
  .rails-teacher-shell .dashboard-title{display:flex}
  .rails-teacher-shell .dashboard-title h1{font-size:26px}
  .rails-teacher-shell .dashboard-title-row>.btn{min-height:40px;padding:8px 14px;font-size:14px}
  .rails-teacher-shell .empty-state{padding:32px 16px}
  .rails-teacher-shell .table-search{padding:0 16px 16px}
  .rails-teacher-shell .table-search>label{flex-basis:100%}
  .rails-teacher-shell .table-search select{flex:1;max-width:none}
  .teacher-profile-card{padding:20px 16px}
  .teacher-profile-facts>div{grid-template-columns:1fr;gap:4px}
  .teacher-profile-actions .btn{width:100%}
  .teacher-avatar-editor{align-items:flex-start}
}

/* Раскрывающийся пункт «Программа» в основном меню (как олимпиада, но в виде обычного пункта). */
.rails-teacher-shell .teacher-nav-group>summary{list-style:none;cursor:pointer}
.rails-teacher-shell .teacher-nav-group>summary::-webkit-details-marker{display:none}
.rails-teacher-shell .teacher-sidebar .teacher-nav-group>summary[data-slot=sidebar-menu-button][data-active=true]{background:transparent;font-weight:500}
.rails-teacher-shell .teacher-sidebar .teacher-nav-group>summary[data-slot=sidebar-menu-button]:hover{background:#3d4249}
.rails-teacher-shell .teacher-nav-group-chevron{flex:none;margin-left:auto;color:#aab1bb;transition:transform .2s ease}
.rails-teacher-shell .teacher-nav-group[open] .teacher-nav-group-chevron{transform:rotate(180deg)}
.rails-teacher-shell .teacher-sidebar .teacher-nav-group-links{margin-top:2px;display:flex;flex-direction:column}
.rails-teacher-shell.is-collapsed .desktop-sidebar .teacher-nav-group-chevron,.rails-teacher-shell.is-collapsed .desktop-sidebar .teacher-nav-group-links{display:none}
.rails-teacher-shell.is-collapsed .desktop-sidebar .teacher-nav-group>summary[data-slot=sidebar-menu-button][data-active=true]{background:#4a515b}



/* Соревнования: статус → рейтинг → награды → правила. */
.comp-class-switch{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.comp-chip{padding:6px 14px;border-radius:999px;border:1px solid #dfe5ef;background:#fff;color:#4c5874;font-size:14px;font-weight:600}
.comp-chip:hover{border-color:#b9c6e6}
.comp-chip[aria-current=page]{background:#384765;border-color:#384765;color:#fff}
.comp-status{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-top:24px;padding:20px 24px;background:#fff;border:1px solid #e5eaf3;border-radius:16px}
.comp-status-main{display:flex;align-items:center;gap:16px;min-width:0;flex:1}
.comp-status-main>div{min-width:0;flex:1}
.comp-status .icon-box,.comp-league{flex:none;width:48px;height:48px;border-radius:14px;display:grid;place-items:center}
.comp-status h2{font-size:18px;font-weight:700;line-height:1.3;color:#252c49}
.comp-status p{font-size:14px;line-height:1.5;color:#5d6880;margin-top:2px}
.comp-progress{height:6px;border-radius:3px;background:#eef1f6;margin-top:10px;max-width:360px;overflow:hidden}
.comp-progress span{display:block;height:100%;border-radius:3px;background:#f1c33f}
.comp-zone{font-weight:600}
.comp-zone.zone-win{color:#a06b00}.comp-zone.zone-good{color:#3f5bb5}
.comp-zone a{color:#4e66c4;text-decoration:underline;text-underline-offset:3px}
.comp-stats{display:flex;gap:8px;margin:0;flex:none}
.comp-stats>div{min-width:112px;padding:10px 14px;border-radius:12px;background:#f5f7fb}
.comp-stats dt{font-size:12px;line-height:1.3;color:#72839d}
.comp-stats dd{margin:4px 0 0;font-size:20px;font-weight:700;line-height:1.2;color:#252c49;font-variant-numeric:tabular-nums}
.league-bronze{background:#f8ebe0;color:#9a5b2b}.league-silver{background:#eef1f5;color:#56637a}.league-gold{background:#fff4cf;color:#9a7412}
.comp-board,.comp-awards{margin-top:24px;padding:24px;background:#fff;border:1px solid #e5eaf3;border-radius:16px}
.comp-board-head{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:16px}
.comp-board h2,.comp-awards h2{font-size:20px;font-weight:700;letter-spacing:-.02em;color:#252c49}
.comp-tabs{display:inline-flex;padding:4px;border-radius:12px;background:#f0f3f8;gap:4px}
.comp-tab{padding:6px 18px;border-radius:9px;font-size:14px;font-weight:600;color:#5d6880}
.comp-tab[aria-selected=true]{background:#fff;color:#252c49;box-shadow:0 1px 3px rgba(37,44,73,.12)}
.comp-tab:focus-visible{outline:2px solid #849ff0;outline-offset:2px}
.comp-legend{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:4px 16px;font-size:13px;color:#5d6880}
.comp-legend li{display:flex;align-items:center;gap:6px}
.comp-legend li::before{content:"";width:10px;height:10px;border-radius:3px}
.comp-legend .zone-win::before{background:#f1c33f}.comp-legend .zone-good::before{background:#9db0ef}
.comp-score{display:inline-flex;align-items:center;gap:4px;font-size:15px;font-weight:700;color:#384765;font-variant-numeric:tabular-nums;white-space:nowrap}
.comp-score svg{color:#e2ad1f}
.comp-tag{display:inline-block;padding:2px 8px;border-radius:6px;font-size:12px;font-weight:600;white-space:nowrap}
.tag-gramota{background:#ffe9e4;color:#b4473c}.tag-diploma{background:#fff1c7;color:#8a6406}
.comp-tag.zone-win{background:#fff1c7;color:#8a6406}.comp-tag.zone-good{background:#e7edff;color:#3f5bb5}
.comp-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.comp-row{display:flex;align-items:center;gap:12px;min-height:48px;padding:6px 12px;border-bottom:1px solid #f0f2f7}
.comp-row:last-child{border-bottom:0}
.comp-row.is-mine{background:#eef2ff;border-radius:10px;border-bottom-color:transparent}
.comp-place{flex:none;width:28px;font-size:14px;font-weight:700;color:#72839d;font-variant-numeric:tabular-nums}
.comp-who{flex:1;min-width:0;display:flex;align-items:baseline;gap:8px}
.comp-who strong{font-size:14px;font-weight:600;color:#252c49;white-space:nowrap}
.comp-who small{font-size:13px;color:#72839d;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.comp-row .comp-score{font-size:14px}
.is-cup .comp-row:nth-child(-n+3) .comp-place{color:#a06b00}
.is-cup .comp-row:nth-child(3){border-bottom:2px solid #f6e3a6}
.is-cup>.comp-row:nth-child(20){border-bottom:0}
.comp-list.is-pinned{margin-top:8px;box-shadow:none}
.comp-more{margin-top:8px}
.comp-more>summary,.comp-rules>summary{list-style:none;display:flex;align-items:center;gap:6px;cursor:pointer;font-size:14px;font-weight:600;color:#4e66c4;padding:8px 0}
.comp-more>summary::-webkit-details-marker,.comp-rules>summary::-webkit-details-marker{display:none}
.comp-more[open]>summary svg,.comp-rules[open]>summary svg{transform:rotate(180deg)}
.comp-more>.comp-list{box-shadow:none}
.comp-empty{margin:12px 0;font-size:14px;color:#6b7488}
.comp-key{margin:12px 0 16px;padding:14px 16px;border-radius:12px;background:#f0f4fc;font-size:15px;line-height:1.6;color:#384765}
.comp-key strong{font-weight:700}
.comp-award-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:16px}
.comp-key+.comp-award-grid{margin-top:0}
.comp-award{display:flex;gap:12px;align-items:flex-start;padding:16px;border-radius:14px;border:1px solid #edf0f6;background:#fbfcfe}
.comp-award .icon-box,.comp-award .comp-league{flex:none;width:40px;height:40px;border-radius:12px}
.comp-award h3{font-size:15px;font-weight:700;line-height:1.35;color:#252c49}
.comp-award p{font-size:13px;line-height:1.5;color:#5d6880;margin-top:4px}
.comp-award.is-teacher{background:#f3f6ff;border-color:#dfe6fb}
.comp-prizes{display:flex;gap:8px;align-items:flex-start;margin-top:16px;font-size:13px;line-height:1.6;color:#5d6880}
.comp-prizes svg{flex:none;margin-top:3px;color:#e2ad1f}
.comp-rules{margin-top:16px;padding:4px 24px 8px;background:#fff;border:1px solid #e5eaf3;border-radius:16px}
.comp-rules ul{margin:0 0 12px;padding-left:20px;display:flex;flex-direction:column;gap:6px;font-size:14px;line-height:1.6;color:#4f5b74}
@media(max-width:1200px){.comp-status{flex-direction:column;align-items:stretch}.comp-stats>div{flex:1}}
@media(max-width:1000px){.comp-award-grid{grid-template-columns:1fr}}
@media(max-width:600px){
  .comp-status,.comp-board,.comp-awards{padding:16px}
  .comp-rules{padding:4px 16px 8px}
  .comp-status-main{align-items:flex-start}
  .comp-stats{gap:6px}.comp-stats>div{min-width:0;padding:8px 10px}.comp-stats dd{font-size:17px}
  .comp-who{flex-direction:column;gap:0}
  .comp-row{padding:6px 8px;gap:8px}
  .comp-row .comp-tag{display:none}
  .comp-board-head{align-items:flex-start}
}

/* Соревнования v2: медали у мест, архив марафонов, кубки и призы. */
.comp-place.medal-1 span,.comp-place.medal-2 span,.comp-place.medal-3 span{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;color:#fff;font-size:12px}
.comp-place.medal-1 span{background:#e2ad1f}.comp-place.medal-2 span{background:#9aa6b8}.comp-place.medal-3 span{background:#c08a4c}
.is-cup .comp-row:nth-child(-n+3) .comp-place{color:inherit}
.comp-archive{margin-top:24px;padding:24px;background:#fff;border:1px solid #e5eaf3;border-radius:16px}
.comp-archive h2{font-size:20px;font-weight:700;letter-spacing:-.02em;color:#252c49;margin-bottom:8px}
.comp-past{border-top:1px solid #eef1f6}
.comp-past:first-of-type{border-top:0}
.comp-past>summary{list-style:none;display:flex;align-items:center;gap:16px;padding:14px 0;cursor:pointer}
.comp-past>summary::-webkit-details-marker{display:none}
.comp-past>summary:focus-visible{outline:2px solid #849ff0;outline-offset:2px;border-radius:8px}
.comp-past-title{flex:1;min-width:0;display:flex;flex-direction:column}
.comp-past-title strong{font-size:15px;font-weight:700;color:#252c49}
.comp-past-title small{font-size:13px;color:#72839d}
.comp-past-facts{display:flex;gap:16px;font-size:14px;color:#5d6880;white-space:nowrap}
.comp-past-facts b{color:#252c49;font-weight:700}
.comp-past-facts svg{color:#e2ad1f;vertical-align:-2px}
.comp-past-chevron{flex:none;color:#8a95ab;transition:transform .2s}
.comp-past[open] .comp-past-chevron{transform:rotate(180deg)}
.comp-past-body{padding:0 0 16px}
.comp-past-awards{font-size:14px;line-height:1.8;color:#384765;margin-bottom:12px}
.comp-past-sep{margin:0 8px;color:#b3bac6}
.comp-past-boards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.comp-past-boards h3{font-size:14px;font-weight:700;color:#5d6880;margin-bottom:4px}
.comp-list.is-compact .comp-row{min-height:36px;padding:4px 8px}
.comp-list.is-compact .comp-score{font-size:13px}
.comp-status.is-league{border-width:1px 1px 1px 6px}
.league-tone-bronze{background:linear-gradient(100deg,#fff4ea,#fff 55%);border-color:#efcfb2}
.league-tone-silver{background:linear-gradient(100deg,#f3f5f9,#fff 55%);border-color:#d4dae4}
.league-tone-gold{background:linear-gradient(100deg,#fff8dc,#fff 55%);border-color:#f2dc8c}
.comp-status-cup{flex:none;display:grid;place-items:center;width:64px;height:64px;border-radius:16px;background:#fff;box-shadow:0 2px 8px rgba(155,82,39,.12)}
.comp-status-cup .comp-trophy{width:44px;height:48px}
.comp-lead{margin-top:6px;font-size:15px;line-height:1.6;color:#4f5b74}
.comp-lead strong{color:#252c49}
.comp-cup-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:16px}
.comp-cup{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;padding:20px 16px;border-radius:16px;border:1px solid #edf0f6}
.comp-cup .comp-trophy{margin-bottom:4px;filter:drop-shadow(0 6px 10px rgba(37,44,73,.12))}
.comp-cup h3{font-size:16px;font-weight:700;color:#252c49}
.comp-cup p{font-size:13px;line-height:1.5;color:#5d6880}
.cup-bronze{background:linear-gradient(180deg,#fff2e6,#fff)}.cup-silver{background:linear-gradient(180deg,#eef2f7,#fff)}.cup-gold{background:linear-gradient(180deg,#fff6d4,#fff);border-color:#f2dc8c}
.comp-cups .comp-key{display:flex;gap:12px;align-items:flex-start;margin:16px 0 0}
.comp-cups .comp-key .icon-box{flex:none;width:40px;height:40px;border-radius:12px}
.comp-cups .comp-key p{margin:0}
.comp-prize-levels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:16px}
.comp-prize{display:flex;gap:12px;align-items:flex-start;padding:16px;border-radius:16px;border:1px solid #edf0f6}
.comp-prize .comp-gift{flex:none}
.comp-prize h3{font-size:15px;font-weight:700;color:#252c49}
.comp-prize p{font-size:13px;line-height:1.5;color:#5d6880;margin-top:2px}
.comp-prize ul{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-direction:column;gap:6px}
.comp-prize li{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600;color:#384765}
.comp-prize li svg{flex:none;color:#7444bd}
.comp-prize.level-1{background:linear-gradient(180deg,#fff8e1,#fff)}.comp-prize.level-2{background:linear-gradient(180deg,#f2f5fa,#fff)}.comp-prize.level-3{background:linear-gradient(180deg,#fff3ea,#fff)}
@media(max-width:1100px){.comp-prize-levels{grid-template-columns:1fr}}
@media(max-width:700px){.comp-cup-row{grid-template-columns:1fr 1fr 1fr;gap:8px}.comp-cup{padding:12px 6px}.comp-cup .comp-trophy{width:64px;height:70px}.comp-cup h3{font-size:13px}.comp-cup p{font-size:12px}.comp-past-boards{grid-template-columns:1fr}.comp-past>summary{flex-wrap:wrap;gap:4px 12px}.comp-past-title{flex-basis:calc(100% - 28px)}.comp-past-facts{order:3}}
@media(max-width:600px){.comp-archive{padding:16px}.comp-row .comp-tag.tag-gramota,.comp-row .comp-tag.tag-diploma{display:inline-block}}
.comp-award.has-art{align-items:center}
.comp-award-art{flex:none;width:88px;height:68px}
@media(max-width:600px){.comp-award-art{width:72px;height:56px}}
/* Подсказка «i» у счётчика огоньков: details/summary — работает с клавиатуры и по тапу. */
.comp-stats dt{display:flex;align-items:center;gap:6px}
.comp-hint{position:relative;display:inline-block}
.comp-hint>summary{list-style:none;display:grid;place-items:center;width:16px;height:16px;border-radius:50%;background:#dfe5ef;color:#4c5874;font-size:11px;font-weight:700;font-style:italic;line-height:1;cursor:pointer}
.comp-hint>summary::-webkit-details-marker{display:none}
.comp-hint>summary:focus-visible{outline:2px solid #849ff0;outline-offset:2px}
.comp-hint[open]>summary{background:#384765;color:#fff}
.comp-hint>p{position:absolute;z-index:5;top:calc(100% + 8px);right:-12px;width:min(260px,80vw);margin:0;padding:10px 12px;border-radius:10px;background:#252c49;color:#fff;font-size:13px;font-weight:400;line-height:1.5;box-shadow:0 8px 24px rgba(37,44,73,.22)}
@media(max-width:600px){.comp-hint>p{right:auto;left:-120px}}

/* Баннер олимпиады на главной ЛК (до 7 декабря): компактная полоса над заголовком страницы, вся карточка — ссылка в раздел олимпиады. */
.olymp-promo{position:relative;display:flex;align-items:center;gap:24px;margin:0 0 24px;min-height:0;padding:16px 24px;border-radius:16px;overflow:hidden;color:#fff;text-decoration:none;background:radial-gradient(60% 160% at 100% 0%,rgba(255,159,107,.85) 0%,rgba(255,159,107,0) 55%),linear-gradient(110deg,#4a2a8f 0%,#6d3fc0 45%,#9442a8 75%,#c2456a 100%);box-shadow:0 6px 18px rgba(74,42,143,.2);cursor:pointer}
.olymp-promo:hover .olymp-promo-cta{background:#efe8ff}
.olymp-promo:focus-visible{outline:3px solid #849ff0;outline-offset:4px}
.olymp-promo-copy{position:relative;z-index:1;display:flex;flex-direction:column;align-items:flex-start;gap:8px;flex:1;min-width:0}
.olymp-promo-title{font-size:20px;font-weight:700;line-height:1.25;letter-spacing:-.01em;color:#fff}
.olymp-promo-dates{display:flex;flex-wrap:wrap;gap:6px}
.olymp-promo-pill{display:inline-block;padding:3px 10px;border-radius:999px;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.28);font-size:13px;line-height:1.4;color:#fff}
.olymp-promo-pill b{font-weight:700}
.olymp-promo-cta{flex:none;order:3;display:inline-flex;align-items:center;gap:8px;padding:9px 16px;border-radius:12px;background:#fff;color:#4a2a8f;font-size:14px;font-weight:700;white-space:nowrap;transition:background .15s ease}
.olymp-promo-art{position:relative;flex:none;order:2;width:200px;height:84px}
.olymp-promo-art img,.olymp-promo-art>span{position:absolute}
.olymp-art-cup{left:70px;top:-4px;filter:drop-shadow(0 6px 10px rgba(40,10,80,.35))}
.olymp-art-cup .comp-trophy{width:72px;height:80px}
.olymp-art-balloon{right:4px;top:-2px;width:40px;height:auto;transform:rotate(8deg)}
.olymp-art-train{right:0;bottom:0;width:52px;height:auto}
.olymp-art-train2{left:0;bottom:6px;width:52px;height:auto;transform:rotate(-6deg)}
.olymp-art-sym{font-size:20px;font-weight:700;color:rgba(255,255,255,.4);line-height:1}
.olymp-art-sym.s1{left:22px;top:2px}.olymp-art-sym.s2{right:56px;top:4px}.olymp-art-sym.s3{display:none}
@media(prefers-reduced-motion:reduce){.olymp-promo-cta{transition:none}}
@media(max-width:1100px){.olymp-promo-art{display:none}}
@media(max-width:700px){
  .olymp-promo{flex-direction:column;align-items:stretch;gap:10px;padding:14px 16px;margin-bottom:20px}
  .olymp-promo-title{font-size:17px}
  .olymp-promo-pill{font-size:12px}
  .olymp-promo-cta{justify-content:center}
}

/* Смена школы: карточка «Школа» в профиле и компактный переключатель в сайдбаре (если школ больше одной). */
.teacher-school-card{grid-column:1/-1;scroll-margin-top:24px}
.teacher-school-current{display:flex;align-items:center;gap:12px;margin-top:16px}
.teacher-school-current .icon-box{flex:none;width:40px;height:40px;border-radius:12px}
.teacher-school-current strong{display:block;font-size:15px;font-weight:700;color:#252c49;line-height:1.4}
.teacher-school-current small{display:block;font-size:13px;color:#72839d;margin-top:2px}
.teacher-school-label{margin-top:16px;font-size:14px;color:#5d6880}
.teacher-school-list{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-direction:column;gap:8px}
.teacher-school-list li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid #eef1f6;border-radius:12px}
.teacher-school-list li>span{min-width:0}
.teacher-school-list strong{display:block;font-size:14px;font-weight:600;color:#252c49}
.teacher-school-list small{display:block;font-size:12px;color:#72839d}
.teacher-school-list form{margin:0}
.teacher-school-list .btn{min-height:36px;height:36px;padding:0 14px;font-size:14px}
.teacher-school-change{margin-top:16px}
.teacher-school-change>summary{list-style:none;display:inline-flex;min-height:40px;padding:8px 16px;font-size:14px;cursor:pointer}
.teacher-school-change>summary::-webkit-details-marker{display:none}
.teacher-school-change[open]>summary{display:none}
.teacher-school-form{margin-top:4px;max-width:640px}
.teacher-school-note{font-size:14px;line-height:1.6;color:#5d6880;margin-bottom:12px}
@media(max-width:600px){.teacher-school-list li{flex-direction:column;align-items:stretch}.teacher-school-list .btn{width:100%}}

/* Без статуса олимпиады: три счётчика вместо четырёх. */
.rails-teacher-shell .dashboard-stats.is-three{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:600px){.rails-teacher-shell .dashboard-stats.is-three{grid-template-columns:1fr 1fr}}

/* Ссылка «Помощь» → /help (центр помощи). */
.rails-teacher-shell .teacher-help-link{flex:none;padding:6px 10px;border-radius:16px;color:#384765;font-size:14px;font-weight:600;text-decoration:none}
.rails-teacher-shell .teacher-help-link:hover{background:#eef2f8}
