/* Edwardcher Zola — article-only readability enhancement.
   Add class="article-reading" to the outermost wrapper of templates/page.html.
   Does not style the homepage, article listings or global navigation. */
.article-reading {
  --reading-ink: #e5e9e7;
  --reading-muted: #aebbb6;
  --reading-accent: #8ee6af;
  --reading-measure: 72ch;
  color: var(--reading-ink);
}
.article-reading :is(.article-header, header.article-header) {
  max-width: var(--reading-measure);
  margin: 0 auto 2.5rem;
}
.article-reading :is(.article-header h1, h1.article-title, .post-title) {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: clamp(2.1rem, 4.3vw, 3.35rem);
  line-height: 1.18;
  letter-spacing: -0.035em;
  font-weight: 700;
  overflow-wrap: break-word;
  margin: 0 0 1.15rem;
  max-width: 24ch;
}
.article-reading :is(.article-content, .post-content, .prose) {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: clamp(1.05rem, 1.2vw, 1.125rem);
  line-height: 1.82;
  letter-spacing: 0.003em;
  max-width: var(--reading-measure);
  margin-inline: auto;
  overflow-wrap: anywhere;
}
.article-reading :is(.article-content, .post-content, .prose) p { margin: 0 0 1.5em; }
.article-reading :is(.article-content, .post-content, .prose) :is(h2,h3,h4) {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.3;
  letter-spacing: -0.018em;
  font-weight: 650;
  scroll-margin-top: 5rem;
}
.article-reading :is(.article-content, .post-content, .prose) h2 {
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  margin: 2.6em 0 0.85em;
  padding-bottom: 0.35em;
  border-bottom: 1px solid rgba(142,230,175,0.22);
}
.article-reading :is(.article-content, .post-content, .prose) h3 {
  font-size: 1.3rem;
  margin: 2em 0 0.7em;
}
.article-reading :is(.article-content, .post-content, .prose) :is(ul,ol) {
  padding-left: 1.6em;
  margin: 0 0 1.6em;
}
.article-reading :is(.article-content, .post-content, .prose) li { padding-left: 0.2em; margin-bottom: 0.55em; }
.article-reading :is(.article-content, .post-content, .prose) a {
  color: var(--reading-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
.article-reading :is(.article-content, .post-content, .prose) blockquote {
  border-left: 3px solid var(--reading-accent);
  padding: 0.2em 1.3em;
  margin: 2em 0;
  color: var(--reading-muted);
}
.article-reading :is(.article-content, .post-content, .prose) :not(pre) > code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: rgba(142,230,175,0.08);
  padding: 0.12em 0.32em;
  border-radius: 0.25rem;
}
.article-reading :is(.article-content, .post-content, .prose) pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.65;
  padding: 1.2rem 1.4rem;
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid rgba(142,230,175,0.14);
  border-radius: 0.6rem;
}
.article-reading :is(.article-content, .post-content, .prose) pre code { font-family: inherit; }
.article-reading :is(.article-content, .post-content, .prose) :is(img,video) { max-width: 100%; height: auto; }
.article-reading :is(.article-content, .post-content, .prose) table { display: block; overflow-x: auto; max-width: 100%; }
@media (max-width: 640px) {
  .article-reading :is(.article-content, .post-content, .prose) { font-size: 1.04rem; line-height: 1.75; }
  .article-reading :is(.article-content, .post-content, .prose) h2 { margin-top: 2.1em; }
  .article-reading :is(.article-content, .post-content, .prose) pre { padding: 0.9rem; }
}

