:root {
  --paper: #fffdf6;
  --ink: #172018;
  --muted: #5f6d62;
  --line: #cfd9cc;
  --green: #1d3b13;
  --green-2: #2f6f3e;
  --soft-green: #edf4e7;
  --blue: #236d8c;
  --mango: #d58a27;
  --berry: #a7435d;
  --sand: #f7f4ea;
  --radius: 8px;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  color: var(--ink);
  background: var(--sand);
}

body {
  font-size: 15px;
  line-height: 1.42;
}

.page {
  width: min(100%, 210mm);
  min-height: 297mm;
  margin: 16px auto;
  padding: 16mm;
  background: var(--paper);
  box-shadow: 0 12px 32px rgba(23, 32, 24, .12);
}

.page + .page {
  margin-top: 20px;
}

.top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  border-bottom: 2px solid var(--green);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--green-2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: 31px;
  line-height: 1.05;
}

h2 {
  margin: 16px 0 8px;
  font-size: 20px;
}

h3 {
  margin: 12px 0 6px;
  font-size: 16px;
}

.subtitle {
  margin: 0;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  background: var(--soft-green);
  color: var(--green);
  font-weight: 800;
  white-space: nowrap;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 10px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.box,
.note,
.task,
.answer,
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 10px;
  background: #fffef9;
}

.grid-2 a.box {
  color: inherit;
  text-decoration: none;
}

.grid-2 a.box h2 {
  color: var(--green);
}

.grid-2 a.box p {
  color: var(--muted);
}

.grid-2 a.box:focus-visible {
  outline: 3px solid rgba(47, 111, 62, .35);
  outline-offset: 3px;
}

.note {
  background: var(--soft-green);
}

.answer {
  background: #f2efe4;
}

.callout {
  border-left: 5px solid var(--mango);
  padding: 9px 10px;
  background: rgba(213, 138, 39, .11);
}

.danger {
  border-left-color: var(--berry);
  background: rgba(167, 67, 93, .1);
}

.success {
  border-left-color: var(--green-2);
  background: rgba(47, 111, 62, .1);
}

ul,
ol {
  margin: 6px 0 0;
  padding-left: 20px;
}

li {
  margin: 3px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 12px;
}

th,
td {
  border: 1px solid var(--line);
  padding: 7px 8px;
  vertical-align: top;
}

th {
  background: var(--soft-green);
  text-align: left;
}

.small {
  color: var(--muted);
  font-size: 12px;
}

.line {
  min-height: 24px;
  border-bottom: 1px solid #98a693;
}

.lines {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.checklist {
  list-style: none;
  padding-left: 0;
}

.checklist li::before {
  content: "□";
  display: inline-block;
  width: 1.3em;
  color: var(--green);
  font-weight: 900;
}

.stars {
  display: inline-flex;
  gap: 4px;
  font-weight: 900;
}

.star-green {
  color: var(--green-2);
}

.mission-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.mission {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px;
}

.num {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-weight: 900;
}

.nav {
  width: min(100%, 210mm);
  margin: 16px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav a,
.print-button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--green);
  padding: 8px 10px;
  font-weight: 800;
  text-decoration: none;
}

.print-button {
  cursor: pointer;
  font: inherit;
}

.cut-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cut-card {
  min-height: 62mm;
  border: 1.5px dashed #92a18e;
  border-radius: var(--radius);
  padding: 10px;
  background: #fffef9;
}

.cut-card h2 {
  margin-top: 0;
}

.page-break {
  break-before: page;
}

@page {
  size: A4;
  margin: 12mm;
}

@media print {
  html,
  body {
    background: white;
  }

  .page {
    width: auto;
    min-height: auto;
    margin: 0;
    padding: 0;
    box-shadow: none;
    break-after: page;
  }

  .page:last-child {
    break-after: auto;
  }

  .nav {
    display: none;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

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

@media (max-width: 720px) {
  .page {
    margin: 0;
    padding: 18px;
  }

  .top,
  .grid-2,
  .grid-3,
  .mission-list,
  .cut-grid {
    grid-template-columns: 1fr;
  }
}
