:root {
  --ink: #0a0d12;
  --ink-soft: #3a4250;
  --muted: #5f6673;
  --line: #e8ebef;
  --line-strong: #cdd3dc;
  --surface: #eef1f6;
  --surface-elevated: #ffffff;
  --accent: #0a5cb5;
  --accent-hover: #084a96;
  --accent-soft: #e7f0fa;
  --accent-glow: rgba(10, 92, 181, 0.12);
  --success: #0c6e56;
  --header-bg: #061f3d;
  --header-bg-2: #0d3a6e;
  --header-accent: #a8dcff;
  --rail-completed: #fdeef2;
  --rail-completed-text: #9d174d;
  --rail-ongoing: #e6faf5;
  --rail-ongoing-text: #0d6b5c;
  --rail-next: #e8f2ff;
  --rail-next-text: #1e56c9;
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 4.25rem;
  --inset: 1.5rem;
  --inset-sm: 1.25rem;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Fraunces", "Georgia", serif;
  --shadow-sm: 0 1px 2px rgba(10, 13, 18, 0.04);
  --shadow-md: 0 4px 16px rgba(10, 13, 18, 0.06), 0 1px 2px rgba(10, 13, 18, 0.04);
  --shadow-lg: 0 20px 50px rgba(10, 13, 18, 0.09), 0 8px 20px rgba(10, 13, 18, 0.05);
  --shadow-report: 0 25px 60px rgba(10, 13, 18, 0.11), 0 0 0 1px rgba(10, 13, 18, 0.05);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--surface);
  background-image:
    radial-gradient(ellipse 120% 80% at 10% -10%, rgba(10, 92, 181, 0.07), transparent 50%),
    radial-gradient(ellipse 80% 60% at 95% 5%, rgba(12, 110, 86, 0.05), transparent 45%),
    linear-gradient(180deg, #f2f4f8 0%, var(--surface) 40%, #ebeff5 100%);
  line-height: 1.55;
  font-size: 0.9375rem;
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ——— App chrome ——— */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(232, 235, 239, 0.95);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset, var(--shadow-sm);
}

.app-header__row {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--inset);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  padding: 0.5rem 0;
}

.brand__logo {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(10, 13, 18, 0.08), 0 0 0 1px rgba(10, 13, 18, 0.04);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  line-height: 1.2;
}

.brand__name {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.brand__tagline {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.app-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex: 1;
  min-width: min(100%, 12rem);
}

/* ——— Workspace ——— */
.workspace {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(500px, min(44vw, 720px));
  max-width: 1680px;
  margin: 0 auto;
  width: 100%;
  align-items: stretch;
}

.workspace__editor {
  padding: 1.75rem var(--inset) 3rem;
  min-width: 0;
}

.workspace__preview {
  background-color: #e4e9f0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(10, 13, 18, 0.05) 1px, transparent 0),
    linear-gradient(175deg, #e8ecf3 0%, #dde4ee 100%);
  background-size: 20px 20px, 100% 100%;
  border-left: 1px solid rgba(205, 211, 220, 0.85);
  position: sticky;
  top: var(--header-h);
  align-self: start;
  height: calc(100vh - var(--header-h));
  max-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
}

.preview-chrome {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 0.75rem var(--inset);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 250, 252, 0.88) 100%);
  border-bottom: 1px solid rgba(205, 211, 220, 0.7);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.preview-chrome__label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: 100px;
  background: rgba(10, 92, 181, 0.07);
  border: 1px solid rgba(10, 92, 181, 0.11);
  max-width: 100%;
}

.preview-chrome__title {
  font-weight: 700;
  color: var(--ink);
}

.preview-chrome__sep {
  color: var(--muted);
  font-weight: 500;
  user-select: none;
}

.preview-chrome__hint {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.6875rem;
}

.preview-chrome__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
  animation: pulse-dot 2.2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.65;
  }
}

@media (prefers-reduced-motion: reduce) {
  .preview-chrome__dot {
    animation: none;
  }
}

.report-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--inset) var(--inset) 2rem;
  -webkit-overflow-scrolling: touch;
}

