/*
Theme Name: Pedantek
Description: Clean dark/light theme with an app-style top bar, a demo front page, card-grid blog, pages, search and threaded comments. Translation-ready.
Author: pedantek
Author URI: https://pedantek.org
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pedantek
Tags: dark, light, blog, portfolio, custom-logo, custom-menu, translation-ready, threaded-comments
*/


/* ══════════════════════════════════════════════════════════════════════
   GLOBAL RESET — single source of truth
══════════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ══════════════════════════════════════════════════════════════════════
   SHARED TOP BAR — single source of truth for every header bar
══════════════════════════════════════════════════════════════════════ */
:root {
  /* ═══ Shared brand tokens ═══ */
  --brand-accent:      #7f77dd;
  --brand-accent-dim:  #534ab7;
  --brand-danger:      #e24b4a;
  --brand-danger-dim:  #c43a39;
  --brand-success:     #1d9e75;

  --hdr-bg:       #0e0f11;
  --hdr-surface:  #16181c;
  --hdr-col:      #1d1f25;
  --hdr-hover:    #24272f;
  --hdr-border:   rgba(255,255,255,0.07);
  --hdr-border2:  rgba(255,255,255,0.14);
  --hdr-text:     #e8e6f0;
  --hdr-muted:    #9896a8;
  --hdr-dim:      #5c5a6b;
  --hdr-accent:   var(--brand-accent);
  --hdr-accent-s: rgba(127,119,221,0.15);
  --hdr-danger:   var(--brand-danger);
  --hdr-height:   56px;
}
html[data-app-theme="light"] {
  --brand-accent:      #6c64cc;
  --brand-accent-dim:  #4e47a0;
  --brand-danger:      #d93535;
  --brand-danger-dim:  #b82f2f;
  --brand-success:     #1a8c68;

  --hdr-bg:       #f4f3f8;
  --hdr-surface:  #ffffff;
  --hdr-col:      #f9f8fc;
  --hdr-hover:    #f0eef8;
  --hdr-border:   rgba(0,0,0,0.08);
  --hdr-border2:  rgba(0,0,0,0.15);
  --hdr-text:     #1a1828;
  --hdr-muted:    #5a5870;
  --hdr-dim:      #9896a8;
  --hdr-accent:   var(--brand-accent);
  --hdr-accent-s: rgba(108,100,204,0.12);
  --hdr-danger:   var(--brand-danger);
}

.app-topbar {
  height: var(--hdr-height);
  background: var(--hdr-surface);
  border-bottom: 1px solid var(--hdr-border);
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px; flex-shrink: 0; z-index: 40;
  font-family: 'Inter', system-ui, sans-serif;
}
/* Force the top bar to the exact same background everywhere. */
.app-topbar, #toolbar, #tm-header, header.app-topbar {
  background: var(--hdr-surface) !important;
  border-bottom: 1px solid var(--hdr-border) !important;
}

