/*
 * Theme Name: My Timber 2.x Starter Theme
 * Description: Starter Theme to use with Timber
 * Author: Upstatement and YOU!
 */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-strong: #eef2f7;
  --text: #000000;
  --muted: #374151;
  --border: #0000001a;
  --primary: #000000;
  --primary-strong: #1a1a1a;
  --accent: #645ff6;
  --accent-strong: #514bf0;
  --pill: #ffffff;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  --radius-lg: 16px;
  --radius-xl: 28px;
  --container: 1200px;
}

* {
  box-sizing: border-box;
}

body.flexus-body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

main#content {
  padding-top: 4.5rem;
  width: 100%;
  display: block;
}

html.dark-mode {
  --bg: #000000;
  --surface: #0b0b0b;
  --surface-strong: #1a1a1a;
  --text: #ffffff;
  --muted: #cbd5e1;
  --border: #ffffff1a;
  --primary: #ffffff;
  --primary-strong: #e5e5e5;
  --accent: #8b86ff;
  --accent-strong: #c9c7ff;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100% - 48px, var(--container));
  margin: 0 auto;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: 100%;
  height: 4.5rem;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

body.admin-bar .site-header {
  top: 32px;
}

html.dark-mode .site-header {
  background: #000000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  height: 28px;
  width: auto;
}

.brand-logo--dark {
  display: none;
}

.brand-blog {
  margin-left: -20px;
  color: var(--accent-strong);
  font-size: 17px;
  font-weight: bold;
}

html.dark-mode .brand-logo--light {
  display: none;
}

html.dark-mode .brand-logo--dark {
  display: inline-block;
}

.site-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-list {
  display: none;
  list-style: none;
  gap: 2.375rem;
  padding: 0 20px;
  height: 2rem;
  margin: 0;
  background: linear-gradient(0deg, rgba(200, 216, 229, 0.05) 0%, rgba(128, 156, 191, 0.05) 100%);
  border-radius: 1.875rem;
  border: 1px solid #ffffff;
  align-items: center;
}

html.dark-mode .nav-list {
  background: rgba(255, 255, 255, 0.04);
  border-color: #a0bbdc10;
}

.nav-link {
  display: inline-flex;
  padding: 0.15rem 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
  color: var(--accent-strong);
  background: transparent;
}

html.dark-mode .nav-link:hover {
  background: transparent;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-burger {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 60;
}

.mobile-menu-open .header-burger {
  z-index: 110;
}

.header-burger__icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 24px;
  height: 18px;
  position: relative;
}

.header-burger__icon span {
  width: 24px;
  height: 2px;
  background: var(--text);
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.header-burger__icon span:nth-child(1) {
  top: 0;
}

.header-burger__icon span:nth-child(2) {
  top: 8px;
}

.header-burger__icon span:nth-child(3) {
  top: 16px;
}

.mobile-menu-open .header-burger__icon span:nth-child(1) {
  top: 8px;
  transform: rotate(45deg);
}

.mobile-menu-open .header-burger__icon span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-open .header-burger__icon span:nth-child(3) {
  top: 8px;
  transform: rotate(-45deg);
}

.header-mobile {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 7rem 1.5rem 2rem;
  gap: 2rem;
  z-index: 100;
  width: 100%;
  height: 100vh;
  overflow-y: auto;
}

.header-mobile__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  padding-top: 4.25rem;
}

.header-mobile__link {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.header-mobile__link:hover {
  opacity: 0.7;
}

.header-mobile__cta {
  margin-top: auto;
  width: 100%;
  justify-content: center;
}

html.dark-mode .header-mobile {
  background: #1a1a1a;
}

.mobile-menu-open .header-mobile {
  display: flex;
}

.theme-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 70px;
  height: 36px;
  padding: 3px;
  border-radius: 400px;
  background: #ececec;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.theme-switch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-switch__handle {
  position: absolute;
  left: 3px;
  width: 30px;
  height: 30px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: left 0.3s ease;
}

.theme-switch__icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.theme-switch__icon svg {
  width: 16px;
  height: 16px;
}

.theme-switch__icon--moon {
  opacity: 1;
}

.theme-switch--dark .theme-switch__handle {
  left: calc(100% - 33.5px);
}

.theme-switch--dark .theme-switch__icon--sun {
  opacity: 1;
}

.theme-switch--dark .theme-switch__icon--moon {
  opacity: 0;
}

html.dark-mode .theme-switch {
  background: #4f4f4f;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background: var(--primary);
  color: #ffffff;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow);
}

.cta-button:hover {
  transform: translateY(-1px);
  background: var(--primary-strong);
}

html.dark-mode .cta-button {
  color: #000000;
}

.hero {
  background: radial-gradient(circle at top, rgba(49, 167, 240, 0.25), transparent 55%),
    linear-gradient(0deg, rgba(100, 95, 246, 0.08), rgba(152, 211, 248, 0.08)),
    linear-gradient(180deg, var(--surface) 0%, #ffffff 100%);
  padding: 96px 0 72px;
  border-bottom: 1px solid var(--border);
  width: 100%;
}

html.dark-mode .hero {
  background: radial-gradient(circle at top, rgba(91, 197, 255, 0.15), transparent 55%),
    linear-gradient(180deg, #000000 0%, #0b0b0b 100%);
}

.hero-inner {
  text-align: center;
  margin: 0 auto;
  max-width: 720px;
}

.hero-eyebrow {
  margin: 0 0 12px;
  font-family: "Azeret Mono", monospace;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--muted);
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 16px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2.6rem, 3vw + 1.8rem, 4rem);
  line-height: 1.05;
}

.hero-subtitle {
  margin: 0 auto;
  max-width: 640px;
  font-size: 1.1rem;
  color: var(--muted);
}

.page-title {
  text-align: center;
  margin: 40px auto 0;
  font-family: "Manrope", sans-serif;
}

.filter-bar {
  position: sticky;
  top: 4.5rem;
  z-index: 40;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  margin-top: 20px;
  width: 100%;
}

body.admin-bar .filter-bar {
  top: calc(4.5rem + 32px);
}

html.dark-mode .filter-bar {
  background: rgba(0, 0, 0, 0.96);
}

.filter-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 0;
}

