@font-face { font-family: 'Source Sans 3'; src: url('../fonts/source-sans-3.woff2') format('woff2'); font-style: normal; font-weight: 200 900; font-display: optional; }
@font-face { font-family: 'Source Sans 3'; src: url('../fonts/source-sans-3-italic.woff2') format('woff2'); font-style: italic; font-weight: 200 900; font-display: optional; }
:root { --button-bg: #343d4b; --button-hover: #495569; --muted: #626975; --surface: #f3f4f8; color-scheme: light; font-family: 'Source Sans 3', sans-serif; color: #212529; background: #fff; }
* { box-sizing: border-box; }
a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: #245b85; text-decoration: underline; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #395b88; outline-offset: 3px; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 16px; background: #fff; color: #212529; border: 1px solid currentColor; transform: translateY(calc(-100% - 12px)); }
.skip-link:focus { transform: none; }

/* Button appearance does not depend on the surrounding form or page. */
:where(button:not(.text-button, .editor-toolbar button)), .button-primary, .button-secondary, .button-danger { display: inline-flex; align-items: center; justify-content: center; padding: 9px 18px; border: 1px solid var(--button-bg); border-radius: 3px; background: var(--button-bg); color: #fff; text-decoration: none; }
button:enabled { cursor: pointer; }
.button-primary:hover { background: var(--button-hover); color: #fff; text-decoration: none; }
.button-secondary { border-color: #cbd1da; background: var(--surface); color: var(--button-bg); }
.button-secondary:hover:not(:disabled) { background: #e5e9ef; color: var(--button-bg); text-decoration: none; }
.button-danger { background: #a12626; border-color: #a12626; }
.button-danger:hover:not(:disabled) { background: #841f1f; border-color: #841f1f; }

/* Page layout and navigation. */
body { margin: 0; min-width: 320px; font-size: 16px; background: var(--site-background, none) no-repeat fixed right max(0px, calc((100vw - 960px) / 2)) bottom / min(480px, 70vw) auto; }
/* Reserve the desktop gutter. Mobile reserves only inner content width below. */
@media (min-width: 768px) { :root { scrollbar-gutter: stable; } }
/* Fill short pages while allowing the entire footer to determine its own height. */
.site-layout { display: flex; flex-direction: column; min-height: 100vh; }
.page-top { flex: 1 0 auto; }
.site-sidebar { background: var(--surface); }
.site-header, .article-column, .site-footer > .archive-nav { max-width: 960px; margin: 0 auto; }
.site-header { position: relative; padding: 16px 40px 24px; }
/* Use the existing top gutter without moving the profile or navigation. */
.site-header > .header-sign-in { position: absolute; top: 0; right: 40px; padding-block: 0; font-size: 14px; line-height: 20px; }
.header-menu { display: none; }
.article-column { min-width: 0; width: 100%; }
.site-footer { flex: none; }
/* Only one archive placement participates in layout and keyboard navigation. */
#sidebar-archive { display: none; }
.site-footer > .archive-nav { padding: 24px 40px; }

.profile { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 15px; align-items: start; min-width: 0; }
.menu-toggle.text-button { min-height: 44px; padding: 8px 14px; border: 1px solid #bfc8d3; border-radius: 5px; background: #fff; color: var(--button-bg); font-weight: 600; text-decoration: none; }
.menu-toggle:hover, .site-menu-disclosure[open] > .menu-toggle:not([hidden]) { background: #dce3eb; }
.menu-toggle, .child-toggle { cursor: pointer; list-style: none; }
.menu-toggle:not([hidden]), .child-toggle:not([hidden]) { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.menu-toggle::-webkit-details-marker, .child-toggle::-webkit-details-marker { display: none; }
.portrait { display: block; width: 100%; aspect-ratio: 1; height: auto; object-fit: cover; border-radius: 50%; }
.profile-details { margin-top: 5px; }
.profile-name { font-size: 1.3em; font-weight: 700; }
.profile-details p { font-size: .9em; margin: 0 0 5px; }
.profile-links { margin-top: 16px; font-size: .9em; }
.profile-links:has(li > ul) { margin-top: 10px; }
.profile-links > ul { display: grid; grid-template-columns: repeat(auto-fill, min(100%, 110px)); gap: 6px 20px; list-style: none; margin: 0; padding: 0; }
.profile-links .child-links { margin: 2px 0 0; padding: 0; border: 0; }
.profile-links li { min-width: 0; overflow-wrap: anywhere; }
.profile-links a { display: block; padding-block: 2px; font-weight: 600; }
.profile-links .child-links a { font-weight: 400; }
.site-links { line-height: 1.4; overflow-wrap: anywhere; text-align: left; }
.site-links > li + li { margin-top: 6px; }
.site-links a { display: block; padding-block: 6px; }
.site-links > li > a { font-weight: 600; }
.header-sign-in, .header-menu .header-sign-in { color: var(--muted); font-weight: 400; text-decoration: underline; text-underline-offset: .2em; }
.header-sign-in:hover, .header-menu .header-sign-in:hover { color: #245b85; }
.header-sign-in .text-button { min-height: 0; padding: 0; color: inherit; font: inherit; text-decoration: inherit; }
.header-menu .header-sign-in .text-button { min-height: 44px; padding-block: 10px; }
.site-sign-in { display: none; }
.site-links li { position: relative; }
.child-links { list-style: none; margin: 4px 0 8px 8px; padding: 0 0 0 16px; border-left: 1px solid #c6cdd7; font-size: .9em; }
.child-links a { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #505969; }
.child-links a:hover { color: #212529; }
.child-toggle.text-button { position: absolute; top: 0; right: 0; width: 44px; height: 44px; border: 1px solid #d5dbe3; border-radius: 4px; background: var(--surface); text-decoration: none; text-align: center; }
.child-toggle span { display: block; font-size: 1.2em; }
.page-branch[open] > .child-toggle span { transform: rotate(180deg); }
.account-panel { margin: 12px 60px 0; }
.account-panel:not(:has(a, button)) { display: none; }
.account-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; border-bottom: 1px solid #e1e4e8; color: #505969; font-size: 14px; line-height: 1.3; }
.account-nav:has(.account-menu) { --account-link-padding: 12px; position: relative; gap: 24px; padding: 4px 16px; border: 0; border-radius: 4px; background: #303946; color: #e8edf3; }
.account-label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1.3; letter-spacing: .08em; text-transform: uppercase; }
.account-nav a, .account-nav .text-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px var(--account-link-padding, 0px); color: inherit; font-weight: 600; white-space: nowrap; text-decoration: none; text-underline-offset: 6px; text-decoration-thickness: 2px; transition: color .15s; }
.account-nav a:hover, .account-nav .text-button:hover, .account-nav a:focus-visible, .account-nav .text-button:focus-visible { color: #212529; text-decoration-line: underline; }
.account-nav:has(.account-menu) a:hover, .account-nav:has(.account-menu) .text-button:hover, .account-nav:has(.account-menu) a:focus-visible, .account-nav:has(.account-menu) .text-button:focus-visible { color: #fff; }
.account-nav:has(.account-menu) :focus-visible { outline-color: #b9d8ff; }

.archive-nav { min-width: 0; overflow-wrap: anywhere; }
.archive-nav .post-archive { max-width: 52ch; }
.archive-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 0 12px; margin-bottom: 12px; color: var(--muted); }
.archive-heading img { display: block; filter: grayscale(1); }
.archive-heading h2 { font-size: 1em; font-weight: 600; margin: 0; }
.archive-month { font-size: 1.1em; margin: 24px 0 8px; }
.post-archive ul, .site-links { list-style: none; margin: 0; padding: 0; }
.post-archive li a { display: block; padding: 2px 0; line-height: 1.4; font-weight: 400; }
.post-archive li a, .archive-links a { color: #30343b; text-decoration: underline; text-decoration-color: #c5c9cf; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.post-archive li a:visited, .archive-links a:visited { color: #776477; }
.post-archive li a:hover, .archive-links a:hover { color: #15191e; text-decoration-color: currentColor; }
.archive-links { margin-top: 16px; }
.archive-links > a { font-size: .9em; }
.footer-search .management-search { margin: 28px 0 0; }
.content-search { display: none; }
.content-search:empty { display: none; }
.article-column:has(#article-content .reader-search-form) > .content-search { display: none; }
.post-archive > header { padding-bottom: 16px; border-bottom: 1px solid #e1e4e8; }
.archive-pagination { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; margin-top: 48px; padding-block: 8px; border-top: 2px solid #e1e4e8; font-size: .9em; }
.post-archive .archive-pagination a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: #505969; font-weight: 600; text-decoration: none; }
.post-archive .archive-pagination a:hover { color: #212529; text-decoration: underline; text-underline-offset: .2em; }
.archive-pagination [rel="prev"] { grid-area: 1 / 1; justify-self: start; }
.archive-pagination [rel="next"] { grid-area: 1 / 3; justify-self: end; }
.archive-page-number { grid-area: 1 / 2; color: var(--muted); font-size: .9em; white-space: nowrap; }

@media (max-width: 1679px) {
  .article-column { padding-bottom: 36px; }
  .page-top:has(.info-page) { min-height: 100vh; }
  .site-layout:has(.info-page) .site-footer { display: none; }
  body:has(.page-content .post-archive) { background-image: none; }
}
/* Equal outer tracks center the article on the screen, not beside the sidebar.
 * At 1680px, the sidebar has 360px. Wider screens give it the full left track. */
@media (min-width: 1680px) {
  body { background: var(--site-background, none) no-repeat fixed right bottom / 25% auto; }
  .site-layout { display: grid; grid-template-columns: minmax(0, 1fr) 960px minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: start; }
  .page-top { display: contents; }
  .site-sidebar { grid-row: 1 / 3; position: sticky; top: 0; min-width: 0; height: 100vh; overflow-y: auto; }
  .site-header { display: flex; flex-direction: column; max-width: none; padding-inline: 20px; padding-bottom: 0; }
  .site-header > .header-sign-in { right: 20px; }
  .header-menu { display: block; order: 1; margin-top: 50px; max-width: 52ch; font-size: .9em; }
  .site-links > li + li { margin-top: 0; }
  .header-menu .site-links a { padding-block: 2px; font-weight: 600; }
  .header-menu .child-links a { font-weight: 400; }
  .child-links { margin: 2px 0 4px 6px; padding-left: 12px; font-size: inherit; }
  .profile-links { display: none; }
  .profile { grid-template-columns: 120px minmax(0, 1fr); padding-right: 40px; }
  .site-sidebar .archive-nav { padding: 50px 20px 24px; }
  .article-column { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; min-height: 100vh; }
  .article-column:has(.page-blocks) { grid-column: 2 / -1; max-width: none; }
  #sidebar-archive { display: block; }
  .content-search { display: block; width: 100%; max-width: 960px; margin-top: auto; padding: 0 60px 40px; }
  .site-footer { display: none; }
}
@media (max-width: 767px) {
  body { --mobile-content-width: max(320px, calc(100vw - var(--scrollbar-width, 0px))); }
  /* Size only the inner content. Its background containers use the available width. */
  .article-column, .site-footer > .archive-nav { width: var(--mobile-content-width); margin-inline: 0; }
  body > .setup-panel { width: min(calc(var(--mobile-content-width) - 32px), 500px); margin-left: max(16px, calc((var(--mobile-content-width) - 500px) / 2)); }
  .site-menu-disclosure { width: calc(var(--mobile-content-width) - 40px); }
  .js .menu-toggle[hidden] { display: inline-flex; align-items: center; gap: 6px; }
  .js #site-menu:not([data-ready]), .js .account-menu:not([data-ready]) .action-menu-items { display: none; }
  /* Match the collapsed control while its no-JavaScript markup is still open. */
  .js .account-menu:not([data-ready]) summary:not(:hover) { background: transparent; color: #e8edf3; }
  .js .account-menu:not([data-ready]) summary::after { transform: rotate(45deg) translateY(-2px); }
  .site-header { display: flex; flex-direction: column; gap: 12px; padding: 0 20px 20px; }
  .site-header > .header-sign-in { display: none; }
  .header-menu { display: block; margin-inline: -20px; padding: 8px 20px; border-bottom: 1px solid #cbd3dd; background: #e7ebf0; text-align: right; }
  .profile-links { display: none; }
  .site-links { margin-top: 8px; padding: 8px 14px; border: 1px solid #cbd3dd; border-radius: 5px; background: #fff; }
  .site-links a { min-height: 44px; padding-block: 10px; }
  .site-links > .site-sign-in { display: list-item; margin-top: 16px; padding-top: 12px; border-top: 1px solid #cbd3dd; }
  .site-links li:has(> .page-branch) > a { padding-right: 56px; }
  .profile { width: calc(var(--mobile-content-width) - 40px); grid-template-columns: 80px minmax(0, 1fr); gap: 10px; }
  .profile-name { font-size: 1.1em; }
  .site-footer > .archive-nav { padding: 20px; }
  .account-panel { margin-inline: 20px; margin-bottom: 16px; }
  .account-nav { gap: 16px; }
  .account-nav:has(.account-menu) { gap: 12px; padding-inline: 12px; }
}

/* Article content. */
.page-content { --content-padding: 60px; padding: 30px var(--content-padding); font-size: 1.1em; line-height: 1.4; overflow-wrap: anywhere; text-align: left; }
h1 { font-size: 1.8em; line-height: 1.2; margin: 0; }
h2, h3 { line-height: 1.3; }
.post-heading time { display: block; color: #696d74; font-size: .7em; }
.post-body img { display: block; max-width: 100%; height: auto; padding: 10px 0; margin: 0 auto; }
:where(.page-content, footer) a { color: #000064; text-decoration: underline; }
:where(.page-content) a:hover { color: #245b85; }
pre { overflow-x: auto; background: var(--surface); padding: 20px; font-size: .8em; }
blockquote { border-left: 3px solid #a0a3ac; margin-left: 0; padding-left: 24px; color: #5f6570; }
.content-actions { display: flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%; margin-top: 18px; font-size: 14px; line-height: 1.3; }
.content-actions form { display: flex; margin: 0; }
.content-actions a, .content-actions .text-button, .action-menu summary { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 8px 12px; border: 1px solid #dce1e7; border-radius: 6px; background: transparent; color: #505969; font-weight: 600; text-decoration: none; transition: background-color .15s, color .15s; }
.content-actions a:hover, .content-actions .text-button:hover, .action-menu summary:hover { background: #e5e9ef; color: #212529; }
.content-actions .action-delete:hover { background: #f5e5e5; color: #962d32; }
.content-actions .action-edit:not(.button-secondary), .content-actions .action-publish { border-color: var(--button-bg); background: var(--button-bg); color: #fff; }
.content-actions .action-edit:not(.button-secondary):hover, .content-actions .action-publish:hover { background: var(--button-hover); color: #fff; }
.action-menu { position: relative; }
.action-menu summary { gap: 10px; cursor: pointer; list-style: none; }
.action-menu summary::-webkit-details-marker { display: none; }
.action-menu summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.action-menu[open] summary::after { transform: rotate(225deg) translate(-1px, -1px); }
.action-menu-items { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; width: 180px; padding: 6px; border: 1px solid #dce1e7; border-radius: 8px; background: #fff; box-shadow: 0 6px 18px #20293820; }
.content-actions:has(.action-publish) .action-menu-items { left: auto; right: 0; }
.action-menu:not([open]) .action-menu-items { display: none; }
.action-menu-items a, .action-menu-items .text-button { width: 100%; justify-content: flex-start; border: 0; border-radius: 4px; font-weight: 400; }
.action-menu-items .action-delete { color: #962d32; }
.action-menu-items .action-delete:not(:first-child) { margin-top: 4px; border-top: 1px solid #e1e5eb; border-radius: 0; }
.account-menu summary { border: 0; color: #e8edf3; }
.account-menu summary[hidden] { display: none; }
.account-menu summary:hover, .account-menu[open] summary { background: #465366; color: #fff; }
.account-menu .action-menu-items { border-color: #505969; background: #303946; }
@media (min-width: 768px) {
  .account-nav:has(.account-menu) { --account-link-padding: 8px; }
  .account-menu:not([data-ready]) summary { display: none; }
  .account-menu .action-menu-items { display: flex; gap: 24px; position: static; width: auto; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .account-menu .action-menu-items a { width: auto; font-weight: 600; }
}
.page-message { padding: 20px 0; }

@media (min-width: 1680px) { .page-content { font-size: 1.2em; line-height: 1.5; } }
@media (max-width: 1679px) {
  /* Let article images use the text gutters without enlarging small images. */
  .post-body > p img { max-width: calc(100% + 2 * var(--content-padding)); margin-inline: 0; position: relative; left: 50%; transform: translateX(-50%); }
}
@media (max-width: 767px) {
  .page-content { --content-padding: 20px; }
  h1 { font-size: 1.4em; }
  .content-actions a, .content-actions .text-button, .action-menu summary { min-height: 44px; }
  .account-menu { position: static; }
  .account-menu .action-menu-items a:hover, .account-menu .action-menu-items a:focus-visible { background: #465366; color: #fff; text-decoration: none; }
}

/* Page cards and preview controls. */
.page-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin-top: 30px; }
.page-content .page-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #e1e5eb; border-radius: 6px; overflow: hidden; color: inherit; text-decoration: none; }
.page-card > img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; }
.page-card-copy { display: flex; flex: 1; flex-direction: column; align-items: start; padding: 22px; }
.page-card h2 { font-size: 1.25em; margin: 0; }
.page-card p { font-size: .95em; margin: 12px 0 24px; }
.page-read { margin-top: auto; font-size: .85em; text-decoration: underline; text-underline-offset: .2em; }
.page-card:hover { border-color: #7d8d9e; }
.page-card:hover h2 { text-decoration: underline; }
.page-status { font-size: .8em; color: var(--muted); margin-bottom: 8px; }
.page-back { display: inline-block; margin-bottom: 24px; font-size: .85em; }
.publication-options { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-block: 24px 8px; }
.publication-options label { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; font-weight: 400; white-space: nowrap; cursor: pointer; }
.publication-options input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--button-bg); }
.page-preview-list { display: grid; gap: 20px; margin-top: 30px; }
.page-content .page-preview-list .page-card { flex-direction: row; }
.page-preview-list .page-card > img { width: 28%; align-self: flex-start; }
.page-preview-list .page-card-copy { min-width: 0; padding: 16px; }
@media (min-width: 1680px) { .page-grid { width: 90%; } }
@media (max-width: 767px) {
  .page-grid { grid-template-columns: 1fr; }
  .page-preview-list .page-card > img { width: 30%; }
  .page-preview-list .page-card-copy { padding: 12px; }
}

/* Reader search. */
.reader-search { font-size: 16px; line-height: 1.5; }
.search-results { list-style: none; margin: 0; padding: 0; }
.search-results li { padding: 20px 0; border-top: 1px solid #e1e4e8; }
.search-results h2 { margin: 2px 0 6px; font-size: 1.2em; }
.search-results h2 a { color: #30343b; text-decoration: none; }
.search-results h2 a:hover { text-decoration: underline; }
.search-results h2 a:visited { color: #776477; }
.search-results p { margin: 0; color: #505969; }
.search-kind, .search-limit { font-size: .85em; color: var(--muted); }

/* Page management. */
.page-manager-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; }
.page-manager-heading p { margin: 6px 0 0; color: var(--muted); }
.page-create { border-radius: 4px; }
.page-manager-list { list-style: none; padding: 0; margin: 0; }
.page-manager-list .page-manager-list { margin-left: 16px; padding-left: 16px; border-left: 1px solid #dce0e6; }
.page-manager-row { display: grid; grid-template-columns: minmax(0, 1fr) max-content; align-items: center; gap: 8px 24px; padding: 16px 0; border-top: 1px solid #e1e5eb; }
.page-manager-title { min-width: 0; overflow-wrap: anywhere; }
.page-manager-title > a { font-weight: 600; text-decoration: none; }
.page-manager-title > a:hover { text-decoration: underline; }
.page-manager-title small { display: block; color: var(--muted); font-size: .85em; }
.page-manager-draft { display: inline-block; margin-top: 6px; padding: 1px 8px; border-radius: 3px; background: #eef0f4; color: #555e6b; font-size: .8em; }
.page-manager-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 0 20px; font-size: .9em; }
.page-manager-actions form { margin: 0; }
.page-manager-actions a, .page-manager-actions .text-button { display: inline-block; padding-block: 10px; color: #555e6b; text-underline-offset: .2em; transition: color .2s; }
.page-manager-actions a:hover, .page-manager-actions .text-button:hover { color: #212529; }
.page-manager-empty { padding: 24px; border: 1px dashed #cbd1da; border-radius: 4px; color: var(--muted); }
.media-details { display: flex; align-items: center; gap: 16px; min-width: 0; }
.media-details > img { width: 80px; height: 80px; object-fit: contain; flex-shrink: 0; }
.media-details .page-manager-title { font-size: .85em; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr)); gap: 16px; list-style: none; padding: 0; }
.media-grid > li { display: flex; flex-direction: column; min-width: 0; border: 1px solid #dce0e6; border-radius: 6px; background: #fff; }
.media-grid > .page-manager-empty { grid-column: 1 / -1; }
.media-card { display: block; flex: 1; border-radius: inherit; overflow: hidden; }
.media-card:hover { color: inherit; text-decoration: none; background: #f8f9fb; }
.media-card:focus-visible { outline-offset: 0; }
.media-grid img { display: block; width: 100%; height: 160px; padding: 12px; object-fit: contain; background: var(--surface); border-bottom: 1px solid #e1e5eb; }
.media-card-caption { display: block; padding: 12px; }
.media-filename { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8em; color: #505969; }
.media-card-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: .75em; color: var(--muted); }
.media-card-meta > * { white-space: nowrap; }
.media-grid button.media-card { width: 100%; padding: 0; border: 0; border-radius: inherit; background: transparent; color: inherit; text-align: left; }
.media-grid .media-card:hover:not(:disabled) { outline: 2px solid #94a3b8; outline-offset: 0; background: #f8f9fb; }
.media-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px; margin-top: 24px; }
:is(.media-filters, .management-search) { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 24px 0 12px; }
:is(.media-filters, .management-search) > div { flex: 1 1 130px; min-width: 0; }
.media-filters .media-search { flex: 2 1 220px; }
:is(.media-filters, .management-search) label { margin: 0 0 6px; font-size: .85em; }
:is(.media-filters, .management-search) :is(input, select) { width: 100%; margin: 0; }
:is(.media-filters, .management-search) :is(input, select, button) { height: calc(1.5em + 22px); min-height: 44px; line-height: 1.5; }
.media-clear-filters { margin: 0 0 12px; font-size: .85em; }
.management-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: 20px; }
.reader-search-form label { margin: 0; font: inherit; }
.reader-search-form label span { display: block; margin-bottom: 6px; font-size: .85em; font-weight: 600; }
.management-search-results { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; margin: 0 0 20px; font-size: .85em; color: var(--muted); }
.management-search-results p { margin: 0; }
.management-search-results a { color: #505969; text-underline-offset: .2em; }
.media-detail-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: start; gap: 32px; }
.media-detail-preview { min-width: 0; margin: 0; text-align: center; }
.media-detail-preview > a { display: grid; place-items: center; min-height: 180px; padding: 16px; border: 1px solid #dce0e6; border-radius: 6px; background: var(--surface); }
.media-detail-preview img { display: block; width: auto; height: auto; max-width: 100%; max-height: 400px; object-fit: contain; }
.media-detail-preview figcaption { margin-top: 12px; font-size: .85em; }
.media-detail-info { min-width: 0; overflow-wrap: anywhere; }
.media-detail-usage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-top: 28px; overflow-wrap: anywhere; }
.media-detail-usage h2 { margin: 0 0 12px; padding: 10px 14px; background: var(--surface); color: #505969; font-size: 1em; }
.media-detail-usage ul { margin: 0; padding-left: 24px; }
.media-detail-usage .form-hint { margin: 0; }
.media-label-form { margin: 0; }
.media-label-form > label:first-of-type { margin-top: 0; }
.media-label-form .form-hint { margin: 6px 0 0; }
.media-label-form details.form-hint { margin-top: 12px; }
.media-label-form summary { cursor: pointer; }
.media-label-form details p { margin: 8px 0 0; }
.media-label-form .form-actions { margin-top: 18px; }
.page-manager .media-cleanup-link { border: 1px solid #cbd1da; background: #fff; color: #505969; font-size: .9em; }
.page-manager .media-cleanup-link:hover { background: var(--surface); }
.media-library > .page-manager-heading { margin-bottom: 16px; gap: 12px; }
.media-upload { border: 1px solid #dce0e6; border-radius: 6px; background: #fff; }
.media-upload summary { min-height: 44px; padding: 12px 16px; font-weight: 600; cursor: pointer; }
.media-upload-fields { padding: 0 16px 16px; }
.media-upload .form-actions { gap: 12px; margin-top: 12px; }
.media-upload input[type=file] { flex: 1 1 220px; min-width: 0; width: 100%; }
.media-upload .form-hint { margin: 0; font-size: .85em; }
.media-upload [data-upload-status]:empty { display: none; }
@media (max-width: 767px) {
  .media-detail-layout, .media-detail-usage { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .media-library .media-cleanup-link { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 10px; font-size: .85em; }
  .media-filters { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; margin-top: 16px; }
  .media-filters .media-search { grid-column: 1 / -1; }
  .media-filters input, .media-filters select, .media-filters button { font-size: 16px; }
  .media-upload .form-actions { display: grid; gap: 10px; }
  .media-upload button[type=submit] { width: 100%; }
}
.media-browser { width: 800px; height: min(80dvh, 760px); max-height: calc(100dvh - 48px); padding: 0; overflow: hidden; border-radius: 12px; box-shadow: 0 24px 80px #0006; font-size: 16px; line-height: 1.5; }
.media-browser[open] { display: grid; grid-template-rows: auto auto minmax(0, 1fr); }
.media-browser::backdrop { background: rgb(20 25 35 / 75%); }
.media-browser .page-manager-heading { align-items: center; margin: 0; padding: 20px; border-bottom: 1px solid #dce0e6; background: var(--surface); }
.media-browser h2 { margin: 0; font-size: 1.4em; }
.media-browser [data-media-results] { grid-row: 3; min-height: 0; overflow-y: auto; scrollbar-gutter: stable; overscroll-behavior: contain; padding: 20px; }
.media-browser [data-media-status] { margin: 0; padding: 12px 20px; }
.media-browser [data-media-status]:empty { display: none; }
@media (max-width: 767px) {
  .page-manager-row { grid-template-columns: minmax(0, 1fr); }
}

/* Saved version navigation and read-only preview. */
.revision-layout { display: grid; grid-template-columns: minmax(180px, 240px) minmax(0, 1fr); gap: 32px; margin-top: 32px; }
.revision-list { list-style: none; padding: 0; margin: 0; }
.revision-list a { display: block; padding: 12px; border-bottom: 1px solid #dce0e6; border-left: 3px solid transparent; text-decoration: none; overflow-wrap: anywhere; }
.revision-list a[aria-current] { background: #eef0f4; border-left-color: var(--button-bg); }
.revision-list time, .revision-title { display: block; }
.revision-list time { font-size: .8em; color: var(--muted); }
.revision-title { margin-top: 4px; font-weight: 600; }
.revision-latest { display: block; margin-bottom: 6px; color: #505969; font-size: 12px; font-weight: 600; }
.revision-preview { min-width: 0; overflow-wrap: anywhere; }
.revision-preview .form-actions { margin-top: 0; }
.revision-preview pre { overflow: auto; white-space: pre-wrap; }
.revision-preview img { max-width: 100%; height: auto; }
.revision-image { margin: 24px 0; }
.revision-image img { max-height: 200px; object-fit: contain; }
.missing-image { display: inline-block; padding: 16px; border: 1px dashed #cbd1da; color: var(--muted); }
.media-history-confirmation { flex-basis: 100%; }
.revision-summary, .revision-image figcaption { color: var(--muted); }
.revision-notice { padding: 16px; background: #eef0f4; border-left: 3px solid var(--button-bg); }
.revision-notice p { margin-bottom: 0; }
@media (max-width: 767px) {
  .revision-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

/* Shared controls and form feedback. */
.page-manager, .history-page, .profile-editor, .editor-panel, .confirmation-panel, .auth-email-form, #reset-request-form, #reset-password-form, .verification-panel { font-size: 16px; line-height: 1.5; }
.image-picker { min-width: 0; margin: 24px 0; padding: 16px; border: 1px solid #bfc4cd; }
.image-picker input[type=file], .media-upload input[type=file] { padding: 0; border: 0; background: transparent; font-size: .9em; }
.image-picker input::file-selector-button, .media-upload input::file-selector-button { padding: 8px 12px; margin-right: 10px; border: 1px solid #cbd1da; border-radius: 4px; background: var(--surface); color: var(--button-bg); font: inherit; cursor: pointer; }
.page-preview { border-color: #dce0e6; border-radius: 6px; background: #fff; }
.page-preview legend { padding: 0 6px; font-weight: 600; }
.page-preview legend span { font-weight: 400; color: var(--muted); font-size: .85em; }
.page-preview > .form-hint { margin: 0 0 16px; }
.preview-image-row { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 20px; align-items: start; }
.preview-image-selection { width: 160px; text-align: center; }
.preview-image-frame { display: grid; place-items: center; width: 160px; min-height: 100px; padding: 8px; border: 1px solid #dce0e6; border-radius: 4px; background: var(--surface); overflow: hidden; }
.preview-image-frame img:not([hidden]) { display: block; width: auto; height: auto; max-width: 100%; max-height: 240px; object-fit: contain; }
.preview-image-frame .image-empty { color: var(--muted); font-size: .8em; }
.preview-image-frame img:not([hidden]) + .image-empty { display: none; }
.preview-image-controls { min-width: 0; }
.image-picker input[hidden] { display: none; }
.preview-image-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-width: 320px; }
.preview-image-actions button { min-height: 44px; padding: 8px; border-radius: 4px; font-size: 14px; line-height: 20px; }
.preview-image-controls .form-hint, .preview-image-controls [data-image-status] { margin: 10px 0 0; font-size: .85em; }
.preview-image-controls [data-image-status]:empty { display: none; }
.page-preview > .preview-image-help { margin: 20px 0 0; padding-top: 20px; border-top: 1px solid #e1e5eb; }
@media (max-width: 767px) {
  .preview-image-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .preview-image-selection, .preview-image-frame { width: 100%; }
  .preview-image-actions { max-width: none; }
}
.image-upload-controls .text-button { margin-top: 12px; }
.image-upload-recovery { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.image-upload-recovery button { padding: 8px 12px; font-size: inherit; }
.preview-image-selection .text-button { margin: 0; min-height: 44px; font-size: 14px; color: #505969; }
.form-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form-actions, .verification-actions { margin-top: 24px; }
.text-button { border: 0; padding: 0; background: none; color: inherit; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
label { display: block; font-weight: 600; margin: 18px 0 6px; }
input:not([type=hidden], [type=checkbox], [type=radio]), textarea, select { display: block; width: 100%; padding: 10px 12px; color: #212529; border: 1px solid #bfc4cd; border-radius: 3px; background: #fff; }
textarea { resize: vertical; }
button:disabled, input:disabled, textarea:disabled, select:disabled { opacity: .55; cursor: not-allowed; }
.image-picker input:disabled::file-selector-button, .media-upload input:disabled::file-selector-button { cursor: not-allowed; }
.field-error { display: block; margin: 6px 0 0; color: #a12626; font-size: .85em; line-height: 1.5; }
.field-error:empty { display: none; }
.field-error > span { display: block; }
.form-hint { color: var(--muted); font-size: .85em; }
.publication-footer { display: flex; flex-direction: column; overflow-anchor: none; }
/* Reserve the schedule's actual height below the actions until it is selected. */
.publication-footer .post-schedule[hidden] { display: block; visibility: hidden; order: 1; }
.post-schedule { margin-top: 16px; padding: 16px; border: 1px solid #e1e5eb; border-radius: 4px; background: var(--surface); }
.post-schedule-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.post-schedule-fields > div { min-width: 0; }
.post-schedule label { margin-top: 0; }
.post-schedule input { min-width: 0; }
.post-time-field { display: flex; position: relative; border: 1px solid #bfc4cd; border-radius: 3px; background: #fff; }
.post-time-field:focus-within { outline: 2px solid #395b88; outline-offset: 3px; }
.post-time-field input { border: 0; background: transparent; outline: none; }
.post-time-menu { flex: 0 0 44px; }
.post-time-menu summary { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 44px; cursor: pointer; list-style: none; border-radius: 0 3px 3px 0; }
.post-time-menu summary::-webkit-details-marker { display: none; }
.post-time-menu summary:focus-visible { outline: none; background: #eef0f4; }
.post-time-menu select { position: absolute; z-index: 2; bottom: calc(100% + 6px); right: 0; max-height: var(--time-menu-height, 40vh); padding: 4px; box-shadow: 0 4px 12px #0002; }
.post-time-menu-below select { top: calc(100% + 6px); bottom: auto; }
.post-time-menu option { padding: 8px 10px; }
.post-schedule .form-hint { margin: 12px 0 0; }
@media (max-width: 480px) { .post-schedule-fields { grid-template-columns: minmax(0, 1fr); } }
/* Shared field and operation errors. Success and informational messages stay neutral. */
:is(.form-error, .field-error[role=alert], .form-messages[role=alert], .upload-error, [data-request-error], .verification-status--error, .notification--error):not(:empty) { margin-block: 16px; padding: 12px 16px; border: 1px solid #dba6a6; border-left: 4px solid #a12626; border-radius: 4px; background: #fff3f2; color: #a12626; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.form-error:empty { display: none; }
.form-error .page-message.form-error { margin: 0; padding: 0; border: 0; background: transparent; }
form :is(input, textarea, select):not(#post-publish-time):is(:user-invalid, [aria-invalid=true]),
form :is(.CodeMirror, .post-time-field, .image-picker):has([aria-invalid=true]),
form .post-time-field:has(:user-invalid),
form .image-picker:has(.upload-error),
form .EasyMDEContainer:has(.upload-error) .CodeMirror { border-color: #a12626; }
form :is(input, textarea, select):not(#post-publish-time):is(:user-invalid, [aria-invalid=true]):focus-visible,
form :is(.CodeMirror, .post-time-field):has([aria-invalid=true]):focus-within,
form .post-time-field:has(:user-invalid):focus-within { outline: 2px solid #a12626; outline-offset: 0; }
.draft-recovery { margin: 16px 0; padding: 12px 16px; background: var(--surface); border-left: 3px solid #cbd1da; }
.draft-recovery p { margin: 0; }
.draft-recovery .form-actions { margin-top: 12px; }
/* Keep short recovery messages from shrinking the editor at its scroll limit. */
.draft-status { min-height: 2lh; margin: 12px 0 0; color: var(--muted); font-size: .85em; }
.draft-status--error { color: #a12626; }
.form-messages { margin: 16px 0; font-size: .9em; }
.form-messages ul { padding-left: 20px; }

/* Site profile. Keep settings readable without changing article typography. */
.profile-editor h1 { margin-bottom: 8px; }
.profile-editor h2 { font-size: 1.2em; margin: 30px 0 6px; }
.profile-editor .form-hint { margin: 8px 0 0; }
.profile-history-bio { white-space: pre-wrap; }
.profile-history-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 24px; }
.profile-history-images figcaption { margin-bottom: 12px; font-weight: 600; }
.profile-history-images img { display: block; width: 100%; height: 160px; object-fit: contain; }
.profile-identity { margin-top: 28px; }
.profile-editor .profile-image { margin: 22px 0; padding: 20px; border-color: #dce0e6; border-radius: 6px; background: #fff; }
.profile-image legend { padding: 0 8px; font-weight: 600; }
.profile-image-row { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 20px; }
.profile-image-selection { min-width: 0; text-align: center; }
.profile-image-selection .text-button { min-height: 44px; margin-top: 4px; font-size: 14px; color: #505969; }
.profile-image-preview { min-width: 0; }
.profile-image-preview img { display: block; max-width: 100%; object-fit: contain; }
.profile-image-preview img[hidden], .profile-image-preview img:not([hidden]) + .image-empty { display: none; }
[data-image-field=imageURL] .profile-image-preview img { width: 120px; height: 120px; margin: auto; object-fit: cover; border-radius: 50%; }
[data-image-field=faviconURL] .profile-image-preview { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid #dce0e6; border-bottom: 3px solid #dce0e6; border-radius: 8px 8px 0 0; font-size: 13px; background: var(--surface); }
[data-image-field=faviconURL] .profile-image-preview img { width: 16px; height: 16px; flex: none; }
[data-image-field=backgroundURL] .profile-image-row { grid-template-columns: minmax(0, 1fr); gap: 20px; }
[data-image-field=backgroundURL] .profile-image-preview { display: grid; place-items: center; height: 180px; padding: 12px; border: 1px solid #dce0e6; border-radius: 4px; background: #fafbfc; }
[data-image-field=backgroundURL] .profile-image-preview img { width: auto; height: auto; max-height: 154px; }
.profile-image-controls { min-width: 0; }
.profile-image details { margin-top: 18px; font-size: .9em; }
.profile-image summary { width: fit-content; color: var(--muted); cursor: pointer; }
.profile-image [data-image-status] { margin: 12px 0 0; font-size: .9em; }
.profile-image [data-image-status]:empty, #profile-errors:empty { display: none; }
.profile-save { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 28px; padding-top: 24px; border-top: 1px solid #dce0e6; }
.profile-save .form-hint { margin: 0; }
@media (max-width: 767px) {
  .profile-editor .profile-image { padding: 16px; }
  .profile-image-row { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  [data-image-field=faviconURL] .profile-image-preview { width: 160px; margin: auto; }
}

/* Authentication. */
.auth-alternatives, .auth-provider, .auth-login-panel, .auth-form-panel, .auth-account, .auth-options { max-width: 440px; margin-block: 24px; font-size: 16px; line-height: 1.5; }
.auth-account { overflow-wrap: anywhere; }
.auth-account h1 { margin: 0; font-size: 1.8em; line-height: 1.2; }
.auth-account .account-email { color: var(--muted); margin: 8px 0 0; }
.auth-account .account-methods-heading { font-size: 1em; margin: 28px 0 4px; }
.auth-account .account-methods { list-style: none; padding: 0; margin: 0; }
.account-methods > li { padding: 20px 0; border-bottom: 1px solid #e1e4e8; }
.account-method-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.account-method-heading h3 { font-size: 1.15em; margin: 0; }
.account-method-status { flex: none; padding: 2px 8px; border-radius: 4px; background: #eff5f0; color: #45614c; font-size: .85em; }
.account-methods p { color: var(--muted); margin: 6px 0 0; }
.account-method-action { margin-top: 12px; }
.account-method-action > a:not(.button-secondary), .account-signout .text-button { color: #505969; text-underline-offset: .2em; }
.account-method-action > a { display: inline-flex; align-items: center; min-height: 44px; }
.account-method-action .account-action-panel { padding: 16px; border-radius: 5px; background: var(--surface); }
.account-action-panel > :first-child { margin-top: 0; }
.account-action-panel form { margin-top: 16px; }
.account-action-panel .form-error, .account-action-panel .field-error { color: #a12626; }
.auth-account .account-signout { margin-top: 28px; }
.auth-alternatives { padding-top: 16px; border-top: 1px solid #e1e3e8; }
.auth-provider-button button {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 44px; margin: 0; padding: 10px 12px;
  border: 1px solid #747775; border-radius: 4px; background: #fff; color: #1f1f1f;
  font: 500 14px/20px Arial, sans-serif;
}
.auth-provider-button button:hover { background: #f8faff; box-shadow: 0 1px 2px rgb(60 64 67 / 20%); }
.auth-provider-button :is(img, svg) { flex: none; width: 20px; height: 20px; margin: 0; object-fit: contain; }
.auth-provider-button + .auth-provider-button { margin-top: 12px; }
.auth-options { display: grid; gap: 16px; }
.auth-options a { display: block; text-align: center; }
.page-content :is(.auth-provider, .auth-login-panel, .auth-form-panel) { max-width: 400px; padding: 28px; background: #fff; }
.page-content :is(.auth-login-panel, .auth-form-panel) { max-width: 440px; }
:is(.auth-login-panel, .auth-form-panel) .auth-email-form { padding-top: 0; }
:is(.auth-login-panel, .auth-form-panel) .auth-email-form label { margin: 16px 0 6px; }
:is(.auth-login-panel, .auth-form-panel) .auth-email-form label:first-of-type { margin-top: 0; }
:is(.auth-login-panel, .auth-form-panel) .auth-email-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-top: 20px; }
:is(.auth-login-panel, .auth-form-panel) .auth-email-actions button { margin: 0; }
:is(.auth-login-panel, .auth-form-panel) .auth-email-actions a { color: var(--muted); }
.auth-form-panel .auth-introduction p { color: var(--muted); }
.auth-form-panel .form-hint { margin: 8px 0 0; }
.auth-login-panel .auth-alternatives { max-width: none; margin: 24px 0 0; padding: 0; border: 0; }
.auth-login-panel .auth-alternatives > p { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.auth-login-panel .auth-alternatives > p::before, .auth-login-panel .auth-alternatives > p::after { content: ''; flex: 1; border-top: 1px solid #e1e3e8; }
.page-content .auth-provider h1 { margin: 0 0 20px; font-size: 1.5em; line-height: 1.25; }
.page-content .auth-provider p { margin: 0 0 20px; color: var(--muted); }
.page-content .auth-provider > :last-child { margin-bottom: 0; }
.auth-introduction { margin-bottom: 24px; }
.page-content .auth-introduction h1 { margin-bottom: 10px; font-size: 1.75em; }
.page-content .auth-introduction p { margin: 0; }
.page-content .auth-introduction .auth-eyebrow { margin-bottom: 10px; font-size: .75em; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
/* Google branding: https://developers.google.com/identity/branding-guidelines */
:is(.auth-provider-button, .auth-options) .auth-google-button {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 44px; margin: 0; padding: 10px 12px;
  border: 1px solid #747775; border-radius: 4px; background: #fff; color: #1f1f1f;
  font: 500 14px/20px "Google Sans", Arial, sans-serif; text-decoration: none;
}
:is(.auth-provider-button, .auth-options) .auth-google-button:hover { background: #f8faff; border-color: #747775; box-shadow: 0 1px 2px rgb(60 64 67 / 20%); }
:is(.auth-provider-button, .auth-options) .auth-google-button:focus-visible { outline: 2px solid #1a73e8; outline-offset: 3px; }
.auth-form-footer { max-width: 440px; margin: 0; font-size: 14px; line-height: 1.5; }
.auth-form-footer a { display: inline-block; padding-block: 6px; text-underline-offset: .2em; }
.auth-email-form, #reset-request-form, #reset-password-form { max-width: 440px; margin: 0; }
.auth-email-form { padding-top: 32px; }
.setup-panel { width: min(100% - 32px, 500px); margin: 32px auto; padding: 24px; border: 1px solid #e1e3e8; border-radius: 5px; font-size: 16px; line-height: 1.5; }
.setup-panel h1 { margin: 0 0 8px; font-size: 1.75em; }
.setup-panel header p { color: #656b77; margin: 0; }
.setup-panel :is(.auth-email-form, .verification-panel) { max-width: none; }
.setup-panel .auth-email-form { padding-top: 20px; }
.setup-panel .auth-alternatives { max-width: none; margin: 18px 0 0; padding-top: 16px; }
.setup-panel .auth-alternatives p { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.setup-panel .verification-panel { padding: 0; border: 0; background: none; }
.setup-login { margin-top: 24px; }
.setup-login summary { padding-block: 10px; cursor: pointer; font-weight: 600; }
.setup-complete { margin-bottom: 28px; padding: 20px; background: #eef0f4; border-radius: 5px; }
.setup-complete h2 { margin: 0 0 16px; font-size: 1.25em; }
.setup-complete > div { display: flex; flex-wrap: wrap; gap: 12px; }
:where(.auth-email-form, #reset-request-form, #reset-password-form) {
  label { margin: 24px 0 8px; color: var(--button-bg); }
  label:first-of-type { margin-top: 0; }
  input { min-height: 46px; border-color: #cbd1da; border-radius: 6px; }
  button { min-height: 44px; min-width: 120px; margin: 28px 0 12px; border-radius: 6px; font-weight: 600; }
  button:hover { background: var(--button-hover); border-color: var(--button-hover); }
  a { display: inline-block; padding-block: 6px; font-size: .9em; text-underline-offset: .2em; }
  .form-messages:not([role=alert]) { padding: 12px 16px; border-left: 3px solid #cbd1da; background: var(--surface); }
  .form-messages ul { margin: 0; padding: 0; list-style: none; }
  .form-messages li + li { margin-top: 6px; }
  .setup-panel & {
    label { margin: 14px 0 4px; }
    label:first-of-type { margin-top: 0; }
    button { margin: 18px 0 0; }
  }
}
.verification-panel { max-width: 540px; margin: 0 auto; padding: 28px; border: 1px solid #e1e3e8; border-radius: 5px; background: #f7f8fa; }
.verification-panel h1 { font-size: 1.5em; }
.verification-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }

@media (min-width: 768px) and (max-width: 1679px) {
  .auth-email-form, .auth-form-footer, .auth-alternatives, .auth-provider, .auth-login-panel, .auth-form-panel, .auth-account, .auth-options { margin-inline: auto; }
}
@media (max-width: 767px) {
  .page-content :is(.auth-provider, .auth-login-panel, .auth-form-panel) { margin-inline: auto; }
  .page-content :is(.auth-login-panel, .auth-form-panel) { padding: 20px; }
}
@media (max-width: 767px) { .verification-panel { padding: 20px; } }

/* Editor and dialogs. */
dialog { color: inherit; border: 1px solid #d4d7df; border-radius: 6px; padding: 30px; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); overflow: auto; }
dialog::backdrop { background: rgb(20 25 35 / 55%); }
.editor-confirmation { width: 440px; font-size: 16px; line-height: 1.5; }
.editor-confirmation h2 { font-size: 1.25em; }
.editor-confirmation p { margin: 12px 0 0; }
.editor-confirmation .form-actions { justify-content: flex-end; gap: 12px; }
@media (max-width: 767px) {
  .editor-confirmation .form-actions { flex-direction: column-reverse; align-items: stretch; }
  .editor-confirmation button { min-height: 44px; }
}
.CodeMirror { font-size: 16px; }
.editor-toolbar button::before { font-family: sans-serif; font-weight: 600; }
.editor-toolbar .tool-bold::before { content: 'B'; }
.editor-toolbar .tool-italic::before { content: 'I'; font-style: italic; }
.editor-toolbar .tool-heading::before { content: 'H'; }
.editor-toolbar .tool-quote::before { content: '❞'; }
.editor-toolbar .tool-list::before { content: '≡'; }
/* Lucide SVGs, unchanged from https://github.com/lucide-icons/lucide/tree/5aae256c6479aef74c609b536d10675c97c714e3/icons. License accompanies the files. */
.editor-toolbar :is(.tool-link, .tool-image, .tool-library)::before { content: ''; display: inline-block; width: 16px; height: 16px; vertical-align: middle; transform: translateY(-1px); background-color: currentColor; mask: var(--tool-icon) center / contain no-repeat; }
.editor-toolbar .tool-link { --tool-icon: url('../lib/lucide/link.svg'); }
.editor-toolbar .tool-image { --tool-icon: url('../lib/lucide/image-up.svg'); }
.editor-toolbar .tool-library { --tool-icon: url('../lib/lucide/images.svg'); }
.editor-toolbar .tool-preview::before { content: '◉'; }

@media (max-width: 767px) { dialog { padding: 20px; } }

/* Notifications. */
/* Only success notifications expire. Without JavaScript, all messages stay visible. */
#notifications { position: fixed; bottom: 20px; right: 20px; max-width: min(420px, 90vw); display: grid; gap: 10px; z-index: 2; }
.notification:not(.notification--error) { margin: 0; padding: 12px 20px; background: var(--button-bg); color: white; border-radius: 5px; }
#notifications > :is(.notification--error, [data-request-error]) { margin: 0; }
.notification { display: flex; align-items: center; gap: 16px; overflow-wrap: anywhere; }
.notification p { margin: 0; }
.notification-dismiss { display: none; flex-shrink: 0; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 3px; font-size: 1.3em; line-height: 1; text-decoration: none; }
.notification-dismiss:hover { background: rgb(128 128 128 / 15%); }
.js .notification-dismiss { display: inline-flex; }
.js .notification--success { animation: notification-fade .25s ease 5s forwards; }
.js .notification--success:hover, .js .notification--success:focus-within { animation-play-state: paused; }
@keyframes notification-fade { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .js .notification--success { animation-duration: 1ms; } }

/* User management uses the same flat surfaces and spacing as content lists. */
.users-heading, .user-row { display: grid; grid-template-columns: minmax(0, 1fr) 9rem 9rem auto; gap: 24px; align-items: center; }
.users-heading { padding: 12px 18px; background: var(--surface); color: var(--muted); font-size: .85em; font-weight: 600; }
.users-list { list-style: none; padding: 0; margin: 0; }
.user-row { padding: 22px 18px; border-bottom: 1px solid #e1e5eb; }
.user-row > div { min-width: 0; overflow-wrap: anywhere; }
.user-row small { display: block; color: var(--muted); margin-top: 4px; font-size: .85em; }
.user-self { color: var(--muted); font-size: .8em; margin-left: 8px; }
.user-status { color: var(--muted); font-size: .9em; }
.user-editor { max-width: 760px; }
.user-editor h1 { margin-top: 20px; }
.user-role-options { border: 0; padding: 0; margin: 28px 0; }
.user-role-options legend { font-weight: 600; padding: 0; margin-bottom: 12px; }
.user-role-options label { display: flex; gap: 12px; align-items: flex-start; padding: 0; margin: 0 0 20px; cursor: pointer; }
.user-role-options input { width: 20px; height: 20px; flex-shrink: 0; margin: 4px 0 0; }
.user-role-options small { display: block; font-weight: 400; font-size: .85em; color: var(--muted); margin-top: 4px; }
.user-access-actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.user-access-actions p { flex-basis: 100%; margin: 0; }
.user-remove-link { color: #a12626; }
@media (max-width: 767px) {
  .users-heading { display: none; }
  .user-row { grid-template-columns: 1fr auto; gap: 10px 16px; padding-inline: 0; }
  .user-row > div { grid-column: 1 / -1; }
  .user-role { grid-column: 1; }
  .user-status { grid-column: 1; }
  .user-row > a { grid-column: 2; grid-row: 2 / 4; }
}

.user-role-guide { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 32px; font-size: .9em; }
.user-role-guide p { color: var(--muted); margin-top: 6px; }
@media (max-width: 767px) { .user-role-guide { grid-template-columns: 1fr; gap: 12px; } }