.app-switcher, .app-view-switcher { position: relative; }
.app-switcher-btn {
  display: flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 10px 0 8px;
  border-radius: 10px;
  background: var(--hdr-col); border: 0.5px solid var(--hdr-border);
  cursor: pointer; color: var(--hdr-text); font-size: 13px; font-weight: 500;
  transition: background .12s, border-color .12s;
}
.app-switcher-btn:hover { background: var(--hdr-hover); border-color: var(--hdr-border2); }
.app-switcher-btn .btn-icon {
  width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.app-switcher-btn .btn-icon i { font-size: 15px; color: var(--hdr-dim); }
.app-switcher-btn span { font-size: 13px; font-weight: 500; }
.app-switcher-btn .app-chevron, .app-switcher-btn .chevron {
  font-size: 14px; color: var(--hdr-dim); margin-left: 2px; transition: transform .18s;
}
.app-switcher-btn.open .app-chevron, .app-switcher-btn.open .chevron { transform: rotate(180deg); }

.app-switcher-dd {
  display: none; position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 220px; background: var(--hdr-surface);
  border: 0.5px solid var(--hdr-border2); border-radius: 14px;
  padding: 6px; z-index: 200; box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.app-switcher-dd.open { display: block; animation: appDdIn .14s ease; }
@keyframes appDdIn { from{opacity:0;transform:translateY(-4px)} to{opacity:1;transform:translateY(0)} }
.app-dd-item, .dd-item, .tm-dd-item, .wb-dd-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 10px; cursor: pointer;
  font-size: 13px; color: var(--hdr-muted); transition: background .1s, color .1s;
}
.app-dd-item:hover, .dd-item:hover:not(.dd-disabled), .tm-dd-item:hover, .wb-dd-item:hover { background: var(--hdr-hover); color: var(--hdr-text); }
.app-dd-item.active, .dd-item.dd-active, .tm-dd-item.active, .wb-dd-item.wb-dd-active { background: var(--hdr-accent-s); color: var(--hdr-accent); }
.app-dd-item.disabled, .dd-item.dd-disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }
.app-dd-icon, .dd-icon, .tm-dd-icon, .wb-dd-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--hdr-dim);
}
.app-dd-item.active .app-dd-icon, .dd-item.dd-active .dd-icon, .tm-dd-item.active .tm-dd-icon { color: var(--hdr-accent); }
.app-dd-text, .dd-item-text, .tm-dd-text, .wb-dd-text { flex: 1; }
.app-dd-title, .dd-item-title, .tm-dd-title, .wb-dd-title { font-weight: 500; font-size: 13px; }
.app-dd-sub, .dd-item-sub, .tm-dd-sub, .wb-dd-sub { font-size: 11px; color: var(--hdr-dim); margin-top: 1px; }
.app-dd-badge, .dd-badge, .tm-dd-badge, .wb-dd-badge { font-size: 10px; padding: 1px 6px; border-radius: 20px; background: var(--hdr-col); color: var(--hdr-dim); font-weight: 500; flex-shrink: 0; }
.app-dd-item.active .app-dd-badge, .dd-item.dd-active .dd-badge, .tm-dd-item.active .tm-dd-badge { background: var(--hdr-accent-s); color: var(--hdr-accent); }
.app-dd-sep, .dd-sep, .tm-dd-sep, .wb-dd-sep { height: 0.5px; background: var(--hdr-border); margin: 4px 0; }

.app-header-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
/* Toolbar/header pill button */
.app-hbtn, .tm-hbtn {
  display: flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: 8px;
  font-size: 12.5px; font-weight: 500; cursor: pointer;
  border: 1px solid var(--hdr-border2); background: var(--hdr-col); color: var(--hdr-muted);
  font-family: 'Inter', sans-serif; transition: background .12s, color .12s;
  white-space: nowrap;
}
.app-hbtn:hover, .tm-hbtn:hover { background: var(--hdr-hover); color: var(--hdr-text); }
.app-hbtn.primary, .tm-hbtn.primary { background: var(--hdr-accent); color: #fff; border-color: transparent; }
.app-hbtn.primary:hover, .tm-hbtn.primary:hover { opacity: .88; }
.app-hbtn i, .tm-hbtn i { font-size: 14px; }
.app-hbtn:disabled { opacity: 1; cursor: default; color: var(--hdr-dim); }
.app-hbtn:disabled:hover { background: var(--hdr-col); color: var(--hdr-dim); }
.app-hbtn.icon-only { width: 32px; padding: 0; justify-content: center; font-size: 14px; }

/* ══════════════════════════════════════════════════════════════════════
   SHARED MODAL BACKDROP / TOAST / FORM / DOT
══════════════════════════════════════════════════════════════════════ */
.app-modal-backdrop {
  display: none; position: fixed; inset: 0;
  align-items: center; justify-content: center;
}
.app-modal-backdrop.open { display: flex; }

.app-toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 9px 18px; font-size: 13px;
  opacity: 0; transition: opacity 0.2s, transform 0.2s;
  pointer-events: none; white-space: nowrap;
  border-radius: 10px; border: 1px solid transparent;
}
.app-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@keyframes appModalIn { from{opacity:0;transform:translateY(8px)scale(.98)} to{opacity:1;transform:none} }

