/* SERVED MARKER.CSS (ASSETS) */

:root{
  --maroon:#A90D22;
  --bg:#f5f6f8;
  --card:#ffffff;
  --border:rgba(0,0,0,.08);
  --text:#111;
  --muted:rgba(0,0,0,.6);
  --shadow: 0 14px 45px rgba(0,0,0,.08);
  --radius:16px;
  /* Typography scale (responsive + accessible) */
  --fs-body: clamp(18px, 1.05rem + 0.25vw, 20px);
  --fs-sm:   clamp(16px, 0.95rem + 0.18vw, 18px);
  --fs-xs:   clamp(15px, 0.90rem + 0.12vw, 17px);

  --fs-h1:   clamp(32px, 1.6rem + 1.8vw, 48px);
  --fs-h2:   clamp(24px, 1.25rem + 1.1vw, 34px);
  --fs-h3:   clamp(20px, 1.05rem + 0.7vw, 26px);
  --fs-btn:  clamp(16px, 0.98rem + 0.18vw, 18px);
  --fs-nav:  clamp(14px, 0.88rem + 0.12vw, 16px);

  --lh-body: 1.55;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea {
  font: inherit;
}
.dz-icon{
  width: 40px;   /* adjust to the exact Figma W/H if it’s different */
  height: 40px;
}

/* Top bar */
.topbar{
  background: var(--maroon);
  color:#fff;
  height:64px;
  display:flex;
  align-items:center;
  padding:0 18px;
  gap:18px;
  box-shadow: none; /* remove the thick faux-border */
  border-bottom: 1px solid rgba(0,0,0,.08); /* single clean stroke */
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar .brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width: 150px;
}
.topbar .brand img{
  height:28px;
  width:auto;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.18));
}
.topbar nav{
  display:flex;
  gap:14px;
  align-items:center;
  flex:1;
}
.topbar a{
  color: rgba(255,255,255,.85);
  text-decoration:none;
  font-weight:600;
  font-size:var(--fs-nav);
  padding:10px 12px;
  border-radius:10px;
}
.topbar a.active{
  background: rgba(255,255,255,.12);
  color:#fff;
}
.topbar .actions{
  display:flex;
  align-items:center;
  gap:12px;
}
.iconbtn{
  width:36px;
  height:36px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.10);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-weight:900;
  font-size:18px;
  line-height:1;
}
.topbar-btn{
  height:36px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.10);
  color:#fff;
  font-weight:700;
  font-size:var(--fs-nav);
  cursor:pointer;
}
.topbar-btn .topbar-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:20px;
  height:20px;
  margin-right:6px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.55);
  font-size:12px;
  font-weight:700;
  line-height:1;
}
.topbar-btn:hover{ 
  background: rgba(255,255,255,.16); 
}
.topbar-btn:active{ 
  transform: translateY(0.5px); 
}
/* Topbar button: current page indicator (outlined pill, slightly brighter) */
.topbar-btn.is-current{
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.45);
  cursor: default;
}
.avatar{
  width:34px;
  height:34px;
  border-radius:999px;
  border:2px solid rgba(255,255,255,.35);
  object-fit:cover;
}

/* Page layout */
.page{
  max-width: 1600px;
  margin: 22px auto;
  padding: 0 18px 40px;
}

.marker-grid{
  display:grid;
  grid-template-columns: 379px 1fr;
  grid-template-areas:
    "form  upload"
    "form  rules";
  gap: 18px;
  align-items:start;
}
/* Student page: 3-column layout — form | upload | chart */
.student-page .marker-grid{
  grid-template-columns: 320px auto 1fr;
  grid-template-areas:
    "form  upload  rules";
  align-items: stretch;
}

.form-card{ grid-area: form; }
.upload-card{ grid-area: upload; }
.rules-card{ grid-area: rules; }
/* Upload card fills remaining width before results appear */
.student-page .upload-card{
  grid-column: 2 / -1;
}
/* When collapsed after marking, shrink to column 2 so rules-card uses column 3 */
.student-page .upload-card.upload-card--collapsed{
  grid-column: 2 / span 1;
}
.student-page .form-card{
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-height: 0;
}
/* Student page: rules-card flexes to content instead of fixed min-height */
.student-page .rules-card{
  min-height: 0;
  align-self: stretch;
}
.student-page .form-card #checkBtn{
  margin-top: auto;
}
/* Cards */
.card{
  background: #FAFAFB;                 /* Figma */
  border: 0 solid #000;                /* Figma says border 0 */
  border-radius: 12px;                 /* Figma */
  box-shadow: 0 2px 4px 0 rgba(0,0,0,.08); /* Figma */
}
.student-page .marked-preview-card{
  padding: 18px;
}


/* Left form card */
.form-card{
  grid-area: form;
  padding: 18px;
}
.form-card h2{
  margin: 0 0 12px;
  font-size: var(--fs-h3);
}
/* Student page: unify card headings */
.student-page .card h2{
  font-size: var(--fs-h3);
  font-weight: 700;
}

/* Student stats panel */
.student-stats-panel{
  margin-top: 12px;
  padding: 14px 14px 12px;
  background: #FAFAFB;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,.08);
  border: 1px solid rgba(0,0,0,.08);
}
.student-stats-title{
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(0,0,0,.55);
  margin-bottom: 10px;
}
.student-stats-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}
.student-stat{
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
  padding: 10px 10px 8px;
  min-height: 58px;
}
.student-stat-label{
  font-size: var(--fs-xs);
  font-weight: 700;
  color: rgba(0,0,0,.55);
  margin-bottom: 4px;
}
.student-stat-value{
  font-size: var(--fs-h3);
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}
.student-stat-text{
  font-size: var(--fs-sm);
  font-weight: 700;
  color: rgba(0,0,0,.80);
  line-height: 1.25;
  text-align: right;
}
.student-stat-row{
  margin-top: 10px;
  padding: 10px 10px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.student-stat-row .student-stat-label{
  margin: 0;
  flex: 0 0 auto;
}
#topIssueStat{
  font-size: var(--fs-sm);
  font-weight: 700;
  color: rgba(0,0,0,.80);
  text-align: right;
  line-height: 1.25;
  max-width: 68%;
  overflow-wrap: anywhere;
}
.student-techniques{
  margin-top: 10px;
  padding: 10px 10px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
}
.student-techniques-list{
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--fs-sm);
  color: rgba(0,0,0,.78);
  font-weight: 600;
}
.student-metrics-grid{
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

/* Preview: horizontal metric strip above the document */
.preview-metrics-wrap{
  margin: 10px 0 12px;
}

/* Override the default 1-col metrics grid when it's in the preview */
.student-page .metrics-inline{
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

/* Slightly tighter metric cards for horizontal layout (optional but nice) */
.student-page .metrics-inline .metric-card{
  padding: 10px 10px 9px; /* keep existing feel */
}
.metric-card{
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
  padding: 10px 10px 9px;
}
.metric-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.metric-title{
  font-size: var(--fs-sm);
  font-weight: 800;
  color: rgba(0,0,0,.75);
  display:flex;
  align-items:center;
  gap: 8px;
}
.metric-info{
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.18);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  font-size: var(--fs-xs);
  color: rgba(0,0,0,.55);
}
.metric-info-btn{
  cursor: pointer;
  background: #fff;
  padding: 0;
}
.metric-info-btn:focus{
  outline: 2px solid rgba(169,13,34,.30);
  outline-offset: 2px;
}
.metric-score{
  font-size: var(--fs-sm);
  font-weight: 900;
  color: rgba(0,0,0,.75);
}
@keyframes metricFillUp {
  from {
    width: 0%;
  }
}

.metric-meter{
  height: 12px;
  border-radius: 999px;
  background:
    inset 0 2px 3px rgba(0,0,0,.12),
    inset 0 -1px 1px rgba(255,255,255,.5);
  background-color: rgba(0,0,0,.07);
  overflow: hidden;
  box-shadow:
    inset 0 2px 3px rgba(0,0,0,.12),
    inset 0 -1px 1px rgba(255,255,255,.5);
}
.metric-meter-fill{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.3) 0%, transparent 50%, rgba(0,0,0,.1) 100%),
    linear-gradient(90deg, #d9534f, #f0ad4e, #5cb85c);
  border: 1px solid rgba(0,0,0,.2);
  box-sizing: border-box;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.35),
    0 1px 2px rgba(0,0,0,.15);
}
.metric-meter-fill.animate{
  animation: metricFillUp 1200ms cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}