.page-intro {
  margin-bottom: 1.5rem;
  max-width: 52rem;
}

.page-intro__kicker {
  margin: 0 0 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.page-intro__title {
  margin: 0 0 0.45rem;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--ink);
  line-height: 1.2;
}

.page-intro__lead {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.6;
}

.page-intro__note {
  display: block;
  margin-top: 0.65rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.kbd {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  margin: 0 0.05rem;
  font-family: inherit;
  font-size: 0.75em;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink-soft);
  background: linear-gradient(180deg, #fff 0%, #f1f4f8 100%);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 1px 2px rgba(10, 13, 18, 0.06);
  vertical-align: baseline;
}

.kbd-plus {
  margin: 0 0.1rem;
  font-weight: 600;
  font-size: 0.8em;
  color: var(--muted);
  user-select: none;
}

.panel {
  background: var(--surface-elevated);
  border: 1px solid rgba(205, 211, 220, 0.85);
  border-radius: var(--radius);
  padding: 0;
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  overflow: hidden;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--inset);
  background: linear-gradient(180deg, #fbfcfe 0%, #f3f5f9 100%);
  border-bottom: 1px solid var(--line);
}

.panel__head-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.panel__autosave {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
  min-height: 1.2em;
  transition: color 0.2s ease;
}

.panel__autosave--working {
  color: var(--accent);
}

.panel__autosave--saved {
  color: var(--success);
}

.panel__autosave--error {
  color: #b91c1c;
}

.panel__autosave--pulse {
  animation: autosave-pop 0.5s ease;
}

@keyframes autosave-pop {
  0% {
    opacity: 0.65;
    transform: translateX(2px);
  }
  40% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 1;
  }
}

.panel__title {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}

