/* ============================================================
   Memco Field Guide — sub-brand CSS
   Built on the Memco design system. Editorial / book-like:
   narrower text columns, generous whitespace, serif chapter
   numerals, monospace labels, a single orange accent used only
   for emphasis on numerals and active state.
   ============================================================ */

/* ---------- FONTS (local DM Sans + Google for the rest) ---------- */
@font-face { font-family: "DM Sans"; src: url("/field-guide-assets/71d16e4b-5a82-4780-80f5-73a985ec719e.ttf") format("truetype");  font-weight: 400; font-style: normal; font-display: block; }
@font-face { font-family: "DM Sans"; src: url("/field-guide-assets/07573ae3-a4f3-4b50-93ed-8c5e7cd562f6.ttf") format("truetype");   font-weight: 400; font-style: italic; font-display: block; }
@font-face { font-family: "DM Sans"; src: url("/field-guide-assets/aa6ba7c5-2f83-401a-b1fc-bee23eff0459.ttf") format("truetype");   font-weight: 500; font-style: normal; font-display: block; }
@font-face { font-family: "DM Sans"; src: url("/field-guide-assets/70fd87ad-4a29-4e19-a75b-af75940608fb.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: block; }
@font-face { font-family: "DM Sans"; src: url("/field-guide-assets/73db7d9f-e14d-43c8-9686-2917f98077fa.ttf") format("truetype");     font-weight: 700; font-style: normal; font-display: block; }
/* cyrillic-ext */
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400;
  font-display: block;
  src: url("/field-guide-assets/c512e447-d378-465b-b702-1c58c62f0001.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400;
  font-display: block;
  src: url("/field-guide-assets/d0ed73df-5b6a-46a3-8eba-1a8b4de00935.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400;
  font-display: block;
  src: url("/field-guide-assets/9d9cf3f4-68a3-4d0f-9fef-91901f6905a5.woff2") format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400;
  font-display: block;
  src: url("/field-guide-assets/520a10df-0d32-4293-a819-04e868ba22f6.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400;
  font-display: block;
  src: url("/field-guide-assets/ed68d877-d806-44c1-bd41-1ebb89b6dbc4.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400;
  font-display: block;
  src: url("/field-guide-assets/4da5d2fb-8845-43f6-a58b-61453fa5b04c.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 500;
  font-display: block;
  src: url("/field-guide-assets/c512e447-d378-465b-b702-1c58c62f0001.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 500;
  font-display: block;
  src: url("/field-guide-assets/d0ed73df-5b6a-46a3-8eba-1a8b4de00935.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 500;
  font-display: block;
  src: url("/field-guide-assets/9d9cf3f4-68a3-4d0f-9fef-91901f6905a5.woff2") format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 500;
  font-display: block;
  src: url("/field-guide-assets/520a10df-0d32-4293-a819-04e868ba22f6.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 500;
  font-display: block;
  src: url("/field-guide-assets/ed68d877-d806-44c1-bd41-1ebb89b6dbc4.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 500;
  font-display: block;
  src: url("/field-guide-assets/4da5d2fb-8845-43f6-a58b-61453fa5b04c.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/field-guide-assets/3d27f847-a080-4f69-b76b-cda6e62023e8.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/field-guide-assets/677afe57-63cf-4161-a96b-787ac376235b.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/field-guide-assets/50870ca3-0846-462d-ba2d-71cff542cead.woff2") format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/field-guide-assets/538c7dfe-68d3-489d-a70e-5aa50af0f04c.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/field-guide-assets/fa85e726-0a3e-4e94-a227-0b00d2bc5684.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/field-guide-assets/2985cd70-3a43-4a46-bc7e-dca20ab88b6d.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url("/field-guide-assets/3d27f847-a080-4f69-b76b-cda6e62023e8.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url("/field-guide-assets/677afe57-63cf-4161-a96b-787ac376235b.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url("/field-guide-assets/50870ca3-0846-462d-ba2d-71cff542cead.woff2") format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url("/field-guide-assets/538c7dfe-68d3-489d-a70e-5aa50af0f04c.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url("/field-guide-assets/fa85e726-0a3e-4e94-a227-0b00d2bc5684.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url("/field-guide-assets/2985cd70-3a43-4a46-bc7e-dca20ab88b6d.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url("/field-guide-assets/3d27f847-a080-4f69-b76b-cda6e62023e8.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url("/field-guide-assets/677afe57-63cf-4161-a96b-787ac376235b.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url("/field-guide-assets/50870ca3-0846-462d-ba2d-71cff542cead.woff2") format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url("/field-guide-assets/538c7dfe-68d3-489d-a70e-5aa50af0f04c.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url("/field-guide-assets/fa85e726-0a3e-4e94-a227-0b00d2bc5684.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url("/field-guide-assets/2985cd70-3a43-4a46-bc7e-dca20ab88b6d.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url("/field-guide-assets/3d27f847-a080-4f69-b76b-cda6e62023e8.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url("/field-guide-assets/677afe57-63cf-4161-a96b-787ac376235b.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url("/field-guide-assets/50870ca3-0846-462d-ba2d-71cff542cead.woff2") format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url("/field-guide-assets/538c7dfe-68d3-489d-a70e-5aa50af0f04c.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url("/field-guide-assets/fa85e726-0a3e-4e94-a227-0b00d2bc5684.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url("/field-guide-assets/2985cd70-3a43-4a46-bc7e-dca20ab88b6d.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'DM Mono';
  font-style: italic;
  font-weight: 400;
  font-display: block;
  src: url("/field-guide-assets/dcbf9e76-95e7-4f10-a8f0-7de2ad8f5caf.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'DM Mono';
  font-style: italic;
  font-weight: 400;
  font-display: block;
  src: url("/field-guide-assets/fbf8660c-04c9-439e-a780-e56ac30279f2.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/field-guide-assets/25dd9168-880e-43a7-8c06-4f80395f8616.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/field-guide-assets/57c9c177-b43a-45d7-b083-bb3e735677f9.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url("/field-guide-assets/34fa1b71-c1b8-4d40-9c3b-765f93f86a0a.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url("/field-guide-assets/7ef6727f-b7c7-4640-b9a3-3b208fc0761d.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


:root {
  /* fonts */
  --font-sans:  "DM Sans", system-ui, sans-serif;
  --font-serif: "Source Serif 4", Georgia, serif;
  --font-mono:  "DM Mono", ui-monospace, Menlo, monospace;

  /* neutrals */
  --ink:        #0a0a0a;
  --ink-2:      #262626;
  --ink-3:      #404040;
  --mute:       #737373;
  --mute-2:     #a3a3a3;
  --line:       #e8e8e8;
  --line-2:     #f0f0f0;
  --cream:      #fafafa;
  --paper:      #ffffff;
  --paper-2:    #fafafa; /* book paper alt */

  /* accent */
  --accent:     #F97415;

  /* spacing */
  --col-narrow: 640px;   /* book reading column */
  --col-wide:   1100px;  /* memco marketing */
  --col-frame:  1320px;  /* wide stage for hero / diagrams */
  --pad:        clamp(24px, 5vw, 80px);
  --sec:        clamp(56px, 8vw, 120px);
}

[data-theme="dark"] {
  --ink:        #fafafa;
  --ink-2:      #d4d4d4;
  --ink-3:      #a3a3a3;
  --mute:       #a3a3a3;
  --mute-2:     #6b6b6b;
  --line:       #232323;
  --line-2:     #1a1a1a;
  --cream:      #121212;
  --paper:      #0a0a0a;
  --paper-2:    #121212;
}

[data-accent="off"] {
  --accent:     #0a0a0a;
}
[data-theme="dark"][data-accent="off"] {
  --accent:     #fafafa;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body { overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }

/* selection */
::selection { background: var(--ink); color: var(--paper); }

/* ============================================================
   CONTAINERS
   ============================================================ */
.frame    { max-width: var(--col-frame);  margin: 0 auto; padding-inline: var(--pad); }
.wide     { max-width: var(--col-wide);   margin: 0 auto; padding-inline: var(--pad); }
.narrow   { max-width: var(--col-narrow); margin: 0 auto; padding-inline: var(--pad); }

/* ============================================================
   TYPE — editorial scale
   The field guide leans serif. Long-form body in DM Sans 16/1.65.
   Chapter numerals in Source Serif 4 italic at large scale.
   Section labels in DM Mono uppercase tracked.
   ============================================================ */
.eyebrow,
.label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mute);
}
.label-ink { color: var(--ink); }
.label-accent { color: var(--accent); }

.serif {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.1;
  text-wrap: balance;
}
.serif em { font-style: italic; }
.serif .hush { color: var(--mute); font-style: italic; }

.d-mega      { font-family: var(--font-serif); font-weight: 400; line-height: 0.95; letter-spacing: -0.025em; font-size: clamp(64px, 11vw, 168px); }
.d-hero      { font-family: var(--font-serif); font-weight: 400; line-height: 1.02; letter-spacing: -0.022em; font-size: clamp(44px, 6.4vw, 96px); }
.d-section   { font-family: var(--font-serif); font-weight: 400; line-height: 1.06; letter-spacing: -0.02em;  font-size: clamp(32px, 4vw, 56px); }
.d-card      { font-family: var(--font-serif); font-weight: 400; line-height: 1.15; letter-spacing: -0.015em; font-size: clamp(22px, 2.2vw, 30px); }
.d-quote     { font-family: var(--font-serif); font-style: italic; font-weight: 400; line-height: 1.25; letter-spacing: -0.01em; font-size: clamp(24px, 2.6vw, 36px); }

.body-sans   { font-family: var(--font-sans); font-size: 16px; line-height: 1.65; color: var(--ink-2); text-wrap: pretty; }
.body-lede   { font-family: var(--font-sans); font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; color: var(--ink-2); text-wrap: pretty; max-width: 56ch; }
.body-small  { font-family: var(--font-sans); font-size: 14px; line-height: 1.55; color: var(--mute); }

.numeral {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--accent);
}

.dot-acc { color: var(--accent); }

/* ============================================================
   PROSE — the book-column reading style
   Used by chapter sections.
   ============================================================ */
.prose {
  max-width: var(--col-narrow);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-2);
  text-wrap: pretty;
}
.prose p { margin: 0 0 1.25em; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose em { font-style: italic; }
.prose a { color: var(--ink); border-bottom: 1px solid var(--ink); transition: color .15s, border-color .15s; }
.prose a:hover { color: var(--accent); border-color: var(--accent); }
.prose ul, .prose ol {
  margin: 0 0 1.5em;
  padding-left: 1.2em;
}
.prose li {
  margin: 0.35em 0;
}
.prose ul { list-style: none; padding-left: 0; }
.prose ul li {
  position: relative;
  padding-left: 1.4em;
}
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.7em;
  width: 14px; height: 1px;
  background: var(--mute-2);
}
.prose ol { padding-left: 1.8em; }
.prose ol li::marker { color: var(--mute); font-family: var(--font-mono); font-size: 0.85em; }
.prose h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 2em 0 0.6em;
  line-height: 1.2;
}
.prose h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 2em 0 0.8em;
}
.prose blockquote {
  margin: 1.6em 0;
  padding: 0 0 0 1.4em;
  border-left: 2px solid var(--ink);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.35;
  color: var(--ink);
  letter-spacing: -0.012em;
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--ink);
}

/* drop cap */
.prose.has-dropcap > p:first-of-type::first-letter {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 4.2em;
  float: left;
  line-height: 0.85;
  padding: 0.05em 0.12em 0 0;
  color: var(--ink);
  margin-right: 0.04em;
}

/* ============================================================
   RUNNING HEADER — book-style chrome shared across the microsite
   ============================================================ */
.running-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: 36px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center;
  padding: 0 var(--pad);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--mute);
  background: rgba(250,250,250,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 80;
  border-bottom: 1px solid var(--line);
}
[data-theme="dark"] .running-header { background: rgba(10,10,10,0.92); }
.rh-left, .rh-right, .rh-center { display: flex; gap: 18px; align-items: center; }
.rh-left { justify-self: start; min-width: 0; }
.rh-center { color: var(--ink); letter-spacing: 0.12em; }
.rh-right { justify-self: end; min-width: 0; }
.rh-pageno {
  font-family: var(--font-serif); font-style: italic;
  font-size: 13px; letter-spacing: -0.01em;
  text-transform: none; color: var(--ink-2);
}
.rh-link { transition: color .15s; }
.rh-link:hover { color: var(--ink); }
.rh-brand {
  color: var(--ink);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  letter-spacing: -0.01em;
  text-transform: none;
}
.rh-brand .dot { color: var(--accent); }
@media (max-width: 720px) { .rh-center { display: none; } }

/* ====== Boundary callout (Chapter 10 top) ====== */
.boundary-callout {
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: clamp(20px, 3vw, 32px);
  margin: 40px 0;
}
.boundary-callout-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: clamp(16px, 3vw, 36px);
  align-items: start;
}
@media (max-width: 600px) {
  .boundary-callout-grid { grid-template-columns: 1fr; }
  .boundary-callout-grid > .sep { display: none; }
}
.boundary-callout-grid > .sep { background: var(--line); width: 1px; align-self: stretch; }
.boundary-callout .col .lbl {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--mute); margin-bottom: 10px;
}
.boundary-callout .col h4 {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: 20px; letter-spacing: -0.015em; line-height: 1.2;
  margin: 0 0 8px; color: var(--ink);
}
.boundary-callout .col p {
  font-family: var(--font-sans); font-size: 14px; line-height: 1.55;
  color: var(--ink-2); margin: 0;
}
.boundary-callout .flows {
  margin-top: clamp(20px, 3vw, 28px);
  padding-top: clamp(16px, 2vw, 22px);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
@media (max-width: 600px) { .boundary-callout .flows { grid-template-columns: 1fr; } }
.boundary-callout .flow .lbl-flow {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
}
.boundary-callout .flow.ok  .lbl-flow { color: #0d6e3f; }
.boundary-callout .flow.no  .lbl-flow { color: var(--accent); }
.boundary-callout .flow .desc {
  font-family: var(--font-sans); font-size: 13.5px; line-height: 1.45;
  color: var(--ink); margin-top: 4px;
}
.boundary-callout .flow .desc strong { font-weight: 600; }

/* ====== "Do not confuse" loud module (end of Ch10) ====== */
.dont-confuse {
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: clamp(28px, 4vw, 48px);
  margin: 48px 0;
}
.dont-confuse .title-row {
  text-align: center;
  margin-bottom: clamp(20px, 3vw, 32px);
  padding-bottom: clamp(20px, 3vw, 28px);
  border-bottom: 1px solid var(--line);
}
.dont-confuse .title-row .lbl {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.dont-confuse h3 {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: clamp(24px, 3vw, 36px); letter-spacing: -0.015em;
  margin: 0; color: var(--ink); text-wrap: balance;
}
.dont-confuse-cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
}
@media (max-width: 640px) { .dont-confuse-cols { grid-template-columns: 1fr; } }
.dont-confuse-cols .col { padding: 0 clamp(12px, 2vw, 24px); }
.dont-confuse-cols .col:first-child { border-right: 1px solid var(--line); }
@media (max-width: 640px) {
  .dont-confuse-cols .col:first-child {
    border-right: 0; border-bottom: 1px solid var(--line);
    padding: 0 0 24px; margin-bottom: 24px;
  }
}
.dont-confuse-cols .col .lbl-side {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.28em; text-transform: uppercase;
  margin-bottom: 8px;
}
.dont-confuse-cols .col.public  .lbl-side { color: var(--mute); }
.dont-confuse-cols .col.private .lbl-side { color: #0d6e3f; }
.dont-confuse-cols .col h4 {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: 22px; letter-spacing: -0.015em;
  margin: 0 0 16px; color: var(--ink);
}
.dont-confuse-cols .col ul { list-style: none; padding: 0; margin: 0; }
.dont-confuse-cols .col li {
  font-family: var(--font-sans); font-size: 14px; line-height: 1.45;
  color: var(--ink-2); padding: 6px 0 6px 18px; position: relative;
}
.dont-confuse-cols .col li::before {
  content: "—"; position: absolute; left: 0; color: var(--mute-2);
}
.dont-confuse .bottom-line {
  margin-top: clamp(20px, 3vw, 32px);
  padding-top: clamp(20px, 3vw, 28px);
  border-top: 1px solid var(--line);
  text-align: center;
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(18px, 2vw, 22px); line-height: 1.3;
  color: var(--ink); letter-spacing: -0.01em;
}

/* ====== Chapter bridge (between Ch10 and Ch11) ====== */
.chapter-bridge {
  text-align: center;
  padding: clamp(64px, 8vw, 96px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.chapter-bridge .lbl {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--mute); margin-bottom: 16px;
}
.chapter-bridge h3 {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: clamp(32px, 4vw, 48px); letter-spacing: -0.018em;
  margin: 0 0 24px; color: var(--ink);
}
.chapter-bridge p {
  font-family: var(--font-serif); font-size: 18px; line-height: 1.5;
  color: var(--ink-2); letter-spacing: -0.005em;
  max-width: 52ch; margin: 0 auto 36px;
}
.chapter-bridge .stack {
  display: inline-grid; grid-template-columns: 1fr;
  gap: 10px; align-items: center;
  min-width: 280px; margin: 0 auto;
}
.chapter-bridge .stack > .box {
  padding: 14px 22px;
  border: 1px solid var(--line);
  background: var(--cream);
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-2);
}
.chapter-bridge .stack > .box.private {
  background: var(--ink); color: var(--paper); border-color: var(--ink);
}
.chapter-bridge .stack > .box.private .sub {
  display: block; font-family: var(--font-serif); font-style: italic;
  font-size: 13px; letter-spacing: 0; text-transform: none;
  color: var(--mute-2); margin-top: 6px;
}
.chapter-bridge .stack .arr {
  font-family: var(--font-serif); font-style: italic;
  font-size: 13px; color: var(--mute);
  letter-spacing: 0; text-transform: none;
}

/* ====== Permission matrix (Ch11 "Access is not flat") ====== */
.perm-matrix {
  border: 1px solid var(--line);
  background: var(--paper);
  overflow: auto;
  max-width: 100%;
  margin: 28px 0 16px;
}
.perm-matrix-table {
  width: 100%; min-width: 720px;
  border-collapse: collapse;
  font-family: var(--font-sans);
}
.perm-matrix-table th,
.perm-matrix-table td {
  padding: 10px 10px;
  text-align: left;
  font-size: 12px;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.perm-matrix-table thead th {
  background: var(--cream);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--mute); font-weight: 500;
  line-height: 1.35;
  border-bottom: 1px solid var(--ink);
  min-width: 84px;
}
.perm-matrix-table thead th:first-child { background: var(--paper); }
.perm-matrix-table tbody th {
  text-align: left;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  white-space: nowrap;
  padding-right: 14px;
  border-right: 1px solid var(--line);
}
.perm-chip {
  display: inline-block;
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 2px;
  line-height: 1.4; margin: 1px 2px 1px 0;
  border: 1px solid transparent;
}
.perm-chip.read    { background: #e8f5ec; color: #0d6e3f; }
.perm-chip.write   { background: var(--ink); color: var(--paper); }
.perm-chip.suggest { background: var(--cream); color: var(--ink-3); border-color: var(--line); }
.perm-chip.approve { background: var(--accent); color: #fff; }
.perm-chip.none    { color: var(--mute-2); }
.perm-chip.onprem  { background: #e8f5ec; color: #0d6e3f; border: 1px dashed #0d6e3f; }
.perm-matrix-legend {
  display: flex; flex-wrap: wrap; gap: 12px 20px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: var(--cream);
  font-family: var(--font-sans);
  font-size: 11.5px; color: var(--ink-2);
}
.perm-matrix-legend .item {
  display: inline-flex; align-items: center; gap: 8px;
}


/* ============================================================
   NAV (legacy — kept for any pages still using it)
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 80;
  background: rgba(255,255,255,0.86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, background .2s;
}
[data-theme="dark"] .nav { background: rgba(10,10,10,0.78); }
.nav.scrolled { border-color: var(--line); }
.nav-inner {
  max-width: var(--col-frame);
  margin: 0 auto;
  padding: 14px var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand {
  display: inline-flex; align-items: baseline; gap: 10px;
  font-family: var(--font-serif); font-weight: 700;
  font-size: 22px; letter-spacing: -0.025em;
  color: var(--ink);
}
.brand .dot { color: var(--accent); }
.brand .sub {
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--mute); position: relative; top: -2px;
}
.nav-links {
  display: flex; align-items: center; gap: 28px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--mute);
}
.nav-links a { transition: color .15s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--accent); }
.nav-cta {
  font-family: var(--font-sans); font-size: 13px; font-weight: 500;
  padding: 9px 16px;
  border: 1px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--paper);
  transition: background .15s, color .15s;
}
.nav-cta:hover { background: var(--accent); border-color: var(--accent); }
@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ============================================================
   BUTTONS / LINKS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-sans); font-size: 14px; font-weight: 500;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper);
  transition: background .15s, border-color .15s, color .15s;
  cursor: pointer;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn .arr { transition: transform .15s; }
.btn:hover .arr { transform: translateX(3px); }

.textlink {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--ink); padding-bottom: 3px;
  transition: color .15s, border-color .15s;
}
.textlink:hover { color: var(--accent); border-color: var(--accent); }

/* ============================================================
   SECTION DIVIDERS — editorial book ornaments
   ============================================================ */
.rule {
  height: 1px;
  background: var(--line);
  width: 100%;
}
.rule-dot {
  display: flex; align-items: center; justify-content: center;
  gap: 14px;
  font-family: var(--font-serif);
  color: var(--mute);
  margin: var(--sec) auto;
}
.rule-dot::before, .rule-dot::after {
  content: "";
  flex: 1; max-width: 90px; height: 1px; background: var(--line);
}
.rule-dot span { font-size: 14px; }

/* ============================================================
   CARDS / CALLOUTS
   ============================================================ */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(24px, 3vw, 36px);
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--ink); }
.card.cream { background: var(--cream); }
.card.flat { background: transparent; border: 0; padding: 0; }

.callout {
  margin: 2.5em 0;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--ink);
  background: var(--cream);
  font-family: var(--font-sans);
}
.callout .label {
  display: block;
  margin-bottom: 8px;
}
.callout p {
  margin: 0 0 0.8em;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
}
.callout p:last-child { margin-bottom: 0; }
.callout ul, .callout ol {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0.6em 0;
}

/* ============================================================
   FOOTNOTE / META
   ============================================================ */
.meta-row {
  display: flex; gap: 32px; flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--mute);
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.meta-row .k {
  color: var(--mute);
  margin-right: 8px;
}
.meta-row .v {
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  font-weight: 500;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer.site {
  border-top: 1px solid var(--line);
  padding: 72px 0 48px;
  margin-top: var(--sec);
}
footer.site .cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
}
@media (max-width: 880px) {
  footer.site .cols { grid-template-columns: 1fr 1fr; }
}
footer.site h5 {
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--mute); font-weight: 400;
  margin: 0 0 16px;
}
footer.site a { color: var(--ink-2); display: block; padding: 4px 0; transition: color .15s; font-size: 14px; }
footer.site a:hover { color: var(--accent); }
footer.site .legal {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute);
  border-top: 1px solid var(--line); margin-top: 56px; padding-top: 28px;
}

/* ============================================================
   TWEAKS PANEL (small, bottom-right)
   ============================================================ */
.tweaks {
  position: fixed; bottom: 18px; right: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.12);
  padding: 14px 16px;
  z-index: 200;
  font-family: var(--font-sans);
  font-size: 13px;
  display: none;
  min-width: 220px;
}
.tweaks.open { display: block; }
.tweaks h6 {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--mute); margin: 0 0 10px; font-weight: 400;
  display: flex; justify-content: space-between; align-items: center;
}
.tweaks h6 .x {
  cursor: pointer; color: var(--mute); font-size: 14px;
  letter-spacing: 0; text-transform: none;
}
.tweaks .row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid var(--line-2);
}
.tweaks .row:first-of-type { border-top: 0; }
.tweaks .row label { color: var(--ink-2); }
.tweaks .seg {
  display: inline-flex; border: 1px solid var(--line);
  border-radius: 999px; overflow: hidden;
}
.tweaks .seg button {
  background: transparent; border: 0;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--mute);
  padding: 6px 10px; cursor: pointer;
}
.tweaks .seg button.on { background: var(--ink); color: var(--paper); }

/* ============================================================
   FORMS (used by contact)
   ============================================================ */
.field {
  margin-bottom: 18px;
}
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 8px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 14px;
  line-height: 1.5;
  outline: none;
  transition: border-color .15s;
}
.field input:focus,
.field textarea:focus,
.field select:focus { border-color: var(--ink); }
.field textarea { resize: vertical; min-height: 110px; }
.field-help {
  font-family: var(--font-sans);
  font-size: 12px; line-height: 1.5;
  color: var(--mute);
  margin-top: 6px;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); font-size: 13px; font-weight: 500;
  color: var(--ink-2);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
  user-select: none;
}
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.score-cell {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-top: 1px solid var(--line);
  font-size: 14px;
}
.score-cell:first-child { border-top: 0; }
.score-cell .k { color: var(--ink-2); }
.score-cell .v { font-family: var(--font-mono); color: var(--ink); }

/* ============================================================
   UTILS
   ============================================================ */
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; }
.gap-48 { gap: 48px; } .gap-64 { gap: 64px; }
.center { align-items: center; justify-content: center; text-align: center; }
.between { justify-content: space-between; }
.wrap-flex { flex-wrap: wrap; }
.mt-8 { margin-top: 8px; }  .mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; } .mt-64 { margin-top: 64px; }
.mt-96 { margin-top: 96px; }
.mb-8 { margin-bottom: 8px; }  .mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; } .mb-64 { margin-bottom: 64px; }
.muted { color: var(--mute); }
.ink   { color: var(--ink); }
.accent{ color: var(--accent); }

.section { padding: var(--sec) 0; }
.section.cream { background: var(--cream); }
.section.tight { padding: clamp(40px, 5vw, 64px) 0; }

/* fade-in on scroll */
.reveal { opacity: 0; transform: translateY(8px); transition: opacity .6s var(--ease), transform .6s var(--ease); --ease: cubic-bezier(0.25, 0.10, 0.25, 1.00); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* diagrams (svg helpers) */
.diagram-wrap {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper-2);
  padding: clamp(20px, 3vw, 40px);
  overflow: hidden;
}
.diagram-wrap.dark {
  background: var(--ink);
  border-color: var(--ink);
}

/* chapter index list */
.toc {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
}
.toc a {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  transition: background .15s, padding .15s;
}
.toc a:hover {
  background: var(--cream);
  padding-inline: 16px;
}
.toc .num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 28px;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.toc .title {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.2vw, 28px);
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.toc .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mute);
  white-space: nowrap;
}

/* tool cards (used on landing + tools index) */
.tool-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 4px;
  padding: 28px;
  transition: border-color .15s, transform .2s;
  text-align: left;
}
.tool-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.tool-card .num {
  font-family: var(--font-serif); font-style: italic;
  font-size: 28px; color: var(--accent);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.tool-card h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 8px;
  line-height: 1.15;
}
.tool-card p {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 18px;
}
.tool-card .cta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tool-card .cta .arr { transition: transform .15s; }
.tool-card:hover .cta { color: var(--accent); }
.tool-card:hover .cta .arr { transform: translateX(3px); }

/* PRINT */
@media print {
  .nav, .tweaks, footer.site { display: none !important; }
  .prose { max-width: none; color: #000; }
  body { background: #fff; color: #000; }
}

/* ---------- page-specific ---------- */

/* Read-specific layout */
  .read-shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: clamp(32px, 5vw, 80px);
    max-width: var(--col-frame);
    margin: 0 auto;
    padding: clamp(40px, 6vw, 80px) var(--pad) 80px;
    align-items: flex-start;
  }
  .read-shell > main,
  .chap-grid > *,
  .chapter {
    min-width: 0;
  }
  @media (max-width: 880px) { .read-shell { grid-template-columns: 1fr; } .read-toc { position: static !important; max-height: none !important; } }

  .read-toc {
    position: sticky;
    top: 72px;
    align-self: start;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    padding-right: 8px;
  }
  .read-toc .label { margin-bottom: 14px; }
  .read-toc ol { list-style: none; padding: 0; margin: 0; }
  .read-toc li { margin: 0; }
  .read-toc a {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line-2);
    align-items: baseline;
  }
  .read-toc .num {
    font-family: var(--font-serif); font-style: italic;
    font-size: 14px; color: var(--mute);
    letter-spacing: -0.02em;
  }
  .read-toc .ti {
    font-family: var(--font-sans); font-size: 13px;
    color: var(--ink-2); line-height: 1.35;
  }
  .read-toc a:hover .ti { color: var(--ink); }
  .read-toc a.current .ti { color: var(--ink); font-weight: 600; }
  .read-toc a.current .num { color: var(--accent); }

  .chapter { padding: 0 0 var(--sec); }
  .chapter + .chapter { border-top: 1px solid var(--line); padding-top: var(--sec); }
  .chapter-head {
    text-align: center;
    margin-bottom: clamp(40px, 6vw, 64px);
    padding-bottom: clamp(24px, 4vw, 36px);
    border-bottom: 1px solid var(--line);
  }
  .chapter-num {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(48px, 7vw, 88px);
    line-height: 0.9;
    letter-spacing: -0.04em;
    color: var(--accent);
    margin-bottom: 18px;
  }
  .chapter-title {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(28px, 3.8vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0 auto;
    text-wrap: balance;
    max-width: 24ch;
  }
  .chapter-meta {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--mute);
    margin-top: 18px;
  }

  .chap-grid {
    display: grid;
    grid-template-columns: minmax(0, 660px) minmax(0, 280px);
    gap: clamp(32px, 4vw, 64px);
    align-items: start;
  }
  @media (max-width: 960px) { .chap-grid { grid-template-columns: 1fr; } }
  .chap-aside {
    position: sticky; top: 96px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--mute);
  }
  .chap-aside .li {
    display: block;
    padding: 8px 0;
    border-top: 1px solid var(--line-2);
  }
  .chap-aside .li:first-child { border-top: 0; }

  .chap-next {
    display: flex; justify-content: space-between;
    border-top: 1px solid var(--line);
    padding-top: 24px;
    margin-top: 48px;
  }
  .chap-next a {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink);
    display: inline-flex; gap: 8px;
    border-bottom: 1px solid var(--ink); padding-bottom: 3px;
  }
  .chap-next a:hover { color: var(--accent); border-color: var(--accent); }

  /* Diagrams full-bleed inside a chapter */
  .fig {
    margin: 36px 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper-2);
    padding: clamp(20px, 3vw, 36px);
  }
  .fig .cap {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--mute);
    margin-top: 16px;
  }
  .fig .cap .ti { color: var(--ink); }

  /* Quote spread */
  .pull {
    margin: 56px 0;
    text-align: center;
  }
  .pull .q {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(28px, 3.4vw, 44px);
    line-height: 1.18;
    letter-spacing: -0.015em;
    color: var(--ink);
    max-width: 24ch;
    margin: 0 auto;
    text-wrap: balance;
  }
  .pull .q .hush { color: var(--mute); font-style: italic; }