.metric-meter-fill.perfect{
  background:
    linear-gradient(180deg, rgba(255,255,255,.35) 0%, transparent 50%, rgba(0,0,0,.08) 100%),
    linear-gradient(90deg, #00E676, #00C853) !important;
  border-color: rgba(0,180,80,.3);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.4),
    0 0 0 3px rgba(0,230,118,.2),
    0 0 12px rgba(0,230,118,.35);
}
.metric-score.perfect{
  color: #00B35A;
}
.metric-sub{
  margin-top: 6px;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: rgba(0,0,0,.55);
  line-height: 1.25;
}
label{ display:block; font-size:var(--fs-xs); font-weight:600; margin-top:12px; }
.label-row{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.label-row .type-info{
  margin-left: 0; /* override the default left-margin when used in label-row */
}
input[type="text"], input[type="email"], select{
  width:100%;
  height:40px;
  padding: 0 12px;
  border:1px solid rgba(0,0,0,.14);
  border-radius:10px;
  background:#fff;
  outline:none;
}
input:focus, select:focus{
  border-color: var(--maroon);
  box-shadow: 0 0 0 3px rgba(169,13,34,.15);
}

.primary-btn{
  margin-top: 16px;
  width:100%;
  height:44px;
  border:0;
  border-radius:12px;
  background:
    radial-gradient(
      ellipse 70% 55% at 35% 18%,
      rgba(255,255,255,.45) 0%,
      rgba(255,255,255,.12) 50%,
      transparent 100%
    ),
    linear-gradient(
      to bottom,
      rgba(255,255,255,.12) 0%,
      transparent 40%,
      rgba(0,0,0,.12) 100%
    ),
    linear-gradient(to bottom, #c4162e, #8a0b1c);
  color:#fff;
  font-family: var(--font-body);
  font-size: var(--fs-btn);
  font-weight:700;
  letter-spacing: 0.01em;
  cursor:pointer;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.40),
    inset 0 -1px 0 rgba(255,255,255,.06),
    0 2px 6px rgba(120,8,24,.4),
    0 1px 2px rgba(0,0,0,.12);
  text-shadow: 0 1px 1px rgba(0,0,0,.25);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.primary-btn:hover{
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.50),
    inset 0 -1px 0 rgba(255,255,255,.08),
    0 4px 14px rgba(120,8,24,.45),
    0 1px 3px rgba(0,0,0,.15);
  transform: translateY(-0.5px);
}
.primary-btn:active{
  background:
    radial-gradient(
      ellipse 60% 45% at 35% 22%,
      rgba(255,255,255,.15) 0%,
      transparent 100%
    ),
    linear-gradient(
      to bottom,
      rgba(0,0,0,.05) 0%,
      rgba(0,0,0,.18) 100%
    ),
    linear-gradient(to bottom, #a00d20, #8a0b1c);
  box-shadow:
    inset 0 2px 4px rgba(0,0,0,.30),
    inset 0 0 2px rgba(0,0,0,.10),
    0 1px 2px rgba(120,8,24,.3);
  transform: translateY(0.5px);
}

.secondary-btn{
  margin-top: 12px;
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.14);
  background: #fff;
  color: rgba(0,0,0,.75);
  font-weight: 700;
  cursor: pointer;
}
.secondary-btn:hover{ filter:brightness(.98); }
.secondary-btn:disabled{
  opacity: .6;
  cursor: not-allowed;
}
.primary-btn:disabled{
  opacity: .6;
  cursor: not-allowed;
}


/* Upload card */
.upload-card{
  padding: 16px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
}

.drop-zone{
  flex: 1;                 /* fill the upload-card */
  width: 100%;             /* instead of width: min(928px, 100%) */
  min-height: 220px;       /* keeps it tall */
  height: auto;            /* instead of fixed 192px */

  padding: 40px 16px;      /* instead of the huge Figma paddings */
  display:flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;

  border-radius: 12px;
  border: 2px solid #DEE1E6;
  background: transparent;

  cursor: pointer;
  user-select: none;
  margin-top: 6px;

  transition: min-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              gap 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}


.drop-zone.dragover{
  border-color: var(--maroon);
  background: rgba(169,13,34,.05);
}
.dz-icon{
  width:40px; height:40px;
  opacity:.8;
}

.rules-card{
  grid-area: rules;
  width: 100%;
  min-height: 474px;                 /* keep flexible; Figma says 474 */
  padding: 16px;
  background: #FAFAFB;               /* Figma */
  border-radius: 12px;               /* Figma */
  border: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,.08); /* Figma */
}

.rules-cols{
  display:grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 40px;   /* Figma */
  row-gap: 0;
}


.rules-title.spaced{ margin-top: 14px; }

.rules-title{
  color: #171A1F;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: var(--fs-h3);     /* Figma */
  font-weight: 500;    /* Figma */
  line-height: 24px;   /* Figma */
  margin: 0 0 8px;
}

.mci-scroll-viewport{
  height: 300px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-gutter: stable both-edges;
  border-radius: 8px;
}

.mci-scroll-inner{
  height: 100%;
  min-width: 100%;
  padding-bottom: 10px;
}

#mostCommonIssuesWrap{
  overflow: hidden;
}

.mci-scroll-viewport::-webkit-scrollbar{ height: 10px; }
.mci-scroll-viewport::-webkit-scrollbar-thumb{ background: rgba(0,0,0,.22); border-radius: 999px; }
.mci-scroll-viewport::-webkit-scrollbar-track{ background: rgba(0,0,0,.06); border-radius: 999px; }