.panel__badge {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: linear-gradient(180deg, #f0f6fc 0%, var(--accent-soft) 100%);
  padding: 0.35rem 0.65rem;
  border-radius: 100px;
  border: 1px solid rgba(10, 92, 181, 0.18);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.form-section {
  margin: 0;
  padding: 1.55rem var(--inset) 1.6rem;
  border: none;
  border-bottom: 1px solid var(--line);
  background: #fdfefe;
}

.form-section:last-of-type {
  border-bottom: none;
}

.form-section__legend {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1rem;
  padding: 0;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.form-section__legend::before {
  content: "";
  width: 4px;
  height: 1.15em;
  border-radius: 4px;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(10, 92, 181, 0.2);
}

.panel--form > fieldset:nth-of-type(1) .form-section__legend::before {
  background: linear-gradient(180deg, #2563eb, #4f46e5);
}

.panel--form > fieldset:nth-of-type(2) .form-section__legend::before {
  background: linear-gradient(180deg, #db2777, #e11d48);
}

.panel--form > fieldset:nth-of-type(3) .form-section__legend::before {
  background: linear-gradient(180deg, #0d9488, #059669);
}

.panel--form > fieldset:nth-of-type(4) .form-section__legend::before {
  background: linear-gradient(180deg, #d97706, #ca8a04);
}

.panel--form > fieldset:nth-of-type(5) .form-section__legend::before {
  background: linear-gradient(180deg, #64748b, #475569);
}

.field-group {
  border: none;
  margin: 0;
  padding: 0;
}

.field-help {
  margin: -0.15rem 0 0.85rem;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 52em;
}

.optional {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.85em;
}

.grid {
  display: grid;
  gap: 1.15rem 1.5rem;
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 680px) {
  .grid--2 {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.field__label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.field input,
.field textarea {
  font: inherit;
  padding: 0.6rem 0.85rem;
  min-height: 2.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  width: 100%;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:hover,
.field textarea:hover {
  border-color: #c8cdd6;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 92, 173, 0.15);
}

.dynamic-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dynamic-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.dynamic-row input {
  flex: 1;
  min-width: 0;
  font: inherit;
  padding: 0.6rem 0.85rem;
  min-height: 2.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.dynamic-row input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 92, 173, 0.15);
}

.btn {
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.55rem 1.05rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition:
    transform 0.14s ease,
    background 0.15s,
    color 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn__icon {
  display: flex;
  opacity: 0.95;
}

.btn--primary {
  background: linear-gradient(180deg, #1a74d4 0%, var(--accent) 38%, #094d9e 100%);
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.2) inset,
    0 2px 6px rgba(10, 92, 181, 0.28);
}

.btn--primary:hover {
  background: linear-gradient(180deg, #0f6ace 0%, var(--accent-hover) 45%, #083c80 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 4px 12px rgba(10, 92, 181, 0.28);
}

.btn--primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 92, 173, 0.35);
}

.btn--secondary {
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  color: var(--ink-soft);
  border: 1px solid rgba(205, 211, 220, 0.95);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.btn--secondary:hover {
  background: #fff;
  border-color: #b8c0cc;
  box-shadow: 0 2px 6px rgba(10, 13, 18, 0.05);
}

.btn--secondary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 92, 173, 0.12);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn--small {
  font-size: 0.75rem;
  padding: 0.4rem 0.75rem;
}

.btn__plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.15rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  background: rgba(10, 92, 181, 0.1);
  border-radius: 6px;
}

.btn--add {
  margin-top: 0.85rem;
  align-self: flex-start;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  color: var(--accent);
  border: 1px solid rgba(10, 92, 181, 0.35);
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.52rem 1.05rem;
  box-shadow: 0 1px 2px rgba(10, 92, 181, 0.07);
}

.btn--add:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(10, 92, 181, 0.12);
}

.btn-icon {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: var(--radius-sm);
  background: #fef2f2;
  color: #b91c1c;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: background 0.15s;
}

.btn-icon:hover {
  background: #fee2e2;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: 0 1px 3px rgba(10, 13, 18, 0.045);
}

.edit-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.edit-table th {
  text-align: left;
  padding: 0.65rem 0.85rem;
  background: #f4f6f9;
  font-weight: 700;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  vertical-align: bottom;
}

.edit-table th:nth-child(1) {
  width: 26%;
}

.edit-table th:nth-child(2) {
  width: 46%;
}

.edit-table th:nth-child(3) {
  width: 22%;
}

.edit-table th:last-child {
  width: 6%;
  text-align: center;
}

.edit-table td {
  padding: 0.45rem 0.65rem;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}

.edit-table td:last-child {
  text-align: center;
  vertical-align: middle;
}

.edit-table input[type="text"],
.edit-table input[type="number"] {
  width: 100%;
  font: inherit;
  padding: 0.5rem 0.55rem;
  min-height: 2.5rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
}

.edit-table input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--accent-soft);
}

.edit-table .progress-cell {
  min-width: 130px;
}

.edit-table .progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.edit-table input[type="range"] {
  flex: 1;
  min-width: 64px;
  accent-color: var(--accent);
}

.edit-table .progress-num {
  width: 3rem;
  text-align: right;
}

/* ——— Report document ——— */
.report-anchor {
  max-width: 100%;
  margin: 0 auto;
  min-width: 0;
}

.report {
  container-name: report;
  container-type: inline-size;
  background: linear-gradient(180deg, #fffdfb 0%, #ffffff 18%, #fff 100%);
  border: 1px solid rgba(205, 211, 220, 0.95);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-report);
  min-width: 0;
  transition:
    box-shadow 0.35s ease,
    border-color 0.25s ease;
}

.report--saved-flash {
  box-shadow:
    var(--shadow-report),
    0 0 0 2px rgba(10, 92, 181, 0.22),
    0 0 24px rgba(10, 92, 181, 0.12);
  border-color: rgba(10, 92, 181, 0.35);
}

.report__header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background: linear-gradient(125deg, var(--header-bg) 0%, var(--header-bg-2) 42%, #135a9e 100%);
  color: #e0f2fe;
  padding: 1.65rem var(--inset);
  gap: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.report__header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.055) 55%, transparent 75%);
  pointer-events: none;
}

.report__header-inner,
.report__header-art {
  position: relative;
  z-index: 1;
}

.report__header-inner {
  flex: 1;
  min-width: 0;
}

.report__tagline {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(224, 242, 254, 0.92);
  line-height: 1.45;
}

.report__doc-title {
  margin: 0 0 1.15rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--header-accent);
  letter-spacing: -0.03em;
  line-height: 1.16;
  text-wrap: balance;
}

.report__meta {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1.25rem;
  font-size: 0.8125rem;
}

.report__meta-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  min-width: 0;
}

.report__meta-label,
.report__meta-row dt {
  margin: 0;
  padding: 0;
  font-weight: 700;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(147, 197, 253, 0.98);
  line-height: 1.3;
}

.report__meta-value,
.report__meta-row dd {
  margin: 0;
  padding: 0;
  font-weight: 500;
  font-size: 0.875rem;
  color: #f8fafc;
  line-height: 1.4;
  word-break: normal;
  overflow-wrap: anywhere;
  hyphens: auto;
  max-width: 100%;
}

@container report (max-width: 380px) {
  .report__meta {
    grid-template-columns: 1fr;
  }
}

@container report (max-width: 480px) {
  .report-block {
    grid-template-columns: 1fr;
  }

  .report-block__rail {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-align: left;
    box-shadow: inset 0 -1px 0 rgba(10, 13, 18, 0.06);
  }

  .report-block__content {
    padding-top: 0.95rem;
  }
}

.report__header-art {
  display: flex;
  align-items: flex-start;
  padding-top: 0.15rem;
  gap: 0.5rem;
  opacity: 0.88;
  flex-shrink: 0;
}

.art-icon {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.11);
  border-radius: 11px;
  font-size: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  color: rgba(240, 249, 255, 0.92);
}

.art-icon svg {
  display: block;
  flex-shrink: 0;
}

@container report (max-width: 540px) {
  .report__header-art {
    display: none;
  }

  .report__doc-title {
    font-size: 1.45rem;
  }

  .report__header {
    padding: 1.4rem 1.15rem;
  }
}

.report__body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.report-block {
  display: grid;
  grid-template-columns: minmax(5.25rem, 6.35rem) minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}

@media (max-width: 560px) {
  .report-block {
    grid-template-columns: 1fr;
  }

  .report-block__rail {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
  }
}

.report-block:last-of-type {
  border-bottom: none;
}

.report-block__rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.45rem;
  text-align: center;
  gap: 0.4rem;
  box-shadow: inset -1px 0 0 rgba(10, 13, 18, 0.05);
}

