:root {
  --accent: #1d5bd4;
  --brand-secondary: #34d399;
  --brand-accent: #f59e0b;
  --bg: #eef3fb;
  --paper: #ffffff;
  --ink: #1a1f36;
  --muted: #6b7280;
  --line: #e5e9f5;
  --soft: #f8faff;
  --success: #10b981;
  --danger: #dc2626;
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 28px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.14);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.68), transparent 44%),
    repeating-linear-gradient(45deg, rgba(69, 69, 164, 0.035) 0 1px, transparent 1px 18px),
    var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

.paper-actions {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.paper-actions button,
.paper-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  padding: 0 14px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}

.paper-pack {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.paper-page {
  position: relative;
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 11mm;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), transparent 44%),
    repeating-linear-gradient(45deg, rgba(69, 69, 164, 0.035) 0 1px, transparent 1px 18px),
    var(--paper);
  box-shadow: var(--shadow-lg);
  page-break-after: always;
}

.paper-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 16mm;
  padding-bottom: 6mm;
  border-bottom: 1px solid var(--line);
}

.paper-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 58mm;
  color: var(--accent);
  font-size: 10pt;
  font-weight: 900;
}

.paper-brand img {
  width: auto;
  max-width: 22mm;
  height: 14mm;
  object-fit: contain;
}

.paper-progress {
  flex: 1;
  height: 2mm;
  border-radius: 999px;
  background: #f0f2f9;
  overflow: hidden;
}

.paper-progress span {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--brand-secondary));
}

.paper-score {
  color: var(--brand-secondary);
  font-size: 10pt;
  font-weight: 900;
}

.paper-decorations {
  position: absolute;
  right: 8mm;
  bottom: 8mm;
  z-index: 0;
  max-width: 170mm;
  color: rgba(15, 23, 42, 0.08);
  font-size: 34pt;
  letter-spacing: 0.16em;
  line-height: 1.2;
  transform: rotate(-4deg);
  pointer-events: none;
}

.paper-intro-card,
.paper-note,
.paper-section-header {
  position: relative;
  z-index: 1;
}

.paper-intro-card {
  margin-top: 18mm;
  padding: 14mm;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.86)),
    var(--paper);
  box-shadow: var(--shadow-md);
}

.paper-eyebrow,
.paper-column-title {
  margin: 0 0 3mm;
  color: var(--accent);
  font-size: 8pt;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.paper-intro-card h1 {
  max-width: 160mm;
  margin: 0;
  color: var(--ink);
  font-size: 31pt;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.paper-lead {
  max-width: 155mm;
  margin: 6mm 0 0;
  color: var(--muted);
  font-size: 11pt;
  font-weight: 700;
  line-height: 1.6;
}

.paper-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4mm;
  margin-top: 10mm;
}

.paper-flow article {
  display: grid;
  grid-template-columns: 10mm minmax(0, 1fr);
  gap: 3mm;
  align-items: center;
  min-height: 24mm;
  padding: 4mm;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.paper-flow strong,
.paper-order-slot strong,
.paper-step-card header strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.paper-flow strong {
  width: 10mm;
  height: 10mm;
}

.paper-flow span {
  font-size: 9pt;
  font-weight: 800;
  line-height: 1.35;
}

.paper-note {
  margin-top: 12mm;
  padding: 8mm;
  border: 1px solid var(--accent);
  border-radius: 18px;
  background: color-mix(in srgb, var(--paper) 88%, var(--accent-soft, #eef3fb));
}

.paper-note h2 {
  margin: 0 0 4mm;
  color: var(--accent);
  font-size: 15pt;
}

.paper-note li {
  margin: 2mm 0;
  font-size: 10.5pt;
  font-weight: 700;
}

.paper-section-header {
  margin-bottom: 6mm;
}

.paper-section-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22pt;
  letter-spacing: -0.035em;
}

.paper-order-layout {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 7mm;
}

.paper-order-cards,
.paper-order-slots {
  display: grid;
  gap: 3mm;
}

.paper-order-cards {
  grid-template-columns: repeat(2, 1fr);
}

.paper-order-card {
  min-height: 24mm;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4mm;
  border: 1.5px dashed var(--step-color, var(--accent));
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-align: center;
  font-size: 10.2pt;
  font-weight: 900;
  line-height: 1.25;
  break-inside: avoid;
}

.paper-order-slots {
  grid-template-columns: repeat(2, 1fr);
}

.paper-order-slot {
  min-height: 24mm;
  display: grid;
  grid-template-columns: 10mm minmax(0, 1fr);
  align-items: center;
  gap: 3mm;
  padding: 4mm;
  border: 2px dashed rgba(107, 114, 128, 0.32);
  border-radius: 14px;
  background: var(--soft);
  color: var(--muted);
  font-size: 9pt;
  font-weight: 850;
}

.paper-order-slot strong,
.paper-step-card header strong {
  width: 10mm;
  height: 10mm;
}

.paper-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4mm;
}

.paper-step-card {
  overflow: hidden;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
    var(--paper);
  box-shadow: var(--shadow-sm);
  break-inside: avoid;
}

.paper-step-card header {
  display: flex;
  align-items: center;
  gap: 3mm;
  min-height: 18mm;
  padding: 3mm;
  background: var(--step-color, var(--accent));
  color: #fff;
}

.paper-step-card h3 {
  margin: 0;
  font-size: 9.6pt;
  line-height: 1.2;
}

.paper-step-body {
  display: grid;
  gap: 2.5mm;
  padding: 3mm;
}

.paper-drop-slot {
  min-height: 16mm;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5mm;
  border: 1.5px dashed color-mix(in srgb, var(--step-color, var(--accent)) 40%, white);
  border-radius: 10px;
  background: color-mix(in srgb, var(--step-color, var(--accent)) 5%, white);
  color: color-mix(in srgb, var(--step-color, var(--accent)) 70%, #6b7280);
  font-size: 8pt;
  font-weight: 800;
  text-align: center;
}

.paper-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4mm;
}

.paper-action-card {
  position: relative;
  min-height: 74mm;
  padding: 7mm 5mm 5mm;
  border: 2px dashed var(--accent);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
    var(--paper);
  box-shadow: var(--shadow-sm);
  break-inside: avoid;
}

.paper-action-card small {
  position: absolute;
  top: -3mm;
  right: 6mm;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  padding: 1.4mm 4mm;
  font-size: 7pt;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.paper-action-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 12pt;
  line-height: 1.24;
}

.paper-action-card p {
  margin: 4mm 0 0;
  color: #5a6275;
  font-size: 9pt;
  font-weight: 700;
  line-height: 1.45;
}

.correction-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 8.5pt;
}

.correction-table th,
.correction-table td {
  border-bottom: 1px solid var(--line);
  padding: 2.5mm;
  text-align: left;
  vertical-align: top;
}

.correction-table tr:last-child td {
  border-bottom: 0;
}

.correction-table th {
  background: var(--accent);
  color: #fff;
}

@page {
  size: A4;
  margin: 0;
}

@media print {
  body {
    background: #fff;
  }

  .paper-pack {
    gap: 0;
    padding: 0;
  }

  .paper-page {
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    border: 0;
    box-shadow: none;
  }

  .no-print {
    display: none !important;
  }
}

@media screen and (max-width: 820px) {
  .paper-pack {
    padding: 10px;
  }

  .paper-page {
    width: 100%;
    min-height: auto;
    padding: 18px;
  }

  .paper-flow,
  .paper-order-layout,
  .paper-board,
  .paper-card-grid {
    grid-template-columns: 1fr;
  }
}
