/* Faucon Field Notes, Ghost 5 theme. Tokens match fauconsystems.com */
:root {
  --paper: #fcf4e5;
  --paper-2: #f6ecd9;
  --ink: #141210;
  --ink-soft: #57524b;
  --rule: #d9cfbd;
  --rust: #a3402a;
  --sans: var(--gh-font-body, "Jost", system-ui, sans-serif);
  --display: var(--gh-font-heading, "Jost", system-ui, sans-serif);
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --measure: 720px;
  --wide: 1080px;
  --max: 1240px;
}
html.scheme-night {
  --paper: #141210; --paper-2: #1d1a17; --ink: #fcf4e5; --ink-soft: #b5ab9c; --rule: #3a342d; --rust: #d0674f;
}
@media (prefers-color-scheme: dark) {
  html.scheme-auto { --paper: #141210; --paper-2: #1d1a17; --ink: #fcf4e5; --ink-soft: #b5ab9c; --rule: #3a342d; --rust: #d0674f; }
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
.site { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 40px; }
.wrap-narrow { max-width: var(--measure); margin-left: auto; margin-right: auto; padding: 0 24px; }
.wrap-wide { max-width: var(--wide); margin-left: auto; margin-right: auto; padding: 0 24px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header: the boxed FAUCON / SYSTEMS mark from the main site */
.site-header { padding: 32px 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 16px; text-decoration: none; }
.mark { display: inline-flex; flex-direction: column; border: 1.5px solid var(--rust); color: var(--rust); font-weight: 500; font-size: 13px; letter-spacing: 0.22em; text-align: center; line-height: 1; }
.mark span { padding: 7px 10px 7px 12px; }
.mark span + span { border-top: 1.5px solid var(--rust); }
.brand-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 20px; list-style: none; margin: 0; padding: 0; }
.site-nav a { text-decoration: none; color: var(--ink-soft); }
.site-nav a:hover, .site-nav .nav-current a { color: var(--rust); }

/* Labels, hex markers, meta */
.label, .kicker { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rust); text-decoration: none; margin: 0 0 12px; }
.hex { width: 9px; height: 10.5px; fill: none; stroke: currentColor; stroke-width: 1.4; flex: none; }
.meta { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--ink-soft); text-transform: uppercase; margin: 12px 0 0; }
.meta a { text-decoration: none; }

/* Index */
.masthead { padding: 40px 0 48px; border-bottom: 1px solid var(--rule); margin-bottom: 40px; }
.masthead-title { font-family: var(--display); font-weight: 400; font-size: clamp(36px, 5vw, 64px); line-height: 1.05; letter-spacing: -0.025em; margin: 0; max-width: 18ch; }
.masthead-text { color: var(--ink-soft); max-width: 60ch; margin: 16px 0 0; }
.post-feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 40px 32px; }
.card-link { display: block; text-decoration: none; }
.card-image { margin: 0 0 16px; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--rule); background: var(--paper-2); }
.card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-title { font-family: var(--display); font-weight: 500; font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 8px; }
.card-link:hover .card-title { color: var(--rust); }
.card-excerpt { color: var(--ink-soft); margin: 0; font-size: 16px; }
.pagination { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; margin: 48px 0; color: var(--ink-soft); }
.pagination a { color: var(--rust); text-decoration: none; }

/* Article */
.article { padding: 24px 0 40px; }
.article-header { margin-bottom: 40px; }
.article-title { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 4.6vw, 56px); line-height: 1.06; letter-spacing: -0.025em; margin: 0; }
.article-excerpt { font-size: 21px; line-height: 1.45; color: var(--ink-soft); margin: 20px 0 0; }
.article-image { margin: 0 auto 48px; }
.article-image img { width: 100%; display: block; }
figcaption { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); margin-top: 10px; line-height: 1.5; }
.article-footer { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--rule); }
.disclosure { font-size: 14px; color: var(--ink-soft); font-style: italic; margin: 0 0 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 16px; margin: 0; }
.tags a { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rust); text-decoration: none; }

