/* Published-note composition. This route deliberately owns its article header
   and longform presentation instead of inheriting the legacy site cascade. */

.writing-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  align-items: start;
  column-gap: clamp(48px, 7vw, 96px);
  padding-top: clamp(64px, 9vw, 112px);
  padding-bottom: clamp(48px, 6vw, 72px);
}

.writing-header__primary { max-width: 720px; }
.writing-header h1 {
  max-width: 13ch;
  font-size: clamp(42px, 5.2vw, 68px);
  line-height: 1.04;
  margin: 0 0 14px;
}

.postMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .02em;
}

.postMetaItem { position: relative; }
.postMetaItem:not(:last-child)::after {
  content: "•";
  margin-left: 10px;
  color: rgba(31, 35, 38, .55);
}

.writing-header__deck {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  font-size: var(--text-lead);
  line-height: 1.58;
}

.writing-details {
  width: 272px;
  border-top: 2px solid var(--depth);
  padding-top: 14px;
}

.writing-details__title {
  margin: 0 0 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.writing-details dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.writing-details dt {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
}

.writing-details dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.writing-details a { text-decoration: underline; }

.writing-post {
  border-top: 1px solid var(--clay);
  padding: clamp(48px, 6vw, 72px) 0;
}

.writing-prose,
.prose {
  max-width: 74ch;
  margin-right: auto;
  margin-left: auto;
  font-size: 17px;
  line-height: 1.65;
}

.prose > p { margin: 0 0 14px; }
.prose h2 {
  margin: var(--space-xl) 0 var(--space-md);
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 750;
  letter-spacing: -.02em;
}
.prose h2:first-child { margin-top: 0; }
.prose h2 + p { margin-top: 0; }
.prose ul,
.prose ol { color: var(--ink); }
.prose li { margin: 6px 0; }
.prose .rule { margin: var(--space-xl) 0; }

.rule { height: 1px; margin: var(--space-md) 0; background: var(--clay); }
.rule.ruleAccent { background: linear-gradient(90deg, var(--clay), var(--clay) 55%); }

.mini { margin-bottom: 0; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.pullBlock {
  margin: var(--space-lg) 0;
  padding: 14px 16px;
  border-left: 4px solid var(--clay-str);
  border-radius: 12px;
  background: rgba(31, 35, 38, .02);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 650;
  letter-spacing: -.01em;
}
.keyTerm {
  padding: 0 4px;
  border-bottom: 2px solid var(--clay-str);
  background: rgba(31, 35, 38, .03);
  box-decoration-break: clone;
}

.authorFooter {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: var(--space-xl);
  padding: 14px;
  border: 1px solid var(--clay);
  border-radius: 14px;
  background: rgba(255, 255, 255, .65);
}
.authorName { margin: 0; color: var(--ink); font-family: var(--body); font-weight: 600; letter-spacing: .1px; }
.authorLine { margin: 6px 0 0; color: var(--muted); }
.authorLine a { color: inherit; border-bottom: 1px solid rgba(31, 35, 38, .25); text-decoration: none; }
.authorLine a:hover { border-bottom-color: rgba(31, 35, 38, .55); }
.fieldLabel { margin: 0 0 12px; color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }

.tm-callout {
  position: relative;
  overflow: hidden;
  margin: var(--space-xl) 0;
  padding: var(--space-xl) var(--space-lg);
  border: 1px solid var(--clay);
  border-top: 2px solid var(--ink);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(31, 35, 38, .02), rgba(31, 35, 38, .01));
}
.tm-callout-inner { position: relative; z-index: 2; }

.sovereignty-pack { margin: var(--space-xl) 0; }
.sovereignty-card {
  position: relative;
  overflow: hidden;
  margin: var(--space-md) 0;
  padding: var(--space-lg);
  border: 1px solid var(--clay);
  border-top: 2px solid var(--ink);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(31, 35, 38, .02), rgba(31, 35, 38, .01));
}
.sovereignty-card::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: .18;
  pointer-events: none;
  background-image: linear-gradient(rgba(31, 35, 38, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(31, 35, 38, .04) 1px, transparent 1px);
  background-size: 24px 24px;
}
.sovereignty-card > * { position: relative; z-index: 1; }
.sovereignty-title { margin: 0 0 10px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.sovereignty-muted { max-width: 74ch; margin: 0 0 12px; color: var(--muted); }
.sovereignty-ladder { display: grid; gap: 10px; margin-top: 12px; }
.sovereignty-rung { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--clay); border-radius: 12px; background: rgba(255, 255, 255, .55); }
.sovereignty-grade { display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid var(--clay-str); border-radius: 11px; background: rgba(31, 35, 38, .02); font-family: var(--mono); font-weight: 700; letter-spacing: .06em; }
.sovereignty-rungBody { display: grid; gap: 4px; }
.sovereignty-rungHead { display: flex; align-items: center; gap: 8px; }
.sovereignty-label { color: var(--muted); font-weight: 800; letter-spacing: -.01em; }
.sovereignty-desc { color: var(--ink); opacity: .9; }
.sovereignty-card.feature { border-top-color: var(--clay); }
.sovereignty-eq { overflow-x: auto; padding: 12px; border: 1px solid var(--clay); border-radius: 12px; background: rgba(255, 255, 255, .55); font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.tableScroll { overflow: auto; border: 1px solid var(--clay); border-radius: 12px; background: rgba(255, 255, 255, .55); }
.sovereignty-table { width: 100%; min-width: 760px; margin: 0; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.sovereignty-table th,
.sovereignty-table td { padding: 10px; border-bottom: 1px solid var(--clay); vertical-align: top; }
.sovereignty-table th { text-align: left; font-weight: 600; letter-spacing: -.01em; }
.sovereignty-table thead th { border-bottom-color: rgba(255, 255, 255, .15); background: rgba(31, 35, 38, .92); color: #fff; }
.sovereignty-table tbody tr:nth-child(odd) { background: rgba(31, 35, 38, .03); }
.chip { display: inline-block; margin-right: 6px; margin-bottom: 6px; padding: 3px 8px; border: 1px solid var(--clay); border-radius: 999px; background: rgba(31, 35, 38, .02); color: var(--muted); font-size: 12px; white-space: nowrap; }

@media (max-width: 860px) {
  .writing-header { grid-template-columns: 1fr; row-gap: 40px; }
  .writing-header__primary { max-width: none; }
  .writing-details { width: 100%; max-width: 560px; }
  .writing-details dl { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
}

@media (max-width: 600px) {
  .writing-header { padding-top: 48px; row-gap: 32px; }
  .writing-header h1 { font-size: clamp(40px, 12vw, 54px); }
  .writing-details dl { grid-template-columns: 1fr; gap: 10px; }
  .writing-post { padding-top: 48px; }
  .sovereignty-card { padding: var(--space-md); }
  .tm-callout { padding: var(--space-lg) var(--space-md); }
}

/* "Why MA?" published note — reuses .writing-header/.writing-details (the
   sovereignty post's header) for the byline/deck/details sidebar, but swaps
   the sidebar's Reference/Tool rows for a section jump-nav, and keeps its
   own visual-plate system below (split-open origin image, F1 preview strip). */
.note-pacing { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 4px; }
.note-pacing a:hover { color: var(--signal); }

/* Why MA's one-line title leaves .writing-header__primary much shorter than
   Open Isn't Ownership's two-line title, so the shared header's default
   padding (calibrated for that taller primary column) reads as a dead gap
   above .note-main here. Trim it for this route only. */
.writing-header--compact { padding-top: clamp(48px, 6vw, 72px); padding-bottom: clamp(32px, 4vw, 48px); }
.writing-details dd .detail-hint { color: var(--muted); font-size: 12px; }

/* Matches .writing-post's full-bleed border-top (the seam between header
   and body on the Open article) but without its own padding, since
   .wrap.note-main already owns that spacing — adding both would reopen
   the header/body gap this route just closed. */
.note-main-divider { border-top: 1px solid var(--clay); }

/* .wrap (site-shell.css) loads after this file and also sets max-width;
   .wrap.note-main raises specificity so the 880px prose measure wins
   regardless of stylesheet order, same fix as .interior-section
   .interior-principles in interior.css. */
.wrap.note-main { max-width: 880px; margin-inline: auto; padding-block: 56px 0; }
.note-main h2 { max-width: 68ch; margin: 0 0 20px; margin-inline: auto; color: var(--depth); font: 600 clamp(24px, 2.8vw, 32px)/1.15 var(--display); letter-spacing: -.02em; }
.note-main p { max-width: 68ch; margin: 0 0 22px; margin-inline: auto; font-size: 17px; line-height: 1.68; }
.note-main .intro p:first-child { margin-top: 0; }

/* Article-lead: marks an unheaded opening (intro paragraphs before the
   first named section) as a deliberate lead-in rather than ordinary body
   copy, so it doesn't read as body copy sitting oddly under a heading that
   "went missing". Reusable by any future published note built on
   .note-main — not Why-MA-specific. */
.note-main .article-lead p { max-width: 74ch; font-size: var(--text-lead); line-height: 1.6; }
.note-main .article-lead p:last-child { margin-bottom: 12px; }
.note-main em { font-style: italic; }
section.note-section { padding-block: 8px 48px; }
section.note-section:first-of-type { padding-top: 0; }
.note-section p a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(35, 52, 64, 0.45);
  text-underline-offset: 0.16em;
}
.note-section p a:hover,
.note-section p a:focus-visible {
  text-decoration-color: currentColor;
}

.thesis-line { max-width: 68ch; margin: 36px auto 40px; color: var(--depth); font: 600 clamp(22px, 2.6vw, 28px)/1.4 var(--display); letter-spacing: -.015em; }
.aside-quote { max-width: 68ch; margin: 0 0 24px; margin-inline: auto; padding-inline-start: 20px; border-inline-start: 2px solid var(--clay); color: var(--depth); font-style: italic; font-size: 18px; line-height: 1.5; }
.pull-quote { max-width: 68ch; margin: 44px auto; margin-inline: auto; padding-block: 28px; border-block: 1px solid var(--clay); color: var(--depth); font: 600 clamp(22px, 2.6vw, 30px)/1.4 var(--display); letter-spacing: -.015em; }
.pull-quote p { max-width: none; margin: 0; font: inherit; color: inherit; }
.pull-quote p + p { margin-top: 6px; }

.published-note-visual { margin-block: clamp(56px, 8vw, 96px); }
.published-note-visual figcaption { max-width: 62ch; margin-block-start: 12px; font: 400 12px/1.5 var(--mono); letter-spacing: .02em; color: var(--muted); }

/* margin-bottom here (not on .published-note-visual) is deliberate: the figure's
   own margin-block is zeroed below so it can vertically-center against the
   shorter text column, which would otherwise leave zero space between the
   figcaption and whatever paragraph follows the whole split-open row. */
.split-open { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 4vw, 56px); align-items: center; width: calc(100% + var(--pad)); margin-inline: calc(var(--pad) * -0.5); margin-bottom: clamp(32px, 4vw, 48px); }
.split-open__text h2 { margin: 0 0 18px; max-width: none; }
.split-open__text p { margin: 0; max-width: none; font-size: 18px; line-height: 1.55; }
.split-open .published-note-visual { margin-block: 0; }
.origin-frame { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--clay); background: var(--surface); box-shadow: 0 1px 2px rgba(18, 20, 22, .05), 0 14px 32px -22px rgba(18, 20, 22, .4); }
.origin-frame img { display: block; width: 100%; height: auto; }

.published-note-visual--strip { width: calc(100% + var(--pad) * 2); max-width: none; margin-inline: calc(var(--pad) * -1); }
.published-note-visual--empty-space { width: calc(100% + var(--pad) * 2); max-width: none; margin-inline: calc(var(--pad) * -1); }
.published-note-visual--empty-space picture { display: block; overflow: hidden; border: 1px solid var(--clay); background: var(--surface); box-shadow: 0 1px 2px rgba(18, 20, 22, .05), 0 14px 32px -22px rgba(18, 20, 22, .4); }
.published-note-visual--empty-space img { display: block; width: 100%; height: auto; }
.published-note-visual--empty-space figcaption { padding-inline: var(--pad); }
.note-interval-motif { width: min(100%, 720px); margin: 32px auto 38px; }
.note-interval-motif img { display: block; width: 100%; height: auto; }
/* Desktop + phone pairing: each frame keeps its own native aspect ratio
   (1920x1080 and 390x844 respectively) so object-fit: cover never actually
   crops either capture — the point is to show the same race state honestly
   recomposed for two surfaces, not two crops of one image. Frames are left
   top-aligned rather than height-matched; forcing equal heights would fake
   a relationship the two captures don't really have. */
.f1-preview__pair { display: flex; align-items: flex-start; gap: clamp(12px, 2vw, 24px); }
.f1-preview__frame { border: 1px solid var(--clay); overflow: hidden; }
.f1-preview__frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.f1-preview__frame--desktop { aspect-ratio: 16 / 9; flex: 1 1 auto; min-width: 0; }
.f1-preview__frame--phone { aspect-ratio: 390 / 844; flex: 0 0 auto; width: clamp(110px, 16vw, 170px); }
.f1-preview__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-top: 16px; padding-inline: var(--pad); }
.f1-preview__foot figcaption { margin: 0; max-width: 48ch; }

@media (max-width: 700px) {
  .f1-preview__pair { flex-direction: column; align-items: center; }
  .f1-preview__frame--desktop { width: 100%; }
  .f1-preview__frame--phone { width: min(220px, 60vw); }
}
.f1-cta { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 1px solid var(--depth); border-radius: 6px; background: var(--depth); color: var(--surface); font: 400 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.f1-cta:hover { background: var(--ink); border-color: var(--ink); }

@media (max-width: 860px) {
  .split-open { grid-template-columns: 1fr; width: 100%; margin-inline: 0; gap: 28px; }
}

@media (max-width: 700px) {
  .note-main { padding-block: 40px 0; }
}
