/* /crms and /crms/<slug>. One light theme, painted explicitly: the same paper, green and
   Plex type as the converter page. Static: web/crm_pages.py links this file by content hash. */
:root {
  color-scheme: light;
  --paper: #f7f4ee;
  --card: #ffffff;
  --ink: #1b1f1c;
  --muted: #5c6660;
  --line: #e3e0d8;
  --green: #1e4d3b;
  --green-deep: #173d2f;
  --mint: #e6efe6;
  --mint-line: #c9d9cd;
  --focus: #7fb59a;
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  font-family: "IBM Plex Sans", Helvetica, Arial, sans-serif; font-size: 15px; line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-deep); }
:is(a, summary):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
code { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-size: .86em; overflow-wrap: anywhere; }
h1, h2, h3, p, ol, ul, dl { margin: 0; }
h1, h2, h3 { letter-spacing: -.02em; font-weight: 600; }
p { color: var(--muted); }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--green); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 5; }
.skip:focus { left: 12px; }

.top { background: var(--paper); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1080px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.wordmark { font-size: 19px; font-weight: 600; letter-spacing: -.02em; color: var(--green); text-decoration: none; }
.top nav { display: flex; gap: 4px; flex-wrap: wrap; }
.top nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 7px 14px; border-radius: 999px; font-size: 13px; color: var(--muted); text-decoration: none; }
.top nav a:hover { background: var(--mint); color: var(--green); }
.top nav a[aria-current] { background: var(--mint); color: var(--green); }
.top nav a.go { background: var(--green); color: #fff; font-weight: 500; }
.top nav a.go:hover { background: var(--green-deep); color: #fff; }

main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 30px 24px 56px; }

.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); line-height: 1.4; }
.crumbs { margin-bottom: 18px; font-size: 13px; }
.crumbs a::before { content: "\2190\00a0"; text-decoration: none; display: inline-block; }

/* Hero */
.hero { display: flex; align-items: center; justify-content: space-between; gap: 24px 48px; padding: 6px 0 30px; border-bottom: 1px solid var(--line); }
.hero-wall { display: block; max-width: 760px; }
.hero h1 { font-size: 34px; line-height: 1.15; margin: 8px 0 12px; }
.hero h1 em { font-style: normal; color: var(--green); }
.lede { font-size: 17px; max-width: 640px; }
.hero-logo { flex: 0 0 auto; display: grid; place-items: center; min-width: 200px; min-height: 120px; padding: 22px 32px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }

.logo { display: block; height: var(--h, 26px); width: auto; max-width: 100%; filter: grayscale(1); opacity: .72; mix-blend-mode: multiply; }
.logo.icon { border-radius: 22%; filter: grayscale(1) contrast(1.35) brightness(.82); }

