/* Astro Notes theme: star chart tokens */
:root {
    --an-night: #132644;
    --an-deep: #0b1b35;
    --an-plate: #182e52;
    --an-line: #c9d3e2;
    --an-frame: #8796b0;
    --an-star: #f6f4ee;
    --an-mist: #a9b6ca;
    --an-paper: #f4f1ea;
    --an-sheet: #fbfaf6;
    --an-ink: #132644;
    --an-text: #26334d;
    --an-muted: #56637d;
    --an-rule: #d8d2c4;
    --an-display: var(--gh-font-heading, "Cormorant Garamond", Georgia, "Times New Roman", serif);
    --an-body: var(--gh-font-body, Georgia, Gelasio, "Times New Roman", serif);
    --an-max: 1200px;
    --an-text-max: 850px;
    --an-read: 680px;
    --an-radius: 2px;
    --an-ease: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--an-paper);
    color: var(--an-text);
    font-family: var(--an-body);
    font-size: 18px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--an-night); outline-offset: 3px; }
.an-header :focus-visible, .an-hero :focus-visible, .an-sec-night :focus-visible, .an-cta :focus-visible, .an-footer :focus-visible, .an-archive-hero :focus-visible { outline-color: var(--an-star); }

.an-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.an-skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--an-star); color: var(--an-ink); padding: 10px 16px; }
.an-skip:focus { left: 16px; }

.an-wrap { width: 100%; max-width: var(--an-max); margin: 0 auto; padding: 0 30px; }
.an-narrow { max-width: var(--an-text-max); }

/* type */
.an-label {
    display: inline-block;
    font-family: var(--an-body);
    font-size: 13px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--an-muted);
}
.an-label-light { color: var(--an-mist); }
.an-h1, .an-h2, .an-h3 { font-family: var(--an-display); font-weight: 600; margin: 0; letter-spacing: -.005em; }
.an-h1 { font-size: clamp(40px, 5.4vw, 68px); line-height: 1.04; color: var(--an-star); margin: 18px 0 18px; }
.an-h1-sm { font-size: clamp(38px, 4.6vw, 58px); }
.an-h2 { font-size: clamp(32px, 3.8vw, 48px); line-height: 1.08; color: var(--an-ink); margin: 10px 0 14px; }
.an-h3 { font-size: 28px; line-height: 1.15; color: var(--an-ink); }
.an-light { color: var(--an-star); }
.an-light-soft { color: var(--an-line) !important; }
.an-lead { font-size: 19px; line-height: 1.5; color: var(--an-text); margin: 0 0 16px; max-width: 620px; }

.an-pill {
    display: inline-block;
    border: 1px solid var(--an-frame);
    color: var(--an-line);
    border-radius: 999px;
    padding: 7px 16px 6px;
    font-size: 13px;
    letter-spacing: .22em;
    text-transform: uppercase;
}

/* buttons */
.an-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 50px; padding: 0 26px;
    font-family: var(--an-body); font-size: 14px; letter-spacing: .16em; text-transform: uppercase;
    text-decoration: none; border: 1px solid transparent; border-radius: var(--an-radius);
    cursor: pointer; transition: background-color .25s var(--an-ease), color .25s var(--an-ease), border-color .25s var(--an-ease), transform .25s var(--an-ease);
    white-space: nowrap;
}
.an-btn:hover { transform: translateY(-1px); }
.an-btn-light { background: var(--an-star); color: var(--an-ink); border-color: var(--an-star); }
.an-btn-light:hover { background: transparent; color: var(--an-star); }
.an-btn-dark { background: var(--an-night); color: var(--an-star); border-color: var(--an-night); }
.an-btn-dark:hover { background: transparent; color: var(--an-night); }
.an-btn-ghost { background: transparent; color: var(--an-star); border-color: var(--an-frame); }
.an-btn-ghost:hover { border-color: var(--an-star); }
.an-btn-sm { min-height: 40px; padding: 0 18px; font-size: 13px; }

