[hidden], dialog:not([open]) { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
body[data-theme="light"] { color-scheme: only light; }
body[data-theme="dark"] { color-scheme: only dark; }
body:not(.animate-reveals) .reveal { opacity: 1; transform: none; }
.logo { min-width: 0; }
.sidebar { border-left: 0; width: min(250px, 90vw); height: 100dvh; transform: translateX(100%); transition-property: transform; overflow-y: auto; overscroll-behavior-y: contain; }
.sidebar.open { transform: translateX(0); border-left: 4px solid var(--accent); }
.sidebar a[aria-current="page"] { color: var(--primary); border-inline-start: 4px solid var(--primary); background: rgba(74, 20, 140, .05); }
.sidebar .close-btn, .close-search { border: 0; background: transparent; line-height: 1; min-width: 44px; min-height: 44px; }
.sidebar .theme-btn { min-height: 44px; }
.sidebar .theme-amoled { margin-block-start: .55rem; border: 1px solid var(--border-color); }
.sidebar .reaction-sound-toggle { margin-block-start: .55rem; border: 1px solid var(--border-color); }
.sidebar .theme-amoled[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
@media (hover: hover) { .sidebar .theme-amoled[aria-pressed="true"]:hover { color: #fff; } }
dialog.search-overlay { border: 0; inset: 0; max-width: none; max-height: none; margin: 0; opacity: 1; visibility: visible; transform: none; color: white; }
.search-input-large:focus-visible { outline-offset: 2px; }
.search-box { min-height: 0; display: flex; flex-direction: column; align-items: center; }
.search-results-large { overscroll-behavior: contain; min-height: 0; }
.search-feedback { color: #e0d8e8; text-align: center; font-family: Cairo, sans-serif; }
.category-description a, .post-title a, .text-body a, .post-actions a { color: var(--primary); }
.post-category { margin-block: -.65rem 1.1rem; }
.post-category a { color: var(--primary); font-size: .9rem; }
.content-box { overflow-wrap: anywhere; scroll-margin-top: 100px; }
body[data-page="post"] #posts { margin-block-start: clamp(2rem, 5vw, 4rem); }
.post-title { display: flex; align-items: baseline; gap: .55em; text-align: start; color: var(--primary); }
.content-box > .post-title { margin-block-end: 1.2rem; font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.55; }
.post-title > i { flex: none; font-size: .72em; }
.reading-credit {
  position: absolute;
  inset-block-start: 100%;
  inset-inline-end: 5%;
  max-inline-size: 90%;
  overflow-wrap: anywhere;
  padding: .12rem .65rem;
  border: 1px solid var(--border-color);
  border-radius: 0 0 .5rem .5rem;
  background: var(--white);
  color: var(--text-color);
  font: .78rem/1.6 Cairo, sans-serif;
  pointer-events: none;
}
.post-credit {
  color: var(--text-color);
  text-align: start;
  font: .85rem/1.8 Cairo, sans-serif;
}
.post-cover, .text-body img { max-width: 100%; height: auto; border-radius: 10px; }
.post-cover { display: block; max-height: 480px; margin: 0 auto 1.25rem; object-fit: contain; }
.text-body p, .text-body ul, .text-body ol, .text-body blockquote { margin-block: 0 1em; }
.text-body ul, .text-body ol { padding-inline-start: 1.6em; }
.text-body h2, .text-body h3, .text-body h4, .text-body h5, .text-body h6 { margin-block: 1.2em .5em; display: block; }
.text-body blockquote { border-inline-start: 3px solid var(--accent); padding-inline-start: 1em; }
.post-meta, .reaction-status, .loading-notice { font: 0.9rem/1.8 Cairo, sans-serif; }
.post-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: .45rem .9rem; margin-block: 1rem .45rem; border-inline-start: 2px solid var(--accent); padding-inline-start: .75rem; text-align: start; }
.post-date { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: .45em; }
.post-date i, .post-pinned { color: var(--primary); }
.inline-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.inline-controls button, .action-btn { border: 1px solid var(--primary); background: var(--btn-bg, var(--white)); color: var(--btn-text, var(--text-color)); border-radius: .55rem; padding: .55rem .9rem; cursor: pointer; font: 600 .9rem/1.65 Cairo, sans-serif; min-height: 44px; }
.inline-controls button:hover, .action-btn:hover { background: var(--primary); color: var(--bg-color); }
button:disabled { cursor: wait; opacity: .55; }
.interaction-bar { align-items: center; flex-wrap: wrap; gap: .5rem; }
.reaction-status:empty { display: none; }
.like-btn { min-height: 44px; }
.like-btn i { min-width: 1.4rem; }
#post-heading { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  header .logo { font-size: clamp(1rem, 4.4vw, 1.4rem); gap: 6px; }
  .header-icons { gap: 6px; }
  .icon-btn, .menu-btn { padding: 8px; min-width: 44px; min-height: 44px; }
  .page-header { padding: 3.5rem 1rem 2.5rem; margin-bottom: 2rem; }
  .page-header h1 { font-size: clamp(1.9rem, 8vw, 3rem); }
  .page-header p { font-size: 1.22rem; }
  .content-box { padding: 1.3rem; text-align: start; }
  .content-box h2 { font-size: 1.7rem; }
  .text-body { font-size: 1.18rem; line-height: 2; }
  dialog.search-overlay { padding-top: 90px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
#posts { scroll-margin-top: 100px; }
.visitor-check { inset: 0; margin: auto; width: min(92vw, 440px); max-width: none; padding: 1rem; background: var(--white); color: var(--text-color); border: 1px solid var(--primary); border-radius: 12px; }
.visitor-check::backdrop { background: #111a; }

[data-accent="copper"] { --accent: #d4834a; }
[data-accent="lavender"] { --accent: #9973da; }
[data-reading-size="large"] .text-body { font-size: 1.6rem; }
@media (max-width: 600px) {
  [data-reading-size="large"] .text-body { font-size: 1.4rem; }
}

.post-subtitle { color: var(--primary); font-family: 'Amiri', serif; font-size: 1.45rem; line-height: 1.6; margin-block-end: .65em; }
.post-summary { opacity: .87; margin-block: .5em 1em; padding-inline-start: 1em; border-inline-start: 3px solid var(--accent); }
.text-body [data-align="left"] { text-align: left; }
.text-body [data-align="right"] { text-align: right; }
.text-body [data-align="center"] { text-align: center; }
.text-body [data-align="justify"] { text-align: justify; }
.text-body figure { margin: 1.25em auto; }
.text-body figcaption { font: .9rem/1.7 Cairo, sans-serif; opacity: .85; }
[data-category-color="amber"] { --category-tone: #a65d08; }
[data-category-color="plum"] { --category-tone: #754192; }
[data-category-color="teal"] { --category-tone: #197364; }
[data-category-color="rose"] { --category-tone: #a84657; }
[data-theme="dark"] [data-category-color="amber"] { --category-tone: #ffc666; }
[data-theme="dark"] [data-category-color="plum"] { --category-tone: #d4a4ff; }
[data-theme="dark"] [data-category-color="teal"] { --category-tone: #8adbc7; }
[data-theme="dark"] [data-category-color="rose"] { --category-tone: #ffa4b8; }
.post-title i[data-category-color], .sidebar i[data-category-color] { color: var(--category-tone, var(--accent)); }
.home-catalog { margin-block: 3rem; }
.home-category { padding: .3rem .85rem; border: 1px solid var(--category-tone, var(--accent)); border-radius: 1rem; color: var(--text-color); }
.home-catalog .service-card a { color: inherit; }
.home-catalog .service-card .post-title a { color: var(--primary); }
.public-share { margin-inline-start: auto; }
.traffic-preference { background: transparent; color: inherit; border: 0; margin-block-start: .6em; text-decoration: underline; min-height: 44px; cursor: pointer; font: inherit; font-size: .85rem; }
.deployment-notice { padding: .45rem 1rem; background: #fff0ca; color: #342318; font: .9rem/1.55 Cairo, sans-serif; text-align: center; }
