:root {
  --bg: #f5efe4;
  --surface: rgba(255, 250, 242, 0.92);
  --surface-strong: #fffdf8;
  --ink: #1f2a2c;
  --muted: #5d696b;
  --line: rgba(31, 42, 44, 0.12);
  --accent: #c85d2e;
  --accent-soft: #f7d8c6;
  --highlight: #0f7c74;
  --nav: rgba(21, 32, 34, 0.92);
  --shadow: 0 20px 45px rgba(41, 33, 24, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(200, 93, 46, 0.18), transparent 30%),
    radial-gradient(circle at bottom right, rgba(15, 124, 116, 0.16), transparent 25%),
    linear-gradient(180deg, #f7f1e8 0%, #f3ecdf 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 85%);
}

.site-shell {
  width: min(1320px, calc(100% - 40px));
  margin: 24px auto 40px;
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  padding: 18px 22px;
  background: var(--nav);
  color: #f7f3ea;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.brand {
  color: inherit;
  text-decoration: none;
  display: grid;
  gap: 4px;
}

.brand-kicker,
.eyebrow,
.tool-tag,
.process-tag,
.panel-title,
.status-pill {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 800;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topnav a {
  color: inherit;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.topnav a.active,
.topnav a:hover,
.topnav a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.page-grid {
  display: grid;
  gap: 24px;
}

.hero,
.section-card {
  padding: 30px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-home {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 20px;
  align-items: stretch;
}

.compact-hero {
  padding-bottom: 22px;
}

.hero-copy h1,
.section-heading h2,
.overview-card h3,
.timeline-step h3,
.info-card h3,
.tool-card h3,
.process-card h3,
.usage-card h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  line-height: 1.05;
}

.hero-copy h1 {
  margin-top: 10px;
  font-size: clamp(2.2rem, 4vw, 4.2rem);
  max-width: 11ch;
}

.hero-text,
.info-card p,
.tool-summary,
.tool-card dd,
.process-card p,
.usage-card p,
.overview-card p,
.timeline-step p {
  color: var(--muted);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button-primary,
.button-secondary,
.tool-link,
.text-link {
  text-decoration: none;
  font-weight: 700;
}

.button-primary,
.button-secondary {
  padding: 12px 18px;
  border-radius: 999px;
}

.button-primary {
  background: var(--accent);
  color: #fff8f2;
}

.button-secondary {
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
}

.hero-panel {
  padding: 28px;
  background: linear-gradient(180deg, #15383b 0%, #0f2e31 100%);
  color: #f6f4ee;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-panel ul {
  padding-left: 18px;
  margin: 18px 0 0;
  display: grid;
  gap: 12px;
  line-height: 1.5;
}

.section-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.section-heading h2 {
  font-size: clamp(1.7rem, 2vw, 2.3rem);
}

.overview-grid,
.two-columns,
.tool-grid,
.usage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

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

.overview-card-wide {
  grid-column: span 2;
}

.overview-card,
.timeline-step,
.info-card,
.tool-card,
.process-card,
.usage-card {
  position: relative;
  z-index: 0;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.timeline-step span {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
}

.tool-grid {
  align-items: start;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rich-tool-card {
  display: grid;
  gap: 16px;
}

.tool-head {
  display: flex;
  gap: 14px;
  align-items: center;
}

.tool-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 8px;
}

.tool-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.tool-card div {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.tool-card dt {
  font-weight: 800;
  margin-bottom: 6px;
}

.tool-card dd {
  margin: 0;
}

.tool-link,
.text-link {
  color: var(--highlight);
}

.tool-inline {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px 3px 6px;
  border-radius: 999px;
  background: rgba(15, 124, 116, 0.08);
  border: 1px solid rgba(15, 124, 116, 0.16);
  vertical-align: middle;
  cursor: pointer;
}

.tool-inline-logo {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.tool-inline-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
}

.tool-popup-shell {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: block;
}

.tool-popup-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(21, 32, 34, 0.42);
}

.tool-popup-dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(520px, calc(100vw - 32px));
  max-height: min(80vh, 900px);
  overflow: auto;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.tool-popup-card {
  width: min(480px, 90vw);
  display: grid;
  gap: 20px;
  padding: 24px 28px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  text-transform: none;
  letter-spacing: normal;
}

.tool-popup-card * {
  font-family: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.tool-popup-header {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.tool-popup-logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 12px;
}

.tool-popup-kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 800;
}

.tool-popup-title {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.05;
}

.tool-popup-summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.tool-popup-divider {
  width: 100%;
  height: 1px;
  background: var(--line);
}

.tool-popup-fields {
  display: grid;
  gap: 0;
}

.tool-popup-field {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.tool-popup-field-title {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 800;
}

.tool-popup-field-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.tool-popup-link {
  color: var(--highlight);
  font-weight: 700;
  text-decoration: none;
}

.info-card:hover,
.info-card:focus-within,
.overview-card:hover,
.overview-card:focus-within,
.process-card:hover,
.process-card:focus-within,
.usage-card:hover,
.usage-card:focus-within {
  z-index: 8;
}

.tool-inline:hover,
.tool-inline:focus,
.tool-inline:focus-visible {
  z-index: 12;
  outline: none;
}

.process-list {
  display: grid;
  gap: 18px;
}

.process-filters {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.45);
}

.process-search,
.process-filter-group {
  display: grid;
  gap: 10px;
}

.process-filter-label {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink);
}

.process-search-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  font: inherit;
}

.process-search-input:focus {
  outline: 2px solid rgba(15, 124, 116, 0.2);
  border-color: rgba(15, 124, 116, 0.28);
}

.process-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.process-filter-chip {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.process-filter-chip:hover,
.process-filter-chip:focus-visible {
  border-color: rgba(15, 124, 116, 0.24);
  outline: none;
}

.process-filter-chip.is-active {
  background: rgba(15, 124, 116, 0.12);
  border-color: rgba(15, 124, 116, 0.24);
  color: var(--highlight);
}

.process-empty-state {
  margin: 20px 0 0;
  padding: 18px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.3);
}

.process-entry {
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.process-entry:hover,
.process-entry:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(41, 33, 24, 0.1);
  border-color: rgba(15, 124, 116, 0.24);
  outline: none;
}

.process-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.status-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 124, 116, 0.12);
  color: var(--highlight);
}

.process-tools {
  margin-bottom: 0;
  font-weight: 700;
}

.process-action {
  margin: 16px 0 0;
  color: var(--highlight);
  font-weight: 700;
}

.highlighted-process {
  background: linear-gradient(180deg, rgba(247, 216, 198, 0.4), rgba(255, 253, 248, 1));
}

.process-placeholder {
  border-style: dashed;
}

body.drawer-open {
  overflow: hidden;
}

.process-drawer-shell {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.process-drawer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(21, 32, 34, 0.42);
  opacity: 0;
  transition: opacity 220ms ease;
}

.process-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(620px, 100vw);
  height: 100%;
  padding: 28px;
  border: 0;
  border-left: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.98);
  box-shadow: -20px 0 40px rgba(41, 33, 24, 0.14);
  overflow-y: auto;
  overflow-x: hidden;
  transform: translateX(100%);
  transition: transform 220ms ease;
}

