/* Content-hashed static asset. */
:root {
  color-scheme: light;
  --bg: #f8f9f3;
  --surface: #f0f2e9;
  --text: #243a2e;
  --muted: #687264;
  --line: #dfe4d8;
  --accent: #345f43;
  --accent-dark: #244a32;
  --accent-soft: #eaf0e3;
  --danger: #b42318;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
::selection { background: #dcece4; }
a { color: inherit; text-decoration-color: #aeb4b0; text-underline-offset: .2em; }
a:hover { color: var(--accent); }
button, input, textarea, select { font: inherit; }
button, .button { cursor: pointer; }
.site-header, .site-footer, main { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }

.site-header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  color: var(--text);
  font-weight: 750;
  font-size: 18px;
  letter-spacing: -.025em;
  text-decoration: none;
}
nav { display: flex; gap: 22px; }
nav a { color: var(--muted); font-size: 14px; text-decoration: none; }
nav a:hover { color: var(--text); }

.hero { padding: 104px 0 92px; border-bottom: 1px solid var(--line); }
.hero-copy { max-width: 720px; }
.hero-kicker, .eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(44px, 7vw, 68px);
  line-height: 1.08;
  letter-spacing: -.055em;
}
.hero-copy > p:last-child {
  max-width: 620px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.content-section { padding: 72px 0 92px; }
.narrow-top { padding-top: 64px; }
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--text);
}
.section-heading h1, .section-heading h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -.035em;
}
.section-heading > span { color: var(--muted); font-size: 14px; }
.section-link { color: var(--muted); font-size: 14px; text-decoration: none; }
.section-link:hover { color: var(--accent); }

