:root {
  --if-bg: oklch(96.5% 0.008 230);
  --if-bg-2: oklch(94% 0.010 230);
  --if-surface: oklch(98.5% 0.006 230);
  --if-surface-2: oklch(95.5% 0.009 230);
  --if-rule: oklch(85% 0.014 230);
  --if-rule-2: oklch(76% 0.018 230);
  --if-ink: oklch(20% 0.030 250);
  --if-ink-2: oklch(34% 0.024 250);
  --if-ink-3: oklch(50% 0.020 250);
  --if-ink-4: oklch(66% 0.016 230);
  --if-accent: oklch(50% 0.10 200);
  --if-accent-bg: oklch(93% 0.030 200);
  --if-signal: oklch(62% 0.16 65);
  --if-signal-bg: oklch(94% 0.04 70);
  --if-shadow-1: 0 1px 2px oklch(20% 0.03 250 / 0.06);
  --if-shadow-2: 0 8px 24px oklch(20% 0.03 250 / 0.08);
}

:root[data-theme="dark"] {
  --if-bg: oklch(20% 0.022 230);
  --if-bg-2: oklch(16% 0.020 230);
  --if-surface: oklch(24% 0.020 230);
  --if-surface-2: oklch(28% 0.020 230);
  --if-rule: oklch(40% 0.025 230);
  --if-rule-2: oklch(52% 0.028 230);
  --if-ink: oklch(92% 0.012 220);
  --if-ink-2: oklch(78% 0.014 220);
  --if-ink-3: oklch(64% 0.014 220);
  --if-ink-4: oklch(52% 0.014 220);
  --if-accent: oklch(72% 0.10 195);
  --if-accent-bg: oklch(30% 0.040 200);
  --if-signal: oklch(78% 0.12 70);
  --if-signal-bg: oklch(31% 0.05 70);
  --if-shadow-1: 0 1px 2px oklch(0% 0 0 / 0.24);
  --if-shadow-2: 0 12px 32px oklch(0% 0 0 / 0.30);
}

body.if-shell-ready {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: var(--if-bg-2);
  color: var(--if-ink);
}

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

.if-shell {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--if-accent) 12%, transparent), transparent 24rem),
    linear-gradient(135deg, var(--if-bg-2), var(--if-bg));
  color: var(--if-ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.if-sidebar {
  position: sticky;
  top: 12px;
  height: calc(100vh - 24px);
  overflow: auto;
  scrollbar-gutter: stable;
  margin: 12px 0 12px 12px;
  padding: 14px 12px 18px;
  border: 1.5px solid color-mix(in srgb, var(--if-accent) 18%, var(--if-rule));
  border-radius: 30px;
  background:
    radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--if-accent) 12%, transparent), transparent 15rem),
    linear-gradient(180deg, color-mix(in srgb, var(--if-surface) 96%, var(--if-accent-bg)), var(--if-surface-2));
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, white 70%, transparent),
    0 22px 46px -30px color-mix(in srgb, var(--if-accent) 42%, transparent),
    var(--if-shadow-1);
}

.if-side-brand {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 9px 10px 10px;
  margin-bottom: 18px;
  border: 1px solid color-mix(in srgb, var(--if-accent) 20%, var(--if-rule));
  border-radius: 22px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--if-surface) 88%, white), color-mix(in srgb, var(--if-accent-bg) 62%, var(--if-surface)));
  color: var(--if-ink);
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, white 72%, transparent),
    0 12px 30px -24px color-mix(in srgb, var(--if-accent) 46%, transparent);
}

.if-side-brand::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -10px;
  height: 1px;
  background: color-mix(in srgb, var(--if-accent) 22%, var(--if-rule));
  pointer-events: none;
}

.if-mark {
  font: italic 700 24px/1 Newsreader, Georgia, serif;
  letter-spacing: -0.03em;
  color: var(--if-ink);
}

.if-mark span {
  color: var(--if-accent);
}

