  :root {
    --blue:#4f70bc;
    --blue-dark:#17356f;
    --bg:#f4f7fc;
    --card:#ffffff;
    --text:#1e2a42;
    --muted:#7f8aa3;
    --line:#e2e7f0;
    --soft:#eef3fb;
    --orange:#f6b36c;
    --red:#d93025;
    --green:#16a34a;
  }
  * { box-sizing:border-box; }
  body {
    margin:0;
    font-family:Inter, "Segoe UI", Arial, sans-serif;
    background:var(--bg);
    color:var(--text);
  }
  input, select, textarea {
    width:100%;
    min-height:42px;
    border:1px solid #cdd5e2;
    border-radius:6px;
    padding:0 13px;
    background:#fff;
    color:var(--text);
    font-size:14px;
    font-family:inherit;
  }
  label {
    display:block;
    margin-bottom:7px;
    color:#31406a;
    font-weight:800;
    font-size:13px;
  }
  button {
    border:0;
    border-radius:6px;
    min-height:42px;
    padding:0 18px;
    background:var(--blue);
    color:#fff;
    font-weight:800;
    cursor:pointer;
    box-shadow:0 6px 15px rgba(77,111,185,.24);
    white-space:nowrap;
  }
  button.secondary { background:var(--orange); }
  button.ghost { background:#eef2fb; color:var(--blue-dark); box-shadow:none; }
  button.danger { background:var(--red); }
  button.small { min-height:32px; padding:0 10px; font-size:12px; }
  button:disabled { opacity:.55; cursor:not-allowed; }
  .download-apk {
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:42px;
    margin-top:12px;
    border-radius:6px;
    background:#eef2fb;
    color:var(--blue-dark);
    font-weight:800;
    text-decoration:none;
  }
  .download-apk:hover { background:#dfe8fb; }
  .apk-download-panel {
    margin-top:34px;
    padding-top:24px;
    border-top:1px solid var(--line);
    text-align:left;
  }
  .apk-download-panel .apk-label {
    color:#31406a;
    font-weight:900;
    font-size:13px;
    margin-bottom:7px;
  }
  .apk-download-panel .apk-meta {
    color:var(--muted);
    font-size:13px;
    margin-bottom:4px;
  }
  .field { margin-bottom:16px; }
  .status { min-height:20px; color:#596579; font-size:13px; margin-top:12px; }
  .error { min-height:18px; color:var(--red); font-size:13px; margin-top:10px; }
  .notice { color:var(--muted); font-size:13px; line-height:1.45; }

  #login {
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg,#5968db,#7c6be4);
    padding:24px;
  }
  .login-card {
    width:min(430px,100%);
    max-height:calc(100vh - 48px);
    overflow:auto;
    background:#fff;
    border-radius:10px;
    padding:36px 30px;
    box-shadow:0 24px 70px rgba(18,26,57,.24);
    text-align:center;
  }
  .brand {
    color:#091e6d;
    font-style:italic;
    font-weight:900;
    letter-spacing:4px;
    font-size:46px;
    margin-bottom:18px;
  }
  .login-card h1 {
    font-size:21px;
    margin:0 0 6px;
    letter-spacing:.4px;
  }
  .login-card p {
    margin:0 0 24px;
    color:var(--muted);
  }

  #app { display:none; height:100vh; }
  .layout {
    display:grid;
    grid-template-columns:250px 1fr;
    height:100%;
    overflow:hidden;
  }
  aside {
    background:#fff;
    border-right:1px solid var(--line);
    padding:18px 8px;
    display:flex;
    flex-direction:column;
    gap:18px;
    height:100%;
    overflow-y:auto;
  }
  .side-brand {
    color:#091e6d;
    font-style:italic;
    font-weight:900;
    letter-spacing:3px;
    font-size:34px;
    padding:0 12px 12px;
    border-bottom:1px solid var(--line);
  }
  .group-label {
    color:#a9b1c2;
    font-weight:900;
    font-size:13px;
    padding:0 12px;
  }
  .nav { display:flex; flex-direction:column; gap:6px; }
  .nav button {
    justify-content:flex-start;
    display:flex;
    align-items:center;
    gap:10px;
    width:100%;
    box-shadow:none;
    background:transparent;
    color:#3f4858;
    text-align:left;
    border-radius:6px;
    padding:0 14px;
  }
  .nav button.active { background:var(--blue); color:#fff; }
  .nav-icon {
    width:20px;
    height:20px;
    border-radius:50%;
    background:#eef2fb;
    color:var(--blue-dark);
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:11px;
    font-weight:900;
  }
  .nav button.active .nav-icon { background:#fff; color:var(--blue); }
  .account-nav {
    border-bottom:1px solid var(--line);
    padding:0 0 12px;
  }
  .logout {
    margin-top:auto;
    align-self:center;
    width:132px;
    background:#c9c9c9;
    color:#263238;
    box-shadow:none;
  }
  main { padding:30px; height:100%; overflow-y:auto; }
  .title-card,
  .panel,
  .metric {
    background:var(--card);
    border-radius:6px;
    box-shadow:0 14px 34px rgba(17,32,74,.06);
  }
  .title-card {
    padding:20px 24px;
    color:var(--blue);
    font-size:22px;
    font-weight:900;
    letter-spacing:.5px;
    margin-bottom:28px;
    text-transform:uppercase;
  }
  .metrics {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
    margin-bottom:20px;
  }
  .metric {
    padding:16px;
    border-left:4px solid var(--blue);
  }
  .metric span {
    display:block;
    color:var(--muted);
    font-size:12px;
    font-weight:800;
    text-transform:uppercase;
  }
  .metric strong {
    display:block;
    margin-top:6px;
    font-size:24px;
    color:var(--blue-dark);
  }
  .panel { padding:24px; margin-bottom:22px; }
  .toolbar {
    display:flex;
    justify-content:space-between;
    gap:16px;
    align-items:center;
    margin-bottom:18px;
  }
  .toolbar h2 { margin:0; font-size:20px; color:var(--blue-dark); }
  .section-desc { color:var(--muted); font-size:14px; margin:4px 0 0; }
  .single-grid {
    display:grid;
    grid-template-columns:minmax(280px,420px) 1fr;
    gap:22px;
    align-items:start;
  }
  .list-grid {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:22px;
    align-items:start;
  }
  .course-grid {
    display:grid;
    grid-template-columns:repeat(3,minmax(240px,1fr));
    gap:16px;
    margin-bottom:20px;
  }
  .course-overview {
    margin-top:10px;
  }
  .course-tabs {
    display:flex;
    gap:10px;
    overflow:auto;
    padding-bottom:10px;
    margin-bottom:12px;
  }
  .course-tabs button {
    min-width:150px;
    background:#fff;
    color:var(--ink);
    border:1px solid var(--line);
    box-shadow:none;
    text-align:left;
    padding:12px 14px;
  }
  .course-tabs button.active {
    border-color:var(--blue);
    background:#eef4ff;
    color:var(--blue);
  }
  .course-tabs span,
  .course-tabs small {
    display:block;
  }
  .course-tabs small {
    color:var(--muted);
    margin-top:4px;
  }
  .course-overview-grid {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
    margin-bottom:20px;
  }
  .course-chapter-card {
    background:#fff;
    border:1px solid var(--line);
    border-radius:8px;
    padding:16px;
  }
  .course-card-head {
    display:flex;
    gap:14px;
    align-items:flex-start;
  }
  .course-card-head h3 {
    margin:0 0 6px;
    color:var(--navy);
  }
  .course-card-head p {
    margin:0;
    color:var(--muted);
    line-height:1.45;
  }
  .course-icon {
    width:58px;
    height:58px;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:#f5b400;
    color:#12356b;
    font-weight:800;
    flex:0 0 auto;
    overflow:hidden;
  }
  .course-icon img {
    width:100%;
    height:100%;
    object-fit:cover;
  }
  .course-stats {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
    margin:14px 0;
  }
  .course-stats span {
    background:#f7f9fd;
    border:1px solid var(--line);
    border-radius:8px;
    padding:10px;
    color:var(--muted);
    font-size:12px;
  }
  .course-stats strong {
    display:block;
    margin-top:4px;
    color:var(--navy);
    font-size:18px;
  }
  .course-editor {
    display:grid;
    gap:16px;
  }
  .course-detail {
    background:#fff;
    border:1px solid var(--line);
    border-radius:8px;
    overflow:hidden;
  }
  .course-detail summary {
    cursor:pointer;
    padding:16px 18px;
    font-weight:800;
    color:var(--navy);
    background:#f8faff;
  }
  .course-detail .upload-card {
    border:0;
    border-top:1px solid var(--line);
    border-radius:0;
    box-shadow:none;
  }
  .question-list {
    display:grid;
    gap:14px;
  }
  .question-card {
    border:1px solid var(--line);
    border-radius:8px;
    padding:14px;
    background:#fbfcff;
  }
  .question-card-head {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    margin-bottom:12px;
  }
  .question-options {
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:10px;
  }
  .checkline {
    display:inline-flex;
    align-items:center;
    gap:8px;
    margin-right:18px;
    color:var(--ink);
    font-weight:700;
  }
  .link-button {
    text-decoration:none;
    display:inline-flex;
    align-items:center;
  }
  .upload-card {
    border:1px solid var(--line);
    border-radius:8px;
    padding:18px;
    background:#fbfcff;
  }
  .file-drop {
    border:2px dashed #c4d2ea;
    border-radius:8px;
    padding:16px;
    background:#fff;
    margin-bottom:16px;
  }
  .preview-box {
    min-height:330px;
    border:1px solid var(--line);
    border-radius:8px;
    overflow:hidden;
    background:#fbfcff;
  }
  .preview-head {
    display:flex;
    justify-content:space-between;
    gap:8px;
    align-items:center;
    padding:12px;
    border-bottom:1px solid var(--line);
  }
  .preview-body {
    min-height:276px;
    display:flex;
    align-items:center;
    justify-content:center;
    color:var(--muted);
    text-align:center;
    padding:16px;
  }
  .preview-body embed,
  .preview-body object {
    width:100%;
    height:460px;
    border:0;
    background:#fff;
  }
  .preview-body img,
  .preview-body video {
    max-width:100%;
    max-height:460px;
    object-fit:contain;
  }
  .table-wrap { overflow:auto; }
  table { width:100%; border-collapse:collapse; min-width:820px; }
  th {
    text-align:left;
    padding:12px 10px;
    color:#5d6881;
    font-size:13px;
    border-bottom:1px solid var(--line);
  }
  td {
    padding:13px 10px;
    border-bottom:1px solid var(--line);
    vertical-align:middle;
    font-size:14px;
  }
  tr.selected { background:#f0f5ff; }
  .pill {
    display:inline-block;
    padding:4px 9px;
    border-radius:999px;
    background:#edf2ff;
    color:var(--blue);
    font-size:12px;
    font-weight:800;
  }
  .pill.on { background:#e8f8ee; color:var(--green); }
  .pill.off { background:#fff4e5; color:#b45309; }
  .pill.pending { background:#edf2ff; color:var(--blue-dark); }
  .actions { display:flex; gap:7px; flex-wrap:wrap; }
  .user-toolbar {
    display:flex;
    gap:12px;
    align-items:flex-end;
    flex-wrap:wrap;
    margin-bottom:14px;
  }
  .user-toolbar .field {
    width:220px;
    margin-bottom:0;
  }
  .pager {
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:10px;
    margin-top:14px;
    color:var(--muted);
    font-size:13px;
    font-weight:700;
  }
  .small-select {
    width:auto;
    min-height:32px;
    padding:0 8px;
    font-size:12px;
  }
  .user-actions {
    align-items:center;
  }
  code {
    font-size:12px;
    color:#34436a;
    background:#f1f4fa;
    padding:2px 5px;
    border-radius:4px;
  }
  .icon-thumb {
    width:40px;
    height:40px;
    object-fit:cover;
    border-radius:6px;
    display:block;
  }
  .icon-preview {
    width:64px;
    height:64px;
    object-fit:cover;
    border-radius:8px;
    border:1px solid var(--line);
  }
  .empty {
    border:1px dashed #cbd5e1;
    border-radius:8px;
    padding:24px;
    text-align:center;
    color:var(--muted);
    background:#fbfcff;
  }
  .modal-backdrop {
    display:none;
    position:fixed;
    inset:0;
    background:rgba(15,23,42,.38);
    z-index:50;
    align-items:center;
    justify-content:center;
    padding:20px;
  }
  .modal-backdrop.show { display:flex; }
  .modal {
    width:min(620px,100%);
    background:#fff;
    border-radius:10px;
    box-shadow:0 26px 80px rgba(15,23,42,.34);
    padding:24px;
  }
  .form-grid { display:grid; grid-template-columns:1fr 120px 140px; gap:14px; }
  .ref-group { margin-bottom:18px; }
  .group-header {
    font-size:20px;
    font-weight:800;
    color:var(--blue);
    padding:4px 0 6px;
    border-bottom:2px solid var(--blue);
    margin-bottom:8px;
  }
  .ref-item {
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:12px;
    padding:10px 8px;
    border-bottom:1px solid var(--line);
  }
  .ref-item:last-child { border-bottom:none; }
  .ref-text { flex:1; min-width:0; }
  .ref-title { font-size:14px; color:var(--text); display:block; }
  .ref-desc {
    margin:4px 0 0;
    font-size:13px;
    color:var(--muted);
    line-height:1.5;
    word-wrap:break-word;
  }
  .ref-actions { display:flex; gap:6px; flex-shrink:0; }
  .biblio-popup-fields { display:flex; flex-direction:column; gap:14px; }
  .biblio-popup-fields textarea { resize:vertical; min-height:80px; }
  .preview-body.biblio-scroll.has-items {
    display:block;
    text-align:left;
    align-items:unset;
    justify-content:unset;
    overflow-y:auto;
    max-height:calc(100vh - 300px);
  }
  .profile-grid {
    display:grid;
    grid-template-columns:minmax(320px,1fr) minmax(280px,420px);
    gap:18px;
    align-items:start;
  }
  .profile-form-grid {
    grid-template-columns:1fr 1fr;
  }
  .profile-photo-row {
    display:flex;
    align-items:center;
    gap:14px;
    margin-bottom:16px;
  }
  .profile-photo,
  .user-photo-thumb {
    width:64px;
    height:64px;
    border-radius:50%;
    background:#eef2fb;
    color:var(--blue-dark);
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-weight:900;
    overflow:hidden;
    flex:0 0 auto;
  }
  .profile-photo img,
  .user-photo-thumb {
    object-fit:cover;
  }
  .profile-photo img {
    width:100%;
    height:100%;
  }
  .user-photo-thumb {
    width:42px;
    height:42px;
    border-radius:50%;
  }
  .empty-thumb {
    object-fit:initial;
  }
  .answer-row td {
    background:#fbfcff;
  }
  .answer-editor {
    border:1px solid var(--line);
    border-radius:8px;
    padding:14px;
    background:#fff;
  }
  .answer-meta {
    display:flex;
    gap:12px;
    align-items:center;
    flex-wrap:wrap;
    margin-bottom:12px;
  }
  .question-box {
    border-left:4px solid var(--blue);
    background:#f5f8ff;
    padding:10px 12px;
    border-radius:6px;
    margin-bottom:12px;
  }
  .question-box p {
    margin:6px 0 0;
    white-space:pre-wrap;
  }
  textarea {
    min-height:120px;
    padding:12px 13px;
    resize:vertical;
  }
  @media (max-width: 1120px) {
    .single-grid,
    .profile-grid,
    .list-grid,
    .course-grid,
    .course-overview-grid,
    .question-options { grid-template-columns:1fr; }
    .metrics { grid-template-columns:1fr; }
  }
  @media (max-width: 820px) {
    #app { height:auto; }
    .layout { grid-template-columns:1fr; height:auto; overflow:visible; }
    aside { position:static; height:auto; overflow-y:visible; }
    main { padding:18px; height:auto; overflow-y:visible; }
    .form-grid,
    .profile-form-grid { grid-template-columns:1fr; }
  }
  
  /* Hide Markdown syntax helper characters in EasyMDE editor */
  .EasyMDEContainer .cm-formatting {
    display: none !important;
  }

  /* Markdown rendered preview styling */
  .markdown-preview-style h1, 
  .markdown-preview-style h2, 
  .markdown-preview-style h3 {
    margin-top: 12px;
    margin-bottom: 8px;
    color: var(--blue-dark);
  }
  .markdown-preview-style h1:first-child, 
  .markdown-preview-style h2:first-child, 
  .markdown-preview-style h3:first-child {
    margin-top: 0;
  }
  .markdown-preview-style p {
    margin-top: 0;
    margin-bottom: 8px;
  }
  .markdown-preview-style ul, 
  .markdown-preview-style ol {
    margin-top: 0;
    margin-bottom: 12px;
    padding-left: 20px;
  }
  .markdown-preview-style li {
    margin-bottom: 4px;
  }

  /* Release Preview Box Specific Styles */
  .release-preview-box {
    background: var(--card) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--line) !important;
    display: flex;
    flex-direction: column;
  }

  .release-preview-box .preview-head {
    background: var(--soft);
    padding: 16px 20px;
    font-weight: 700;
    font-size: 15px;
    color: var(--blue-dark);
  }

  .release-preview-box .preview-body {
    flex: 1;
    display: block !important;
    text-align: left !important;
    padding: 20px !important;
    overflow-y: auto;
    color: var(--text) !important;
    min-height: unset !important;
  }

  .release-preview-box .preview-body.empty-state {
    display: flex !important;
    flex-direction: column;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    color: var(--muted) !important;
    min-height: 330px !important;
  }

  /* Info grid for release details */
  .release-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
  }

  .release-info-card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .release-info-card .icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: var(--card);
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border: 1px solid var(--line);
  }

  .release-info-card.force-update-yes .icon-wrapper {
    color: var(--red);
    background: #fdf2f2;
    border-color: #fca5a5;
  }

  .release-info-card.force-update-no .icon-wrapper {
    color: var(--green);
    background: #f0fdf4;
    border-color: #bbf7d0;
  }

  .release-info-card .card-content {
    display: flex;
    flex-direction: column;
  }

  .release-info-card .card-label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    font-weight: 700;
  }

  .release-info-card .card-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
  }

  /* SHA256 and Download Action Row */
  .release-action-panel {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
  }

  .release-sha-container {
    flex: 1;
    min-width: 240px;
  }

  .release-sha-title {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 4px;
    font-weight: 700;
  }

  .release-sha-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card);
    border: 1px solid var(--line);
    padding: 8px 12px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 12px;
    color: var(--text);
    word-break: break-all;
  }

  .release-sha-box i {
    color: var(--muted);
    cursor: pointer;
    transition: color 0.2s;
  }

  .release-sha-box i:hover {
    color: var(--blue);
  }

  .release-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    background: var(--blue);
    color: #fff !important;
    font-weight: 800;
    font-size: 13px;
    padding: 12px 20px;
    border-radius: 6px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(79, 112, 188, 0.2);
  }

  .release-download-btn:hover {
    background: var(--blue-dark);
    box-shadow: 0 6px 16px rgba(79, 112, 188, 0.3);
    transform: translateY(-1px);
  }

  /* Changelog styling in preview */
  .changelog-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--blue-dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 8px;
  }

  .release-preview-box .markdown-preview-style {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: var(--card);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.02);
  }

  /* Delete card inside release info grid */
  .release-info-card.delete-card {
    border-color: #fca5a5;
    background: #fdf2f2;
    cursor: pointer;
    transition: all 0.2s;
  }

  .release-info-card.delete-card .icon-wrapper {
    color: var(--red);
    background: var(--card);
    border-color: #fca5a5;
    transition: all 0.2s;
  }

  .release-info-card.delete-card:hover {
    background: var(--red);
    border-color: var(--red);
  }

  .release-info-card.delete-card:hover .card-label {
    color: rgba(255,255,255,0.8);
  }

  .release-info-card.delete-card:hover .card-value {
    color: #fff;
  }

  .release-info-card.delete-card:hover .icon-wrapper {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border-color: transparent;
  }

  /* EasyMDE toolbar button overrides */
  .EasyMDEContainer .editor-toolbar button,
  .EasyMDEContainer .editor-toolbar a {
    background: transparent !important;
    color: var(--text) !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    min-height: 0 !important;
    height: 30px !important;
    width: 30px !important;
    padding: 0 !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .EasyMDEContainer .editor-toolbar button:hover,
  .EasyMDEContainer .editor-toolbar a:hover {
    background: var(--soft) !important;
    color: var(--blue-dark) !important;
    border-color: var(--line) !important;
  }

  .EasyMDEContainer .editor-toolbar button.active,
  .EasyMDEContainer .editor-toolbar a.active {
    background: var(--blue) !important;
    color: #fff !important;
  }

  .EasyMDEContainer .editor-toolbar button i,
  .EasyMDEContainer .editor-toolbar a i {
    color: inherit !important;
    font-size: 14px !important;
  }

  /* Details component styling for Online Course chapter sections */
  details {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(17, 32, 74, 0.03);
    transition: all 0.2s ease;
  }
  
  details summary {
    font-weight: 700;
    cursor: pointer;
    color: var(--navy) !important;
    font-size: 15px;
    outline: none;
    position: relative;
    padding-left: 20px;
  }

  details summary::before {
    content: "â–¶";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: var(--muted);
    transition: transform 0.2s;
  }

  details[open] summary::before {
    transform: translateY(-50%) rotate(90deg);
  }

  details[open] {
    box-shadow: 0 10px 30px rgba(17, 32, 74, 0.05);
  }
.question-image-toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 8px;
  font-size: 12px;
}