.post-list { display: block; }
.post-card { padding: 32px 0 34px; border-bottom: 1px solid var(--line); }
.post-card h2 {
  margin: 9px 0 8px;
  font-size: 27px;
  line-height: 1.25;
  letter-spacing: -.035em;
}
.post-card h2 a { text-decoration: none; }
.post-card p { max-width: 720px; margin: 0 0 12px; color: var(--muted); }
.post-meta { color: var(--muted); font-size: 13px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.tag { color: var(--muted); font-size: 13px; text-decoration: none; }
.tag:hover { color: var(--accent); }

.search { display: flex; max-width: 560px; margin-top: 30px; }
.search input { flex: 1; min-width: 0; border-right: 0; }
.search button, .primary { border: 0; background: var(--accent); color: white; padding: 10px 18px; }
.search button:hover, .primary:hover { background: var(--accent-dark); }

.pagination {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding-top: 32px;
}
.pagination-direction, .pagination-page {
  display: inline-grid;
  min-width: 38px;
  min-height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 14px;
  text-decoration: none;
}
.pagination-direction { padding: 0 12px; }
.pagination-direction:hover, .pagination-page:hover, .pagination-page.active { border-color: var(--text); color: var(--text); }
.pagination-direction.disabled { opacity: .4; }
.pagination-pages { display: flex; justify-content: center; align-items: center; gap: 6px; }
.pagination-ellipsis { padding: 0 3px; color: var(--muted); }
.pagination-status { color: var(--muted); font-size: 13px; white-space: nowrap; }

.article { max-width: 720px; margin: 0 auto; padding: 64px 0 96px; }
.article-back { display: inline-block; margin-bottom: 44px; color: var(--muted); font-size: 13px; text-decoration: none; }
.article-meta { color: var(--muted); }
.article-header h1 {
  margin: 12px 0 14px;
  font-size: clamp(38px, 6vw, 54px);
  line-height: 1.12;
  letter-spacing: -.045em;
}
.article-description { margin: 0 0 18px; color: var(--muted); font-size: 19px; }
.cover { width: 100%; max-height: 460px; margin-top: 30px; object-fit: cover; border-radius: 2px; }
.prose { margin-top: 52px; font-size: 17px; line-height: 1.85; }
.prose > :first-child { margin-top: 0; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  margin: 2em 0 .65em;
  line-height: 1.3;
  letter-spacing: -.025em;
  scroll-margin-top: 24px;
}
.prose h1 { font-size: 36px; }
.prose h2 { padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 29px; }
.prose h3 { font-size: 23px; }
.prose h4 { font-size: 19px; }
.prose h5 { color: var(--accent); font-size: 16px; }
.prose h6 { color: var(--muted); font-size: 14px; }
.prose p { margin: 1.1em 0; }
.code-block { position: relative; margin: 26px 0; padding-top: 32px; overflow: hidden; background: #171a18; border-radius: 3px; }
.code-label {
  position: absolute;
  top: 0;
  left: 0;
  padding: 9px 14px;
  color: #aab5af;
  font: 600 10px/1 ui-monospace, monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.prose pre { margin: 0; overflow-x: auto; padding: 10px 20px 22px; background: transparent; color: #e8ecea; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.prose :not(pre) > code { padding: .16em .38em; background: var(--surface); color: var(--accent-dark); border-radius: 2px; font-size: .88em; }
.prose img { display: block; max-width: 100%; height: auto; margin: 30px auto; border-radius: 2px; }
.prose blockquote { margin: 26px 0; padding: 2px 0 2px 20px; border-left: 3px solid var(--line); color: #505752; }
.prose blockquote p:first-child { margin-top: 0; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .35em 0; padding-left: .2em; }
.prose li::marker { color: var(--accent); }
.prose .task-list-item, .prose li:has(> input[type="checkbox"]) { list-style: none; margin-left: -1.4em; }
.prose input[type="checkbox"] { width: 16px; height: 16px; margin: 0 8px 0 0; accent-color: var(--accent); vertical-align: -.15em; }
.prose table { display: block; width: 100%; margin: 26px 0; overflow-x: auto; border-collapse: collapse; }
.prose th, .prose td { min-width: 120px; padding: 10px 12px; border: 1px solid var(--line); text-align: left; }
.prose th { background: var(--surface); font-size: 13px; }
.prose hr { height: 1px; margin: 48px 0; border: 0; background: var(--line); }
.prose del { color: var(--muted); }
.article-footer {
  margin-top: 68px;
  padding-top: 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--line);
}
.article-footer strong { font-size: 16px; }
.article-footer p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.article-footer a { color: var(--accent); font-size: 14px; text-decoration: none; }

.empty { padding: 96px 0; text-align: center; }
.site-footer {
  padding: 24px 0 40px;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.admin-shell { padding: 44px 0 76px; }
.login-shell { max-width: 420px; margin: 0 auto; }
.panel { background: var(--bg); border: 1px solid var(--line); border-radius: 3px; }
.login-panel { padding: 30px; }
.login-panel h1 { margin-top: 0; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
input, textarea, select {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--bg);
  color: var(--text);
}
input:focus, textarea:focus, select:focus { outline: 2px solid #cfe2d8; border-color: var(--accent); }
textarea { resize: vertical; }
.login-panel button { width: 100%; margin-top: 20px; }
.form-error { color: var(--danger); }
.admin-toolbar { display: flex; align-items: end; justify-content: space-between; margin-bottom: 22px; }
.admin-toolbar h1 { margin: 0; }
.toolbar-actions, .editor-actions, .upload-row { display: flex; align-items: center; gap: 9px; }
.button { display: inline-block; border: 0; padding: 9px 14px; border-radius: 2px; text-decoration: none; }
.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.ghost { background: transparent; color: var(--muted); }
.danger { background: #fff0ee; color: var(--danger); }
.admin-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; }
.post-sidebar { align-self: start; max-height: 760px; overflow: auto; }
.admin-post { display: block; width: 100%; padding: 14px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.admin-post:hover, .admin-post.active { background: var(--surface); }
.admin-post strong, .admin-post span { display: block; }
.admin-post span { color: var(--muted); font-size: 12px; }
.editor-panel { padding: 22px; }
.editor-panel form { display: grid; gap: 15px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.editor-tabs { display: flex; border-bottom: 1px solid var(--line); }
.tab { border: 0; padding: 9px 13px; background: transparent; color: var(--muted); }
.tab.active { color: var(--accent); border-bottom: 2px solid var(--accent); }
.markdown-editor { min-height: 520px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; line-height: 1.6; }
.preview { min-height: 520px; margin: 0; padding: 0 4px; }
.editor-actions { justify-content: flex-end; }
.editor-actions #save-status { margin-right: auto; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 680px) {
  .site-header, .site-footer, main { width: min(calc(100% - 28px), var(--max)); }
  .site-header { min-height: 62px; }
  nav { gap: 14px; }
  nav a { font-size: 13px; }
  nav a:last-child { display: none; }
  .hero { padding: 72px 0 68px; }
  .hero h1 { font-size: clamp(40px, 13vw, 56px); }
  .hero-copy > p:last-child { font-size: 16px; }
  .content-section { padding: 56px 0 72px; }
  .section-heading h1, .section-heading h2 { font-size: 26px; }
  .post-card { padding: 26px 0 28px; }
  .post-card h2 { font-size: 23px; }
  .pagination { grid-template-columns: 1fr 1fr; }
  .pagination-pages { grid-column: 1 / -1; grid-row: 1; }
  .pagination-status { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .pagination-direction:first-child { grid-column: 1; grid-row: 3; }
  .pagination-direction:last-child { grid-column: 2; grid-row: 3; }
  .article { padding: 48px 0 72px; }
  .article-back { margin-bottom: 34px; }
  .prose { margin-top: 42px; font-size: 16px; }
  .article-footer { grid-template-columns: 1fr; }
  .site-footer { gap: 8px; flex-direction: column; }
  .admin-grid, .field-row { grid-template-columns: 1fr; }
  .admin-toolbar { align-items: flex-start; gap: 18px; }
  .toolbar-actions { flex-wrap: wrap; justify-content: flex-end; }
}

/* Editorial layout */
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
:focus-visible { outline: 3px solid #50846b; outline-offset: 5px; }
.skip-link { position: fixed; top: -80px; left: 20px; z-index: 10; padding: 12px 20px; background: var(--accent); color: white; }
.skip-link:focus { top: 12px; }
.site-header { min-height: 96px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 23px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: #fff; font: italic 700 27px Georgia, serif; padding-bottom: 4px; }
.brand-note { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: 6px; letter-spacing: .08em; }
.site-header nav { gap: 8px; }
.site-header nav a { padding: 8px 14px; border-radius: 8px; }
.site-header nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 650; }
.site-header nav a:hover { background: var(--surface); }
.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: center; gap: 55px; padding: 82px 0 78px; }
.hero h1 { font-size: clamp(40px, 4.8vw, 64px); line-height: 1.3; letter-spacing: -.045em; font-weight: 750; }
.hero h1 span { color: var(--accent); }
.hero-kicker { display: flex; align-items: center; gap: 9px; font-size: 11px; letter-spacing: .1em; }
.hero-kicker > span { height: 7px; width: 7px; border-radius: 50%; background: var(--accent); }
.hero-description { margin: 24px 0 0; color: var(--muted); font-size: 16px; line-height: 1.95; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; margin-top: 30px; font-size: 14px; }
.hero-actions .button { padding: 11px 20px; border-radius: 8px; }
.hero-actions .button span { margin-left: 20px; }
.hero-archive { text-decoration: none; color: var(--muted); }
.hero-art { height: 330px; position: relative; border: 1px solid #dce3d6; border-radius: 50% 50% 12px 12px; background: radial-gradient(#b7c6af 1px, transparent 1px) 0 0 / 15px 15px, #e9eee2; }
.art-label, .art-caption { position: absolute; left: 0; right: 0; text-align: center; font: 10px ui-monospace, monospace; letter-spacing: .17em; color: #576b53; }
.art-label { top: 24px; }
.art-caption { bottom: 20px; }
.note-sheet { position: absolute; width: 65%; height: 218px; top: 64px; left: 18%; border-radius: 6px; }
.note-back { background: #b0bea0; transform: rotate(-12deg); border: 1px solid #9cae8c; }
.note-front { background: #fffef8; border: 1px solid #d3d9c9; transform: rotate(7deg); box-shadow: 0 12px 25px #344b2c16; padding: 20px; display: flex; flex-direction: column; }
.note-index { font: 9px ui-monospace, monospace; letter-spacing: .12em; color: var(--muted); }
.note-glyph { color: var(--accent); font: 46px/1.7 Georgia, serif; text-align: center; }
.note-lines { display: grid; gap: 7px; }
.note-lines i { height: 3px; background: #dfe5d7; }
.note-lines i:nth-child(2) { width: 85%; }
.note-lines i:last-child { width: 60%; }
.note-caption { margin-top: auto; font-size: 10px; letter-spacing: .07em; color: var(--muted); display: flex; justify-content: space-between; }
.note-caption b { font-size: 18px; color: var(--accent); }
.content-section { padding: 48px 0 80px; }
.section-heading { border-bottom: 0; padding-bottom: 24px; align-items: end; }
.section-heading .eyebrow { margin: 0 0 5px; font-size: 10px; }
.section-heading h2 { font-size: 28px; }
.heading-dot { color: var(--accent); }
.post-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.post-card { min-width: 0; padding: 28px; border: 1px solid var(--line); border-radius: 12px; background: #fffefb; display: flex; flex-direction: column; transition: border-color .2s, box-shadow .2s, transform .2s; }
.post-card:hover { border-color: #aebfac; box-shadow: 0 8px 28px #253f2d09; transform: translateY(-3px); }
.post-card h2 { margin: 14px 0 12px; font-size: 23px; line-height: 1.5; letter-spacing: -.025em; overflow-wrap: anywhere; }
.post-card p { font-size: 14px; line-height: 1.9; margin-bottom: 24px; overflow-wrap: anywhere; }
.post-meta { font-size: 12px; letter-spacing: .025em; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.tag-list { gap: 6px; }
.tag { display: inline-block; padding: 3px 9px; border-radius: 5px; background: var(--accent-soft); color: #4e6657; font-size: 11px; overflow-wrap: anywhere; max-width: 100%; }
.tag:hover { background: #dce7d8; }
.read-link { text-decoration: none; white-space: nowrap; color: var(--accent); font-size: 12px; }
.read-link span { margin-left: 8px; font-size: 16px; }
.listing-intro h1 { margin: 0; font-size: clamp(32px, 5vw, 46px); line-height: 1.4; overflow-wrap: anywhere; }
.listing-intro > p:last-child { color: var(--muted); margin: 12px 0 0; }
.narrow-top { padding-top: 60px; }
.search { gap: 8px; margin: 28px 0 40px; }
.search input { border-right: 1px solid var(--line); background: #fffefb; }
.search button { flex-shrink: 0; border-radius: 7px; }
.listing-count { border-top: 1px solid var(--line); padding-top: 20px; }
.pagination-page, .pagination-direction { border-radius: 7px; }
.pagination-page.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.article { max-width: 760px; }
.article-header { padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.article-header h1 { font-size: clamp(32px, 4.7vw, 48px); line-height: 1.4; overflow-wrap: anywhere; }
.article-description { font-size: 17px; line-height: 1.9; }
.cover, .prose img { border-radius: 10px; }
.prose { line-height: 1.95; overflow-wrap: anywhere; }
.prose a { color: var(--accent); }
.code-block { border-radius: 10px; }
.prose pre { font-size: 14px; overflow-wrap: normal; }
.prose blockquote { border-color: #91ac86; background: var(--accent-soft); padding: 20px 24px; border-radius: 0 8px 8px 0; }
.article-footer { border: 1px solid var(--line); border-radius: 12px; padding: 24px; background: var(--accent-soft); }
.site-footer { padding: 28px 0 34px; }
.site-footer a { margin-left: 18px; text-decoration: none; color: var(--accent); }
.empty { margin: 20px 0; border: 1px dashed #c7d2bf; border-radius: 12px; background: #f0f3e9; color: var(--muted); padding: 70px 20px; }
.empty h1, .empty h2 { color: var(--text); }
.empty-symbol { font: 44px Georgia, serif; color: var(--accent); }
.panel { background: #fffefb; border-radius: 12px; }
.login-shell { padding: 80px 0 100px; max-width: 440px; }
.login-panel { padding: 36px; box-shadow: 0 18px 60px #273e2a08; }
.login-panel h1 { font-size: 30px; margin-bottom: 8px; }
.login-description { color: var(--muted); font-size: 14px; margin: 0 0 28px; }
input, textarea, select, .button, .primary { border-radius: 7px; }
.admin-post.active { background: var(--accent-soft); box-shadow: inset 3px 0 var(--accent); }
.admin-post strong { overflow-wrap: anywhere; }
.toolbar-actions, .editor-actions, .upload-row { flex-wrap: wrap; }
.editor-panel, .field-row > label { min-width: 0; }
[hidden] { display: none !important; }
@media (max-width: 900px) {
  .hero { gap: 30px; }
  .brand-note { display: none; }
  .hero-art { height: 300px; }
  .note-sheet { width: 76%; left: 12%; top: 52px; height: 210px; }
}
@media (max-width: 680px) {
  .site-header { min-height: 78px; }
  .brand { font-size: 20px; gap: 7px; }
  .brand-mark { width: 30px; height: 30px; font-size: 24px; }
  .site-header nav { gap: 0; }
  .site-header nav a { padding: 8px 10px; font-size: 12px; }
  .site-header nav a:last-child { display: block; }
  .hero { grid-template-columns: 1fr; padding: 50px 0 44px; gap: 36px; }
  .hero h1 { font-size: clamp(38px, 10vw, 56px); }
  .hero-art { height: 240px; max-width: 360px; width: 100%; margin: 0 auto; border-radius: 120px 120px 10px 10px; }
  .note-sheet { height: 170px; width: 58%; top: 36px; left: 21%; padding: 14px; }
  .note-glyph { font-size: 34px; }
  .art-label { top: 12px; font-size: 8px; }
  .art-caption { bottom: 12px; font-size: 8px; }
  .hero-description { font-size: 14px; }
  .hero-actions { gap: 20px; font-size: 13px; }
  .hero-kicker { font-size: 9px; }
  .content-section { padding: 36px 0 56px; }
  .post-list { grid-template-columns: 1fr; gap: 14px; }
  .post-card { padding: 22px; }
  .post-card h2 { font-size: 21px; }
  .article { padding-top: 32px; }
  .article-footer { padding: 20px; }
  .login-shell { padding-top: 44px; }
  .login-panel { padding: 26px; }
  .admin-toolbar { flex-direction: column; }
  .toolbar-actions { justify-content: flex-start; }
  .post-sidebar { max-height: 240px; }
  .site-footer a { margin-left: 10px; }
}
@media (max-width: 360px) {
  .site-header nav a { padding-inline: 7px; }
  .brand { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