.posts {
  background: #ffffff;
  width: 100%;
}

html.dark-mode .posts {
  background: #000000;
}

.posts .container {
  position: relative;
}

html.dark-mode .posts .container::before {
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
}

.post-grid {
  position: relative;
  z-index: 1;
}

.topic-pills {
  display: flex;
  gap: 8px;
  position: relative;
  align-items: center;
  overflow: hidden;
  flex-wrap: nowrap;
  padding-right: 36px;
}

.topic-pills::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 56px;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.98) 100%);
  pointer-events: none;
}

.pill {
  white-space: nowrap;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: #4b5563;
  border: 1px solid transparent;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

html.dark-mode .pill {
  background: #2a2b30;
  color: #cbd5e1;
  border-color: transparent;
}

.pill:hover {
  background: #e5e7eb;
  color: #1f2937;
  border-color: #e5e7eb;
}

html.dark-mode .pill:hover {
  background: #4b4d54;
  color: #ffffff;
  border-color: #4b4d54;
}

html.dark-mode .pill-active {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.pill-active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

html.dark-mode .topic-pills::after {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.96) 100%);
}

.topic-select {
  display: none;
  width: 100%;
  max-width: 320px;
  position: relative;
}

.topic-select select {
  width: 100%;
  padding: 10px 14px;
  padding-right: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
  appearance: none;
  -webkit-appearance: none;
}

.topic-select::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 12px;
  height: 12px;
  transform: translateY(-50%);
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%236b7280' d='M5.5 7.5a1 1 0 0 1 .7.3L10 11.6l3.8-3.8a1 1 0 1 1 1.4 1.4l-4.5 4.5a1 1 0 0 1-1.4 0L4.8 9.2a1 1 0 0 1 .7-1.7z'/%3E%3C/svg%3E");
  pointer-events: none;
}

html.dark-mode .topic-select::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23cbd5f5' d='M5.5 7.5a1 1 0 0 1 .7.3L10 11.6l3.8-3.8a1 1 0 1 1 1.4 1.4l-4.5 4.5a1 1 0 0 1-1.4 0L4.8 9.2a1 1 0 0 1 .7-1.7z'/%3E%3C/svg%3E");
}

.search-form {
  width: 100%;
  max-width: 320px;
  align-self: flex-start;
  position: relative;
}

.search-form input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
}