/* Actual v1.0.0-alpha page.html structure; only individual article pages. */
.article-reading.post-page { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.article-reading.post-page > h1 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(2.15rem, 4.4vw, 3.4rem);
  line-height: 1.22;
  letter-spacing: -0.035em;
  font-weight: 700;
  max-width: 25ch;
  margin: 1.1rem 0 1.25rem;
  overflow-wrap: break-word;
}
.article-reading.post-page > .summary {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  line-height: 1.7;
  max-width: 66ch;
  margin: 0 0 2.7rem;
}
.article-reading .post-body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.05rem, 1.2vw, 1.125rem);
  line-height: 1.8;
  letter-spacing: 0.003em;
  max-width: 72ch;
  color: var(--reading-ink);
  overflow-wrap: break-word;
}
.article-reading .post-body p { line-height: inherit; margin: 0 0 1.5em; }
.article-reading .post-body :is(h2,h3,h4) {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.32; letter-spacing: -0.018em;
  scroll-margin-top: 5rem;
}
.article-reading .post-body h2 { font-size: clamp(1.45rem, 2.5vw, 1.9rem); margin: 2.5em 0 .85em; padding-bottom: .35em; border-bottom: 1px solid rgba(142,230,175,.22); }
.article-reading .post-body h3 { font-size: 1.3rem; margin: 2em 0 .7em; }
.article-reading .post-body :is(ul,ol) { padding-left: 1.6em; margin: 0 0 1.6em; }
.article-reading .post-body li { line-height: 1.7; margin-bottom: .55em; }
.article-reading .post-body a { color: var(--reading-accent); text-decoration-thickness: 1px; text-underline-offset: .2em; }
.article-reading .post-body blockquote { border-left: 3px solid var(--reading-accent); padding: .2em 1.3em; margin: 2em 0; color: var(--reading-muted); }
.article-reading .post-body :not(pre) > code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; background: rgba(142,230,175,.08); padding: .12em .32em; border-radius: .25rem; }
.article-reading .post-body pre { font-size: .88rem; line-height: 1.65; padding: 1.2rem 1.4rem; border-color: rgba(142,230,175,.14); border-radius: .6rem; }
.article-reading .post-body pre code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.article-reading .post-body table { display: block; overflow-x: auto; max-width: 100%; }
@media(max-width:640px) {
  .article-reading.post-page > h1 { font-size: clamp(2rem, 8vw, 2.55rem); }
  .article-reading .post-body { font-size: 1.04rem; line-height: 1.75; }
  .article-reading .post-body pre { padding: .9rem; }
}