.app-form-group { display: flex; flex-direction: column; gap: 6px; }
.app-dot-sm { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

@keyframes viewFadeIn { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:translateY(0); } }
.view-transition { animation: viewFadeIn 0.18s ease forwards; }

/* ════════════════════════════════════════════════════════════════
   PAGE-SPECIFIC STYLES — front page & demo components
═════════════════════════════════════════════════════════════════ */

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--hdr-bg); color: var(--hdr-text);
  min-height: 100vh; -webkit-font-smoothing: antialiased;
}
::selection { background: var(--brand-accent); color: #fff; }
.hidden { display: none !important; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--hdr-hover); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* This page's bar wraps to host the profile, unlike the fixed 56px bars */
.app-topbar {
  position: sticky; top: 0;
  min-height: var(--hdr-height);
  padding: 10px 16px; flex-wrap: wrap;
}
.tb-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; flex-wrap: wrap; }
.tb-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: block;
  border: 1.5px solid var(--hdr-border2); box-shadow: 0 0 0 3px var(--hdr-accent-s);
}
.tb-info { min-width: 0; }
.tb-namerow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tb-name { font-size: 14.5px; font-weight: 600; }
.handle { color: var(--hdr-accent); text-decoration: none; font-size: 12.5px; font-weight: 500; }
.handle:hover { text-decoration: underline; }
.tb-meta { display: inline-flex; align-items: center; gap: 5px; color: var(--hdr-dim); font-size: 12px; white-space: nowrap; }
.tb-bio {
  width: 100%; margin-top: 3px;
  color: var(--hdr-muted); font-size: 12.5px; line-height: 1.45;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Header skeleton (before user data arrives) */
.tb-sk { display: flex; align-items: center; gap: 12px; flex: 1; }
.tb-sk .avatar-sk { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.tb-sk .lines-sk { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.tb-sk .l1 { height: 11px; width: 180px; border-radius: 6px; }
.tb-sk .l2 { height: 9px; width: 260px; border-radius: 6px; }

/* Theme toggle icons */
.ic-sun { display: none; }
html[data-app-theme="light"] .ic-sun { display: block; }
html[data-app-theme="light"] .ic-moon { display: none; }

/* Language dropdown: right-aligned (sits at the bar's right edge),
   overriding the shared left-aligned default */
#lang-dd { left: auto; right: 0; min-width: 170px; }
html[data-app-theme="light"] #lang-dd { box-shadow: 0 8px 32px rgba(20,30,60,.14); }
.app-dd-icon svg { visibility: hidden; }
.app-dd-item.active .app-dd-icon svg { visibility: visible; }

.container { max-width: 1000px; margin: 0 auto; padding: 0 24px; }
.fade { animation: viewFadeIn 0.18s ease both; }

/* Panels */
.panel { background: var(--hdr-surface); border: 1px solid var(--hdr-border); border-radius: 14px; }

/* Languages chart */
.langs { margin-top: 24px; padding: 18px 20px; }
.panel-title { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--hdr-dim); font-weight: 500; }
.lang-row { display: flex; align-items: center; gap: 10px; margin-top: 11px; font-size: 13px; color: var(--hdr-muted); }
.lang-name { width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang-bar { flex: 1; height: 6px; background: var(--hdr-col); border-radius: 99px; overflow: hidden; }
.lang-bar i { display: block; height: 100%; border-radius: 99px; transition: width .5s ease; }
.lang-count { width: 26px; text-align: right; color: var(--hdr-dim); font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* Toolbar */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin: 28px 0 14px; }
.toolbar h2 { font-size: 16px; font-weight: 600; display: flex; align-items: center; }
.count-badge {
  display: inline-grid; place-items: center; min-width: 24px; height: 20px; padding: 0 8px;
  margin-left: 8px; border-radius: 20px; background: var(--hdr-accent-s);
  color: var(--hdr-accent); font-size: 11px; font-weight: 500;
}
.controls { display: flex; gap: 8px; }
input, select {
  background: var(--hdr-col); border: 1px solid var(--hdr-border);
  color: var(--hdr-text); border-radius: 8px; padding: 8px 12px;
  font: inherit; font-size: 13px; outline: none;
  transition: border-color .12s, box-shadow .12s;
}
input::placeholder { color: var(--hdr-dim); }
input:focus, select:focus { border-color: var(--hdr-accent); box-shadow: 0 0 0 3px var(--hdr-accent-s); }
input { width: 220px; }

/* Project grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.card {
  background: var(--hdr-surface); border: 1px solid var(--hdr-border); border-radius: 14px;
  padding: 16px; display: flex; flex-direction: column; gap: 8px;
  animation: viewFadeIn 0.18s ease both;
  transition: border-color .15s, transform .15s, box-shadow .15s, background .15s;
  color: inherit; text-decoration: none; cursor: pointer;
}
.card:hover, .card:focus-visible {
  border-color: var(--hdr-accent);
  background: var(--hdr-hover);
  box-shadow: 0 0 0 3px var(--hdr-accent-s);
  transform: translateY(-2px);
  outline: none;
}
.card:hover h3 { color: var(--hdr-accent); }
.card h3 { font-size: 14px; font-weight: 600; line-height: 1.4; transition: color .15s; }
.desc {
  color: var(--hdr-muted); font-size: 12.5px; line-height: 1.55; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.readme {
  color: var(--hdr-muted); font-size: 12.5px; line-height: 1.55; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
.readme.sk { flex: 0 0 auto; min-height: 58px; border-radius: 6px; }
.no-desc { color: var(--hdr-dim); font-style: italic; }
.topics { display: flex; gap: 6px; flex-wrap: wrap; }
.topic {
  font-size: 11px; padding: 2px 8px; border-radius: 20px;
  background: var(--hdr-col); border: 1px solid var(--hdr-border); color: var(--hdr-dim);
}
.foot {
  display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--hdr-dim);
  margin-top: auto; padding-top: 10px; border-top: 1px solid var(--hdr-border);
}
.foot span { display: inline-flex; align-items: center; gap: 4px; }
.updated { margin-left: auto; }
.empty { text-align: center; color: var(--hdr-dim); padding: 44px 0; font-size: 13px; }

/* Load more */
.load-more-row { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 22px 0 8px; }
.showing { font-size: 12px; color: var(--hdr-dim); }

/* Skeletons */
.sk { position: relative; overflow: hidden; background: var(--hdr-col); border-radius: 14px; }
.sk::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent);
  animation: shimmer 1.4s infinite;
}
html[data-app-theme="light"] .sk::after { background: linear-gradient(90deg, transparent, rgba(0,0,0,.04), transparent); }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.langs-sk { height: 90px; margin-top: 24px; }
.sk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 28px; }
.card-sk { height: 150px; }

