/* Ultimarii Workflows Guide
   Design tokens lifted from ultimarii.com (Salient theme):
   Space Grotesk 400 headings at -3% tracking, Inter body at 18px,
   ink #00283C, bone #EDEAE5, teal #008484. */

:root {
  --bone:       #EDEAE5;
  --ink:        #00283C;
  --teal:       #008484;
  --teal-dark:  #006A6A;
  --white:      #FFFFFF;
  --grey:       #F4F4F4;
  --rule:       rgba(0, 40, 60, 0.12);
  --rule-soft:  rgba(0, 40, 60, 0.07);
  --muted:      rgba(0, 40, 60, 0.66);
  --shadow:     0 1px 2px rgba(0,40,60,.06), 0 8px 24px rgba(0,40,60,.08);

  --sidebar-w:  290px;
  --measure:    780px;

  --sans:   "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --display:"Space Grotesk", var(--sans);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.667;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 68px;
  padding: 0 28px;
  background: var(--ink);
  color: var(--white);
}

.masthead__brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--white);
  text-decoration: none;
}

.masthead__brand:hover { color: var(--white); }

.masthead__tag {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.62);
}

.masthead__spacer { flex: 1; }

.masthead__link {
  font-size: 15px;
  font-weight: 500;
  color: rgba(255,255,255,.82);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.masthead__link:hover { color: var(--white); }

/* ---------- Shell ---------- */

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  align-items: start;
  max-width: 1440px;
  margin: 0 auto;
}

/* ---------- Sidebar ---------- */

.sidebar {
  position: sticky;
  top: 68px;
  max-height: calc(100vh - 68px);
  overflow-y: auto;
  padding: 40px 24px 64px 28px;
  border-right: 1px solid var(--rule-soft);
}

.sidebar__heading {
  margin: 0 0 14px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav { margin: 0 0 30px; padding: 0; list-style: none; }

.nav__link {
  display: block;
  padding: 7px 12px;
  margin-left: -12px;
  border-radius: 7px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.nav__link:hover { background: rgba(0,40,60,.05); color: var(--teal); }

.nav__link[aria-current="page"] {
  background: var(--ink);
  color: var(--white);
}

.subnav {
  margin: 6px 0 0;
  padding: 4px 0 4px 13px;
  list-style: none;
  border-left: 2px solid var(--rule);
}

.subnav__link {
  display: block;
  padding: 5px 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: -0.015em;
}

.subnav__link:hover { color: var(--teal); }

/* ---------- Content ---------- */

.content {
  min-width: 0;
  padding: 56px 40px 120px;
}

.prose { max-width: var(--measure); }

.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
}

.prose h1 {
  margin: 0 0 20px;
  font-family: var(--display);
  font-size: 48px;
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.lede {
  margin: 0 0 40px;
  font-size: 21px;
  line-height: 1.55;
  letter-spacing: -0.015em;
  color: var(--muted);
}

.prose h2 {
  margin: 56px 0 16px;
  padding-top: 28px;
  border-top: 1px solid var(--rule-soft);
  font-family: var(--display);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.prose h3 {
  margin: 36px 0 12px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.prose p { margin: 0 0 20px; }

.prose a { color: var(--teal); font-weight: 500; text-underline-offset: 3px; }
.prose a:hover { color: var(--teal-dark); }

.prose strong { font-weight: 600; }

/* UI affordance names, e.g. Start case plan */
.ui {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: var(--white);
  font-size: 0.9em;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* ---------- Definition list ---------- */

.deflist { margin: 0 0 28px; padding: 0; }
.deflist dt {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.025em;
}
.deflist dd { margin: 0 0 18px; color: var(--muted); }

/* ---------- Callouts ---------- */

.callout {
  margin: 32px 0;
  padding: 22px 26px;
  border-left: 3px solid var(--teal);
  border-radius: 0 10px 10px 0;
  background: var(--white);
  box-shadow: var(--shadow);
}

.callout--note { border-left-color: var(--ink); }

.callout__title {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.callout p:last-child { margin-bottom: 0; }

.callout--inline {
  margin: 20px 0 0;
  padding: 14px 18px;
  border-left-width: 2px;
  box-shadow: none;
  background: rgba(0,132,132,.06);
  font-size: 16.5px;
  line-height: 1.55;
}

/* ---------- Steps ---------- */

.step { margin: 0 0 12px; padding: 44px 0 0; }
.step + .step { border-top: 1px solid var(--rule-soft); }

.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.step__title {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.028em;
}

/* ---------- Figures ---------- */

figure { margin: 26px 0 0; }

figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--white);
  box-shadow: var(--shadow);
}

figure.figure--chip img { width: auto; max-width: 100%; box-shadow: none; }

figcaption {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- Pager ---------- */

.pager {
  display: flex;
  gap: 16px;
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1px solid var(--rule-soft);
}

.pager__link {
  flex: 1;
  padding: 18px 22px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--white);
  text-decoration: none;
  color: var(--ink);
}

.pager__link:hover { border-color: var(--teal); }

.pager__dir {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.pager__title {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.pager__link--next { text-align: right; }

/* ---------- Footer ---------- */

.foot {
  max-width: var(--measure);
  margin-top: 56px;
  font-size: 14.5px;
  color: var(--muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    max-height: none;
    padding: 28px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--rule-soft);
  }
  .subnav { display: none; }
  .content { padding: 36px 20px 80px; }
  .prose h1 { font-size: 38px; }
  .prose h2 { font-size: 27px; }
  .step__title { font-size: 23px; }
  .lede { font-size: 19px; }
  .pager { flex-direction: column; }
  .pager__link--next { text-align: left; }
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  .masthead { padding: 0 18px; }
  .masthead__tag { display: none; }
  .prose h1 { font-size: 32px; }
}