.if-side-brand small,
.if-side-section,
.if-code,
.if-pill-code,
.if-quick-link {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.if-side-brand small {
  display: block;
  margin-top: 2px;
  color: var(--if-ink-4);
  font-size: 9px;
  font-weight: 800;
}

.if-side-section {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 23px;
  margin: 12px 6px 6px;
  padding: 0 9px;
  border: 1px solid color-mix(in srgb, var(--if-accent) 18%, var(--if-rule));
  border-radius: 999px;
  background: color-mix(in srgb, var(--if-surface) 72%, transparent);
  color: var(--if-accent);
  font-size: 9.5px;
  font-weight: 800;
}

.if-side-group {
  margin: 0;
}

.if-side-group > summary {
  cursor: pointer;
  list-style: none;
  width: calc(100% - 12px);
}

.if-side-group > summary::-webkit-details-marker {
  display: none;
}

.if-side-caret {
  color: var(--if-ink-4);
  font-size: 11px;
  transform: rotate(-90deg);
  transition: transform 160ms ease;
}

.if-side-group[open] > summary .if-side-caret {
  transform: rotate(0deg);
}

.if-side-group:not([open]) {
  margin-bottom: 4px;
}

.if-side-group:not([open]) .if-side-link {
  display: none;
}

.if-side-link {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px 8px 12px;
  margin: 4px 0;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--if-ink-2);
  font-size: 12.5px;
  text-decoration: none;
  background: color-mix(in srgb, var(--if-surface) 56%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, white 54%, transparent);
}

.if-side-link:hover,
.if-side-link.active {
  color: var(--if-accent);
  border-color: color-mix(in srgb, var(--if-accent) 24%, var(--if-rule));
  background:
    linear-gradient(135deg, var(--if-accent-bg), color-mix(in srgb, var(--if-surface) 86%, transparent));
  text-decoration: none;
}

.if-side-link.active {
  font-weight: 700;
  box-shadow:
    inset 4px 0 0 var(--if-accent),
    0 12px 26px -22px color-mix(in srgb, var(--if-accent) 64%, transparent);
}

.if-code {
  min-width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 6px;
  border: 1px solid color-mix(in srgb, var(--if-accent) 12%, var(--if-rule));
  border-radius: 999px;
  background: color-mix(in srgb, var(--if-surface) 80%, transparent);
  color: var(--if-ink-4);
  font-size: 9px;
}

.if-side-link.active .if-code {
  color: var(--if-accent);
}

.if-main {
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.if-nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  border: 0;
  background: color-mix(in srgb, var(--if-ink) 16%, transparent);
  backdrop-filter: blur(4px);
}

.if-nav-close {
  display: none;
  margin-left: auto;
  margin-bottom: 8px;
  width: 38px;
  min-height: 38px;
  border: 1px solid color-mix(in srgb, var(--if-accent) 20%, var(--if-rule));
  border-radius: 14px;
  background: color-mix(in srgb, var(--if-surface) 90%, transparent);
  color: var(--if-accent);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.if-shell.if-theme-locked .if-theme-btn,
.if-shell.if-theme-locked .if-pill-title {
  display: none;
}

.if-pillbar {
  position: relative;
  top: auto;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  width: calc(100% - 28px);
  margin: 12px 14px 0;
  padding: 10px 16px 10px 18px;
  border: 1.5px solid color-mix(in srgb, var(--if-accent) 22%, var(--if-rule));
  border-radius: 28px;
  background: color-mix(in srgb, var(--if-surface) 96%, transparent);
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--if-accent) 14%, transparent) inset,
    0 22px 48px -22px color-mix(in srgb, var(--if-accent) 28%, transparent),
    var(--if-shadow-1);
  backdrop-filter: blur(16px);
}

.if-pill-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--if-accent) 22%, var(--if-rule));
  border-radius: 14px;
  background: linear-gradient(135deg, var(--if-surface-2), var(--if-surface));
  color: var(--if-ink);
  text-decoration: none;
}

.if-pill-logo .if-mark {
  font-size: 26px;
}

.if-pill-code {
  color: var(--if-ink-4);
  font-size: 9px;
  font-weight: 800;
}

.if-pill-title {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.16;
  color: var(--if-ink);
}

.if-pill-title em {
  color: var(--if-accent);
  font-family: Newsreader, Georgia, serif;
  font-style: italic;
  font-weight: 500;
}

.if-pill-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.if-nav-toggle {
  display: none;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--if-rule);
  border-radius: 14px;
  background: var(--if-surface);
  color: var(--if-accent);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.if-nav-toggle::before {
  content: "\2630";
  font-size: 16px;
  line-height: 1;
}

