/* Main CSS - Reset & Variables */

:root {
  /* Color Palette - "Calm, precise" */
  --color-paper: #ffce00;
  /* Replaced default paper with new yellow */
  --color-ink: #1a1a1a;
  --color-accent: #0055ff;
  /* Analytical Blue */
  --color-error: #ff3333;
  /* Problematic/collision */
  --color-grid: #e0e0e0;

  /* Spacing */
  --space-xs: 4px;
  --space-s: 8px;
  --space-m: 16px;
  --space-l: 24px;
  --space-xl: 48px;
  --space-xxl: 96px;

  /* Layout */
  --page-width: 210mm;
  /* A4 width */
  --page-height: 297mm;
  /* A4 height */
  --margin-inner: 20mm;
  --margin-outer: 20mm;
}

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

body {
  margin: 0;
  padding: 0;
  background-color: #ffce00;
  /* New global workspace background */
  color: var(--color-ink);
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
  word-spacing: 0.05em;
}

/* Print View Container */
.workbook-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px;
}

/* A4 Page Simulation on Screen */
.sheet {
  width: var(--page-width);
  height: var(--page-height);
  background: var(--color-paper);
  padding: var(--margin-inner);
  margin-bottom: 40px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  /* Ensure content stays within page */
}

@media print {
  body {
    background: none;
  }

  .workbook-container {
    padding: 0;
    display: block;
  }

  .sheet {
    box-shadow: none;
    margin: 0;
    break-after: page;
  }
}