:root {
  --page-bg: #eef1f6;
  --sheet: #ffffff;
  --ink: #111827;
  --muted: #5b6472;
  --blue: #244b8f;
  --red: #d71e28;
  --line: rgba(17, 24, 39, 0.24);
  --focus: rgba(36, 75, 143, 0.14);
  --shadow: 0 24px 70px rgba(18, 27, 45, 0.16);
  --sheet-width: 816px;
  --sheet-height: 1056px;
  --sheet-padding-top: 58px;
  --sheet-padding-x: 64px;
  --sheet-padding-bottom: 170px;
  --footer-banner-height: 114px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page-bg);
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.96), transparent 28%),
    linear-gradient(180deg, #f6f8fb 0%, #e8edf5 100%);
  color: var(--ink);
  font-family: "Inter", sans-serif;
}

img {
  max-width: 100%;
  display: block;
}

.doc-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
}

.doc-toolbar {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  padding: 40px 32px;
  background: linear-gradient(180deg, #102649 0%, #183767 100%);
  color: #f8fbff;
}

.toolbar-eyebrow {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.doc-toolbar h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 0.95;
}

.doc-toolbar p {
  margin: 0;
  color: rgba(248, 251, 255, 0.82);
  line-height: 1.6;
}

.toolbar-actions {
  margin-top: 28px;
}

.toolbar-form {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.toolbar-field {
  display: grid;
  gap: 7px;
}

.toolbar-field span {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: rgba(248, 251, 255, 0.88);
}

.toolbar-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  color: #f8fbff;
  font: inherit;
}

.toolbar-field input::placeholder {
  color: rgba(248, 251, 255, 0.58);
}

.toolbar-field input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.44);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.toolbar-field input[type="date"] {
  color-scheme: dark;
}

.toolbar-actions button {
  width: 100%;
  padding: 14px 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #d71e28, #ef4444);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 18px 34px rgba(215, 30, 40, 0.28);
}

.document-page {
  padding: 32px;
  display: grid;
  gap: 32px;
}

