/*
 * ElyStocks pages.css (owner: pages): the inner pages that copy typesafe's layouts 1:1.
 *   /manifesto          typesafe manifesto   (.mf-*)
 *   /notes/*            typesafe blog post   (.nt-*)
 *   /legal/*            typesafe terms       (.lg-*)
 *   /404                typesafe language    (.nf-*)
 * Shared bits (hash strips, bottom ornaments, the compact footer bar) are .pg-*.
 * Sizes are read from reference/captures/ts-{manifesto,team,blog1,blog2,terms}-*.styles.json.
 * Load after css/base.css. No inline styles anywhere (strict CSP): everything lives here.
 */

/* ---------------------------------------------------------------- shared */

:root {
  --pg-pad: 30px;              /* typesafe inner pages keep 30px sides even on phones */
  --pg-col: 820px;             /* the text column with the left rule */
  --pg-rule: 1px solid var(--ink);
  --pg-hl-bg: #1d47ad;         /* highlight: deep cobalt, paper text on it is 8:1 */
  --pg-hl-ink: var(--paper);
}

/* ten-pixel strip with a pair of corner brackets at its ends (typesafe "hash-marks") */
.pg-hash { position: relative; width: 100%; height: 10px; flex: none; }

/* a section's bottom registration marks: the shared .ascii-sep, sized as typesafe's 32px "bottom" row */
.pg-marks { flex: none; }
.pg-marks--ink { background: var(--ink); }
.pg-marks--pink { background: var(--pink); }
.pg-marks--paper { background: var(--white); }
.pg-marks--magenta { background: var(--magenta); }

/* copy links inside page text */
.pg-link { text-decoration: underline; text-decoration-thickness: 1.2px; text-underline-offset: 4px; transition: color 0.5s var(--ease), text-decoration-thickness 0.5s var(--ease); }
.pg-link:hover { color: var(--cobalt-deep); text-decoration-thickness: 2px; }

