/* =========================================================
   UFG End-of-Day Report — styles.css
   Internal report styling. Intentional, executive-ready.
   ========================================================= */

:root {
  /* Palette */
  --canvas: #f6f3ec;
  --canvas-2: #efeadd;
  --surface: #ffffff;
  --surface-2: #fbf9f3;
  --ink: #0f1b2d;
  --ink-soft: #455067;
  --ink-mute: #6c7689;
  --rule: #e3dccb;
  --rule-strong: #d2c9b2;
  --accent: #0f3460;
  --accent-2: #1c4f94;
  --brand: #a84b0a;
  --brand-2: #c05d14;
  --success: #276749;
  --success-bg: #e4efe6;
  --warn: #8a5a0e;
  --warn-bg: #f4ecd8;
  --danger: #8a2a34;
  --danger-bg: #f3dfe1;
  --neutral-bg: #e9e4d5;

  /* Type */
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Scale */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(15, 27, 45, 0.06);
  --shadow-md: 0 6px 20px -8px rgba(15, 27, 45, 0.18), 0 2px 6px rgba(15, 27, 45, 0.05);
  --shadow-lg: 0 24px 40px -24px rgba(15, 27, 45, 0.28), 0 4px 12px rgba(15, 27, 45, 0.06);

  --shell-max: 1240px;
  --gutter: clamp(16px, 3vw, 36px);
}

/* ------- Reset ------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
img, svg { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }

/* ------- Base ------- */
body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(1100px 500px at 10% -10%, rgba(15, 52, 96, 0.06), transparent 60%),
    radial-gradient(900px 420px at 110% 0%, rgba(168, 75, 10, 0.05), transparent 55%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}
a:hover { color: var(--accent-2); border-bottom-color: currentColor; }
a:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 3px;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--canvas-2);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--ink);
  white-space: nowrap;
}

/* ------- Layout shell ------- */
.shell {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; outline: none; }

/* ------- Header ------- */
.site-header {
  background: rgba(246, 243, 236, 0.88);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 18px;
  color: var(--surface);
  background: var(--accent);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.brand-divider {
  width: 1px;
  height: 22px;
  background: var(--rule-strong);
}

.brand-label {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  appearance: none;
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}
.btn:hover { background: var(--surface-2); border-color: var(--ink-mute); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; }

.confidential-chip {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid rgba(138, 42, 52, 0.22);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 600;
}

/* ------- Main grid ------- */
.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  padding-block: 36px 72px;
}

@media (min-width: 960px) {
  .main-grid {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 48px;
    align-items: start;
    padding-block: 48px 96px;
  }
}

@media (min-width: 1200px) {
  .main-grid {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 64px;
  }
}

/* ------- TOC ------- */
.toc {
  order: 2;
}

@media (min-width: 960px) {
  .toc {
    order: 0;
    position: sticky;
    top: 84px;
    align-self: start;
  }
}

.toc-inner {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 22px 22px 18px;
  box-shadow: var(--shadow-sm);
}

.toc-kicker {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 10px;
  font-weight: 600;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
  display: flex;
  flex-direction: column;
}

.toc-list li { counter-increment: toc; }

.toc-list a {
  position: relative;
  display: block;
  padding: 9px 12px 9px 34px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.35;
  border: none;
  transition: background 140ms ease, color 140ms ease;
}

.toc-list a::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 10px;
  top: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}

.toc-list a:hover {
  background: var(--canvas-2);
  color: var(--ink);
}

.toc-list a.is-active {
  background: linear-gradient(90deg, rgba(15, 52, 96, 0.08), transparent 80%);
  color: var(--accent);
  font-weight: 600;
}
.toc-list a.is-active::before { color: var(--accent); }

.toc-meta {
  margin: 18px 2px 0;
  padding-top: 14px;
  border-top: 1px dashed var(--rule-strong);
  font-size: 12px;
  color: var(--ink-mute);
  line-height: 1.5;
}

.toc-meta time {
  display: inline-block;
  margin-top: 2px;
  color: var(--ink);
  font-weight: 600;
}

