/* Public-site polish. Existing content, colours set in admin, and navigation stay intact. */
:root{--bg:#f3f5f9;--text:#26364c;--card:#fff;--site-muted:#68778b;--site-line:#dfe6ef;--site-accent:#435d9f;--site-soft:#eef2fa}
body.dark{--bg:#101723;--text:#e5ebf5;--card:#182231;--site-muted:#a0aec2;--site-line:#2d3b4f;--site-accent:#afc5ff;--site-soft:#202e43}
body{font-family:Arial,Helvetica,sans-serif;line-height:1.55}
.bg-pattern{opacity:.25;pointer-events:none}
header{border:0;background:#303c60}
.header-top{min-height:104px;padding:20px max(28px,calc((100% - 1160px)/2));justify-content:flex-start;background-color:#354164;background-blend-mode:soft-light}
body.dark .header-top{background-color:#17233a;background-blend-mode:soft-light}
.header-title{display:flex;align-items:center;gap:14px;text-align:left;font-family:inherit;font-size:24px;letter-spacing:0;text-shadow:none;line-height:1.2}
.header-title small{display:block;font-size:12px;font-weight:400;letter-spacing:.4px;margin-top:6px;color:#d4deef}
.site-mark{display:grid;place-items:center;width:48px;height:48px;border:1px solid #ffffff55;border-radius:15px;background:#ffffff12;font-size:18px;letter-spacing:-1px}
.header-date{left:auto;right:max(120px,calc((100% - 1160px)/2 + 96px));font-size:13px;font-weight:500;background:none;padding:0;color:#e1e8f4}
.theme-toggle{left:auto;right:max(28px,calc((100% - 1160px)/2));box-shadow:none!important;outline:1px solid #ffffff44;transform:translateY(-50%)}
.header-bar,body.dark .header-bar{background:var(--card);border-bottom:1px solid var(--site-line);padding:8px 20px;overflow:visible}
.header-bar-inner{display:flex;justify-content:center;flex-wrap:wrap;width:100%;max-width:1200px;gap:2px 4px;overflow:visible;white-space:normal}
.bar-btn{padding:8px 11px;font-size:13px;font-weight:600;color:var(--text);border-radius:7px;display:inline-flex;align-items:center}
.bar-btn:hover,.bar-btn.active,body.dark .bar-btn:hover,body.dark .bar-btn.active{color:var(--site-accent);background:var(--site-soft);transform:none}
.bar-btn img{width:22px!important;height:22px!important}
main.container{width:100%;max-width:1200px;margin:32px auto 48px;padding:0 20px}
.top-panel.study-overview{display:flex;align-items:center;justify-content:space-between;gap:28px;padding:30px 32px;border:1px solid var(--site-line);border-radius:20px;background:var(--card);box-shadow:0 4px 20px #172c4b04;margin-bottom:32px}
.eyebrow{font-size:10px;font-weight:700;letter-spacing:1.9px;color:var(--site-accent);margin-bottom:9px}
.overview-copy h1{font-size:clamp(26px,3vw,36px);line-height:1.18;letter-spacing:0;font-weight:700;color:var(--text)}
.overview-description{color:var(--site-muted);font-size:14px;margin:12px 0 18px}
.period-line{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--site-muted);flex-wrap:wrap}
.period-line .study-icon{opacity:.65}
.semester-form-desktop{display:flex;flex-direction:column;gap:8px;min-width:190px;max-width:240px}
.semester-form label{font-size:12px;color:var(--site-muted);font-weight:600}
.semester-select,body.dark .semester-select{width:100%;background:var(--site-soft);color:var(--text);border:1px solid var(--site-line);border-radius:10px;padding:13px 15px;font:600 15px Arial,Helvetica,sans-serif;min-width:0;box-shadow:none}
.subjects-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 20px}
.subjects-toolbar h2{font-size:21px;font-weight:700;letter-spacing:0;display:flex;align-items:center;gap:10px}
.subject-total{font:600 12px Arial,Helvetica,sans-serif;color:var(--site-muted);background:var(--site-soft);padding:3px 8px;border:1px solid var(--site-line);border-radius:7px}
.subjects-toolbar p{font-size:12px;color:var(--site-muted);margin-top:5px}
.subject-search{display:flex;align-items:center;gap:10px;border:1px solid var(--site-line);background:var(--card);border-radius:10px;padding:11px 14px;width:310px;max-width:100%}
.subject-search input{width:100%;min-width:0;border:0;background:transparent;color:var(--text);font:13px Arial,Helvetica,sans-serif;outline:0}
.subject-search input::placeholder{color:var(--site-muted)}
.search-symbol{position:relative;width:13px;height:13px;border:1.7px solid var(--site-muted);border-radius:50%;flex-shrink:0;margin-right:3px}
.search-symbol:after{content:"";position:absolute;right:-5px;bottom:-3px;width:6px;height:1.7px;background:var(--site-muted);transform:rotate(45deg)}
.subjects{gap:20px;align-items:stretch}
.subjects>.card,.subjects>.card:not(.empty),.subjects>.card.empty{padding:24px;border:1px solid var(--site-line);border-top:3px solid var(--card-accent,var(--site-line));border-radius:16px;background:var(--card);min-height:0;box-shadow:0 3px 12px #14254404;gap:0}
.subjects>.card:hover{transform:translateY(-3px);box-shadow:0 12px 26px #132b4810;border-bottom-color:var(--site-accent)}
.subjects>.card[hidden]{display:none}
.subjects>.card>.work-badges{justify-content:center;flex-wrap:wrap;text-align:center;min-height:22px;margin:0 0 16px;gap:5px}
.badge,.work-badge{box-shadow:none!important;font-size:10px;font-weight:700;letter-spacing:.15px;padding:4px 8px;white-space:normal;line-height:1.4;border-radius:6px}
.card h3,body.dark .card h3{font-size:19px;font-weight:700;letter-spacing:0;line-height:1.4;color:var(--text);margin:0 0 12px}
.teacher-link,body.dark .teacher-link{font-size:12px;line-height:1.6;font-weight:500;color:var(--site-muted);margin:0 0 14px}
.teacher-link::after{content:none}
.card-link-arrow{display:inline-block;width:13px;height:13px;vertical-align:-1px;flex-shrink:0;margin-left:4px}
.open-hint .card-link-arrow{width:19px;height:19px;margin-left:0}
.card>p{font-size:12px;color:var(--site-muted);margin-bottom:14px}
.card>.meta-row{margin:0 0 18px}
.type-badge{font-size:10px;font-weight:600;padding:3px 8px;border-radius:5px}
.card>.meta-row .type-badge{font-size:14px;line-height:1.4;padding:5px 10px}
body.dark .exam{background:#493727;color:#ffd8a4}body.dark .credit{background:#234235;color:#b5e9ca}
.preview-tasks{display:grid;gap:0;border-top:0;margin-bottom:16px}
.preview-task-item{padding:12px 0;border-bottom:1px solid var(--site-line)}
.preview-task-title,body:not(.dark) .preview-task-title,body.dark .preview-task-title{font-size:14px;font-weight:700;color:var(--site-muted);margin-bottom:6px;line-height:1.4}
.preview-task-text,body:not(.dark) .preview-task-text,body.dark .preview-task-text{font-size:16px;line-height:1.6;color:var(--text)}
.preview-task-item.is-empty .preview-task-title,.preview-task-item.is-empty .preview-task-text{color:var(--site-muted)!important}
.preview-task-item.is-empty .preview-task-text{opacity:.8}
.open-hint,body.dark .open-hint{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;margin-top:auto;padding:11px 13px;color:var(--site-accent);background:var(--site-soft);border:0;border-radius:8px;font:600 12px Arial,Helvetica,sans-serif;cursor:pointer}
.open-hint span{font-size:19px;line-height:1}
.subject-empty{grid-column:1/-1;padding:48px 24px;text-align:center;border:1px dashed var(--site-line);border-radius:16px;color:var(--site-muted);background:var(--card)}
.subject-empty h3{margin:12px 0 6px;color:var(--text)}
.subject-empty[hidden]{display:none}
.modal{z-index:2000;background:#101a2eaa;backdrop-filter:blur(5px)}
.modal-content,body:not(.dark) .modal-content{background:var(--card)!important;border:1px solid var(--site-line);border-radius:20px;box-shadow:0 28px 100px #0004;padding:28px;scrollbar-width:thin}
.modal h2,body.dark .modal h2{color:var(--text);font-size:26px;letter-spacing:0;line-height:1.3}
.modal-close,body.dark .modal-close{background:var(--site-soft);color:var(--text);border:1px solid var(--site-line)}
.task-card,body.dark .task-card,body:not(.dark) .task-card{background:var(--site-soft)!important;box-shadow:none;border:1px solid var(--site-line);border-radius:12px}
.task-card-title,body.dark .task-card-title{font-size:19px;line-height:1.35;color:var(--text);margin:0 0 10px}
.task-card .task-text,.task-card .task-paragraph,.task-card .task-list li,body:not(.dark) .task-card .task-text,body:not(.dark) .task-card .task-paragraph,body.dark .task-card .task-text{color:var(--text);font-size:16px!important;line-height:1.5!important}
/* Use the same rhythm for editor paragraphs and generated list items. */
.task-card .task-text,.task-card .task-html{--task-text-gap:6px}
.task-card .task-heading{font-size:16px!important;line-height:1.5!important}
.task-card .task-html{font-size:16px;line-height:1.5}
.task-card .task-text > :is(p,div,h2,h3,h4,blockquote),
.task-card .task-text li,.task-card .task-html p,.task-card .task-html li{margin:var(--task-text-gap) 0!important}
.task-card :is(.task-text,.task-html) :is(ul,ol){margin:var(--task-text-gap) 0!important;padding:0 0 0 24px!important;list-style-position:outside!important}
.task-card :is(.task-text,.task-html) ul{list-style-type:disc!important}
.task-card :is(.task-text,.task-html) ol{list-style-type:decimal!important}
.task-card :is(.task-text,.task-html) li{padding-left:0!important}
.task-card .task-text .task-list li::before{content:none!important}
.task-card :is(.task-text,.task-html) li > :is(p,div):first-child{margin-top:0!important}
.task-card :is(.task-text,.task-html) li > :is(p,div):last-child{margin-bottom:0!important}
.task-card .task-text > :first-child{margin-top:0!important}
.task-card .task-text > :last-child{margin-bottom:0!important}
.task-card .task-text > .task-blank-line{margin:0!important}
.task-card > .work-badges{margin:0 0 10px;min-height:0}
.task-card > .work-badges:not(:has(.work-badge)){display:none}
.task-card .files{margin-top:10px;padding-top:8px}
.task-card .task-list li::before{color:var(--site-accent)}
.task-stage-title{letter-spacing:0}.task-stage-section{border-top:0;padding-top:0}
.download-btn{border:1px solid var(--site-line);box-shadow:none;line-height:1.5}
.news-modal-item{border:1px solid var(--site-line);border-radius:12px;padding:20px;background:var(--site-soft)}
footer{font-size:12px;color:var(--site-muted);border-top:1px solid var(--site-line);padding:24px}
.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
:is(a,button,select):focus-visible,.subject-search:focus-within{outline:3px solid var(--site-accent);outline-offset:3px}
@media(max-width:1000px){.subjects{grid-template-columns:repeat(2,minmax(0,1fr))}.header-date{display:none}}
@media(max-width:720px){
  .header-top{padding:18px 20px;min-height:88px;justify-content:flex-start;flex-direction:row}.header-title{font-size:22px;max-width:none}.header-title small{font-size:11px}.site-mark{width:42px;height:42px}
  body .theme-toggle{position:absolute!important;left:auto!important;right:20px!important;top:50%!important;bottom:auto!important;margin:0;width:56px;height:30px;transform:translateY(-50%)!important}
  .header-bar{padding:8px 12px}.header-bar-inner{width:100%;justify-content:flex-start;flex-wrap:wrap;overflow:visible;gap:2px}
  .bar-btn{font-size:11px!important;padding:7px 8px!important}
  main.container{margin:20px auto 32px;padding:0 14px}
  .top-panel.study-overview{padding:24px 20px;display:block;margin-bottom:26px;border-radius:16px}.overview-copy h1{font-size:28px}.overview-description{font-size:13px}
  .semester-form-desktop{display:none}.semester-tabs-mobile{display:flex;flex-wrap:wrap;gap:7px;margin-top:22px;width:100%;overflow:visible}
  .semester-tab,body:not(.dark) .semester-tab,body.dark .semester-tab{background:var(--site-soft)!important;border:1px solid var(--site-line);color:var(--text)!important;box-shadow:none;border-radius:8px;padding:9px 12px;font-size:12px}
  .semester-tab.active,body:not(.dark) .semester-tab.active,body.dark .semester-tab.active{background:var(--site-accent)!important;border-color:var(--site-accent);color:var(--card)!important}
  .subjects-toolbar{align-items:stretch;flex-direction:column;gap:14px}.subject-search{width:100%;padding:13px 14px}
  .subjects{grid-template-columns:1fr!important;gap:16px}.subjects>.card{padding:22px!important}.card h3{font-size:20px}
  .modal{padding:10px}.modal-content{padding:20px!important;max-height:calc(100dvh - 20px);width:100%}.modal h2{font-size:23px}.task-card{padding:17px!important}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}

/* One font family and ordinary bold weights keep Cyrillic text consistent. */
body,button,input,select,textarea{font-family:Arial,Helvetica,sans-serif}
body :is(h1,h2,h3,h4,strong,b,.task-heading,.task-stage-title){font-weight:700!important;letter-spacing:normal}
.task-card .task-text,.task-card .task-paragraph,.task-card .task-list li{font-family:Arial,Helvetica,sans-serif!important}
.site-logo{width:48px;height:48px;object-fit:contain;flex-shrink:0;border-radius:12px}
.period-line{margin-top:18px}
body .header-bar{gap:8px;padding:12px 18px;overflow:hidden}
body .header-bar-inner{flex:1 1 auto;flex-wrap:nowrap;justify-content:flex-start;width:auto;max-width:max-content;min-width:0;overflow-x:auto;gap:8px;scrollbar-width:thin;scrollbar-color:var(--site-line) transparent;white-space:nowrap;padding:3px}
body .header-bar-inner::-webkit-scrollbar{display:block;height:3px}
body .header-bar-inner::-webkit-scrollbar-thumb{background:var(--site-line);border-radius:3px}
body .bar-btn{flex:0 0 auto;white-space:nowrap;min-height:44px;padding:11px 15px!important;font-size:14px!important;font-weight:600;border:1px solid var(--site-line);border-radius:9px;background:var(--site-soft)}
body .bar-btn:hover{border-color:var(--site-accent)}
.nav-scroll{flex:0 0 34px;width:34px;height:44px;border:1px solid var(--site-line);border-radius:8px;background:var(--card);color:var(--site-accent);font-size:25px;cursor:pointer}
.nav-scroll:disabled{opacity:.35;cursor:default}.nav-scroll[hidden]{display:none}
@media(max-width:720px){body .header-bar{padding:10px 8px;gap:5px}body .bar-btn{font-size:13px!important;padding:10px 13px!important}.site-logo{width:42px;height:42px}.header-title{gap:10px}.nav-scroll{flex-basis:28px;width:28px}}
.site-navigation{margin-left:36px;color:var(--text)}
.site-menu-toggle{list-style:none;display:flex;align-items:center;gap:12px;min-height:44px;padding:11px 17px;border:1px solid #ffffff70;border-radius:9px;background:#172641a6;color:#fff;font-size:14px;font-weight:700;cursor:pointer;user-select:none}
.site-menu-toggle::-webkit-details-marker{display:none}
.site-menu-toggle:hover{background:#314361}.menu-chevron{margin-left:12px;font-size:19px;line-height:1}
.site-navigation[open] .menu-chevron{transform:rotate(180deg)}
.menu-lines{display:inline-block;width:17px;height:12px;border-top:2px solid currentColor;border-bottom:2px solid currentColor;position:relative}
.menu-lines:after{content:"";height:2px;background:currentColor;position:absolute;left:0;right:0;top:3px}
.site-menu-panel{position:absolute;top:100%;left:0;right:0;background:var(--card);border-top:1px solid var(--site-line);border-bottom:1px solid var(--site-line);box-shadow:0 18px 35px #08162825;max-height:calc(100dvh - 110px);overflow-y:auto;overscroll-behavior:contain;color:var(--text);text-align:left}
.site-menu-grid{display:grid;grid-template-columns:1.3fr 1fr 1fr 1fr;gap:32px;max-width:1200px;margin:auto;padding:32px 24px 38px}
.site-menu-section{min-width:0;overflow-wrap:anywhere}
.site-menu-section h2{font-size:16px;line-height:1.5;margin:0 0 16px;padding-bottom:13px;border-bottom:1px solid var(--site-line)}
.site-menu-section a{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:42px;padding:10px;border-radius:7px;color:var(--text);text-decoration:none;font-size:14px;line-height:1.5}
.site-menu-section a:hover{background:var(--site-soft);color:var(--site-accent)}
.site-menu-section a>span{color:var(--site-muted)}.menu-empty{font-size:13px;color:var(--site-muted);line-height:1.7;padding:10px}
.site-menu-toggle:focus-visible{outline:3px solid #c5d5ff;outline-offset:3px}
@media(max-width:720px){
  body header,body .header-shell{overflow:visible!important}
  body .header-top{padding:16px 14px!important;min-height:88px}
  body .header-title{padding:0!important;font-size:19px!important;gap:8px;flex-shrink:0}
  .site-navigation{margin-left:14px}.site-menu-toggle{padding:10px;gap:8px;font-size:13px}.menu-chevron{display:none}
  body .theme-toggle{right:14px!important;width:50px!important;height:28px!important}
  .site-menu-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:25px 16px;padding:24px 16px}
  .site-menu-section h2{font-size:15px}.site-menu-section a{font-size:13px;padding:10px 4px}
  .site-menu-panel{max-height:calc(100dvh - 88px)}
}
@media(max-width:360px){.site-logo{width:34px;height:34px}.site-navigation{margin-left:10px}.site-menu-toggle{gap:6px;padding:10px 8px}.site-menu-grid{gap:22px 10px}}
/* A quiet decorative background; content and scrolling remain stationary. */
body{isolation:isolate}
body::before{content:"";position:fixed;inset:-12%;z-index:-1;pointer-events:none;background:radial-gradient(ellipse at 12% 25%,#91a9f56b,transparent 48%),radial-gradient(ellipse at 88% 65%,#80d5ce57,transparent 45%);animation:site-ambient-drift 22s ease-in-out infinite alternate;will-change:transform}
body.dark::before{background:radial-gradient(ellipse at 18% 35%,#537de923,transparent 43%),radial-gradient(ellipse at 80% 70%,#63bcb618,transparent 42%)}
@keyframes site-ambient-drift{from{transform:translate3d(-3%,-2%,0)}to{transform:translate3d(4%,4%,0)}}
@media(prefers-reduced-motion:reduce){body::before{animation:none;will-change:auto}}
@media(max-width:720px){body .theme-toggle .theme-toggle__knob{width:22px!important;height:22px!important;flex-shrink:0}body.dark .theme-toggle .theme-toggle__knob{transform:translateX(22px)!important}}
.site-menu-toggle .menu-chevron{display:block;width:16px;height:16px;flex:0 0 16px;margin-left:8px;transform:rotate(0);transform-origin:center;transition:transform .2s ease}
.site-navigation[open] .menu-chevron{transform:rotate(0)}
.site-navigation.menu-is-open .menu-chevron{transform:rotate(180deg)}
.site-menu-panel{transform-origin:top center}
body :is(.top-panel,.card,.task-card,.modal-content,.site-menu-panel,.semester-select,.subject-search,.open-hint,.download-btn,.type-badge){transition:background-color .28s ease,color .28s ease,border-color .25s ease,box-shadow .25s ease}
body :is(a,button,summary){transition:background-color .2s ease,color .2s ease,border-color .2s ease,box-shadow .2s ease}
.subjects>.card:hover{transform:none}
.modal.active{animation:site-fade-in .2s ease both}
.modal.active>.modal-content{animation:site-window-in .23s ease both}
.top-panel.study-overview,.subjects>.card{animation:site-fade-in .3s ease both}
@keyframes site-fade-in{from{opacity:0}to{opacity:1}}
@keyframes site-window-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:360px){.site-menu-toggle .menu-chevron{margin-left:0;width:12px;height:12px;flex-basis:12px}}

/* BASTION's circular deadline mark, with a slower pulse and stationary text. */
.task-deadline-alert{display:inline-grid;place-items:center;flex:0 0 20px;width:20px;height:20px;margin-left:7px;border-radius:50%;background:#d73545;border:1px solid #ff8791;color:#fff;font:700 14px/1 Arial,sans-serif;vertical-align:middle;box-shadow:0 0 0 0 rgb(215 53 69 / 32%);animation:task-deadline-pulse 2.4s ease-in-out infinite}
.task-deadline-alert[hidden]{display:none!important}
@keyframes task-deadline-pulse{0%,100%{opacity:1;box-shadow:0 0 0 0 rgb(215 53 69 / 32%)}50%{opacity:.25;box-shadow:0 0 0 6px rgb(215 53 69 / 0%)}}
@media(prefers-reduced-motion:reduce){.task-deadline-alert{animation:none}}

/* Header information windows: readable text and a downloadable attachment. */
.header-info-image{margin:0 0 24px;text-align:center}
.header-info-panel .header-image-open{display:block;width:min(100%,520px);margin:0 auto;border-radius:14px;overflow:hidden;background:#fff;border:1px solid var(--site-line)}
.header-info-image img{display:block;width:100%;height:auto;max-width:100%;border-radius:0;filter:none}
.header-info-image figcaption{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;text-align:left;margin-top:10px;color:var(--site-muted);font-size:12px;line-height:1.5}
.header-info-panel .header-info-image figcaption a{color:var(--site-accent);text-decoration:underline}
.header-info-panel .header-image-open:focus-visible{outline:2px solid var(--site-accent);outline-offset:3px}
.modal-content.header-info-panel{width:min(760px,calc(100vw - 32px));max-height:calc(100dvh - 40px);padding:36px!important;overflow:auto}
.header-info-panel .modal-close{float:right;margin:0 0 0 12px;top:0;right:0;width:38px;height:38px;font:24px/1 Arial,sans-serif}
.header-info-eyebrow{color:var(--site-muted);font:600 12px/1.4 Arial,sans-serif;letter-spacing:1.5px;text-transform:uppercase;margin:0 50px 10px 0}
.header-info-panel h2{margin:0 45px 24px 0!important;font:700 28px/1.25 Arial,sans-serif!important;color:var(--text)!important}
.header-info-text{font-size:17px;line-height:1.65;overflow-wrap:anywhere}
.header-info-text p,.header-info-text blockquote,.header-info-text ul,.header-info-text ol{margin:0 0 16px}
.header-info-text ul,.header-info-text ol{padding-left:24px}.header-info-text a{color:var(--site-accent);text-decoration:underline}
.header-info-text pre{white-space:pre-wrap}.header-info-text table{max-width:100%}
.header-info-file{display:flex;align-items:center;gap:16px;margin-top:28px;padding:20px;background:var(--site-soft);border:1px solid var(--site-line);border-radius:16px}
.header-file-icon{display:grid;place-items:center;width:46px;height:54px;flex:none;color:var(--site-accent)}
.header-file-icon svg{width:32px;height:38px}.header-file-details{flex:1;min-width:0}
.header-file-details strong{display:block;font-size:16px;color:var(--text)}
.header-file-details span{display:block;color:var(--site-muted);font-size:12px;line-height:1.5;margin-top:5px;overflow-wrap:anywhere}
.header-info-panel .header-file-download{display:flex;align-items:center;justify-content:center;gap:12px;padding:13px 16px;border:1px solid var(--site-accent);border-radius:10px;color:var(--site-accent);text-decoration:none;font:600 14px/1.4 Arial,sans-serif;flex-shrink:0;transition:background .2s ease}
.header-file-download svg{width:19px;height:19px}.header-file-download:hover{background:var(--card)}.header-file-download:focus-visible{outline:2px solid var(--site-accent);outline-offset:4px}
@media(max-width:600px){.modal-content.header-info-panel{padding:24px!important}.header-info-panel h2{font-size:24px!important}.header-info-text{font-size:16px}.header-info-file{flex-wrap:wrap;gap:12px;padding:16px}.header-file-download{width:100%}.header-file-details{flex-basis:calc(100% - 62px)}}

/* Stable vector arrows on every platform, including iOS. */
.site-link-arrow{display:inline-block;width:17px;height:17px;flex:0 0 17px;vertical-align:middle;color:var(--site-muted);stroke-linecap:round;stroke-linejoin:round}
/* Compatibility with existing donation/contact HTML cards. */
.header-info-text img{max-width:100%;height:auto}
.header-info-text .support-donate-box{text-align:center;color:var(--text)}
.header-info-text .support-title{margin:0 0 24px!important}
.header-info-text .support-qr-center{display:flex;flex-direction:column;align-items:center;gap:14px}
.header-info-text .support-qr-img{width:260px;max-width:100%;height:auto;box-sizing:border-box;border-radius:20px;background:#fff;padding:14px;box-shadow:0 8px 28px #0002}
.header-info-text .support-qr-caption,.header-info-text .support-muted{color:var(--site-muted)}
.header-info-text .support-glow-btn{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:13px 24px;border-radius:12px;background:#15803d;border:1px solid #4ade80;color:#fff!important;text-decoration:none!important;font-size:18px;font-weight:700}
.header-info-text .support-donate-text{margin-top:26px;line-height:1.65}
.header-info-text .support-main,.header-info-text .support-feedback{font-size:19px;font-weight:700}
.header-info-text .support-italic{font-style:italic}
.header-info-text .support-email-wrap{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap}
.header-info-text :is(.email-row,.phone-row){display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;max-width:100%}
.header-info-text :is(.email-copy-btn,.phone-copy-btn){padding:9px 12px;border:1px solid var(--site-line);border-radius:9px;background:var(--site-soft);color:var(--text);cursor:pointer}

/* Share content rows between adjacent cards without truncating their titles. */
.subjects>.card>:is(.teacher-link,p){margin:0 0 14px;line-height:1.6;overflow-wrap:anywhere}
@supports(grid-template-rows:subgrid){
 @media(min-width:1151px){
  .subjects>.card:not([hidden]){display:grid;grid-row:span 8;grid-template-rows:subgrid;row-gap:0}
  .subjects>.card>:is(.work-badges,.teacher-link,p,.meta-row){align-self:start}
  .subjects>.card>h3{align-self:center}
  .subjects>.card>.preview-tasks{grid-row:span 3;grid-template-rows:subgrid;row-gap:0}
  .subjects>.card>.open-hint{align-self:end}
 }
}


/* Shareable subject dialogs. Leave room for the close control on narrow screens. */
.subject-share-tools{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 44px 18px 0;font-size:12px;color:var(--site-muted)}
.subject-share-button{padding:9px 12px;border:1px solid var(--site-line);border-radius:8px;background:var(--site-soft);color:var(--site-accent);font:600 12px Arial,sans-serif;cursor:pointer;min-height:40px}
#subjectShareFallback{width:100%;min-width:0;padding:8px;border:1px solid var(--site-line);border-radius:6px;background:var(--card);color:var(--text)}

.subjects > .card > h3{text-align:center}
.task-card > .task-card-title{text-align:left}

/* Matching headings above file and submission actions. */
.task-card > :is(.files,.task-submit-block){display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;gap:10px;min-height:0;margin-top:14px;padding-top:12px}
.task-card > :is(.files,.task-submit-block) > :is(.files-title,.task-submit-title){flex:0 0 100%;margin:0;font-size:16px;font-weight:800;line-height:1.4}
.task-card > .files > .download-btn{margin:0}