/* ── MCI detail fade transitions ── */
.mci-detail {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.mci-detail--entering {
  opacity: 0;
  transform: translateY(10px);
  transition: none;
}
.mci-detail--visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s cubic-bezier(0, 0, 0.2, 1),
              transform 0.4s cubic-bezier(0, 0, 0.2, 1);
}
.mci-detail--exiting {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 1, 1),
              transform 0.3s cubic-bezier(0.4, 0, 1, 1);
}

/* ---------- Teacher page typography harmonization ---------- */
.teacher-page .rules-title{
  font-size: var(--fs-sm);
  font-weight: 800;
  color: rgba(0,0,0,.75);
  letter-spacing: .02em;
  margin: 0 0 10px;
}

.teacher-page .rule-row{
  align-items: center;
}

.teacher-page .rule-text{
  font-size: var(--fs-sm);
  font-weight: 650;
  color: rgba(0,0,0,.78);
  line-height: 1.25;
}

.teacher-page .rule-row > .info{
  font-size: var(--fs-xs);
  font-weight: 800;
}

/* ---------- Work fieldsets (Work 1/2/3) ---------- */
.teacher-page .work-fieldset{
  border: 1px solid rgba(0,0,0,.14);
  border-radius: 12px;
  padding: 12px 12px 10px;
  margin-top: 12px;
  background: #fff;
}

.teacher-page .work-fieldset legend{
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(0,0,0,.55);
  padding: 0 8px;
}

.teacher-page .add-work-btn{
  margin-top: 12px;
}

/* ---------- Assignment Builder (header outside box) ---------- */
.teacher-page .assignment-builder-header{
  margin-top: 12px;
}

.teacher-page .assignment-builder-sub{
  margin-top: 4px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: rgba(0,0,0,.62);
}

.teacher-page .assignment-builder-box{
  margin-top: 8px;
  padding: 14px;
  background: #f8f9fa;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 12px;
}

.teacher-page .assignment-builder-label{
  font-size: var(--fs-xs);
  font-weight: 700;
  color: rgba(0,0,0,.60);
  margin: 0 0 6px;
}

.teacher-page .assignment-builder-input{
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(0,0,0,.14);
  border-radius: 10px;
  background: #fff;
}

.teacher-page .assignment-builder-toggle-row{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.teacher-page .assignment-builder-toggle-row label{
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: rgba(0,0,0,.62);
}

.teacher-page .assignment-builder-toggle-row input[type="checkbox"]{
  width: 18px;
  height: 18px;
  accent-color: var(--maroon);
}

.teacher-page .hidden{ display:none !important; }


/* Switch look for rule checkboxes (scoped) */
.rules-card input[type="checkbox"]{
  appearance: none;
  width: 44px;               /* Figma */
  height: 24px;              /* Figma */
  border-radius: 12px;
  background: #BCC1CA;       /* Figma off */
  position: relative;
  cursor: pointer;
  outline: none;
}

.rules-card input[type="checkbox"]::before{
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;               /* ~circle diameter in Figma svg */
  height: 20px;
  border-radius: 999px;
  background: #fff;
  transition: transform .15s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}

.rules-card input[type="checkbox"]:checked{
  background: #A90D22;       /* your maroon */
}

.rules-card input[type="checkbox"]:checked::before{
  transform: translateX(20px); /* 44 - 20 - 4 = 20 */
}


/* Rule row */

/* Figma row geometry:
   - Row height: 24
   - Left gap to toggle: 4
   - Switch → i: 10
   - i → label: 4
   - i size: 16 (toggle/label line-height 24)
*/
.rule-row{
  display:flex;
  align-items:flex-start;
  min-height:24px;
  padding-left:4px;     /* left gap to toggle */
  margin: 10px 0;       /* keep your vertical spacing; adjust later if needed */
}

/* switch is already styled elsewhere; this just locks its slot */
.rule-row > input[type="checkbox"],
.rule-row > .info{
  margin-top: 2px; /* nudge to match 24px text line */
}


/* the i column */
.rule-row > .info{
  flex: 0 0 16px;
  width:16px;
  height:16px;
  line-height:16px;
  text-align:center;
  cursor: help;

  /* IMPORTANT: do NOT use opacity here or the tooltip turns gray */
  opacity: 1;
  color: rgba(0,0,0,.55);  /* fades just the "i" */
  
  margin-left:10px;
  margin-right:4px;
}






@media (max-width: 980px){
  .marker-grid{
    grid-template-columns: 1fr;
    grid-template-areas:
      "form"
      "upload"
      "rules";
  }

  .rules-cols{
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .drop-zone{
    padding: 40px 16px;
    height: auto;
    min-height: 192px;
  }
}
.hidden-select { 
  display: none; 
}

.hidden {
  display: none !important;
}

/* Shared file list (used by index.html + student.html) */
.file-list{
  list-style:none;
  padding:0;
  margin:12px 0;
}
.file-list li{
  padding:8px 12px;
  background:#f8f9fa;
  border-radius:6px;
  margin-bottom:6px;
  font-size:var(--fs-sm);
}

/* Student status block */
.status-area{
  margin-top: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  min-height: 40px;
  font-size: var(--fs-sm);
  color: var(--text);
}
.status-area:empty{
  display: none;
}
.status-area.success{ background:rgba(252,232,235,0.5); color:#7a0a1a; }
.status-area.error{ background:#f8d7da; color:#721c24; }

/* Title type (Minor/Major) radio block */
.title-type-block {
  margin-top: 12px;
}

.title-type-label {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

.title-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.type-option {
  cursor: pointer;
}

.type-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.type-name {
  font-weight: 600;
}

.type-help {
  display: block;
  margin-left: 28px; /* pushes help under the label text, not under the radio */
  margin-top: 4px;
  font-size: var(--fs-sm);
  color: #6b7280;
  line-height: 20px;
}

.title-type-block input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--maroon);
}

.type-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.22);
  color: rgba(0,0,0,.55);
  font-size: var(--fs-xs);
  font-weight: 800;
  line-height: 16px;
  cursor: help;
}
.type-info:focus {
  outline: 2px solid rgba(169,13,34,.30);
  outline-offset: 2px;
}

/* Tooltip for Minor/Major options */
.tt{ position: relative; }

.tt::after{
  content: attr(data-tip);
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 120;

  background: #fff;
  color: rgba(0,0,0,.75);
  font-size: var(--fs-sm);
  line-height: 1.4;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.10);
  box-shadow: 0 18px 40px rgba(0,0,0,.18);

  display: block;
  width: max-content;
  max-width: 320px;
  white-space: normal;

  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
}

.tt:hover::after,
.tt:focus-within::after{
  opacity: 1;
  transform: translateY(0);
}

.repeat-tutorial-popover {
  position: fixed;
  z-index: 120;
  background: #fff;
  color: rgba(0,0,0,.75);
  font-size: var(--fs-sm);
  line-height: 1.4;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.10);
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
  width: max-content;
  max-width: 320px;
  white-space: normal;
  pointer-events: none;
}