.search-form input::placeholder {
  font-size: 0.75rem;
  font-weight: 700;
}

.search-form__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-form__icon svg {
  width: 16px;
  height: 16px;
}

html.dark-mode .search-form input {
  background: #111111;
  color: #ffffff;
}

html.dark-mode .post-card__body p {
  color: #cbd5e1;
}

html.dark-mode .search-form__icon {
  color: #94a3b8;
}

.author-hero {
  padding: 40px 0 24px;
}

.author-hero__inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.author-card {
  display: flex;
  align-items: center;
  gap: 24px;
}

.author-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-name {
  margin: 0 0 6px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2rem, 2vw + 1.6rem, 2.8rem);
  line-height: 1.05;
}

.author-title {
  margin: 0 0 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.author-social {
  display: flex;
  gap: 10px;
}

.author-social a {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.author-social a:hover {
  transform: translateY(-2px);
  border-color: var(--accent-strong);
  color: var(--accent-strong);
}

.author-social svg {
  width: 16px;
  height: 16px;
}

.author-bio {
  font-size: 0.95rem;
  color: var(--text);
}

.author-bio p {
  margin: 0 0 1rem;
}

.author-posts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.author-section-title {
  margin: 24px 0 16px;
  font-size: clamp(1.6rem, 1vw + 1.2rem, 2.2rem);
  color: var(--text);
}

.posts {
  padding: 20px 0 72px;
}

.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-card__media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-strong);
  aspect-ratio: 16 / 10;
}

.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card:hover .post-card__media img {
  transform: scale(1.04);
}

.post-card__media-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e2e8f0, #f8fafc);
}

html.dark-mode .post-card__media-placeholder {
  background: linear-gradient(135deg, #0f172a, #1f2937);
}

.post-card__body h3 {
  margin: 0 0 10px;
  font-family: "Manrope", sans-serif;
  font-size: 1.1rem;
  line-height: 1.4;
}

.post-card__body h3 a:hover {
  color: var(--accent-strong);
}

.post-card__body p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.85rem;
}

.post-card .read-more {
  color: #757575;
}

.post-card .read-more:hover {
  color: #514bf0;
}

.post-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.post-tag {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  font-weight: 800;
  text-transform: uppercase;
  background: var(--surface);
  border: 1px solid var(--border);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  width: 100%;
}

.meta-dot {
  color: #9ca3af;
}

.content-wrapper {
  padding: 32px 0 72px;
}

.post-layout {
  max-width: 780px;
}

.post-layout--with-toc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  grid-template-areas: "main toc";
  gap: 48px;
  align-items: start;
  max-width: 1120px;
}

.post-layout__main {
  grid-area: main;
  min-width: 0;
}

.post-single {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.post-single h1,
.post-single h2,
.post-single h3,
.post-single h4,
.post-single h5,
.post-single h6,
.post-single h7,
.post-single h8,
.post-single h9 {
  scroll-margin-top: 96px;
}

.post-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}

.post-breadcrumbs__link:hover {
  color: var(--accent-strong);
}

.post-breadcrumbs__divider {
  color: #9ca3af;
}

.post-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-title {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2rem, 2vw + 1.6rem, 3rem);
  line-height: 1.1;
  font-weight: 600;
}

.post-single .post-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.post-author:hover {
  color: var(--accent-strong);
}

.post-hero {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-strong);
  aspect-ratio: 16 / 9;
}

.post-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-body {
  font-size: 1rem;
  color: var(--text);
}

.post-toc {
  --post-toc-offset: 96px;
  grid-area: toc;
  position: sticky;
  top: var(--post-toc-offset);
  align-self: start;
}

body.admin-bar .post-toc {
  --post-toc-offset: 128px;
}

.post-toc__inner {
  border-left: 1px solid var(--border);
  padding-left: 24px;
}

.post-toc__title {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.post-toc__nav {
  margin-top: 18px;
  max-height: calc(100dvh - var(--post-toc-offset) - 4rem);
}

.post-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: auto;
  max-height: inherit;
  padding-right: 8px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.post-toc__item {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

.post-toc__link {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  color: inherit;
  transition: color 0.2s ease;
}

.post-toc__link:hover {
  color: var(--accent-strong);
}

.post-toc__link.is-active {
  color: var(--accent-strong);
  font-weight: 700;
}

.post-toc__toggle {
  margin-top: 18px;
  padding: 0;
  border: none;
  background: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-strong);
  cursor: pointer;
}

.post-toc__toggle:hover {
  color: var(--accent);
}

.post-toc--collapsed .post-toc__list {
  max-height: 280px;
  overflow: auto;
  padding-bottom: 6px;
}

.post-toc--collapsed .post-toc__list::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--bg));
  pointer-events: none;
}

