.atelier-head {
  padding: 42px 0 0;
  background: linear-gradient(120deg, var(--surface), var(--bg));
  border-bottom: 1px solid var(--border);
}
.atelier-head .eyebrow {
  display: block;
  margin-top: 24px;
}
.atelier-head h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  margin: 10px 0;
}
.atelier-tabs {
  display: flex;
  gap: 24px;
  margin-top: 28px;
  overflow: auto;
}
.atelier-tabs a {
  padding: 16px 4px;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  color: var(--muted);
}
.atelier-tabs a[aria-current] {
  color: var(--c-primary);
  border-color: var(--c-primary);
  font-weight: 700;
}
.atelier-layout {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 32px;
  padding-top: 32px;
  padding-bottom: 64px;
  align-items: start;
}
.atelier-form {
  padding: 28px;
}
.atelier-form h2,
.preview-toolbar h2 {
  font-size: 1.35rem;
}
.atelier-form hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}
.atelier-form textarea {
  font-family: inherit;
  resize: vertical;
}
.atelier-form .grid-2 {
  gap: 14px;
}
.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.paper {
  background: white;
  color: #222;
  min-height: 580px;
  padding: 36px;
  box-shadow: 0 10px 40px #2015540d;
  border: 1px solid #e0dfe8;
  border-radius: 5px;
  overflow-wrap: anywhere;
  font-family: Arial, sans-serif;
  font-size: 13px;
}
.paper h2 {
  font-size: 18px;
  color: #25213b;
  text-align: center;
}
.paper h3 {
  color: #25213b;
}
.paper table {
  border-collapse: collapse;
  width: 100%;
  margin: 24px 0;
  font-size: 12px;
}
.paper th,
.paper td {
  border: 1px solid #b8b5c6;
  padding: 10px;
  vertical-align: top;
  white-space: pre-wrap;
}
.paper th {
  background: #f1edff;
}
.preview-empty {
  display: grid;
  place-content: center;
  text-align: center;
  min-height: 460px;
  color: #777;
}
.preview-empty svg {
  margin: auto;
  width: 40px;
  height: 40px;
  color: #6244dd;
}
.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 12px;
}
.question-choice {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 10px 0;
  display: flex;
  align-items: start;
  gap: 10px;
  overflow-wrap: anywhere;
}
.question-choice input {
  margin-top: 6px;
}
.work-error {
  color: #c52545;
}
.answer-page {
  break-before: page;
  margin-top: 40px;
  border-top: 1px dashed #ddd;
  padding-top: 20px;
}
.exam-question {
  white-space: pre-wrap;
  margin: 24px 0 70px;
}
.atelier-form details {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.atelier-form summary {
  cursor: pointer;
  font-weight: 600;
}
.atelier-form [hidden] {
  display: none !important;
}
@media (max-width: 980px) {
  .atelier-layout {
    grid-template-columns: 1fr;
  }
  .paper {
    min-height: 450px;
  }
}
@media (max-width: 540px) {
  .atelier-form,
  .paper {
    padding: 20px;
  }
  .preview-toolbar {
    display: block;
  }
  .atelier-tabs {
    gap: 16px;
  }
  .paper th,
  .paper td {
    padding: 5px;
    font-size: 10px;
  }
}
@media print {
  @page {
    size: A4;
    margin: 16mm;
  }
  body {
    background: white;
  }
  body > *:not(main),
  main > *:not(.atelier-layout),
  .atelier-layout > *:not(.atelier-preview),
  .atelier-preview > *:not(.paper) {
    display: none !important;
  }
  .atelier-layout {
    display: block;
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: none;
  }
  .paper {
    border: 0;
    box-shadow: none;
    padding: 0;
    min-height: 0;
  }
  .paper thead {
    display: table-header-group;
  }
  .paper tr,
  .exam-question {
    break-inside: avoid;
  }
  .answer-page {
    border: 0;
  }
}