/* Rule "i" tooltips: match Minor/Major (black bubble) */
.rule-row .info.tt::after{
  top: auto;
  bottom: calc(100% + 8px);
  left: 0;

  background: #fff;
  color: rgba(0,0,0,.75);
  font-size: var(--fs-sm);
  line-height: 1.4;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.10);
  box-shadow: 0 18px 40px rgba(0,0,0,.18);

  display: block;
  width: max-content;
  max-width: 360px;
  white-space: normal;

  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  z-index: 120;
}

/* Force rule "i" tooltips to show on hover/focus (beats specificity issue) */
.rule-row .info.tt:hover::after,
.rule-row .info.tt:focus::after,
.rule-row .info.tt:focus-within::after{
  opacity: 1;
  transform: translateY(0);
}

.mode-card{
  margin-top: 12px;
  padding: 14px 12px 12px;

  /* black stroke like Work fieldsets */
  border: 1px solid #000;
  border-radius: 0px;

  /* match the form feel */
  background: transparent;
}


.mode-card-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.mode-badge{
  display:inline-flex;
  align-items:center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(169,13,34,0.10);
  color: #A90D22;
  font-weight: 700;
  font-size: var(--fs-xs);
}

.mode-tag{
  font-size: var(--fs-xs);
  color: rgba(0,0,0,0.55);
  font-weight: 600;
}

.mode-desc{
  font-family: "Source Serif 4", "Georgia", "Times New Roman", serif;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 18px;
  color: rgba(0,0,0,0.75);
}

.mode-more{
  margin-top: 8px;
  background: transparent;
  border: 0;
  padding: 0;
  color: #A90D22;
  font-weight: 700;
  font-size: var(--fs-xs);
  cursor: pointer;
}

.mode-details{
  margin-top: 10px;
  font-size: var(--fs-sm);
  line-height: 18px;
  color: rgba(0,0,0,0.75);
}

.mode-details ul{
  margin: 0;
  padding-left: 18px;
}

/* ===== Footer (center text + bottom-right logo) ===== */
.marker-footer{
  margin-top: 18px;
  padding: 18px 0 8px;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;

  color: rgba(0,0,0,.55);
  font-size: var(--fs-xs);
}

.footer-copy{
  grid-column: 2;
  justify-self: center;
}

.footer-logo{
  grid-column: 3;
  justify-self: end;
  height: 140px;      /* tweak size here */
  width: auto;
  opacity: 1;
}

@media (max-width: 520px){
  .marker-footer{
    grid-template-columns: 1fr;
    row-gap: 10px;
    justify-items: center;
    text-align: center;
  }
  .footer-copy{ grid-column: 1; }
  .footer-logo{ grid-column: 1; justify-self: center; }
}

/* Preview editing and highlighting */
.preview-editable {
  cursor: text;
}

/* Suppress loud green thesis-device highlights in preview */
#markedPreview span[style*="background-color:#00B050"],
#markedPreview span[style*="background-color: #00B050"],
#markedPreview span[style*="background-color: rgb(0, 176, 80)"],
#markedPreview span[style*="background-color:rgb(0, 176, 80)"] {
  background-color: transparent !important;
}

/* Classic highlight styles */
.vysti-preview-tech-block {
  outline: 2px solid #f97316;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff7ed;
}

.vysti-preview-variety-block {
  outline: 2px solid #3b82f6;
  border-radius: 8px;
  padding: 8px 10px;
  background: #eff6ff;
}

.vysti-preview-hit[data-vysti-device="1"] {
  background: #fdba74;
  border-radius: 3px;
  padding: 0 2px;
}

/* =========================
   Preview highlighting (meter pill navigation)
   Brand: maroon stroke + soft halo (no blue fill)
   ========================= */

:root{
  --hit-maroon: rgba(169, 13, 34, 0.62);
  --hit-maroon-halo: rgba(169, 13, 34, 0.18);
}

/* Exact sentence hit spans */
span.vysti-preview-hit[data-vysti-hit="1"]{
  background: transparent !important;
  border-radius: 6px !important;
  padding: 1px 2px;

  /* clean maroon stroke only */
  box-shadow: inset 0 0 0 2px var(--hit-maroon) !important;

  color: inherit !important;
  font-weight: inherit !important;
  font-family: inherit !important;
}

/* Meter-pill highlight: maroon outline only (no blue wash) */
span.vysti-preview-hit[data-vysti-hit="1"].vysti-hit-brand{
  background: transparent !important;
  box-shadow: inset 0 0 0 2px rgba(169,13,34,.55) !important;
  border-radius: 4px !important;
  padding: 0 1px;

  /* Keep typography inherited */
  color: inherit !important;
  font-weight: inherit !important;
  font-family: inherit !important;
}

/* "cursor highlight" class should look identical */
.vysti-preview-hit.vysti-cursor-highlight{
  background: transparent !important;
  border-radius: 6px !important;
  padding: 1px 2px;

  box-shadow: inset 0 0 0 2px var(--hit-maroon) !important;

  color: inherit !important;
  font-weight: inherit !important;
  font-family: inherit !important;
}

/* Optional modifier class for old yellow-box styling (not applied by default) */
span.vysti-preview-hit[data-vysti-hit="1"].boxed {
  outline: 2px solid #ffeb3b !important;
  background: rgba(255, 235, 59, 0.2) !important;
  box-shadow: 0 0 0 2px #ffeb3b !important;
  border-radius: 3px !important;
  color: inherit !important;
  font-family: inherit !important;
  font-weight: inherit !important;
}

/* Paragraph fallback (when sentence match fails) */
.vysti-preview-hit-block{
  background: transparent !important;
  outline: 2px solid var(--maroon) !important;
  outline-offset: 2px;
  border-radius: 8px !important;

  /* match Techniques halo feel */
  box-shadow: 0 0 0 3px var(--hit-maroon-halo) !important;

  color: inherit !important;
  font-weight: inherit !important;
  font-family: inherit !important;
}

/* Text inserted into Preview via "Apply to Preview" */
.vysti-applied-rewrite {
  font-family: "Times New Roman", Times, serif !important;
  font-size: 12pt !important;
  font-weight: 400 !important;
  font-style: inherit;
  text-decoration: inherit;
  color: inherit !important;
  background: transparent !important;
  outline: none !important;
}

.vysti-applied-rewrite.vysti-flash-highlight {
  background: rgba(0, 120, 215, 0.25) !important;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(0, 120, 215, 0.35) !important;
}

/* =========================
   Student tour (guided)
   ========================= */
.tour-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.06);
  z-index: 9998;
  pointer-events: none !important;
}

.tour-popover{
  position: fixed;
  top: 0;
  left: 0;
  visibility: hidden;
  max-width: 360px;
  width: min(360px, calc(100vw - 24px));
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
  padding: 16px 16px 14px;
  z-index: 9999;
  color: var(--text);
  pointer-events: auto;
}

