/* Shared foundations and layout for every Astra page. */
:root {
  --background: #000;
  --text: #bcbcbc;
  --heading: #f5f5f5;
  --emphasis: #dedede;
  --page-padding: 24px;
}
* { box-sizing: border-box; }
html { background: var(--background); color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px var(--page-padding);
}
.site-nav a {
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  text-decoration: none;
}
.site-nav a:first-child { margin-right: auto; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--heading); }
.site-nav a:focus-visible { outline: 2px solid var(--heading); outline-offset: 6px; }
main {
  width: 100%;
  max-width: calc(530px + 2 * var(--page-padding));
  margin: auto;
  padding: 40px var(--page-padding);
}
h1 {
  margin: 0 0 36px;
  color: var(--heading);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 9vw, 72px);
  font-weight: 400;
  text-align: center;
}
h1:only-child { margin-bottom: 0; }
.runtime-reference { text-align: center; }
.astra-home { max-width: 1048px; }
.astra-home h1 { margin-bottom: 12px; }
.astra-hero { display: block; width: 100%; height: auto; margin: 0 auto 32px; }
.runtime-reference code { font-size: 0.9em; }
.runtime-reference .runtime-updated { font-size: 13px; }
p { margin: 0 0 18px; font-size: 17px; line-height: 1.7; }
p:last-child { margin-bottom: 0; }
section + section { margin-top: 32px; }
ul { margin: 0; padding-left: 21px; }
li { margin-bottom: 9px; font-size: 15px; line-height: 1.65; }
strong { color: var(--emphasis); font-weight: 500; }