/* Wall */
.wall { margin-top: 34px; }
.tiles { list-style: none; padding: 0; margin-top: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tiles li { display: flex; }
.tile { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 124px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; transition: border-color .15s, background-color .15s; }
.tile:hover { border-color: var(--green); background: #fbfdfb; color: var(--ink); }
.mark { display: flex; align-items: center; min-height: 40px; }
.mark .logo { --h: 28px; }
.plain { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 20px; font-weight: 400; color: var(--muted); }
.label { font-size: 14px; font-weight: 600; line-height: 1.3; }
.tile:hover .label { color: var(--green); }

/* Blocks */
.block { padding: 34px 0 6px; }
.block h2 { display: flex; align-items: center; gap: 12px; font-size: 22px; line-height: 1.3; margin-bottom: 18px; }
.n { display: inline-grid; place-items: center; flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: #fff; font-size: 14px; font-weight: 600; letter-spacing: 0; }
.block h3 { font-size: 15px; margin-bottom: 6px; }
.fine { font-size: 14px; margin: -8px 0 18px; }

.steps { list-style: none; counter-reset: step; padding: 0; display: grid; gap: 8px; max-width: 760px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: baseline; padding: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; font-size: 15px; color: var(--ink); }
.steps li::before { content: counter(step); font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px; color: var(--green); font-weight: 400; }
.notes { margin-top: 14px; padding-left: 20px; max-width: 760px; color: var(--muted); font-size: 14px; }
.notes li + li { margin-top: 4px; }
.source { margin-top: 14px; font-size: 13px; max-width: 760px; }
.fallback { font-size: 17px; color: var(--ink); }

.count { font-size: 15px; margin-bottom: 14px; }
.count b { font-size: 25px; color: var(--ink); font-weight: 600; margin-right: 2px; }

.map { width: 100%; max-width: 860px; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.map th, .map td { text-align: left; vertical-align: top; padding: 10px 16px; border-top: 1px solid var(--line); font-weight: 400; font-size: 14px; }
.map thead th { border-top: 0; background: var(--mint); color: var(--green); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.map td code { display: inline-block; margin: 0 6px 4px 0; padding: 2px 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; font-size: 12px; }
.map tbody th { width: 42%; }

.left { max-width: 860px; margin-top: 22px; padding: 16px 18px; background: transparent; border: 1px dashed #c9c4b6; border-radius: 12px; }
.left p { font-size: 14px; }
.left p code { display: inline-block; margin: 0 8px 4px 0; padding: 2px 8px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: var(--ink); }
.left .why { margin-top: 8px; color: var(--muted); }

/* Before and after */
.pair { margin-top: 22px; }
.pair .eyebrow { margin-bottom: 8px; }
.pair-grid { display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); align-items: stretch; }
.side { padding: 18px 20px 14px; border-radius: 14px; min-width: 0; }
.before { background: var(--card); border: 1px solid var(--line); }
.after { background: var(--mint); border: 1px solid var(--mint-line); }
.side-title { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.after .side-title { color: var(--green); }
.side dl + dl { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.side dl > div { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr); gap: 4px 14px; padding: 5px 0; border-top: 1px solid rgba(27, 31, 28, .07); font-size: 13.5px; }
.side dl > div:first-child { border-top: 0; }
.side dt { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11.5px; line-height: 1.7; color: var(--muted); overflow-wrap: anywhere; }
.side dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; white-space: pre-wrap; }
.after dt { color: #3f5f50; }
.more { margin-top: 10px; font-size: 12.5px; }
.becomes { position: relative; }
.becomes::before { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 2px; background: var(--green); transform: translateY(-1px); }
.becomes::after { content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; border-top: 2px solid var(--green); border-right: 2px solid var(--green); transform: translateY(-5px) rotate(45deg); }

.next { margin-top: 44px; padding: 26px 0 0; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.next p { font-size: 17px; color: var(--ink); }
.button { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 20px; border-radius: 8px; background: var(--green); color: #fff; font-weight: 500; font-size: 14px; text-decoration: none; }
.button:hover { background: var(--green-deep); color: #fff; }

.foot { border-top: 1px solid var(--line); }
.foot { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding: 18px 24px; }
.foot p { font-size: 13px; }
.foot a { margin-left: 14px; }
.foot a:first-child { margin-left: 0; }

@media (max-width: 760px) {
  main { padding: 22px 16px 44px; }
  .top-in { padding: 12px 16px; }
  .hero { flex-direction: column; align-items: flex-start; }
  .hero h1 { font-size: 28px; }
  .hero-logo { min-width: 0; min-height: 0; padding: 14px 20px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 14px; min-height: 108px; }
  .pair-grid { grid-template-columns: minmax(0, 1fr); }
  .becomes { height: 34px; }
  .becomes::before { left: 50%; right: auto; top: 6px; bottom: 6px; width: 2px; height: auto; transform: translateX(-1px); }
  .becomes::after { left: 50%; right: auto; top: auto; bottom: 6px; transform: translate(-5px, 0) rotate(135deg); }
  .side dl > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .map tbody th { width: 46%; }
  .foot { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