.if-theme-btn,
.if-quick-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--if-rule);
  border-radius: 14px;
  background: var(--if-surface);
  color: var(--if-ink-2);
}

.if-theme-btn {
  width: 42px;
  cursor: pointer;
  font-weight: 800;
}

.if-theme-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 0;
}

.if-theme-sun::before {
  content: "☀";
  font-size: 16px;
}

.if-theme-moon::before {
  content: "☾";
  font-size: 16px;
}

:root[data-theme="dark"] .if-theme-sun {
  display: none;
}

:root:not([data-theme="dark"]) .if-theme-moon {
  display: none;
}

.if-quick-link {
  padding: 0 12px;
  color: var(--if-accent);
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
}

.if-theme-btn:hover,
.if-quick-link:hover {
  border-color: var(--if-accent);
  background: var(--if-accent-bg);
  color: var(--if-accent);
}

.if-screen-wrap {
  min-height: 0;
  height: 100%;
  padding: 14px 22px 22px;
}

.if-screen {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--if-rule);
  border-radius: 28px;
  background: var(--if-bg);
  box-shadow: var(--if-shadow-2);
}

.if-pagehead {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 10px 18px 11px;
  border-bottom: 1px solid color-mix(in srgb, var(--if-accent) 12%, var(--if-rule));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--if-surface) 98%, var(--if-bg)), color-mix(in srgb, var(--if-bg) 94%, var(--if-surface)));
  box-shadow: 0 10px 18px -18px color-mix(in srgb, var(--if-ink) 28%, transparent);
}

.if-pagehead h1 {
  margin: 0;
  color: var(--if-ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(20px, 1.8vw, 28px);
  font-weight: 600;
  line-height: 1.04;
}

.if-scroll-layer {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  padding-top: 12px;
  background: var(--if-bg);
}

.if-content {
  min-height: 0;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
}

body.if-shell-ready .if-content > header.topbar {
  display: none !important;
}

body.if-shell-ready .if-content > .page {
  max-width: none;
  margin: 0;
  padding: 18px;
}

body.if-shell-ready .if-content > .page .hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.55fr);
  gap: 14px;
  align-items: center;
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--if-rule);
  border-radius: 20px;
  background:
    radial-gradient(circle at 14% 0%, color-mix(in srgb, var(--if-accent) 10%, transparent), transparent 20rem),
    color-mix(in srgb, var(--if-bg) 84%, var(--if-surface));
  box-shadow: var(--if-shadow-2);
}