/* ===== Power Verbs popover: responsive, no cut-off ===== */
.power-verbs-popover{
  width: min(560px, calc(100vw - 24px));
  max-width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.power-verbs-popover-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.power-verbs-popover-title{
  font-weight: 800;
  font-size: var(--fs-sm);
}

.power-verbs-popover-close{
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.14);
  background: #fff;
  color: rgba(0,0,0,.65);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.power-verbs-popover-close:hover{ background: rgba(0,0,0,.05); color: rgba(0,0,0,.9); }

.power-verbs-feedback{
  min-height: 14px;
  margin: 8px 0 6px;
  font-size: var(--fs-xs);
  color: rgba(0,0,0,.55);
}

/* Verb grid — auto-sized to fit 5 cards */
.power-verbs-popover-grid{
  flex: 0 0 auto;
  overflow: visible;
  display: grid;
  gap: 10px;
  padding-right: 6px;
}

/* Verb cards */
.power-verb-card{
  text-align: left;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  cursor: pointer;
}
.power-verb-card:hover{ background: rgba(0,0,0,.03); }

.power-verb-card-header{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.power-verb-card-verb{
  font-weight: 900;
  font-size: var(--fs-sm);
  color: var(--text);
}
.power-verb-card-def{
  margin-top: 6px;
  font-size: var(--fs-xs);
  color: rgba(0,0,0,.72);
  line-height: 1.45;
}

.power-verbs-popover-footer{
  display: flex;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,.08);
}
.power-verbs-popover-footer .secondary-btn{
  flex: 1;
}

.tour-arrow{
  position: absolute;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: rotate(45deg);
  box-shadow: -6px -6px 12px rgba(0,0,0,.06);
}
.tour-arrow-down{ top: -6px; }
.tour-arrow-up{ bottom: -6px; }

.tour-title{
  font-weight: 700;
  font-size: var(--fs-sm);
  margin-bottom: 6px;
}
.tour-body{
  font-size: var(--fs-sm);
  color: rgba(0,0,0,.75);
}
.metric-popover{
  width: min(420px, calc(100vw - 24px));
  z-index: 90;
}
.pill-hint-popover{
  z-index: 130; /* ensure it sits above everything */
}
.pill-hint-footer{
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.pill-hint-nav{
  display: flex;
  gap: 10px;
}
.pill-hint-actions{
  display: flex;
  gap: 10px;
  margin-left: auto;
}
.metric-popover .tour-title{
  margin-bottom: 8px;
}
.metric-popover .tour-body{
  font-size: var(--fs-sm);
}
.metric-popover-tips-title{
  margin-top: 10px;
  font-weight: 700;
  font-size: var(--fs-xs);
  color: rgba(90, 15, 28, 0.75);
}
.metric-popover-list{
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: var(--fs-sm);
  color: rgba(0,0,0,.75);
}
.metric-popover-list li{
  margin-bottom: 6px;
}
.tour-footer{
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  justify-content: space-between;
}
.tour-step{
  font-size: var(--fs-xs);
  color: rgba(0,0,0,.6);
  font-weight: 600;
}
.tour-checkbox-row{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-xs);
  color: rgba(0,0,0,.7);
}
.tour-checkbox-row input{
  accent-color: var(--maroon);
}
.tour-primary-btn{
  background: var(--maroon);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: var(--fs-xs);
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(169,13,34,.18);
}
.tour-primary-btn:hover{ filter: brightness(.96); }

.tour-close{
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: rgba(0,0,0,.6);
}
.tour-close:hover{ color: rgba(0,0,0,.9); }

.brand-confirm-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.15);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}
.brand-confirm-overlay[hidden]{
  display: none !important;
}

.brand-confirm-popover{
  width: min(420px, calc(100vw - 32px));
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
  border: 1px solid rgba(0,0,0,.10);
  padding: 18px 18px 16px;
  position: relative;
  color: var(--text);
}

.brand-confirm-title{
  font-weight: 700;
  font-size: var(--fs-sm);
  margin-bottom: 8px;
}

.brand-confirm-body{
  font-size: var(--fs-sm);
  color: rgba(0,0,0,.75);
}

.brand-confirm-actions{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.brand-confirm-ok{
  background: var(--maroon);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  font-size: var(--fs-xs);
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(169,13,34,.18);
}
.brand-confirm-ok:hover{ filter: brightness(.96); }

.brand-confirm-cancel{
  background: transparent;
  color: rgba(0,0,0,.75);
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  font-size: var(--fs-xs);
  cursor: pointer;
}
.brand-confirm-cancel:hover{ background: rgba(0,0,0,.04); }

.brand-confirm-close{
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: rgba(0,0,0,.6);
}
.brand-confirm-close:hover{ color: rgba(0,0,0,.9); }

.modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.18);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-card{
  width: min(520px, calc(100vw - 32px));
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(0,0,0,.2);
  border: 1px solid rgba(0,0,0,.12);
  padding: 18px 18px 16px;
  color: var(--text);
}
.modal-title{
  font-weight: 700;
  font-size: var(--fs-sm);
  margin-bottom: 8px;
}
.modal-body{
  font-size: var(--fs-sm);
  color: rgba(0,0,0,.8);
}
.modal-question{
  font-weight: 600;
  margin-bottom: 10px;
}
.modal-body label{
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: var(--fs-xs);
  color: rgba(0,0,0,.8);
  margin-top: 10px;
}
.modal-body input[type="radio"]{
  accent-color: var(--maroon);
}
.modal-body textarea{
  width: 100%;
  min-height: 96px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.14);
  resize: vertical;
}
.modal-body textarea:focus{
  border-color: var(--maroon);
  box-shadow: 0 0 0 3px rgba(169,13,34,.15);
  outline: none;
}
.modal-actions{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.modal-actions .primary-btn,
.modal-actions .secondary-btn{
  width: auto;
  margin-top: 0;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
}
.modal-error{
  margin-top: 8px;
  font-size: var(--fs-xs);
  color: var(--maroon);
  font-weight: 600;
}

/* ── Lexis Modal ── */
.lexis-modal{
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(0,0,0,.2);
  border: 1px solid rgba(0,0,0,.12);
  padding: 20px;
  color: var(--text);
  display: flex;
  flex-direction: column;
}

.lexis-modal .modal-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  margin-bottom: 14px;
}

.lexis-modal .modal-header h2{
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--fs-h3);
  margin: 0;
}

.lexis-modal .modal-close{
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.14);
  background: #fff;
  color: rgba(0,0,0,.65);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lexis-modal .modal-close:hover{
  background: rgba(0,0,0,.05);
  color: rgba(0,0,0,.9);
}

.lexis-modal .modal-body{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  font-size: var(--fs-sm);
}

.lexis-modal .modal-footer{
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,.08);
  margin-top: 14px;
}

.tour-highlight{
  outline: 3px solid rgba(169,13,34,.65);
  outline-offset: 4px;
  box-shadow: 0 0 0 6px rgba(169,13,34,.12);
  border-radius: 8px;
}