.report-block--completed .report-block__rail {
  background: var(--rail-completed);
  color: var(--rail-completed-text);
}

.report-block--ongoing .report-block__rail {
  background: var(--rail-ongoing);
  color: var(--rail-ongoing-text);
}

.report-block--next .report-block__rail {
  background: var(--rail-next);
  color: var(--rail-next-text);
}

.report-block__icon {
  font-size: 1.35rem;
  line-height: 1;
}

.report-block__heading {
  margin: 0;
  font-size: 0.59rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  line-height: 1.3;
  max-width: 100%;
}

.report-block__content {
  padding: 1.35rem var(--inset-sm);
  background: #fff;
}

.report-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.58;
  color: var(--ink-soft);
}

.report-list li {
  margin-bottom: 0.55rem;
  padding-left: 0.25rem;
  font-weight: 400;
}

.report-list li strong {
  font-weight: 600;
  color: var(--ink);
}

.report-list li::marker {
  color: var(--accent);
  font-size: 0.85em;
}

.report-list li:last-child {
  margin-bottom: 0;
}

.report-data-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.report-data-table__col--focus {
  width: 28%;
}

.report-data-table__col--deliver {
  width: 50%;
}

.report-data-table__col--progress {
  width: 22%;
}

.report-data-table th {
  text-align: left;
  padding: 0.55rem 0.75rem;
  background: #f8fafc;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  vertical-align: bottom;
}

.report-data-table th:last-child {
  text-align: right;
}

.report-data-table td {
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-weight: 500;
  color: var(--ink-soft);
  line-height: 1.5;
}

.report-data-table td:last-child {
  text-align: right;
  vertical-align: middle;
}