body.if-shell-ready .if-content > .page .hero h1 {
  max-width: 780px;
  margin: 0;
  color: var(--if-ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: 0;
}

body.if-shell-ready .if-content > .page .hero.platform-hero {
  grid-template-columns: 1fr;
  padding: 0 0 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.if-shell-ready .if-content > .page .hero.platform-hero h1 {
  max-width: 980px;
  font-size: clamp(30px, 3.05vw, 48px);
}

body.if-shell-ready .if-content > .page .hero.platform-hero .lead {
  max-width: 980px;
}

body.if-shell-ready .if-content > .page .hero h1 em {
  color: var(--if-accent);
  font-family: Newsreader, Georgia, serif;
  font-style: italic;
  font-weight: 500;
}

body.if-shell-ready .if-content > .page .lead,
body.if-shell-ready .if-content > .page .hero .lead {
  max-width: 760px;
  color: var(--if-ink-3);
  font-family: Newsreader, Georgia, serif;
  font-size: 14.5px;
  font-style: italic;
  line-height: 1.46;
}

body.if-shell-ready .if-content > .page .hero .panel {
  padding: 14px;
}

body.if-shell-ready .if-content > .page .hero .panel h2 {
  margin-bottom: 8px;
  font-size: 15px;
}

body.if-shell-ready .if-content > .page .hero .panel p {
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.42;
}

body.if-shell-ready .if-content > .page .kicker,
body.if-shell-ready .if-content > .page .tag,
body.if-shell-ready .if-content > .page .label {
  color: var(--if-accent);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.if-shell-ready .if-content > .page .panel,
body.if-shell-ready .if-content > .page .card,
body.if-shell-ready .if-content > .page .asset,
body.if-shell-ready .if-content > .page .stage,
body.if-shell-ready .if-content > .page .metric,
body.if-shell-ready .if-content > .page .meta-box,
body.if-shell-ready .if-content > .page .readiness-card,
body.if-shell-ready .if-content > .page .dash-panel {
  border: 1px solid color-mix(in srgb, var(--if-accent) 14%, var(--if-rule));
  border-radius: 14px;
  background: var(--if-surface);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, white 65%, transparent),
    0 12px 30px -26px color-mix(in srgb, var(--if-accent) 42%, transparent);
}

body.if-shell-ready .if-content > .page .panel h2,
body.if-shell-ready .if-content > .page .card h3,
body.if-shell-ready .if-content > .page .asset h3,
body.if-shell-ready .if-content > .page .stage h3,
body.if-shell-ready .if-content > .page .readiness-card h3 {
  color: var(--if-ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  letter-spacing: 0;
}

body.if-shell-ready .if-content > .page .panel p,
body.if-shell-ready .if-content > .page .card p,
body.if-shell-ready .if-content > .page .asset p,
body.if-shell-ready .if-content > .page .stage p,
body.if-shell-ready .if-content > .page .readiness-card li {
  color: var(--if-ink-2);
  font-size: 14px;
  line-height: 1.58;
}

body.if-shell-ready .if-content > .page .button,
body.if-shell-ready .if-content > .page .quick-link {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 9px;
}

body.if-shell-ready .if-content > .page .entry-actions {
  gap: 7px;
}

body.if-shell-ready .if-content > .page .landing-metric-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 10px;
}

body.if-shell-ready .if-content > .page .landing-metric {
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--if-rule);
  border-radius: 14px;
  background: color-mix(in srgb, var(--if-surface) 84%, var(--if-bg));
  box-shadow: inset 0 1px 0 color-mix(in srgb, white 62%, transparent);
}

body.if-shell-ready .if-content > .page .landing-metric small,
body.if-shell-ready .if-content > .page .landing-tab,
body.if-shell-ready .if-content > .page .landing-rail-label,
body.if-shell-ready .if-content > .page .landing-card small,
body.if-shell-ready .if-content > .page .landing-status {
  color: var(--if-ink-4);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.if-shell-ready .if-content > .page .landing-metric b {
  display: block;
  margin-top: 5px;
  color: var(--if-accent);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 22px;
  line-height: 1;
}

body.if-shell-ready .if-content > .page .landing-metric span {
  display: block;
  margin-top: 4px;
  color: var(--if-ink-4);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.if-shell-ready .if-content > .page .landing-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(260px, 1.35fr);
  gap: 8px;
  margin: 0 0 10px;
}

body.if-shell-ready .if-content > .page .landing-control {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  border: 1px solid var(--if-rule);
  border-radius: 9px;
  background: var(--if-surface);
  color: var(--if-ink-2);
  font-size: 12.5px;
}

body.if-shell-ready .if-content > .page .landing-search {
  color: var(--if-ink-4);
}

body.if-shell-ready .if-content > .page .landing-tabs {
  display: flex;
  gap: 8px;
  margin: 2px 0 12px;
  border-bottom: 1px solid var(--if-rule);
  overflow-x: auto;
}

body.if-shell-ready .if-content > .page .landing-tab {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--if-ink-4);
  white-space: nowrap;
}

body.if-shell-ready .if-content > .page .landing-tab.is-active {
  background: color-mix(in srgb, var(--if-accent-bg) 72%, transparent);
  border-bottom-color: var(--if-accent);
  color: var(--if-accent);
}

body.if-shell-ready .if-content > .page .landing-cockpit {
  display: grid;
  grid-template-columns: minmax(210px, 0.48fr) minmax(0, 1.4fr) minmax(280px, 0.72fr);
  gap: 14px;
  align-items: stretch;
}

body.if-shell-ready .if-content > .page .landing-rail,
body.if-shell-ready .if-content > .page .landing-panel,
body.if-shell-ready .if-content > .page .landing-inspector {
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--if-accent) 14%, var(--if-rule));
  border-radius: 14px;
  background: color-mix(in srgb, var(--if-surface) 88%, var(--if-bg));
  box-shadow: inset 0 1px 0 color-mix(in srgb, white 62%, transparent);
}

body.if-shell-ready .if-content > .page .landing-rail,
body.if-shell-ready .if-content > .page .landing-inspector {
  padding: 14px;
}