/* header */
.an-header { background: var(--an-night); border-bottom: 1px solid rgba(201,211,226,.22); position: relative; z-index: 20; }
.an-header-row { display: flex; align-items: center; justify-content: space-between; min-height: 78px; gap: 24px; }
.an-brand { display: inline-flex; align-items: center; }
.an-brand-img { height: 40px; width: auto; }
.an-menu { display: flex; align-items: center; gap: 22px; }
.an-menu-list { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.an-menu-list li { display: flex; }
.an-menu-link { display: inline-block; line-height: 1.3; color: var(--an-line); text-decoration: none; font-size: 14px; letter-spacing: .16em; text-transform: uppercase; padding: 6px 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.an-menu-link:hover, .an-menu-link.is-current { color: var(--an-star); border-bottom-color: var(--an-frame); }
.an-burger { display: none; background: none; border: 1px solid var(--an-frame); border-radius: var(--an-radius); width: 46px; height: 42px; padding: 11px 10px; cursor: pointer; flex-direction: column; justify-content: space-between; }
.an-burger span { display: block; height: 1px; background: var(--an-star); transition: transform .25s, opacity .25s; }
.an-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.an-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.an-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* hero */
.an-hero, .an-archive-hero, .an-cta {
    background-color: var(--an-night);
    background-size: cover; background-position: center; background-repeat: no-repeat;
    position: relative;
}
.an-hero { padding: 96px 0 104px; overflow: hidden; }
.an-hero::after, .an-archive-hero::after {
    content: ""; position: absolute; inset: 14px; border: 1px solid rgba(201,211,226,.35); pointer-events: none;
    box-shadow: inset 0 0 0 9px var(--an-night), inset 0 0 0 10px rgba(201,211,226,.22);
}
.an-hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: 56px; align-items: center; position: relative; z-index: 1; }
.an-hero-sub { color: var(--an-line); font-size: 20px; line-height: 1.5; margin: 0 0 28px; max-width: 560px; }
.an-hero-note { color: var(--an-mist); font-size: 14px; letter-spacing: .08em; margin: 14px 0 0; }

/* form */
.an-form { display: flex; flex-wrap: wrap; gap: 10px; max-width: 520px; }
.an-input {
    flex: 1 1 240px; min-height: 50px; padding: 0 16px;
    font-family: var(--an-body); font-size: 17px; color: var(--an-ink);
    background: var(--an-star); border: 1px solid var(--an-star); border-radius: var(--an-radius);
}
.an-input::placeholder { color: #6b7790; }
.an-success, .an-error { display: none; width: 100%; margin: 4px 0 0; font-size: 15px; }
.an-success { color: var(--an-star); }
.an-error { color: #ffd2c4; }
.an-form.success .an-success { display: block; }
.an-form.error .an-error { display: block; }
.an-form.loading .an-btn { opacity: .7; }

/* plate (sample record) */
.an-plate { background: rgba(11,27,53,.82); border: 1px solid var(--an-frame); padding: 9px; border-radius: var(--an-radius); backdrop-filter: blur(2px); }
.an-plate-inner { border: 1px solid rgba(201,211,226,.45); padding: 30px 30px 26px; text-align: center; }
.an-plate-big { font-family: var(--an-display); font-weight: 600; font-size: clamp(48px, 5vw, 64px); line-height: 1; color: var(--an-star); margin: 16px 0 10px; }
.an-plate-phase { font-style: italic; color: var(--an-line); margin: 0 0 22px; font-size: 17px; }
.an-data { margin: 0; background: var(--an-sheet); text-align: left; border-radius: var(--an-radius); }
.an-data div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 18px; border-bottom: 1px solid #e6e1d4; }
.an-data div:last-child { border-bottom: 0; }
.an-data dt { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--an-muted); }
.an-data dd { margin: 0; color: var(--an-ink); font-size: 17px; text-align: right; }

/* sections */
.an-sec { padding: 96px 0; }
.an-sec-paper { background: var(--an-paper); }
.an-sec-night { background: var(--an-night); color: var(--an-line); }
.an-sec + .an-sec-paper.an-sec-latest { padding-top: 24px; }
.an-headwrap { max-width: var(--an-text-max); margin-bottom: 44px; }
.an-headrow { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.an-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.an-proof { display: flex; gap: 14px; margin: 26px 0 0; padding: 20px 22px; border: 1px solid var(--an-rule); background: var(--an-sheet); color: var(--an-ink); font-size: 17px; line-height: 1.5; max-width: 620px; }
.an-proof-mark { color: var(--an-night); font-size: 18px; line-height: 1.4; }
.an-nots { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--an-ink); }
.an-not { display: flex; gap: 18px; padding: 22px 4px; border-bottom: 1px solid var(--an-rule); font-size: 18px; line-height: 1.45; color: var(--an-text); }
.an-not strong { color: var(--an-ink); font-weight: 600; }
.an-not-x { font-family: var(--an-display); font-size: 30px; line-height: .8; color: var(--an-night); width: 22px; flex: none; }

/* shelf timeline */
.an-shelf { background-image: radial-gradient(circle at 80% 10%, rgba(201,211,226,.10), transparent 45%); }
.an-timeline { position: relative; height: 118px; margin: 0 0 20px; }
.an-timeline-line { position: absolute; left: 0; right: 0; top: 62px; height: 1px; background: rgba(201,211,226,.5); }
.an-timeline-line::before, .an-timeline-line::after { content: ""; position: absolute; top: -5px; width: 1px; height: 11px; background: var(--an-line); }
.an-timeline-line::before { left: 0; } .an-timeline-line::after { right: 0; }
.an-star {
    position: absolute; left: var(--x); top: 0; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    background: none; border: 0; padding: 40px 6px 6px; cursor: pointer; color: var(--an-mist); font-family: var(--an-body);
}
.an-star-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--an-line); box-shadow: 0 0 0 4px var(--an-night); transition: transform .3s var(--an-ease), background .3s, box-shadow .3s; }
.an-star-label { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; transition: color .2s; }
.an-star:hover .an-star-label, .an-star.is-active .an-star-label { color: var(--an-star); }
.an-star.is-active .an-star-dot, .an-star:hover .an-star-dot { background: var(--an-star); transform: scale(1.5); box-shadow: 0 0 0 4px var(--an-night), 0 0 18px 4px rgba(246,244,238,.45); }
.an-star:nth-child(odd) .an-star-label { order: -1; }
.an-star:nth-child(odd) { padding-top: 6px; }
.an-shelf-card { border: 1px solid var(--an-frame); padding: 9px; max-width: 620px; }
.an-shelf-card > * { margin: 0; }
.an-shelf-card { position: relative; }
.an-shelf-card::before { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(201,211,226,.4); pointer-events: none; }
.an-shelf-card .an-label { padding: 24px 28px 0; }
.an-shelf-name { font-family: var(--an-display); font-weight: 600; font-size: 40px; line-height: 1.1; color: var(--an-star); padding: 6px 28px 2px; }
.an-shelf-work { font-style: italic; color: var(--an-line); font-size: 19px; padding: 0 28px 26px; min-height: 1.4em; }