.vysti-clickable-label{
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

.vysti-clickable-label:hover{
  text-decoration-style: solid;
}

/* Power Verbs popover */
.power-verbs-popover {
  width: min(520px, calc(100vw - 24px));
  max-width: min(520px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 120;
}
.power-verbs-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.power-verbs-popover-title {
  font-weight: 700;
  font-size: var(--fs-sm);
}
.power-verbs-popover-close {
  border: none;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.power-verbs-popover-grid{
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 10px;
  margin-top: 6px;
  flex: 0 0 auto;
  overflow: visible;
  padding-bottom: 8px;
  padding-right: 0;
}
.power-verb-card{
  width: 100%;
  text-align: left;
  border: 1px solid rgba(0,0,0,.14);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}
.power-verb-card:hover{
  background: rgba(0,0,0,.02);
}
.power-verb-card-header{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.power-verb-card-verb{
  font-weight: 900;
  font-size: var(--fs-sm);
  color: rgba(0,0,0,.82);
}
.power-verb-card-copied{
  font-size: var(--fs-xs);
  font-weight: 800;
  color: rgba(0,0,0,.45);
  opacity: 0;
  transition: opacity 120ms ease;
}
.power-verb-card-copied.is-visible{
  opacity: 1;
}
.power-verb-card-def{
  margin-top: 6px;
  font-size: var(--fs-sm);
  font-weight: 650;
  color: rgba(0,0,0,.68);
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.power-verb-def,
.power-verbs-popover-grid .definition,
.power-verbs-popover-grid p {
  white-space: normal;
  overflow: visible;
  text-overflow: initial;
  word-break: break-word;
}
.power-verbs-popover-footer {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  margin-top: 10px;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,.08);
}

/* When all examples are approved (banner shown), student guidance is no longer needed */
.revision-practice-card.all-examples-approved .example-guidance {
  display: none !important;
}

/* ===== Revision examples (moved from student.html inline CSS) ===== */
    .revision-practice-card {
      margin-top: 24px;
      grid-column: 1 / -1;
    }
    .revision-practice-title {
      margin-bottom: 12px;
      font-size: var(--fs-h3);
      font-weight: 700;
      text-align: center;
    }
    .most-common-footer {
      margin-top: 12px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }
    .most-common-word-count,
    .most-common-total-issues {
      font-size: var(--fs-sm);
      font-weight: 600;
      color: var(--text);
    }
    .most-common-techniques {
      padding: 10px 12px;
      border-radius: 8px;
      border: 1px solid rgba(0, 0, 0, 0.08);
      background: #fff;
      text-align: right;
      margin-left: auto;
    }
    .most-common-techniques-title {
      font-size: var(--fs-xs);
      font-weight: 700;
      color: var(--muted);
      margin-bottom: 6px;
      text-transform: none;
      letter-spacing: 0.02em;
    }
    .most-common-techniques-list {
      font-size: var(--fs-sm);
      color: var(--text);
      line-height: 1.4;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .issue-select-wrapper {
      display: none;
    }
    .issue-buttons-wrap {
      display: none;
      flex-direction: column;
      gap: 14px;
    }
    .issue-section-block {
      padding-top: 4px;
    }
    .issue-section-heading {
      text-align: center;
      font-size: var(--fs-sm);
      font-weight: 700;
      color: rgba(0, 0, 0, 0.7);
      margin: 6px 0 8px;
      letter-spacing: 0.02em;
    }
    .issue-button-row {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 10px;
    }
    .issue-btn {
      appearance: none;
      border: 1px solid var(--issue-border, #e0e0e0);
      background: var(--issue-bg, #fff);
      border-radius: 999px;
      padding: 8px 12px;
      font-size: var(--fs-xs);
      cursor: pointer;
      transition: border-color 120ms ease, box-shadow 120ms ease, transform 80ms ease, background-color 120ms ease;
    }
    .issue-btn:hover {
      border-color: var(--issue-border, #e0e0e0);
      background: var(--issue-bg-hover, #fff);
    }
    .issue-btn:active {
      transform: translateY(1px);
    }
    .issue-btn.active {
      border-color: var(--issue-border, #e0e0e0);
      box-shadow: 0 0 0 2px var(--issue-ring, rgba(128, 0, 32, 0.15));
    }
    .issue-explanation-header {
      font-weight: 700;
      font-size: var(--fs-sm);
      margin-bottom: 6px;
      padding: 0 12px;
      color: rgba(0, 0, 0, .75);
      text-transform: none;
    }
    .issue-explanation {
      margin-bottom: 16px;
      padding: 12px;
      background: #f8f9fa;
      border-radius: 6px;
      font-size: var(--fs-sm);
      color: var(--text);
    }
    .examples-empty-state {
      margin: 0 0 16px;
      padding: 12px;
      background: #f8f9fa;
      border: 1px solid rgba(0, 0, 0, 0.08);
      border-radius: 8px;
      font-size: var(--fs-sm);
      color: rgba(0, 0, 0, 0.75);
    }
    .mci-tooltip {
      pointer-events: none;
      z-index: 80;
      width: min(380px, calc(100vw - 24px));
      max-width: min(380px, calc(100vw - 24px));
    }
    .mci-tooltip .mci-tooltip-header {
      display: flex;
      align-items: center;
      margin-bottom: 8px;
    }
    .mci-tooltip .mci-count {
      font-weight: 600;
      margin-bottom: 6px;
    }
    .mci-tooltip .mci-explanation {
      font-size: var(--fs-sm);
      color: rgba(0, 0, 0, .75);
      line-height: 1.45;
    }
    .mci-tooltip .mci-hint {
      margin-top: 10px;
      font-size: var(--fs-xs);
      font-weight: 700;
      color: rgba(90, 15, 28, 0.75);
    }
    .examples-nav {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin: 6px 0 12px;
      padding: 0 4px;
    }
    .examples-nav-text {
      font-size: var(--fs-xs);
      font-weight: 600;
      color: var(--muted);
    }
    .next-example-btn {
      padding: 6px 12px;
      font-size: var(--fs-xs);
      white-space: nowrap;
    }
    .examples-list {
      list-style: none;
      padding: 0;
      margin: 0;
    }
    .example-item {
      margin-bottom: 20px;
      padding: 16px;
      background: #f8f9fa;
      border-radius: 8px;
      border: 1px solid #e0e0e0;
    }
    .example-guidance {
      font-size: var(--fs-sm);
      font-weight: 600;
      color: #5a0f1c;
      margin-bottom: 8px;
      padding: 12px;
      background: rgba(169, 13, 34, 0.08);
      border: 1px solid rgba(169, 13, 34, 0.18);
      border-left: 4px solid rgba(169, 13, 34, 0.65);
      border-radius: 6px;
    }
    .example-guidance-label {
      font-weight: 700;
      font-size: var(--fs-xs);
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: rgba(90, 15, 28, 0.75);
      margin-bottom: 6px;
    }
    .example-guidance-text {
      font-weight: 600;
      font-size: var(--fs-sm);
      color: var(--text);
    }
    .example-meta {
      font-size: var(--fs-xs);
      color: var(--muted);
      margin: -2px 0 10px;
      font-weight: 600;
    }
    .example-student {
      font-size: var(--fs-xs);
      color: var(--muted);
      margin-bottom: 12px;
    }
    .example-rewrite {
      width: 100%;
      min-height: 80px;
      max-height: 220px;
      padding: 8px;
      border: 1px solid #e0e0e0;
      border-radius: 6px;
      font-size: var(--fs-body);
      font-family: inherit;
      margin-bottom: 8px;
      resize: vertical;
      overflow-y: hidden;
    }
    .preview-only-sentence {
      background: #f8f8f8;
      color: #444;
      cursor: default;
      resize: none;
      overflow-y: auto;
      line-height: 1.5;
    }
    .preview-only-hint {
      font-size: var(--fs-small, 13px);
      color: #666;
      margin: 0 0 10px;
      font-style: italic;
    }
    .example-actions {
      display: flex;
      gap: 8px;
    }
    .power-verbs-helper {
      margin: 6px 0 10px;
    }
    .power-verbs-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 8px;
    }
    .power-verbs-title {
      font-size: var(--fs-sm);
      font-weight: 600;
      color: rgba(0, 0, 0, 0.75);
    }
    .power-verbs-actions {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .power-verbs-feedback {
      font-size: var(--fs-xs);
      color: rgba(0, 0, 0, 0.6);
      min-height: 14px;
    }
    .power-verbs-iconbtn{
      width: 32px;
      height: 32px;
      border-radius: 999px;
      border: 1px solid rgba(0,0,0,.14);
      background: #fff;
      color: rgba(0,0,0,.55);
      font-size: 16px;
      font-weight: 900;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .power-verbs-iconbtn:hover{ background: rgba(0,0,0,.03); }
    #repeatTutorialBtn:disabled{
      opacity: .45;
      cursor: not-allowed;
      pointer-events: none;
    }
    .power-verbs-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }
    .power-verbs-suggestions-row{
      display: flex;
      align-items: flex-start;
      gap: 10px;
      margin-top: 8px;
    }
    .power-verbs-suggestions-list{
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .power-verbs-shuffle-btn{
      width: 48px;
      height: 48px;
      border-radius: 999px;
      border: 1px solid rgba(0,0,0,.14);
      background: #fff;
      color: rgba(0,0,0,.55);
      font-size: 26px;
      font-weight: 900;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .power-verbs-shuffle-btn:hover{ background: rgba(0,0,0,.03); }
    .approved-rewrites-wrap {
      margin-top: 16px;
      padding: 14px;
      border-radius: 10px;
      border: 1px solid rgba(169, 13, 34, 0.2);
      background: rgba(252, 232, 235, 0.35);
    }
    .approved-rewrites-title {
      margin: 10px 0 8px;
      font-size: var(--fs-sm);
      font-weight: 700;
      color: #7a0a1a;
    }
    .approved-rewrites-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }
    .approved-rewrites-toggle {
      border: 1px solid rgba(169, 13, 34, 0.2);
      background: rgba(252, 240, 242, 0.9);
      color: #7a0a1a;
      font-size: var(--fs-xs);
      font-weight: 700;
      border-radius: 999px;
      padding: 6px 12px;
      cursor: pointer;
    }
    .approved-rewrites-toggle:hover {
      background: rgba(252, 232, 235, 0.95);
    }
    .approved-rewrites-wrap[data-collapsed="true"] .approved-rewrites-list {
      display: none;
    }
    .approved-rewrites-list {
      list-style: none;
      padding: 0;
      margin: 0;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    .approved-rewrite-card {
      padding: 12px;
      border-radius: 8px;
      border: 1px solid rgba(0, 0, 0, 0.1);
      background: #fff;
    }
    .approved-rewrite-label {
      font-size: var(--fs-xs);
      font-weight: 700;
      color: #6c757d;
      margin-bottom: 6px;
    }
    .approved-rewrite-text {
      font-size: var(--fs-sm);
      color: var(--text);
      margin-bottom: 8px;
      white-space: pre-wrap;
    }
    .approved-rewrite-edit {
      width: 100%;
      min-height: 84px;
      padding: 10px 12px;
      border: 1px solid rgba(0, 0, 0, 0.15);
      border-radius: 6px;
      font-size: var(--fs-sm);
      font-family: inherit;
      background: #fff;
      margin-bottom: 8px;
      resize: vertical;
    }
    .approved-rewrite-actions {
      display: flex;
      gap: 8px;
    }
    .example-btn {
      padding: 7px 12px;
      border: 1px solid #e0e0e0;
      border-radius: 6px;
      background: #fff;
      font-size: var(--fs-xs);
      cursor: pointer;
    }
    .example-btn:hover {
      background: #f0f0f0;
    }
    .example-btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
    .example-btn.remove-issue-btn {
      border-color: rgba(128, 0, 32, 0.35);
      color: #7a1c1c;
      background: #fff;
    }
    .example-btn.remove-issue-btn:hover {
      background: #fbeaea;
    }
    .apply-to-preview-btn {
      background: #f8f9fa;
      border-color: rgba(0,0,0,.14);
      color: rgba(0,0,0,.75);
    }
    .apply-to-preview-btn.apply-attention,
    #applyAllToPreviewBtn.apply-attention {
      border-color: rgba(128, 0, 32, 0.75);
      outline: 2px solid rgba(128, 0, 32, 0.55);
      box-shadow:
        0 0 0 4px rgba(128, 0, 32, 0.18),
        0 0 14px rgba(128, 0, 32, 0.32);
      animation: applyPulse 1.4s ease-in-out infinite;
    }
    @keyframes applyPulse {
      0% {
        box-shadow:
          0 0 0 0 rgba(128, 0, 32, 0.22),
          0 0 10px rgba(128, 0, 32, 0.28);
      }
      60% {
        box-shadow:
          0 0 0 8px rgba(128, 0, 32, 0),
          0 0 16px rgba(128, 0, 32, 0.18);
      }
      100% {
        box-shadow:
          0 0 0 0 rgba(128, 0, 32, 0),
          0 0 12px rgba(128, 0, 32, 0.24);
      }
    }
    .apply-all-btn {
      margin-top: 12px;
      width: 100%;
      align-items: center;
      justify-content: center;
    }
    .apply-to-preview-btn:not(:disabled):hover {
      background: #e9ecef;
    }
    .example-applied {
      opacity: 0.7;
      background: #f0f0f0;
    }
    .example-item.example-approved {
      background: rgba(252, 232, 235, 0.35);
      border-color: rgba(169, 13, 34, 0.2);
    }
    .example-dismissed {
      background: #f9f2f2;
      border-color: #e7cfcf;
    }
    .hidden-select {
      position: absolute;
      opacity: 0;
      pointer-events: none;
      width: 0;
      height: 0;
    }
    .rewrite-status {
      margin-top: 8px;
      padding: 8px;
      border-radius: 6px;
      font-size: var(--fs-xs);
      display: none;
    }
    .rewrite-status.visible {
      display: block;
    }
    .rewrite-status.ok {
      background: rgba(252, 232, 235, 0.5);
      color: #7a0a1a;
      border: 1px solid rgba(169, 13, 34, 0.2);
    }
    .rewrite-status.bad {
      background: #ffe7e7;
      color: #5a2d2d;
      border: 1px solid #d5a8a8;
    }
    .rewrite-status.checking {
      background: #eef3f8;
      color: #1f3b5b;
      border: 1px solid #c6d7ea;
    }
    .rewrite-status.checking::after {
      content: "...";
      display: inline-block;
      width: 0;
      overflow: hidden;
      vertical-align: bottom;
      animation: rewriteDots 1s steps(4, end) infinite;
    }
    @keyframes rewriteDots {
      to { width: 1.25em; }
    }

/* ===== Revision practice panel (shared) ===== */
.practice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.draft-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff4d6;
  margin-bottom: 16px;
  font-size: var(--fs-sm);
}

.draft-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attempt-list {
  display: grid;
  gap: 10px;
}

.attempt-item {
  text-align: left;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  cursor: pointer;
}

.attempt-item.is-active {
  border-color: rgba(0, 140, 255, 0.35);
  background: rgba(0, 140, 255, 0.08);
}

.attempt-time {
  font-size: var(--fs-xs);
  color: var(--muted);
  margin-bottom: 4px;
}

.attempt-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--fs-sm);
}

.practice-note {
  text-align: left;
}

.practice-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.practice-stat-card {
  background: #f8f9fa;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 16px;
  display: grid;
  gap: 10px;
}

.practice-stat-card h3 {
  margin: 0;
  font-size: var(--fs-h3);
}

.practice-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--fs-sm);
}

.practice-techniques h4 {
  margin: 8px 0 0;
  font-size: var(--fs-sm);
}

.practice-techniques ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.practice-techniques li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: var(--fs-xs);
}

.practice-issues h3 {
  margin: 0 0 8px;
  font-size: var(--fs-h3);
}

.issue-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.examples-panel h4 {
  margin: 0 0 8px;
  font-size: var(--fs-sm);
}

.practice-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.practice-groups {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.practice-group {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f8f9fa;
}

.practice-group-title {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.practice-top-issues {
  margin-bottom: 16px;
}

.examples-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.rewrite-input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  padding: 8px 10px;
  font-size: var(--fs-sm);
  resize: vertical;
}

.rewrite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.example-status {
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
}

.example-status.success {
  color: #0b66c3;
}

.example-status.error {
  color: #b00020;
}

.example-status.approved {
  color: #177a3c;
}

.example-status.applied {
  color: #7a4b00;
}

.example-jump {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: #0b62d6;
  text-decoration: underline;
  cursor: pointer;
  font-size: var(--fs-sm);
  text-align: left;
}

.rewrite-actions .dismiss-btn {
  border-color: rgba(180, 0, 0, 0.3);
  color: #b60000;
}

/* ===== Metric quest pills (from Classic student.html) ===== */
.metric-success{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: var(--fs-xs);
  font-weight: 800;
  color: rgba(0,0,0,.65);
}
.metric-success .star{
  color: #f0ad4e;
  font-size: 14px;
  line-height: 1;
}
.power-quests{
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.quest-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.quest-row.pill-row{
  justify-content: flex-start;
  flex-wrap: wrap;
}
.quest-pill{
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.18);
  font-size: var(--fs-xs);
  font-weight: 800;
  color: rgba(0,0,0,.70);
  white-space: nowrap;
}
.quest-pill-btn{
  appearance: none;
  cursor: pointer;
}
.quest-pill-btn:disabled{
  opacity: .55;
  cursor: default;
  background: #f6f6f6;
}
.quest-pill-btn:hover{
  background: rgba(0,0,0,.03);
}
.quest-pill.weak.quest-pill-btn:hover{
  background: rgba(217,83,79,.06);
}
.quest-pill.power.quest-pill-btn:hover{
  background: rgba(46,204,113,.08);
}
.quest-pill-btn:active{
  transform: translateY(0.5px);
}
.quest-pill.weak{ border-color: rgba(217,83,79,.55); }
.quest-pill.power{ border-color: rgba(46,204,113,.55); }
.quest-dots{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.quest-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.2);
  background: #fff;
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,.12),
    inset 0 -1px 0 rgba(255,255,255,.5),
    0 1px 2px rgba(0,0,0,.1);
}
.quest-dot.good{
  background: linear-gradient(to bottom, #3dd87a, #27ae60);
  border-color: rgba(0,100,50,.3);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.35),
    0 1px 2px rgba(0,0,0,.12);
}
.quest-dot.bad{
  background: linear-gradient(to bottom, #e66a67, #c9302c);
  border-color: rgba(140,20,20,.3);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.3),
    0 1px 2px rgba(0,0,0,.12);
}
.quest-dot.empty{
  background: linear-gradient(to bottom, #fff, #f0f0f0);
  border-color: rgba(0,0,0,.15);
}
.quest-more{
  font-size: var(--fs-xs);
  font-weight: 800;
  color: rgba(0,0,0,.45);
}
.metric-note{
  font-size: var(--fs-xs);
  font-weight: 600;
  color: rgba(0,0,0,.55);
  margin-top: 6px;
}

/* ===== Power Verbs popover: viewport-safe + scroll (React overrides tour-popover) ===== */
.tour-popover.power-verbs-popover{
  position: fixed;                     /* overrides React's .tour-popover position:relative */
  top: 0;
  left: 0;
  z-index: 200;
  width: min(560px, calc(100vw - 24px));
  max-width: min(560px, calc(100vw - 24px));
  height: auto;
  max-height: calc(100dvh - 24px);
  display: flex;
  flex-direction: column;
  overflow: visible;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
  padding: 16px 16px 14px;
}

.power-verbs-popover-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.power-verbs-popover-title{
  font-weight: 800;
  font-size: var(--fs-sm);
}

.power-verbs-popover-close{
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.14);
  background: #fff;
  color: rgba(0,0,0,.65);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.power-verbs-popover-close:hover{ background: rgba(0,0,0,.05); color: rgba(0,0,0,.9); }

.power-verbs-feedback{
  min-height: 14px;
  margin: 8px 0 6px;
  font-size: var(--fs-xs);
  color: rgba(0,0,0,.55);
}

/* Scrollable list region */
.power-verbs-popover-grid{
  flex: 0 0 auto;
  overflow: visible;
  display: grid;
  gap: 12px;
  padding-right: 6px;
  padding-bottom: 12px;
}

.power-verb-card{
  text-align: left;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 14px;
  padding: 16px;
  background: #fff;
  cursor: pointer;
  height: 100px;
  box-sizing: border-box;
  overflow: hidden;
}
.power-verb-card:hover{ background: rgba(0,0,0,.03); }

.power-verb-card-verb{
  font-weight: 900;
  font-size: var(--fs-sm);
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.power-verb-card-def{
  margin-top: 8px;
  font-size: var(--fs-xs);
  color: rgba(0,0,0,.72);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.power-verbs-popover-footer{
  flex: 0 0 auto;
  display: flex;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,.08);
}
.power-verbs-popover-footer .secondary-btn{
  flex: 1;
}
