/* The marked sheet. Loaded by the teacher's panel and by the student's
   writing page, so both render it identically. */

  /* ---- the marking sheet, marked the way it is marked on paper ---- */
  .pen { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 210px;
         gap: 0 34px; align-items: start; }
  .pen-col { min-width: 0; }
  .pen-para { margin-bottom: 20px; }
  .pen-role { font-size: 10.5px; font-weight: 700; letter-spacing: 1.2px;
              text-transform: uppercase; color: #0F766E; margin-bottom: 6px; }
  .pen-text { font-family: "Source Serif 4", Georgia, serif; font-size: 16.5px;
              line-height: 2.4; color: #16233A; margin: 0; }

  .pen-badge { display: inline-grid; place-items: center; min-width: 20px; height: 16px;
               padding: 0 4px; margin-inline-end: 6px; border-radius: 4px;
               background: #0F766E; color: #fff; font-family: "IBM Plex Sans", sans-serif;
               font-size: 9.5px; font-weight: 700; letter-spacing: .4px;
               vertical-align: 2px; user-select: none; }
  .pen-badge.dirty { background: #B42318; }

  /* a correction: the wrong words only, never the sentence around them */
  .pen .pen-mark { background: none; border-radius: 0; padding: 0; }
  .pen .pen-mark .mk-err { text-decoration: underline wavy #D9544A 1.5px;
                           text-underline-offset: 5px; background: #FEF3F2; }
  .pen .pen-mark .mk-fix { font-family: "Caveat", cursive; font-size: 1.1em;
                           color: #B42318; margin-inline-start: 5px; font-weight: 600; }

  /* the margin */
  .pen-margin { position: relative; min-height: 1px; }
  .pen-note { position: absolute; inset-inline: 0 auto; width: 210px;
              font-family: "Caveat", cursive; font-size: 17px; line-height: 1.4;
              color: #B42318; padding-inline-start: 4px; }
  .pen-note.good { color: #0F766E; }
  .pen-note i { display: block; font-style: normal; font-size: 15.5px; opacity: .8; }
  .pen-note::before { content: "✗"; margin-inline-end: 5px; font-weight: 700; }
  .pen-note.good::before { content: "✓"; }

  .pen-lines { position: absolute; inset: 0; width: 100%; height: 100%;
               pointer-events: none; overflow: visible; z-index: 0; }
  .pen-col, .pen-margin { position: relative; z-index: 1; }
  .pen-line { stroke: #D9544A; stroke-width: 1.1; opacity: .55; }
  .pen-line.good { stroke: #0F766E; }

  .pen-stats { margin-top: 18px; padding-top: 10px; border-top: 1px solid #E2E9F3;
               font-size: 12.5px; color: #5C6B82; display: flex; flex-wrap: wrap;
               gap: 4px 18px; align-items: baseline; }
  .pen-stats > * { white-space: nowrap; }
  .pen-stats b { color: #16233A; }

  .pen-notice { margin-top: 18px; border-inline-start: 3px solid #0F766E;
                background: #F0FBF9; padding: 13px 16px; border-radius: 0 10px 10px 0; }
  .pen-notice h4 { margin: 0 0 5px; font-size: 11px; font-weight: 700; letter-spacing: 1px;
                   text-transform: uppercase; color: #0F766E; }
  .pen-notice p { margin: 0; font-size: 14.5px; line-height: 1.85; color: #30405C; }

  /* narrow screens: the margin drops under each paragraph instead */
  @media (max-width: 620px) {
    .pen { grid-template-columns: 1fr; }
    .pen-margin { position: static; margin-top: 10px; }
    .pen-note { position: static !important; width: auto; margin-bottom: 8px; }
    .pen-lines { display: none; }
  }

  /* ideas and coherence in the marking report */
  .mk-dev-tag { display:inline-block; font-size:11px; font-weight:700; letter-spacing:.3px;
    text-transform:uppercase; color:#8a6400; background:#FFFBEB; border:1px solid #F3E2B4;
    border-radius:999px; padding:2px 9px; margin-bottom:5px; }
  .mk-dev-quote { font-size:14.5px; color:#16233A; line-height:1.7; font-style:italic; }
  .mk-coh { margin:0; padding-inline-start:20px; }
  .mk-coh li { font-size:14px; line-height:1.9; color:#30405C; }

  /* the four criteria, and the headline on whether the question was answered */
  .mk-answered { font-weight:700; font-size:14px; border-radius:10px; padding:9px 13px;
    margin-bottom:14px; border:1px solid; }
  .mk-answered.ok   { color:#12805c; background:#ECFDF5; border-color:#A7E8CE; }
  .mk-answered.warn { color:#8a6400; background:#FFFBEB; border-color:#F3E2B4; }
  .mk-answered.bad  { color:#B42318; background:#FEF3F2; border-color:#F5C9C4; }
  .mk-answered.none { color:#5C6B82; background:#F0F4FA; border-color:#E2E9F3; font-weight:600; }
  .mk-crit { border-top:1px solid #E2E9F3; padding:12px 0; }
  .mk-crit:first-of-type { border-top:0; padding-top:0; }
  .mk-crit-head { display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
  .mk-crit-head b { color:#16233A; font-size:15px; }
  .mk-crit-band { font-size:13px; font-weight:700; color:#0C2D57; background:#F0F4FA;
    border-radius:999px; padding:2px 10px; white-space:nowrap; }

  /* a word that should simply come out */
  .mk-sheet span[class^="mk-"] .mk-err { }
  .mk-g .mk-fix, .mk-p .mk-fix, .mk-s .mk-fix, .mk-w .mk-fix { white-space: nowrap; }

  /* ---- the marking sheet, marked the way it is marked on paper ---- */
  .pen { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 210px;
         gap: 0 34px; align-items: start; }
  .pen-col { min-width: 0; }
  .pen-para { margin-bottom: 20px; }
  .pen-role { font-size: 10.5px; font-weight: 700; letter-spacing: 1.2px;
              text-transform: uppercase; color: #0F766E; margin-bottom: 6px; }
  .pen-text { font-family: "Source Serif 4", Georgia, serif; font-size: 16.5px;
              line-height: 2.4; color: #16233A; margin: 0; }

  .pen-badge { display: inline-grid; place-items: center; min-width: 20px; height: 16px;
               padding: 0 4px; margin-inline-end: 6px; border-radius: 4px;
               background: #0F766E; color: #fff; font-family: "IBM Plex Sans", sans-serif;
               font-size: 9.5px; font-weight: 700; letter-spacing: .4px;
               vertical-align: 2px; user-select: none; }
  .pen-badge.dirty { background: #B42318; }

  /* a correction: the wrong words only, never the sentence around them */
  .pen .pen-mark { background: none; border-radius: 0; padding: 0; }
  .pen .pen-mark .mk-err { text-decoration: underline wavy #D9544A 1.5px;
                           text-underline-offset: 5px; background: #FEF3F2; }
  .pen .pen-mark .mk-fix { font-family: "Caveat", cursive; font-size: 1.1em;
                           color: #B42318; margin-inline-start: 5px; font-weight: 600; }

  /* the margin */
  .pen-margin { position: relative; min-height: 1px; }
  .pen-note { position: absolute; inset-inline: 0 auto; width: 210px;
              font-family: "Caveat", cursive; font-size: 17px; line-height: 1.4;
              color: #B42318; padding-inline-start: 4px; }
  .pen-note.good { color: #0F766E; }
  .pen-note i { display: block; font-style: normal; font-size: 15.5px; opacity: .8; }
  .pen-note::before { content: "✗"; margin-inline-end: 5px; font-weight: 700; }
  .pen-note.good::before { content: "✓"; }

  .pen-lines { position: absolute; inset: 0; width: 100%; height: 100%;
               pointer-events: none; overflow: visible; z-index: 0; }
  .pen-col, .pen-margin { position: relative; z-index: 1; }
  .pen-line { stroke: #D9544A; stroke-width: 1.1; opacity: .55; }
  .pen-line.good { stroke: #0F766E; }

  .pen-stats { margin-top: 18px; padding-top: 10px; border-top: 1px solid #E2E9F3;
               font-size: 12.5px; color: #5C6B82; display: flex; flex-wrap: wrap;
               gap: 4px 18px; align-items: baseline; }
  .pen-stats > * { white-space: nowrap; }
  .pen-stats b { color: #16233A; }

  .pen-notice { margin-top: 18px; border-inline-start: 3px solid #0F766E;
                background: #F0FBF9; padding: 13px 16px; border-radius: 0 10px 10px 0; }
  .pen-notice h4 { margin: 0 0 5px; font-size: 11px; font-weight: 700; letter-spacing: 1px;
                   text-transform: uppercase; color: #0F766E; }
  .pen-notice p { margin: 0; font-size: 14.5px; line-height: 1.85; color: #30405C; }

  /* narrow screens: the margin drops under each paragraph instead */
  @media (max-width: 620px) {
    .pen { grid-template-columns: 1fr; }
    .pen-margin { position: static; margin-top: 10px; }
    .pen-note { position: static !important; width: auto; margin-bottom: 8px; }
    .pen-lines { display: none; }
  }

  /* the four criteria, and the headline on whether the question was answered */
  .mk-answered { font-weight:700; font-size:14px; border-radius:10px; padding:9px 13px;
    margin-bottom:14px; border:1px solid; }
  .mk-answered.ok   { color:#12805c; background:#ECFDF5; border-color:#A7E8CE; }
  .mk-answered.warn { color:#8a6400; background:#FFFBEB; border-color:#F3E2B4; }
  .mk-answered.bad  { color:#B42318; background:#FEF3F2; border-color:#F5C9C4; }
  .mk-answered.none { color:#5C6B82; background:#F0F4FA; border-color:#E2E9F3; font-weight:600; }
  .mk-crit { border-top:1px solid #E2E9F3; padding:12px 0; }
  .mk-crit:first-of-type { border-top:0; padding-top:0; }
  .mk-crit-head { display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
  .mk-crit-head b { color:#16233A; font-size:15px; }
  .mk-crit-band { font-size:13px; font-weight:700; color:#0C2D57; background:#F0F4FA;
    border-radius:999px; padding:2px 10px; white-space:nowrap; }

  /* a word that should simply come out */
  .mk-sheet span[class^="mk-"] .mk-err { }
  .mk-g .mk-fix, .mk-p .mk-fix, .mk-s .mk-fix, .mk-w .mk-fix { white-space: nowrap; }

  /* ---- the marking sheet, marked the way it is marked on paper ---- */
  .pen { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 210px;
         gap: 0 34px; align-items: start; }
  .pen-col { min-width: 0; }
  .pen-para { margin-bottom: 20px; }
  .pen-role { font-size: 10.5px; font-weight: 700; letter-spacing: 1.2px;
              text-transform: uppercase; color: #0F766E; margin-bottom: 6px; }
  .pen-text { font-family: "Source Serif 4", Georgia, serif; font-size: 16.5px;
              line-height: 2.4; color: #16233A; margin: 0; }

  .pen-badge { display: inline-grid; place-items: center; min-width: 20px; height: 16px;
               padding: 0 4px; margin-inline-end: 6px; border-radius: 4px;
               background: #0F766E; color: #fff; font-family: "IBM Plex Sans", sans-serif;
               font-size: 9.5px; font-weight: 700; letter-spacing: .4px;
               vertical-align: 2px; user-select: none; }
  .pen-badge.dirty { background: #B42318; }

  /* a correction: the wrong words only, never the sentence around them */
  .pen .pen-mark { background: none; border-radius: 0; padding: 0; }
  .pen .pen-mark .mk-err { text-decoration: underline wavy #D9544A 1.5px;
                           text-underline-offset: 5px; background: #FEF3F2; }
  .pen .pen-mark .mk-fix { font-family: "Caveat", cursive; font-size: 1.1em;
                           color: #B42318; margin-inline-start: 5px; font-weight: 600; }

  /* the margin */
  .pen-margin { position: relative; min-height: 1px; }
  .pen-note { position: absolute; inset-inline: 0 auto; width: 210px;
              font-family: "Caveat", cursive; font-size: 17px; line-height: 1.4;
              color: #B42318; padding-inline-start: 4px; }
  .pen-note.good { color: #0F766E; }
  .pen-note i { display: block; font-style: normal; font-size: 15.5px; opacity: .8; }
  .pen-note::before { content: "✗"; margin-inline-end: 5px; font-weight: 700; }
  .pen-note.good::before { content: "✓"; }

  .pen-lines { position: absolute; inset: 0; width: 100%; height: 100%;
               pointer-events: none; overflow: visible; z-index: 0; }
  .pen-col, .pen-margin { position: relative; z-index: 1; }
  .pen-line { stroke: #D9544A; stroke-width: 1.1; opacity: .55; }
  .pen-line.good { stroke: #0F766E; }

  .pen-stats { margin-top: 18px; padding-top: 10px; border-top: 1px solid #E2E9F3;
               font-size: 12.5px; color: #5C6B82; display: flex; flex-wrap: wrap;
               gap: 4px 18px; align-items: baseline; }
  .pen-stats > * { white-space: nowrap; }
  .pen-stats b { color: #16233A; }

  .pen-notice { margin-top: 18px; border-inline-start: 3px solid #0F766E;
                background: #F0FBF9; padding: 13px 16px; border-radius: 0 10px 10px 0; }
  .pen-notice h4 { margin: 0 0 5px; font-size: 11px; font-weight: 700; letter-spacing: 1px;
                   text-transform: uppercase; color: #0F766E; }
  .pen-notice p { margin: 0; font-size: 14.5px; line-height: 1.85; color: #30405C; }

  /* narrow screens: the margin drops under each paragraph instead */
  @media (max-width: 620px) {
    .pen { grid-template-columns: 1fr; }
    .pen-margin { position: static; margin-top: 10px; }
    .pen-note { position: static !important; width: auto; margin-bottom: 8px; }
    .pen-lines { display: none; }
  }