/* Error */
.error-box { text-align: center; padding: 90px 20px; color: var(--hdr-muted); font-size: 13.5px; }
.error-box h2 { color: var(--hdr-text); font-size: 16px; margin-bottom: 10px; font-weight: 600; }
.error-box .app-hbtn { margin: 20px auto 0; }

/* Narrow screens: drop bio/meta from the bar, keep identity */
@media (max-width: 720px) {
  .tb-bio, .tb-meta { display: none; }

  /* Mobile fix: force the top bar into a single row so the back and
     theme buttons stay inside the bar, next to avatar + name. */
  .app-topbar {
    flex-wrap: nowrap;
    gap: 8px;
    padding: 10px 12px;
  }
  .tb-left {
    flex-wrap: nowrap;
    gap: 10px;
  }
  .tb-namerow {
    flex-wrap: nowrap;
    gap: 8px;
  }
  /* Tagline out of the bar on phones (same design rule as bio/meta) */
  .handle-text { display: none; }

  /* Long site names shrink with an ellipsis instead of wrapping */
  .tb-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Buttons and their container never shrink or wrap away */
  .app-topbar > .app-hbtn,
  .app-header-right,
  .app-header-right .app-hbtn {
    flex-shrink: 0;
  }
}


/* ════════════════════════════════════════════════════════════════
   WORDPRESS-SPECIFIC STYLES
═════════════════════════════════════════════════════════════════ */

