/* Shared print theme for archive readers. Scoped to problem layouts only. */
:is(.workspace-container, .problem-page-shell) {
  --problem-canvas: #eee7d9 !important;
  --problem-canvas-muted: #e3dccd !important;
  --problem-surface: #f3eddf !important;
  --problem-surface-strong: #f7f1e5 !important;
  --problem-surface-subtle: #ccd7de !important;
  --problem-border: #34392e40 !important;
  --problem-border-strong: #34392e70 !important;
  --problem-text: #191b19 !important;
  --problem-muted: #555649 !important;
  --problem-accent: #9f3d28 !important;
  --problem-accent-strong: #84351f !important;
  --problem-accent-soft: #e9c96f55 !important;
  --problem-success: #276443 !important;
  --problem-error: #a32f28 !important;
  --problem-radius: 0 !important;
  --problem-radius-sm: 0 !important;
  --font-title: 'DM Serif Display', Georgia, serif !important;
  --font-body: Georgia, serif !important;
  --font-ui: 'DM Sans', Arial, sans-serif !important;
  --theme-primary: #9f3d28 !important;
  --theme-secondary: #53798b !important;
  --theme-primary-glow: transparent !important;
  --theme-secondary-glow: transparent !important;
  --theme-bg-glow: transparent !important;
  color-scheme: light;
  color: var(--problem-text) !important;
  background: #eee7d9 url('/archive-print-v1/assets/paper.png') repeat !important;
  background-size: 700px !important;
  font-family: Georgia, serif !important;
  padding-top: 128px !important;
}
:is(.workspace-container, .problem-page-shell) :is(h1,h2,h3,h4,.font-display) {
  font-family: 'DM Serif Display', Georgia, serif !important;
  font-weight: 400 !important;
  color: #191b19 !important;
  text-transform: none;
}
:is(.workspace-container, .problem-page-shell) h1 {
  font-size: clamp(2.5rem, 5.7vw, 5.4rem) !important;
  line-height: .98 !important;
  letter-spacing: -.045em !important;
  overflow-wrap: anywhere;
}
:is(.workspace-container, .problem-page-shell) h1 span { color: #191b19 !important; font-style: italic; }
:is(.workspace-container, .problem-page-shell) h2 { font-size: clamp(1.65rem, 3vw, 2.5rem) !important; line-height: 1.12; }
:is(.workspace-container, .problem-page-shell) .font-serif { font-family: Georgia, serif !important; }
:is(.workspace-container, .problem-page-shell) .font-sans { font-family: 'DM Sans', Arial, sans-serif !important; }
/* Legacy papers use utility colors; preserve semantic answer feedback below. */
:is(.workspace-container, .problem-page-shell) :is([class*='text-slate-'],[class*='text-gray-'],[class*='text-zinc-'],[class*='text-stone-'],[class*='text-white']) { color: #292b25 !important; }
:is(.workspace-container, .problem-page-shell) :is([class*='text-blue-'],[class*='text-indigo-'],[class*='text-orange-']) { color: #84351f !important; }
:is(.workspace-container, .problem-page-shell) :is([class*='bg-slate-'],[class*='bg-gray-'],[class*='bg-zinc-'],[class*='bg-stone-'],[class*='bg-white'],.problem-surface,.problem-question-block,.problem-utility-card) {
  background-color: #f3eddf !important;
  background-image: none !important;
  border-color: #34392e40 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
:is(.workspace-container, .problem-page-shell) :is([class*='rounded-xl'],[class*='rounded-2xl'],[class*='rounded-3xl'],.problem-surface,.problem-question-block,.problem-utility-card,.problem-control,.problem-select) { border-radius: 0 !important; box-shadow: none !important; }
:is(.workspace-container, .problem-page-shell) :is([class*='border-slate-'],[class*='border-gray-'],[class*='border-stone-']) { border-color: #34392e40 !important; }
.workspace-container > [class*='max-w-'] { max-width: 1180px; }
/* Blue title sheet, yellow references, terracotta section dividers. */
.workspace-container.workspace-container div:has(> h1), .problem-page-shell.problem-page-shell header.problem-surface {
  position: relative;
  background: #a8c4d8 url('/archive-print-v1/assets/paper.png') repeat !important;
  background-size: 700px !important;
  background-blend-mode: multiply;
  border: 0 !important;
  padding: clamp(1.5rem, 4vw, 3.5rem) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.workspace-container.workspace-container h1 span { color: #191b19 !important; }
.workspace-container div:has(> h1) > [class*='absolute'][class*='top-0']:not([class*='pointer-events-none']) {
  position: static !important; display: table; margin-bottom: 1.25rem;
  background: transparent !important; color: #292b25 !important;
  padding: 0 !important; letter-spacing: .18em; font-weight: 400;
}
.workspace-container div:has(> h1) > p { max-width: 70ch; font-size: 1.08rem; }
.workspace-container [class*='grid']:has(> span.col-span-full) { background: #e9c96f !important; padding: 1.5rem !important; }
.workspace-container div:has(> h2) { border-color: #9f3d28 !important; }
.workspace-container div:has(> h2):not([id]):not([class*='fixed']) > h2 { padding-block: .4rem; }
.workspace-container [id^='qblock-'] { border: 1px solid #34392e55 !important; background: #f3eddf !important; border-radius: 0 !important; box-shadow: none !important; }
.workspace-container [id^='qblock-'] > div:first-child { background: #c96950 !important; color: #191b19 !important; border-color: #34392e40 !important; }
.workspace-container [id^='qblock-'] > div:first-child > span:first-child { font-size: 1.7rem; }
.workspace-container [id^='qblock-'] > div:first-child > span:last-child { background: transparent !important; color: #191b19 !important; border: 0 !important; }
.workspace-container > a[href='#/archive'] {
  position: static !important; display: block; width: min(100% - 3rem, 1116px); margin: 0 auto 1.5rem;
}
.workspace-container > a[href='#/archive'] button { background: transparent !important; border: 0 !important; border-bottom: 1px solid #34392e70 !important; border-radius: 0 !important; box-shadow: none !important; padding: .5rem 0 !important; }
.workspace-container > a[href='#/archive'] span { display: inline !important; }
:is(.workspace-container, .problem-page-shell) :is(input,textarea,select,[contenteditable='true']) {
  color: #191b19 !important; background: #faf5e9 !important; border-color: #34392e70 !important; border-radius: 0 !important; box-shadow: none !important;
}
:is(.workspace-container, .problem-page-shell) :is(input,textarea)::placeholder { color: #696859 !important; }
:is(.workspace-container, .problem-page-shell) :is(button,a,input,textarea,select,[contenteditable='true']):focus-visible { outline: 2px solid #84351f !important; outline-offset: 4px; }
:is(.workspace-container, .problem-page-shell) button { min-height: 36px; }
:is(.workspace-container, .problem-page-shell) :is(button[class*='bg-blue-600'],button[class*='bg-orange-600'],.problem-control--primary) { background: #9f3d28 !important; color: #fff7e8 !important; border-color: #9f3d28 !important; }
:is(.workspace-container, .problem-page-shell) :is([class*='text-emerald-'],[class*='text-green-']) { color: #276443 !important; }
:is(.workspace-container, .problem-page-shell) :is([class*='text-red-'],[class*='text-rose-']) { color: #a32f28 !important; }
:is(.workspace-container, .problem-page-shell) :is([class*='bg-emerald-'],[class*='bg-green-']) { background-color: #deead6 !important; }
:is(.workspace-container, .problem-page-shell) :is([class*='bg-red-'],[class*='bg-rose-']) { background-color: #f4ded2 !important; }
:is(.workspace-container, .problem-page-shell) :is([class*='border-emerald-'],[class*='border-green-']) { border-color: #276443 !important; }
:is(.workspace-container, .problem-page-shell) :is([class*='border-red-'],[class*='border-rose-']) { border-color: #a32f28 !important; }
.problem-page-shell .problem-stat-surface { background: #e9c96f !important; }
.problem-page-shell aside.problem-surface { background: #e9c96f !important; }
.problem-page-shell .problem-reader-panel__bar { background: #c96950; color: #191b19; }
:is(.workspace-container, .problem-page-shell) :is(h1,h2,h3,h4).font-sans { font-family: 'DM Serif Display', Georgia, serif !important; }
.problem-page-shell aside[aria-labelledby='paper-index-heading'] { background: #e9c96f !important; padding: 1.25rem; }
:is(.workspace-container, .problem-page-shell) .katex-display { max-width: 100%; overflow-x: auto; overflow-y: hidden; padding-block: .3rem; }
:is(.workspace-container, .problem-page-shell) img { max-width: 100%; }
:is(.workspace-container, .problem-page-shell) [class*='pointer-events-none'][class*='blur'] { display: none; }
@media(max-width: 640px) {
  :is(.workspace-container, .problem-page-shell) { padding-top: 100px !important; }
  .workspace-container [id^='qblock-'] > div { padding: 1rem !important; }
  .workspace-container div:has(> h1) { padding: 1.5rem !important; }
  .workspace-container div:has(> h1) h1 { font-size: 2.65rem !important; }
  :is(.workspace-container, .problem-page-shell) :is(h1,h2,h3) { overflow-wrap: anywhere; }
  .problem-page-shell header.problem-surface { gap: 1.5rem; }
  .workspace-container [class*='grid']:has(> span.col-span-full) { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; }
}
@media(prefers-reduced-motion: reduce) {
  :is(.workspace-container, .problem-page-shell), :is(.workspace-container, .problem-page-shell) * { scroll-behavior: auto !important; transition-duration: 0s !important; }
}