body.if-shell-ready .if-content > .page .landing-panel {
  padding: 0;
  overflow: hidden;
}

body.if-shell-ready .if-content > .page .landing-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--if-rule);
}

body.if-shell-ready .if-content > .page .landing-panel-head h2,
body.if-shell-ready .if-content > .page .landing-inspector h2,
body.if-shell-ready .if-content > .page .landing-rail h2 {
  margin: 0;
  color: var(--if-ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 21px;
  line-height: 1.15;
}

body.if-shell-ready .if-content > .page .landing-rail-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

body.if-shell-ready .if-content > .page .landing-rail-item {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  color: var(--if-ink-2);
  text-decoration: none;
}

body.if-shell-ready .if-content > .page .landing-rail-item.is-active {
  background: var(--if-accent-bg);
  color: var(--if-accent);
}

body.if-shell-ready .if-content > .page .landing-rail-item span:last-child {
  min-width: 36px;
  padding: 3px 8px;
  border: 1px solid var(--if-rule);
  border-radius: 999px;
  color: var(--if-ink-4);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

body.if-shell-ready .if-content > .page .landing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

body.if-shell-ready .if-content > .page .landing-card {
  min-height: 136px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--if-rule);
  border-radius: 12px;
  background: var(--if-surface);
  color: inherit;
  text-decoration: none;
}

body.if-shell-ready .if-content > .page .landing-card h3 {
  margin: 0;
  color: var(--if-ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 21px;
  line-height: 1.15;
}

body.if-shell-ready .if-content > .page .landing-card p,
body.if-shell-ready .if-content > .page .landing-inspector p {
  margin: 0;
  color: var(--if-ink-2);
  font-size: 13.5px;
  line-height: 1.48;
}

body.if-shell-ready .if-content > .page .landing-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

body.if-shell-ready .if-content > .page .landing-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid var(--if-rule);
  border-radius: 999px;
  color: var(--if-ink-4);
  background: color-mix(in srgb, var(--if-bg) 74%, transparent);
}

body.if-shell-ready .if-content > .page .landing-status.live {
  border-color: color-mix(in srgb, var(--if-accent) 40%, var(--if-rule));
  color: var(--if-accent);
  background: var(--if-accent-bg);
}

body.if-shell-ready .if-content > .page .landing-output-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

body.if-shell-ready .if-content > .page .landing-output {
  padding: 10px 12px;
  border-left: 4px solid var(--if-accent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--if-surface-2) 70%, transparent);
  color: var(--if-ink-2);
  font-size: 13px;
}

body.if-shell-ready .if-content > .workbench {
  min-height: calc(100vh - 116px);
  margin: 0;
  padding: 18px;
}

body.if-shell-ready .if-content > .app-shell {
  min-height: auto;
  background: transparent;
}

body.if-shell-ready .if-content > .app-shell .app-topbar {
  position: static;
  top: auto;
  border-radius: 28px 28px 0 0;
  border-left: 0;
  border-right: 0;
  border-top: 0;
}

body.if-shell-ready .if-content > .app-shell .workbench {
  min-height: calc(100vh - 198px);
  padding: 18px;
}

body.if-shell-ready .if-content > .app-shell .qms-workspace,
body.if-shell-ready .if-content > .app-shell .workbench {
  min-height: calc(100vh - 198px);
  height: calc(100vh - 198px);
  overflow: hidden;
}

body.if-shell-ready .if-content > .qms-workspace {
  min-height: calc(100vh - 116px);
  height: calc(100vh - 116px);
  display: grid;
  grid-template-columns: minmax(300px, 0.58fr) minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  overflow: hidden;
}

body.if-shell-ready .if-content > .qms-workspace .control-panel,
body.if-shell-ready .if-content > .qms-workspace .preview-shell {
  min-height: 0;
  height: 100%;
  overflow: auto;
}

body.if-shell-ready .if-content > .policy-workspace,
body.if-shell-ready .if-content > .sop-workspace,
body.if-shell-ready .if-content > .workbench {
  min-height: calc(100vh - 116px);
  height: calc(100vh - 116px);
  overflow: hidden;
}

body.if-shell-ready .if-content > .policy-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
}

body.if-shell-ready .if-content > .sop-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
}

body.if-shell-ready .if-content > .workbench {
  display: grid;
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
}