/* Skip link / screen-reader text (required by WP) */
.screen-reader-text {
  border: 0; clip-path: inset(50%); height: 1px; width: 1px;
  margin: -1px; overflow: hidden; padding: 0; position: absolute;
  word-wrap: normal !important;
}
.skip-link:focus, .screen-reader-text:focus {
  clip-path: none; width: auto; height: auto; position: fixed;
  top: 12px; left: 12px; background: var(--hdr-accent); color: #fff;
  padding: 8px 14px; border-radius: 8px; z-index: 100000;
  font-size: 13px; font-weight: 500;
}

/* Sticky topbar under the WP admin bar */
body.admin-bar .app-topbar { top: 32px; }
@media screen and (max-width: 782px) { body.admin-bar .app-topbar { top: 46px; } }

.site-main { padding-top: 8px; padding-bottom: 48px; min-height: 60vh; }

/* Header identity */
a.tb-name { color: var(--hdr-text); text-decoration: none; }
a.tb-name:hover { color: var(--hdr-accent); }
.handle-text { color: var(--hdr-accent); font-size: 12.5px; font-weight: 500; }
.tb-avatar { object-fit: cover; }

/* Header menu dropdown (reuses the app-switcher pattern) */
.app-switcher-dd .app-menu { list-style: none; margin: 0; padding: 0; }
.app-switcher-dd .app-menu a {
  display: block; padding: 8px 10px; border-radius: 10px;
  font-size: 13px; color: var(--hdr-muted); text-decoration: none;
  transition: background .1s, color .1s;
}
.app-switcher-dd .app-menu a:hover { background: var(--hdr-hover); color: var(--hdr-text); }
.app-switcher-dd .app-menu .current-menu-item > a,
.app-switcher-dd .app-menu .current_page_item > a {
  background: var(--hdr-accent-s); color: var(--hdr-accent);
}

/* ── Post cards (blog home / archives / search) ── */
.post-card h3 a { color: inherit; text-decoration: none; }
.post-card.sticky { border-color: var(--hdr-accent); }
.post-thumb { display: block; margin: -2px -2px 2px; }
.post-thumb img { width: 100%; height: 150px; object-fit: cover; border-radius: 10px; display: block; }
.post-card .desc { margin: 0; }

/* ── Single posts & pages ── */
.prose-panel { max-width: 800px; margin: 24px auto 0; padding: 26px 30px; }
.entry-header { margin-bottom: 16px; }
.entry-title { font-size: 21px; font-weight: 700; line-height: 1.3; color: var(--hdr-text); }
.entry-meta {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px;
  font-size: 12px; color: var(--hdr-dim);
}
.entry-meta a { color: var(--hdr-muted); text-decoration: none; }
.entry-meta a:hover { color: var(--hdr-accent); }
.entry-image { width: 100%; height: auto; border-radius: 12px; margin: 2px 0 16px; display: block; }

