/* Shared screen palette for MiLuNe's observatory articles. Print remains light. */
@media screen {
  html { color-scheme: dark; }
  :root {
    --paper: #151819;
    --ink: #dce1dd;
    --muted: #adb7b0;
    --line: #39433e;
    --purple: #a3cfc0;
    --teal: #a3cfc0;
    --teal-light: #23322c;
    --ochre: #dcc191;
    --ochre-light: #302c23;
  }
  body { background: var(--paper); color: var(--ink); }
  a { color: #add8c9; text-underline-offset: 3px; }
  a:hover { color: #d3ebdf; }
  a:focus-visible, summary:focus-visible { outline: 2px solid #add8c9; outline-offset: 5px; }
  .masthead { border-top-color: #65897b; border-bottom-color: #63716a; }
  .brand span, .issue { color: var(--muted); }
  .hero h1, .chapter h2, .chapter h3 { color: #e4e7e2; }
  .deck { color: #c0c8c2; }
  .scope, .stat-note, .mini-stats span, .margin-note, .source, .chapter figcaption,
  .chapter th, .stat-table summary, .method li { color: var(--muted); }
  .hero-stat { background: #222d2b; border-top-color: #65897b; }
  .hero-stat .label { color: #d8e2dc; }
  .big { color: #b0d7c9; }
  .mini-stats { border-color: #465a50; }
  .mini-stats strong { color: #d9e4dc; }
  .chapter p { color: var(--ink); }
  .chapter figure img { border-color: var(--line); }
  .chapter figcaption { border-left-color: #65897b; }
  .chapter th { font-weight: normal; }
  .chapter th, .chapter td { border-color: var(--line); }
  .discovery-card { border-color: #455f51; }
  .discovery-main { background: #2b4338; color: #e0e8e0; }
  .discovery-other { background: #212f29; color: #cfe0d5; }
  .discovery-card .discovery-note { background: #1d2823; color: #b7c9bd; }
  .connection-card { background: #302c23; color: #e2d7c4; }
  .connection-card .finding-kicker, .connection-numbers strong { color: #dcc191; }
  .connection-arrow { color: #b8a481; }
  .connection-card > p { color: #c9bfae; }
  .metric { background: #222d2b; }
  .metric:nth-child(2) { background: #23322c; }
  .metric strong, .metric:nth-child(2) strong { color: #b0d7c9; }
  .reading-note { background: #222f29; color: #d3ddd5; }
  blockquote { background: #222d2b; color: #b0d7c9; }
  .method { background: #1d2421; border-top-color: #74877c; }
  .footer { background: #101412; color: #b9c4bc; border-top: 1px solid #455a4f; }
  .footer a { color: #add8c9; }
  .chapter figure svg { display: block; width: 100%; height: auto; }
  /* SVG figures use the same readable palette as the prose. */
  .chapter svg > rect:first-of-type { fill: #1e2622; }
  .chapter svg g[fill="#24202b"] { fill: #dce1dd; }
  .chapter svg rect[fill="#bcb2c6"] { fill: #627b70; }
  .chapter svg rect[fill="#2d7772"] { fill: #8cb8a8; }
  .chapter svg rect[fill="#77509d"] { fill: #b4d5c6; }
  .chapter svg text[fill="#726b78"] { fill: #b0bdb4; }
  .chapter svg .chart-grid { stroke: #3d4b43; }
  .chapter svg .chart-quiet { fill: #adb9b0; }
  .chapter svg .chart-primary { fill: #9ccbbb; }
  .chapter svg .chart-secondary { fill: #637c72; }
  .site-return { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px 36px 16px; }
  .site-return a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px; border: 1px solid #495e52; border-radius: 6px; background: #1e2822; color: #cfdfd3; font-size: 12px; line-height: 1.5; text-decoration: none; }
  .site-return .site-home { background: #2b4136; border-color: #6a907b; color: #e0ebe2; font-weight: bold; }
  .site-return a:hover { background: #344d3f; color: #edf3ec; }
}
@media screen and (max-width:850px) { .site-return { padding: 14px 22px 12px; gap: 8px; } .site-return a { padding: 10px 12px; } }
@media print { .site-return { display: none; } }

/* A single compact row leaves the article in view while reading. */
@media screen {
 html { scroll-padding-top: 85px; }
 .observatory-header { position: sticky; top: 0; z-index: 30; background: #151819; border-bottom: 1px solid #39433e; box-shadow: 0 3px 12px #0002; }
 .observatory-header-inner { max-width: 1520px; margin: 0 auto; padding: 8px 32px; display: flex; align-items: center; gap: 26px; }
 .observatory-header .site-home,.observatory-header-controls a,.observatory-header .header-share { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-height: 44px; padding: 9px 14px; border: 1px solid #597966; border-radius: 6px; background: #283c31; color: #dce8df; text-decoration: none; font: bold 12px/1.5 Meiryo,'Yu Gothic',sans-serif; cursor: pointer; box-sizing: border-box; }
 .observatory-header a:hover,.observatory-header .header-share:hover { color: #edf4ed; }
 .observatory-brand { display: inline-flex; align-items: baseline; gap: 9px; min-width: 0; color: #dce1dd; text-decoration: none; white-space: nowrap; }
 .observatory-brand .brand-name { font: bold 19px/1.4 Meiryo,sans-serif; letter-spacing: .02em; }
 .observatory-brand .brand-title { font: 600 17px/1.4 Meiryo,sans-serif; }
 .issue-badge { padding-left: 9px; margin-left: 4px; border-left: 1px solid #495a50; color: #adb7b0; font-size: 11px; }
 .observatory-header-controls { margin-left: auto; display: flex; align-items: center; gap: 8px; }
 .observatory-header-controls .header-archive { background: transparent; border-color: #495e52; font-weight: normal; }
 .home-label-short { display: none; }
 .chapter[id] { scroll-margin-top: 0; }
 .observatory-index .archive-intro { max-width: 1520px; padding: 38px 32px 28px; }
 .observatory-index .issues { max-width: 1456px; margin-bottom: 56px; }
 .observatory-index .issue-card { grid-template-columns: 220px minmax(0,1fr); }
 .observatory-article .hero { max-width: 1200px; padding: 40px 32px 32px; grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); gap: 40px; align-items: start; }
 .observatory-article .hero h1 { font-size: clamp(34px,3.2vw,44px); line-height: 1.6; }
 .observatory-article .hero-stat { margin-top: 4px; }
 .observatory-article .hero-stat .big { font-size: 112px; }
 .observatory-article .paper-body { max-width: 1200px; display: block; padding: 0 32px; margin: 0 auto 60px; border-top: 0; }
 .observatory-article .article-toc { display: grid; grid-template-columns: 120px repeat(3,minmax(0,1fr)); align-items: start; gap: 20px; margin: 0 0 32px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
 .observatory-article .article-toc > span { padding-top: 10px; }
 .observatory-article .article-toc a { padding: 8px 0; margin: 0; border: 0; font-size: 12px; }
 .observatory-article .chapter figure { max-width: 680px; margin: 28px 0 18px; }
 .observatory-article .chapter p { max-width: none; }
 .observatory-article .chapter figcaption { margin-left: 0; margin-right: 0; }
}
@media screen and (max-width:1520px) and (min-width:851px) { .observatory-index .issues { margin-left: 32px; margin-right: 32px; } }
@media screen and (max-width:850px) {
 html { scroll-padding-top: 80px; }
 .observatory-header-inner { padding: 7px 14px; gap: 12px; }
 .observatory-header .site-home { font-size: 11px; padding: 9px 10px; }
 .observatory-brand .brand-name { font-size: 16px; }
 .observatory-brand .brand-title { font-size: 14px; }
 .issue-badge { display: none; }
 .observatory-header .header-share { padding: 9px 12px; }
 .observatory-index .archive-intro { padding: 28px 22px 24px; }
 .observatory-index .issues { margin: 0 22px 40px; }
 .observatory-index .issue-card { grid-template-columns: 1fr; }
 .observatory-article .hero { grid-template-columns: 1fr; padding: 30px 22px 28px; gap: 24px; }
 .observatory-article .hero h1 { font-size: 33px; }
 .observatory-article .hero-stat { display: block; }
 .observatory-article .hero-stat .big { font-size: 85px; line-height: 1.15; margin: 10px 0; }
 .observatory-article .paper-body { padding: 0 22px; margin-bottom: 40px; }
 .observatory-article .article-toc { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding: 16px 0; margin-bottom: 28px; }
 .observatory-article .article-toc > span { grid-column: 1 / -1; padding-top: 0; }
 .observatory-article .article-toc a { font-size: 11px; }
 .observatory-article .chapter figure { margin: 24px 0 16px; }
}
@media screen and (max-width:600px) {
 .observatory-header-inner { gap: 9px; padding-left: 12px; padding-right: 12px; }
 .observatory-brand .brand-name,.observatory-header-controls .header-archive { display: none; }
 .observatory-brand .brand-title { font-size: 13px; }
 .observatory-header .header-share { padding-left: 10px; padding-right: 10px; }
}
@media screen and (max-width:359px) { .home-label-long { display: none; } .home-label-short { display: inline; } }
@media screen and (min-width:1200px) {
 .observatory-index .issues { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
 .observatory-index .issues-header,.observatory-index .archive-note { grid-column: 1 / -1; }
 .observatory-index .issues-header { margin-bottom: 0; }
 .observatory-index .issue-card { grid-template-columns: 164px minmax(0,1fr); margin-bottom: 0; }
 .observatory-index .issue-cover { padding: 24px 20px; }
 .observatory-index .issue-cover strong { font-size: 74px; }
 .observatory-index .issue-copy { padding: 26px; }
 .observatory-index .issue-copy h2 { font-size: 22px; }
 .observatory-index .archive-note { margin-top: 8px; }
}
.observatory-share-dialog { width: min(440px,calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; box-sizing: border-box; padding: 26px; border: 1px solid #56695d; border-radius: 12px; background: #1c2420; color: #dce1dd; font-family: Meiryo,'Yu Gothic',sans-serif; color-scheme: dark; }
.observatory-share-dialog::backdrop { background: #0009; }
.observatory-share-dialog h2 { margin: 0 0 12px; font-size: 19px; }
.observatory-share-dialog p { margin: 0 0 20px; color: #b6c2b9; font-size: 12px; line-height: 1.9; }
.observatory-share-actions { display: grid; gap: 10px; }
.observatory-share-actions a,.observatory-share-actions button,.observatory-share-close { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px; border: 1px solid #617f6c; border-radius: 6px; background: #2b4136; color: #e0ebe2; font: 13px Meiryo,'Yu Gothic',sans-serif; text-decoration: none; cursor: pointer; box-sizing: border-box; }
.observatory-share-actions [hidden] { display: none; }
.observatory-share-actions a:hover,.observatory-share-actions button:hover { background: #344d3f; }
.observatory-share-close { margin-top: 18px; width: 100%; background: transparent; border-color: #495e52; }
.observatory-share-dialog [role=status] { margin: 14px 0 0; min-height: 20px; color: #b4dbca; }
.observatory-share-dialog [role=status]:empty { display: none; }
.observatory-share-dialog input { width: 100%; box-sizing: border-box; margin-top: 12px; padding: 12px; background: #111713; border: 1px solid #6a907b; color: #e0ebe2; font-size: 13px; }

@media print { .observatory-header { position: static; } .observatory-share-dialog { display: none; } }