/* terms */
.an-terms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--an-ink); border-left: 1px solid var(--an-rule); }
.an-term { padding: 28px 28px 28px; border-right: 1px solid var(--an-rule); border-bottom: 1px solid var(--an-rule); background: var(--an-paper); transition: background .25s; }
.an-term:hover { background: var(--an-sheet); }
.an-term-sign { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--an-muted); }
.an-term-name { font-family: var(--an-display); font-weight: 600; font-size: 32px; color: var(--an-ink); margin: 8px 0 10px; line-height: 1.1; }
.an-term p { margin: 0; font-size: 17px; line-height: 1.5; color: var(--an-text); }

/* cards */
.an-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.an-card { background: var(--an-sheet); border: 1px solid var(--an-rule); border-radius: var(--an-radius); transition: transform .3s var(--an-ease), box-shadow .3s var(--an-ease); }
.an-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(19,38,68,.45); }
.an-card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.an-card-media { aspect-ratio: 1200 / 630; overflow: hidden; background: var(--an-night); }
.an-card-media img { width: 100%; height: 100%; object-fit: cover; }
.an-card-body { padding: 24px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.an-card-title { font-family: var(--an-display); font-weight: 600; font-size: 28px; line-height: 1.12; color: var(--an-ink); margin: 10px 0 10px; }
.an-card-excerpt { margin: 0 0 18px; font-size: 16px; line-height: 1.5; color: var(--an-text); }
.an-card-more { margin-top: auto; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--an-ink); border-bottom: 1px solid var(--an-ink); align-self: flex-start; padding-bottom: 3px; }
.an-empty { border: 1px dashed var(--an-frame); padding: 34px 30px; background: var(--an-sheet); }
.an-empty p { margin: 10px 0 18px; }
.an-empty-wide { grid-column: 1 / -1; }

