* { box-sizing: border-box; }

:root {
  color-scheme: light;
  --ink: #111;
  --line: #1f2937;
  --muted: #5b6472;
  --paper: #fff;
  --screen: #edf2f7;
  --accent: #0f6fa9;
}

@page {
  size: A4;
  margin: 1.8cm 1.7cm 1.8cm 2cm;
}

html { background: var(--screen); }

body {
  margin: 0;
  padding: 28px 16px 56px;
  color: var(--ink);
  background: var(--screen);
  font: 14pt/1.45 "Times New Roman", Times, serif;
}

.toolbar {
  position: sticky;
  z-index: 10;
  top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: min(21cm, calc(100% - 16px));
  margin: 0 auto 14px;
  padding: 10px 12px;
  border: 1px solid #d8e0e9;
  border-radius: 12px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 7px 22px rgba(34, 52, 72, .12);
  font: 600 14px/1.2 "Segoe UI", Arial, sans-serif;
}

.toolbar a,
.toolbar button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid #b8c9d8;
  border-radius: 9px;
  color: #174c6e;
  background: #fff;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.toolbar button {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.page {
  width: min(21cm, 100%);
  min-height: 29.7cm;
  margin: 0 auto;
  padding: 1.8cm 1.7cm 1.8cm 2cm;
  background: var(--paper);
  box-shadow: 0 16px 45px rgba(32, 46, 62, .16);
}

h1 {
  margin: 0 0 .9em;
  text-align: center;
  font-size: 16pt;
  line-height: 1.25;
  text-transform: uppercase;
}

p { margin: 0 0 .4em; }
ul { margin: .35em 0 .65em; padding-left: 1.45em; }
li { margin-bottom: .25em; text-align: justify; }

.info-row { margin-bottom: .45em; }
.label,
.section-title,
.activity-title,
.subsection-title { font-weight: bold; }

section { margin-top: 1em; }
.section-title { margin-bottom: .4em; }
.subsection-title { margin-top: .65em; }

.activity {
  margin: .85em 0 1em;
  break-inside: avoid;
  page-break-inside: avoid;
}

.activity-title { margin-bottom: .3em; }
.activity-name {
  margin: .2em 0 .45em;
  font-weight: 600;
  font-style: italic;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  width: 50%;
  padding: .42em .5em;
  border: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

th { text-align: center; }
td ul { margin-top: 0; margin-bottom: 0; }

.adjustment {
  min-height: 3.5em;
  padding: .35em 0;
}

@media (max-width: 720px) {
  body { padding: 12px 6px 36px; }
  .page { padding: 28px 20px; }
  .toolbar { width: calc(100% - 12px); }
}

@media print {
  html,
  body { background: #fff; }
  body { padding: 0; }
  .toolbar { display: none !important; }
  .page {
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }
  a { color: inherit; text-decoration: none; }
}

.hoi-dap-title {
  margin: .55em 0 .35em;
  font-weight: bold;
  font-size: 13pt;
}

table.hoi-dap td {
  font-size: 13pt;
}
