:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  color: #1a1a1a;
  background: #f6f6f4;
  --border: #e2e2de;
  --muted: #6b6b6b;
}

* { box-sizing: border-box; }
body { margin: 0; line-height: 1.6; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button, .button, input, select, textarea { border-radius: 0; }
button, .button { touch-action: manipulation; }
:focus-visible { outline: 2px solid #1a1a1a; outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: 23px; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; }
h2 { font-size: 19px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
p { margin-bottom: 12px; }
.container { width: 100%; max-width: 960px; margin: 0 auto; padding: 24px; }
main { min-width: 0; }
.panel { background: #fff; border: 1px solid var(--border); margin-bottom: 12px; min-width: 0; }
.panel-heading { margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.5; letter-spacing: .02em; }
.panel-body { padding: 14px; }
p.panel-body { margin: 0; }
.panel-body > :last-child { margin-bottom: 0; }
.profile { display: flex; align-items: center; gap: 22px; }
.profile-image { display: block; width: 96px; height: 96px; flex: 0 0 96px; object-fit: cover; border: 1px solid var(--border); background: #fff; }
.profile-portrait { display: block; position: relative; width: 96px; height: 96px; flex: 0 0 96px; overflow: hidden; border: 1px solid var(--border); background: #e3dfd2; }
.profile-portrait .profile-image { width: 100%; height: 100%; border: 0; }
.portrait-canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.profile-portrait.is-animated .portrait-canvas { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .portrait-canvas { display: none; } }
.profile-details { min-width: 0; }
.profile-details h1 { font-size: 17px; margin-bottom: 8px; }
.profile-details p { margin-bottom: 2px; }
.profile-details > a { display: inline-block; margin-top: 8px; }
.muted, .metadata, .field-help { color: var(--muted); }
.post-list { list-style: none; padding: 0; margin: 0; }
.post-row { padding: 14px; margin: 14px; background: #f6f6f4; border: 1px solid var(--border); }
.post-row + .post-row { margin-top: 0; }
.post-row h3 { margin-bottom: 5px; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.post-row h3 a { text-decoration: none; }
.post-row h3 a:hover { text-decoration: underline; }
.metadata { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 11px; }
.thumb { display: block; width: 20px; height: 20px; flex: none; }
.thumb-down { transform: rotate(180deg); }
.reaction-counts { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.reaction-count { display: inline-flex; align-items: center; gap: 4px; }
.reaction-count .thumb { width: 13px; height: 13px; }
.post-summary { margin: 10px 0 0; overflow-wrap: anywhere; }
.breadcrumb { margin-bottom: 16px; }
.breadcrumb a { display: inline-flex; min-height: 36px; align-items: center; }
.article-header { padding: 28px 28px 0; }
.article-header h1 { font-size: 28px; margin-bottom: 10px; }
.article-summary { color: var(--muted); margin: 18px 0 0; font-size: 15px; }
.article-content { padding: 26px 28px 30px; }
.markdown { font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
.markdown > :first-child { margin-top: 0; }
.markdown > :last-child { margin-bottom: 0; }
.markdown p, .markdown ul, .markdown ol, .markdown blockquote, .markdown pre, .markdown table { margin-top: 0; margin-bottom: 20px; }
.markdown h1, .markdown h2, .markdown h3, .markdown h4, .markdown h5, .markdown h6 { line-height: 1.4; margin-top: 28px; margin-bottom: 12px; }
.markdown h1 { font-size: 25px; }
.markdown h2 { font-size: 21px; }
.markdown h3 { font-size: 18px; }
.markdown h4, .markdown h5, .markdown h6 { font-size: 15px; }
.markdown ul, .markdown ol { padding-left: 25px; }
.markdown li + li { margin-top: 5px; }
.markdown li > p { margin-bottom: 8px; }
.markdown img { display: block; max-width: 100%; height: auto; }
.markdown blockquote { margin-left: 0; margin-right: 0; border-left: 2px solid var(--border); padding: 0 18px; color: var(--muted); }
.markdown blockquote > :last-child { margin-bottom: 0; }
.markdown code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .87em; background: #f6f6f4; padding: 2px 4px; }
.markdown pre { padding: 16px; border: 1px solid var(--border); background: #f6f6f4; overflow-x: auto; line-height: 1.6; }
.markdown pre code { padding: 0; background: none; overflow-wrap: normal; }
.markdown table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 13px; }
.markdown th, .markdown td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.markdown th { background: #f6f6f4; font-weight: 600; }
.markdown hr { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.page-heading h1 { margin: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.actions form { margin: 0; }
button, .button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; border: 1px solid var(--border); background: #fff; padding: 7px 13px; text-decoration: none; line-height: 1.5; cursor: pointer; }
button:hover, .button:hover { background: #f6f6f4; text-decoration: none; border-color: #b8b8b2; }
.button-primary { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.button-primary:hover { background: #363636; border-color: #363636; }
.button-danger { color: #8c2828; }
button:disabled { cursor: not-allowed; opacity: .5; }
.admin-post { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.admin-post-details { min-width: 0; }
.admin-post > .actions { flex-shrink: 0; }
.status { text-transform: capitalize; color: #1a1a1a; }
.updated { margin: 6px 0 0; font-size: 11px; }
.notice { padding: 14px 18px; border: 1px solid var(--border); background: #fff; overflow-wrap: anywhere; white-space: pre-wrap; }
.field { margin-bottom: 20px; }
.field > label { display: block; margin-bottom: 6px; font-weight: 500; }
input:not([type="checkbox"]):not([type="hidden"]), textarea, select { display: block; width: 100%; min-width: 0; min-height: 40px; padding: 9px 10px; background: #fff; border: 1px solid #b8b8b2; }
textarea { resize: vertical; line-height: 1.6; }
.markdown-input { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
select { max-width: 240px; }
.field-help { font-size: 12px; margin: 6px 0 0; }
.editor-form > .field-help { margin-top: 12px; }
.checkbox-field { display: flex; align-items: center; gap: 10px; min-height: 40px; margin-bottom: 16px; }
.checkbox-field input { width: 17px; height: 17px; margin: 0; accent-color: #1a1a1a; }
.checkbox-field label { padding: 8px 0; cursor: pointer; }
.verification { margin: 4px 0 20px; min-height: 140px; }
.reaction-form { margin: 0; padding: 0 28px 12px; text-align: center; }
.reaction-form .actions { justify-content: center; gap: 16px; }
.reaction-form button { width: 44px; height: 44px; padding: 10px; border-color: transparent; background: none; color: var(--muted); transition: color .15s, background .15s, transform .15s; }
.reaction-form button:hover { color: #1a1a1a; background: #f6f6f4; }
.reaction-form button:active { transform: scale(.9); }
.reaction-form button[aria-pressed="true"] { color: #1a1a1a; background: #f0f0ed; }
.reaction-status { min-height: 20px; margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.reaction-form[data-state="done"] .reaction-status { color: #24623a; animation: reaction-done 1.8s ease both; }
.reaction-form[data-state="error"] .reaction-status { color: #8c2828; }
@keyframes reaction-done { 0% { opacity: 0; transform: translateY(5px); } 20%, 75% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .reaction-form button { transition: none; } .reaction-form[data-state="done"] .reaction-status { animation: none; } }
.upload-form { max-width: 650px; }
.newsletter-form { margin: 0; padding: 14px 14px 0; border-bottom: 1px solid var(--border); }
.newsletter-form > label { display: block; margin-bottom: 6px; }
.newsletter-fields { display: flex; flex-wrap: wrap; gap: 8px; max-width: 460px; }
.newsletter-fields input { flex: 1 1 180px; }
.newsletter-fields button { flex: 0 0 auto; }
.newsletter-status { min-height: 20px; margin: 4px 0 8px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.newsletter-form[data-state="done"] .newsletter-status { color: #24623a; }
.newsletter-form[data-state="error"] .newsletter-status { color: #8c2828; }
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 20px; background: #fff; padding: 4px 14px; color: var(--muted); font-size: 11px; }
.site-footer a { display: inline-flex; min-height: 40px; align-items: center; }
.skip-link { position: absolute; top: 8px; left: 14px; z-index: 10; padding: 8px 12px; border: 1px solid #1a1a1a; background: #fff; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.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: 600px) {
  .container { padding: 14px; }
  .panel { margin-bottom: 12px; }
  .panel-heading { padding: 10px 14px; }
  .panel-body, .post-row { padding: 18px 14px; }
  .profile { align-items: flex-start; gap: 16px; }
  .profile-image, .profile-portrait { width: 64px; height: 64px; flex-basis: 64px; }
  .profile-details h1 { font-size: 18px; }
  .profile-details > a { min-height: 40px; display: inline-flex; align-items: center; margin-top: 2px; }
  .article-header { padding: 20px 16px 0; }
  .article-header h1 { font-size: 24px; }
  .article-content { padding: 22px 16px; }
  .reaction-form { padding: 0 16px 12px; }
  .page-heading, .admin-post { align-items: flex-start; flex-direction: column; }
  .post-row h3 a { display: inline-block; padding: 5px 0; }
  button, .button { min-height: 44px; }
  input:not([type="checkbox"]):not([type="hidden"]), textarea, select { font-size: 16px; }
}