.process-drawer-shell.is-open .process-drawer-backdrop {
  opacity: 1;
}

.process-drawer-shell.is-open .process-drawer {
  transform: translateX(0);
}

.process-drawer-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.process-drawer-header h2 {
  margin: 8px 0 0;
  font-family: "Fraunces", serif;
  line-height: 1.05;
  font-size: clamp(1.8rem, 2vw, 2.4rem);
}

.process-drawer-close {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 1.5rem;
  cursor: pointer;
}

.process-drawer-goal,
.process-drawer-tools {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.process-drawer-tools-label {
  color: var(--ink);
  font-weight: 800;
}

.process-drawer-sections {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  overflow-x: visible;
}

.process-accordion {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  overflow: visible;
}

.process-accordion-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font-weight: 800;
  cursor: pointer;
}

.process-accordion-summary::-webkit-details-marker {
  display: none;
}

.process-accordion-summary::after {
  content: "+";
  font-size: 1.35rem;
  color: var(--highlight);
}

.process-accordion[open] .process-accordion-summary::after {
  content: "−";
}

.process-accordion-body {
  padding: 0 20px 20px;
  color: var(--muted);
  overflow: visible;
}

.process-drawer .tool-inline {
  max-width: 100%;
}

.process-accordion-body p {
  margin: 0 0 14px;
  line-height: 1.7;
}

.process-drawer-list,
.process-drawer-bullets {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 12px;
  line-height: 1.7;
}

@media (max-width: 1100px) {
  .hero-home,
  .overview-grid,
  .timeline,
  .tool-grid,
  .two-columns,
  .usage-grid {
    grid-template-columns: 1fr;
  }

  .overview-card-wide {
    grid-column: auto;
  }
}

@media (max-width: 820px) {
  .site-shell {
    width: min(100% - 24px, 1320px);
    margin: 12px auto 24px;
  }

  .topbar {
    padding: 18px;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero,
  .section-card {
    padding: 22px;
  }

  .hero-copy h1 {
    max-width: none;
  }

  .process-drawer {
    width: 100vw;
    padding: 22px;
  }

  .process-filters {
    padding: 18px;
  }
}