.entry-content { color: var(--hdr-muted); font-size: 14.5px; line-height: 1.75; word-wrap: break-word; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5, .entry-content h6 {
  color: var(--hdr-text); font-weight: 600; line-height: 1.3; margin: 1.7em 0 .55em;
}
.entry-content h1 { font-size: 19px; }
.entry-content h2 { font-size: 17px; }
.entry-content h3 { font-size: 15.5px; }
.entry-content h4, .entry-content h5, .entry-content h6 { font-size: 14px; }
.entry-content p { margin: 0 0 1em; }
.entry-content a { color: var(--hdr-accent); }
.entry-content a:hover { text-decoration: underline; }
.entry-content ul, .entry-content ol { margin: 0 0 1em 1.5em; }
.entry-content li { margin: 0 0 .35em; }
.entry-content blockquote {
  margin: 0 0 1em; padding: 12px 16px;
  border-left: 3px solid var(--hdr-accent);
  background: var(--hdr-col); border-radius: 0 10px 10px 0;
  font-style: italic;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content pre {
  background: var(--hdr-col); border: 1px solid var(--hdr-border);
  border-radius: 10px; padding: 14px 16px; overflow-x: auto;
  font-size: 13px; line-height: 1.6; margin: 0 0 1em;
}
.entry-content code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.entry-content :not(pre) > code {
  background: var(--hdr-col); border: 1px solid var(--hdr-border);
  border-radius: 6px; padding: 1px 6px; color: var(--hdr-accent);
}
.entry-content img { max-width: 100%; height: auto; border-radius: 10px; }
.entry-content figure { margin: 0 0 1em; }
.entry-content figcaption, .wp-caption-text {
  font-size: 12px; color: var(--hdr-dim); text-align: center; margin-top: 6px;
}
.entry-content hr { border: 0; border-top: 1px solid var(--hdr-border); margin: 2em 0; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 0 0 1em; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--hdr-border); padding: 8px 10px; text-align: left; }
.entry-content th { background: var(--hdr-col); color: var(--hdr-text); font-weight: 600; }
.entry-footer { margin-top: 16px; }
.entry-footer .topic a { color: inherit; text-decoration: none; }
.entry-footer .topic a:hover { color: var(--hdr-accent); }
.page-links { margin-top: 12px; font-size: 13px; }
.page-links a { color: var(--hdr-accent); text-decoration: none; padding: 0 4px; }

/* Fix original `input { width:220px }` for non-filter inputs */
input[type="checkbox"], input[type="radio"],
input[type="submit"], input[type="button"], input[type="reset"] { width: auto; }
textarea {
  background: var(--hdr-col); border: 1px solid var(--hdr-border);
  color: var(--hdr-text); border-radius: 8px; padding: 10px 12px;
  font: inherit; font-size: 13px; outline: none; width: 100%;
  transition: border-color .12s, box-shadow .12s; resize: vertical;
}
textarea:focus { border-color: var(--hdr-accent); box-shadow: 0 0 0 3px var(--hdr-accent-s); }

/* Search form */
.search-form { display: flex; gap: 8px; align-items: center; }
.search-form input[type="search"] { width: auto; flex: 1 1 180px; }

/* Pagination */
.navigation.pagination { margin-top: 28px; }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--hdr-border2); background: var(--hdr-col);
  color: var(--hdr-muted); font-size: 13px; text-decoration: none;
  transition: background .12s, color .12s;
}
.page-numbers:hover { background: var(--hdr-hover); color: var(--hdr-text); }
.page-numbers.current { background: var(--hdr-accent); color: #fff; border-color: transparent; }
.page-numbers.dots { border: 0; background: transparent; }

/* Prev / next post links */
.post-navigation { margin-top: 20px; }
.post-navigation .nav-links { justify-content: space-between; }
.nav-previous a, .nav-next a {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--hdr-border2); background: var(--hdr-col);
  color: var(--hdr-muted); font-size: 13px; text-decoration: none;
  transition: background .12s, color .12s;
}
.nav-previous a:hover, .nav-next a:hover { background: var(--hdr-hover); color: var(--hdr-text); }
.nav-previous a span, .nav-next a span {
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Comments */
.comments-area { max-width: 800px; margin: 28px auto 0; }
.comments-title { margin-bottom: 14px; }
.comment-reply-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--hdr-dim); font-weight: 500;
}
.comment-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.comment-list .children { list-style: none; margin: 12px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; }
.comment-body {
  background: var(--hdr-surface); border: 1px solid var(--hdr-border);
  border-radius: 14px; padding: 14px 16px;
}
.bypostauthor > .comment-body { border-color: var(--hdr-accent); }
.comment-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--hdr-dim); }
.comment-meta img { border-radius: 50%; }
.comment-author a, .comment-metadata a { color: var(--hdr-muted); text-decoration: none; }
.comment-author a:hover, .comment-metadata a:hover { color: var(--hdr-accent); }
.comment-content { margin-top: 8px; font-size: 13.5px; line-height: 1.65; color: var(--hdr-muted); }
.comment-content a { color: var(--hdr-accent); }
.reply { margin-top: 8px; }
.reply a, .comment-edit-link {
  display: inline-flex; height: 26px; align-items: center; padding: 0 10px;
  border-radius: 7px; border: 1px solid var(--hdr-border2);
  font-size: 11.5px; color: var(--hdr-muted); text-decoration: none;
}
.reply a:hover, .comment-edit-link:hover { background: var(--hdr-hover); color: var(--hdr-text); }
.comment-respond { margin-top: 22px; }
.comment-form p { margin: 0 0 14px; }
.comment-form label { display: block; font-size: 12px; color: var(--hdr-dim); margin-bottom: 6px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] { width: 100%; }
.comment-form input[type="submit"] {
  display: inline-flex; align-items: center; height: 34px; padding: 0 16px;
  border: none; border-radius: 8px; cursor: pointer;
  background: var(--hdr-accent); color: #fff;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
  transition: opacity .12s;
}
.comment-form input[type="submit"]:hover { opacity: .88; }
.comment-notes, .logged-in-as { font-size: 12px; color: var(--hdr-dim); }
.logged-in-as a { color: var(--hdr-muted); }

