:root {
  --ink: #12202e;
  --ink-soft: #3a4a5c;
  --paper: #f3f6f4;
  --panel: #ffffff;
  --line: #d5dde6;
  --accent: #0f7a6a;
  --accent-deep: #0a554a;
  --warn: #b45309;
  --ok: #15803d;
  --done-bg: #e8f5f1;
  --next-bg: #eef2f7;
  --shadow: 0 12px 40px rgba(18, 32, 46, 0.08);
  --radius: 14px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 0% 0%, rgba(15, 122, 106, 0.08), transparent 40%),
    radial-gradient(circle at 100% 10%, rgba(18, 32, 46, 0.06), transparent 35%),
    linear-gradient(180deg, #e9efec 0%, var(--paper) 28%, #eef2f0 100%);
  min-height: 100vh;
  line-height: 1.55;
}

a {
  color: var(--accent-deep);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

.shell {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 4rem;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  animation: rise 0.55s ease both;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand span {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--accent-deep);
  background: rgba(15, 122, 106, 0.1);
  border-color: rgba(15, 122, 106, 0.25);
}

.hero {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 3vw, 2.4rem);
  margin-bottom: 1.5rem;
  animation: rise 0.7s ease both;
}

.hero .eyebrow {
  display: inline-block;
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.hero p {
  margin: 0;
  max-width: 58ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--line);
  background: #f8faf9;
}

.chip.ok {
  background: var(--done-bg);
  border-color: #b7dfd4;
  color: var(--ok);
}

.chip.next {
  background: var(--next-bg);
  border-color: #c9d4e2;
  color: #334155;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid.stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1.5rem;
}

.grid.cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat,
.card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat {
  padding: 1.1rem 1.15rem;
  animation: rise 0.75s ease both;
}

.stat:nth-child(2) { animation-delay: 0.05s; }
.stat:nth-child(3) { animation-delay: 0.1s; }
.stat:nth-child(4) { animation-delay: 0.15s; }

.stat .label {
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stat .value {
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: -0.03em;
}

.stat .hint {
  margin-top: 0.2rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.card,
.panel {
  padding: 1.25rem 1.35rem;
}

.card {
  animation: rise 0.8s ease both;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 44px rgba(18, 32, 46, 0.12);
}

.card h2,
.panel h2,
section h2 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.card p,
.panel p {
  margin: 0;
  color: var(--ink-soft);
}

.card .status {
  display: inline-block;
  margin-bottom: 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ok);
}

.card a.cta {
  display: inline-block;
  margin-top: 1rem;
  text-decoration: none;
  color: white;
  background: var(--accent);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.card a.cta:hover {
  background: var(--accent-deep);
  color: white;
}

.section {
  margin-top: 1.5rem;
  animation: rise 0.85s ease both;
}

.flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}

.flow-step {
  position: relative;
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem;
  min-height: 110px;
}

.flow-step.done {
  background: var(--done-bg);
  border-color: #b7dfd4;
}

.flow-step.current {
  outline: 2px solid rgba(15, 122, 106, 0.35);
}

.flow-step .n {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-deep);
  font-weight: 600;
}

.flow-step h3 {
  margin: 0.35rem 0 0.25rem;
  font-size: 0.95rem;
}

.flow-step p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  text-align: left;
  padding: 0.7rem 0.6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--ink-soft);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

code,
.mono {
  font-family: var(--font-mono);
  font-size: 0.86em;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge.ok {
  background: #dcfce7;
  color: var(--ok);
}

.badge.pending {
  background: #e2e8f0;
  color: #475569;
}

pre {
  margin: 1rem 0 0;
  padding: 1rem;
  overflow-x: auto;
  background: #12202e;
  color: #e7eef5;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
}

.checklist {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.checklist li {
  display: grid;
  grid-template-columns: 1.2rem 1fr;
  gap: 0.55rem;
  padding: 0.45rem 0;
  border-bottom: 1px dashed var(--line);
}

.checklist li:last-child {
  border-bottom: 0;
}

.checklist .mark {
  color: var(--ok);
  font-weight: 700;
}

.footer {
  margin-top: 2rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
  text-align: center;
}

.figure {
  margin: 1rem 0 0;
}

.figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.pbi-embed {
  margin-top: 1rem;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7faf8;
  overflow: hidden;
}

.pbi-embed iframe {
  display: block;
  width: 100%;
  min-height: 1060px;
  height: 80vh;
  border: 0;
}

.hint-line {
  margin-top: 0.75rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.mermaid {
  margin-top: 1rem;
  padding: 1rem;
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-x: auto;
}

.dag {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.dag-node {
  min-width: min(280px, 100%);
  text-align: center;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f7faf8;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 600;
}

.dag-node.bookend {
  background: var(--done-bg);
  border-color: #b7dfd4;
  color: var(--accent-deep);
}

.dag-arrow {
  color: var(--accent-deep);
  font-size: 1.1rem;
  line-height: 1;
}

.dag-branch {
  width: min(720px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.dag-branch .dag-node {
  min-width: 0;
  font-size: 0.8rem;
  padding: 0.65rem 0.5rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .grid.stats,
  .flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid.cards {
    grid-template-columns: 1fr;
  }

  .dag-branch {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .grid.stats,
  .flow {
    grid-template-columns: 1fr;
  }
}