.document-sheet {
  position: relative;
  width: min(100%, var(--sheet-width));
  min-height: var(--sheet-height);
  margin: 0 auto;
  background: var(--sheet);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.document-sheet-content {
  position: relative;
  z-index: 1;
  padding: var(--sheet-padding-top) var(--sheet-padding-x) var(--sheet-padding-bottom);
}

.document-sheet--blank {
  padding: 0;
}

.doc-header {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: flex-start;
}

.doc-meta {
  max-width: 540px;
}

.doc-kicker,
.doc-title,
.doc-date {
  margin: 0;
  color: var(--blue);
  font-weight: 800;
}

.doc-kicker,
.doc-date {
  font-size: 0.95rem;
}

.doc-title {
  margin-top: 10px;
  font-size: 1.18rem;
  line-height: 1.35;
}

.doc-date {
  margin-top: 10px;
}

.doc-brand {
  position: relative;
  flex: 0 0 138px;
}

.doc-brand img {
  width: 138px;
  height: auto;
  object-fit: contain;
}

.doc-brand-placeholder {
  display: none;
  width: 138px;
  aspect-ratio: 1;
  padding: 18px 14px;
  border-radius: 14px;
  background: linear-gradient(145deg, #23395d, #1a2740);
  color: #fff;
  justify-content: center;
  align-items: flex-end;
  flex-direction: column;
  text-align: right;
  box-shadow: 0 18px 28px rgba(26, 39, 64, 0.22);
}

.doc-brand-placeholder span,
.doc-brand-placeholder strong {
  display: block;
  line-height: 0.92;
}

.doc-brand-placeholder span {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ef4444;
}

.doc-brand-placeholder strong {
  font-size: 1.55rem;
  font-weight: 800;
}

.doc-body {
  position: relative;
  z-index: 1;
  margin-top: 34px;
  font-size: 0.98rem;
  line-height: 1.7;
}

.doc-body p {
  margin: 0 0 18px;
}

.doc-body hr {
  margin: 22px 0 28px;
  border: 0;
  border-top: 1px solid var(--line);
}

.doc-section-title {
  margin: 0 0 20px;
  font-size: 1.7rem;
  line-height: 1.1;
  font-weight: 800;
  text-transform: uppercase;
}

.doc-section-title--compact {
  margin-bottom: 26px;
  font-size: 1.55rem;
}

.doc-section-title span:first-child {
  color: var(--red);
}

.doc-section-title span:last-child {
  color: var(--blue);
}

.doc-list,
.doc-sublist,
.doc-numbered-list,
.doc-bullet-list {
  margin: 0;
  padding-left: 24px;
}

.doc-list > li,
.doc-sublist > li,
.doc-numbered-list > li,
.doc-bullet-list > li {
  margin-bottom: 14px;
}

.doc-sublist {
  margin-top: 8px;
  list-style: circle;
}

.doc-sublist--spaced {
  margin-top: 18px;
  padding-left: 44px;
}

.doc-sublist--spaced > li {
  margin-bottom: 18px;
}

.doc-numbered-list {
  padding-left: 40px;
}

.doc-numbered-list > li {
  padding-left: 2px;
}

.doc-bullet-list {
  margin-top: 18px;
}

.doc-body--second-page {
  margin-top: 0;
  max-width: 100%;
}

.doc-body--second-page hr {
  margin: 38px 0 26px;
}

.doc-watermark--second {
  right: -40px;
  bottom: 250px;
  width: 430px;
  opacity: 0.07;
}

[contenteditable="true"] {
  border-radius: 6px;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

[contenteditable="true"]:hover {
  background: rgba(36, 75, 143, 0.05);
}

[contenteditable="true"]:focus {
  outline: none;
  background: var(--focus);
  box-shadow: 0 0 0 2px rgba(36, 75, 143, 0.2);
}

.doc-watermark {
  position: absolute;
  right: -14px;
  bottom: 236px;
  width: 300px;
  opacity: 0.08;
  pointer-events: none;
}

.doc-footer-banner-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: block;
  height: var(--footer-banner-height);
  overflow: hidden;
  background: transparent;
}

.doc-footer-banner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: none;
  height: auto;
}

.doc-footer-logo {
  position: absolute;
  left: 18px;
  bottom: 10px;
  height: calc(var(--footer-banner-height) - 22px);
  width: auto;
  max-width: none;
  z-index: 2;
  border-radius: 10px;
  pointer-events: none;
}

.doc-footer-banner-placeholder {
  display: none;
  height: 100%;
  width: 100%;
  background:
    radial-gradient(circle at 18% 135%, #ef1c1c 0 32%, transparent 33%),
    radial-gradient(circle at 72% 170%, #223964 0 38%, transparent 39%),
    linear-gradient(180deg, transparent 0 10px, #223964 10px 100%);
}

.is-missing {
  display: none !important;
}

[data-fallback-box].is-visible {
  display: flex;
}

.doc-footer-banner-placeholder.is-visible {
  display: block;
}

@media (max-width: 980px) {
  .doc-shell {
    grid-template-columns: 1fr;
  }

  .doc-toolbar {
    position: relative;
    min-height: auto;
  }

  .toolbar-actions {
    margin-top: 24px;
  }

  .document-page {
    padding: 18px;
    gap: 18px;
  }

  .document-sheet {
    --sheet-padding-top: 28px;
    --sheet-padding-x: 22px;
    --sheet-padding-bottom: 120px;
    --footer-banner-height: 82px;
  }

  .document-sheet-content {
    padding: var(--sheet-padding-top) var(--sheet-padding-x) var(--sheet-padding-bottom);
  }

  .document-sheet--blank {
    padding: 0;
  }

  .doc-header {
    flex-direction: column-reverse;
  }

  .doc-brand-placeholder {
    width: 116px;
  }
}

@media print {
  @page {
    size: Letter;
    margin: 0;
  }

  :root {
    --sheet-width: 8.5in;
    --sheet-height: 11in;
    --sheet-padding-top: 0.55in;
    --sheet-padding-x: 0.55in;
    --sheet-padding-bottom: 1.15in;
    --footer-banner-height: 1.08in;
  }

  html,
  body {
    background: #fff;
  }

  .no-print {
    display: none !important;
  }

  .doc-shell {
    display: block;
  }

  .document-page {
    padding: 0;
    gap: 0;
  }

  .document-sheet {
    width: var(--sheet-width);
    min-height: var(--sheet-height);
    box-shadow: none;
    margin: 0;
    break-after: page;
    page-break-after: always;
    overflow: hidden;
  }

  .document-sheet:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .document-sheet-content {
    padding: var(--sheet-padding-top) var(--sheet-padding-x) var(--sheet-padding-bottom);
  }

  .document-sheet--blank {
    padding: 0;
  }

  [contenteditable="true"] {
    background: transparent !important;
    box-shadow: none !important;
  }
}