/* 404 */
.notfound-search { margin: 20px auto 0; max-width: 340px; }

/* Footer */
.footer-widgets { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 36px; }
.footer-widgets .widget { flex: 1 1 220px; }
.site-footer { border-top: 1px solid var(--hdr-border); margin-top: 40px; padding: 34px 0 42px; }

.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 28px; flex-wrap: wrap;
}

/* Brand column (left) */
.footer-brand { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* Logo frame: white box with thin border; the logo sits centered inside,
   slightly smaller than the box, so the white mat and border stay visible
   around it. Box stays white in dark mode (logos assume light bg). */
.footer-logo {
  width: 120px; height: 64px; flex-shrink: 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 6px;
  padding: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.footer-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 4px; /* same rounded style as the box, proportionally smaller */
}

.footer-identity { display: flex; flex-direction: column; gap: 8px; }
.footer-site-name {
  font-size: 28px; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em;
  color: var(--hdr-text); text-decoration: none;
  transition: opacity .12s;
}
.footer-site-name:hover { opacity: .85; }
.footer-tagline { font-size: 15px; color: var(--hdr-muted); margin: 0; line-height: 1.4; }

/* Menu column (right) — vertical list */
.footer-nav { flex-shrink: 0; }
.footer-menu {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 14px;
}
.footer-menu a {
  font-size: 15px; color: var(--hdr-text); text-decoration: none;
  transition: color .12s;
}
.footer-menu a:hover { color: var(--hdr-accent); }

/* Optional credit line (only when set in the Customizer) */
.footer-credit {
  font-size: 12px; color: var(--hdr-dim); margin: 26px 0 0;
  border-top: 1px solid var(--hdr-border); padding-top: 14px;
}

/* Narrow screens: brand on top, menu below */
@media (max-width: 720px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ════════════════════════════════════════════════════════════════
   MOBILE CARD GRID FIX — last in file so nothing overrides it.
   Below 720px: single column that always equals the available width
   (minmax(0, 1fr) removes the 300px minimum that made cards
   overflow the screen edge). PC/tablet untouched.
═════════════════════════════════════════════════════════════════ */
@media (max-width: 720px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
  .grid,
  .sk-cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .card {
    min-width: 0;
  }
}


/* ════════════════════════════════════════════════════════════════
   DEMO FRONT PAGE
═════════════════════════════════════════════════════════════════ */
.demo-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.demo-actions .app-hbtn { text-decoration: none; }
.card:not(a) { cursor: default; }