/* cta */
.an-cta { padding: 96px 0; }
.an-cta-plate { max-width: 760px; margin: 0 auto; text-align: center; background: rgba(11,27,53,.86); border: 1px solid var(--an-frame); padding: 52px 40px; position: relative; }
.an-cta-plate::before { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(201,211,226,.38); pointer-events: none; }
.an-cta-sub { color: var(--an-line); font-size: 18px; line-height: 1.5; margin: 0 auto 26px; max-width: 560px; }
.an-cta .an-form { margin: 0 auto; justify-content: center; position: relative; }

/* archive */
.an-archive-hero { padding: 84px 0 76px; }
.an-archive-hero .an-wrap { position: relative; z-index: 1; }
.an-archive { border-top: 1px solid var(--an-ink); }
.an-archive-link { display: grid; grid-template-columns: 130px minmax(0, 1fr) 24px; gap: 24px; align-items: baseline; padding: 24px 4px; border-bottom: 1px solid var(--an-rule); text-decoration: none; transition: background .2s; }
.an-archive-link:hover { background: var(--an-sheet); }
.an-archive-date { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--an-muted); }
.an-archive-title { display: block; font-family: var(--an-display); font-weight: 600; font-size: 28px; line-height: 1.15; color: var(--an-ink); }
.an-archive-excerpt { display: block; margin-top: 6px; font-size: 16px; line-height: 1.5; color: var(--an-text); }
.an-archive-arrow { color: var(--an-ink); transition: transform .2s; }
.an-archive-link:hover .an-archive-arrow { transform: translateX(4px); }
.an-archive-intro { margin-bottom: 30px; padding: 0 !important; }

/* post */
.an-article { padding: 72px 0 40px; background: var(--an-paper); }
.an-article-head { max-width: var(--an-read); margin: 0 auto; padding: 0 30px 28px; text-align: center; }
.an-article-meta { display: flex; gap: 10px; justify-content: center; align-items: center; color: var(--an-muted); }
.an-article-title { font-family: var(--an-display); font-weight: 600; font-size: clamp(38px, 5vw, 58px); line-height: 1.06; color: var(--an-ink); margin: 16px 0 14px; }
.an-article-excerpt { font-size: 20px; line-height: 1.5; color: var(--an-text); margin: 0; font-style: italic; }
.an-article-image { max-width: var(--an-text-max); margin: 0 auto 30px; padding: 0 30px; }
.an-article-image img { width: 100%; max-height: 480px; object-fit: cover; border-radius: var(--an-radius); }
.an-article-image figcaption { font-size: 14px; color: var(--an-muted); text-align: center; margin-top: 10px; }
.an-article-foot { max-width: var(--an-read); margin: 40px auto 0; padding: 0 30px; text-align: center; }