/* Shared cards for collections and core documents. */
.artifact-card, .core-card {
  display: block;
  border: 1px solid #292929;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}
.artifact-card, .core-card summary { padding: 20px 24px; }
.artifact-card:hover, .core-card:hover { border-color: #666; }
.artifact-card:focus-visible, .core-card summary:focus-visible { outline: 2px solid var(--heading); outline-offset: 5px; }
.artifact-card-title, .card-title { display: block; color: var(--heading); font-size: 17px; line-height: 1.5; }
.artifact-card time, .core-card time { display: block; margin-top: 8px; font-size: 13px; line-height: 1.5; }
.core-card + .core-card, .artifact-card + .core-card { margin-top: 16px; }
.core-card summary { cursor: pointer; list-style: none; position: relative; padding-right: 48px; border-radius: 8px; }
.core-card summary::-webkit-details-marker { display: none; }
.core-card summary::after { content: '+'; position: absolute; right: 24px; top: 20px; font-size: 20px; }
.core-card[open] summary::after { content: '−'; }
.core-document { padding: 0 24px 24px; overflow-wrap: anywhere; }
.note-content p { text-align: justify; hyphens: auto; }

.core-document h2 { margin: 0 0 18px; color: var(--heading); font-size: 20px; font-weight: 500; }
.core-document p + h2, .core-document ul + h2 { margin-top: 32px; }
.core-document ul { margin-bottom: 18px; }
.source-link { display: inline-block; color: var(--text); font-size: 13px; text-underline-offset: 4px; }
.source-link:hover { color: var(--heading); }
.source-link:focus-visible { outline: 2px solid var(--heading); outline-offset: 5px; }
@media (max-width: 380px) {
  .site-nav { gap: 16px; }
}
.core-document a { color: var(--emphasis); text-underline-offset: 3px; }
.core-document pre { overflow: auto; white-space: pre-wrap; font-size: 14px; }
.core-card:target { border-color: #888; }

/* Reading surfaces share the dedicated chat's comfortable desktop width. */
.collection-page, .reading-page { max-width: 1060px; margin: 0 auto; }
.note-link + .note-link { margin-top: 12px; }
.note-link:target { border-color: #888; }
.reading-page h1 { text-align: left; font-size: clamp(40px, 6vw, 68px); }
.reading-page h2 { color: var(--heading); font-weight: 500; margin: 36px 0 16px; }
.reading-page a { color: var(--emphasis); text-underline-offset: 4px; }
.reading-page .dateline { color: #999; font-size: 14px; }
.reading-page .intro { font-size: 21px; color: #ddd; }

/* Astra Home hubs: shared heroes and uniform document/artifact entry points. */
.hub-page { max-width: none; padding: 0; margin: 0; }
.page-hero { position: relative; isolation: isolate; min-height: 360px; height: clamp(360px, 32vw, 540px); display: flex; align-items: center; overflow: hidden; border-block: 1px solid #202629; }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background-size: cover; background-position: center; z-index: -2; }
.page-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #02070be0, #02070b70 45%, #02070b10 80%); }
.hero-copy { width: 100%; max-width: 1060px; margin: 0 auto; padding: 44px 24px; }
.hero-copy h1 { text-align: left; margin: 10px 0 20px; font-size: clamp(52px, 6.8vw, 92px); line-height: 1.05; letter-spacing: -.035em; }
.hero-copy > p:not(.eyebrow) { max-width: 480px; color: #e0e5e6; font-size: 18px; line-height: 1.7; text-wrap: pretty; }
.eyebrow { text-transform: uppercase; letter-spacing: .19em; font-size: 11px; color: #b4d2ce; }
.home-hero { height: min(76svh, 860px); min-height: 440px; }
.home-hero .hero-copy { align-self: flex-start; padding-top: clamp(55px, 8vw, 130px); }
.home-page .runtime-reference { padding: 26px 24px; }
.home-page .runtime-reference p { font-size: 13px; margin-bottom: 8px; }
.hub-content { width: 100%; max-width: 1060px; margin: 0 auto; padding: 36px 24px 72px; }
.entry-list { display: grid; gap: 16px; }
.entry-card { border-color: #293236; border-radius: 12px; background: #080d10; overflow: hidden; }
.entry-card + .entry-card { margin-top: 0; }
a.entry-card, .entry-multi > .entry-main, .core-card.entry-card > summary { display: grid; grid-template-columns: 210px minmax(0, 1fr) 28px; align-items: center; gap: 24px; min-height: 182px; padding: 20px; }
.entry-visual { display: flex; width: 100%; height: 140px; border-radius: 7px; background-size: cover; background-position: center; background-color: #0e1b22; }
.preview-diagnostics { background-position: center top; }
.entry-mark { flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(ellipse at 70% 20%, #203a40, #0c151b 75%); color: #bdd1d0; }
.entry-mark > span { font: 42px Georgia, serif; }
.entry-mark small { font-size: 10px; letter-spacing: .15em; text-transform: uppercase; margin-top: 12px; }
.entry-body { display: block; min-width: 0; }
.entry-body .artifact-card-title, .entry-body .card-title { font-size: 20px; }
.entry-body time { color: #96a5aa; margin-top: 5px; font-size: 12px; }
.entry-body p, .entry-description { display: block; font-size: 14px; line-height: 1.6; margin: 12px 0 0; color: #b7c0c3; }
.entry-arrow { color: #a9c9c6; font-size: 24px; }
.core-card.entry-card > summary::after { top: calc(50% - 15px); right: 25px; color: #a9c9c6; }
.entry-card:hover { border-color: #71958f; }
.core-card.entry-card .core-document { padding: 16px 32px 32px; border-top: 1px solid #293236; }
@media (max-width: 650px) {
  .page-hero { height: 390px; }
  .hero-image { background-position: 62% center; }
  .page-hero::after { background: linear-gradient(90deg, #02070be8, #02070b80); }
  .hero-copy > p:not(.eyebrow) { font-size: 16px; }
  .home-hero { height: 65svh; min-height: 440px; }
  .hub-content { padding: 24px 16px 48px; }
  a.entry-card, .entry-multi > .entry-main, .core-card.entry-card > summary { grid-template-columns: 86px minmax(0, 1fr); min-height: 246px; padding: 16px; gap: 16px; }
  .entry-visual { height: 112px; }
  .entry-mark > span { font-size: 32px; }
  .entry-mark small { font-size: 8px; letter-spacing: .06em; }
  .entry-body .artifact-card-title, .entry-body .card-title { font-size: 17px; }
  .entry-body p, .entry-description { font-size: 13px; }
  .entry-arrow { display: none; }
  .core-card.entry-card > summary { padding-right: 30px; }
  .core-card.entry-card > summary::after { right: 10px; }
  .core-card.entry-card .core-document { padding: 20px; }
}

/* Multiple destinations remain inside one artifact card, without nested links. */
.artifact-card.entry-multi { padding: 0; }
.entry-main { color: inherit; text-decoration: none; }
.entry-main:focus-visible { outline: 2px solid var(--heading); outline-offset: -3px; }
.entry-actions { margin: 0 20px 16px; padding-top: 12px; border-top: 1px solid #293236; }
.entry-actions a { display: inline-block; color: #bdd1d0; font-size: 13px; line-height: 1.6; padding: 6px 0; text-underline-offset: 4px; }
