/* ==========================================================================
   Autograder UI v2
   Injected by ui_theme.py only when ui_config.NEW_UI is True.

   Every rule is scoped to html[data-ui="v2"], so nothing changes when the
   switch is off. The original markup, ids and the markup app.js builds at
   runtime are restyled here. No rule sets `display` on an element the
   scripts toggle with `.hidden` unless guarded with :not(.hidden), so all
   show/hide behaviour is unchanged.

   Design rules: existing brand colours only, square corners, 2px ink rules,
   hard offset shadows only on primary surfaces and pressable controls,
   monospace only for metadata, motion only as feedback.
   ========================================================================== */

:root[data-ui="v2"] {
  --ink: #111111;
  --paper: #f8f9fa;
  --surface: #ffffff;
  --wash: #f3f4f6;
  --line: #e5e7eb;
  --subtle: #9ca3af;
  --muted: #6b7280;
  --body: #4b5563;
  --text: #374151;
  --blue: #2563eb;
  --blue-deep: #1d4ed8;
  --blue-tint: #dbeafe;
  --blue-wash: #eff6ff;
  --red: #D22B2B;
  --green: #16a34a;

  --shadow-xs: 2px 2px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --shadow-lg: 6px 6px 0 var(--ink);

  --ease: cubic-bezier(.2, .8, .2, 1);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  scroll-padding-top: 88px;
}

/* --------------------------------------------------------------------------
   1. Base
   -------------------------------------------------------------------------- */
html[data-ui="v2"] body {
  background-color: var(--paper);
  color: var(--ink);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html[data-ui="v2"] ::selection { background: var(--ink); color: #fff; }
html[data-ui="v2"] :focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* --------------------------------------------------------------------------
   2. Primitives - the original Tailwind vocabulary, tightened
   -------------------------------------------------------------------------- */
html[data-ui="v2"] .neo-shadow { box-shadow: var(--shadow); }
html[data-ui="v2"] .neo-shadow-sm { box-shadow: var(--shadow-sm); }
html[data-ui="v2"] .border-black { border-color: var(--ink); }
html[data-ui="v2"] .border-4 { border-width: 2px; }
html[data-ui="v2"] .rounded { border-radius: 0; }

/* Pressable controls */
html[data-ui="v2"] :is(button, a).border-2 {
  transition: transform .12s var(--ease), box-shadow .12s var(--ease),
              background-color .12s ease, color .12s ease, border-color .12s ease;
}
html[data-ui="v2"] :is(button, a).border-2.border-black:not(:disabled):not(.cursor-not-allowed):not(.cursor-default):hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-sm);
}
html[data-ui="v2"] :is(button, a).neo-shadow.border-2:not(:disabled):not(.cursor-not-allowed):hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
}
html[data-ui="v2"] :is(button, a).border-2.border-black:not(:disabled):not(.cursor-not-allowed):not(.cursor-default):active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--ink);
}
html[data-ui="v2"] button:disabled { cursor: not-allowed; }

/* Fields */
html[data-ui="v2"] :is(input:not([type="file"]):not([type="checkbox"]):not([type="radio"]), select, textarea).border-2 {
  border-color: var(--ink);
  background-color: var(--surface);
  min-height: 46px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  transition: box-shadow .12s var(--ease), background-color .12s ease;
}
html[data-ui="v2"] :is(input, select, textarea).border-2:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--blue);
}
html[data-ui="v2"] :is(input, textarea)::placeholder { color: var(--subtle); font-weight: 400; }
html[data-ui="v2"] :is(input, select, textarea).border-2:disabled {
  background-color: var(--wash);
  color: var(--muted);
  box-shadow: none;
}
html[data-ui="v2"] select.border-2 {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111111' stroke-width='2.5' stroke-linecap='square'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  padding-right: 42px;
}
html[data-ui="v2"] input[type="number"].border-2 { font-variant-numeric: tabular-nums; }
html[data-ui="v2"] label.block.text-xs.uppercase,
html[data-ui="v2"] label.text-xs.font-bold.uppercase {
  color: var(--text);
  font-size: 11px;
  letter-spacing: .08em;
  font-weight: 700;
  margin-bottom: 6px;
}

/* --------------------------------------------------------------------------
   3. Marketing chrome - top bar, mobile menu, footer
   -------------------------------------------------------------------------- */
html[data-ui="v2"] body > nav.border-b-2,
html[data-ui="v2"] body > header.border-b-2 {
  background-color: var(--surface);
  border-bottom: 2px solid var(--ink);
}
html[data-ui="v2"] body > :is(nav, header, footer) a > img + span { font-size: 19px; letter-spacing: -.04em; }
html[data-ui="v2"] body > nav .sm\:flex { gap: 28px; }
html[data-ui="v2"] body > nav .sm\:flex > a:not(.auth-login-link) {
  padding: 6px 0;
  letter-spacing: .08em;
  border-bottom: 2px solid transparent;
}
html[data-ui="v2"] body > nav .sm\:flex > a:not(.auth-login-link):hover { border-bottom-color: var(--ink); color: var(--ink); }
html[data-ui="v2"] body > nav .sm\:flex > a.text-blue-600:not(.auth-login-link) { border-bottom-color: var(--blue); }
html[data-ui="v2"] body > nav .sm\:flex > a.auth-login-link { padding: 9px 18px; letter-spacing: .08em; }

