/* Main-site additions share the existing classic, snow and aurora tokens. */
[hidden] { display: none !important; }
.project-article { max-width: 960px; }
.project-overview { margin: 0 0 32px; }
.project-facts { display: flex; flex-wrap: wrap; gap: 24px 48px; margin: 0 0 26px; }
.project-facts dt { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.project-facts dd { margin: 0; font-size: 16px; font-weight: 550; overflow-wrap: anywhere; }
.project-actions, .editor-tools, .editor-links, .listing-links { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.screenshot-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin: 36px 0; }
.screenshot-gallery figure { margin: 0; min-width: 0; }
.screenshot-gallery figure:only-child { grid-column: 1 / -1; }
.screenshot-gallery img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--soft); }
.screenshot-gallery figcaption { font-size: 12px; color: var(--muted); margin: 10px 2px; }
.tag-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.tag-links a { display: inline-flex; align-items: center; min-height: 36px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 30px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.tag-links a[aria-current] { color: var(--ink); background: var(--soft); border-color: var(--ink); }
.article-toc { margin: 32px 0; border: 1px solid var(--line); border-radius: 18px; padding: 20px 24px; }
summary { cursor: pointer; }
.article-toc summary, .editor-options summary, .feedback-compose summary { font-size: 15px; font-weight: 550; min-height: 34px; }
.article-toc nav { display: flex; flex-direction: column; gap: 2px; padding-top: 12px; }
.article-toc a { color: var(--muted); font-size: 14px; padding: 7px 0; overflow-wrap: anywhere; }
.article-toc .toc-h3 { padding-left: 18px; font-size: 13px; }
.prose h2, .prose h3, #feedback, #project-files { scroll-margin-top: 130px; }
.prose { overflow-wrap: anywhere; min-width: 0; }
.prose img { height: auto; border-radius: 14px; }
.table-scroll { overflow: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 14px; margin-block: 24px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; }
.prose th, .prose td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; min-width: 100px; }
.prose th { background: var(--soft); font-weight: 600; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose .md-align-center { text-align: center; }
.prose .md-align-right { text-align: right; }
.copyable-code { position: relative; padding-top: 52px !important; max-width: 100%; overflow: auto; }
.copy-code { position: absolute; top: 10px; right: 10px; border: 1px solid var(--line); background: var(--soft); color: var(--ink); border-radius: 8px; padding: 7px 10px; font-size: 12px; min-height: 32px; }
.article-section { margin-top: 50px; padding-top: 34px; border-top: 1px solid var(--line); }
.article-section > h2 { font-size: 26px; margin: 12px 0 24px; }
.series-list { display: flex; flex-direction: column; gap: 8px; }
.series-list > a, .series-list > span { padding: 14px 18px; background: var(--soft); border-radius: 12px; overflow-wrap: anywhere; }
.series-list [aria-current] { font-weight: 600; }
.series-list small { font-size: 11px; color: var(--muted); margin-left: 12px; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.related-grid a { background: var(--soft); padding: 22px; border-radius: 18px; min-width: 0; }
.related-grid h3 { font-size: 17px; margin-bottom: 12px; overflow-wrap: anywhere; }
.related-grid p { font-size: 13px; color: var(--muted); margin: 0; }
.feedback-card, .history-card { border: 1px solid var(--line); border-radius: 18px; padding: 24px; margin: 20px 0; overflow-wrap: anywhere; }
.feedback-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; margin-bottom: 18px; font-size: 13px; }
.feedback-meta span { color: var(--muted); font-size: 12px; }
.feedback-card > p { font-size: 15px; }
.feedback-reply { border-left: 2px solid var(--blue); padding: 4px 0 0 16px; margin-top: 20px; }
.feedback-reply strong { font-size: 12px; }
.feedback-reply p { font-size: 14px; margin-top: 10px; }
.feedback-compose { margin-top: 24px; padding: 22px; background: var(--soft); border-radius: 18px; }
.feedback-compose form { margin-top: 24px; }
.archive-list { max-width: 800px; padding-bottom: 80px; }
.archive-list > section { margin-bottom: 40px; }
.archive-list h2 { font-size: 22px; margin-bottom: 20px; }
.archive-list section > a { display: grid; grid-template-columns: 60px minmax(0, 1fr) 20px; gap: 14px; border-bottom: 1px solid var(--line); padding: 20px 0; overflow-wrap: anywhere; }
.archive-list time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.editor-heading { align-items: flex-start; }
.editor-links { justify-content: flex-end; max-width: 55%; font-size: 12px; }
.editor-links .text-link { font-size: 12px; }
.editor-save-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; background: var(--soft); border-radius: 14px; margin-bottom: 26px; font-size: 12px; color: var(--muted); }
.editor-save-bar .text-link { font-size: 12px; }
.draft-recovery p { margin-bottom: 14px; }
.draft-recovery > div { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.text-button { border: 0; color: var(--blue); background: transparent; padding: 10px 6px; min-height: 40px; font-size: 12px; }
.editor-options { border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin: 24px 0; }
.editor-options[open] > summary { margin-bottom: 22px; }
.editor-publication { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.editor-publication h3 { font-size: 20px; }
.editor-body-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.editor-body-layout.has-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.editor-body-layout > div { min-width: 0; }
.editor-preview { border: 1px solid var(--line); border-radius: 16px; padding: 18px; min-width: 0; max-height: 650px; overflow: auto; }
.editor-preview .prose { font-size: 14px; }
.editor-tools { margin: 2px 0 26px; gap: 10px; }
.editor-tools .button { font-size: 12px; }
.upload-image-button { position: relative; cursor: pointer; margin: 0; }
.upload-image-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-image-button:focus-within { outline: 3px solid var(--blue); outline-offset: 3px; }
.saved-cover { max-height: 250px; margin-top: 20px; border-radius: 14px; }
.history-card pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; max-height: 400px; overflow: auto; }
.history-card form { margin-top: 20px; }
@media (max-width: 1000px) { .editor-body-layout.has-preview { grid-template-columns: minmax(0, 1fr); } .editor-preview { max-height: 420px; } }
@media (max-width: 700px) {
  .nav { height: auto; min-height: 62px; flex-wrap: wrap; padding-block: 14px 8px; gap: 10px; }
  .nav-links { width: 100%; justify-content: space-between; gap: 8px; }
  .nav-links a { min-height: 38px; }
  .screenshot-gallery, .related-grid { grid-template-columns: minmax(0, 1fr); }
  .article-toc, .feedback-card, .history-card, .feedback-compose { padding: 18px; }
  .project-facts { gap: 20px 28px; }
  .project-actions .button { gap: 10px; }
  .editor-heading { display: block; }
  .editor-links { max-width: none; justify-content: flex-start; margin-top: 12px; }
  .content-row { flex-wrap: wrap; }
  .content-row > div { flex-basis: 65%; }
  .prose th, .prose td { padding: 12px; }
}
@media (prefers-contrast: more) { .tag-links a, .article-toc, .feedback-card, .editor-options, .table-scroll { border-color: var(--ink); } }
@media (prefers-reduced-motion: reduce) { .copy-code, .text-button, .upload-image-button { transition: none; transform: none; } }