html.dark-mode .post-toc--collapsed .post-toc__list::after {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), var(--bg));
}

.post-toc--expanded .post-toc__list {
  max-height: inherit;
}

.article-body p {
  margin: 0 0 1.25rem;
  color: var(--text);
}

.article-body h2,
.article-body h3,
.article-body h4 {
  margin: 2rem 0 0.75rem;
  font-family: "Manrope", sans-serif;
}

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

.article-body ul,
.article-body ol {
  padding-left: 1.2rem;
  margin: 0 0 1.25rem;
}

.article-body .wp-block-table table {
  width: 100%;
  border-collapse: collapse;
}

.article-body .wp-block-table th,
.article-body .wp-block-table td {
  padding: 1rem 1.25rem;
}

.article-body .wp-block-table tbody tr {
  transition: background-color 0.2s ease;
}

html.dark-mode .article-body .wp-block-table table {
  background-color: #0f0f0f;
  color: #f5f5f5;
}

html.dark-mode .article-body .wp-block-table.is-style-stripes {
  border-bottom: none;
}

html.dark-mode .article-body .wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
  background-color: #222222;
}

html.dark-mode .article-body .wp-block-table.is-style-stripes tbody tr:nth-child(even) {
  background-color: transparent;
}

html.dark-mode .article-body .wp-block-table th {
  background-color: #161616;
  color: #f5f5f5;
}

html.dark-mode .article-body .wp-block-table td,
html.dark-mode .article-body .wp-block-table th {
  border-color: #2f2f2f;
}

html.dark-mode .article-body .wp-block-table tbody tr:hover {
  background-color: #1b1b1b;
}

html.dark-mode .article-body .wp-block-table.is-style-stripes tbody tr:nth-child(odd):hover {
  background-color: #2a2a2a;
}


.share-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 8px;
}

.share-label {
  font-weight: 700;
  color: var(--muted);
}

.share-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.share-button {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--surface-strong);
  color: var(--text);
  border: 1px solid var(--border);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.share-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.share-button:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  color: var(--accent-strong);
}

.pagination {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

.pagination-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  margin: 0;
}

.page-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  transition: all 0.2s ease;
  background: #ffffff;
}

html.dark-mode .page-btn {
  background: #111111;
  color: #ffffff;
}

.page-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.page-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

html.dark-mode .page-btn.active {
  color: #000000;
}

.page-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: #f6f7f9;
}

html.dark-mode .site-footer {
  background: #000000;
}

.footer {
  background: #f6f7f9;
}

html.dark-mode .footer {
  background: #000000;
}

.footer__container {
  padding: 3.25rem 0;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 3rem;
}

.footer__group {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2.5rem;
}

.footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

.footer__social {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.1875rem;
  background: #000000;
}

html.dark-mode .footer__social-link {
  background: #ffffff;
}

.footer__social-link svg {
  width: 0.75rem;
  height: 0.75rem;
  fill: #ffffff;
}

html.dark-mode .footer__social-link svg {
  fill: #000000;
}

.footer__copy {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.footer__grid {
  display: flex;
  align-items: flex-start;
  gap: 3.125rem;
}

.footer__column {
  display: flex;
  flex-direction: column;
}

.footer__column-header {
  margin-bottom: 1.5rem;
  color: #969696;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.25;
}

html.dark-mode .footer__column-header {
  color: #d8d8d8;
}

.footer__link {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  transition: color 0.15s ease-in-out;
}

.footer__link + .footer__link {
  margin-top: 0.75rem;
}

.footer__link:hover {
  color: var(--accent);
}


.empty-state {
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}

@media (min-width: 900px) {
  .nav-list {
    display: flex;
  }

  .filter-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .search-form {
    align-self: center;
  }
}

@media (max-width: 900px) {
  .site-header {
    height: 4rem;
  }

  main#content {
    padding-top: 4rem;
  }

  .header-inner {
    padding: 0.75rem 0;
    gap: 12px;
    flex-wrap: nowrap;
  }

  .header-actions {
    gap: 0.5rem;
  }

  .cta-button {
    display: none;
  }

  .header-burger {
    display: flex;
  }

  .filter-bar {
    top: 4rem;
    margin-top: 0;
  }

  body.admin-bar .filter-bar {
    top: calc(4rem + 46px);
  }

  .topic-pills {
    display: none;
  }

  .topic-select {
    display: block;
    max-width: 100%;
  }

  .search-form {
    max-width: 100%;
  }
}