.question-image-toggle-row input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.question-image-panel {
  border: 1px dashed var(--pico-border-color);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
  background: #fff;
}

.question-image-panel[hidden] {
  display: none !important;
}

.question-image-input-row {
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1fr;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 10px;
}

.question-image-input-row {
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1fr;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 10px;
}

.question-image-input-row {
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1fr;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 10px;
}

.question-image-file-input {
  margin: 0;
}

.question-image-dropzone {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px dashed #94a3b8;
  border-radius: 6px;
  background: #f8fafc;
  color: var(--vote-muted);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.question-image-dropzone.dragover,
.question-image-dropzone:focus {
  border-color: var(--pico-primary);
  background: #eef6ff;
  color: var(--pico-primary);
  outline: none;
}

.question-image-dropzone-title {
  font-size: 12px;
  font-weight: 600;
  color: inherit;
}

.question-image-dropzone-subtitle {
  font-size: 11px;
  color: inherit;
}

.question-image-dropzone {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px dashed #94a3b8;
  border-radius: 6px;
  background: #f8fafc;
  color: var(--vote-muted);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.question-image-dropzone.dragover,
.question-image-dropzone:focus {
  border-color: var(--pico-primary);
  background: #eef6ff;
  color: var(--pico-primary);
  outline: none;
}

.question-image-dropzone-title {
  font-size: 12px;
  font-weight: 600;
  color: inherit;
}

.question-image-dropzone-subtitle {
  font-size: 11px;
  color: inherit;
}

.question-image-dropzone {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px dashed #94a3b8;
  border-radius: 6px;
  background: #f8fafc;
  color: var(--vote-muted);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.question-image-dropzone.dragover,
.question-image-dropzone:focus {
  border-color: var(--pico-primary);
  background: #eef6ff;
  color: var(--pico-primary);
  outline: none;
}

.question-image-dropzone-title {
  font-size: 12px;
  font-weight: 600;
  color: inherit;
}

.question-image-dropzone-subtitle {
  font-size: 11px;
  color: inherit;
}

.question-image-note {
  display: block;
  font-size: 11px;
  color: var(--vote-muted);
  margin-top: 6px;
}

.question-image-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.question-image-preview img {
  max-width: 100%;
  max-height: 220px;
  border-radius: 6px;
  border: 1px solid var(--pico-border-color);
  object-fit: contain;
  background: #f8fafc;
}

.question-image-filename {
  font-size: 11px;
  color: var(--vote-muted);
  word-break: break-word;
}

@media (max-width: 640px) {
  .question-image-input-row {
    grid-template-columns: 1fr;
  }
}

/* Custom styles for published/draft materials */
mark.published {
  background-color: var(--green) !important;
  color: #fff !important;
}

mark.draft {
  background-color: var(--blue) !important;
  color: #fff !important;
}