.report-data-table tr:last-child td {
  border-bottom: none;
}

.progress-bar-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  width: 100%;
  min-width: 0;
}

.progress-bar {
  flex: 1;
  max-width: 140px;
  height: 11px;
  background: linear-gradient(180deg, #e5e9f0 0%, #eef1f6 100%);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(10, 13, 18, 0.07);
  border: 1px solid rgba(10, 13, 18, 0.06);
}

.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, #1a74d4 0%, var(--accent) 35%, #0d8668 100%);
  border-radius: 999px;
  transition: width 0.25s ease;
  box-shadow: 0 0 12px rgba(26, 116, 212, 0.35);
}

.progress-label {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  min-width: 2.85rem;
  text-align: right;
  font-size: 0.875rem;
  letter-spacing: -0.02em;
}

.report__footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  align-items: start;
  gap: 1rem 1.5rem;
  padding: 1.15rem var(--inset);
  background: linear-gradient(180deg, #fafbfd 0%, #f4f6f9 100%);
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--muted);
}

.report__footer--brand-only {
  grid-template-columns: 1fr;
}

.report__footer--brand-only .report__brand-block {
  justify-self: start;
}

.report__brand-block {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.report__logo {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(10, 13, 18, 0.08), 0 0 0 1px rgba(10, 13, 18, 0.04);
}

.report__brand {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--header-bg);
  font-size: 0.9375rem;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.report__footer-note {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  text-align: right;
  justify-self: end;
  max-width: 22rem;
  line-height: 1.5;
}

.report__url {
  display: block;
  margin-top: 0;
  color: var(--accent);
  word-break: break-all;
}

.empty-hint {
  color: var(--muted);
  font-style: italic;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  font-weight: 400;
}

@media (max-width: 1024px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .workspace__preview {
    position: relative;
    top: 0;
    height: auto;
    max-height: none;
    border-left: none;
    border-top: 1px solid var(--line);
  }

  .report-scroll {
    max-height: min(70vh, 36rem);
    overflow-y: auto;
  }
}

@media (max-width: 720px) {
  :root {
    --inset: 1.15rem;
  }

  .app-header__row {
    flex-direction: column;
    align-items: stretch;
    padding-top: 0.85rem;
    padding-bottom: 1rem;
    min-height: unset;
  }

  .brand {
    padding: 0;
  }

  .app-header__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
    gap: 0.5rem;
    width: 100%;
  }

  .app-header__actions .btn {
    width: 100%;
    min-height: 2.65rem;
  }

  .app-header__actions .btn--primary {
    grid-column: 1 / -1;
    order: 4;
  }

  .app-header__actions #btn-sample {
    order: 1;
  }

  .app-header__actions #btn-reset {
    order: 2;
  }

  .app-header__actions #btn-print {
    order: 3;
  }

  .report__footer {
    grid-template-columns: 1fr;
  }

  .report__footer-note {
    align-items: flex-start;
    text-align: left;
    justify-self: stretch;
    max-width: none;
  }
}

/*
 * html2pdf: chụp clone đặt trong .pdf-export-host (fixed, ngoài viewport) để tránh
 * lỗi offset của html2canvas khi #report nằm trong .report-scroll + .workspace__preview (sticky).
 */
.pdf-export-host {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 794px;
  max-width: 100%;
  z-index: 2147483000;
  pointer-events: none;
  overflow: visible;
  background: #fff;
  box-sizing: border-box;
}

.pdf-export-host .report {
  container-type: normal;
}

@page {
  size: A4;
  margin: 14mm 12mm;
}

@media print {
  .no-print {
    display: none !important;
  }

  body {
    background: #fff;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .app-header {
    display: none !important;
  }

  .workspace {
    display: block;
    max-width: none;
  }

  .workspace__preview {
    height: auto;
    max-height: none;
    border: none;
    background: #fff;
  }

  .report-scroll {
    overflow: visible;
    padding: 0;
    max-height: none;
  }

  .report-anchor {
    max-width: none;
    padding: 0;
  }

  .report {
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .report-block {
    page-break-inside: avoid;
  }
}
