:root {
  color-scheme: light;
  --color-bg: #fbf7f5;
  --color-surface: #ffffff;
  --color-surface-subtle: #f7f9fc;
  --color-border: #d2d6e0;
  --color-text: #1f252f;
  --color-text-soft: #4c5565;
  --color-text-muted: #6c7382;
  --color-brand: #2b2c6b;
  --color-brand-violet: #622E87;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 6px 24px rgba(66, 108, 162, 0.12);
  --font-display: 'Josefin Slab', 'Fraunces', Georgia, serif;
  --font-body: 'Manrope', 'Inter', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

header {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 36px 36px 30px;
  margin-bottom: 32px;
}

.brand {
  display: block;
  width: 168px;
  height: 52px;
  margin-bottom: 20px;
  background: url('/img/xcribo-logo.png') no-repeat left center;
  background-size: contain;
  text-indent: -9999px;
  overflow: hidden;
  white-space: nowrap;
}

h1 {
  font-family: var(--font-display);
  font-size: 2.05rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-brand);
  margin: 0 0 10px;
}

.meta {
  font-size: 0.87rem;
  color: var(--color-text-muted);
  margin: 0;
}

h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-brand);
  margin: 44px 0 14px;
  padding-top: 22px;
  border-top: 1px solid var(--color-border);
}

h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 28px 0 8px;
}

p { margin: 0 0 15px; }
ul, ol { margin: 0 0 15px; padding-left: 24px; }
li { margin-bottom: 8px; }

a {
  color: var(--color-brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover { color: var(--color-brand-violet); }

.toc {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 8px;
}
.toc h2 {
  font-family: var(--font-body);
  border: 0;
  margin: 0 0 12px;
  padding: 0;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.toc ol { margin: 0; padding-left: 20px; font-size: 0.95rem; }
.toc li { margin-bottom: 5px; }

.note {
  background: var(--color-surface-subtle);
  border-left: 4px solid var(--color-brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin: 20px 0;
}
.note p:last-child { margin-bottom: 0; }

.tblwrap { overflow-x: auto; margin: 18px 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 0.92rem;
  background: var(--color-surface);
}
th, td {
  border: 1px solid var(--color-border);
  padding: 10px 13px;
  text-align: left;
  vertical-align: top;
}
th {
  background: var(--color-surface-subtle);
  font-weight: 700;
  color: var(--color-brand);
}

.pending {
  background: #fff8e6;
  border: 1px dashed #c08a2d;
  color: #5e3306;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.88rem;
}

footer {
  margin-top: 52px;
  padding-top: 22px;
  border-top: 1px solid var(--color-border);
  font-size: 0.87rem;
  color: var(--color-text-muted);
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 24px 16px 56px; }
  header { padding: 26px 22px 22px; border-radius: var(--radius-sm); }
  h1 { font-size: 1.65rem; }
  h2 { font-size: 1.25rem; }
  .toc { padding: 20px 20px; }
  .brand { width: 140px; height: 44px; }
}

@media print {
  body { background: #fff; font-size: 11pt; }
  .wrap { max-width: none; padding: 0; }
  header, .toc { box-shadow: none; border: 0; padding: 0 0 12px; }
  h2 { page-break-after: avoid; }
  table, .note { page-break-inside: avoid; }
}