html[data-ui="v2"] #mobile-menu > a { display: flex; justify-content: space-between; font-size: 13px; padding-top: 18px; padding-bottom: 18px; }
html[data-ui="v2"] #mobile-menu > a::after { content: "\2192"; font-weight: 700; }

/* Footer: one ink block, set like a colophon */
html[data-ui="v2"] body > footer {
  background: var(--ink);
  color: var(--subtle);
  border-top: 2px solid var(--ink);
  padding-top: 56px;
}
html[data-ui="v2"] body > footer :is(h4, .text-black, a > span) { color: #fff; }
html[data-ui="v2"] body > footer h4 { font-size: 11px; letter-spacing: .12em; }
html[data-ui="v2"] body > footer :is(.text-gray-600, .text-gray-500) { color: var(--subtle); }
html[data-ui="v2"] body > footer a > img { border-color: #fff; }
html[data-ui="v2"] body > footer ul { font-size: 13px; }
html[data-ui="v2"] body > footer ul a:hover { color: #fff; }
html[data-ui="v2"] body > footer ul a.text-blue-600 { color: #fff; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
html[data-ui="v2"] body > footer .border-t { border-color: #374151; }
html[data-ui="v2"] body > footer > div:last-child { text-align: left; font-family: var(--mono); font-size: 11px; }

/* --------------------------------------------------------------------------
   4. Legal & contact pages (original markup, main.max-w-2xl)
   -------------------------------------------------------------------------- */
html[data-ui="v2"] main.max-w-2xl { max-width: 44rem; padding-top: clamp(48px, 8vw, 88px); }
html[data-ui="v2"] main.max-w-2xl > header { padding-bottom: 24px; margin-bottom: 40px; border-bottom: 2px solid var(--ink); }
html[data-ui="v2"] main.max-w-2xl > header h1 { font-size: clamp(2.2rem, 6.5vw, 3.4rem); letter-spacing: -.045em; line-height: .95; }
html[data-ui="v2"] main.max-w-2xl > header p { font-family: var(--mono); font-weight: 500; letter-spacing: .02em; text-transform: none; color: var(--muted); }
html[data-ui="v2"] main.max-w-2xl section > h2 { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; font-weight: 700; }
html[data-ui="v2"] main.max-w-2xl :is(p, li, dd).text-sm { font-size: 15.5px; line-height: 1.75; }
html[data-ui="v2"] main.max-w-2xl li.border-l-2 { border-left-color: var(--ink); padding-left: 16px; }
html[data-ui="v2"] main.max-w-2xl dt { font-family: var(--mono); letter-spacing: .06em; }
html[data-ui="v2"] main.max-w-2xl section > div.border-2 { border-left-width: 6px; padding: 22px 24px; }
html[data-ui="v2"] main.max-w-2xl > nav.border-2 { box-shadow: var(--shadow); }
html[data-ui="v2"] main.max-w-2xl > nav.border-2 > h2 { padding-top: 12px; padding-bottom: 12px; }
html[data-ui="v2"] main.max-w-2xl > nav.border-2 li > a::after { content: "\2192"; font-weight: 700; }
html[data-ui="v2"] main.max-w-2xl > nav.border-2 li > a:hover::after { color: #fff; }

/* --------------------------------------------------------------------------
   5. Auth - v2 login, reset-password pages, answer-sheet viewer
   -------------------------------------------------------------------------- */
html[data-ui="v2"] :is(#auth-error, #auth-success, #verify-otp-error, #resend-status, #forgot-error, #forgot-success, #reset-error, #reset-success) {
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}
html[data-ui="v2"] #otp-input { font-family: var(--mono); font-size: 22px; letter-spacing: .45em; min-height: 58px; }
html[data-ui="v2"] #otp-input::placeholder { font-family: Inter, sans-serif; font-size: 14px; letter-spacing: 0; }
html[data-ui="v2"] body > div.border-4 { box-shadow: var(--shadow-lg); padding: 36px 32px; }
html[data-ui="v2"] body > .header { box-shadow: var(--shadow) !important; border-color: var(--ink) !important; padding: 20px 24px !important; }
html[data-ui="v2"] body > .content img { border-color: var(--ink) !important; box-shadow: var(--shadow) !important; background: #fff; }

/* --------------------------------------------------------------------------
   6. Dashboard (/app)
   -------------------------------------------------------------------------- */

/* Loader */
html[data-ui="v2"] #globalLoadingOverlay > span { font-size: 30px; letter-spacing: -.05em; }
html[data-ui="v2"] #globalLoadingText { font-family: var(--mono); font-weight: 500; letter-spacing: .06em; color: var(--muted); }
html[data-ui="v2"] .neo-loader-track { width: 240px; height: 12px; border: 2px solid var(--ink); background: var(--surface); }
html[data-ui="v2"] .neo-loader-bar { background: var(--blue); }

/* App headers */
html[data-ui="v2"] :is(#sessionsView, #evaluateView, #sessionDetailView, #evaluationView, #resultsView) > header {
  background: var(--surface);
  border-bottom: 2px solid var(--ink);
}
html[data-ui="v2"] :is(#sessionsView, #evaluateView) > header { position: sticky; top: 0; z-index: 40; }

/* The wordmark gets the logo tile used on the public site */
html[data-ui="v2"] [id^="logo"].whitespace-nowrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  letter-spacing: -.05em;
}
html[data-ui="v2"] [id^="logo"].whitespace-nowrap::before {
  content: "";
  flex: none;
  width: 30px;
  height: 30px;
  background: url("/logo-2.png") center / cover no-repeat;
  border: 2px solid var(--ink);
}

/* Phones: the step views carry Back/Delete/menu, so the wordmark collapses to its tile */
@media (max-width: 639px) {
  html[data-ui="v2"] :is(#logoDetail, #logoEvalView, #logoResultsView) { font-size: 0; gap: 0; }
}

/* Header controls share one height */
html[data-ui="v2"] header .justify-end > button:not(.hidden),
html[data-ui="v2"] header .justify-end > div > [id^="sessionMenuBtn"],
html[data-ui="v2"] header .justify-end .plan-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
}
html[data-ui="v2"] header .justify-end > [id^="backTo"] {
  gap: 6px;
  padding: 0 12px 0 8px;
  border: 2px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
}
html[data-ui="v2"] header .justify-end > [id^="backTo"]:hover { background: var(--ink); color: #fff; }
html[data-ui="v2"] [id^="sessionMenuBtn"] { min-width: 40px; }

/* Session title band in the step headers */
html[data-ui="v2"] header [id^="sessionTitleDisplay"] {
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: -.035em;
  line-height: 1.1;
  text-transform: none;
}
html[data-ui="v2"] header [id^="sessionTitleDisplay"] + p { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 6px; }
html[data-ui="v2"] header > .border-t-2 + div { padding-top: 16px; padding-bottom: 18px; }

/* Plan badge keeps its colour coding, set in the same type as buttons */
html[data-ui="v2"] .plan-badge { border-color: var(--ink); font-size: 11px; letter-spacing: .07em; font-weight: 800; }

/* Overflow menus */
html[data-ui="v2"] [id^="sessionMenuDropdown"] {
  margin-top: 8px;
  box-shadow: var(--shadow);
  animation: v2-drop .12s var(--ease);
}
html[data-ui="v2"] [id^="sessionMenuDropdown"] > :is(button, a) { padding-top: 12px; padding-bottom: 12px; }
html[data-ui="v2"] [id^="sessionMenuDropdown"] > :is(button, a):hover { background: var(--ink); color: #fff; }
html[data-ui="v2"] [id^="sessionMenuDropdown"] > [id^="cancelSubMenuItem"]:hover { background: #dc2626; color: #fff; }

/* Page containers */
html[data-ui="v2"] :is(#sessionsView, #evaluateView, #sessionDetailView, #evaluationView, #resultsView) > main {
  padding-top: clamp(24px, 4vw, 44px);
  padding-bottom: 96px;
  margin-top: 0;
}

/* Sessions list: page title, toolbar, then the list */
html[data-ui="v2"] #sessionsView > main {
  max-width: 72rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "title" "new" "search" "list";
  gap: 12px;
}
html[data-ui="v2"] #sessionsView > main::before {
  grid-area: title;
  content: "Grading sessions";
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 900;
  letter-spacing: -.05em;
  line-height: 1;
  padding-bottom: 12px;
}
html[data-ui="v2"] #newSessionBtn { grid-area: new; margin: 0; min-height: 52px; }
html[data-ui="v2"] #sessionsView > main > .relative { grid-area: search; margin: 0; }
html[data-ui="v2"] #sessionSearch { min-height: 52px; padding-left: 42px; }
html[data-ui="v2"] #sessionSearch + svg { left: 15px; color: var(--ink); }
html[data-ui="v2"] #sessionList { grid-area: list; padding-top: 12px; }
html[data-ui="v2"] #sessionList.session-scroll { max-height: none; overflow: visible; }
@media (min-width: 640px) {
  html[data-ui="v2"] #sessionsView > main {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "title title" "search new" "list list";
    column-gap: 12px;
  }
  html[data-ui="v2"] #newSessionBtn { padding-left: 24px; padding-right: 28px; }
}
html[data-ui="v2"] #sessionList > .text-center { border: 2px dashed var(--subtle); background: var(--surface); padding: 56px 24px; }
html[data-ui="v2"] #sessionList > .text-center > p:first-child { color: var(--ink); }

/* Session rows */
html[data-ui="v2"] .session-card { padding: 16px 18px; box-shadow: var(--shadow-xs); transition: transform .12s var(--ease), box-shadow .12s var(--ease); }
html[data-ui="v2"] .session-card:hover { transform: translate(-1px, -1px); box-shadow: var(--shadow); }
html[data-ui="v2"] .session-card:active { transform: translate(1px, 1px); box-shadow: 0 0 0 var(--ink); }
html[data-ui="v2"] .session-card:has(.view-results-card-btn) { border-left: 6px solid var(--green); }
html[data-ui="v2"] .session-card h3 { font-size: 16px; font-weight: 800; text-transform: none; letter-spacing: -.015em; }
html[data-ui="v2"] .session-card h3 + p { font-family: var(--mono); font-weight: 500; letter-spacing: .02em; text-transform: none; margin-top: 4px; }
html[data-ui="v2"] .session-card span.border-2 { border-width: 1px; padding: 4px 8px; letter-spacing: .06em; }
html[data-ui="v2"] .session-card .rename-session-card-btn { width: 30px; height: 30px; }
html[data-ui="v2"] .session-card .rename-session-card-btn:hover { background: var(--ink); color: #fff; }

/* Two columns on wide screens, so a step and its neighbour sit side by side */
@media (min-width: 1024px) {
  html[data-ui="v2"] #sessionDetailView > main,
  html[data-ui="v2"] #evaluateView > main,
  html[data-ui="v2"] #evaluationView > main:has(> #studentListSection:not(.hidden)) {
    max-width: 72rem;
    display: grid;
    gap: 28px;
    align-items: start;
  }
  html[data-ui="v2"] :is(#sessionDetailView, #evaluateView, #evaluationView) > main > * { margin-top: 0; margin-bottom: 0; }
  html[data-ui="v2"] #sessionDetailView > main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  html[data-ui="v2"] #sessionDetailView > main > #nextEvaluationSection { grid-column: 1 / -1; }
  html[data-ui="v2"] #evaluateView > main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  html[data-ui="v2"] #evaluateView > main > :not(section),
  html[data-ui="v2"] #evaluateView > main > #evalResultsSection { grid-column: 1 / -1; }
  html[data-ui="v2"] #evaluationView > main:has(> #studentListSection:not(.hidden)) { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  html[data-ui="v2"] #evaluationView > main:has(> #studentListSection:not(.hidden)) > :not(section) { grid-column: 1 / -1; }
  html[data-ui="v2"] #resultsView > main { max-width: 72rem; }
}

/* Step panels */
@media (min-width: 640px) {
  html[data-ui="v2"] :is(#evaluateView, #sessionDetailView, #evaluationView) main :is(section, div).border-2.p-5 { padding: 24px 26px; }
}
html[data-ui="v2"] :is(#evaluateView, #sessionDetailView, #evaluationView) main section > h2 {
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink);
  padding-bottom: 14px;
  margin: -2px 0 20px;
  border-bottom: 2px solid var(--ink);
}
html[data-ui="v2"] main section > h2 > span.bg-blue-600:first-child {
  width: 28px;
  height: 28px;
  margin-right: 12px;
  border: 2px solid var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}
html[data-ui="v2"] main h3 > span.bg-gray-800:first-child { background: var(--ink); font-family: var(--mono); font-weight: 700; }
html[data-ui="v2"] main section h3.text-xs { color: var(--ink); letter-spacing: .08em; }
html[data-ui="v2"] #studentCountIndicator { font-family: var(--mono); }

/* Per-question marks */
html[data-ui="v2"] :is(#per-question-marks-inputs, #evalPerQuestionInputs) { gap: 16px 8px; padding-top: 6px; }
html[data-ui="v2"] :is(#per-question-marks-inputs, #evalPerQuestionInputs) > .relative > label {
  top: -8px;
  left: 6px;
  padding: 0 5px;
  background: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 16px;
}
html[data-ui="v2"] :is(#per-question-marks-inputs, #evalPerQuestionInputs) input { padding-top: 12px; font-weight: 700; }
html[data-ui="v2"] :is(#marks-sum-display, #evalMarksSumDisplay) { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; }

/* Upload targets: the visible <div> sits under a transparent <input type=file> */
html[data-ui="v2"] .relative > input[type="file"].absolute + div {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px dashed var(--ink);
  background: var(--surface);
  transition: background-color .12s ease, border-color .12s ease;
}
html[data-ui="v2"] .relative > input[type="file"].absolute + div::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: none;
  background-color: var(--ink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='square'%3E%3Cpath d='M12 16V4M6 10l6-6 6 6M4 20h16'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='square'%3E%3Cpath d='M12 16V4M6 10l6-6 6 6M4 20h16'/%3E%3C/svg%3E") center / contain no-repeat;
}
html[data-ui="v2"] .relative > input[type="file"][capture].absolute + div::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linejoin='miter'%3E%3Cpath d='M3 8h4l2-3h6l2 3h4v12H3z'/%3E%3Ccircle cx='12' cy='13' r='4'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linejoin='miter'%3E%3Cpath d='M3 8h4l2-3h6l2 3h4v12H3z'/%3E%3Ccircle cx='12' cy='13' r='4'/%3E%3C/svg%3E");
}
html[data-ui="v2"] .relative > input[type="file"].absolute + div > span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink);
}
html[data-ui="v2"] .relative > input[type="file"].absolute:not(:disabled):hover + div { background: var(--blue-wash); border-style: solid; border-color: var(--blue); }
html[data-ui="v2"] .relative > input[type="file"].absolute:not(:disabled):hover + div::before { background-color: var(--blue); }
html[data-ui="v2"] .relative > input[type="file"].absolute:not(:disabled):hover + div > span { color: var(--blue); }
html[data-ui="v2"] .relative > input[type="file"].absolute:focus-visible + div { outline: 2px solid var(--blue); outline-offset: 3px; }
html[data-ui="v2"] .relative > input[type="file"].absolute:disabled + div { border-style: solid; background: var(--wash); }

/* Uploaded files */
html[data-ui="v2"] :is(#qpList, #gtList) > div,
html[data-ui="v2"] .student-draft-row .flex-wrap > div {
  background: var(--surface);
  border: 2px solid var(--ink);
  padding: 4px 4px 4px 9px;
  font-size: 12.5px;
  font-weight: 600;
}
html[data-ui="v2"] :is(#qpList, #gtList) > div > button,
html[data-ui="v2"] .student-draft-row .flex-wrap > div > button,
html[data-ui="v2"] :is(#evalQpFileList, #evalGtFileList, #evalAsFileList) > div > button {
  width: 22px;
  height: 22px;
  margin-left: 4px;
  font-size: 15px;
}
html[data-ui="v2"] :is(#qpList, #gtList) > div > button:hover,
html[data-ui="v2"] .student-draft-row .flex-wrap > div > button:hover,
html[data-ui="v2"] :is(#evalQpFileList, #evalGtFileList, #evalAsFileList) > div > button:hover { background: #dc2626; color: #fff; }
html[data-ui="v2"] :is(#qpList, #gtList) > span { font-size: 13px; font-style: normal; }
html[data-ui="v2"] :is(#evalQpFileList, #evalGtFileList, #evalAsFileList) { margin-top: 8px; }
html[data-ui="v2"] :is(#evalQpFileList, #evalGtFileList, #evalAsFileList) > div {
  background: var(--surface);
  border: 2px solid var(--ink);
  padding: 5px 5px 5px 11px;
}
html[data-ui="v2"] :is(#evalQpFileList, #evalGtFileList, #evalAsFileList) > p { font-style: normal; }
html[data-ui="v2"] #pageUsageText { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

/* Processing state */
html[data-ui="v2"] #preprocessingSection > hr { border-top: 2px solid var(--ink); }
html[data-ui="v2"] #preprocessingTitle { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
html[data-ui="v2"] #preprocessingIndicator,
html[data-ui="v2"] #filesLockedIndicator > div { min-height: 44px; padding: 10px 14px; box-shadow: none; }
html[data-ui="v2"] #filesLockedIndicator > div { background: var(--ink); }
html[data-ui="v2"] #filesLockedIndicator > div :is(svg, span) { color: #fff; }

/* Next-step bar */
html[data-ui="v2"] #nextEvaluationSection { box-shadow: var(--shadow); }
html[data-ui="v2"] #nextEvaluationSection p { font-size: 14px; color: var(--body); }
html[data-ui="v2"] :is(#continueToEvalBtn, #viewResultsFromDetailBtn, #viewResultsFromEvalBtn) { min-height: 50px; }

/* Trial banner */
html[data-ui="v2"] #trialBanner { padding: 16px 18px; gap: 16px; }
html[data-ui="v2"] #trialRemainingText { font-family: var(--mono); font-size: 12px; font-weight: 500; margin-top: 4px; }
html[data-ui="v2"] #upgradeFromTrialBtn { min-height: 42px; padding: 0 18px; white-space: nowrap; }
html[data-ui="v2"] #upgradeFromTrialBtn:hover { background: var(--blue); }

/* Primary run buttons */
html[data-ui="v2"] :is(#evalRunBtn, #evaluateBtn) { min-height: 64px; font-size: 15px; letter-spacing: .1em; }
html[data-ui="v2"] :is(#saveConfigBtn, #lockFilesBtn, #saveAllStudentsBtn) { min-height: 50px; letter-spacing: .07em; text-transform: uppercase; }
html[data-ui="v2"] :is(#evalLoadingState, #loadingState) p { text-align: center; }
html[data-ui="v2"] #evalElapsed { font-family: var(--mono); font-size: 14px; color: var(--ink); }

/* Student drafts */
html[data-ui="v2"] #studentDraftQueue.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 12px; }
html[data-ui="v2"] .student-draft-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 8px;
  padding: 14px;
  background: var(--paper);
}
html[data-ui="v2"] .student-draft-row > :not(input) { grid-column: 1 / -1; }
@media (min-width: 480px) {
  html[data-ui="v2"] .student-draft-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
html[data-ui="v2"] .student-draft-row-header > span:first-child { font-family: var(--mono); color: var(--ink); letter-spacing: .06em; }
html[data-ui="v2"] .student-draft-row .flex-wrap { gap: 6px; margin-top: 8px; }
html[data-ui="v2"] #addAnotherStudentBtn { min-height: 46px; border-color: var(--subtle); }
html[data-ui="v2"] #addAnotherStudentBtn:hover { border-color: var(--ink); color: var(--ink); background: var(--surface); }

/* Student index: a ruled list */
html[data-ui="v2"] #studentListContainer .space-y-1\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 0; }
html[data-ui="v2"] #studentListContainer .space-y-1\.5 > div {
  min-height: 56px;
  padding: 10px 4px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
}
html[data-ui="v2"] #studentListContainer .space-y-1\.5 > div:hover { background: var(--paper); }
html[data-ui="v2"] #studentListContainer .space-y-1\.5 > div > div > span:first-child { font-family: var(--mono); color: var(--muted); }
html[data-ui="v2"] :is(.view-sheet-btn, .delete-student-btn) {
  text-decoration: none;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 11px;
  border: 2px solid transparent;
}
html[data-ui="v2"] .view-sheet-btn:hover { border-color: var(--blue); }
html[data-ui="v2"] .delete-student-btn:hover { border-color: #dc2626; }

/* Graded / locked */
html[data-ui="v2"] #gradedIndicator { box-shadow: var(--shadow); border-left-width: 6px; }
html[data-ui="v2"] .locked-badge { box-shadow: var(--shadow-xs); padding: 10px 16px; letter-spacing: .06em; }

/* Results */
html[data-ui="v2"] #resultsView main > section { padding: 0; box-shadow: var(--shadow); }
html[data-ui="v2"] #resultsView main > section > div:first-child { margin: 0; padding: 20px 22px; border-bottom: 2px solid var(--ink); }
html[data-ui="v2"] #resultsView main > section h2 { font-size: clamp(22px, 3vw, 28px); letter-spacing: -.04em; }
html[data-ui="v2"] #evalMetricsContainer { margin: 20px 22px 8px; }
html[data-ui="v2"] #sortControls { gap: 0; }
html[data-ui="v2"] #sortControls > button {
  border: 2px solid var(--ink);
  margin-left: -2px;
  padding: 8px 12px;
  color: var(--ink);
  letter-spacing: .07em;
}
html[data-ui="v2"] #sortControls > button:first-child { margin-left: 0; }
html[data-ui="v2"] #sortControls > button:hover { background: var(--wash); }
html[data-ui="v2"] #sortControls > button.bg-gray-200 { background: var(--ink); color: #fff; }
html[data-ui="v2"] #resultsContainer > p { padding: 22px; }
html[data-ui="v2"] #resultsContainer > div { margin: 0; padding: 16px 22px; border-bottom: 1px solid var(--line); }
html[data-ui="v2"] #resultsContainer > div:last-child { border-bottom: 0; }
html[data-ui="v2"] #resultsContainer > div > div:first-child:hover { opacity: 1; }
html[data-ui="v2"] #resultsContainer > div:hover { background: var(--paper); }
html[data-ui="v2"] #resultsContainer .font-bold.text-sm.block { font-size: 15px; }
html[data-ui="v2"] #resultsContainer .font-black.text-sm { font-size: 17px; font-variant-numeric: tabular-nums; }
html[data-ui="v2"] #resultsContainer span.border.flex-shrink-0 { text-transform: uppercase; letter-spacing: .05em; font-size: 10.5px; }
html[data-ui="v2"] :is(.view-sheet-results-btn, .view-report-btn) { min-height: 34px; border-color: var(--ink); }
html[data-ui="v2"] .view-sheet-results-btn { color: var(--ink); }
html[data-ui="v2"] .view-sheet-results-btn:hover { background: var(--ink); color: #fff; }
html[data-ui="v2"] .view-report-btn { background: var(--blue); color: #fff; }
html[data-ui="v2"] .view-report-btn:hover { background: var(--blue-deep); color: #fff; }
html[data-ui="v2"] #resultsContainer [id^="report-"] { margin-top: 16px; padding-top: 16px; border-top: 2px solid var(--ink); }

/* Score + per-question breakdown (results and free trial) */
html[data-ui="v2"] #evalScoreCard,
html[data-ui="v2"] [id^="report-"] > .bg-black { padding: 20px 22px; }
html[data-ui="v2"] :is(#evalScoreTotal, [id^="report-"] > .bg-black > .text-3xl) { font-size: 44px; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
html[data-ui="v2"] :is(#evalScorePercent, [id^="report-"] > .bg-black > p) { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; }
html[data-ui="v2"] [id^="report-"] > .border-t,
html[data-ui="v2"] #evalPerQuestionResults > div { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
html[data-ui="v2"] :is([id^="report-"], #evalPerQuestionResults) .font-bold.text-xs { font-size: 13px; font-weight: 800; }
html[data-ui="v2"] :is([id^="report-"], #evalPerQuestionResults) span.border { font-family: var(--mono); font-size: 11px; padding: 1px 7px; }
html[data-ui="v2"] :is([id^="report-"], #evalPerQuestionResults) p.text-xs { font-size: 14px; line-height: 1.6; color: var(--text); margin-top: 4px; max-width: 68ch; }
html[data-ui="v2"] #evalResultsSection > h2 { padding-bottom: 14px; border-bottom: 2px solid var(--ink); }

/* Modals */
html[data-ui="v2"] .modal-backdrop,
html[data-ui="v2"] #userGuidesModal { background: rgba(17, 17, 17, .6); animation: v2-fade .12s ease; }
html[data-ui="v2"] .modal-backdrop > div,
html[data-ui="v2"] #userGuidesModal > div { box-shadow: var(--shadow-lg); animation: v2-drop .16s var(--ease); }
html[data-ui="v2"] .modal-backdrop > div:not(#pricingModal > div) { padding: 26px; }
html[data-ui="v2"] .modal-backdrop h3 { font-size: 19px; letter-spacing: -.01em; }
html[data-ui="v2"] .modal-backdrop .flex.gap-3 > button { min-height: 48px; }
@media (min-width: 640px) {
  html[data-ui="v2"] #pricingModal > div { padding: 28px; }
}
html[data-ui="v2"] #pricingModal .grid > div .font-black { letter-spacing: -.03em; }
html[data-ui="v2"] .plan-card { transition: transform .12s var(--ease), box-shadow .12s var(--ease); }
html[data-ui="v2"] .plan-card:hover { transform: translate(-1px, -1px); box-shadow: var(--shadow); }
html[data-ui="v2"] #pricingModal .grid :is(button, #freePlanBtn) { min-height: 40px; }
html[data-ui="v2"] :is(#closePricingBtn, #closeUserGuidesModalBtn) {
  width: 34px;
  height: 34px;
  border: 2px solid var(--ink);
  color: var(--ink);
  line-height: 1;
}
html[data-ui="v2"] :is(#closePricingBtn, #closeUserGuidesModalBtn):hover { background: var(--ink); color: #fff; }

/* --------------------------------------------------------------------------
   7. Redesigned marketing pages (ui_v2/webpage/*.html)
   -------------------------------------------------------------------------- */
/* Same content edge as the nav and footer (max-w-6xl inside px-6) */
html[data-ui="v2"] .v2-wrap {
  width: 100%;
  max-width: calc(72rem + 48px);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
html[data-ui="v2"] .v2-section { padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(56px, 8vw, 104px); }
html[data-ui="v2"] .v2-section + .v2-section { padding-top: 0; }
html[data-ui="v2"] .v2-rule { border-bottom: 2px solid var(--ink); }

/* Type */
html[data-ui="v2"] .v2-label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
html[data-ui="v2"] .v2-h1 {
  font-size: clamp(2.4rem, 6vw, 4.75rem);
  font-weight: 900;
  line-height: .9;
  letter-spacing: -.055em;
  text-transform: uppercase;
}
html[data-ui="v2"] .v2-h2 {
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -.045em;
  text-transform: uppercase;
}
html[data-ui="v2"] .v2-h3 { font-size: 18px; font-weight: 800; letter-spacing: -.015em; line-height: 1.25; }
html[data-ui="v2"] .v2-lead { font-size: clamp(16px, 1.5vw, 19px); line-height: 1.55; color: var(--body); font-weight: 500; }
html[data-ui="v2"] .v2-text { font-size: 15px; line-height: 1.65; color: var(--body); }
html[data-ui="v2"] .v2-blue { color: var(--blue); }
html[data-ui="v2"] .v2-red { color: var(--red); }
html[data-ui="v2"] .v2-num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Section heading row: title left, aside right, ruled underneath */
html[data-ui="v2"] .v2-head {
  display: grid;
  gap: 12px;
  padding-bottom: 20px;
  margin-bottom: 32px;
  border-bottom: 2px solid var(--ink);
}
@media (min-width: 900px) {
  html[data-ui="v2"] .v2-head { grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); align-items: end; gap: 48px; }
}

/* Buttons */
html[data-ui="v2"] .v2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 24px;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform .12s var(--ease), box-shadow .12s var(--ease), background-color .12s ease, color .12s ease;
}
html[data-ui="v2"] .v2-btn:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-lg); }
html[data-ui="v2"] .v2-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
html[data-ui="v2"] .v2-btn--primary { background: var(--blue); color: #fff; }
html[data-ui="v2"] .v2-btn--primary:hover { background: var(--blue-deep); }
html[data-ui="v2"] .v2-btn--plain { background: var(--surface); color: var(--ink); }
html[data-ui="v2"] .v2-btn--light { background: var(--surface); color: var(--ink); border-color: var(--surface); box-shadow: 4px 4px 0 var(--blue); }
html[data-ui="v2"] .v2-btn--light:hover { box-shadow: 6px 6px 0 var(--blue); }
html[data-ui="v2"] .v2-btn--block { width: 100%; }
html[data-ui="v2"] .v2-btn--sm { min-height: 44px; padding: 0 18px; font-size: 12px; box-shadow: var(--shadow-sm); }
html[data-ui="v2"] .v2-btn:disabled { cursor: progress; transform: none; box-shadow: var(--shadow-xs); background: var(--ink); }
html[data-ui="v2"] .v2-btn.hidden { display: none; }

html[data-ui="v2"] .v2-link {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 2px;
}
html[data-ui="v2"] .v2-link:hover { color: var(--blue); border-bottom-color: var(--blue); }

/* Panel: the one raised surface */
html[data-ui="v2"] .v2-panel { background: var(--surface); border: 2px solid var(--ink); box-shadow: var(--shadow); }

/* Ledger: cells divided by 2px rules (the gap shows the ink behind) */
html[data-ui="v2"] .v2-ledger {
  display: grid;
  gap: 2px;
  background: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
}
html[data-ui="v2"] .v2-ledger > * { background: var(--surface); padding: 22px; }
@media (min-width: 640px) {
  html[data-ui="v2"] .v2-ledger > * { padding: 26px 28px; }
}
html[data-ui="v2"] .v2-ledger--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1024px) {
  html[data-ui="v2"] .v2-ledger--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 640px) and (max-width: 1023px) {
  html[data-ui="v2"] .v2-ledger--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  html[data-ui="v2"] .v2-ledger--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  html[data-ui="v2"] .v2-ledger--split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* Figures */
html[data-ui="v2"] .v2-stat {
  display: block;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -.055em;
  font-variant-numeric: tabular-nums;
}
html[data-ui="v2"] .v2-stat-note { display: block; margin-top: 12px; font-size: 14px; line-height: 1.45; font-weight: 500; color: var(--body); }

/* Comparison bars */
html[data-ui="v2"] .v2-bar { height: 20px; border: 2px solid var(--ink); background: var(--wash); }
html[data-ui="v2"] .v2-bar > span { display: block; height: 100%; min-width: 8px; }
html[data-ui="v2"] .v2-bar--red > span { background: var(--red); }
html[data-ui="v2"] .v2-bar--blue > span { background: var(--blue); }

/* Index: numbered, ruled rows */
html[data-ui="v2"] .v2-index { border-top: 2px solid var(--ink); }
html[data-ui="v2"] .v2-index > li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px 16px;
  padding: 24px 0;
  border-bottom: 1px solid var(--subtle);
}
html[data-ui="v2"] .v2-index > li:last-child { border-bottom: 2px solid var(--ink); }
@media (min-width: 900px) {
  html[data-ui="v2"] .v2-index > li { grid-template-columns: 72px minmax(0, 18rem) minmax(0, 1fr); gap: 32px; padding: 28px 0; align-items: baseline; }
}
html[data-ui="v2"] .v2-index > li > .v2-num { font-size: 13px; font-weight: 700; color: var(--blue); padding-top: 3px; }
html[data-ui="v2"] .v2-index > li > p { grid-column: 2; }
@media (min-width: 900px) {
  html[data-ui="v2"] .v2-index > li > p { grid-column: auto; }
}

/* Figure with caption */
html[data-ui="v2"] .v2-figure { background: var(--surface); border: 2px solid var(--ink); box-shadow: var(--shadow-lg); }
html[data-ui="v2"] .v2-figure img { display: block; width: 100%; border-bottom: 2px solid var(--ink); }
html[data-ui="v2"] .v2-figure figcaption { padding: 16px 18px; }
html[data-ui="v2"] .v2-figure figcaption p { font-size: 14px; line-height: 1.6; color: var(--text); }

/* Pricing sheet */
html[data-ui="v2"] .v2-plan { display: flex; flex-direction: column; }
html[data-ui="v2"] .v2-plan__price {
  font-size: clamp(2.3rem, 3.6vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
html[data-ui="v2"] .v2-plan__per { font-size: 13px; font-weight: 700; letter-spacing: 0; color: var(--muted); }
html[data-ui="v2"] .v2-plan ul { border-top: 1px solid var(--line); }
html[data-ui="v2"] .v2-plan li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--text);
}
html[data-ui="v2"] .v2-plan li > b { color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }

/* Accordions */
html[data-ui="v2"] .v2-acc > button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  text-align: left;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
html[data-ui="v2"] .v2-acc > button:hover { background: var(--paper); }
html[data-ui="v2"] .v2-acc > button > span:last-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: none;
  border: 2px solid var(--ink);
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
}
html[data-ui="v2"] .v2-acc > div { border-top: 2px solid var(--ink); padding: 22px; }
html[data-ui="v2"] .v2-acc dt { font-family: var(--mono); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); }
html[data-ui="v2"] .v2-acc dd { margin-top: 4px; font-size: 15px; line-height: 1.6; color: var(--text); }

/* Closing strip */
html[data-ui="v2"] .v2-strip { background: var(--ink); color: #fff; }

/* Workflow page */
html[data-ui="v2"] .v2-demo picture img { display: block; width: 100%; border: 2px solid var(--ink); }
html[data-ui="v2"] .v2-demo [id^="result-"] {
  border: 2px solid var(--ink);
  border-left-width: 6px;
  background: var(--paper);
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
}
html[data-ui="v2"] .v2-pipeline > * { display: flex; flex-direction: column; gap: 10px; }
html[data-ui="v2"] .v2-pipeline .v2-num { font-size: 12px; font-weight: 700; color: var(--muted); }
html[data-ui="v2"] .v2-pipeline > .v2-pipeline__hot { background: var(--blue); color: #fff; }
html[data-ui="v2"] .v2-pipeline > .v2-pipeline__hot :is(.v2-num, .v2-text) { color: var(--blue-tint); }
html[data-ui="v2"] .v2-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 2px solid var(--ink); box-shadow: var(--shadow); }
html[data-ui="v2"] .v2-table :is(th, td) { padding: 16px 18px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
html[data-ui="v2"] .v2-table thead th { border-bottom: 2px solid var(--ink); }
html[data-ui="v2"] .v2-table tr:last-child td { border-bottom: 0; }

/* Login */
html[data-ui="v2"] .v2-auth { display: grid; gap: 40px; align-items: start; }
@media (min-width: 1024px) {
  html[data-ui="v2"] .v2-auth { grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); gap: 80px; align-items: center; }
}
/* Tab strip: app.js hides it with .hidden, so its display comes from Tailwind's grid class */
html[data-ui="v2"] .v2-auth-tabs { border-bottom: 2px solid var(--ink); margin: -24px -24px 24px; }
html[data-ui="v2"] .v2-auth-tabs > button {
  min-height: 52px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--wash);
}
html[data-ui="v2"] .v2-auth-tabs > button + button { border-left: 2px solid var(--ink); }
html[data-ui="v2"] .v2-auth-tabs > button.text-blue-600 { background: var(--surface); color: var(--ink); box-shadow: inset 0 -4px 0 var(--blue); }
html[data-ui="v2"] .v2-auth-tabs > button.text-gray-500:hover { color: var(--ink); }

/* --------------------------------------------------------------------------
   8. Motion - feedback only
   -------------------------------------------------------------------------- */
@keyframes v2-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes v2-drop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html[data-ui="v2"] *, html[data-ui="v2"] *::before, html[data-ui="v2"] *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   9. Small screens
   -------------------------------------------------------------------------- */
@media (max-width: 639px) {
  /* 16px stops iOS from zooming into focused fields */
  html[data-ui="v2"] :is(input:not([type="file"]), select, textarea).border-2 { font-size: 16px; }
  html[data-ui="v2"] .v2-actions > .v2-btn { width: 100%; }
  html[data-ui="v2"] .modal-backdrop > div:not(#pricingModal > div) { padding: 20px; }
  html[data-ui="v2"] #resultsContainer > div { padding: 14px 16px; }
  html[data-ui="v2"] #resultsView main > section > div:first-child { padding: 16px; }
  html[data-ui="v2"] #evalMetricsContainer { margin: 16px 16px 8px; }
}