/* the red highlight typesafe lays over key sentences */
.pg-hl {
  background-image: linear-gradient(var(--pg-hl-bg), var(--pg-hl-bg));
  background-repeat: no-repeat;
  background-size: 100% 1.04em;
  background-position: 0 58%;
  color: var(--pg-hl-ink);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* footnote references (unicode superscript digits, linked to the appendix) */
.pg-fn { color: inherit; text-decoration: none; }
.pg-fn:hover { color: var(--cobalt-deep); }
.pg-fn:target, li:target { outline: 2px solid var(--magenta); outline-offset: 2px; }

/* mono label over copy (typesafe 10px JetBrains 300, capitalized) */
.pg-label { font: 300 10px/12px var(--font-mono); letter-spacing: 0.05em; text-transform: capitalize; color: var(--ink-86); }

/* ---------------------------------------------------------------- compact footer bar */
/* typesafe's manifesto, blog and legal pages end with a row of ink boxes on the page ground instead of the dark
   cube band. <body data-footer="bar"> switches the shell footer to that form; the markup stays the shell's. */

body[data-footer='bar'] .ts-footer { background: transparent; padding: 0; color: var(--paper); }
body[data-footer='bar'] .ts-footer__stage { display: none; }
body[data-footer='bar'] .ts-footer__bar { margin-top: 0; }
body[data-footer='bar'] .ts-footer__item { background: var(--ink); color: var(--paper); }
body[data-footer='bar'] a.ts-footer__item:hover { color: var(--azure); }
body[data-footer='bar'] .ts-footer__meander { display: none; }
body[data-footer='bar'] .ts-footer__art { display: inline-block; margin-top: 5px; padding: 6px 7px 7px; background: var(--ink); color: rgba(254, 254, 254, 0.8); }
@media (max-width: 809px) {
  body[data-footer='bar'] .ts-footer__bar { gap: 8px; padding: 10px 12px; margin-top: 0; }
}

/* ================================================================ /manifesto (teal) */

.mf { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 20px var(--pg-pad) 100px; }
.mf__spacer { width: 100%; flex: none; height: 70px; }
.mf__spacer--20 { height: 20px; }
.mf__spacer--80 { height: 80px; }
.mf__spacer--100 { height: 100px; }

.mf__hero { position: relative; width: 100%; max-width: 1440px; height: 400px; overflow: hidden; border: 1px solid var(--ink); flex: none; }
.mf__hero img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.mf__headline { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; max-width: 1240px; }
.mf__title, .mf__closer { width: 100%; max-width: 1024px; color: var(--ink-86); text-align: center; }
.mf__closer { max-width: 1240px; }


/* a block of copy: mono label, then 50px, then text, with the ink rule on its left */
.mf-block {
  display: flex;
  flex-direction: column;
  gap: 50px;
  width: 100%;
  max-width: var(--pg-col);
  padding: 0 10px 50px;
  border-left: var(--pg-rule);
}
.mf-block__body { display: flex; flex-direction: column; gap: 20px; }
.mf-block__lead { font: 500 26px/31.2px var(--font-display); letter-spacing: 0; color: var(--ink-86); }
.mf-block__body > p { font: 400 22px/26.4px var(--font-body); letter-spacing: 0.05em; color: var(--ink-86); }
.mf-block--appendix { padding-bottom: 10px; }

/* image + narrow column (typesafe "Beyond Horseless Carriages") */
.mf-split { display: flex; gap: 10px; width: 100%; max-width: var(--pg-col); }
.mf-split__fig { display: flex; flex-direction: column; gap: 10px; width: 400px; flex: none; }
.mf-split__frame { position: relative; height: 500px; overflow: hidden; background: rgba(0, 0, 0, 0.05); }
.mf-split__frame img { position: absolute; left: 50%; top: 0; width: 640px; max-width: none; height: 515px; transform: translateX(-50%); mix-blend-mode: multiply; object-fit: cover; }
.mf-split__cap { font: 300 10px/12px var(--font-mono); letter-spacing: 0.05em; text-transform: capitalize; color: var(--ink-86); }
.mf-split .mf-block { flex: 1 1 auto; min-width: 0; }

/* the three steps nested inside a block */
.mf-steps { display: flex; flex-direction: column; gap: 50px; padding: 0 10px; border-left: var(--pg-rule); }
.mf-step { display: flex; flex-direction: column; gap: 10px; }
.mf-step h3 { font: 500 26px/31.2px var(--font-display); letter-spacing: 0; color: var(--ink-86); }

ol.mf-notes { margin: 0; padding: 0 0 0 21px; list-style: decimal; }
.mf-notes li { font: 400 17px/20.4px var(--font-body); letter-spacing: 0.05em; color: var(--ink-86); }
.mf-notes li::marker { font: inherit; }
.mf-notes a { text-decoration: underline; text-decoration-thickness: 1.2px; text-underline-offset: 3px; }
.mf-notes a:hover { color: var(--paper); }

.mf-end { width: 100%; }

@media (max-width: 1199px) {
  .mf__hero { height: 300px; }
}
@media (max-width: 899px) {
  .mf-split { flex-direction: column; }
  .mf-split__fig { width: 100%; }
  .mf-split__frame img { width: max(100%, 640px); height: 100%; }
}
@media (max-width: 809px) {
  .mf__spacer { height: 20px; }
  .mf__spacer--80 { height: 20px; }
  .mf__spacer--100 { height: 30px; }
  .mf__hero { height: 220px; }
  .mf-block__lead, .mf-step h3 { font-size: 22px; line-height: 26.4px; }
  .mf-split__frame { height: 288px; }
  .mf-split__frame img { width: max(100%, 358px); height: 288px; }
}

/* ================================================================ /notes/* (typesafe blog post, teal-grey) */

.nt { display: flex; flex-direction: column; gap: 60px; margin: 20px 0; padding: 0 var(--pg-pad); }
.nt-back { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; }
.nt-back a, .nt-back span { display: inline-flex; align-items: center; gap: 6px; padding: 10px 7px; font: 300 10px/12px var(--font-mono); letter-spacing: 0.05em; text-transform: capitalize; color: var(--ink-86); }
.nt-back a:hover { color: var(--cobalt-deep); }
.nt-back a, .nt-back > span { height: 32px; }
.nt-back__mark { font-size: 12px; line-height: 12px; }

.nt-cover { width: 100%; max-width: 1380px; height: 350px; margin: 0 auto; overflow: hidden; border: 1px solid var(--ink); }
.nt-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
/* a painting for a cover (2026-11-21): the banner height sits on the image, the museum label under it */
.nt-cover--art { height: auto; overflow: visible; border: 0; }
.nt-cover--art img { display: block; height: 350px; border: 1px solid var(--ink); }
.nt-cover--art figcaption { margin-top: 8px; }
.nt-cover--martin img { object-position: center 38%; }
.nt-cover--rosa img { object-position: center 62%; }
.nt-cover--pozzuoli img { object-position: center 58%; }
.nt-cover--pantheon img { object-position: center 14%; }
.nt-cover--muses img { object-position: center 30%; }
.nt-plate { width: 340px; max-width: 100%; margin-top: 40px; }
.nt + .nt { margin-top: 0; }

.nt-head { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; max-width: 1240px; margin: 0 auto; }
.nt-head__meta { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-bottom: 10px; }
.nt-tag { padding: 2px 3px 5px; background: var(--ink-86); color: var(--teal-grey); font: 500 22px/22px var(--font-pixel); letter-spacing: 0.01em; }
.nt-date { padding: 2px 3px 5px; font: 500 16px/16px var(--font-pixel); letter-spacing: 0.01em; color: var(--ink); }
.nt-title { width: 100%; max-width: 1024px; color: var(--ink-86); text-align: center; }

/* the post body: 820 column with the left rule, typesafe's rich-text styles */
.nt-body {
  width: 100%;
  max-width: var(--pg-col);
  margin: 0 auto;
  padding: 0 10px 50px;
  border-left: var(--pg-rule);
  font: 400 17px/20.4px var(--font-body);
  letter-spacing: 0.05em;
  color: var(--ink-86);
}
.nt-body > * + * { margin-top: 20px; }
.nt-body strong { font-weight: 700; color: var(--ink); }
.nt-body em { font-style: italic; }
.nt-body a:not(.cta-link) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.nt-body a:not(.cta-link):hover { color: var(--cobalt-deep); }
.nt-body h2 { margin-top: 40px; font: 500 64px/57.6px var(--font-display); letter-spacing: 0; text-transform: capitalize; color: var(--ink-86); }
.nt-body h3 { margin-top: 40px; font: 500 26px/31.2px var(--font-display); letter-spacing: 0; color: var(--ink-86); }
.nt-body h4 { margin-top: 30px; font: 500 22px/30.8px var(--font-display); letter-spacing: 0; color: var(--ink-86); }
.nt-body h5 { margin-top: 30px; font: 700 16px/16px var(--font-inter); letter-spacing: -0.02em; color: var(--ink-86); }
.nt-body h2 + *, .nt-body h3 + *, .nt-body h4 + * { margin-top: 20px; }
.nt-body ul, .nt-body ol { padding-left: 21px; }
.nt-body ul { list-style: disc; }
.nt-body ol { list-style: decimal; }
.nt-body li + li { margin-top: 0; }
.nt-body code { padding: 1.7px 3.4px; background: rgba(0, 0, 0, 0.1); font: 400 0.94em/1 var(--font-fragment); letter-spacing: 0; color: #333333; }
.nt-byline { font-style: italic; }
.nt-byline + * { margin-top: 60px; }

/* tables (typesafe: 1px translucent grey rules, tinted header) */
.nt-table { width: 100%; overflow-x: auto; }
.nt-table table { width: 100%; border: 1px solid rgba(153, 153, 153, 0.25); font: inherit; }
.nt-table th, .nt-table td { padding: 10px; text-align: left; vertical-align: top; border: 1px solid rgba(153, 153, 153, 0.25); }
.nt-table th { background: rgba(153, 153, 153, 0.1); font-weight: 700; color: var(--ink); }
.nt-table td.num { font-family: var(--font-mono); font-size: 14px; letter-spacing: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nt-table caption { caption-side: bottom; padding-top: 8px; text-align: left; font: 300 10px/12px var(--font-mono); letter-spacing: 0.05em; color: var(--ink-86); }

/* a figure in the post: pink pyramid / band diagrams drawn in SVG */
.nt-fig { margin-top: 40px; }
.nt-fig svg { width: 100%; max-width: 480px; height: auto; overflow: visible; }
.nt-fig--wide svg { max-width: 800px; }
.nt-fig .f-shape { fill: var(--pink); stroke: var(--ink); stroke-width: 1; }
.nt-fig .f-band { fill: var(--pink); stroke: var(--ink); stroke-width: 1; }
.nt-fig .f-gap { fill: var(--ink); }
.nt-fig .f-rule { stroke: var(--ink); stroke-width: 1; fill: none; }
.nt-fig .f-dash { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; fill: none; }
.nt-fig .f-dot { fill: var(--pink); stroke: var(--ink); stroke-width: 1.2; }
.nt-fig text { font-family: var(--font-mono); font-weight: 400; font-size: 13px; letter-spacing: 0; fill: var(--ink); }
.nt-fig text.f-sm { font-size: 11px; fill: var(--ink-86); }
.nt-fig figcaption { margin-top: 10px; font: 300 10px/12px var(--font-mono); letter-spacing: 0.05em; color: var(--ink-86); }
.nt-fig + * { margin-top: 40px; }

/* light FAQ inside a post (typesafe blog FAQ: dashed rule, ink chevron box) */
.nt-faq { display: flex; flex-direction: column; gap: 20px; margin-top: 40px; }
.nt-faq__item { padding: 0 10px 20px; border-left: 1px dashed var(--ink); }
.nt-faq__item[open] { border-left-style: solid; }
.nt-faq__q { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 0; cursor: pointer; list-style: none; font: 300 10px/12px var(--font-mono); letter-spacing: 0.05em; text-transform: capitalize; color: var(--ink-86); }
.nt-faq__q::-webkit-details-marker { display: none; }
.nt-faq__q::marker { content: ''; }
.nt-faq__icon {
  width: 20px; height: 20px; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Crect x='.5' y='.5' width='19' height='19' stroke='%230F1D33'/%3E%3Cpath d='M5 7l5 6 5-6' stroke='%230F1D33' stroke-width='1.25'/%3E%3C/svg%3E") center/20px 20px no-repeat;
  transition: transform 0.3s var(--ease);
}
.nt-faq__item[open] .nt-faq__icon { transform: rotate(180deg); }
.nt-faq__a { padding-top: 20px; font: 400 17px/20.4px var(--font-body); letter-spacing: 0.05em; color: var(--ink-86); }
.nt-faq__a p + p { margin-top: 12px; }

/* next notes at the foot of a post */
.nt-more { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; }

@media (max-width: 1199px) {
  .nt-body h2 { font-size: 41px; line-height: 36.9px; }
  .nt-cover { height: 300px; }
  .nt-cover--art { height: auto; }
  .nt-cover--art img { height: 300px; }
}
@media (max-width: 809px) {
  .nt { gap: 40px; }
  .nt-cover { height: 220px; }
  .nt-cover--art { height: auto; }
  .nt-cover--art img { height: 220px; }
  .nt-plate { width: min(70%, 300px); }
  .nt-tag { font-size: 20px; line-height: 20px; }
  .nt-body h2 { font-size: 33px; line-height: 29.7px; }
  .nt-body h3 { font-size: 22px; line-height: 26.4px; }
  .nt-table td.num { font-size: 12px; }
  .nt-table table { font-size: 14px; line-height: 17px; letter-spacing: 0.02em; }
  .nt-table th, .nt-table td { padding: 6px; overflow-wrap: break-word; }
}

/* ================================================================ /legal/* (typesafe terms, pink) */

.lg { padding: 140px var(--pg-pad) 140px; }
.lg__col { display: flex; flex-direction: column; gap: 60px; max-width: 700px; margin: 0 auto; padding: 100px 50px 0; }
.lg__head { display: flex; flex-direction: column; gap: 15px; max-width: 600px; }
.lg__org { font: 400 17px/20.4px var(--font-body); letter-spacing: 0.05em; color: var(--ink-86); }
.lg__title { font: 500 48px/43.2px var(--font-display); letter-spacing: 0; text-transform: capitalize; color: var(--ink-86); }
.lg__date { font: 400 17px/20.4px var(--font-body); letter-spacing: 0.05em; color: var(--ink-86); }
.lg__body { max-width: 600px; font: 400 17px/20.4px var(--font-body); letter-spacing: 0.05em; color: var(--ink-86); }
.lg__body > * + * { margin-top: 20px; }
.lg__body strong { font-weight: 700; color: var(--ink); }
.lg__body a { color: var(--black); text-decoration: underline; text-decoration-thickness: 1.2px; text-underline-offset: 3px; }
.lg__body a:hover { color: var(--cobalt-deep); }
.lg__body h2 { margin-top: 40px; font: 500 26px/31.2px var(--font-display); letter-spacing: 0; color: var(--ink-86); }
.lg__body h3 { margin-top: 20px; font: 700 16px/16px var(--font-inter); letter-spacing: -0.02em; color: var(--ink-86); }
.lg__body ul { padding-left: 21px; list-style: disc; }
.lg__body code { font: 400 15px/1 var(--font-mono); letter-spacing: 0; padding: 1px 3px; background: rgba(0, 0, 0, 0.08); }
.lg__caps { text-transform: uppercase; }

@media (max-width: 809px) {
  .lg { padding: 60px var(--pg-pad) 80px; }
  .lg__col { padding: 40px 0 0; gap: 40px; }
  .lg__title { font-size: 41px; line-height: 38px; }
}

/* ================================================================ /404 */

.nf { position: relative; margin-top: calc(-1 * var(--nav-h)); padding: var(--nav-h) var(--pg-pad) 0; overflow: hidden; }
.nf__sky { position: absolute; left: 0; top: 0; width: 100%; pointer-events: none; }
.nf__sky img { width: 100%; height: auto; }
.nf__inner { position: relative; display: flex; flex-direction: column; gap: 80px; max-width: 1240px; margin: 0 auto; padding: 124px 0 0; }
.nf__content { display: flex; flex-direction: column; align-items: center; gap: 40px; text-align: center; }
.nf__title { color: var(--ink-86); }
.nf__lead { max-width: 560px; font: 400 22px/26.4px var(--font-body); letter-spacing: 0.05em; color: var(--ink); }
.nf__ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 60px; }
.nf__window { width: min(100%, 420px); margin: 0 auto; }
.nf__window .os-window__body { font: 400 13px/1.5 var(--font-mono); letter-spacing: 0; text-align: left; }
.nf__window code { font: inherit; }
.nf__end { margin: 80px calc(-1 * var(--pg-pad)) 0; width: auto; }

@media (max-width: 809px) {
  .nf__inner { padding-top: 60px; gap: 40px; }
  .nf__inner > .pg-hash { display: none; }
  .nf__ctas { gap: 16px 40px; }
  .nf__end { margin-top: 40px; }
}