/* Content: Koenig-rendered post body */
.gh-content { display: grid; grid-template-columns: [full-start] minmax(24px, 1fr) [wide-start] minmax(0, calc((var(--wide) - var(--measure)) / 2)) [main-start] min(var(--measure), calc(100% - 48px)) [main-end] minmax(0, calc((var(--wide) - var(--measure)) / 2)) [wide-end] minmax(24px, 1fr) [full-end]; }
.gh-content > * { grid-column: main-start / main-end; margin-top: 0; margin-bottom: 0; }
.gh-content > * + * { margin-top: 1.4em; }
.gh-content > .kg-width-wide { grid-column: wide-start / wide-end; }
.gh-content > .kg-width-full { grid-column: full-start / full-end; }
.gh-content > .kg-width-full img { width: 100%; }
.gh-content h2 { font-family: var(--display); font-weight: 500; font-size: 30px; line-height: 1.2; letter-spacing: -0.015em; margin-top: 2em; }
.gh-content h3 { font-family: var(--display); font-weight: 500; font-size: 22px; line-height: 1.3; margin-top: 1.6em; }
.gh-content h4 { font-family: var(--mono); font-weight: 500; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rust); margin-top: 1.6em; }
.gh-content a { color: var(--rust); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.gh-content strong { font-weight: 500; }
.gh-content ul, .gh-content ol { padding-left: 1.3em; }
.gh-content li + li { margin-top: 0.4em; }
.gh-content hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5em 0; }
.gh-content blockquote { margin-left: 0; padding-left: 20px; border-left: 2px solid var(--rust); font-size: 20px; line-height: 1.5; }
.gh-content blockquote.kg-blockquote-alt { border: 0; padding: 0; text-align: center; font-size: 26px; }
.gh-content code { font-family: var(--mono); font-size: 0.86em; background: var(--paper-2); border: 1px solid var(--rule); padding: 1px 5px; border-radius: 3px; }
.gh-content pre { font-family: var(--mono); font-size: 14px; line-height: 1.55; background: #141210; color: #fcf4e5; padding: 20px 24px; overflow-x: auto; border-radius: 4px; }
.gh-content pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.gh-content figure { margin-left: 0; margin-right: 0; }
.gh-content figure img { display: block; margin: 0 auto; }
/* Diagrams: SVG/PNG diagrams carry their own paper ground, framed so they read on Paper and Night */
.gh-content .kg-image-card img[src$=".svg"], .gh-content img.diagram { border: 1px solid var(--rule); border-radius: 6px; background: #fcf4e5; }

/* Tables */
.table-wrap { overflow-x: auto; }
.gh-content > .table-wrap, .gh-content > table { grid-column: wide-start / wide-end; }
.gh-content td:first-child { min-width: 9em; }
.gh-content table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.gh-content th { font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; text-align: left; color: var(--ink-soft); border-bottom: 1.5px solid var(--ink); padding: 8px 10px; vertical-align: bottom; }
.gh-content td { border-bottom: 1px solid var(--rule); padding: 9px 10px; vertical-align: top; }
.gh-content td:first-child, .gh-content th:first-child { padding-left: 0; }

/* Footnote-style source lists: an ordered list after a "Sources" heading, or ol.sources / .footnotes */
.gh-content h2[id^="sources"] + ol, .gh-content h3[id^="sources"] + ol, .gh-content ol.sources, .gh-content .footnotes ol { font-family: var(--mono); font-size: 13px; line-height: 1.55; color: var(--ink-soft); padding-left: 2.2em; }
.gh-content h2[id^="sources"] + ol a, .gh-content ol.sources a, .gh-content .footnotes a { word-break: break-word; }
.gh-content sup a, .gh-content a.footnote-ref { font-family: var(--mono); font-size: 0.72em; text-decoration: none; }

/* Koenig card touch-ups (base styles come from Ghost card_assets) */
.kg-callout-card { border-radius: 4px; }
.kg-bookmark-card a.kg-bookmark-container { color: var(--ink); border-color: var(--rule); }
.kg-toggle-card, .kg-product-card-container, .kg-file-card-container { border-color: var(--rule) !important; }
.kg-button-card a.kg-btn-accent, .kg-header-card a.kg-header-card-button { background: var(--rust); }
.kg-embed-card { display: flex; flex-direction: column; align-items: center; }
.kg-gallery-container { display: flex; flex-direction: column; }
.kg-gallery-row { display: flex; flex-direction: row; justify-content: center; }
.kg-gallery-image img { display: block; margin: 0; width: 100%; height: 100%; }
.kg-gallery-row:not(:first-of-type) { margin: 0.75em 0 0; }
.kg-gallery-image:not(:first-of-type) { margin: 0 0 0 0.75em; }

/* Buttons & newsletter */
.btn { display: inline-block; font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; color: var(--paper); background: var(--rust); border: 0; padding: 12px 18px; cursor: pointer; border-radius: 2px; }
.newsletter { margin: 64px 0; border: 1.5px solid var(--rust); padding: 36px 40px; }
.newsletter-inner { max-width: 640px; }
.newsletter-title { font-family: var(--display); font-weight: 400; font-size: 32px; line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 8px; }
.newsletter-text { color: var(--ink-soft); margin: 0 0 20px; }
.newsletter-form { display: flex; flex-wrap: wrap; gap: 10px; }
.newsletter-form input { flex: 1 1 260px; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); border-radius: 2px; }
.form-msg { display: none; flex-basis: 100%; margin: 6px 0 0; font-size: 14px; }
.newsletter-form.success .form-msg.success, .newsletter-form.error .form-msg.error { display: block; }
.newsletter-form.loading .btn { opacity: 0.6; }
.related { margin: 64px 0; }

/* Error */
.error-wrap { padding: 80px 40px 120px; }
.error-details { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); }

/* Footer: same mono uppercase strip as fauconsystems.com */
.site-footer { border-top: 1px solid var(--rule); padding: 24px 0 32px; margin-top: 48px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.footer-inner ul { display: flex; flex-wrap: wrap; gap: 20px; list-style: none; margin: 0; padding: 0; }
.footer-inner a { text-decoration: none; }

@media (max-width: 900px) {
  .wrap { padding: 0 24px; }
  .newsletter { padding: 28px 24px; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  body { font-size: 16px; }
}

/* Reading-only edition. Administrative signup closure remains required. */
nav a[href*="#/portal/signup"], .site-footer a[href*="#/portal/signup"],
nav a[href$="/signup/"], .site-footer a[href$="/signup/"],
nav a[href$="/subscribe/"], .site-footer a[href$="/subscribe/"],
.gh-portal-triggerbtn-wrapper { display: none !important; }

/* Social link (footer) */
.footer-inner .social-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: inherit; }
.footer-inner .social-link svg { width: 14px; height: 14px; flex: none; }
.footer-inner .social-link:hover { color: var(--rust); }