@media (max-width: 960px) {
  .post-layout--with-toc {
    grid-template-columns: 1fr;
    grid-template-areas:
      "toc"
      "main";
    gap: 32px;
  }

  .post-toc {
    --post-toc-offset: 0px;
    position: static;
  }

  .post-toc__inner {
    border-left: none;
    padding-left: 0;
    border-top: none;
    padding-top: 0;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface-strong);
    padding: 16px;
  }

  .post-toc__title {
    margin-bottom: 10px;
  }

  .post-toc__nav {
    margin-top: 0;
    max-height: none;
  }

  .post-toc--expanded .post-toc__list {
    max-height: min(60vh, calc(100dvh - 13rem));
  }
}

@media (max-width: 768px) {
  .footer__container {
    flex-direction: column-reverse;
  }

  .footer__grid {
    justify-content: space-between;
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  .header-mobile {
    padding: 5.25rem 1.5rem 2rem;
    align-items: stretch;
  }

  .header-mobile__nav {
    padding-top: 0;
    align-items: flex-start;
    gap: 1rem;
    max-width: 460px;
    margin: 0 auto;
  }

  .header-mobile__link {
    width: 100%;
    text-align: left;
    font-size: 20px;
    line-height: 1.2;
    padding: 6px 0;
  }
}

@media (max-width: 420px) {
  .footer__grid {
    justify-content: flex-start;
    gap: 4.6rem;
    row-gap: 2.5rem;
    flex-wrap: wrap;
  }

  .brand-logo {
    max-width: 7rem;
    height: auto;
  }
}

/* Legal / Text Page Template
   ========================================================================== */

.legal {
  padding-top: 4.5rem;
  background-color: #ffffff;
}

html.dark-mode .legal {
  background-color: #000000;
}

.legal__container {
  max-width: 896px;
  margin: 0 auto;
}

.legal-card {
  border-radius: 16px;
  background-color: #ffffff;
  box-shadow: unset;
  padding: 2rem;
}

html.dark-mode .legal-card {
  background-color: #000000;
}

.legal-card__header {
  margin-bottom: 1.5rem;
}

.legal-card__title {
  margin: 0;
  color: #000000;
  font-size: clamp(1.8rem, 2vw + 1rem, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
}

html.dark-mode .legal-card__title {
  color: #ffffff;
}

.legal-content h1,
.legal-content h2,
.legal-content h3,
.legal-content h4,
.legal-content h5,
.legal-content h6 {
  color: #645ff6;
  scroll-margin-top: 6rem;
  font-weight: 700;
}

.legal-content h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding-bottom: 0.5rem;
}

html.dark-mode .legal-content h2 {
  border-color: rgba(255, 255, 255, 0.1);
}

.legal-content h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}

.legal-content p {
  line-height: 1.7;
  margin: 0 0 1.25rem;
}

.legal-content ul,
.legal-content ol {
  padding-left: 1.25rem;
  margin: 0 0 1.25rem;
}

.legal-content a {
  text-decoration: underline;
  color: inherit;
}

.legal-content a:hover {
  color: inherit;
}

.legal-card__footer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 900px) {
  .legal {
    padding-top: 4rem;
  }

  .legal-card {
    padding: 1.5rem;
  }
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }

  body.admin-bar .filter-bar {
    top: calc(4rem + 46px);
  }
}