/* v1.1 — editorial/terminal hybrid, limited to individual articles */
.article-reading.post-page { --reading-ink:#d9e3df; --reading-accent:#65dda5; }
.article-reading.post-page > h1 {font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:clamp(1.85rem,3.4vw,2.7rem);line-height:1.32;letter-spacing:-.045em;font-weight:650;max-width:32ch;margin:1rem 0 1rem;}
.article-reading.post-page > .summary {font-family:'Avenir Next',Avenir,-apple-system,BlinkMacSystemFont,sans-serif;font-size:1.06rem;line-height:1.62;max-width:70ch;margin-bottom:2rem;}
.article-reading .post-body {font-family:'Avenir Next',Avenir,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;font-size:clamp(1rem,1.05vw,1.075rem);line-height:1.69;letter-spacing:0;max-width:70ch;}
.article-reading .post-body p {margin-bottom:1.15em;}
.article-reading .post-body :is(h2,h3,h4) {font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:-.035em;font-weight:650;line-height:1.4;}
.article-reading .post-body h2 {font-size:clamp(1.23rem,2vw,1.52rem);margin:2.05em 0 .7em;padding-bottom:.3em;border-color:rgba(101,221,165,.2);}
.article-reading .post-body h2::before {content:'| ';color:var(--reading-accent);}
.article-reading .post-body h3 {font-size:1.12rem;margin:1.7em 0 .55em;}
.article-reading .post-body li {margin-bottom:.32em;line-height:1.65;}
.article-reading .post-body pre {font-size:.82rem;line-height:1.55;}
.article-reading .post-body .article-figure {margin:1.8rem 0 2.2rem;max-width:100%;}
.article-reading .post-body .article-figure img {display:block;width:100%;height:auto;border:1px solid #244238;border-radius:9px;background:#08110f;}
.article-reading .post-body .article-figure figcaption {font: .79rem/1.55 ui-monospace,SFMono-Regular,Menlo,monospace;color:#a3bdb0;margin-top:.65rem;}
@media(max-width:640px){.article-reading.post-page > h1{font-size:clamp(1.65rem,6vw,2.1rem)}.article-reading .post-body{font-size:1rem;line-height:1.67}}

/* A restrained terminal cursor at the end of article titles only. */
.article-reading.post-page > h1 .article-title-cursor {
  display: inline-block;
  width: .48em;
  height: .84em;
  margin-left: .18em;
  vertical-align: -.075em;
  background: #49dba1;
  animation: article-cursor-blink 1.15s steps(1, end) infinite;
}
@keyframes article-cursor-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .article-reading.post-page > h1 .article-title-cursor { animation: none; }
}

/* Identity comparison: responsive cards instead of a cramped three-column table. */
.article-reading .identity-compare { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; margin:1.4rem 0 1.8rem; }
.article-reading .identity-compare-card { min-width:0; padding:1.1rem 1.2rem; border:1px solid rgba(90,179,137,.4); border-radius:8px; background:rgba(36,70,54,.16); }
.article-reading .identity-compare-card h3 { margin-top:0; }
.article-reading .identity-compare-card p { margin:.7rem 0; }
@media (max-width:680px) { .article-reading .identity-compare { grid-template-columns:1fr; } }

/* Identity Observatory RC15: compact in-article embed; full screen remains optional. */
.article-reading .identity-observatory-workspace {
  position:relative;
  display:block;
  box-sizing:border-box;
  width:100%;
  max-width:920px;
  margin-left:0;
  margin-right:0;
  margin-top:1.5rem;
  margin-bottom:1rem;
  background:#050907;
  border:1px solid #345647;
  border-radius:8px;
  overflow:hidden;
  clear:both;
}
.article-reading .identity-observatory-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:10px;
  padding:10px 14px;
  min-height:56px;
  background:#08150e;
  border-bottom:1px solid #345647;
}
.article-reading .identity-observatory-caption {
  font:600 11px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.08em;
  color:#a4d9b1;
}
.article-reading .identity-observatory-actions {display:flex;flex-wrap:wrap;gap:8px;}
.article-reading .identity-observatory-action {
  display:inline-flex;align-items:center;justify-content:center;
  min-height:36px;padding:7px 12px;
  font:600 12px/1.3 ui-monospace,SFMono-Regular,Menlo,monospace;
  text-decoration:none;color:#a5ffc0;background:#0b1e13;
  border:1px solid #45835b;border-radius:5px;cursor:pointer;
}
.article-reading .identity-observatory-action:hover,
.article-reading .identity-observatory-action:focus-visible {background:#19452b;color:#fff;}
.article-reading .identity-observatory-workspace iframe {
  display:block;width:100%;height:760px;
  border:0;background:#050907;
}
.article-reading .identity-observatory-workspace:fullscreen {
  position:fixed;inset:0;width:100vw!important;height:100vh;
  margin:0!important;border:0;border-radius:0;
}
.article-reading .identity-observatory-workspace:fullscreen iframe {
  height:calc(100vh - 56px);
}
.article-reading .identity-observatory-hint {font-size:.82rem;color:#a1b8aa;}
@media(max-width:760px) {
  .article-reading .identity-observatory-workspace iframe {height:1100px;}
  .article-reading .identity-observatory-workspace:fullscreen iframe {height:calc(100vh - 104px);}
}

/* RC9: consistent, readable product illustration */
.article-reading .identity-product-figure {
  margin:1.4rem auto 1.8rem;
  max-width:600px;
  padding:1rem;
  border:1px solid #345647;
  border-radius:8px;
  background:#0b1511;
  text-align:center;
}
.article-reading .identity-product-figure img {
  display:block;
  max-width:min(100%,440px);
  width:100%;
  height:auto;
  object-fit:contain;
  margin:0 auto;
  border-radius:5px;
}
.article-reading .identity-product-figure figcaption {
  margin-top:.8rem;
  font-size:.83rem;
  line-height:1.6;
  color:#abc4b2;
}
.article-reading .identity-compare {align-items:stretch}
.article-reading .identity-compare-card p {line-height:1.55}

/* RC10: local terminal-inspired smart-card artwork. */
.article-reading .identity-smartcard-figure {max-width:720px;}
.article-reading .identity-smartcard-figure img {max-width:100%;}
