.resource-space { --rs-ink: #173d46; --rs-muted: #698088; --rs-line: #dbe6e8; --rs-green: #087853; color: var(--rs-ink); }
.resource-space *, .resource-dialog * { box-sizing: border-box; }
body.has-resource-dialog { overflow: hidden; }
.resource-space [hidden], .resource-dialog[hidden] { display: none !important; }
.resource-space button, .resource-dialog button { font: inherit; cursor: pointer; }
.resource-space button:disabled, .resource-dialog button:disabled { cursor: wait; opacity: .55; }
.resource-space button:focus-visible, .resource-space a:focus-visible, .resource-dialog button:focus-visible { outline: 2px solid #3478f6; outline-offset: 3px; }
.resource-hero { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 22px; }
.resource-hero small, .resource-dialog__heading small { color: #328172; font: 800 10px/1.4 Consolas, monospace; letter-spacing: .16em; }
.resource-hero h2 { margin: 5px 0 7px; font-size: 27px; }
.resource-hero p { margin: 0; color: var(--rs-muted); font-size: 13px; line-height: 1.65; }
.resource-quota { flex: 0 0 265px; padding: 17px 20px; border: 1px solid #cfe5dc; border-radius: 14px; background: linear-gradient(130deg,#ecf7f1,#f7fbfa); }
.resource-quota header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 12px; }
.resource-quota strong { font: 800 17px Consolas, monospace; }
.resource-quota progress { width: 100%; height: 6px; margin-top: 12px; accent-color: #087853; }
.resource-quota p { margin-top: 7px; font-size: 11px; }
.resource-workspace { overflow: hidden; border: 1px solid var(--rs-line); border-radius: 17px; background: #fff; box-shadow: 0 12px 35px rgba(23,61,70,.04); }
.resource-tabs { display: flex; gap: 6px; padding: 8px 16px 0; border-bottom: 1px solid var(--rs-line); background: #f7faf9; }
.resource-tabs button { position: relative; padding: 17px 20px; color: #667d82; border: 0; background: transparent; font-weight: 750; white-space: nowrap; }
.resource-tabs button.is-active { color: #087853; }
.resource-tabs button.is-active::after { position: absolute; right: 20px; bottom: -1px; left: 20px; height: 3px; border-radius: 3px 3px 0 0; content: ''; background: #087853; }
.resource-body { padding: 22px; }
.resource-toolbar, .resource-toolbar__filters, .resource-row__actions, .resource-dialog__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.resource-toolbar { justify-content: space-between; margin-bottom: 15px; }
.resource-toolbar__filters { flex: 1 1 270px; }
.resource-toolbar input { width: min(280px,100%); }
.resource-space input, .resource-space select, .resource-dialog input:not([type=radio]):not([type=checkbox]), .resource-dialog select, .resource-dialog textarea { min-width: 0; min-height: 40px; padding: 9px 12px; color: #173d46; border: 1px solid #ccdbdf; border-radius: 8px; background: #fff; font: inherit; font-size: 13px; }
.resource-space input:focus, .resource-space select:focus, .resource-dialog input:focus, .resource-dialog select:focus, .resource-dialog textarea:focus { outline: 2px solid #c5dfd6; outline-offset: 1px; }
.resource-button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 6px; padding: 8px 13px; color: #315d64; border: 1px solid #ccddde; border-radius: 8px; background: #fff; font-size: 13px !important; font-weight: 750 !important; text-decoration: none; }
.resource-button.is-primary { color: #fff; border-color: #087853; background: #087853; }
.resource-button.is-danger { color: #b8342e; border-color: #efd1cd; }
.resource-button.is-small { min-height: 32px; padding: 6px 10px; font-size: 12px !important; }
.resource-note { margin: 0 0 18px; color: #71858b; font-size: 12px; line-height: 1.7; }
.resource-status { margin: 0 0 15px; padding: 12px 14px; color: #236955; border: 1px solid #c9e5d9; border-radius: 9px; background: #eef8f2; font-size: 13px; line-height: 1.6; }
.resource-status.is-error { color: #9e352e; border-color: #efcdc8; background: #fff4f2; }
.resource-list { display: grid; gap: 9px; }
.resource-row { display: flex; min-width: 0; align-items: center; gap: 14px; padding: 16px; border: 1px solid #e0e9eb; border-radius: 11px; background: #fff; }
.resource-row:hover { border-color: #b8d8cf; background: #fcfefd; }
.resource-row.is-selected { border-color: #7bbfa7; background: #f0faf5; }
.resource-mark { display: grid; width: 42px; height: 46px; flex: 0 0 auto; place-items: center; color: #1f7d68; border: 1px solid #d2e8df; border-radius: 10px; background: #edf7f2; font: 800 11px Consolas, monospace; }
.resource-row__copy { flex: 1 1 auto; min-width: 0; }
.resource-row__copy h3 { margin: 0 0 6px; overflow-wrap: anywhere; font-size: 15px; }
.resource-folder-open { display: block; width: 100%; min-height: 32px; padding: 0; color: var(--rs-ink); border: 0; background: transparent; font: inherit; line-height: 1.5; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.resource-folder-open:hover { color: var(--rs-green); text-decoration: underline; text-underline-offset: 3px; }
.resource-question-open { display: block; width: 100%; margin: 0 0 6px; padding: 0; color: #173d46; border: 0; background: transparent; font: inherit; font-size: 16px; font-weight: 850; text-align: left; cursor: pointer; }
.resource-question-open:hover { color: #087853; text-decoration: underline; }
.resource-row__copy p { margin: 0; color: #75868c; font-size: 12px; line-height: 1.65; }
.resource-row__copy .resource-presentation-warning { margin-top: 7px; color: #8a5312; font-weight: 700; }
.resource-row__copy progress { width: min(320px,100%); height: 6px; accent-color: #087853; }
.resource-row input[type=checkbox] { width: 18px; min-height: 18px; accent-color: #087853; }
.resource-empty { padding: 55px 20px; text-align: center; border: 1px dashed #d8e5e5; border-radius: 12px; background: #fbfdfc; }
.resource-empty strong { display: block; margin-bottom: 9px; font-size: 16px; }
.resource-empty p { margin: 0; color: #71848a; font-size: 13px; line-height: 1.7; }
.resource-uploads { display: grid; gap: 8px; margin-bottom: 18px; }
.resource-selection { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 16px; padding: 13px 16px; color: #205d4b; border: 1px solid #c4e0d4; border-radius: 10px; background: #edf8f1; font-size: 13px; }
.resource-pagination { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 18px; color: #71858b; font-size: 12px; }
.resource-stars { display: inline-flex; gap: 1px; color: #d0dae0; letter-spacing: 1px; }
.resource-stars .is-lit { color: #d69a19; }
.resource-dialog { position: fixed; z-index: 220; inset: 0; display: grid; align-items: center; justify-items: center; padding: 20px; overflow-y: auto; background: rgba(9,29,38,.64); }
.resource-dialog__panel { width: min(850px,100%); max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain; padding: 26px; color: #173d46; border: 1px solid #d7e6e5; border-radius: 18px; background: #fff; box-shadow: 0 28px 80px rgba(5,28,35,.3); }
.resource-dialog__heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.resource-dialog__heading > div { flex: 1 1 auto; min-width: 0; }
.resource-dialog__heading > button { flex: 0 0 auto; }
.resource-dialog__heading h2 { margin: 4px 0 0; overflow-wrap: anywhere; font-size: 23px; }
.resource-file-preview { display: block; width: 100%; height: min(68vh,720px); border: 1px solid #d9e7e8; border-radius: 10px; background: #f7fafb; }
.resource-dialog:has(.resource-file-preview) .resource-dialog__panel { width: min(1100px,100%); }
.resource-video-preview { display: block; width: 100%; max-height: 65vh; aspect-ratio: 16 / 9; object-fit: contain; border-radius: 10px; background: #0a1119; }
.resource-dialog:has(.resource-video-preview) .resource-dialog__panel { width: min(960px,100%); }
.resource-dialog:has(.resource-markdown) .resource-dialog__panel { width: min(1100px,100%); }
.resource-markdown { height: min(68vh,720px); overflow: auto; padding: clamp(18px,3vw,42px); color: #203f49; border: 1px solid #d9e7e8; border-radius: 10px; background: #fff; font-size: 16px; line-height: 1.85; overflow-wrap: anywhere; }
.resource-markdown > :first-child { margin-top: 0; }
.resource-markdown h1, .resource-markdown h2, .resource-markdown h3, .resource-markdown h4 { margin: 1.45em 0 .55em; color: #123b49; line-height: 1.35; }
.resource-markdown h1 { padding-bottom: .25em; border-bottom: 2px solid #dbe9e8; font-size: clamp(24px,3vw,34px); }
.resource-markdown h2 { padding-bottom: .2em; border-bottom: 1px solid #e4eeee; font-size: clamp(20px,2.3vw,27px); }
.resource-markdown h3 { font-size: 20px; }
.resource-markdown p, .resource-markdown ul, .resource-markdown ol, .resource-markdown blockquote { margin: .7em 0 1.1em; }
.resource-markdown li { padding-left: .15em; }
.resource-markdown li + li { margin-top: .25em; }
.resource-markdown blockquote { margin-inline: 0; padding: 1px 18px; color: #526d73; border-left: 4px solid #79b7a5; background: #f2f8f6; }
.resource-markdown pre { overflow: auto; padding: 16px 18px; color: #e4f1eb; border-radius: 10px; background: #102a2c; font: 14px/1.65 Consolas,"Cascadia Code",monospace; }
.resource-markdown :not(pre) > code { padding: 2px 5px; color: #a94755; border-radius: 4px; background: #f3f6f7; font-size: .92em; }
.resource-markdown table { display: block; width: max-content; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.resource-markdown th, .resource-markdown td { padding: 8px 12px; border: 1px solid #d7e4e7; }
.resource-markdown th { background: #eef6f4; }
.resource-markdown a { color: #176f9b; text-decoration: underline; text-underline-offset: 3px; }
.resource-markdown__image { color: #667f85; font-size: .9em; }
.resource-markdown.is-error { color: #a33c35; }
.resource-judge-answer { display: flex; flex-wrap: wrap; gap: 14px; }
.resource-judge-answer legend { width: 100%; }
.resource-judge-answer label { display: flex; align-items: center; gap: 9px; min-width: 130px; padding: 10px 14px; border: 1px solid #d1e1e2; border-radius: 9px; cursor: pointer; }
.resource-form { display: grid; gap: 18px; }
.resource-field { display: grid; gap: 8px; min-width: 0; font-size: 13px; }
.resource-field > span, .resource-form legend { color: #34565f; font-weight: 800; }
.resource-field textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.resource-form__columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.resource-form fieldset { min-width: 0; margin: 0; padding: 16px; border: 1px solid #d9e7e8; border-radius: 10px; }
.resource-form legend { padding: 0 7px; }
.resource-form__options { display: grid; gap: 9px; }
.resource-option { display: grid; grid-template-columns: auto 23px minmax(0,1fr) auto; align-items: center; gap: 9px; font-size: 13px; }
.resource-option input[type=radio] { width: 17px; height: 17px; accent-color: #087853; }
.resource-tests { display: grid; gap: 12px; }
.resource-tests[data-tests="testCases"] { max-height: 430px; overflow-y: auto; padding-right: 5px; }
.resource-test-import { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 14px; }
.resource-test-import small { flex-basis: 100%; color: #71858b; }
.resource-test { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; align-items: start; gap: 10px; padding: 12px; border-radius: 9px; background: #f5f9f8; }
.resource-test textarea { width: 100%; min-height: 90px; resize: vertical; font-family: Consolas, monospace !important; }
.resource-difficulty { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.resource-difficulty button { display: grid; width: 40px; height: 38px; place-items: center; color: #c1cdd2; border: 1px solid #d7e1e5; border-radius: 8px; background: #fff; font-size: 24px; line-height: 1; }
.resource-difficulty button.is-lit { color: #d19417; border-color: #e7d5a1; background: #fff9e9; }
.resource-difficulty small { margin-left: 5px; color: #788a8f; }
.resource-dialog__actions { justify-content: flex-end; padding-top: 17px; border-top: 1px solid #e2eaea; }
.resource-publish-list { display: grid; max-height: 190px; overflow-y: auto; gap: 7px; margin: 0; padding: 0; list-style: none; }
.resource-publish-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: #f2f7f5; font-size: 13px; }
.resource-publish-list span { min-width: 0; overflow-wrap: anywhere; }
@media(max-width:800px) { .resource-hero { align-items: stretch; flex-direction: column; gap: 16px; }.resource-quota { flex-basis: auto; }.resource-quota progress { margin-top: 8px; }.resource-body { padding: 16px; }.resource-row { flex-wrap: wrap; }.resource-row__actions { width: 100%; justify-content: flex-end; }.resource-form__columns { grid-template-columns: 1fr; } }
@media(max-width:480px) { .resource-hero h2 { font-size: 24px; }.resource-tabs { justify-content: space-between; gap: 0; padding-inline: 4px; }.resource-tabs button { padding-inline: 12px; font-size: 13px; }.resource-tabs button.is-active::after { right: 10px; left: 10px; }.resource-toolbar__filters { flex-basis: 100%; }.resource-toolbar input { flex: 1 1 130px; width: 0; }.resource-toolbar select { max-width: 145px; }.resource-dialog { padding: 8px; }.resource-dialog__panel { max-height: calc(100dvh - 16px); padding: 18px 14px; border-radius: 12px; }.resource-test { grid-template-columns: 1fr; }.resource-test > button { justify-self: end; }.resource-option { grid-template-columns: 18px 18px minmax(0,1fr) 32px; gap: 6px; }.resource-option button { padding-inline: 4px; }.resource-dialog__actions button { flex: 1; }.resource-selection > div { display: flex; width: 100%; gap: 7px; } }
.resource-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.resource-breadcrumb .resource-button { max-width: 100%; overflow-wrap: anywhere; }
.resource-upload-details { max-height: 360px; overflow: auto; }