@media (min-width: 768px) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .header-inner {
    flex-wrap: nowrap;
  }

  .site-nav {
    display: none;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .author-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Data Deletion Form
   ========================================================================== */

.data-deletion-container {
  max-width: 560px;
  margin: 2.5rem auto 0;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background-color: var(--surface);
}

.data-deletion-container .data-deletion__title {
  margin: 0 0 0.75rem;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.data-deletion__description {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0 0 1.25rem;
}

.data-deletion__form {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.data-deletion__field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.data-deletion__label {
  font-weight: 600;
  color: var(--text);
  font-size: 0.85rem;
}

.data-deletion__input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.data-deletion__input:focus {
  outline: none;
  border-color: var(--accent);
}

.data-deletion__input::placeholder {
  color: var(--muted);
}

.data-deletion__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}

.data-deletion__checkbox input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 0.875rem;
  height: 0.875rem;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.data-deletion__checkbox label {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.data-deletion-container {
  padding-top: 1.25rem;
}

.data-deletion__submit {
  background-color: #d9534f;
  color: #ffffff;
  padding: 10px 24px;
  border: none;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  font-family: inherit;
  letter-spacing: 0.01em;
  align-self: center;
}

.data-deletion__submit:hover {
  background-color: #c9302c;
  transform: translateY(-1px);
}

.data-deletion__submit:disabled,
.support-form__submit:disabled {
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
}

.data-deletion__status,
.support-form__status {
  display: none;
  width: 100%;
  margin: 0;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

.data-deletion__status.is-pending,
.support-form__status.is-pending,
.data-deletion__status.is-success,
.support-form__status.is-success,
.data-deletion__status.is-error,
.support-form__status.is-error {
  display: block;
}

.data-deletion__status.is-pending,
.support-form__status.is-pending {
  border-color: rgba(100, 95, 246, 0.35);
  background: rgba(100, 95, 246, 0.1);
  color: var(--accent-strong);
}

.data-deletion__status.is-success,
.support-form__status.is-success {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
}

.data-deletion__status.is-error,
.support-form__status.is-error {
  border-color: rgba(217, 83, 79, 0.35);
  background: rgba(217, 83, 79, 0.1);
  color: #b91c1c;
}

html.dark-mode .data-deletion__status.is-success,
html.dark-mode .support-form__status.is-success {
  color: #86efac;
}

html.dark-mode .data-deletion__status.is-error,
html.dark-mode .support-form__status.is-error {
  color: #fca5a5;
}

html.dark-mode .data-deletion__submit:hover {
  background-color: #e74c3c;
}

/* Support Form
   ========================================================================== */

.support-form-container {
  max-width: 600px;
  margin: 2.5rem auto 0;
  padding: 1.25rem 1.5rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background-color: var(--surface);
}

.support-form-container .support-form__title {
  margin: 0 0 0.75rem;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.support-form__description {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0 0 1.25rem;
}

.support-form {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.support-form__row {
  display: flex;
  gap: 0.875rem;
}

.support-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  flex: 1;
}

.support-form__label {
  font-weight: 600;
  color: var(--text);
  font-size: 0.85rem;
}

.support-form__input,
.support-form__select,
.support-form__textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.support-form__input:focus,
.support-form__select:focus,
.support-form__textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.support-form__input::placeholder,
.support-form__textarea::placeholder {
  color: var(--muted);
}

.support-form__select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%236b7280' d='M5.5 7.5a1 1 0 0 1 .7.3L10 11.6l3.8-3.8a1 1 0 1 1 1.4 1.4l-4.5 4.5a1 1 0 0 1-1.4 0L4.8 9.2a1 1 0 0 1 .7-1.7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  padding-right: 38px;
  border-radius: 999px;
}

html.dark-mode .support-form__select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23cbd5f5' d='M5.5 7.5a1 1 0 0 1 .7.3L10 11.6l3.8-3.8a1 1 0 1 1 1.4 1.4l-4.5 4.5a1 1 0 0 1-1.4 0L4.8 9.2a1 1 0 0 1 .7-1.7z'/%3E%3C/svg%3E");
}

.support-form__textarea {
  resize: vertical;
  min-height: 100px;
  border-radius: 16px;
  padding: 0.75rem 1rem;
}

.support-form__submit {
  background-color: #0066cc;
  color: #ffffff;
  padding: 10px 24px;
  border: none;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  font-family: inherit;
  align-self: center;
  letter-spacing: 0.01em;
}

.support-form__submit:hover {
  background-color: #0052a3;
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  .support-form__row {
    flex-direction: column;
    gap: 0.875rem;
  }
}