/* ------- Report column ------- */
.report {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ------- Hero ------- */
.hero {
  position: relative;
  padding: 40px 36px 36px;
  background:
    linear-gradient(135deg, #102544 0%, #0f3460 55%, #103d6e 100%);
  color: #f4ece0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(400px 200px at 90% -10%, rgba(200, 160, 90, 0.22), transparent 60%),
    radial-gradient(500px 240px at -10% 120%, rgba(168, 75, 10, 0.18), transparent 70%);
  pointer-events: none;
}
.hero > * { position: relative; }

.eyecrow {
  margin: 0 0 12px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #d9c6a4;
  font-weight: 600;
}

.hero-title {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: #fbf6ec;
}

.hero-sub {
  margin: 0 0 28px;
  max-width: 68ch;
  color: #d9d0bf;
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.6;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 18px 28px;
  margin: 0 0 28px;
  padding: 20px 22px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  backdrop-filter: blur(4px);
}

.meta-cell dt {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c1b89f;
  margin: 0 0 4px;
  font-weight: 600;
}
.meta-cell dd {
  margin: 0;
  font-size: 15px;
  color: #fbf6ec;
  font-weight: 500;
}

.stat-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.stat {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  overflow: hidden;
}
.stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: currentColor;
  opacity: 0.85;
}
.stat-success { color: #8ec8a1; }
.stat-warn { color: #e7c06a; }
.stat-danger { color: #e69a9a; }
.stat-neutral { color: #c9bfa9; }

.stat-num {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  color: #fbf6ec;
  line-height: 1;
}
.stat-label {
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: #d4cbb7;
}

/* ------- Cards ------- */
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms ease, transform 520ms ease, box-shadow 220ms ease;
  scroll-margin-top: 96px;
}

.card.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.card:hover { box-shadow: var(--shadow-md); }

.card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

.card-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
  margin: 0;
  padding: 3px 8px;
  background: var(--canvas-2);
  border: 1px solid var(--rule);
  border-radius: 4px;
}

.card-head h2 {
  flex: 1 1 auto;
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.3vw, 24px);
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.card-body {
  padding: 24px 28px 28px;
}

.card-emphasis {
  border-color: rgba(138, 42, 52, 0.24);
  background: linear-gradient(180deg, #fdf7f6, var(--surface));
}
.card-emphasis .card-head {
  background: linear-gradient(180deg, #faeaeb, #fdf7f6);
  border-bottom-color: rgba(138, 42, 52, 0.18);
}

.card-accent {
  border-color: rgba(15, 52, 96, 0.22);
  background: linear-gradient(180deg, #f2f5fb, var(--surface));
}
.card-accent .card-head {
  background: linear-gradient(180deg, #e4ecf8, #f2f5fb);
  border-bottom-color: rgba(15, 52, 96, 0.18);
}

.card-subtle {
  background: var(--surface-2);
}

/* ------- Status pills ------- */
.status-pill {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.status-success { color: var(--success); background: var(--success-bg); border-color: rgba(39, 103, 73, 0.2); }
.status-warn { color: var(--warn); background: var(--warn-bg); border-color: rgba(138, 90, 14, 0.22); }
.status-danger { color: var(--danger); background: var(--danger-bg); border-color: rgba(138, 42, 52, 0.22); }
.status-accent { color: var(--accent); background: #e4ecf8; border-color: rgba(15, 52, 96, 0.22); }
.status-neutral { color: var(--ink-soft); background: var(--neutral-bg); border-color: var(--rule-strong); }

/* ------- Prose ------- */
.prose p {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 15.5px;
  max-width: 74ch;
}
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); }

/* ------- List styles ------- */
.check-list,
.mixed-list,
.todo-list,
.ops-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  counter-reset: step;
}

.check-list > li,
.ops-list > li {
  counter-increment: step;
  position: relative;
  padding: 16px 18px 18px 56px;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  transition: background 140ms ease, border-color 140ms ease;
}
.check-list > li:hover,
.ops-list > li:hover {
  background: var(--surface);
  border-color: var(--rule-strong);
}

.check-list > li::before,
.ops-list > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 16px;
  top: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.04em;
  background: #e4ecf8;
  border: 1px solid rgba(15, 52, 96, 0.2);
  padding: 4px 6px;
  border-radius: 4px;
  min-width: 28px;
  text-align: center;
}

.check-list h3,
.mixed-list h3,
.ops-list h3 {
  margin: 0 0 6px;
  font-family: var(--font-sans);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.check-list p,
.mixed-list p,
.ops-list p {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.55;
}
.check-list p:last-child,
.mixed-list p:last-child,
.ops-list p:last-child { margin-bottom: 0; }

.mixed-list > li {
  padding: 14px 18px 16px;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--warn);
  border-radius: var(--radius-md);
}

.todo-list {
  list-style: none;
  gap: 10px;
}
.todo-list li {
  position: relative;
  padding: 12px 16px 12px 42px;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--danger);
  border-radius: var(--radius-md);
  font-size: 15px;
  color: var(--ink);
}
.todo-list li::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border: 2px solid var(--danger);
  border-radius: 3px;
  background: transparent;
}

.bullet-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bullet-list li {
  position: relative;
  padding-left: 20px;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.55;
}
.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.bullet-list li strong { color: var(--ink); }

.chip-row {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip-row li {
  padding: 6px 12px;
  border-radius: 999px;
  background: #e4ecf8;
  color: var(--accent);
  border: 1px solid rgba(15, 52, 96, 0.18);
  font-size: 13px;
  font-weight: 500;
}

.file-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.file-list li {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  padding: 4px 10px;
  background: var(--canvas-2);
  border: 1px solid var(--rule);
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 14px;
}
.legend-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  color: var(--ink-soft);
  padding: 6px 10px;
  background: var(--canvas-2);
  border: 1px solid var(--rule);
  border-radius: 8px;
}
.legend-mark {
  font-size: 16px;
  line-height: 1;
}

.kv-list {
  margin: 10px 0 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 18px;
  font-size: 14px;
  background: var(--canvas-2);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 12px 14px;
}
.kv-list dt {
  color: var(--ink-mute);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  align-self: center;
}
.kv-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
}

.callout {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  border: 1px solid transparent;
}
.callout-success {
  color: var(--success);
  background: var(--success-bg);
  border-color: rgba(39, 103, 73, 0.22);
}
.callout strong { color: currentColor; font-weight: 700; }

.ops-intro {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 14.5px;
  max-width: 74ch;
  padding: 12px 14px;
  background: var(--canvas-2);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
}

/* ------- Footer ------- */
.site-footer {
  border-top: 1px solid var(--rule);
  background: linear-gradient(180deg, transparent, rgba(15, 27, 45, 0.04));
  margin-top: auto;
}
.footer-shell {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-block: 24px;
  font-size: 13px;
  color: var(--ink-mute);
}
.footer-shell p { margin: 0; }
.footer-shell strong { color: var(--ink); font-weight: 600; }

/* ------- Back to top ------- */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: 1px solid rgba(15, 52, 96, 0.45);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  font-size: 18px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 200ms ease, background 140ms ease;
  z-index: 30;
}
.to-top[hidden] { display: none; }
.to-top.is-visible { opacity: 1; transform: translateY(0); }
.to-top:hover { background: var(--accent-2); }

/* ------- Responsive tweaks ------- */
@media (max-width: 720px) {
  .hero { padding: 30px 22px 28px; }
  .card-head { padding: 16px 20px; flex-wrap: wrap; }
  .card-body { padding: 20px 20px 22px; }
  .check-list > li,
  .ops-list > li { padding: 14px 14px 16px 50px; }
  .check-list > li::before,
  .ops-list > li::before { left: 12px; top: 14px; }
  .confidential-chip { display: none; }
  .brand-label { font-size: 13px; }
}

@media (max-width: 480px) {
  .brand-divider { display: none; }
  .meta-grid { padding: 16px; }
}

/* ------- Print ------- */
@media print {
  :root { --shell-max: 100%; }
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
    background-image: none;
  }
  .site-header,
  .site-footer,
  .toc,
  .to-top,
  .header-actions { display: none !important; }
  .main-grid {
    grid-template-columns: 1fr !important;
    padding: 0 !important;
    gap: 16px !important;
  }
  .hero {
    color: #000;
    background: #fff !important;
    border: 1px solid #bbb;
    box-shadow: none;
    padding: 20px;
  }
  .hero::before { display: none; }
  .eyecrow, .hero-title, .hero-sub,
  .meta-cell dt, .meta-cell dd,
  .stat-num, .stat-label { color: #000 !important; }
  .meta-grid, .stat {
    background: #fff !important;
    border-color: #bbb !important;
  }
  .card {
    opacity: 1 !important;
    transform: none !important;
    box-shadow: none;
    page-break-inside: avoid;
    break-inside: avoid;
    border-color: #bbb;
  }
  .card-head { background: #f5f5f5 !important; }
  .status-pill { border: 1px solid #999; }
  a { color: #000; border-bottom: none; }
  code { background: #f5f5f5; border-color: #bbb; }
}
