/* Sections, language links and tool buttons after the move to static pages. */

a.language-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

button.tool-option {
  font: inherit;
  color: inherit;
  text-align: left;
}

.tool-option[aria-pressed="true"] {
  border-color: rgba(99, 255, 171, 0.3);
  background: rgba(99, 255, 171, 0.06);
}

/* The lab-only nav item is hidden on the <li> so it leaves no gap. */
body.lab-mode .nav-list li[data-lab-only="true"] {
  display: list-item !important;
}

/* Without JavaScript, a #hash link still shows its section. */
.content-section:target {
  display: block;
}

.site-main:has(.content-section:target) .content-section.visible:not(:target) {
  display: none;
}

body.js .content-section:target:not(.visible) {
  display: none;
}

.content-section h2:focus,
.content-section:focus {
  outline: none;
}

.topbar-title {
  margin: 0;
}

/* ---------- Wall ---------- */

.wall-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.wall-filters[hidden] {
  display: none;
}

.wall-filter {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.wall-filter:hover {
  color: var(--text);
  border-color: rgba(99, 255, 171, 0.2);
}

.wall-filter[aria-pressed="true"] {
  color: #041008;
  background: linear-gradient(135deg, rgba(99, 255, 171, 0.9) 0%, rgba(42, 191, 115, 0.92) 100%);
  border-color: transparent;
}

.wall-filter:focus-visible,
.wall-title a:focus-visible,
.tool-option:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wall-filter-divider {
  width: 1px;
  height: 22px;
  margin: 0 4px;
  background: rgba(255, 255, 255, 0.12);
}

.wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.wall-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.022);
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.wall-card[hidden] {
  display: none;
}

.wall-card:hover {
  border-color: rgba(99, 255, 171, 0.16);
  background: var(--panel-hover);
}

.wall-card.is-pinned {
  border-color: rgba(99, 255, 171, 0.2);
  background:
    linear-gradient(160deg, rgba(99, 255, 171, 0.07), rgba(99, 255, 171, 0) 60%),
    rgba(255, 255, 255, 0.022);
}

@media (min-width: 1181px) {
  .wall-grid .wall-card.is-pinned {
    grid-column: span 2;
  }
}

.wall-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.wall-date {
  margin-left: auto;
  letter-spacing: 0.06em;
}

.wall-type {
  color: var(--cyan);
}

.wall-status,
.wall-pinned,
.wall-lang {
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.wall-status-active {
  color: var(--accent);
  border-color: rgba(99, 255, 171, 0.3);
}

.wall-status-shipped {
  color: var(--warning);
  border-color: rgba(216, 255, 123, 0.28);
}

.wall-status-archived {
  color: var(--text-muted);
}

.wall-pinned {
  color: var(--text);
}

.wall-title {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.wall-title a {
  color: var(--text);
  text-decoration: none;
  border-radius: 4px;
}

.wall-title a:hover {
  color: var(--accent);
}

.wall-summary {
  color: var(--text-soft);
  line-height: 1.5;
  font-size: 0.9rem;
}

.wall-card-bottom {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.wall-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
}

.wall-tags .cert-tag {
  min-height: 26px;
  font-size: 0.74rem;
}

.wall-lang {
  color: var(--text-muted);
  min-height: 26px;
}

.wall-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wall-actions .text-link {
  margin-top: 0;
  min-height: 38px;
  font-size: 0.84rem;
}

.wall-empty {
  padding: 20px;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  color: var(--text-soft);
}

.wall-empty[hidden] {
  display: none;
}

/* ---------- Latest items on the home page ---------- */

/* Fills the free cell next to the last focus card. */
.latest-panel {
  justify-content: flex-start;
}

.latest-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.latest-heading .text-link {
  margin-top: 0;
  min-height: 36px;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.latest-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.wall-card-compact {
  padding: 10px 14px;
  gap: 4px;
  border-radius: 14px;
}

.wall-card-compact .wall-title {
  font-size: 0.9rem;
}

.latest-panel .wall-card-compact .wall-title {
  margin-top: 0;
}

.wall-card-compact .wall-card-top {
  font-size: 0.64rem;
}

/* ---------- Post page ---------- */

.post-article {
  max-width: 760px;
}

.post-back {
  margin-top: 0;
  margin-bottom: 18px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.post-body {
  margin-top: 26px;
  color: var(--text-soft);
  line-height: 1.7;
  font-size: 1rem;
}

.post-body > * + * {
  margin-top: 1em;
}

.post-body h2,
.post-body h3 {
  color: var(--text);
  margin-top: 1.6em;
  letter-spacing: -0.02em;
}

.post-body a {
  color: var(--accent);
}

.post-body ul,
.post-body ol {
  padding-left: 1.4em;
}

.post-body code {
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.post-body pre {
  padding: 16px;
  border-radius: 12px;
  background: rgba(4, 14, 9, 0.82);
  overflow-x: auto;
}

.post-body pre code {
  padding: 0;
  background: none;
}

.post-body blockquote {
  padding-left: 16px;
  border-left: 3px solid rgba(99, 255, 171, 0.4);
}

@media (max-width: 560px) {
  .latest-heading {
    flex-direction: column;
  }

  .wall-grid {
    grid-template-columns: 1fr;
  }
}

.section-heading h1 {
  margin-top: 10px;
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  line-height: 1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