body.if-shell-ready .if-content > .policy-workspace .policy-control-panel,
body.if-shell-ready .if-content > .policy-workspace .policy-preview-shell,
body.if-shell-ready .if-content > .sop-workspace .sop-control-panel,
body.if-shell-ready .if-content > .sop-workspace .sop-preview-shell,
body.if-shell-ready .if-content > .workbench > .workflow-control-panel,
body.if-shell-ready .if-content > .workbench > .workflow-preview-shell,
body.if-shell-ready .if-content > .workbench > .panel.workflow-control-panel {
  min-height: 0;
  height: 100%;
  max-height: none;
  overflow: auto;
}

body.if-shell-ready .if-content > .policy-workspace .policy-control-panel,
body.if-shell-ready .if-content > .sop-workspace .sop-control-panel,
body.if-shell-ready .if-content > .workbench > .workflow-control-panel,
body.if-shell-ready .if-content > .workbench > .panel.workflow-control-panel {
  position: relative;
  top: auto;
  align-self: stretch;
}

body.if-shell-ready .if-content > .policy-workspace .policy-preview-shell,
body.if-shell-ready .if-content > .sop-workspace .sop-preview-shell,
body.if-shell-ready .if-content > .workbench > .workflow-preview-shell {
  min-width: 0;
}

body.if-shell-ready .if-content > .app-shell .workbench > .control-panel,
body.if-shell-ready .if-content > .app-shell .workbench > .preview-shell,
body.if-shell-ready .if-content > .app-shell .workbench > .workflow-control-panel,
body.if-shell-ready .if-content > .app-shell .workbench > .workflow-preview-shell,
body.if-shell-ready .if-content > .app-shell .workbench > .sop-control-panel,
body.if-shell-ready .if-content > .app-shell .workbench > .sop-preview-shell,
body.if-shell-ready .if-content > .app-shell .workbench > .policy-control-panel,
body.if-shell-ready .if-content > .app-shell .workbench > .policy-preview-shell,
body.if-shell-ready .if-content > .app-shell .workbench > .panel.workflow-control-panel {
  min-height: 0;
  height: 100%;
  overflow: auto;
}

body.if-shell-ready .if-content > .qms-workspace .control-panel {
  padding-bottom: 18px;
}

body.if-shell-ready .if-content > .app-shell .control-panel,
body.if-shell-ready .if-content > .app-shell .preview-shell,
body.if-shell-ready .if-content > .app-shell .builder-section,
body.if-shell-ready .if-content > .app-shell .workflow-tab-panel,
body.if-shell-ready .if-content > .app-shell .builder-view {
  min-height: 0;
}

body.if-shell-ready .if-content .nav,
body.if-shell-ready .if-content .site-nav {
  display: none;
}

body.if-shell-ready .if-content > .topbar,
body.if-shell-ready .if-content > header.topbar {
  display: none;
}

body.if-shell-ready .if-content > .app-shell .site-nav {
  display: none;
}

body.if-shell-ready .if-content .app-topbar .top-actions {
  display: flex;
}