/* post body: only direct children are styled so issue HTML cards keep their own inline design, identical to the email */
.an-content { max-width: var(--an-read); margin: 0 auto; padding: 0 30px; font-family: var(--an-body); font-size: 18px; line-height: 1.7; color: var(--an-text); }
.an-content > p, .an-content > ul, .an-content > ol, .an-content > blockquote { margin: 0 0 1.25em; }
.an-content > h2 { font-family: var(--an-display); font-weight: 600; font-size: 34px; line-height: 1.15; color: var(--an-ink); margin: 1.6em 0 .5em; }
.an-content > h3 { font-family: var(--an-display); font-weight: 600; font-size: 26px; line-height: 1.2; color: var(--an-ink); margin: 1.4em 0 .4em; }
.an-content > blockquote { border-left: 2px solid var(--an-night); padding: 4px 0 4px 22px; font-style: italic; color: var(--an-ink); }
.an-content > hr { border: 0; height: 1px; background: var(--an-rule); margin: 2.4em 0; }
.an-content > p a, .an-content > ul a, .an-content > ol a { color: var(--an-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.an-content > figure img { border-radius: var(--an-radius); }
.an-content .kg-width-wide { width: min(1000px, calc(100vw - 60px)); margin-left: 50%; transform: translateX(-50%); }
.an-content .kg-width-full { width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.an-content .kg-width-full img { border-radius: 0; }
/* issue card reset: neutralize anything that could reach the HTML card */
.an-content table.an-issue, .an-content table.an-issue table { border-spacing: 0; margin: 0; }
.an-content table.an-issue { margin: 0 0 1.25em; }
.an-content table.an-issue td { vertical-align: top; }
.an-content table.an-issue span { -webkit-font-smoothing: antialiased; }

/* footer */
.an-footer { background: var(--an-deep); color: var(--an-line); padding: 14px; }
.an-footer-frame { border: 1px solid rgba(201,211,226,.3); padding: 64px 0 22px; }
.an-footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.an-footer-brand img { height: 40px; width: auto; }
.an-footer-line { color: var(--an-mist); font-size: 16px; line-height: 1.5; margin: 18px 0 0; max-width: 380px; }
.an-footer-nav ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.an-footer-nav a { color: var(--an-line); text-decoration: none; font-size: 16px; }
.an-footer-nav a:hover { color: var(--an-star); text-decoration: underline; text-underline-offset: 3px; }
.an-footer-nav .an-label { color: var(--an-mist); }
.an-footer-base { display: flex; justify-content: space-between; gap: 16px; margin-top: 54px; padding-top: 20px; border-top: 1px solid rgba(201,211,226,.2); font-size: 14px; color: var(--an-mist); }
.an-footer-ticks { letter-spacing: .2em; }

/* pagination */
.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 40px; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; }
.pagination a { color: var(--an-ink); }

/* reveal */
.an-reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--an-ease), transform .7s var(--an-ease); }
.an-reveal.is-in { opacity: 1; transform: none; }

/* responsive */
@media (max-width: 980px) {
    .an-hero-grid, .an-split { grid-template-columns: minmax(0, 1fr); gap: 44px; }
    .an-terms, .an-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .an-footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .an-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
    .an-burger { display: flex; }
    .an-menu { position: absolute; top: 100%; left: 0; right: 0; background: var(--an-night); flex-direction: column; align-items: flex-start; padding: 18px 20px 26px; gap: 16px; border-bottom: 1px solid rgba(201,211,226,.25); display: none; }
    .an-menu.is-open { display: flex; }
    .an-menu-list { flex-direction: column; gap: 14px; }
    .an-timeline { height: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .an-timeline-line { display: none; }
    .an-star, .an-star:nth-child(odd) { position: static; transform: none; flex-direction: row; padding: 12px 8px; justify-content: flex-start; gap: 12px; }
    .an-star:nth-child(odd) .an-star-label { order: 0; }
}
@media (max-width: 640px) {
    body { font-size: 17px; }
    .an-wrap { padding: 0 20px; }
    .an-hero { padding: 64px 0 72px; }
    .an-sec, .an-cta { padding: 64px 0; }
    .an-terms, .an-cards { grid-template-columns: minmax(0, 1fr); }
    .an-plate-inner { padding: 24px 18px 20px; }
    .an-cta-plate { padding: 40px 22px; }
    .an-archive-link { grid-template-columns: minmax(0, 1fr) 20px; gap: 6px 14px; }
    .an-archive-date { grid-column: 1 / -1; }
    .an-article { padding-top: 48px; }
    .an-article-head, .an-content, .an-article-foot { padding-left: 20px; padding-right: 20px; }
    .an-article-image { padding: 0 20px; margin-bottom: 20px; }
    .an-footer-grid { grid-template-columns: minmax(0, 1fr); }
    .an-footer-base { flex-direction: column; }
    .an-brand-img { height: 32px; }
    .an-btn { width: 100%; }
    .an-headrow .an-btn, .an-article-foot .an-btn, .an-empty .an-btn { width: auto; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
    .an-reveal { opacity: 1; transform: none; }
}

/* hero legibility veil over the star chart */
.an-hero::before, .an-archive-hero::before, .an-cta::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(90deg, rgba(19,38,68,.94) 0%, rgba(19,38,68,.86) 42%, rgba(19,38,68,.35) 72%, rgba(19,38,68,.15) 100%);
}
.an-cta::before { background: rgba(19,38,68,.35); }
.an-hero-grid, .an-cta .an-wrap { position: relative; z-index: 1; }
@media (max-width: 980px) {
    .an-hero::before { background: rgba(19,38,68,.84); }
}