@media (max-width: 1120px) {
  .if-shell {
    grid-template-columns: 1fr;
  }

  .if-sidebar {
    position: fixed;
    top: 84px;
    left: 14px;
    z-index: 95;
    width: min(320px, calc(100vw - 28px));
    height: auto;
    max-height: calc(100vh - 98px);
    margin: 0;
    transform: translateX(-118%);
    transition: transform 180ms ease;
  }

  .if-shell.if-nav-open .if-sidebar {
    transform: translateX(0);
  }

  .if-shell.if-nav-open .if-nav-backdrop {
    display: block;
  }

  .if-nav-toggle {
    display: inline-flex;
  }

  .if-nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .if-screen-wrap {
    min-height: 0;
    height: 100%;
  }

  body.if-shell-ready .if-content > .page .landing-metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.if-shell-ready .if-content > .page .landing-cockpit,
  body.if-shell-ready .if-content > .page .landing-controls {
    grid-template-columns: 1fr;
  }

  body.if-shell-ready .if-content > .qms-workspace {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100vh - 116px);
  }

  body.if-shell-ready .if-content > .policy-workspace,
  body.if-shell-ready .if-content > .sop-workspace,
  body.if-shell-ready .if-content > .workbench {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100vh - 116px);
  }

  body.if-shell-ready .if-content > .app-shell .qms-workspace,
  body.if-shell-ready .if-content > .app-shell .workbench {
    height: auto;
    min-height: calc(100vh - 198px);
    overflow: visible;
  }

  body.if-shell-ready .if-content > .qms-workspace .control-panel,
  body.if-shell-ready .if-content > .qms-workspace .preview-shell,
  body.if-shell-ready .if-content > .policy-workspace .policy-control-panel,
  body.if-shell-ready .if-content > .policy-workspace .policy-preview-shell,
  body.if-shell-ready .if-content > .sop-workspace .sop-control-panel,
  body.if-shell-ready .if-content > .sop-workspace .sop-preview-shell,
  body.if-shell-ready .if-content > .workbench > .workflow-control-panel,
  body.if-shell-ready .if-content > .workbench > .workflow-preview-shell,
  body.if-shell-ready .if-content > .workbench > .panel.workflow-control-panel,
  body.if-shell-ready .if-content > .app-shell .workbench > .control-panel,
  body.if-shell-ready .if-content > .app-shell .workbench > .preview-shell,
  body.if-shell-ready .if-content > .app-shell .workbench > .workflow-control-panel,
  body.if-shell-ready .if-content > .app-shell .workbench > .workflow-preview-shell,
  body.if-shell-ready .if-content > .app-shell .workbench > .sop-control-panel,
  body.if-shell-ready .if-content > .app-shell .workbench > .sop-preview-shell,
  body.if-shell-ready .if-content > .app-shell .workbench > .policy-control-panel,
  body.if-shell-ready .if-content > .app-shell .workbench > .policy-preview-shell,
  body.if-shell-ready .if-content > .app-shell .workbench > .panel.workflow-control-panel {
    height: auto;
    max-height: none;
  }
}

@media (max-width: 680px) {
  .if-main {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
  }

  .if-pillbar {
    top: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px 42px;
    align-items: center;
    min-height: 58px;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 22px;
  }

  .if-pill-logo {
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    gap: 8px;
  }

  .if-pill-logo .if-code,
  .if-quick-link {
    display: none;
  }

  .if-pill-title {
    display: block;
    min-width: 0;
    text-align: left;
    font-size: 13px;
    line-height: 1.08;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .if-pill-title em {
    display: none;
  }

  .if-pill-logo .if-mark {
    font-size: 23px;
  }

  .if-pill-actions {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
    gap: 8px;
    min-width: 42px;
  }

  .if-theme-btn {
    width: 42px;
    font-size: 0;
  }

  .if-nav-toggle {
    display: inline-flex;
    grid-column: 3;
    grid-row: 1;
    width: 42px;
    padding: 0;
    font-size: 0;
  }

  .if-pill-logo {
    grid-column: 1;
    grid-row: 1;
  }

  .if-pill-title {
    display: none;
  }

  .if-screen-wrap {
    padding: 10px 14px 14px;
  }

  .if-screen {
    min-height: 0;
    height: 100%;
    border-radius: 22px;
  }

  .if-pagehead {
    min-height: 52px;
    padding: 9px 14px 10px;
  }

  .if-pagehead h1 {
    font-size: 19px;
  }

  .if-shell.if-theme-locked .if-pillbar {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .if-shell.if-theme-locked .if-nav-toggle {
    grid-column: 2;
  }

  body.if-shell-ready .if-content > .page {
    padding: 16px;
  }

  body.if-shell-ready .if-content > .workbench,
  body.if-shell-ready .if-content > .app-shell .workbench {
    padding: 12px;
  }

  body.if-shell-ready .if-content > .app-shell .app-topbar {
    border-radius: 22px 22px 0 0;
  }

  body.if-shell-ready .if-content > .page .hero,
  body.if-shell-ready .if-content > .page .landing-cockpit,
  body.if-shell-ready .if-content > .page .landing-controls {
    grid-template-columns: 1fr;
  }

  body.if-shell-ready .if-content > .page .landing-metric-strip,
  body.if-shell-ready .if-content > .page .landing-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  .if-sidebar,
  .if-pillbar {
    display: none !important;
  }

  .if-shell,
  .if-main,
  .if-screen-wrap,
  .if-screen,
  .if-content {
    display: block !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }
}
    margin: 8px 10px 0;
